Skip to content

実装: docs/dev/product-spec-lifecycle.md を追加する — SDD ライフサイクル定義(C254-2) #283

Closed
4 of 4 issues completed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#254"
goal_ref: "SDD 駆動運用方針の確定と不足 product SSOT の child 起票(product spec lifecycle policy 文書と最小局所ルールを整備する)"
change_kind: docs

Parent Issue

#254

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: SDD ツール採否が ADR(docs/adr/0002-sdd-tool-adoption.md)で確定し、不足 product SSOT 7 種が child Issue としてマージ済み。docs/dev/ssot-registry.md に上記 SSOT が登録され、CLAUDE.md または .claude/rules/project-constitution.md の「まず読む順序」に新規 product SSOT が追加されている

Current Validated Scope

  • docs/dev/product-spec-lifecycle.md の新規作成(product spec lifecycle policy 文書、reference)
  • docs/product/CLAUDE.md の新規作成(最小局所ルールのみ、6 項目以内)
  • docs/dev/ssot-registry.md への product-spec-lifecycle エントリ追加
  • docs/dev/workflow.md の SSOT Routing Table に product-spec-lifecycle エントリ追加
  • CLAUDE.md への short pointer 追記(docs/product/CLAUDE.md への局所参照のみ)

Remaining Parent Gaps

  • C254-3 — docs: docs/product/game-thesis.md を追加(未起票)
  • C254-4 — docs: docs/product/game-design.md を追加(未起票)
  • C254-5 — docs: docs/product/game-logic.md を追加(未起票)
  • C254-6 — docs: docs/product/mvp-scope.md を追加(未起票)
  • C254-7 — docs: docs/product/playtest-protocol.md + docs/product/playtest-log.md template を追加(未起票)
  • C254-8 — docs: docs/dev/release-distribution-policy.md を追加(未起票)
  • Follow-up A — issue-refinement-loop に Spec Kit phase 分類を追加(後続 Issue)
  • Follow-up B — issue-contract-review に product spec Stop Conditions を追加(後続 Issue)
  • Follow-up C — impl-review-loop に Spec Kit task preflight を追加(後続 Issue)
  • Follow-up D — Spec Kit template override / preset / extension 調査(後続 Issue)

Outcome

docs/dev/product-spec-lifecycle.md(policy 文書、AI 直接実行入口ではない)と docs/product/CLAUDE.md(最小局所ルール)が main にマージされ、docs/dev/ssot-registry.md に登録されている。docs/product/** 作業は既存の issue-refinement-loop / issue-contract-review / impl-review-loop で扱う方針が明示されており、新規専用 skill / path-scoped rule は追加しない。Spec Kit の本格的な接続は後続 Issue(A〜D)で対応する。

In Scope

  • docs/dev/product-spec-lifecycle.md の新規作成
    • product spec lifecycle の設計・ポリシー正本(reference 文書)
    • ssot-registry への登録手順
    • ADR 0002 の token_policy(compact spec / scoped loading / diff-first 更新)に準拠した spec 作成ルール
    • tasks.md staging artifact → GitHub Issue 変換フロー
    • AI が直接実行手順として読む文言は弱める(policy/reference であることを明示)
  • docs/product/CLAUDE.md の新規作成(最小ルールのみ、6 項目以内)
    • docs/product/** は product SSOT
    • .specify/** / Spec Kit artifact と矛盾した場合は docs/product/** が勝つ
    • full_regeneration 禁止(diff-first)
    • 変更は GitHub Issue / PR 経由
    • 具体手順は issue-refinement-loop / issue-contract-review / impl-review-loop に従う
    • tasks.md は tracking SSOT ではなく GitHub Issue 化してから扱う
  • docs/dev/ssot-registry.md への product-spec-lifecycle エントリ追加(docs/product/** directory mapping を含む)
  • docs/dev/workflow.md の SSOT Routing Table に product-spec-lifecycle エントリ追加
  • CLAUDE.md への short pointer 追記(docs/product/CLAUDE.md への局所参照のみ)

Out of Scope

  • 実際の product doc(game-thesis / game-design 等)の本文作成(C254-3〜C254-8 の責務)
  • SDD ツール(Spec Kit / OpenSpec)の実導入
  • 既存 skill / SubAgent の改修(後続 Issue A〜C の責務)
  • .claude/rules/product-spec-lifecycle.md の追加(意図的に追加しない)
  • .claude/skills/product-spec-lifecycle/SKILL.md の追加(意図的に追加しない)
  • Spec Kit template override / preset 調査(後続 Issue D の責務)

Acceptance Criteria

  • AC1: docs/dev/product-spec-lifecycle.md が存在し、product spec lifecycle policy が文書化されている
  • AC2: docs/dev/product-spec-lifecycle.md に ADR 0002 の token_policy(compact spec / scoped loading / diff-first 更新)に準拠した spec 作成ルールが記載されている
  • AC3: docs/dev/product-spec-lifecycle.md に tasks.md staging artifact → GitHub Issue 変換フローが記載されている
  • AC4: docs/dev/ssot-registry.md に product-spec-lifecycle エントリが追加されており、docs/product/** directory mapping も追加されている
  • AC5: docs/dev/workflow.md の SSOT Routing Table に product-spec-lifecycle エントリが追加されている
  • AC6: CLAUDE.md に docs/product/CLAUDE.md への short pointer が追加されている
  • AC7: pnpm typecheck && pnpm lint && pnpm test && pnpm build が PASS している
  • AC8: docs/product/CLAUDE.md が存在し、最小局所ルール(product SSOT 宣言・full_regeneration 禁止・既存ループ参照)のみが記載されている(30 行以下)
  • AC9: .claude/rules/product-spec-lifecycle.md および .claude/skills/product-spec-lifecycle/ が存在しない(本 Issue では追加しない原則の確認)
  • AC10: docs/dev/product-spec-lifecycle.md に「AI が直接実行手順として読む文書ではない」「policy/reference 文書である」旨が明示されている

Verification Commands

# AC1: ファイル存在確認
test -f docs/dev/product-spec-lifecycle.md \
  && echo "PASS: AC1 product-spec-lifecycle.md exists" \
  || echo "FAIL: AC1 product-spec-lifecycle.md missing"

# AC2: token_policy 関連記述の確認
rg -q "compact.spec|scoped.loading|diff-first|token_policy" docs/dev/product-spec-lifecycle.md \
  && echo "PASS: AC2 token_policy content found" \
  || echo "FAIL: AC2 token_policy content missing"

# AC3: tasks.md staging フロー記述の確認
rg -q "tasks\.md|staging.artifact|GitHub Issue" docs/dev/product-spec-lifecycle.md \
  && echo "PASS: AC3 tasks.md flow content found" \
  || echo "FAIL: AC3 tasks.md flow content missing"

# AC4: ssot-registry.md へのエントリ追加確認
rg -q "product-spec-lifecycle" docs/dev/ssot-registry.md \
  && echo "PASS: AC4 ssot-registry.md entry found" \
  || echo "FAIL: AC4 ssot-registry.md entry missing"

# AC4b: docs/product/** directory mapping 確認
rg -q 'docs/product/\*\*' docs/dev/ssot-registry.md \
  && echo "PASS: AC4b docs/product/** mapping found" \
  || echo "FAIL: AC4b docs/product/** mapping missing"

# AC5: workflow.md SSOT Routing Table エントリ確認
rg -q "product-spec-lifecycle" docs/dev/workflow.md \
  && echo "PASS: AC5 workflow.md SSOT Routing Table entry found" \
  || echo "FAIL: AC5 workflow.md SSOT Routing Table entry missing"

# AC6: CLAUDE.md への short pointer 確認
rg -q "docs/product/CLAUDE.md|product-spec-lifecycle" CLAUDE.md \
  && echo "PASS: AC6 CLAUDE.md pointer found" \
  || echo "FAIL: AC6 CLAUDE.md pointer missing"

# AC7: quality gate
pnpm typecheck && pnpm lint && pnpm test && pnpm build \
  && echo "PASS: AC7 quality gate" \
  || echo "FAIL: AC7 quality gate"

# AC8: docs/product/CLAUDE.md 存在 + 行数制約(30 行以下)
test -f docs/product/CLAUDE.md \
  && [ "$(wc -l < docs/product/CLAUDE.md)" -le 30 ] \
  && echo "PASS: AC8 docs/product/CLAUDE.md is minimal" \
  || echo "FAIL: AC8 docs/product/CLAUDE.md missing or too long"

# AC8b: 既存ループへの参照確認
rg -q "issue-refinement-loop|impl-review-loop|issue-contract-review" docs/product/CLAUDE.md \
  && echo "PASS: AC8b loop reference found" \
  || echo "FAIL: AC8b loop reference missing"

# AC9: 専用 rule/skill が存在しないことの確認
! test -f .claude/rules/product-spec-lifecycle.md \
  && ! test -d .claude/skills/product-spec-lifecycle \
  && echo "PASS: AC9 no dedicated rule/skill added" \
  || echo "FAIL: AC9 dedicated rule/skill present (should be removed)"

# AC10: policy/reference 文書である旨の明示
rg -q "policy|reference|直接実行" docs/dev/product-spec-lifecycle.md \
  && echo "PASS: AC10 policy/reference notice found" \
  || echo "FAIL: AC10 policy/reference notice missing"

Allowed Paths

  • docs/dev/product-spec-lifecycle.md(新規作成、policy/reference として)
  • docs/dev/ssot-registry.md(エントリ追加のみ)
  • CLAUDE.md(short pointer 追記のみ)
  • .claude/rules/project-constitution.md(追記のみ、任意)
  • docs/dev/workflow.md(SSOT Routing Table エントリ追加のみ)
  • docs/product/CLAUDE.md(新規作成、最小ルールのみ)
  • .claude/rules/product-spec-lifecycle.md(削除対象 — iteration 1 で追加したファイルを撤回)
  • .claude/skills/product-spec-lifecycle/SKILL.md(削除対象 — iteration 1 で追加したファイルを撤回)

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • ADR 0002(docs/adr/0002-sdd-tool-adoption.md)の内容と矛盾する lifecycle 定義が必要になった場合

Required Skills

なし

Scope Delta(任意)

iteration 2 で iteration 1 の追加を撤回するため、以下を Allowed Paths に「削除対象」として残す:

  • .claude/rules/product-spec-lifecycle.md → git rm
  • .claude/skills/product-spec-lifecycle/SKILL.md → git rm(ディレクトリごと削除)

Delivery Rule

  • 1 Issue = 1 PR
  • docs-only 変更のため worktree 省略可。Draft PR 既定
  • docs/dev/ssot-registry.md の更新を同一 PR で実施(registry 更新漏れ防止)

Runtime Verification Applicability

  • decision: not_applicable
  • reason: change_kind: docs 限定。プロセス起動・ネットワーク I/O・ファイル I/O を伴うランタイム検証は不要。静的検証(test -f / rg / pnpm typecheck/lint/test/build)のみで AC が決定論的に検証可能
  • reference: docs/dev/runtime-verification-policy.md「Runtime Verification Applicability」スキーマ準拠

Normative References

  • docs/adr/0002-sdd-tool-adoption.md(SDD 採用方針・token_policy・compact spec)
  • docs/dev/workflow.md(新規 SSOT 追加時の必須更新セット)
  • docs/dev/ssot-registry.md
  • docs/product/requirements.md

Source

Sub-issues

Sub-issues

4 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. added
    triage-required
    on May 23, 2026
  2. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    人間からの指摘です。
    docs/dev/workflow.md との責務分離はどのような設計になるのか。

  3. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    判定: REQUEST_CHANGES / contract patch 必須。

    #283 は目的自体は妥当ですが、このまま実装させると docs/dev/workflow.md と docs/dev/product-spec-lifecycle.md が二重 SSOT 化します。人間指摘の通り、責務境界が Issue contract に明記されていません。さらに #283 は .claude/skills/ssot-discovery/references/ssot-catalog.md 更新を AC / Allowed Paths に含んでいますが、親 #254 では PR #302 により ssot-catalog.md は廃止済み、docs/dev/ssot-registry.md が唯一の SSOT カタログ正本とされています。これは実装前に修正すべき stale contract です。

    人間指摘への回答: 責務分離案

    設計は workflow.md = repo-wide execution control-plane、product-spec-lifecycle.md = product SSOT lifecycle data-plane / SDD adapter に分けるべきです。

    領域 | 正本 | 書くべき内容 -- | -- | -- 開発運用全体 | docs/dev/workflow.md | Issue 駆動フロー、1 Issue = 1 PR、worktree、品質ゲート、SSOT 追加時の必須更新セット、delivery-rollup parent materialization、Skill 別の運用責務 Product spec の生存期間 | docs/dev/product-spec-lifecycle.md | docs/product/** の作成・更新・archive・supersede・registry 登録・compact spec・diff-first 更新・EARS 採用・playtest feedback から spec delta issue への変換 SDD 採否・正本境界 | docs/adr/0002-sdd-tool-adoption.md | Spec Kit upstream-compatible 採用、docs/ が正本、.specify/ と speckit-* は derived workbench / managed derived artifact、tasks.md は staging artifact SSOT 発見 | docs/dev/ssot-registry.md | カタログ entries と directory mappings のみ。手順本文は置かない Skill/SubAgent 責務 | docs/dev/agent-skill-boundaries.md | speckit-* / native skills / orchestration / implementation worker の責務境界

    workflow.md はすでに repo 全体の開発運用 SSOT と明記され、Issue 駆動フロー、1 Issue = 1 PR、docs 更新条件、SSOT Routing Table、新規 SSOT 追加時の更新セット、delivery-rollup parent の materialization 手順まで持っています。ここに product spec の状態遷移や EARS 記法の細則まで入れると肥大化します。

    一方、product-spec-lifecycle.md は workflow.md を上書きしてはいけません。役割は「workflow.md の運用ルールを product spec に適用する adapter」です。たとえば 1 Issue = 1 PR は workflow.md の責務、playtest-log の design hypothesis invalidated を spec_delta_issue に分類し、その後 implementation issue に materialize する は lifecycle 側の責務です。

    外部実装との照合

    Spec Kit は constitution → specify → plan → tasks → taskstoissues → implement というコマンド体系を持ち、spec から implementation までを生成物でつなぎます。したがって LOOP_PROTOCOL で採用する場合、tasks.md や .specify/ を直接正本化せず、GitHub Issue に materialize する adapter 境界が必要です。(GitHub) (GitHub)

    Kiro Specs も requirements.md、design.md、tasks.md の分離を採用し、requirements では EARS 形式の acceptance criteria を使います。これは #283 の product spec lifecycle に requirements/design/tasks の役割分担や EARS usage を入れる根拠になりますが、LOOP_PROTOCOL では tasks.md を tracking 正本にしてはいけません。(Kiro)

    EARS は自然言語要求の曖昧さを減らす軽量記法で、専門ツールなしに導入できます。よって product-spec-lifecycle.md では「EARS を product docs の acceptance criteria 記法として使う」程度に留め、EARS 自体を新しい SDD ツール正本にしてはいけません。(Alistair Mavin)

    OpenSpec は proposal.md / specs / design.md / tasks.md を change folder に置く軽量 spec layer ですが、既存フォーマットとの整合で hard-coded format 問題が open になっています。ADR 0002 が OpenSpec primary 採用を見送った判断は妥当で、#283 でも OpenSpec 風の artifact 階層を正本化しない方が安全です。(GitHub) (GitHub)

    敵対的レビュー findings

    BLOCKER 1: ssot-catalog.md 参照が stale

    #283 は ssot-catalog.md への登録を In Scope / AC / Allowed Paths / VC に含めています。しかし親 #254 は PR #302 後に ssot-catalog.md を廃止し、docs/dev/ssot-registry.md を唯一の SSOT カタログ正本としています。workflow.md と ssot-registry.md も同じく、ssot-catalog.md は削除済みで更新不要と明記しています。

    修正: #283 から以下を全削除。

    .claude/skills/ssot-discovery/references/ssot-catalog.md
    ssot-catalog.md との同期
    AC5: ssot-catalog.md へのエントリ追加
    

    代替は docs/dev/ssot-registry.md の entry + 必要なら directory mapping です。

    BLOCKER 2: workflow.md との責務境界が AC にない

    #283 コメントの人間指摘は正しいです。product-spec-lifecycle.md が workflow.md と同じ「作業フロー」「Issue/PR 運用」「delivery-rollup」「quality gate」を再定義すると、将来どちらを読むべきか分からなくなります。

    修正: product-spec-lifecycle.md の冒頭に必須セクションを追加。

    ## Responsibility Boundary with docs/dev/workflow.md
    
    • docs/dev/workflow.md owns repository-wide execution workflow:
      Issue phases, 1 Issue = 1 PR, worktree rules, quality gates,
      delivery-rollup parent handling, and new SSOT update set.

    • This document owns product spec lifecycle:
      taxonomy, status, creation/update/archive rules, compact spec,
      diff-first updates, EARS usage, trace links, product spec delta,
      and registry entry templates for docs/product/**.

    • This document must not redefine workflow-level gates.

    • If conflict:

      • workflow execution rules: docs/dev/workflow.md wins
      • SDD tool policy / generated artifact boundary: ADR 0002 wins
      • product content: relevant docs/product/** SSOT wins
      • catalog discovery: docs/dev/ssot-registry.md wins

    BLOCKER 3: docs/dev/workflow.md が Allowed Paths にない

    workflow.md は「新規 SSOT 文書を追加する場合、同一 PR で SSOT Routing Table に追加する」と要求しています。#283 は新規 SSOT docs/dev/product-spec-lifecycle.md を追加する Issue なので、本来 docs/dev/workflow.md の SSOT Routing Table 更新が必要です。しかし #283 の Allowed Paths には docs/dev/workflow.md が含まれていません。

    修正: Allowed Paths に以下を追加。

    - docs/dev/workflow.md(SSOT Routing Table への product-spec-lifecycle 参照追加のみ)

    MAJOR 1: CLAUDE.md 読み順への無条件追加は token_policy と衝突し得る

    ADR 0002 は compact_spec: required、scoped_loading: required、full_regeneration: prohibited を定めています。また PR #308 後、speckit-* は managed derived artifact とされ、Tier 3 の大きい skill は auto-load 禁止です。

    #283 の「CLAUDE.md または project-constitution.md の『まず読む順序』に product-spec-lifecycle を追加」は雑です。常時ロードにすると product spec lifecycle が全タスクで読まれ、scoped loading に反します。CLAUDE.md には条件付きで入れるべきです。

    推奨:

    - Product spec / docs/product/** を作成・更新・archive する場合のみ
    docs/dev/product-spec-lifecycle.md を読む。

    MAJOR 2: tasks.md staging artifact → GitHub Issue を lifecycle 側で再定義しすぎる危険

    ADR 0002 は tasks.md を staging artifact、GitHub Issue を tracking 正本と定義し、直接 tasks.md から実装することを禁止しています。speckit-implement も direct execution prohibited で、必須経路は GitHub Issue → issue-contract-review → impl-review-loop → test-runner → pr-review-judge です。

    product-spec-lifecycle.md が持つべきなのは「product spec 由来 task の GitHub Issue 化 adapter」です。たとえば:

    product_task_materialization:
    source_artifact: tasks.md
    target: github-issues
    required_trace:
    • product_spec_id
    • requirement_id
    • source_task_id
    • parent_issue
      dependency_preservation: required
      direct_implementation_from_tasks_md: prohibited

    gh issue create の手順や delivery-rollup parent の編集手順は workflow.md / github-ops.md / create-issue 側に残すべきです。

    MAJOR 3: docs/product/ directory mapping が不足する可能性

    現状の ssot-registry.md には docs/adr/ の mapping はありますが、docs/product/ 用の directory mapping が見当たりません。#283 が product spec lifecycle を導入するなら、docs/product/ 変更時に product-spec-lifecycle.md、requirements.md、ADR 0002 が発見されるようにすべきです。

    推奨 mapping:

    - pattern: "docs/product/**"
    ssots:
  4. docs/dev/product-spec-lifecycle.md
  5. docs/product/requirements.md
  6. docs/adr/0002-sdd-tool-adoption.md
  7. MAJOR 4: project-constitution.md の feature spec 旧モデルと衝突する

    project-constitution.md は個別 feature spec の標準配置を docs/product/features/<feature>.md としています。一方 #254 の child 群は docs/product/game-thesis.md、game-design.md、game-logic.md、mvp-scope.md のような top-level product SSOT を追加する設計です。

    product-spec-lifecycle.md では、この差を明確にする必要があります。

    推奨分類:

    docs/product/requirements.md       global requirements / non-goals
    docs/product/game-thesis.md product thesis / design pillars
    docs/product/game-design.md GDD-level design
    docs/product/game-logic.md implementation-facing game rules
    docs/product/mvp-scope.md current MVP boundary
    docs/product/features/<feature>.md optional feature-level detail

    MAJOR 5: archive の意味が曖昧

    #283 は「作成・更新・アーカイブ」を書くと言っていますが、archive が「削除」「registry から除去」「status: archived」「docs/product/archive へ移動」のどれか不明です。SSOT 文書を消すと traceability が壊れます。

    推奨: 初期実装では削除ではなく status 遷移に限定。

    status:
    
    
    
  8. draft
  9. accepted
  10. superseded
  11. archived
    archive_rule:
    delete_file: prohibited
    required_fields:
    • superseded_by
    • archived_reason
    • archived_date
    • linked_issue
  12. #283 の修正案

    Allowed Paths はこう直すのが妥当です。

    ## Allowed Paths
    
    
    
    
    
  13. docs/dev/product-spec-lifecycle.md(新規作成)

  14. docs/dev/ssot-registry.md(product-spec-lifecycle entry + docs/product/** directory mapping 追加のみ)

  15. docs/dev/workflow.md(SSOT Routing Table への参照追加のみ)

  16. CLAUDE.md(条件付き読む順序への追記のみ)

  17. .claude/rules/project-constitution.md(product spec lifecycle 参照・配置分類の最小追記のみ)

  18. .claude/skills/ssot-discovery/SKILL.md(説明・例の更新が必要な場合のみ)

  19. 削除:

    • .claude/skills/ssot-discovery/references/ssot-catalog.md

    AC はこう直すべきです。

    - [ ] AC1: docs/dev/product-spec-lifecycle.md が存在する
    
  20. AC2: product-spec-lifecycle.md に docs/dev/workflow.md との Responsibility Boundary が明記されている
  21. AC3: product spec の create / update / supersede / archive state machine が定義されている
  22. AC4: ADR 0002 の compact_spec, scoped_loading, diff-first, full_regeneration: prohibited, tasks.md staging artifact が product spec 向け adapter として記載されている
  23. AC5: tasks.md から直接実装せず、GitHub Issue に materialize する trace rule が記載されている
  24. AC6: docs/dev/ssot-registry.md に product-spec-lifecycle entry が追加されている
  25. AC7: docs/dev/ssot-registry.md に docs/product/** directory mapping が追加されている
  26. AC8: docs/dev/workflow.md の SSOT Routing Table に product-spec-lifecycle.md が追加されている
  27. AC9: CLAUDE.md または .claude/rules/project-constitution.md に「product spec 変更時のみ読む」条件付き参照が追加されている
  28. AC10: ssot-catalog.md 参照が残っていない
  29. [ ] AC11: pnpm typecheck &amp;&amp; pnpm lint &amp;&amp; pnpm test &amp;&amp; pnpm build が PASS
  30. VC も最低限こう置き換えるべきです。

    test -f docs/dev/product-spec-lifecycle.md
    
    

    rg -q "Responsibility Boundary|workflow.md" docs/dev/product-spec-lifecycle.md

    rg -q "compact_spec|scoped_loading|diff-first|full_regeneration: prohibited|tasks.md.*staging"
    docs/dev/product-spec-lifecycle.md

    rg -q "direct.*tasks.md.*prohibited|GitHub Issue|requirement_id|source_task_id"
    docs/dev/product-spec-lifecycle.md

    rg -q "product-spec-lifecycle" docs/dev/ssot-registry.md
    rg -q "docs/product/\\" docs/dev/ssot-registry.md
    rg -q "product-spec-lifecycle" docs/dev/workflow.md

    rg -q "product-spec-lifecycle" CLAUDE.md .claude/rules/project-constitution.md

    ! rg -n "ssot-catalog"
    docs/dev/product-spec-lifecycle.md
    docs/dev/ssot-registry.md
    docs/dev/workflow.md
    CLAUDE.md
    .claude/rules/project-constitution.md

    推奨する product-spec-lifecycle.md 章立て

    # Product Spec Lifecycle

    Authority / Responsibility Boundary

    Product SSOT Taxonomy

    • requirements
    • game-thesis
    • game-design
    • game-logic
    • mvp-scope
    • playtest-protocol / playtest-log
    • release-distribution-policy
    • feature specs

    Lifecycle States

    draft -> accepted -> superseded -> archived

    Creation Rules

    compact spec, trace IDs, EARS acceptance criteria, non-goals

    Update Rules

    diff-first, no full regeneration, requirement-level deltas

    Archive / Supersede Rules

    status-based archive, replacement links, no silent deletion

    Product Spec Delta Flow

    playtest-log -> spec_delta_issue -> implementation_issue -> PR

    tasks.md Adapter

    tasks.md is staging only; GitHub Issue is tracking SSOT

    Registry / Discovery Rules

    ssot-registry entry template and docs/product/** mapping

    Loading Policy

    scoped loading; lifecycle is read only for product spec changes

    Verification Commands

    レビューコメント案

    #283 は実装前に contract patch が必要です。docs/dev/workflow.md は repo-wide execution workflow の SSOT、docs/dev/product-spec-lifecycle.md は docs/product/ の lifecycle / SDD adapter として分離してください。現状のままだと 1 Issue = 1 PR、tasks.md staging、registry 更新、読み順更新などを lifecycle 側で再定義し、二重 SSOT 化します。

    また ssot-catalog.md は PR #302 で削除済みなので、AC / Allowed Paths / VC から全削除してください。代替は docs/dev/ssot-registry.md entry と docs/product/ directory mapping です。

    workflow.md は新規 SSOT 追加時に SSOT Routing Table 更新を要求しているため、#283 の Allowed Paths に docs/dev/workflow.md を「Routing Table 追記のみ」で追加する必要があります。

    CLAUDE.md への追記は無条件ロードではなく、「product spec / docs/product/** を作成・更新・archive する場合のみ読む」としてください。ADR 0002 の scoped loading / compact spec 方針と衝突させないためです。

    判定: **REQUEST_CHANGES / contract patch 必須**。

    #283 は目的自体は妥当ですが、このまま実装させると docs/dev/workflow.md と docs/dev/product-spec-lifecycle.md が二重 SSOT 化します。人間指摘の通り、責務境界が Issue contract に明記されていません。さらに #283 は .claude/skills/ssot-discovery/references/ssot-catalog.md 更新を AC / Allowed Paths に含んでいますが、親 #254 では PR #302 により ssot-catalog.md は廃止済み、docs/dev/ssot-registry.md が唯一の SSOT カタログ正本とされています。これは実装前に修正すべき stale contract です。

    人間指摘への回答: 責務分離案

    設計は workflow.md = repo-wide execution control-plane、product-spec-lifecycle.md = product SSOT lifecycle data-plane / SDD adapter に分けるべきです。

    領域 正本 書くべき内容
    開発運用全体 docs/dev/workflow.md Issue 駆動フロー、1 Issue = 1 PR、worktree、品質ゲート、SSOT 追加時の必須更新セット、delivery-rollup parent materialization、Skill 別の運用責務
    Product spec の生存期間 docs/dev/product-spec-lifecycle.md docs/product/** の作成・更新・archive・supersede・registry 登録・compact spec・diff-first 更新・EARS 採用・playtest feedback から spec delta issue への変換
    SDD 採否・正本境界 docs/adr/0002-sdd-tool-adoption.md Spec Kit upstream-compatible 採用、docs/ が正本、.specify/ と speckit-* は derived workbench / managed derived artifact、tasks.md は staging artifact
    SSOT 発見 docs/dev/ssot-registry.md カタログ entries と directory mappings のみ。手順本文は置かない
    Skill/SubAgent 責務 docs/dev/agent-skill-boundaries.md speckit-* / native skills / orchestration / implementation worker の責務境界

    workflow.md はすでに repo 全体の開発運用 SSOT と明記され、Issue 駆動フロー、1 Issue = 1 PR、docs 更新条件、SSOT Routing Table、新規 SSOT 追加時の更新セット、delivery-rollup parent の materialization 手順まで持っています。ここに product spec の状態遷移や EARS 記法の細則まで入れると肥大化します。

    一方、product-spec-lifecycle.md は workflow.md を上書きしてはいけません。役割は「workflow.md の運用ルールを product spec に適用する adapter」です。たとえば 1 Issue = 1 PR は workflow.md の責務、playtest-log の design hypothesis invalidated を spec_delta_issue に分類し、その後 implementation issue に materialize する は lifecycle 側の責務です。

    外部実装との照合

    Spec Kit は constitution → specify → plan → tasks → taskstoissues → implement というコマンド体系を持ち、spec から implementation までを生成物でつなぎます。したがって LOOP_PROTOCOL で採用する場合、tasks.md や .specify/ を直接正本化せず、GitHub Issue に materialize する adapter 境界が必要です。([GitHub]1) (GitHub)

    Kiro Specs も requirements.md、design.md、tasks.md の分離を採用し、requirements では EARS 形式の acceptance criteria を使います。これは #283 の product spec lifecycle に requirements/design/tasks の役割分担や EARS usage を入れる根拠になりますが、LOOP_PROTOCOL では tasks.md を tracking 正本にしてはいけません。([Kiro]2)

    EARS は自然言語要求の曖昧さを減らす軽量記法で、専門ツールなしに導入できます。よって product-spec-lifecycle.md では「EARS を product docs の acceptance criteria 記法として使う」程度に留め、EARS 自体を新しい SDD ツール正本にしてはいけません。([Alistair Mavin]3)

    OpenSpec は proposal.md / specs / design.md / tasks.md を change folder に置く軽量 spec layer ですが、既存フォーマットとの整合で hard-coded format 問題が open になっています。ADR 0002 が OpenSpec primary 採用を見送った判断は妥当で、#283 でも OpenSpec 風の artifact 階層を正本化しない方が安全です。([GitHub]4) ([GitHub]5)

    敵対的レビュー findings

    BLOCKER 1: ssot-catalog.md 参照が stale

    #283 は ssot-catalog.md への登録を In Scope / AC / Allowed Paths / VC に含めています。しかし親 #254 は PR #302 後に ssot-catalog.md を廃止し、docs/dev/ssot-registry.md を唯一の SSOT カタログ正本としています。workflow.md と ssot-registry.md も同じく、ssot-catalog.md は削除済みで更新不要と明記しています。

    修正: #283 から以下を全削除。

    .claude/skills/ssot-discovery/references/ssot-catalog.md
    ssot-catalog.md との同期
    AC5: ssot-catalog.md へのエントリ追加
    

    代替は docs/dev/ssot-registry.md の entry + 必要なら directory mapping です。

    BLOCKER 2: workflow.md との責務境界が AC にない

    #283 コメントの人間指摘は正しいです。product-spec-lifecycle.md が workflow.md と同じ「作業フロー」「Issue/PR 運用」「delivery-rollup」「quality gate」を再定義すると、将来どちらを読むべきか分からなくなります。

    修正: product-spec-lifecycle.md の冒頭に必須セクションを追加。

    ## Responsibility Boundary with docs/dev/workflow.md
    
    - `docs/dev/workflow.md` owns repository-wide execution workflow:
      Issue phases, 1 Issue = 1 PR, worktree rules, quality gates,
      delivery-rollup parent handling, and new SSOT update set.
    - This document owns product spec lifecycle:
      taxonomy, status, creation/update/archive rules, compact spec,
      diff-first updates, EARS usage, trace links, product spec delta,
      and registry entry templates for docs/product/**.
    - This document must not redefine workflow-level gates.
    - If conflict:
      - workflow execution rules: `docs/dev/workflow.md` wins
      - SDD tool policy / generated artifact boundary: ADR 0002 wins
      - product content: relevant `docs/product/**` SSOT wins
      - catalog discovery: `docs/dev/ssot-registry.md` wins

    BLOCKER 3: docs/dev/workflow.md が Allowed Paths にない

    workflow.md は「新規 SSOT 文書を追加する場合、同一 PR で SSOT Routing Table に追加する」と要求しています。#283 は新規 SSOT docs/dev/product-spec-lifecycle.md を追加する Issue なので、本来 docs/dev/workflow.md の SSOT Routing Table 更新が必要です。しかし #283 の Allowed Paths には docs/dev/workflow.md が含まれていません。

    修正: Allowed Paths に以下を追加。

    - docs/dev/workflow.md(SSOT Routing Table への product-spec-lifecycle 参照追加のみ)
    

    MAJOR 1: CLAUDE.md 読み順への無条件追加は token_policy と衝突し得る

    ADR 0002 は compact_spec: required、scoped_loading: required、full_regeneration: prohibited を定めています。また PR #308 後、speckit-* は managed derived artifact とされ、Tier 3 の大きい skill は auto-load 禁止です。

    #283 の「CLAUDE.md または project-constitution.md の『まず読む順序』に product-spec-lifecycle を追加」は雑です。常時ロードにすると product spec lifecycle が全タスクで読まれ、scoped loading に反します。CLAUDE.md には条件付きで入れるべきです。

    推奨:

    - Product spec / docs/product/** を作成・更新・archive する場合のみ
      `docs/dev/product-spec-lifecycle.md` を読む。

    MAJOR 2: tasks.md staging artifact → GitHub Issue を lifecycle 側で再定義しすぎる危険

    ADR 0002 は tasks.md を staging artifact、GitHub Issue を tracking 正本と定義し、直接 tasks.md から実装することを禁止しています。speckit-implement も direct execution prohibited で、必須経路は GitHub Issue → issue-contract-review → impl-review-loop → test-runner → pr-review-judge です。

    product-spec-lifecycle.md が持つべきなのは「product spec 由来 task の GitHub Issue 化 adapter」です。たとえば:

    product_task_materialization:
      source_artifact: tasks.md
      target: github-issues
      required_trace:
        - product_spec_id
        - requirement_id
        - source_task_id
        - parent_issue
      dependency_preservation: required
      direct_implementation_from_tasks_md: prohibited

    gh issue create の手順や delivery-rollup parent の編集手順は workflow.md / github-ops.md / create-issue 側に残すべきです。

    MAJOR 3: docs/product/** directory mapping が不足する可能性

    現状の ssot-registry.md には docs/adr/** の mapping はありますが、docs/product/** 用の directory mapping が見当たりません。#283 が product spec lifecycle を導入するなら、docs/product/** 変更時に product-spec-lifecycle.md、requirements.md、ADR 0002 が発見されるようにすべきです。

    推奨 mapping:

    - pattern: "docs/product/**"
      ssots:
        - docs/dev/product-spec-lifecycle.md
        - docs/product/requirements.md
        - docs/adr/0002-sdd-tool-adoption.md

    MAJOR 4: project-constitution.md の feature spec 旧モデルと衝突する

    project-constitution.md は個別 feature spec の標準配置を docs/product/features/<feature>.md としています。一方 #254 の child 群は docs/product/game-thesis.md、game-design.md、game-logic.md、mvp-scope.md のような top-level product SSOT を追加する設計です。

    product-spec-lifecycle.md では、この差を明確にする必要があります。

    推奨分類:

    docs/product/requirements.md       global requirements / non-goals
    docs/product/game-thesis.md        product thesis / design pillars
    docs/product/game-design.md        GDD-level design
    docs/product/game-logic.md         implementation-facing game rules
    docs/product/mvp-scope.md          current MVP boundary
    docs/product/features/<feature>.md optional feature-level detail
    

    MAJOR 5: archive の意味が曖昧

    #283 は「作成・更新・アーカイブ」を書くと言っていますが、archive が「削除」「registry から除去」「status: archived」「docs/product/archive へ移動」のどれか不明です。SSOT 文書を消すと traceability が壊れます。

    推奨: 初期実装では削除ではなく status 遷移に限定。

    status:
      - draft
      - accepted
      - superseded
      - archived
    archive_rule:
      delete_file: prohibited
      required_fields:
        - superseded_by
        - archived_reason
        - archived_date
        - linked_issue

    #283 の修正案

    Allowed Paths はこう直すのが妥当です。

    ## Allowed Paths
    
    - `docs/dev/product-spec-lifecycle.md`(新規作成)
    - `docs/dev/ssot-registry.md`(product-spec-lifecycle entry + docs/product/** directory mapping 追加のみ)
    - `docs/dev/workflow.md`(SSOT Routing Table への参照追加のみ)
    - `CLAUDE.md`(条件付き読む順序への追記のみ)
    - `.claude/rules/project-constitution.md`(product spec lifecycle 参照・配置分類の最小追記のみ)
    - `.claude/skills/ssot-discovery/SKILL.md`(説明・例の更新が必要な場合のみ)
    
    削除:
    - `.claude/skills/ssot-discovery/references/ssot-catalog.md`

    AC はこう直すべきです。

    - [ ] AC1: `docs/dev/product-spec-lifecycle.md` が存在する
    - [ ] AC2: `product-spec-lifecycle.md` に `docs/dev/workflow.md` との Responsibility Boundary が明記されている
    - [ ] AC3: product spec の create / update / supersede / archive state machine が定義されている
    - [ ] AC4: ADR 0002 の `compact_spec`, `scoped_loading`, `diff-first`, `full_regeneration: prohibited`, `tasks.md staging artifact` が product spec 向け adapter として記載されている
    - [ ] AC5: `tasks.md` から直接実装せず、GitHub Issue に materialize する trace rule が記載されている
    - [ ] AC6: `docs/dev/ssot-registry.md` に `product-spec-lifecycle` entry が追加されている
    - [ ] AC7: `docs/dev/ssot-registry.md` に `docs/product/**` directory mapping が追加されている
    - [ ] AC8: `docs/dev/workflow.md` の SSOT Routing Table に `product-spec-lifecycle.md` が追加されている
    - [ ] AC9: `CLAUDE.md` または `.claude/rules/project-constitution.md` に「product spec 変更時のみ読む」条件付き参照が追加されている
    - [ ] AC10: `ssot-catalog.md` 参照が残っていない
    - [ ] AC11: `pnpm typecheck && pnpm lint && pnpm test && pnpm build` が PASS

    VC も最低限こう置き換えるべきです。

    test -f docs/dev/product-spec-lifecycle.md
    
    rg -q "Responsibility Boundary|workflow.md" docs/dev/product-spec-lifecycle.md
    
    rg -q "compact_spec|scoped_loading|diff-first|full_regeneration: prohibited|tasks.md.*staging" \
      docs/dev/product-spec-lifecycle.md
    
    rg -q "direct.*tasks.md.*prohibited|GitHub Issue|requirement_id|source_task_id" \
      docs/dev/product-spec-lifecycle.md
    
    rg -q "product-spec-lifecycle" docs/dev/ssot-registry.md
    rg -q "docs/product/\\*\\*" docs/dev/ssot-registry.md
    rg -q "product-spec-lifecycle" docs/dev/workflow.md
    
    rg -q "product-spec-lifecycle" CLAUDE.md .claude/rules/project-constitution.md
    
    ! rg -n "ssot-catalog" \
      docs/dev/product-spec-lifecycle.md \
      docs/dev/ssot-registry.md \
      docs/dev/workflow.md \
      CLAUDE.md \
      .claude/rules/project-constitution.md

    推奨する product-spec-lifecycle.md 章立て

    # Product Spec Lifecycle
    
    ## Authority / Responsibility Boundary
    
    ## Product SSOT Taxonomy
    - requirements
    - game-thesis
    - game-design
    - game-logic
    - mvp-scope
    - playtest-protocol / playtest-log
    - release-distribution-policy
    - feature specs
    
    ## Lifecycle States
    draft -> accepted -> superseded -> archived
    
    ## Creation Rules
    compact spec, trace IDs, EARS acceptance criteria, non-goals
    
    ## Update Rules
    diff-first, no full regeneration, requirement-level deltas
    
    ## Archive / Supersede Rules
    status-based archive, replacement links, no silent deletion
    
    ## Product Spec Delta Flow
    playtest-log -> spec_delta_issue -> implementation_issue -> PR
    
    ## tasks.md Adapter
    tasks.md is staging only; GitHub Issue is tracking SSOT
    
    ## Registry / Discovery Rules
    ssot-registry entry template and docs/product/** mapping
    
    ## Loading Policy
    scoped loading; lifecycle is read only for product spec changes
    
    ## Verification Commands

    レビューコメント案

    #283 は実装前に contract patch が必要です。docs/dev/workflow.md は repo-wide execution workflow の SSOT、docs/dev/product-spec-lifecycle.md は docs/product/** の lifecycle / SDD adapter として分離してください。現状のままだと 1 Issue = 1 PR、tasks.md staging、registry 更新、読み順更新などを lifecycle 側で再定義し、二重 SSOT 化します。

    また ssot-catalog.md は PR #302 で削除済みなので、AC / Allowed Paths / VC から全削除してください。代替は docs/dev/ssot-registry.md entry と docs/product/** directory mapping です。

    workflow.md は新規 SSOT 追加時に SSOT Routing Table 更新を要求しているため、#283 の Allowed Paths に docs/dev/workflow.md を「Routing Table 追記のみ」で追加する必要があります。

    CLAUDE.md への追記は無条件ロードではなく、「product spec / docs/product/** を作成・更新・archive する場合のみ読む」としてください。ADR 0002 の scoped loading / compact spec 方針と衝突させないためです。

  31. added a commit that references this issue on May 23, 2026
  32. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop: iteration 0 — contract patch

    変更内容:

    • Allowed Paths に docs/dev/workflow.md を追加(SSOT Routing Table 必須更新)
    • AC5 を追加(workflow.md SSOT Routing Table エントリ確認)
    • VC に AC5 コマンドを追加
    • In Scope に workflow.md SSOT Routing Table 更新を追加
    • AC4 を拡張(docs/product/** directory mapping を含める)
    • AC6 を更新(CLAUDE.md への条件付き参照に変更、ADR 0002 scoped loading 準拠)
    • Normative References に workflow.md を追加

    根拠:

    • BLOCKER: workflow.md の "新規 SSOT 追加時の必須更新セット Step 1" により docs/dev/workflow.md の SSOT Routing Table 更新が義務(同一 PR)
    • BLOCKER: この更新を検証する AC5 が欠落していた
    • MAJOR: docs/product/** directory mapping が ssot-registry.md に不足
    • MAJOR: CLAUDE.md への無条件追加が ADR 0002 scoped loading と不整合

    Guard 結果:

    • template_guard: pass
    • outcome_quality_guard: pass
    • diff_threshold: pass (148 → 161 lines)
    • ac_vc_alignment: pass (AC=7, VC=7)
  33. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop: 完了 (2026-05-23T16:53:55Z)

    • iteration: 1
    • verdict: approve
    • termination_reason: approved
    • 改善履歴:
      • iter 0: Allowed Paths に docs/dev/workflow.md を追加(SSOT Routing Table 必須更新)、AC5 追加(workflow.md SSOT Routing Table エントリ確認)、AC4 拡張(docs/product/** directory mapping 追加)、AC6 更新(CLAUDE.md への scoped loading 準拠の条件付き参照に変更)、Normative References に workflow.md を追加
      • iter 1: review-issue approve → 終了
    • 次アクション: issue-contract-review を実行して実装着手前 preflight を通してください
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      follow_up_issues: []
      note_only_observations: []
  34. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-24T01:56:30Z)

    • Outcome: `docs/dev/product-spec-lifecycle.md` が main にマージされ、`docs/dev/ssot-registry.md` に登録されており、`CLAUDE.md` または `.claude/rules/project-constitution.md` の「まず読む順序」に追記されている。
    • Acceptance Criteria: AC1〜AC7(product-spec-lifecycle.md 作成・token_policy 記述・tasks.md フロー記述・ssot-registry エントリ・workflow.md SSOT Routing Table・読む順序条件付き参照・quality gate)
    • Verification Commands: test -f / rg -q / pnpm typecheck/lint/test/build(全 AC 対応)
    • Allowed Paths:
      • docs/dev/product-spec-lifecycle.md(新規作成)
      • docs/dev/ssot-registry.md(エントリ追加のみ)
      • CLAUDE.md(読む順序への追記のみ)
      • .claude/rules/project-constitution.md(読む順序への追記のみ)
      • docs/dev/workflow.md(SSOT Routing Table へのエントリ追加のみ)
    • Worktree: .claude/worktrees/issue-283-docs-dev-product-spec-lifecycle-md-sdd-c
    • Branch: worktree-issue-283-docs-dev-product-spec-lifecycle-md-sdd-c
    • VC preflight: baseline fail = 6, 想定外 pass = 0, 実行不可 = 0
    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-05-24T01:56:30Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/283
      checks:
        template_compliance: pass
        state_label: ok
        allowed_paths_present: pass
        vc_present: pass
        stop_conditions_complete: pass
        vc_preflight:
          passed: true
          vc_failed_as_expected: 6
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          classifications:
            - ac: AC1
              command: "test -f docs/dev/product-spec-lifecycle.md"
              exit_code: 1
              category: file_not_found_expected
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC2
              command: "rg -q 'compact.spec|...' docs/dev/product-spec-lifecycle.md"
              exit_code: 1
              category: file_not_found_expected
              confidence: medium
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: "docs/dev/product-spec-lifecycle.md: No such file or directory"
              decision: go
            - ac: AC3
              command: "rg -q 'tasks\\.md|...' docs/dev/product-spec-lifecycle.md"
              exit_code: 1
              category: file_not_found_expected
              confidence: medium
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: "docs/dev/product-spec-lifecycle.md: No such file or directory"
              decision: go
            - ac: AC4
              command: "rg -q 'product-spec-lifecycle' docs/dev/ssot-registry.md"
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC4b
              command: "rg -q 'docs/product/\\*\\*' docs/dev/ssot-registry.md"
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC5
              command: "rg -q 'product-spec-lifecycle' docs/dev/workflow.md"
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC6
              command: "rg -q 'product-spec-lifecycle' CLAUDE.md .claude/rules/project-constitution.md"
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC7
              command: "pnpm typecheck && pnpm lint && pnpm test && pnpm build"
              exit_code: 0
              category: expected_baseline_fail
              confidence: high
              evidence:
                stdout_excerpt: "Test Files 15 passed (15), Tests 75 passed (75), built in 47ms"
                stderr_excerpt: ""
              decision: go
        ac_verifiability: pass
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings:
        - "AC2/AC3 の rg が target file missing で fail(cascade from AC1)。semantic は file_not_found_expected と同等、confidence medium"
        - "AC7 は quality gate のため baseline PASS は正常(regression check)"
  35. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-05-23T17:01:53Z)

  36. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-05-24T02:05:00Z)

    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      follow_up_issues: []
      note_only_observations: []
    ISSUE_SCOPE_ROLLUP_DECISION_V2:
      schema_version: 2
      recorded_at: "2026-05-24T02:05:00Z"
      rollup_plan_ref:
        body_sha256: null
        generated_at: null
      decision: skipped
      executed_actions: []
      skipped_reason: "preparation Step 2.5 未実施(docs-only issue、scope rollup 対象なし)"
      candidates_reviewed: []
  37. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    edit-issue: contract 拡張 (2026-05-24T02:10:00Z)

    人間レビュー(https://github.com/squne121/loop-protocol/pull/322#issuecomment-4526076949)の指摘 B1〜B6 に基づき、Issue #283 の contract を拡張しました。

    変更セクション

    Allowed Paths(追加)

    • docs/product/CLAUDE.md(新規作成)
    • .claude/rules/product-spec-lifecycle.md(新規作成)
    • .claude/skills/product-spec-lifecycle/SKILL.md(新規作成)

    In Scope(追加)

    • docs/product/CLAUDE.md、.claude/rules/product-spec-lifecycle.md、.claude/skills/product-spec-lifecycle/SKILL.md の新規作成

    Acceptance Criteria(追加 / 更新)

    • AC6 更新: CLAUDE.md への short pointer(唯一の operational hook にしない)
    • AC8 追加: docs/product/CLAUDE.md 存在・局所参照・full_regeneration 禁止
    • AC9 追加: .claude/rules/product-spec-lifecycle.md paths スコープ確認
    • AC10 追加: .claude/skills/product-spec-lifecycle/SKILL.md 存在・CHECK_V1 出力定義

    Verification Commands(追加)

    • AC8・AC9・AC10 に対応する test -f / rg -q コマンドを追加(baseline fail 確認済み)

    Outcome 更新: 4 成果物(policy doc / local CLAUDE / path rule / skill)を明示

    Guard 結果

    ISSUE_EDIT_RESULT_V1:
      status: ok
      generated_at: "2026-05-24T02:10:00Z"
      generated_by: edit-issue
      issue_url: https://github.com/squne121/loop-protocol/issues/283
      guards:
        template_guard: pass
        outcome_quality_guard: pass
        diff_threshold_check:
          passed: true
          orig_lines: 161
          new_lines: 211
        ac_vc_alignment:
          passed: true
          ac_count: 10
          vc_ac_comment_count: 10
      update_applied: true
      backup_file: tmp/issue_283_backup_1779557498.md
      warnings: []
      errors: []

    次アクション: issue-contract-review を実行して新 contract の preflight を通してください。

  38. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-24T02:35:00Z)

    • Outcome: 4 成果物(docs/dev/product-spec-lifecycle.md / docs/product/CLAUDE.md / .claude/rules/product-spec-lifecycle.md / .claude/skills/product-spec-lifecycle/SKILL.md)が main にマージされ、docs/dev/ssot-registry.md に登録されている。docs/product/** 作業時に AI が自動的に path rule を参照し、skill 経由で create/update/archive/tasks.md materialization を実行できる状態。
    • Acceptance Criteria: AC1〜AC10(拡張 contract 対応版)
    • Verification Commands: test -f / rg -q(AC1〜AC10)/ pnpm typecheck/lint/test/build(AC7)
    • Allowed Paths:
      • docs/dev/product-spec-lifecycle.md(新規作成)
      • docs/dev/ssot-registry.md(エントリ追加のみ)
      • CLAUDE.md(short pointer 追記のみ)
      • .claude/rules/project-constitution.md(追記のみ、任意)
      • docs/dev/workflow.md(SSOT Routing Table エントリ追加のみ)
      • docs/product/CLAUDE.md(新規作成)
      • .claude/rules/product-spec-lifecycle.md(新規作成)
      • .claude/skills/product-spec-lifecycle/SKILL.md(新規作成)
    • Worktree: .claude/worktrees/issue-283-docs-dev-product-spec-lifecycle-md-sdd-c(iteration 0 から継続)
    • Branch: worktree-issue-283-docs-dev-product-spec-lifecycle-md-sdd-c
    • VC preflight: baseline fail = 12, 想定外 pass = 0, 実行不可 = 0
    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-05-24T02:35:00Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/283
      checks:
        template_compliance: pass
        state_label: ok
        allowed_paths_present: pass
        vc_present: pass
        stop_conditions_complete: pass
        vc_preflight:
          passed: true
          vc_failed_as_expected: 12
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          classifications:
            - ac: AC1
              command: "test -f docs/dev/product-spec-lifecycle.md"
              exit_code: 1
              category: file_not_found_expected
              confidence: high
              decision: go
            - ac: AC2
              command: "rg -q 'compact.spec|...' docs/dev/product-spec-lifecycle.md"
              exit_code: 1
              category: file_not_found_expected
              confidence: medium
              decision: go
            - ac: AC3
              command: "rg -q 'tasks\\.md|...' docs/dev/product-spec-lifecycle.md"
              exit_code: 1
              category: file_not_found_expected
              confidence: medium
              decision: go
            - ac: AC4
              command: "rg -q 'product-spec-lifecycle' docs/dev/ssot-registry.md"
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              decision: go
            - ac: AC4b
              command: "rg -q 'docs/product/\\*\\*' docs/dev/ssot-registry.md"
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              decision: go
            - ac: AC5
              command: "rg -q 'product-spec-lifecycle' docs/dev/workflow.md"
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              decision: go
            - ac: AC6
              command: "rg -q 'product-spec-lifecycle' CLAUDE.md"
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              decision: go
            - ac: AC7
              command: "pnpm typecheck && pnpm lint && pnpm test && pnpm build"
              exit_code: 0
              category: expected_baseline_fail
              confidence: high
              evidence:
                stdout_excerpt: "Test Files 20 passed (20), Tests 100 passed (100)"
              decision: go
            - ac: AC8
              command: "test -f docs/product/CLAUDE.md"
              exit_code: 1
              category: file_not_found_expected
              confidence: high
              decision: go
            - ac: AC9
              command: "test -f .claude/rules/product-spec-lifecycle.md"
              exit_code: 1
              category: file_not_found_expected
              confidence: high
              decision: go
            - ac: AC10
              command: "test -f .claude/skills/product-spec-lifecycle/SKILL.md"
              exit_code: 1
              category: file_not_found_expected
              confidence: high
              decision: go
        ac_verifiability: pass
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings:
        - "worktree/branch が iteration 0 から継続利用(PR #322 未マージ状態)。実装 worker は既存 worktree に追加コミットする"
        - "AC2/AC3 の rg が target file missing で cascade fail(semantic は file_not_found_expected 相当)"
        - "AC7 は quality gate のため baseline PASS は正常"
  39. added a commit that references this issue on May 23, 2026
  40. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    implement-issue: iteration 1 実装完了 (2026-05-24T02:39:00Z)

    REQUEST_CHANGES (B1-B5) に対応する iteration 1 の追加実装が完了しました。

    追加ファイル

    • docs/product/CLAUDE.md — docs/product SSOT 宣言・full_regeneration 禁止・speckit-* 優先順位明示(B1 / B4 対応)
    • .claude/rules/product-spec-lifecycle.md — paths: ["docs/product/**"] による path-scoped rule(B2 対応)
    • .claude/skills/product-spec-lifecycle/SKILL.md — create/update/archive/tasks_to_issues 手順・speckit-* 接続方針・PRODUCT_SPEC_LIFECYCLE_CHECK_V1 出力定義(B3 / B4 対応)

    CLAUDE.md 更新

    条件付き参照を short pointer に変更(B1 対応):

    docs/product/** の作業は .claude/rules/product-spec-lifecycle.md と .claude/skills/product-spec-lifecycle/SKILL.md を入口にする。docs/dev/product-spec-lifecycle.md は必要節のみ参照する

    検証結果

    • AC1-AC6: PASS(iteration 0 から継続)

    • AC7: PASS — pnpm typecheck / lint / test (5 files, 25 tests) / build

    • AC8 / AC8b: PASS — docs/product/CLAUDE.md + full_regeneration キーワード

    • AC9 / AC9b: PASS — .claude/rules/product-spec-lifecycle.md + paths: スコープ

    • AC10 / AC10b: PASS — .claude/skills/product-spec-lifecycle/SKILL.md + PRODUCT_SPEC_LIFECYCLE_CHECK_V1

    • PR: docs(#283): docs/dev/product-spec-lifecycle.md を追加 — SDD ライフサイクル定義(C254-2) #322

    • Branch: worktree-issue-283-docs-dev-product-spec-lifecycle-md-sdd-c

    • 後続: PR レビュー → マージ → post-merge-cleanup

  41. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-05-24T03:00:00Z)

    iteration 履歴

    iter 変更内容 verdict
    0 docs/dev/product-spec-lifecycle.md / ssot-registry / workflow / CLAUDE.md(条件付き参照) REQUEST_CHANGES(B1〜B6)
    1 docs/product/CLAUDE.md / .claude/rules/product-spec-lifecycle.md / .claude/skills/product-spec-lifecycle/SKILL.md 追加、CLAUDE.md を short pointer 化 APPROVE
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      follow_up_issues: []
      note_only_observations: []
    ISSUE_SCOPE_ROLLUP_DECISION_V2:
      schema_version: 2
      recorded_at: "2026-05-24T03:00:00Z"
      rollup_plan_ref:
        body_sha256: null
        generated_at: null
      decision: skipped
      executed_actions: []
      skipped_reason: "docs-only issue、scope rollup 対象なし"
      candidates_reviewed: []
  42. squne121 commented on May 24, 2026

    @squne121
    OwnerAuthor

    edit-issue: contract 再修正(iteration 2 準備) (2026-05-24T11:00:00Z)

    人間レビュー(#322 (comment) / #issuecomment-4527033128)の方針転換指摘に基づき、iteration 1 で追加した専用 rule/skill 方針を撤回します。

    変更内容

    撤回(iteration 1 の追加を取り消し)

    • .claude/rules/product-spec-lifecycle.md → 削除対象
    • .claude/skills/product-spec-lifecycle/SKILL.md → 削除対象
    • docs/product/CLAUDE.md → 30 行以下の最小ルールへ縮小
    • CLAUDE.md → docs/product/CLAUDE.md への short pointer のみ

    理由

    • 専用 skill/rule は既存ループ(issue-refinement-loop / impl-review-loop / issue-contract-review)と責務重複
    • 「ファイル修正 = Issue 起票」原則に反する独立入口を作るな
    • 既存ループの preflight に組み込むのが正しい設計(後続 Issue A/B/C で対応)

    AC 再設計

    • AC8 更新: docs/product/CLAUDE.md の行数制約(30 行以下)+ 既存ループ参照
    • AC9 更新: 専用 rule/skill が 存在しないこと を確認
    • AC10 更新: docs/dev/product-spec-lifecycle.md が policy/reference 文書である旨を明示

    後続 Issue(PR #322 マージ後に起票予定)

    • Issue A: issue-refinement-loop に Spec Kit phase 分類を追加
    • Issue B: issue-contract-review に product spec Stop Conditions を追加
    • Issue C: impl-review-loop に Spec Kit task preflight を追加
    • Issue D: Spec Kit template override / preset / extension 調査

    Guard 結果

    ISSUE_EDIT_RESULT_V1:
      status: ok
      generated_at: "2026-05-24T11:00:00Z"
      generated_by: edit-issue
      guards:
        template_guard: pass
        outcome_quality_guard: pass
        diff_threshold_check:
          passed: true
          orig_lines: 211
          new_lines: 207
        ac_vc_alignment:
          passed: true
          ac_count: 10
          vc_ac_comment_count: 10
      update_applied: true
      backup_file: tmp/issue_283_backup_1779586171.md

    次アクション: iteration 2 実装(rule/skill 削除 + CLAUDE 縮小)

  43. added a commit that references this issue on May 24, 2026
  44. squne121 commented on May 24, 2026

    @squne121
    OwnerAuthor

    implement-issue: iteration 2 実装完了 (2026-05-24T01:35:00Z)

    iteration 1 で追加した専用 skill/rule を人間レビュー指摘に基づき撤回しました。

    変更内容

    • .claude/rules/product-spec-lifecycle.md — 削除(git rm)
    • .claude/skills/product-spec-lifecycle/SKILL.md — 削除(ディレクトリごと git rm)
    • docs/product/CLAUDE.md — 最小ルール(11 行)に縮小、既存ループへの参照に変更
    • CLAUDE.md — docs/product/CLAUDE.md への short pointer のみに縮小
    • docs/dev/product-spec-lifecycle.md — policy/reference 文書である旨を明示(§文書の位置づけ セクション追加)

    AC 検証結果

    AC1〜AC10 全 PASS(AC7 質標準ゲート: typecheck/lint/test 25件/build 全 PASS)

    リンク

  45. squne121 commented on May 24, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (iteration 2) (2026-05-24T11:30:00Z)

    iteration 履歴

    iter 変更内容 verdict
    0 lifecycle 文書 + registry + workflow + CLAUDE 追記 REQUEST_CHANGES(B1〜B6: skill/rule 追加要求)
    1 docs/product/CLAUDE.md + .claude/rules/product-spec-lifecycle.md + .claude/skills/product-spec-lifecycle/SKILL.md 追加 REQUEST_CHANGES(方針転換: 既存ループへ統合すべき)
    2 rule/skill 削除、CLAUDE 縮小、policy/reference 明示 APPROVE

    後続 Issue(PR #322 マージ後に起票予定)

    • Issue A: issue-refinement-loop に Spec Kit phase 分類を追加
    • Issue B: issue-contract-review に product spec Stop Conditions を追加
    • Issue C: impl-review-loop に Spec Kit task preflight を追加
    • Issue D: Spec Kit template override / preset / extension 調査
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      follow_up_issues: []
      note_only_observations:
        - dedupe_key: "spec-kit-loop-integration:A"
          summary: "issue-refinement-loop に Spec Kit / product spec phase 分類を追加(後続起票予定)"
        - dedupe_key: "spec-kit-loop-integration:B"
          summary: "issue-contract-review に product spec Stop Conditions を追加(後続起票予定)"
        - dedupe_key: "spec-kit-loop-integration:C"
          summary: "impl-review-loop に Spec Kit task preflight を追加(後続起票予定)"
        - dedupe_key: "spec-kit-loop-integration:D"
          summary: "Spec Kit template override / preset / extension 調査(後続起票予定)"
    ISSUE_SCOPE_ROLLUP_DECISION_V2:
      schema_version: 2
      recorded_at: "2026-05-24T11:30:00Z"
      rollup_plan_ref:
        body_sha256: null
        generated_at: null
      decision: skipped
      executed_actions: []
      skipped_reason: "docs-only issue、scope rollup 対象なし"
      candidates_reviewed: []
  46. squne121 commented on May 24, 2026

    @squne121
    OwnerAuthor

    後続 Issue 起票完了 (2026-05-24T11:40:00Z)

    PR #322 の人間レビュー指摘に基づく後続 Issue 4 件を起票しました。

    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      follow_up_issues:
        - request_dedupe_key: "spec-kit-loop-integration:A"
          issue_number: 332
          issue_url: "https://github.com/squne121/loop-protocol/issues/332"
          status: created
          title: "実装: issue-refinement-loop に Product Spec / Spec Kit preflight を統合する"
        - request_dedupe_key: "spec-kit-loop-integration:B"
          issue_number: 335
          issue_url: "https://github.com/squne121/loop-protocol/issues/335"
          status: created
          title: "実装: issue-contract-review に product spec Stop Conditions を追加する"
        - request_dedupe_key: "spec-kit-loop-integration:C"
          issue_number: 333
          issue_url: "https://github.com/squne121/loop-protocol/issues/333"
          status: created
          title: "実装: impl-review-loop に Spec Kit task preflight 追加"
        - request_dedupe_key: "spec-kit-loop-integration:D"
          issue_number: 334
          issue_url: "https://github.com/squne121/loop-protocol/issues/334"
          status: created
          title: "調査: Spec Kit project-local overrides / preset / extension 調査"
      note_only_observations: []

    全 4 件とも #283 の sub-issue として登録済み。

  47. added a commit that references this issue on May 24, 2026
  48. squne121 commented on May 24, 2026

    @squne121
    OwnerAuthor

    PR #322 (commit 6b18d8e) のマージにより完了。全 AC (AC1〜AC10) PASS、policy/reference 文書 + 最小局所ルール構成で着地。後続作業は #332 / #333 / #334 / #335 に分離済み。

  49. added 2 commits that reference this issue on May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions