Repository navigation
feat(#484): add combat-core feature spec (CollisionSystem/CombatSystem contract) - #493
Conversation
…m contract) M2 Combat MVP Gate の前提仕様として docs/product/features/combat-core.md を新規作成。 CollisionSystem/CombatSystem の責務境界・CollisionPair 型・EnemyState フィールド・ defeat policy・deterministic order を正本として定義。 docs/dev/ssot-registry.md に combat-core エントリを追加。 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
- AC coverage: 15/15 PASS(AC1〜AC15 全項目確認済み)
- Allowed Paths: 遵守(変更ファイル:
docs/product/features/combat-core.md,docs/dev/ssot-registry.mdのみ、linked issue の Allowed Paths と一致) - CI Verification: typecheck/lint/test/python-test/build/e2e 全 PASS(CI run 26667864535、head_sha=1f207e7e461ce726446396c17c4ea37b835dac8d、CI run head SHA = PR head SHA 一致)
- 検証コマンド結果: PR 本文の Verification Results テーブルで pnpm typecheck/lint/test (179 tests)/build 全 PASS 記録。docs-only 変更のため Runtime Verification Applicability = not_applicable。
- Schema Change Applicability: not_schema_change(docs-only 変更、consumer 境界への影響なし)
- Safety-sensitive: 対象外(変更ファイルは docs/ のみ、safety-sensitive キーワード非該当)
AC 詳細
- AC1:
docs/product/features/combat-core.md新規作成 — PASS - AC2: YAML frontmatter に doc_id/status: accepted/issue: "#484"/parent_issue: "#483"/trace_links — PASS
- AC3: trace_links に #483/#486/#488/#489/movement-projectile.md/game-logic.md/0001-architecture-baseline.md — PASS
- AC4: EnemyState の id/hp/maxHp/x/y/radius/speedPxPerSec/contactDamage/defeated/defeatedAtTick 全10フィールド定義 — PASS
- AC5: CollisionSystem が CollisionPair[] を返し副作用なし(HP/削除/defeat/result/resource/persistence を変更しない)を明記 — PASS
- AC6: CombatSystem が CollisionPair[] を消費し enemy damage/player damage/defeat marker/projectile deletion を担当、sortie result/resource 直接 mutate 禁止を明記 — PASS
- AC7: single-hit/non-piercing/projectileId ASC, enemyId ASC 優先順序 — PASS
- AC8: contactDamage = 1 collision tick あたりの HP 減少量(固定 60Hz タイムステップ前提)を明記 — PASS
- AC9: defeat 時 hp=0 clamp + defeated=true + defeatedAtTick=、CombatSystem は result/resource を直接 mutate しない — PASS
- AC10: SortieSystem が defeatedAtTick !== null をもとに result.kills を集計することを明記 — PASS
- AC11: narrow-phase のみ、broad-phase/CCD を non-goals として後続 Issue に defer — PASS
- AC12: 同一 tick 処理順序(projectile-enemy 先、次に player-enemy;同種内は id 昇順)を明記 — PASS
- AC13: non-goals に campaign/upgrade/persistence/audio/network/VFX/broad-phase/CCD 全て含む — PASS
- AC14: related_tests に src/systems/CollisionSystem.test.ts/CombatSystem.test.ts — PASS
- AC15: docs/dev/ssot-registry.md に combat-core エントリ追加 — PASS
Blockers
なし
Non-blockers(任意改善)
なし
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 1f207e7e461ce726446396c17c4ea37b835dac8d
recommendations: []
follow_up_issue_requests: []
判定: REQUEST CHANGESPR #493 は 主要ブロッカー1.
|
…nemyDefinition, test paths - Blocker 1: Add M2 Migration Note to CollisionSystem/CombatSystem contracts clarifying current impl vs spec gap - Blocker 2: Replace localeCompare sort with numeric compareCollisionPair comparator (SSOT); priorityKey retained for dedup only - Blocker 3: Split EnemyDefinition.id:string (definitionId) from EnemyState.id:number (monotonic spawn counter) - Blocker 4: Fix related_tests paths from src/systems/ to tests/ - Blocker 5: Replace game-logic.md section with M2 Scope Exception + no-tunneling envelope - Blocker 6: Remove sortie.md from trace_links (not yet created, #485); add "#485" reference - Blocker 7: No hidden Unicode characters found Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
- AC coverage: 15/15 PASS — all ACs verified against diff content
- AC1: combat-core.md exists
- AC2: YAML frontmatter has doc_id, status: accepted, issue: "#484", parent_issue, trace_links
- AC3: trace_links includes #483, #486, #488, #489, movement-projectile.md, game-logic.md, 0001-architecture-baseline.md
- AC4: EnemyState fields: id:number, definitionId:string, hp, maxHp, x, y, radius, speedPxPerSec, contactDamage, defeated, defeatedAtTick
- AC5: CollisionSystem contract — circle hitbox only, CollisionPair[] output, prohibitions listed
- AC6: CombatSystem contract — consumes CollisionPair[], no direct result/resource/persistence mutation
- AC7: single-hit / non-piercing / projectileId ASC, enemyId ASC order
- AC8: contactDamage unit = HP decrease per collision tick (60Hz fixed timestep)
- AC9: hp=0 clamp + defeated=true + defeatedAtTick=; CombatSystem does not mutate result/resource
- AC10: SortieSystem collects result.kills from defeatedAtTick !== null
- AC11: narrow-phase only; broad-phase/CCD deferred
- AC12: projectile-enemy first, then player-enemy; same-kind id ascending
- AC13: non-goals include campaign/upgrade/persistence/audio/network/VFX/broad-phase/CCD
- AC14: related_tests lists tests/collision-system.test.ts and tests/combat-system.test.ts (corrected from iteration=0 blocker)
- AC15: ssot-registry.md has combat-core entry
- Allowed Paths: compliant — only docs/dev/ssot-registry.md and docs/product/features/combat-core.md changed; both within Allowed Paths
- CI Verification: all 7 checks pass (typecheck, lint, test, build, e2e, python-test, generate agent session manifest); CI run headSha=41791d97b51b7dd1f36fa5f58d669cc59f817395 matches PR headRefOid; conclusion=success (CI_CHECK_RUN_SCOPED conditions satisfied)
- Verification Commands: pnpm typecheck/lint/test/build all PASS per PR body and CI; docs-only grep VCs verified via diff content
Iteration=1 Blocker Resolution Check
- M2 Migration Note added to CollisionSystem and CombatSystem sections — resolved
- compareCollisionPair uses numeric tuple comparator (projectileId/enemyId subtraction) — resolved
- EnemyDefinition.definitionId:string + EnemyState.id:number separation — resolved
- related_tests paths corrected to tests/collision-system.test.ts / tests/combat-system.test.ts — resolved
- M2 Scope Exception section with no-tunneling envelope explicitly stated — resolved
- trace_links: sortie.md removed, #485 added — resolved
- Hidden/bidi Unicode: none found (confirmed)
Blockers
- none
Non-blockers
- none
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 41791d97b51b7dd1f36fa5f58d669cc59f817395
recommendations: []
follow_up_issue_requests: []
Summary
docs/product/features/combat-core.mdを新規作成(M2 Combat MVP Gate の前提仕様)CollisionSystem/CombatSystemの責務境界・CollisionPair型・EnemyStateフィールド・defeat policy・deterministic order を正本として定義docs/dev/ssot-registry.mdに combat-core エントリを追加Closes #484
Refs #483
Contract Snapshot
#484 (comment)
Verification Results
pnpm typecheckpnpm lintpnpm testpnpm buildAllowed Paths Compliance
docs/product/features/combat-core.md— 新規作成docs/dev/ssot-registry.md— combat-core エントリ追加Runtime Verification Applicability
not_applicable— docs-only 変更。静的検証のみで完結。🤖 Generated with Claude Code