Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#254"
goal_ref: "SDD 駆動運用を採用しつつ、AI が実装前に必ず参照すべきプロダクト SSOT(game-logic)を追加する"
change_kind: docs
source_basis:
game_thesis: accepted # docs/product/game-thesis.md status
game_design:
status: draft
reconciliation_required_before_normative_use: true
fallback_used:
- docs/product/requirements.md
- docs/product/game-thesis.md
- docs/adr/0001-architecture-baseline.md
- docs/adr/0002-sdd-tool-adoption.md
- docs/dev/product-spec-lifecycle.mdParent Issue
Parent Goal Ref
- Goal: Spec Driven Development(SDD)駆動運用を採用しつつ、既存 docs/SSOT・Skill/SubAgent・Issue/PR 運用と整合させ、AI が実装前に必ず参照すべきプロダクト SSOT(game-thesis / game-design / game-logic / mvp-scope / playtest / lifecycle / release)を child Issue として段階起票する
- Desired Destination: 不足 product SSOT 7 種が child Issue としてマージ済みとなり、
docs/dev/ssot-registry.mdに上記 SSOT が登録され、ssot-discoveryskill 経由で検出可能な状態
Current Validated Scope
docs/product/game-logic.mdの新規作成- YAML frontmatter:
status: draft,issue: "#287",parent_issue: "#254",doc_id: game-logic,trace_links - 必須セクション(日本語/英語併記)
- YAML frontmatter:
docs/dev/ssot-registry.mdへの game-logic エントリ追加
Remaining Parent Gaps
- C254-6 —
docs/product/mvp-scope.md(MVP 仮説 / included / excluded / success / failure / pivot 基準) - C254-7 —
docs/product/playtest-protocol.md+docs/product/playtest-log.mdtemplate - C254-8 —
docs/dev/release-distribution-policy.md - 全 child close 後の parent 親: SDD 駆動運用方針の確定と不足 product SSOT の child 起票 #254 クローズ
Outcome
docs/product/game-logic.md が main にマージされ、docs/dev/ssot-registry.md に game-logic エントリが登録されている。目的 / 正本階層 / 要求 / 状態遷移 / 入力 / 時間モデル / 衝突 / 勝敗 / 保存境界 / 非ゴール / 下流境界 / 未解決の問い / 検証が記述されており、src/state / src/systems / src/storage 実装の仕様根拠として参照可能な状態。
In Scope
docs/product/game-logic.mdの新規作成- YAML frontmatter:
status: draft,issue: "#287",parent_issue: "#254",doc_id: game-logic,trace_links - 必須セクション(日本語/英語併記):
## 目的 / Intent## 正本階層 / Authority and Fallbacks(game-thesis.md accepted を上位、game-design.md draft を補助参照に明示)## 要求 / Requirements(EARS は AC レベルの 5〜9 個に限定)## 状態遷移 / State Transitions## 入力 / Input(DOM event を simulation に直接渡さず InputCommand に正規化)## 時間モデル / Time Model(60Hz 固定タイムステップ、accumulator、panic clamp、rAF=elapsed time のみ)## 衝突 / Collision(broad-phase + tick 内移動距離 > collider radius の高速 projectile のみ swept/CCD)## 勝敗 / Victory, Defeat, Draw(下記 Decision を反映)## 保存境界 / Persistence Boundary(src/storage 境界、MVP localStorage、安定点 snapshot、entity id ベース)## 非ゴール / Non-Goals## 下流境界 / Downstream Boundaries## 未解決の問い / Open Questions## 検証 / Verification Notes
- compact spec 制約: 250 行以内
- YAML frontmatter:
docs/dev/ssot-registry.mdへの game-logic エントリ追加- registry id は
game-logic(spec-game-logic等の prefix は禁止) - YAML-list 形式、既存 entry (game-thesis / game-design / requirements) と同じフォーマット
- registry id は
Victory/Defeat/Draw Decision (人間 Decision 反映)
- 敗北条件: player-controlled entity の combat HP が 0 以下になった時点で defeat state へ遷移
- 戦闘終了トリガ (OR、いずれか先に成立):
- 120 秒の sortie timer 満了 → 戦闘終了(通常戦闘報酬)
- 敵拠点破壊 → 戦闘終了(多量戦闘報酬)
- 敵機殲滅 → 戦闘終了(勝利扱い)
- Draw: MVP では定義しない(タイマー満了 = 通常終了として扱う)
- 数値(具体的な報酬量・拠点 HP・敵機数)は Open Questions に退避
Product Spec Context
- spec_kind: creation
- diff_rationale: 新規 SSOT 創設。docs/product/game-logic.md を LOOP_PROTOCOL のゲームロジック仕様(状態遷移・入力・時間モデル・衝突・勝敗・保存境界)の正本として新規追加する。Parent 親: SDD 駆動運用方針の確定と不足 product SSOT の child 起票 #254 SDD 採用 rollup の C254-5 child として spec creation を担う。
- changed_requirement_id:
- SSOT-NEW: game-logic
- REQ-LOGIC-001〜005(Requirements セクション内で EARS 形式で番号付け、5〜9 個)
- affected_sections:
- docs/product/game-logic.md(新規ファイル、13 セクション)
- docs/dev/ssot-registry.md(新規 entry 1 件追加)
- spec_delta_link: Parent Issue 親: SDD 駆動運用方針の確定と不足 product SSOT の child 起票 #254(SDD 採用 rollup)の C254-5 child として spec creation。Parent 親: SDD 駆動運用方針の確定と不足 product SSOT の child 起票 #254 自体が rollup tracker であり、本 実装: docs/product/game-logic.md を追加する — ゲームロジック仕様(C254-5) #287 が delta materialization を担う。
- source_priority: docs/product/** と docs/dev/** を canonical source として優先する。
.specify/は derived workbench artifact 扱い、tasks.mdは staging artifact 扱いとし、いずれも docs/SSOT 正本ではない(docs/product/** と docs/dev/** が docs canonical として wins)。
Out of Scope
- 外部 physics engine の導入
.specify/**(derived workbench artifact)やtasks.md(staging artifact)を canonical source / 正本として扱うこと。docs/SSOT が優先。- 報酬量・拠点 HP・敵機数等の具体的な実装定数の固定(mvp-scope / 別 Issue で扱う)
- src/ 実装の変更(仕様書のみ)
- mvp-scope の定義(C254-6)
- アセット制作
Acceptance Criteria
- AC1:
docs/product/game-logic.mdが存在し、必須セクション(目的 / 正本階層 / 要求 / 状態遷移 / 入力 / 時間モデル / 衝突 / 勝敗 / 保存境界 / 非ゴール / 下流境界 / 未解決の問い / 検証)を含む - AC2:
docs/product/game-logic.mdがアーキテクチャ原則(src/state と src/render の完全分離・60Hz 固定タイムステップ・accumulator・rAF ≠ simulation dt)と整合している - AC3:
docs/dev/ssot-registry.mdにid: game-logicの entry が YAML-list 形式で追加されている(spec-game-logic等の prefix を使わない) - AC4:
docs/product/game-logic.mdは compact spec 制約に準拠する- 250 行以内
- YAML frontmatter に
status,issue: "#287",parent_issue: "#254",doc_id: game-logic,trace_linksを含む Non-Goals,Open Questions,Verification Notesを含む- EARS は Requirements / Acceptance Criteria レベルに限定(5〜9 項目程度)
- AC5: Source Hierarchy は accepted
docs/product/game-thesis.mdを上位、docs/product/game-design.md (status: draft)は補助参照としてsource_basisに明示する - AC6: 勝敗条件は人間 Decision を反映する(敗北: HP 0、戦闘終了 OR: 120秒満了/敵拠点破壊/敵機殲滅、報酬差分を明記)。具体的な数値(報酬量・拠点 HP・敵機数)は Open Questions に退避
- AC7: stale / nonexistent reference を含まない
docs/adr/0001-architecture-core.mdを参照しない(正しくはdocs/adr/0001-architecture-baseline.md)ssot-catalog.mdを参照しない(削除済み)
- AC8:
docs/product/game-logic.mdはsrc/実装変更、asset 制作、外部 physics engine 導入を要求しない(記述のみ、Allowed Paths 外への波及禁止) - AC9:
pnpm typecheck && pnpm lint && pnpm test && pnpm buildが PASS している - AC10:
docs/dev/workflow.mdの SSOT Routing Table に game-logic 行が追加されている(product-spec-lifecycle.mdの「新規 SSOT 追加時の必須更新セット」遵守)
Verification Commands
# AC1: game-logic.md 存在と必須セクション
$ test -f docs/product/game-logic.md
$ rg -q "^## .*目的" docs/product/game-logic.md
$ rg -q "^## .*正本階層" docs/product/game-logic.md
$ rg -q "^## .*要求" docs/product/game-logic.md
$ rg -q "^## .*状態遷移" docs/product/game-logic.md
$ rg -q "^## .*入力" docs/product/game-logic.md
$ rg -q "^## .*時間モデル" docs/product/game-logic.md
$ rg -q "^## .*衝突" docs/product/game-logic.md
$ rg -q "^## .*勝敗" docs/product/game-logic.md
$ rg -q "^## .*保存境界" docs/product/game-logic.md
$ rg -q "^## .*非ゴール" docs/product/game-logic.md
$ rg -q "^## .*下流境界" docs/product/game-logic.md
$ rg -q "^## .*未解決の問い" docs/product/game-logic.md
$ rg -q "^## .*検証" docs/product/game-logic.md
# AC2: アーキテクチャ原則
$ rg -q "60Hz" docs/product/game-logic.md
$ rg -q "固定タイムステップ" docs/product/game-logic.md
$ rg -q "accumulator" docs/product/game-logic.md
$ rg -q "src/state" docs/product/game-logic.md
$ rg -q "src/render" docs/product/game-logic.md
# AC3: ssot-registry entry
$ rg -q "^- id: game-logic$" docs/dev/ssot-registry.md
$ rg -q "path: docs/product/game-logic.md" docs/dev/ssot-registry.md
# AC4: compact spec 制約
$ rg -q '^status:' docs/product/game-logic.md
$ rg -q '^issue: "#287"' docs/product/game-logic.md
$ rg -q '^parent_issue: "#254"' docs/product/game-logic.md
$ rg -q '^doc_id: game-logic$' docs/product/game-logic.md
$ rg -q '^trace_links:' docs/product/game-logic.md
$ awk 'END { exit (NR > 250) }' docs/product/game-logic.md
# AC5: Source Hierarchy / source_basis
$ rg -q "game-thesis" docs/product/game-logic.md
$ rg -q "source_basis|正本階層|Authority" docs/product/game-logic.md
# AC6: 勝敗条件 Decision
$ rg -q "120" docs/product/game-logic.md
$ rg -q "敵拠点|拠点破壊" docs/product/game-logic.md
$ rg -q "敵機殲滅|殲滅" docs/product/game-logic.md
$ rg -q "HP" docs/product/game-logic.md
# AC7: stale reference 不在(expected no match: exit 1 想定)
$ ! rg -n "docs/adr/0001-architecture-core.md" docs/product/game-logic.md
$ ! rg -n "ssot-catalog" docs/product/game-logic.md docs/dev/ssot-registry.md
$ ! rg -n "spec-game-logic" docs/dev/ssot-registry.md
# AC8: Allowed Paths 外の指示が混入していない(expected no match)
$ ! rg -n "^src/" docs/product/game-logic.md
$ ! rg -n "assets/" docs/product/game-logic.md
# AC10: workflow.md SSOT Routing Table 追加
$ rg -q "game-logic\.md" docs/dev/workflow.md
$ rg -q "^\| .*game-logic" docs/dev/workflow.md
# AC9: quality gate (atomic 実行)
$ pnpm typecheck
$ pnpm lint
$ pnpm test
$ pnpm buildAllowed Paths
docs/product/game-logic.md(新規)docs/dev/ssot-registry.md(エントリ追加のみ)docs/dev/workflow.md(SSOT Routing Table に game-logic 行を 1 件追加のみ。他セクション編集禁止)
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
docs/product/game-design.md(C254-4, 実装: docs/product/game-design.md を追加する — GDD v0.1(C254-4) #282)が未マージの状態で game-logic.md の記述に矛盾が生じた場合
Runtime Verification Applicability
- decision: deferred
- reason:
docs/product/game-logic.mdは仕様書であり、本 Issue の scope は仕様書作成のみ。VC(AC1〜AC9)は記述の正確性確認であって実装の動作検証ではない。状態遷移 / 衝突 / 入力 / 保存境界の実際の動作検証は、game-logic.md を参照する後続の実装 Issue(src/state / src/systems / src/storage 変更を含む)でimpl-review-loop経由で行う。 - deferred_destination:
- destination_type: implementation_issue
- destination_ref: TBD(game-logic.md マージ後に src/state / src/systems / src/storage 実装 Issue が作成された時点で確定)
- deferred_verification_condition: 以下いずれかが満たされた時点で動作検証可能。(1) src/state の状態遷移実装が game-logic.md の State Transitions セクションを満たす、(2) src/systems の collision 実装が game-logic.md の Collision セクションを満たす、(3) src/storage の persistence 実装が game-logic.md の Persistence Boundary セクションを満たす。
Required Skills
なし
Scope Delta(任意)
N/A
Delivery Rule
1 Issue = 1 PR- Draft PR で開き、レビュー後にマージ
- Depends on 実装: docs/product/game-design.md を追加する — GDD v0.1(C254-4) #282 のステータス: PR docs(#282): add game-design.md GDD v0.1 (C254-4) #370 マージ済みだが game-design.md は
status: draft。上位正本ではなく補助参照として扱う(source_basis に明示)。
Source
- parent_issue: 親: SDD 駆動運用方針の確定と不足 product SSOT の child 起票 #254
- child_id: C254-5
- dedupe_key: "delivery-rollup:254:C254-5"
- depends_on: C254-4(game-design の core loop を前提)
Normative References
docs/adr/0001-architecture-baseline.md(60Hz / state-render 分離)docs/adr/0002-sdd-tool-adoption.md(EARS 部分採用方針)docs/dev/product-spec-lifecycle.md(compact spec / frontmatter / 250 行制約)docs/product/requirements.md(MVP 境界)docs/product/game-thesis.md(accepted、上位正本)docs/product/game-design.md(draft、補助参照のみ)docs/dev/ssot-registry.md(registry 命名規則)
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon May 24, 2026
NotebookLM に蓄積された資料に基づき、GitHub Issue #287「docs/product/game-logic.md を追加する — ゲームロジック仕様(C254-5)」の作成案を提示します。
以下は、AI エージェント(Claude Code 等)が迷わず docs-only PR を作成できるように最適化された、設計案および作業指示の草案です。
1. 根拠資料の優先順位
game-logic.mdを作成する上で、AI が参照すべき資料の優先順位と情報の確度は以下の通りです。【確定根拠】(最優先で遵守)
src/stateとsrc/renderの完全分離、60Hz固定タイムステップ(アキュムレータ方式)、Entity ID による参照。docs/product/requirements.md: MVPスコープ(1画面固定、WASD+マウス、Zキー指示)。【補助根拠】(ロジックの肉付けに利用)
docs/product/game-design.md(Issue 実装: docs/product/game-design.md を追加する — GDD v0.1(C254-4) #282): ゲームのAestheticsやDynamicsの定義。src/構造:src/systems/,src/state/,src/input/などの分離状況。【不明・要確認】(断定せず Open Questions または Fallback に退避)
game-design.mdのマージ状況: 未確定・未マージの場合は、推測でロジックを確定せず、「game-design.md確定後に追記」とする。2.
docs/product/game-logic.mdの推奨アウトライン3. 各セクションの記述方針
game-design.mdを体験設計の上位制約とし、技術的制約はADR 0001を正本とすることを明記します。game-design.mdが未確定の場合は「Draft 状態の design を仮置きとする」とフォールバックを記述します。BattleState(戦闘中の状態)とCampaignState(戦闘外の状態)の遷移境界について記述します。InputStateからInputCommandへ正規化してSystemに渡す設計原則を明記します。具体的なキーバインドは Open Questions とします。requestAnimationFrameから分離された、60Hz の固定タイムステップ(アキュムレータ方式)について記述します。タブがバックグラウンドに回った際の「死の螺旋(Spiral of Death)」を防ぐパニック・クランプについても記載します。IndexedDB(MVPではlocalStorage)へ保存する際、JSON.stringifyで同期スナップショットを取得し「Torn State(状態の引き裂かれ)」を防ぐこと、および Entity 参照はポインタではなく整数 ID を用いることを明記します。src/render)や、データ駆動用のパラメータ JSON への値の受け渡し境界について記述します。4. EARS requirements 案
過剰な EARS 化を避け、Acceptance Criteria に直結するコア要件のみを定義します。
InputCommandstructures before passing them to the game simulation. (Ref: ADR 0001)GameStateusing integer Entity IDs instead of object references. (Ref: ADR 0001)5.
docs/dev/ssot-registry.md追加エントリ案既存のレジストリフォーマットに準拠し、Markdown Table を使用せず YAML-list 形式でエントリを作成します。
6. 敵対的レビュー観点
実装 AI に指示を出す際、以下のリスクを回避できているかレビューする観点を持たせます。
src/配下の実装変更や、アセット制作の指示がgame-logic.mdに混入していないか(Allowed Paths 違反)。game-design.mdとの矛盾リスク:game-design.md(実装: docs/product/game-design.md を追加する — GDD v0.1(C254-4) #282) で定められる Aesthetics(エースとしての介入感など)を損なうようなロジック制約(例: 完全なオートバトラーへの改変)になっていないか。delta timeを直接ゲーム内座標の掛け合わせに使用するような(可変フレームレートを前提とした)仕様になっていないか。game-logic.md側で勝手にハードコードすべき「不変の仕様」として断定していないか(Open Questions に置かれているか)。7. 実装 AI へ渡す短い作業指示案
このまま Claude Code などのエージェントにペーストできるプロンプト案です。
squne121 commentedon May 24, 2026
人間からの指摘です。
120 秒生存 で戦闘を終了。戦闘報酬を獲得。敵拠点破壊で多量の戦闘報酬獲得。敵機殲滅で戦闘終了(勝利)はどうか?
squne121 commentedon May 24, 2026
判定
REQUEST_CHANGES。#287 は docs-only の方向性自体は正しいが、このまま実装エージェントへ渡すと
game-logic.mdが下流実装の誤った正本になり得る。 特に、#281/#282 の状態変化、product-spec-lifecycle.mdの compact spec 要件、勝敗条件の未確定、検証コマンドの弱さを Issue 本文に反映してから着手すべきです。#287 自体はdocs/product/game-logic.md新規作成とdocs/dev/ssot-registry.md追記だけを Allowed Paths とする docs-only Issue で、AC も状態遷移・入力・時間・衝突・勝敗・保存境界、state/render 分離、60Hz 固定タイムステップ、registry 登録、pnpm quality gate を要求しています。主要ブロッカー
B1.
game-design.mdの依存状態が古いまま#282 / PR #370 は merge 済みで
game-design.mdは main に存在しますが、現在のgame-design.mdはstatus: draftのままです。さらに本文には「game-thesis.mdが accepted になったら、game-logic.md/mvp-scope.mdの normative source として使う前に spec delta issue で reconcile せよ」という境界が残っています。一方で
game-thesis.mdは main 上でstatus: acceptedになっており、後続のgame-design.md/game-logic.md/mvp-scope.mdの判断基準として参照される正本です。 したがって #287 は単に「Depends on #282」では不十分です。Issue 本文に以下を追加すべきです。少なくとも PR 本文に
source_basisを必須化し、game-design.mdの stale fallback boundary を読んだうえでgame-thesis.mdを上位正本にする、という判断を明示させるべきです。B2.
product-spec-lifecycle.md準拠 AC が欠けているproduct-spec-lifecycle.mdはdocs/product/**作成時に YAML frontmatter、compact spec、EARS は acceptance criteria レベル限定、non_goals、trace_links、registry 登録を要求し、compact spec は 250 行以内としています。 しかし #287 の AC は、必須セクション・architecture 整合・registry・quality gate だけで、frontmatter、250 行制約、trace_links、non-goals、open_questions、EARS 適用範囲を検証していません。追加すべき AC:
B3. 勝敗条件を「120 秒生存 or 敵拠点破壊」と曖昧なまま EARS にしてはいけない
添付草案 / Issue コメントは、勝敗条件について「敵拠点破壊」と「120 秒生存」が混在しているため Draft 扱いにする、としています。 これは正しい警戒ですが、草案の
REQ-LOGIC-005は “120-second sortie timer expires (or the enemy core is destroyed)” のように曖昧な OR を要求文に残しています。これは危険です。game-logic.mdでは次のどちらかに分けるべきです。または、勝利条件を #287 で決めるなら、
docs/product/game-thesis.mdの「局所介入」「短時間 sortie」「技術抽出ループ」とdocs/product/requirements.mdの MVP-003/MVP-004 へ明示的に trace し、Open Questions ではなくDecisionとして固定する必要があります。B4. registry entry の ID が草案だと既存形式とズレる
NotebookLM 草案は
id: spec-game-logicを提案していますが、既存 registry はgame-thesis,game-design,requirementsのように product SSOT 名そのものを ID にしています。spec-game-logicは発見性と命名一貫性を壊すため、id: game-logicにするべきです。推奨 entry:
技術面の高品質化ポイント
1. 時間モデル: rAF と 60Hz simulation を混同しない
requestAnimationFrame()は一般に画面リフレッシュに同期しますが、60Hz だけでなく 75/120/144Hz も一般的で、バックグラウンドタブでは pause されることがあります。したがってgame-logic.mdは「rAF = 60Hz」と書いてはいけません。([MDNウェブドキュメント]1)ADR 0001 と requirements は、simulation は 60Hz 固定タイムステップ、render は Canvas 描画専用で状態更新禁止、と定義しています。 Gaffer の fixed timestep 記事でも、可変 delta time は挙動差や tunneling を招き得るため、accumulator で固定
dtを消費し、spiral of death 回避のため frameTime / max steps clamp を入れる設計が推奨されています。([Gaffer On Games]2)入れるべき文:
2. 保存境界:
JSON.stringifyだけで torn state を防ぐ、と言い切らないrequirements は MVP では
localStorageを最小保存手段として許容していますが、保存はsrc/storageの snapshot 境界で扱うとしています。 Web Storage のlocalStorage/sessionStorageは同期 API であり、大きなデータや高頻度操作では JavaScript 実行を block し得ます。MDN は、大きな構造化データや性能懸念がある場合は非同期の IndexedDB がより適切と説明しています。([MDNウェブドキュメント]3) IndexedDB は transaction を持つ object-oriented database で、structured clone 対象の object を保存でき、処理は非同期です。([MDNウェブドキュメント]4)したがって草案の「
JSON.stringifyで同期スナップショットを取得し Torn State を防ぐ」はやや強すぎます。より安全な仕様はこうです。3. 衝突: CCD を「全 projectile に必須」とせず、適用条件を定義する
高速 projectile の tunneling 対策として CCD を検討するのは妥当です。Box2D のような 2D physics engine でも collision system は broad phase、continuous collision detection、solver の組み合わせで構成され、fast bodies の取りこぼしを避ける方向の設計が取られています。([ウィキペディア]5) ただし #287 は docs-only の仕様で、実装コストを固定しすぎると MVP を圧迫します。
推奨は「高速 projectile / tick 内移動距離が collider 半径を超えるもののみ swept collision を要求」とすることです。
4. 入力: key binding と game command を分離する
game-thesis.mdは WASD + mouse 相当とZキー相当の軽量マクロ指示を想定プレイヤーの操作感として記述していますが、具体キー割り当てや時間制約は下流仕様へ委譲しています。 したがってgame-logic.mdではZを直接正本化するより、まず command semantics を定義すべきです。これにより、将来キーボード配列や gamepad 対応をしてもロジック仕様を壊さずに済みます。
5. EARS は要求だけに使い、設計散文を EARS 化しない
EARS は少数のキーワードと規則で自然言語 requirement の曖昧さを減らす記法ですが、文書全体のフォーマット権威ではありません。([Jama Software]6) ADR 0002 でも EARS は
docs/product/で部分採用する notation であり、Spec Kit 等の生成物ではなくdocs/SSOT が正本です。#287 では EARS を 6〜9 個程度に絞り、本文の State Transitions / Input / Time Model / Collision / Persistence は説明と境界にするのが適切です。
Issue #287 に入れるべき差分
Acceptance Criteria 追加案
Verification Commands 改訂案
#287 の現行 Verification Commands は
forloop や&&/||を含みます。#281/#282 では baseline preflight 互換のため、atomic command と post-implementation checks を分ける運用に修正されています。 #287 も同じ型に寄せるべきです。rg -nの no-match 系は exit 1 が期待値なので、Issue 本文では “expected no match” と明記してください。PR #370 でもrg -nEの誤用が non-blocker として指摘されているため、拡張正規表現を使う場合はrg -n -e形式に寄せるのが安全です。実装エージェントへ渡す改訂プロンプト
結論
#287 は 「作るべき Issue」ではあるが、現契約のまま実装すると product SSOT として弱いです。最優先で直すべきは、
game-thesis.md accepted後の source hierarchy、game-design.md draft / reconciliation requiredの扱い、compact spec AC、勝敗条件の非正本化、registry ID、atomic verification です。これを直せば、game-logic.mdは後続のsrc/state/src/systems/src/storage実装の参照正本としてかなり安定します。squne121 commentedon May 24, 2026
issue-refinement-loop: 完了 (2026-05-24T11:55:00Z)
改善履歴
source_basis追加(game_thesis: accepted / game_design: draft+reconciliation_required / fallback_used 列挙)status/issue/parent_issue/doc_id: game-logic/trace_links) + 250 行 compact spec 制約に詳細化product-spec-lifecycle.md/game-thesis.md追加、docs/adr/0001-architecture-baseline.mdを正しい path に修正\$prefix 付与(C4)## Runtime Verification Applicabilityセクション新規追加(C9)applicability:→decision: deferredにフィールド名修正、deferred_destinationを nested 形式に統一fact-check 結果(iter1 codebase-investigator)
docs/product/game-design.md存在 / status: draftdocs/product/game-thesis.md存在 / status: accepteddoc_id/trace_linksを frontmatter として明文化していないが、既存 game-design.md / game-thesis.md は de-facto convention として採用済みdocs/adr/0001-architecture-baseline.md(-core.mdは存在しない誤参照)次アクション
issue-contract-reviewskill で go/no-go preflightimplement-issueskill またはimpl-review-loopskill で着手Runtime Verification Applicability
decision: deferred。本 Issue は仕様書作成スコープであり、状態遷移 / 衝突 / 入力 / 保存境界の動作検証は後続の src/state / src/systems / src/storage 実装 Issue でimpl-review-loop経由で実施する。squne121 commentedon May 24, 2026
Contract Snapshot (2026-05-24T12:05:00Z)
Contract Summary
docs/product/game-logic.mdを新規作成しdocs/dev/ssot-registry.mdにid: game-logicエントリを追加。状態遷移 / 入力 / 時間モデル / 衝突 / 勝敗 / 保存境界を 13 セクション・250 行以内・YAML frontmatter (status: draft,issue: "#287",parent_issue: "#254",doc_id: game-logic,trace_links) で記述。docs/product/game-logic.md(新規),docs/dev/ssot-registry.md(追記のみ).claude/worktrees/issue-287-docs-product-game-logic-md-を追加する-ゲームロジworktree-issue-287-docs-product-game-logic-md-を追加する-ゲームロジdecision: deferred(仕様書作成スコープ、動作検証は後続実装 Issue へ)Next Action
implement-issueskill で着手可能。squne121 commentedon May 24, 2026
implement-issue: 実装完了 (2026-05-24T12:08:28Z)
Summary
docs/product/game-logic.mdを新規作成し、docs/dev/ssot-registry.mdに game-logic エントリを追加。13 必須セクション・compact spec(209 行)・YAML frontmatter を完備。Results
.claude/worktrees/issue-287-docs-product-game-logic-md-c254-5worktree-issue-287-docs-product-game-logic-md-c254-5Verification Summary
Acceptance Criteria
Next Steps
PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup
Generated by implement-issue skill
squne121 commentedon May 24, 2026
Contract Patch (2026-05-24T13:00:00Z)
PR #376 reviewer feedback (#376 (comment)) の Blocker 2 (Product Spec Lifecycle / Workflow: 新規 SSOT 追加時の必須更新セット) に対応するため、Issue 本文を patch しました。
変更
docs/dev/workflow.mdを追加(SSOT Routing Table に game-logic 行を 1 件追加のみ、他編集禁止)これにより
docs/dev/product-spec-lifecycle.md/docs/dev/workflow.mdの「新規 SSOT 追加時の必須更新セット」(workflow Routing Table + ssot-registry + ssot-discovery skill 説明) のうち、Routing Table と registry を同 PR で更新する状態になります。ssot-discovery skill 説明の更新は必要に応じて follow-up。PR #376 に対する fix_delta は impl-review-loop iteration 2 で適用します。
fix(#287): implement reviewer feedback on game-logic.md iteration 2
docs(#287): game-logic.md を追加 — ゲームロジック仕様(C254-5) (#376)