Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#2702"
goal_ref: "M6 delivery-rollup parent #2702 の Desired Destination: unit-operations-and-npc-behavior.md の status/§6 Current Runtime Compatibility Matrix を current main の実装事実(AllyBehaviorSystem 等)と一致させる"
change_kind: docsParent Issue
Parent Goal Ref
- Goal:
docs/product/playable-roadmap.mdM6 section とdocs/product/game-thesis.mdのHYP-001-ace-interventionを authority とし、pre-landed な ally/assist_player capability を roadmap・feature spec・milestone の SSOT に正しく反映し、HYP-001 を developer-self playtest で検証可能・検証済みの状態にする - Desired Destination:
docs/product/features/unit-operations-and-npc-behavior.mdのstatusが draft のままか accepted へ昇格するかが Human Product Review を経て確定し、§6 Current Runtime Compatibility Matrix の記述が current main の実装(src/state/GameState.tsの Faction/UnitRole/CommandIntent/NpcBehaviorState/TargetingPolicy/AllyState、src/systems/AllyBehaviorSystem.ts、src/systems/TargetingSystem.ts)と一致した状態になっていること
Current Validated Scope
docs/product/features/unit-operations-and-npc-behavior.mdの §6 Current Runtime Compatibility Matrix を diff-first で更新し、allies: absent/command intent: absent/targeting policy: absentの記述を、実際に確認した実装状況(Faction.ally/UnitRole.ally_basic/CommandIntent.assist_player/NpcBehaviorState/TargetingPolicy/AllyStateがsrc/state/GameState.tsに実装済み、AllyBehaviorSystem.ts/TargetingSystem.tsが実装済み)へ訂正する- 同ファイルへ 実装: unit taxonomy 型5種(Faction / UnitRole / CommandIntent / NpcBehaviorState / TargetingPolicy)を src/state に追加する #981〜実装: assist_player playtest self-explanation test と evidence policy を整備する #987・実装: UI runtime に Canvas cue / DOM HUD 責務分離を反映し raw enum を通常 UI から除去する #1173 の landing(何が実装され、どのファイルに存在するか)を追記する
- 同ファイル内で本spec更新が既存 acceptance(frontmatter
acceptanceの AC1〜AC17)を無効化する変更に該当するかを判定し、該当する場合はdocs/dev/product-spec-lifecycle.mdの spec delta として本文または Issue コメントに明記する
Remaining Parent Gaps
-
status: draft→status: acceptedへの昇格判断自体(Human Product Review が必須。本 Issue の Out of Scope) -
docs/product/playable-roadmap.mdM6 section のgithub_milestone_number/mapping_status更新(別 child issue の責務) - current main 上での
HYP-001-ace-interventioncausal baseline evidence 記録(別 child issue の責務)
Outcome
docs/product/features/unit-operations-and-npc-behavior.md の §6 Current Runtime Compatibility Matrix が current main の実装事実(src/state/GameState.ts / src/systems/AllyBehaviorSystem.ts / src/systems/TargetingSystem.ts)と一致するよう更新され、#981〜#987・#1173 の landing trace が同ファイルへ追記され、pnpm lint が通過している状態。
§6 に加えて、§7.1・§7.3・§14・§15 のうち current main の実装事実と矛盾する stale な記述も diff-first で訂正され、status frontmatter は draft のまま維持し、accepted 昇格の要否判断は別途 Human Product Review へ委ねる旨が Issue コメントまたは PR description に明記されている。
Runtime Verification Applicability
- decision: not_applicable
- reason: docs-only 変更であり、
src/のランタイム挙動を変更しないため動作検証は不要。静的な文字列一致確認(rg/grep)とpnpm lintのみで完結する。
In Scope
docs/product/features/unit-operations-and-npc-behavior.md§6 Current Runtime Compatibility Matrix の記述更新(diff-first)- 同ファイル §7.1(Current order)・§7.3(Delta current→target 表)・§14(8-Stage Follow-up Decomposition)・§15(Handoff Contract Bounded Current Context)の記述のうち、current main の実装事実(
src/systems/SortieSystem.tsのrunSortieSimulationStepにおける command sampling・runAllyBehaviorSystem呼び出し、実装: unit taxonomy 型5種(Faction / UnitRole / CommandIntent / NpcBehaviorState / TargetingPolicy)を src/state に追加する #981〜実装: assist_player playtest self-explanation test と evidence policy を整備する #987/実装: UI runtime に Canvas cue / DOM HUD 責務分離を反映し raw enum を通常 UI から除去する #1173 の landing 状態、現在の milestone フェーズ)と矛盾する stale な記述を diff-first で訂正する。全面書き換えは行わず、矛盾している行のみを訂正する。 - 同ファイルへの 実装: unit taxonomy 型5種(Faction / UnitRole / CommandIntent / NpcBehaviorState / TargetingPolicy)を src/state に追加する #981〜実装: assist_player playtest self-explanation test と evidence policy を整備する #987・実装: UI runtime に Canvas cue / DOM HUD 責務分離を反映し raw enum を通常 UI から除去する #1173 landing trace 追記
- 同ファイル内での M6 close conditions(
docs/product/playable-roadmap.mdM6 section)/HYP-001(docs/product/game-thesis.md)/ non-goals との整合確認と、矛盾があった場合の記録 - 本 Issue 完了後の
status昇格要否についての recommendation を PR description または Issue コメントに記載(frontmatter 変更は行わない)
Human Product Review Decision Point
本 Issue は status frontmatter の値を単独で確定しない。ただし本 Issue の completion contract には、以下いずれかの disposition が Human Product Review を経て明示的に記録されることを含める:
accepted: §6/§7.1/§7.3/§14/§15 の stale 記述訂正・実装: unit taxonomy 型5種(Faction / UnitRole / CommandIntent / NpcBehaviorState / TargetingPolicy)を src/state に追加する #981〜実装: assist_player playtest self-explanation test と evidence policy を整備する #987/実装: UI runtime に Canvas cue / DOM HUD 責務分離を反映し raw enum を通常 UI から除去する #1173 landing trace 追記が完了し、Human がstatus: acceptedへの昇格を明示的に承認した場合。この場合、frontmatter 変更自体は本 Issue の Allowed Paths 内で Human 承認後に反映してよい。draft_continue: Human が draft 継続を選んだ場合。この場合、frontmatter はdraftのまま維持し、継続理由を本 Issue のコメントまたは PR description に明記する。
AI(本 Issue の実行者)が単独で accepted を確定させることはない。両disposition とも、Human の明示的な確認(Issue コメントでの承認、または明確な承認シグナル)を伴わない限り、本 Issue は disposition 未確定として close しない。draft_continue が選ばれた場合、親 Issue(#2702)の「spec authority 確立」という close condition の一部は満たされていない状態として扱い、AI がこれを false-green で「確立済み」と記録することはない。
Out of Scope
docs/product/features/unit-operations-and-npc-behavior.mdのstatus: draft→status: acceptedへのフロントマター変更(Human Product Review が必須のため、このIssueでは実行しない)- ally/assist_player runtime のコード変更(
src/配下は Allowed Paths に含めない) docs/product/mvp-scope.md/docs/product/playtest-protocol.md自体の内容変更docs/product/playable-roadmap.mdM6 section の milestone number / mapping_status 更新(別 child issue)
Acceptance Criteria
- AC1: §6 Current Runtime Compatibility Matrix 内の
allies | absentという記述が除去され、Faction.ally/UnitRole.ally_basic/AllyStateの実装済み状況を反映した記述に更新されている - AC2: §6 内の
command intent | absent(\InputCommand` = move/aim/fire のみ)という記述が除去され、CommandIntent.assist_player` の実装済み状況を反映した記述に更新されている - AC3: §6 内の
targeting policy | absent(chaser のみ)という記述が除去され、TargetingPolicyの実装済み状況を反映した記述に更新されている - AC4: 同ファイル内に
#981〜#987のいずれかの Issue 番号を用いた landing trace 記述が新規追加されている - AC5: frontmatter の
statusフィールドがdraftのまま変更されていない - AC6:
pnpm lintが成功する - AC7: §7.1 内の「現行には command intent の sampling 段も、NPC target acquisition の snapshot boundary も存在しない」という記述、または §7.3 の「current」列における stale な記述(command sampling なし等)が、current main の実装事実(command sampling・ally behavior step の存在)を反映するよう訂正されている。
- AC8: §15 の Bounded Current Context 内「ally / CommandIntent / TargetingPolicy 不在」「現在フェーズは M3」という記述が、current main の実装事実(ally/CommandIntent/TargetingPolicy 実装済み、現在の milestone フェーズ)を反映するよう訂正されている。
- AC9:
acceptedまたはdraft_continueのいずれかの disposition が Human Product Review を経て Issue コメントまたは PR description に明記されている。AI が単独でacceptedを確定させていないことが確認できる。
Verification Commands
# AC1
$ rg -c "allies.{1,3}absent" docs/product/features/unit-operations-and-npc-behavior.md
# AC2
$ rg -c "command intent.{1,3}absent" docs/product/features/unit-operations-and-npc-behavior.md
# AC3
$ rg -c "targeting policy.{1,3}absent" docs/product/features/unit-operations-and-npc-behavior.md
# AC4
$ rg -c "#98[1-7]" docs/product/features/unit-operations-and-npc-behavior.md
# AC5
$ rg -n "^status: draft$" docs/product/features/unit-operations-and-npc-behavior.md
# AC6
$ pnpm lint
# AC7
$ rg -c "command intent.{1,5}sampling.{1,10}段も.{1,10}存在しない" docs/product/features/unit-operations-and-npc-behavior.md
# AC8
$ rg -c "ally.{0,3}/.{0,3}CommandIntent.{0,3}/.{0,3}TargetingPolicy.{0,3}不在" docs/product/features/unit-operations-and-npc-behavior.md
# AC9
$ true- AC1: 出力が
0であること(該当行が除去されたことを確認) - AC2: 出力が
0であること(該当行が除去されたことを確認) - AC3: 出力が
0であること(該当行が除去されたことを確認) - AC4: 出力が
0より大きいこと(landing trace が追記されたことを確認) - AC5: マッチすること(frontmatter status が draft のまま維持されていることを確認)
- AC6: exit code 0 であること
- AC7: 出力が
0であること(stale な command sampling 不在記述が訂正されたことを確認) - AC8: 出力が
0であること(stale な ally/CommandIntent/TargetingPolicy 不在記述が訂正されたことを確認) - AC9: 上記 true コマンドは VC セクション形式上のプレースホルダであり、AC9 自体は shell コマンドでは充足しない。Issue コメントまたは PR description における Human Product Review の human confirmation readback(承認シグナルの明記)で確認する。
Allowed Paths
- docs/product/features/unit-operations-and-npc-behavior.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合(特に
src/配下のコード変更が必要と感じた場合は直ちに停止する) - In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合、または
status: draft→acceptedへの昇格を単独で確定させたくなった場合は必ず停止し人間判断を仰ぐ
Required Skills
なし
Required Design References
- docs/dev/product-spec-lifecycle.md#Update Rules
- docs/product/playable-roadmap.md
- docs/product/game-thesis.md
Scope Delta(任意)
N/A
- Scope Collision (C1) advisory: related_issue=改善: VC 設計ガイドラインに否定パターン誤マッチ防止チェックを追加 #237, 実装: rate limit / API error 由来の停止を StopFailure hook でログ保存し resume playbook を整備する #225, 改善: executable bit audit CI guard の適用範囲を .claude/skills 外のスクリプトへ拡張する #213; overlapping_paths=docs/dev/current-focus.md(これら候補は
docs/devを broad allowed path として持つ過去の別 concern の Issue であり、本 Issue のdocs/dev/current-focus.md単一ファイル diff-first 更新と non_conflict。dependency ordering不要。導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 Owner Decision により起票続行)。
Notes for Reviewer
Overlap preflight(check_issue_overlap.py)で decision: overlap_requires_comment(policy_class C1)を検出。ただし候補 #1185(docs/product/features/movement-projectile.md の status 移行判断、対象ファイルは別ファイル)と #435(tokenization 設計判断)はいずれも docs/product/features(ディレクトリ全体)を Allowed Paths とする broad-path match であり、本 Issue の narrow bare path(docs/product/features/unit-operations-and-npc-behavior.md)との実質的な作業内容の重複はない(non_conflict_reason: 対象ファイルおよび作業内容が異なる)。#1860 Owner Decision に従い、advisory として記録した上で起票を継続する。
Activity