Repository navigation
Closed
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "movement + projectile 実装 (#1) の前段として、最小仕様を feature spec として固定する"
change_kind: docs
diff_rationale: "Issue #1 実装の前提となる固定定数・座標系・lifecycle を feature spec として一箇所に固定し、実装ブレを防ぐため"
changed_requirement: "M1 Foundation Gate の Combat MVP 最初の単位(movement + projectile)の最小仕様を独立 feature spec として明文化"
affected_sections:
- "docs/product/features/movement-projectile.md (new)"
- "docs/dev/ssot-registry.md (append: movement-projectile entry)"
- "docs/dev/workflow.md (conditional: SSOT Routing Table update if needed)"Parent Issue
none
Parent Goal Ref
- Goal:
movement + projectile実装 (実装: 自機移動と Projectile 射撃システム #1) の判断ブレを防ぐため、最小仕様を独立した feature spec として固定する - Desired Destination: M1 Foundation Gate (v0.1.x) 配下の Combat MVP 最初の単位を、実装着手前に最小仕様で固定した状態
Current Validated Scope
docs/product/features/movement-projectile.mdを新規追加(compact feature spec)docs/dev/ssot-registry.mdに当該 feature spec を登録docs/dev/workflow.mdの SSOT Routing Table を確認し、追加が必要なら同 PR で更新
Remaining Parent Gaps
#1の実装(コード変更)本体は本 Issue 範囲外#1側 body からの spec への back-reference は本 Issue マージ後の follow-up
Outcome
docs/product/features/movement-projectile.md が compact feature spec として追加され、player 移動・aim・fire・projectile の定数・座標系・lifecycle・テスト AC が固定され、#1 実装者が当該 spec だけを参照して着手判断できる状態になっている。
In Scope
docs/product/features/movement-projectile.md新規作成- YAML frontmatter:
status: draft,issue: "#2",parent_issue: "#1",doc_id: movement-projectile,trace_links: ["#1", "docs/adr/0001-architecture-baseline.md", "docs/product/game-logic.md"] - sections:
intent,requirements,acceptance_criteria,non_goals,open_questions,playtest_hypotheses,related_tests
- YAML frontmatter:
docs/dev/ssot-registry.mdへの 1 エントリ追加(doc_idmovement-projectile)docs/dev/workflow.mdの SSOT Routing Table の確認・必要時の追記
Out of Scope
movement + projectileのコード実装(src/systems/**,src/state/**,src/render/**への変更)GameStateschema やProjectileentity の実コード追加#1の Acceptance Criteria 達成- Combat 全体の包括仕様化
- 当たり判定・ダメージ・敵 AI・演出強化の仕様化
Acceptance Criteria
- AC1:
docs/product/features/movement-projectile.mdが存在し、YAML frontmatter にstatus: draft、issue: "#2"、parent_issue: "#1"、doc_id: movement-projectile、trace_linksが含まれる - AC2: spec 本文に必須セクション
intent/requirements/acceptance_criteria/non_goals/open_questions/playtest_hypotheses/related_testsが存在する - AC3: spec 本文に以下の固定定数識別子が明記されている:
coordinate_space: arena logical pixels、diagonal_normalization、boundary_clamp、PointerEvent、cooldown_authority、GameState.projectiles、monotonic counter、player_speed_px_per_sec、projectile_speed_px_per_sec、projectile_lifetime_ms、fire_cooldown_ms、player_radius_px、arena_width_px、arena_height_px(player と projectile で識別子を分離する) - AC4: rAF と 60Hz fixed timestep の境界が明文化され、
requestAnimationFrame/60Hz/120Hz/devicePixelRatioのいずれかへの言及がある。panic clamp の挙動がdocs/product/game-logic.mdREQ-LOGIC-TIME-002(maxFrameSkipで catch-up step 上限化、超過 accumulated time は破棄)と整合している - AC5:
related_testsセクションにtests/movement-system.test.ts/tests/combat-system.test.ts/tests/projectile-system.test.ts/tests/input-mapper.test.tsの 4 ファイルが列挙されている - AC6:
non_goalsに collision / damage / enemy AI / visual effects のキーワードが含まれる - AC7:
docs/dev/ssot-registry.mdにmovement-projectileエントリが追加されている - AC8:
pnpm typecheck/pnpm lint/pnpm test/pnpm buildが baseline と同等に PASS する
Verification Commands
# AC1: spec ファイル存在(baseline で fail 期待)
$ test -f docs/product/features/movement-projectile.md
# AC1: frontmatter 内容検証(test-runner が worktree 内で実行)
# preflight-scope: runtime_only
$ rg -nq '^status:\s*draft' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq '^issue:\s*"#2"' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq '^parent_issue:\s*"#1"' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq '^doc_id:\s*movement-projectile' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq '^trace_links:' docs/product/features/movement-projectile.md
# AC2: required sections(runtime 検証)
# preflight-scope: runtime_only
$ rg -nq '^(##|###)\s+intent' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq '^(##|###)\s+requirements' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq '^(##|###)\s+acceptance_criteria' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq '^(##|###)\s+non_goals' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq '^(##|###)\s+open_questions' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq '^(##|###)\s+playtest_hypotheses' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq '^(##|###)\s+related_tests' docs/product/features/movement-projectile.md
# AC3: fixed constants(runtime 検証)
# preflight-scope: runtime_only
$ rg -nq 'arena logical pixels' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'diagonal_normalization' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'boundary_clamp' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'PointerEvent' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'cooldown_authority' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'GameState\.projectiles' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'monotonic counter' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'player_speed_px_per_sec' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'projectile_speed_px_per_sec' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'projectile_lifetime_ms' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'fire_cooldown_ms' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'player_radius_px' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'arena_width_px' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'arena_height_px' docs/product/features/movement-projectile.md
# AC4: rAF / 60Hz / DPR boundary + panic clamp 整合(runtime 検証)
# preflight-scope: runtime_only
$ rg -nq 'requestAnimationFrame|rAF|60Hz|120Hz|devicePixelRatio' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'maxFrameSkip' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'REQ-LOGIC-TIME-002' docs/product/features/movement-projectile.md
# AC5: test files enumerated(runtime 検証)
# preflight-scope: runtime_only
$ rg -nq 'tests/movement-system\.test\.ts' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'tests/combat-system\.test\.ts' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'tests/projectile-system\.test\.ts' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq 'tests/input-mapper\.test\.ts' docs/product/features/movement-projectile.md
# AC6: non_goals keywords(runtime 検証)
# preflight-scope: runtime_only
$ rg -nq -i 'collision' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq -i 'damage' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq -i 'enemy ai|enemy_ai' docs/product/features/movement-projectile.md
# preflight-scope: runtime_only
$ rg -nq -i 'visual effects|visual_effects' docs/product/features/movement-projectile.md
# AC7: ssot-registry entry(runtime 検証)
# preflight-scope: runtime_only
$ rg -nq 'movement-projectile' docs/dev/ssot-registry.md
# AC8: quality gates(baseline で pass 期待 = regression_gate)
$ pnpm typecheck
$ pnpm lint
$ pnpm test
$ pnpm buildAllowed Paths
docs/product/features/movement-projectile.md(新規)docs/dev/ssot-registry.md(追記)docs/dev/workflow.md(必要時のみ追記)
Stop Conditions
src/**への変更が必要になった場合(本 Issue は docs-only。コード変更は 実装: 自機移動と Projectile 射撃システム #1 のスコープ)tests/**への変更が必要になった場合(テスト追加は 実装: 自機移動と Projectile 射撃システム #1 のスコープ)- spec 内容が
docs/product/requirements.mdと矛盾する判断を要求した場合 - spec 内容が
docs/adr/0001-architecture-baseline.mdの不変原則と矛盾した場合 docs/product/**の他 SSOT との routing 衝突が解消できない場合docs/dev/runtime-verification-policy.mdと矛盾する VC 規約を要求された場合assets/またはLICENSES/への変更が必要になった場合
Runtime Verification Applicability
decision: not_applicable
reason: "本 Issue は docs-only の feature spec 追加であり、runtime 挙動を持たない。Runtime Verification の対象は #1 実装側で扱う。"Required Skills
implement-issueedit-issue
関連
- 実装 Issue: 実装: 自機移動と Projectile 射撃システム #1
- docs 整備: AI運用憲法と最小仕様正本を整備する #3(マージ済 PR docs: Issue #3 のドキュメント基盤と運用ルールを整備 #6)
- アーキテクチャ baseline:
docs/adr/0001-architecture-baseline.md - アンカーコメント(OWNER BLOCK / 要件源泉): movement + projectile の最小仕様を固定する #2 (comment)
Metadata
Metadata
Assignees
Labels
No labels
Activity
chore: M1 Milestone 割当実施 — Parent Issue 直接割当・Implementation Issue 解除 (#…
squne121 commentedon May 27, 2026
判定: BLOCK / Issue #2 はこのまま実装 Issue に渡すべきではない
#2 の方向性自体は正しいです。#1 の「自機移動と Projectile 射撃システム」実装前に、
movement + projectileの最小仕様を固定するという分割は妥当です。#2 はコード実装を非ゴールにしており、#1 を実装 Issue として参照しています。([GitHub]1)ただし、現在の #2 は 「実装判断のブレを防ぐ仕様」になっていません。受け入れ条件が「迷わず着手できる」なのに、速度、cooldown、spawn 位置、projectile ID、削除境界、pointer 座標系、DPR、連射入力、tick authority、テスト対象が未固定です。これでは #1 実装者が既存コードの延長で
shotsFired++やresources++を射撃扱いにしても、Issue 上は明確に弾けません。現行CombatSystemは fire 時に projectile を生成せず、cooldown 後にshotsFiredとresourcesを増やすだけです。([GitHub]2)関連 Issue / PR / コメントの確認結果
直接関連は #1 です。#1 は
MovementSystem,CombatSystem,ProjectileSystem,GameState,CanvasRenderer,main.tsまで含む実装 Issue で、Projectile の生成・移動・寿命切れ・画面外削除・描画・Vitest を受け入れ条件にしています。([GitHub]3)#2 自体には、GitHub の表示上、linked PR / branch はありません。Relationships も “None yet”、Development も “No branches or pull requests” です。([GitHub]1)
後続の #3 / PR #6 が重要です。#3 は
CLAUDE.md,requirements.md,current-focus.mdを整備し、#1/#2 の実装者が参照先に迷わないことを AC にしています。PR #6 はこれを merged し、docs 優先順位と Foundation Gate の現在地を固定したと説明しています。([GitHub]4) ([GitHub]5)さらに現在の
current-focus.mdは、#2 を #1 より先に置き、movement + projectileは #2 の仕様固定を経てから #1 に入る、と明記しています。ここは #2 の存在意義を強く裏付けます。([GitHub]6)致命的な問題
1. 配置先が未確定のままになっている
#2 は成果物候補として
docs/product/またはdocs/dev/と書いていますが、現行ルールでは feature-level spec の標準配置はdocs/product/features/.mdです。さらにdocs/product/**追加時は YAML frontmatter、compact spec、EARS、non_goals、trace_links、ssot-registry.md登録、workflow routing 追加が必要です。([GitHub]7)したがって #2 の AC は古いです。「どこに置くかは実装者が選ぶ」ではなく、
docs/product/features/movement-projectile.mdを作る、と固定すべきです。2. 「最小仕様」と言いながら、実装に必要な定数が空白
少なくとも以下は固定しないと #1 が曖昧になります。
GameStateでは210GameStateでは14GameStateでは280ms現行
GameStateにはprojectilesがなく、PlayerStateには aim と cooldown と shotsFired だけがあります。つまり #2 が定数と state schema を固定しない限り、#1 は「既存 fire を少し拡張する」のか「Projectile entity を追加する」のか判断できません。([GitHub]8)3. rAF と 60Hz fixed timestep の境界が弱い
MDN は
requestAnimationFrame()の頻度は通常ディスプレイのリフレッシュレートに一致し、60Hz だけでなく 75Hz / 120Hz / 144Hz も広く使われ、バックグラウンドでは停止されることが多いと説明しています。つまり「Canvas 上で見える」ことと「60Hz 固定 tick で simulation が進む」ことは分けて仕様化しないと、120Hz 環境や background 復帰時に壊れます。([MDN Web Docs]9)現行 main は accumulator と
maxFrameSkip = 5を持っていますが、#2 は panic clamp 後の残余時間をどう扱うか、Projectile cooldown が simulation tick authority に従うか、render interpolation をしないのかするのかを固定していません。([GitHub]10) ([GitHub]11)4. pointer / Canvas 座標系が雑
Pointer Events は mouse / pen / touch を同じイベントモデルで扱うための仕様です。#2 が「ポインタ方向」とだけ書くと、mouse 前提なのか pointer 前提なのか、pointer capture を使うのか、canvas 外 drag 中も fire/aim を維持するのかが未定義になります。([MDN Web Docs]12)
また Canvas は CSS pixel と backing store pixel の差、
devicePixelRatio対応が問題になります。MDN は高解像度ディスプレイで canvas がぼやける問題に対し、devicePixelRatioとgetBoundingClientRect()を使って canvas の実サイズと context scale を合わせる方法を示しています。#2 が「Canvas 境界」と言うなら、論理 arena 座標なのか CSS 表示座標なのか backing pixel なのかを明記すべきです。([MDN Web Docs]13)5. 既存テストが #2 の期待をほぼ担保していない
現行テストは
MovementSystemの単純移動、CombatSystemの fire 時 resource 加算、InputMapperの command 生成だけです。Projectile 生成、cooldown 中の再生成抑止、Projectile 移動、寿命切れ削除、画面外削除、境界 clamp は未検証です。([GitHub]14) ([GitHub]15) ([GitHub]16)#2 は「Vitest で担保するテスト観点」を列挙していますが、AC として弱いです。テストファイル名・最低ケース・失敗条件まで要求しないと、#1 の PR レビューで弾けません。
#2 への修正要求
#2 は以下のように更新すべきです。
最小仕様として固定すべき値
最低テスト AC
レビュー結論
#2 は コンセプト Issue としては妥当ですが、implementation blocker としては未完成です。特に、現行 docs ルールに対して配置・frontmatter・registry・traceability が古く、Projectile の state schema と deterministic lifecycle が空白です。
このまま #1 に進むと、既存の
shotsFired/resourcesベースの擬似射撃を「射撃実装」と誤認する余地が残ります。#2 はまずdocs/product/features/movement-projectile.mdの compact spec 作成 Issue として再整形し、定数・座標系・lifecycle・テスト AC を固定してから #1 に渡すべきです。squne121 commentedon May 27, 2026
squne121 commentedon May 27, 2026
Contract Snapshot (2026-05-27T22:42:44Z)
Handoff
docs/product/features/movement-projectile.mdに追加し、固定定数・座標系・lifecycle・テスト AC を一箇所に固定するpreflight-scope: runtime_onlyで test-runner に委譲.claude/worktrees/issue-2-movement-projectile-specworktree-issue-2-movement-projectile-specsqune121 commentedon May 27, 2026
implement-issue: 実装完了 (2026-05-28T07:45:30Z)
```yaml
IMPLEMENT_RESULT_V1:
status: ok
generated_at: "2026-05-28T07:45:30Z"
generated_by: implement-issue
issue_url: #2
pr_url: #440
worktree: .claude/worktrees/issue-2-movement-projectile-spec
branch: worktree-issue-2-movement-projectile-spec
verification:
typecheck: pass
lint: pass
test:
passed: 75
failed: 0
files: 7
build: pass
allowed_paths_compliance: true
warnings: []
errors: []
```
docs(#2): apply review fixes from PR #440 anchor comment
docs(#2): movement + projectile 最小仕様を feature spec として固定する (#440)
fix(#432): address review blockers — artifact rename, belt-and-suspen…
feat: enforce manifest validation required check (#432) (#540)
fix(#1791 review remediation): readiness→structured_blockers を決定論的CLI…
実装: review-issue の structured_blockers を compact_review_result.py の R…
fix: PR #2006 review iteration 3 -- complete AC8 boundary-cell VRT ba…