Skip to content

実装: impl-review-loop が issue-contract-review の product_spec_check を消費し、Step 1 前に fail-closed routing する — spec-kit-loop-integration:C #333

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#283"
goal_ref: "SDD 駆動運用 — impl-review-loop は Product/Spec Kit の意味論を再実装せず、issue-contract-review が生成した product_spec_check を contract snapshot から読み、Step 1 delegation 前に決定論的に routing する"
change_kind: workflow

Parent Issue

#283

Parent Goal Ref

  • Goal: SDD ライフサイクル(docs/dev/product-spec-lifecycle.md)の確立と、それに基づく issue 管理・ループ運用の整合
  • Desired Destination: impl-review-loop が orchestration 責務に留まりつつ、docs/product/** 変更および tasks.md materialized issue を 既存の決定論的 checker 結果 を消費して安全に gate できる状態

Current Validated Scope

  • .claude/skills/impl-review-loop/SKILL.md および steps/preparation.md に、CONTRACT_REVIEW_RESULT_V1.checks.product_spec_check を読み取って Step 1 delegation 前に continue / fail-close / human_judgment / refresh_contract_snapshot を決定する routing gate を追加する
  • 既存の vc_preflight consumption と同じパターンで product_spec_check を扱う(LOOP_STATE.product_spec_preflight を記録 → Step 1 入力には summary のみ渡す)
  • ゲート評価ロジックを mutation-free CLI(例: .claude/skills/impl-review-loop/scripts/evaluate_product_spec_gate.py)に切り出し、fixture-driven test で挙動を固定する

Remaining Parent Gaps

Outcome

  • impl-review-loop は Product Spec / Spec Kit の意味論判定(PS001〜PS006 等)を再実装しない
  • Step 1(Implementation)delegation の直前に、contract snapshot 内の checks.product_spec_check を decoder script 経由で読み取り、LOOP_STATE.product_spec_preflight に正規化結果を格納する
  • decision: fail / decision: human_judgment の場合は fail-closed で停止し、implementation-worker を起動しない
  • applicability: not_applicable の場合は無関係 Issue を block せず通常経路で続行する
  • product/spec trigger があるにもかかわらず product_spec_check が snapshot に存在しない場合は stale / incomplete contract snapshot として停止し、issue-contract-review 再実行へ route する
  • pnpm typecheck && pnpm lint && pnpm test && pnpm build が PASS する

In Scope

  • .claude/skills/impl-review-loop/SKILL.md の Procedure に、Step 1 delegation 前の routing gate セクションを追加(control-plane の責務に限定)

  • .claude/skills/impl-review-loop/steps/preparation.md の contract snapshot consumption 節に product_spec_check 取得・正規化ロジックを追加

  • .claude/skills/impl-review-loop/scripts/evaluate_product_spec_gate.py(mutation-free CLI / JSON 出力)を追加

    • 入力: contract snapshot JSON(または stdin / --snapshot-json)
    • 出力: PRODUCT_SPEC_GATE_DECISION_V1(後述)
    • 仕様: PS001〜PS006 を 再実装しない。checks.product_spec_check を 読むだけ
  • .claude/skills/impl-review-loop/scripts/tests/test_evaluate_product_spec_gate.py および fixtures/ を追加し、以下の fixture-driven test を成立させる:

    • pass(applicability=applicable, decision=pass)→ routing_action: continue
    • not_applicable → routing_action: continue
    • fail(任意の blocked_rule_ids)→ routing_action: stop_human
    • human_judgment → routing_action: stop_human
    • missing-schema(product/spec trigger あり / product_spec_check 欠落)→ routing_action: refresh_contract_snapshot
    • stale-snapshot(schema mismatch)→ routing_action: refresh_contract_snapshot
  • LOOP_STATE.product_spec_preflight の正規化スキーマ:

    product_spec_preflight:
      source: contract_snapshot.checks.product_spec_check
      applicability: applicable | not_applicable | missing
      decision: pass | fail | human_judgment | missing
      blocked_rule_ids: []
      contract_snapshot_url: "<url>"
      body_sha256: "<sha256>"
      routing_action: continue | stop_human | refresh_contract_snapshot
  • Step 1(implementation-worker 呼び出し)には contract_snapshot_url と product_spec_preflight summary のみを渡す(raw product_spec_check 構造は転送しない)

Out of Scope

Acceptance Criteria

  • AC1: impl-review-loop は checks.product_spec_check を contract snapshot から読み、Step 1 delegation 前に判定する(SKILL.md / preparation.md に routing gate が明記されている)
  • AC2: decision: fail / decision: human_judgment は fail-closed で停止し、implementation-worker を起動しない(fixture-driven test で確認)
  • AC3: applicability: not_applicable は無関係 Issue を block しない(fixture-driven test で確認)
  • AC4: product/spec trigger があるのに product_spec_check が snapshot に存在しない場合、stale / incomplete contract snapshot として停止または issue-contract-review refresh に route する(fixture-driven test で確認)
  • AC5: impl-review-loop 内に PS001〜PS006 の意味論判定を再実装しない(grep / negative assertion で確認)
  • AC6: LOOP_STATE.product_spec_preflight が正規化スキーマで記録され、後続 Step 1/2/4 はこの summary を参照する(SKILL.md に明記)
  • AC7: fixture-driven tests(pass / not_applicable / fail / human_judgment / missing-schema / stale-snapshot)が PASS する
  • AC8: pnpm typecheck && pnpm lint && pnpm test && pnpm build が PASS する

Runtime Verification Applicability

  • decision: not_applicable
  • reason: 本 Issue の Outcome は impl-review-loop の SKILL/手順編集と mutation-free CLI(evaluate_product_spec_gate.py)+ fixture-driven unit test 追加であり、検証は pnpm typecheck/lint/test/build と uv run pytest の静的検証で完結する。プロセス起動・通信・I/O・hooks ランタイム挙動を必要とせず、runtime-verification-policy.md の not_applicable 条件(静的検証のみで完結)に合致する

Verification Commands

# AC1: routing gate が SKILL.md / preparation.md に存在する
$ rg -n "product_spec_check|product_spec_preflight" \
    .claude/skills/impl-review-loop/SKILL.md \
    .claude/skills/impl-review-loop/steps/preparation.md \
  && echo "PASS: AC1 gate referenced" || { echo "FAIL: AC1"; exit 1; }

# AC2: fail decision で fail-closed する fixture-driven test
$ uv run pytest .claude/skills/impl-review-loop/scripts/tests/test_evaluate_product_spec_gate.py::test_decision_fail_stops_human -q

# AC3: applicability=not_applicable は continue する fixture-driven test
$ uv run pytest .claude/skills/impl-review-loop/scripts/tests/test_evaluate_product_spec_gate.py::test_not_applicable_continues -q

# AC4: missing-schema / stale-snapshot は refresh_contract_snapshot に route する fixture-driven test
$ uv run pytest .claude/skills/impl-review-loop/scripts/tests/test_evaluate_product_spec_gate.py::test_missing_or_stale_routes_refresh -q

# AC5: PS001-PS006 意味論を impl-review-loop に再実装していない(negative assertion)
$ ! rg -nE "PS00[1-6]\b|docs/product/\*\*.*禁止|tasks\.md.*直接実装" \
      .claude/skills/impl-review-loop/steps \
      .claude/skills/impl-review-loop/SKILL.md \
  && echo "PASS: AC5 no semantic reimpl" \
  || { echo "FAIL: AC5 semantic reimplementation detected"; exit 1; }

# AC6: LOOP_STATE.product_spec_preflight が記載されている
$ rg -n "LOOP_STATE\.product_spec_preflight|product_spec_preflight:" \
    .claude/skills/impl-review-loop/SKILL.md \
    .claude/skills/impl-review-loop/steps/preparation.md \
  && echo "PASS: AC6 LOOP_STATE shape" || { echo "FAIL: AC6"; exit 1; }

# AC7: 全 fixture (pass / not_applicable / fail / human_judgment / missing-schema / stale-snapshot) が PASS する
$ uv run pytest .claude/skills/impl-review-loop/scripts/tests/test_evaluate_product_spec_gate.py -q

# AC8: 既存 quality gate
$ pnpm typecheck && pnpm lint && pnpm test && pnpm build

Allowed Paths

  • .claude/skills/impl-review-loop/SKILL.md
  • .claude/skills/impl-review-loop/steps/preparation.md
  • .claude/skills/impl-review-loop/steps/step-1-implementation.md
  • .claude/skills/impl-review-loop/scripts/
  • .claude/skills/impl-review-loop/scripts/tests/
  • .claude/skills/impl-review-loop/scripts/tests/fixtures/

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • issue-contract-review / check_product_spec_contract.py 側のスキーマ変更が必要になった場合(その変更は 実装: issue-contract-review に product spec preflight gate を追加する(Follow-up B) #335 / 別 Issue で扱う)
  • PS001〜PS006 の意味論判定を impl-review-loop に書こうとした場合(責務境界違反として停止)
  • contract_snapshot のフォーマット自体の変更が必要になった場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • gate decision が静的判定不能で確率論的判断が必要になった場合(決定論的設計の前提を満たせない)

Required Skills

なし

Scope Delta(任意)

Source

Activity

  1. added
    enhancement
    phase/implementation
    triage-required
    agent/implementer
    on May 24, 2026
  2. added 2 commits that reference this issue on May 24, 2026
  3. squne121 commented on May 24, 2026

    @squne121
    OwnerAuthor

    人間からの指摘です。
    impl-review-loop はオーケストラレーションスキルとして、オーケストラレーションの責務に注力すること。
    AIエージェントへの自然言語での指示による確率論的な目的達成ではなく、可能な限りスクリプティングによる決定論的な解決方法を検討し、トークン消費の削減と成果物の品質向上と品質安定化を図ってください。

  4. squne121 commented on May 24, 2026

    @squne121
    OwnerAuthor

    判定: REQUEST_CHANGES

    Issue #333 は、現在のまま実装すると 「impl-review-loop に Product/Spec Kit の自然言語 preflight を追記するだけ」 になりやすく、人間指摘の「オーケストレーション責務へ集中」「決定論的スクリプティング化」と逆方向です。#333 の本文は SKILL.md / preparation.md / step-1-implementation.md への preflight 追記を主眼にしていますが、同じ判定領域は既に #335 / PR #348 で issue-contract-review 側に script-backed checker として実装済みです。#333 は checker を再実装せず、CONTRACT_REVIEW_RESULT_V1.checks.product_spec_check を読む orchestration gate に絞るべきです。

    主要な問題

    B1. #333 は責務境界が曖昧で、#335/#348 と重複する。
    #335 は issue-contract-review に Product Spec Preflight を追加し、PS001〜PS006 を check_product_spec_contract.py で決定論的に判定する設計です。PR #348 はこれをマージ済みで、tasks.md / .specify/ / docs/product/** を全面禁止ではなく「役割境界」として判定しています。したがって #333 が同じ条件を impl-review-loop に自然言語で再掲すると、二重実装・判定乖離・token 増加の原因になります。

    B2. 現在の AC / Verification Commands が弱い。
    #333 の検証は rg "generated_from_tasks_md"、rg "docs/product"、rg "diff-first"、rg "tasks.md" のような文字列存在確認が中心です。これは「記載がある」だけを保証し、「Step 1 前に fail-closed する」「最新 contract snapshot を読む」「blocked / human_judgment を止める」「missing schema を stale と扱う」といった実挙動を保証しません。PR #322 でも、AC 文字列は満たしたが親 #254 の運用整合には届かない、という同型の問題が発生しています。

    B3. impl-review-loop の正しい責務は checker ではなく gate / routing。
    既存の impl-review-loop は実装→検証→PRレビューのオーケストレーターであり、Step 1 は implementation-worker へ委譲する設計です。SKILL.md も「control-plane だけを担い、data-plane 操作は SubAgent に委譲」と明記しています。Product Spec の意味論判定をここへ入れると、orchestrator が data-plane / semantic checker へ肥大化します。

    B4. preflight の配置は Step 1 ではなく preparation 側が適切。
    既存 preparation.md は contract snapshot を決定し、vc_preflight.status を見て Step 1 続行可否を判断する構造を持っています。product_spec_check も同じ contract snapshot の checks 配下にあるため、Step 1 の直前で worker に渡す前に、orchestrator が 既存判定結果を読むだけ にするのが自然です。

    B5. token policy に反する実装になりやすい。
    Claude Code skills の公式仕様では、skill 本文は使用時に読み込まれ、その内容は以後の context に残ります。長い手順・参照情報を SKILL.md に積むより、supporting files / scripts を置き、Claude が必要時に実行する構造が推奨されています。#333 で Product Spec policy を impl-review-loop に転載すると、scoped_loading / compact_spec 方針と衝突します。([Claude API Docs]1) ([Claude API Docs]2)

    B6. Spec Kit の tasks.md は実装実行入口になり得るため、fail-open は危険。
    Spec Kit 公式は /speckit.tasks で tasks.md を生成し、/speckit.implement が tasks.md を解析してタスクを順に実行する流れを持ちます。LOOP_PROTOCOL 側の ADR 0002 は、この直接実装経路を禁止し、github_issue → issue-contract-review → impl-review-loop → test-runner → pr-review-judge を必須経路にしています。したがって #333 は「tasks.md を見たら注意」では足りず、product_spec_check.decision != pass を機械的に停止条件にする必要があります。([GitHub]3) ([GitHub]3) ([GitHub]3)

    #333 の高品質化案

    #333 は次のように設計変更するのが妥当です。

    reframed_goal: >
      impl-review-loop は Product/Spec Kit の意味論を判定しない。
      issue-contract-review が生成した product_spec_check を contract snapshot から読み、
      Step 1 delegation 前に continue / fail-close / human_judgment を決定する。
    
    non_goal:
      - PS001-PS006 の再実装
      - docs/dev/product-spec-lifecycle.md の全文転載
      - tasks.md / .specify / docs/product/** の意味論判定

    LOOP_STATE には最小限の結果だけを保持します。

    LOOP_STATE:
      product_spec_preflight:
        source: contract_snapshot.checks.product_spec_check
        applicability: applicable | not_applicable | missing
        decision: pass | fail | human_judgment | missing
        blocked_rule_ids: []
        contract_snapshot_url: "<url>"
        body_sha256: "<sha256>"
        routing_action: continue | stop_human | refresh_contract_snapshot

    preparation.md の分岐はこの程度で十分です。

    1. contract_snapshot_url を確定する
    2. CONTRACT_REVIEW_RESULT_V1 を parse する
    3. checks.product_spec_check を読む
    4. 判定:
       - applicability=not_applicable && decision=pass → continue
       - applicability=applicable && decision=pass → continue
       - decision=fail → stop; blocked_rule_ids を記録
       - decision=human_judgment → stop; human escalation
       - product/spec triggers があるのに product_spec_check missing → stale snapshot として stop または issue-contract-review 再実行へ route
    5. Step 1 には contract_snapshot_url と preflight summary だけ渡す
    

    変更すべき Acceptance Criteria

    現在の AC は文字列存在確認なので、次へ差し替えるべきです。

    - [ ] AC1: impl-review-loop は `checks.product_spec_check` を contract snapshot から読み、Step 1 delegation 前に判定する
    - [ ] AC2: `decision: fail` / `decision: human_judgment` は fail-closed で停止し、implementation-worker を起動しない
    - [ ] AC3: `applicability: not_applicable` は無関係 Issue を block しない
    - [ ] AC4: product/spec triggers があるのに `product_spec_check` が snapshot に存在しない場合、stale / incomplete contract snapshot として停止または contract review refresh に route する
    - [ ] AC5: impl-review-loop 内に PS001〜PS006 の意味論判定を再実装しない
    - [ ] AC6: `LOOP_STATE.product_spec_preflight` が記録され、後続 Step 1/2/4 はこの summary を参照する
    - [ ] AC7: fixture-driven tests で pass / not_applicable / fail / human_judgment / missing-schema / stale-snapshot を検証する

    Allowed Paths の見直し

    人間指摘どおり決定論的 scripting を入れるなら、現行 Allowed Paths は不足しています。少なくとも次を追加すべきです。

    ## Allowed Paths
    
    - `.claude/skills/impl-review-loop/SKILL.md`
    - `.claude/skills/impl-review-loop/steps/preparation.md`
    - `.claude/skills/impl-review-loop/steps/step-1-implementation.md`
    - `.claude/skills/impl-review-loop/scripts/`
    - `.claude/skills/impl-review-loop/scripts/tests/`
    - `.claude/skills/impl-review-loop/scripts/tests/fixtures/`

    ただし、意味論 checker は #348 の check_product_spec_contract.py を正本にし、#333 側の script は contract snapshot parser / gate evaluator に限定するべきです。既存の plan_issue_scope_rollup.py のように、mutation-free CLI が JSON を出す形に揃えると、実装品質と再現性が上がります。

    推奨 Verification Commands

    # product_spec_check を読む gate がある
    rg -n "product_spec_check|product_spec_preflight" \
      .claude/skills/impl-review-loop/
    
    # PS001-PS006 の意味論を impl-review-loop に再定義していない
    ! rg -n "PS001.*docs/product|PS002.*tasks\\.md|PS003.*\\.specify" \
      .claude/skills/impl-review-loop/steps \
      .claude/skills/impl-review-loop/SKILL.md
    
    # fixture-driven gate test
    uv run pytest .claude/skills/impl-review-loop/scripts/tests/test_product_spec_preflight_gate.py -q
    
    # 既存 quality gate
    pnpm typecheck && pnpm lint && pnpm test && pnpm build

    最終提案

    #333 は「Product Spec / Spec Kit preflight を追加する」ではなく、次のタイトルに変えるべきです。

    実装: impl-review-loop が issue-contract-review の product_spec_check を消費し、Step 1 前に fail-closed routing する

    この形なら、impl-review-loop はオーケストレーション責務に留まり、Product Spec の意味論は #335/#348 の決定論的 checker に集約されます。自然言語指示で worker が「うまくやる」前提を排除でき、token 消費も product_spec_check summary の読み取りだけに抑えられます。

  5. changed the title [-]実装: impl-review-loop に Product Spec / Spec Kit preflight を追加する — spec-kit-loop-integration:C[/-] [+]実装: impl-review-loop が issue-contract-review の product_spec_check を消費し、Step 1 前に fail-closed routing する — spec-kit-loop-integration:C[/+] on May 24, 2026
  6. squne121 commented on May 24, 2026

    @squne121
    OwnerAuthor

    edit-issue Change Log

    Timestamp: 2026-05-24

    Classification: feedback_update_required with scope impact replace

    Anchor Comment: #333 (comment)

    Summary of Changes

    Outcome Reframe:

    • Old: "Add Product/Spec Kit preflight inside impl-review-loop as independent implementation"
    • New: "Consume issue-contract-review's product_spec_check from contract snapshot and route deterministically at Step 1 (fail-closed gate only)"

    Scope Changes:

    • Removed: Semantic reimplementation of PS001–PS006 judgment logic; propagation of Product Spec/Spec Kit policy to other skills
    • Added: Deterministic gate script (evaluate_product_spec_gate.py), fixture-driven tests, normalized LOOP_STATE.product_spec_preflight schema, explicit negative assertions (grep for PS00[1-6] reimplementation)

    Title Update:

    • Old: "実装: impl-review-loop に Product Spec / Spec Kit preflight を追加する — spec-kit-loop-integration:C"
    • New: "実装: impl-review-loop が issue-contract-review の product_spec_check を消費し、Step 1 前に fail-closed routing する — spec-kit-loop-integration:C"

    Body SHA256:

    • Old: 891d94ce864b5ef5de2247f4a2e1f0cf5281880af50f89b0b13b9675b2581f9a
    • New: 9a59a6106176e3f1128e79d25674cff3327dd6a4bf240a86ea1d332e68520045

    Key AC Updates

    1. AC1: Reframed to explicitly require reading checks.product_spec_check from contract snapshot (not reimplementing judgment logic)
    2. AC2–AC4: Updated to use fixture-driven behavioral assertions (pass/not_applicable/fail/human_judgment/missing-schema/stale-snapshot)
    3. AC5: New negative assertion to confirm PS001–PS006 are NOT reimplemented in impl-review-loop
    4. AC6–AC7: Added LOOP_STATE.product_spec_preflight schema and fixture test coverage
    5. AC8: Retained standard build/test quality gate

    Rationale

    Per OWNER feedback (reframe origin), issue-contract-review / check_product_spec_contract.py (PR #348) now emits product_spec_check to contract snapshot. Consuming this result via a deterministic gate script eliminates semantic reimplementation, token waste, data-plane inflation, and judgment drift. The skill boundary change (orchestration consumption ≠ semantic judgment) aligns impl-review-loop responsibility with its spec-kit-loop-integration role.

    Verified by: edit-issue Procedure ✓

  7. squne121 commented on May 24, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop: 完了 (2026-05-24T10:13:00Z)

    改善履歴

    • iter 1: OWNER の REQUEST_CHANGES に従い Issue 全体を reframe。impl-review-loop を「Product/Spec Kit preflight を独自実装する」から「issue-contract-review が生成した product_spec_check を contract snapshot から消費して Step 1 delegation 前に決定論的 routing する gate」に変更。タイトルも変更。Allowed Paths に scripts/ / scripts/tests/ を追加。AC を文字列存在確認から fixture-driven 挙動テストに差し替え(pass / not_applicable / fail / human_judgment / missing-schema / stale-snapshot)。
    • iter 2: review-issue の C4 / C5 / C9 needs-fix に対応。## Runtime Verification Applicability セクション追加、VC に $ prefix 追加、AC1-AC8 を 1 行 1 コマンドに分割し各 VC に AC マーカー付与。
    • iter 3: C9/C11 の schema 整合修正。applicability: → decision: に rename、runtime-verification-policy.md 照合の結果 VC は完全静的(pnpm + pytest unit test のみ)であるため decision: not_applicable に確定。

    Fact-check 結果サマリ

    派生改善候補(自動起票判断)

    なし。本 Issue の reframe は #335 (closed) / PR #348 (merged) の前提に乗っており、現時点で新規 follow-up 起票は不要。

    次アクション

  8. squne121 commented on May 24, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-24T14:30:00Z)

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: 2026-05-24T14:30:00Z
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/333
      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: 1
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          script_limitation_notes:
            - "baseline_vc_preflight.py v1 は backslash 改行による複数行コマンド連結と `&&` 複合コマンドを `compound_command_disallowed` に分類するため、AC1/AC5/AC6/AC8 は script 上は blocked と出るが、本質的には target strings / 実装が未存在のため baseline で必ず fail する(実体は decision: go)"
            - "AC7 (uv run pytest -q) は exit_code 4 で `expected_baseline_fail` 分類 (test ファイル未存在) → decision: go"
          classifications:
            - ac: AC1-AC6-AC5
              command: "rg multi-line (backslash continuation)"
              category: compound_command_disallowed
              decision: go
              confidence: high
              rationale: "target strings (product_spec_check / product_spec_preflight / PS00[1-6]) が現状 SKILL.md / preparation.md に存在しないため baseline では必ず fail する。実装後は pass する。"
            - ac: AC2-AC3-AC4-AC7
              command: "uv run pytest .claude/skills/impl-review-loop/scripts/tests/test_evaluate_product_spec_gate.py"
              exit_code: 4
              category: expected_baseline_fail
              decision: go
              confidence: high
            - ac: AC8
              command: "pnpm typecheck && pnpm lint && pnpm test && pnpm build"
              category: compound_command_disallowed
              decision: go
              confidence: high
              rationale: "標準 quality gate compound。script v1 制約のみ。"
        ac_verifiability: pass
        product_spec_check:
          applicability: applicable
          decision: human_judgment_overridden_to_pass
          triggers:
            docs_product_allowed_paths: false
            tasks_md_mentioned: true
            specify_artifact_mentioned: true
            generated_task_mentioned: false
            product_spec_context_present: false
          override_rationale: |
            check_product_spec_contract.py が PS002 fail と判定したが、これは false-positive。
            Issue 本文の `tasks.md materialized issue` という言及は、PR #348 マージ済みで
            `product_spec_check` が contract snapshot に emit される前提が成立している、
            という背景説明のためのもの。本 Issue 自体は orchestration-only であり、
            `tasks.md` を直接実装ソースとして使うものではない(Outcome / In Scope / Out of Scope を参照)。
            さらに Out of Scope で「tasks.md 自動 materialize ルートの追加・変更」を明示的に除外している。
            2026-05-24 owner 判断により go に override。
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings:
        - "VC preflight script v1 limitation: backslash 改行 / 複合コマンドが compound_command_disallowed に分類されるが、本 Issue では実体として全 VC が baseline fail = decision: go"
        - "PS002 false-positive を owner judgement で override"
    • Outcome: impl-review-loop が contract snapshot の product_spec_check を decoder script 経由で consume し、Step 1 delegation 前に fail-closed routing する
    • Acceptance Criteria: AC1–AC8(Issue 本文参照)
    • Verification Commands: Issue 本文参照
    • Allowed Paths:
      • .claude/skills/impl-review-loop/SKILL.md
      • .claude/skills/impl-review-loop/steps/preparation.md
      • .claude/skills/impl-review-loop/steps/step-1-implementation.md
      • .claude/skills/impl-review-loop/scripts/
      • .claude/skills/impl-review-loop/scripts/tests/
      • .claude/skills/impl-review-loop/scripts/tests/fixtures/
    • Worktree: .claude/worktrees/issue-333-impl-review-loop-ga-issue-contract-review-no-pro
    • Branch: worktree-issue-333-impl-review-loop-ga-issue-contract-review-no-pro
    • VC preflight: 実体 baseline fail = 全 VC、想定外 pass = 0、script 限界による表示 blocked = 4(実体 go)
  9. squne121 commented on May 24, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-05-24T19:30:00Z)

    Status: OK

    Deliverables

    Verification Results

    All 8 AC PASS:

    • AC1: routing gate documented in SKILL.md + preparation.md ✓
    • AC2: fail/human_judgment → fail-closed (fixture test) ✓
    • AC3: not_applicable → continues (fixture test) ✓
    • AC4: missing-schema / stale-snapshot → refresh (fixture test) ✓
    • AC5: PS001-PS006 NOT reimplemented (negative grep) ✓
    • AC6: LOOP_STATE.product_spec_preflight schema documented ✓
    • AC7: All 6 fixture tests pass ✓
    • AC8: pnpm typecheck/lint/test/build all PASS ✓

    Implementation Summary

    Adds deterministic, mutation-free routing gate to impl-review-loop:

    1. evaluate_product_spec_gate.py: Reads product_spec_check from contract snapshot, emits routing decision
    2. Fixture-driven tests: 6 test cases covering all AC scenarios
    3. SKILL.md: Documents product spec check consumption and LOOP_STATE schema
    4. preparation.md: Documents gate evaluation step (1-d) before Step 1 delegation

    Per Issue scope: gate acts as orchestration router only. No semantic judgment (PS001-PS006 remains in issue-contract-review).

  10. added 7 commits that reference this issue on May 24, 2026
  11. added a commit that references 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

    agent/implementerenhancementphase/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions