Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "impl-review-loop が issue-contract-review status: blocked を受けた際、blocked reason を 3 分類し simple_contract_hygiene_fix では worker が自律修正・再開できる手順を preparation.md に明文化する"
change_kind: workflowParent Issue
none
Parent Goal Ref
- Goal: なし(単独改善)
- Desired Destination: なし
Current Validated Scope
.claude/skills/impl-review-loop/steps/preparation.mdのvc_preflight.status: blocked処理に、CONTRACT_REVIEW_RESULT_V1.checks.vc_preflight.classifications[]を消費して blocked reason を 3 分類し、simple_contract_hygiene_fixでは worker 自律修正フロー(issue-refinement-loop経由 Issue 本文更新 →issue-contract-review再実行 →status: go確認後再開)を明文化.claude/skills/impl-review-loop/SKILL.mdのvc_preflight.status: blocked停止パスをintake_gate_failed.vc_preflight.contract_blocked_reason語彙に接続し、#564の fail-only intake gate との整合を明記
Remaining Parent Gaps
なし
Outcome
.claude/skills/impl-review-loop/steps/preparation.md が更新され、issue-contract-review status: blocked 受信時に blocked reason を simple_contract_hygiene_fix / contract_refinement_required / human_decision_required の 3 種に分類し、simple_contract_hygiene_fix の場合は ClaudeCode が推奨修正案と理由を提示して自律修正後に issue-contract-review を再実行できる手順が明文化された状態で、pnpm typecheck / lint / test / build が全て PASS している。
Background
Issue #543 の impl-review-loop を実行した際、issue-contract-review が status: blocked を返し、preparation ステップで停止した。停止理由は AC4 の VC rg "tested_commit:" docs/playtest/m2-combat-mvp.md が baseline で既に pass していたこと(既存 frontmatter に tested_commit: フィールドが存在)。
停止時の出力は「修正後に impl-review-loop 543 を再実行してください」であり、修正主体を人間と想定した表現になっていた。impl-review-loop では修正主体は ClaudeCode / worker であるべきで、人間に対しては方針選択の承認か、自律修正の可否を問うべきである。
現在 preparation.md の blocked 処理は「停止し termination_reason: human_escalation を記録して人間判断へ送る」のみで、blocked reason の分類・推奨修正案・自律再開手順が規定されていない。
In Scope
.claude/skills/impl-review-loop/steps/preparation.mdにvc_preflight.status: blocked時の blocked reason 3 分類を追加simple_contract_hygiene_fix: 以下の全条件を満たす場合のみ許容される hygiene 修正- AC テキストが変更されない
- Allowed Paths が変更されない
- 対象の evidence object が変更されない
- VC は意図した post-change セクション/スコープへの絞り込みのみ(意味論の変更なし)
- blocked reason は
vc_preflight.classifications[]から決定論的に再現できる - product / spec / playtest / artifact 充足性判断を含まない
- Issue 本文変更は
issue-refinement-loop経由のみ - 新しい body_sha256 に対する fresh
issue-contract-reviewがstatus: goを返す - (例)
preflight-scope: pr_review_only付与(VC 意味論変更なし) - (負例)動画証跡 URL、環境情報、
tested_commit由来、accepted/deferred 判定はsimple_contract_hygiene_fixに含めない
contract_refinement_required: AC の意味・VC の本質・scope が変わる修正(issue-refinement-loop推奨)human_decision_required: 仕様判断・playtest 証跡正当性・プロダクト方針判断が必要なケース
- 各分類に対応するエスカレーション出力仕様(推奨案・理由・代替案・自律実行可否)を preparation.md に追加
simple_contract_hygiene_fixの場合: impl-review-loop orchestrator(preparation step)が推奨修正案と理由を提示し、issue-refinement-loop経由で Issue 本文を修正したうえでissue-contract-reviewを再実行しstatus: goを確認してから再開する手順を明文化(control-plane が直接 Issue 本文を mutation しない)contract_refinement_requiredの場合:issue-refinement-loopへの差し戻しを推奨する手順を明文化- SKILL.md の
vc_preflight.status: blocked時の停止パスを、実装: issue-refinement-loop と impl-review-loop の implementation-ready handoff を contract gate 化する #564 のintake_gate_failedvocabulary に接続する形で更新する(human_escalationを置換するのではなく、intake_gate_failed.vc_preflight.contract_blocked_reasonとして 3 分類を統合する) simple_contract_hygiene_fix/contract_refinement_required/human_decision_requiredを判定するための decision table(CONTRACT_REVIEW_RESULT_V1.checks.vc_preflight.classifications[]からの入力条件→分類 matrix)を preparation.md に明示する- decision table は
CONTRACT_REVIEW_RESULT_V1.checks.vc_preflight.classifications[]の既存 category を 消費して routing するのみであり、新規 classifier logic の実装・再実装を行わない(classifier 責務は 実装: issue-contract-review の VC preflight に trivially-pass パターン検出を追加する #201 が保有する) CONTRACT_BLOCKED_ROUTING_V1構造化出力スキーマを preparation.md に定義する:CONTRACT_BLOCKED_ROUTING_V1: issue: int source_contract_review_comment_url: string body_sha256_before: string vc_preflight_status: blocked | human_judgment classifications: - ac_id: string category: string original_vc: string observed_baseline_result: pass | fail | unknown contract_blocked_reason: simple_contract_hygiene_fix | contract_refinement_required | human_decision_required autonomous_fix_allowed: boolean required_route: issue-refinement-loop | human_escalation proposed_issue_body_patch_summary: string rerun_required: tool: issue-contract-review require_status: go require_body_sha256_after: string
Out of Scope
issue-contract-review側の baseline VC 判定ロジック変更(実装: issue-contract-review の VC preflight に trivially-pass パターン検出を追加する #201 が扱う)- AC/VC 設計ガイドラインの変更
issue-refinement-loop自体の変更- 分類の自動化スクリプト追加(手順の明文化のみ)
- contract semantics を worker が単独で変更できる仕組みの追加
human_escalationの置換(3 分類はintake_gate_failedの subpath として追加するのみ)
Acceptance Criteria
- AC1: preparation.md に
simple_contract_hygiene_fixの定義と worker 自律修正フローが明文化されている - AC2: preparation.md に
contract_refinement_requiredの定義と issue-refinement-loop 差し戻し手順が明文化されている - AC3: preparation.md に
human_decision_requiredの定義が明文化されている - AC4:
pnpm typecheckが PASS する(TypeScript 型エラーなし) - AC5:
pnpm lintが PASS する(ESLint エラーなし) - AC6:
pnpm testが PASS する(Vitest 全件 PASS) - AC7:
pnpm buildが PASS する(ビルド成功) - AC8: preparation.md に 3 分類への decision table(入力条件→分類 matrix)が明示されている
- AC0:
impl-review-loopが通常入口でissue-contract-reviewを自動実行しないことをSKILL.mdとpreparation.mdの両方で明記し、実装: issue-refinement-loop と impl-review-loop の implementation-ready handoff を contract gate 化する #564 の intake gate 仕様との齟齬を解消する - AC9: preparation.md に
CONTRACT_BLOCKED_ROUTING_V1構造化出力スキーマを定義し、source_contract_review_comment_url/body_sha256_before/contract_blocked_reason/autonomous_fix_allowed/required_route/rerun_requiredを必須フィールドとする - AC10: decision table に
simple_contract_hygiene_fixの positive / negative examples を含める(positive:preflight-scope: pr_review_only付与;negative: 動画証跡 URL、環境情報、tested_commit由来、accepted/deferred 判定) - AC11: Issue body の変更は control-plane から直接行わず
issue-refinement-loop経由に限定する。変更後は fresh body_sha256 に対するissue-contract-review status: goが必須(preparation.md に明記) - AC12: decision table は
vc_preflight.classifications[]の既存 category を routing input とし、classifier logic の新設・再実装を行わない(preparation.md に明記) - AC13: PR body に Safety Claim Matrix を含める(control-plane が Issue body を直接 mutate しない / 権限・認証・sandbox・hook 実行範囲を拡張しない / autonomous fix は contract hygiene のみ /
human_decision_requiredでは必ず停止する) - AC14:
human_decision_requiredの場合は worker autonomous fix / retry / resume を禁止し、必ず停止する(preparation.md に明記)
Verification Commands
# AC1
$ rg "simple_contract_hygiene_fix" .claude/skills/impl-review-loop/steps/preparation.md
# AC2
$ rg "contract_refinement_required" .claude/skills/impl-review-loop/steps/preparation.md
# AC3
$ rg "human_decision_required" .claude/skills/impl-review-loop/steps/preparation.md
# AC4
# preflight-scope: runtime_only
$ pnpm typecheck
# AC5
# preflight-scope: runtime_only
$ pnpm lint
# AC6
# preflight-scope: runtime_only
$ pnpm test
# AC7
# preflight-scope: runtime_only
$ pnpm build
# AC8
$ rg "decision.table|分類.*matrix|contract_blocked_reason.*class" .claude/skills/impl-review-loop/steps/preparation.md
# AC0
$ rg "issue-contract-review.*自動実行しない|auto.*run.*deprecated|fail-only.*gate" .claude/skills/impl-review-loop/SKILL.md
$ rg "contract_blocked_reason|vc_preflight_contract_blocked" .claude/skills/impl-review-loop/steps/preparation.md
# AC9
$ rg "CONTRACT_BLOCKED_ROUTING_V1" .claude/skills/impl-review-loop/steps/preparation.md
$ rg "source_contract_review_comment_url|body_sha256_before|autonomous_fix_allowed|required_route|rerun_required" .claude/skills/impl-review-loop/steps/preparation.md
# AC10
$ rg "positive.*example|negative.*example|正例|負例|preflight-scope.*pr_review_only" .claude/skills/impl-review-loop/steps/preparation.md
# AC11
$ rg "require_body_sha256_after|本文変更は.*issue-refinement-loop 経由" .claude/skills/impl-review-loop/steps/preparation.md
# AC12
$ rg "classifier.*logic.*新設.*禁止|routing.*のみ|classifications\[\].*消費" .claude/skills/impl-review-loop/steps/preparation.md
# AC13
$ rg "Safety Claim Matrix" .claude/skills/impl-review-loop/steps/preparation.md
# AC14
$ rg "human_decision_required.*停止|autonomous.*fix.*禁止" .claude/skills/impl-review-loop/steps/preparation.mdAllowed Paths
.claude/skills/impl-review-loop/steps/preparation.md.claude/skills/impl-review-loop/SKILL.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
issue-contract-review側のロジック変更が必要と判明した場合(実装: issue-contract-review の VC preflight に trivially-pass パターン検出を追加する #201 に委ねる)
Required Skills
なし
Scope Delta(任意)
N/A
Runtime Verification Applicability
本 Issue は .claude/skills/impl-review-loop/steps/preparation.md と .claude/skills/impl-review-loop/SKILL.md のみを変更するドキュメント更新です。実行時の新規ランタイム動作は追加されません。
decision: not_applicable
reason: "Markdown documentation-only change. No runtime behavior added or changed."Delivery Rule
1 Issue = 1 PR、worktree 作業、Draft PR 既定。
Activity
squne121 commentedon Jun 2, 2026
結論: REQUEST_CHANGES / 実装着手は止めるべき
#569 は方向性自体は妥当です。#543 で
tested_commit:の VC が baseline で既に pass し、impl-review-loopが「修正後に再実行してください」という人間向け停止に落ちた、という問題設定は正しいです。#569 はこれをsimple_contract_hygiene_fix / contract_refinement_required / human_decision_requiredの 3 分類で扱う設計にしようとしています。(GitHub)ただし、現 Issue は 自分自身が同じ contract preflight 問題を再発させる形 になっており、さらに #560 / #564 と責務境界が衝突しています。このまま ClaudeCode に実装させると、また
issue-contract-review status: blockedか、control-plane が data-plane 作業を抱える設計劣化を起こす可能性が高いです。Blocker 1: #569 自身の VC が baseline pass し得る。
preflight-scopeがない#569 の Verification Commands は AC1〜AC3 の
rgに加えて、AC4〜AC7 にpnpm typecheck / lint / test / buildをそのまま並べています。(GitHub)しかし #560 では、VC baseline 差分性と
preflight-scopemarker の per-command 規約を導入し、runtime-only の確認は各$コマンド直前に明示する前提になっています。(GitHub)このため、#569 は最低限こう直すべきです。
AC1〜AC3 も、baseline で tokens がまだ存在しないことを期待するなら
runtime_onlyではなく差分 VC として成立します。ただし実装後に token だけを入れても意味論が満たされたとは限らないため、後述の matrix / examples の検証が必要です。Blocker 2: 「worker が Issue 本文を修正する」の actor が未定義
#569 は
simple_contract_hygiene_fixの場合に “worker が Issue 本文を修正し issue-contract-review を再実行する” としています。(GitHub)一方、現在の
impl-review-looppreparation はvc_preflight.statusがpassの場合だけ implementation-worker を起動し、blocked/human_judgmentは停止してhuman_escalationに送る設計です。(<a href="https://raw.githubusercontent.com/squne121/loop-protocol/main/.claude/skills/impl-review-loop/steps/preparation.md" title="" | sed 's/.: //; s/[^a-zA-Z0-9]/-/g; s/--/-/g; s/^-//; s/-$//' | tr A-Z a-z | cut -c1-40)WORKTREE=".claude/worktrees/issue-${issue_number}-${SLUG}"
BRANCH="worktree-issue-${issue_number}-${SLUG}"
既存衝突確認
git worktree list | grep "$WORKTREE" && echo "[WARN] worktree 既存" || echo "[OK] worktree 未作成"
git branch --list "$BRANCH" && echo "[WARN] branch 既存" || echo "[OK] branch 未作成"
routing_action が
stop_humanまたはrefresh_contract_snapshotの場合は、ループを開始せず人間判断へ escalate する。5. 外部仕様調査スキップ判断(任意)
internal-only 変更(
src/state/src/systems内の純粋ロジック変更等)ならexternal_research_skip_basisに理由を記録してスキップ。外部仕様が絡む場合は
gemini-cli-headless-delegationを先行起動して情報を集める。出力
LOOP_STATE 初期値を会話履歴に明示記録し、Step 1(Implementation)へ進む。
">GitHub)
つまり、blocked 時点では通常の implementation-worker はまだ起動されません。ここで “worker” とだけ書くと、実際には orchestrator / main session が Issue 本文編集や
gh issue editを実行する余地が残ります。これは #564 の「control-plane が作業内容や gate 判断を抱えず、worker / deterministic checker 側に責務を寄せる」という設計方針と衝突します。(GitHub)修正方針は二択です。
既存
issue-refinement-loopに戻すsimple_contract_hygiene_fixでも、Issue 本文 mutation は issue-refinement 系 worker の責務に寄せる。新しい
contract-hygiene-workerを定義するただし 実装: impl-review-loop の contract blocked 時エスカレーションを blocked reason 3 分類と worker 自律修正手順に置換する #569 の Allowed Paths は preparation.md と SKILL.md だけなので、subagent 定義や hook 追加が必要なら 実装: impl-review-loop の contract blocked 時エスカレーションを blocked reason 3 分類と worker 自律修正手順に置換する #569 のスコープを広げるか、別 Issue に分ける必要があります。現在の Stop Conditions は nested SubAgent delegation を止めるため、worker 導入とも矛盾します。(GitHub)
Blocker 3: #564 の
intake_gate_failedと #569 のhuman_escalation更新が衝突する#564 は
impl-review-looppreparation にintake_gate_failedを独立したtermination_reasonとして追加し、missing_contract_go / metadata_not_ready / stale_contract_review / body_snapshot_mismatchのサブ理由を持たせる設計です。(GitHub)#569 は SKILL.md の
human_escalation説明を新分類に沿って更新するだけなので、#564 の状態体系を取り込まないと termination taxonomy が二重化します。(GitHub)推奨は、#569 の分類を
human_escalationの置換ではなく、次のように #564 側の intake gate vocabulary に接続することです。Blocker 4: 3分類の判定基準が LLM 任せで、決定論的でない
#569 は分類自動化スクリプト追加を Out of Scope にしています。(GitHub)
それ自体は許容できますが、ならば preparation.md に 既存
CONTRACT_REVIEW_RESULT_V1.checks.vc_preflight.classifications[]から 3分類へ落とす決定表 が必要です。現在の preparation はvc_preflight.classifications[]を正本として参照する設計なので、分類もこの既存データから派生させるべきです。(<a href="https://raw.githubusercontent.com/squne121/loop-protocol/main/.claude/skills/impl-review-loop/steps/preparation.md" title="" | sed 's/.: //; s/[^a-zA-Z0-9]/-/g; s/--/-/g; s/^-//; s/-$//' | tr A-Z a-z | cut -c1-40)WORKTREE=".claude/worktrees/issue-${issue_number}-${SLUG}"
BRANCH="worktree-issue-${issue_number}-${SLUG}"
既存衝突確認
git worktree list | grep "$WORKTREE" && echo "[WARN] worktree 既存" || echo "[OK] worktree 未作成"
git branch --list "$BRANCH" && echo "[WARN] branch 既存" || echo "[OK] branch 未作成"
routing_action が
stop_humanまたはrefresh_contract_snapshotの場合は、ループを開始せず人間判断へ escalate する。5. 外部仕様調査スキップ判断(任意)
internal-only 変更(
src/state/src/systems内の純粋ロジック変更等)ならexternal_research_skip_basisに理由を記録してスキップ。外部仕様が絡む場合は
gemini-cli-headless-delegationを先行起動して情報を集める。出力
LOOP_STATE 初期値を会話履歴に明示記録し、Step 1(Implementation)へ進む。
">GitHub)
最低限、こういう表が必要です。
Claude Code 公式ドキュメント上も、Markdown の指示は挙動を形成するもので、強制層ではありません。強制したい場合は settings / hooks 側でブロックする必要があります。(Claude API Docs)
Blocker 5: Issue 本文 mutation 後の stale snapshot 無効化が不足
#560 は、human_escalation 後に Issue 本文を 1 文字でも変更した場合、prior contract-review result は stale になり、full contract review 再実行が必要だと定義しています。(GitHub)
#564 も body_sha256 と comment freshness を intake gate に入れ、古い
status: goを無効化する設計です。(GitHub)#569 は “Issue 本文を修正し issue-contract-review を再実行” とは書いていますが、以下が足りません。
Major: #543 の例を
simple_contract_hygiene_fixと断定するのは危険#543 は人間の manual playtest 証跡を
docs/playtest/m2-combat-mvp.mdに追加する Issue で、AI / Playwright の自動代替は不可と明記されています。(GitHub)その中で
tested_commit:が既存 frontmatter にあるため baseline pass した、という問題は単なるpreflight-scope: pr_review_only付与で済むとは限りません。(GitHub)より安全な修正は、VC を 対象セクション限定 にすることです。
preflight-scope: pr_review_onlyは「存在確認が baseline 差分性を持てないが、PR reviewer が変更 diff 上で確認すればよい」場合に限るべきです。人間 playtest 証跡の正当性や実施事実はhuman_decision_requiredに寄せる方が安全です。Major: AC が token grep だけで、workflow 品質を検証していない
#569 の AC1〜AC3 は
simple_contract_hygiene_fixなどの token が preparation.md に存在することだけを検証しています。(GitHub)これは「3分類が運用できる」「worker mutation が安全」「body_sha256 stale を扱える」「#543 型の停止が再発しない」を検証しません。
#564 は同種の handoff 問題に対し、#561 型の regression fixture / integration test を追加する方針を取っています。(GitHub)
#569 も docs-only にこだわるなら、最低限 preparation.md 内に
decision tableとworked examplesを AC 化すべきです。より堅い実装なら.claude/skills/impl-review-loop/tests/を Allowed Paths に加えて fixture 化するべきです。外部仕様調査からの実装上の示唆
Claude Code skills は prompt-based で、Claude に詳細手順を与えてツール orchestration させる仕組みです。つまり skill 文書だけでは deterministic enforcement にはなりません。(Claude API Docs)
一方、Claude Code hooks は
PreToolUse/PostToolUse/Stop/SubagentStopなどで tool call や停止をブロックでき、JSON decision や exit code 2 による制御が可能です。(Claude API Docs)subagent には frontmatter hooks や project-level
SubagentStart/SubagentStophooks も設定できます。(Claude API Docs)従って #569 の高品質化方向は、単なる prose 追加ではなく、少なくとも将来 Issue として次を切ることです。
body_sha256 mismatch 時は必ず issue-contract-review rerun
Claude Code のセキュリティモデルも、編集・コマンド実行は権限ベースで扱われ、write scope や許可ルールを明示する前提です。(Claude API Docs)
推奨する #569 修正方針
実装: impl-review-loop の contract blocked 時エスカレーションを blocked reason 3 分類と worker 自律修正手順に置換する #569 を 実装: issue-refinement-loop と impl-review-loop の implementation-ready handoff を contract gate 化する #564 後続または 実装: issue-refinement-loop と impl-review-loop の implementation-ready handoff を contract gate 化する #564 依存 と明記する。
human_escalation置換ではなくintake_gate_failed.vc_preflight.contract_blocked_reasonとして統合する。Verification Commands に
preflight-scopeを付ける。特にpnpm typecheck/lint/test/buildはruntime_only。“worker” を明確化する。
implementation-workerではなく、contract-hygiene-workerまたはissue-refinement-loopに route する。blocked 時に orchestrator が直接 Issue 本文を書き換えない。simple_contract_hygiene_fixの自律修正許可条件を限定する。許可してよいのは
preflight-scope付与、section-scoped VC、明らかな grep 対象の限定などに限る。AC / Outcome / Allowed Paths / acceptance semantics 変更は不可。body mutation 後の
body_sha256stale invalidation と latestCONTRACT_REVIEW_RESULT_V1.status == go再取得を必須化する。test(#483): manual playtest の実施証跡を docs/playtest/m2-combat-mvp.md に追加する #543 型 example を明記する。
tested_commit:はpr_review_onlyではなく、まず## Human Playtest Evidenceセクション限定 VC に修正する例を載せる。人間 playtest 実施事実の判断はhuman_decision_required。AC を token grep から decision table / examples / stale handling の存在確認へ強化する。
そのまま Issue コメントに投げるなら
#569 は 発想は正しいが、現在の契約は実装準備未完了 です。修正後に
## 結論: **REQUEST_CHANGES / 実装着手は止めるべき**issue-contract-reviewを再実行してstatus: goを得てからimpl-review-loopに渡すべきです。#569 は方向性自体は妥当です。#543 で
tested_commit:の VC が baseline で既に pass し、impl-review-loopが「修正後に再実行してください」という人間向け停止に落ちた、という問題設定は正しいです。#569 はこれをsimple_contract_hygiene_fix / contract_refinement_required / human_decision_requiredの 3 分類で扱う設計にしようとしています。([GitHub]1)ただし、現 Issue は 自分自身が同じ contract preflight 問題を再発させる形 になっており、さらに #560 / #564 と責務境界が衝突しています。このまま ClaudeCode に実装させると、また
issue-contract-review status: blockedか、control-plane が data-plane 作業を抱える設計劣化を起こす可能性が高いです。Blocker 1: #569 自身の VC が baseline pass し得る。
preflight-scopeがない#569 の Verification Commands は AC1〜AC3 の
rgに加えて、AC4〜AC7 にpnpm typecheck / lint / test / buildをそのまま並べています。([GitHub]1)しかし #560 では、VC baseline 差分性と
preflight-scopemarker の per-command 規約を導入し、runtime-only の確認は各$コマンド直前に明示する前提になっています。([GitHub]2)このため、#569 は最低限こう直すべきです。
AC1〜AC3 も、baseline で tokens がまだ存在しないことを期待するなら
runtime_onlyではなく差分 VC として成立します。ただし実装後に token だけを入れても意味論が満たされたとは限らないため、後述の matrix / examples の検証が必要です。Blocker 2: 「worker が Issue 本文を修正する」の actor が未定義
#569 は
simple_contract_hygiene_fixの場合に “worker が Issue 本文を修正し issue-contract-review を再実行する” としています。([GitHub]1)一方、現在の
impl-review-looppreparation はvc_preflight.statusがpassの場合だけ implementation-worker を起動し、blocked/human_judgmentは停止してhuman_escalationに送る設計です。([GitHub]3)つまり、blocked 時点では通常の implementation-worker はまだ起動されません。ここで “worker” とだけ書くと、実際には orchestrator / main session が Issue 本文編集や
gh issue editを実行する余地が残ります。これは #564 の「control-plane が作業内容や gate 判断を抱えず、worker / deterministic checker 側に責務を寄せる」という設計方針と衝突します。([GitHub][4])修正方針は二択です。
既存
issue-refinement-loopに戻すsimple_contract_hygiene_fixでも、Issue 本文 mutation は issue-refinement 系 worker の責務に寄せる。新しい
contract-hygiene-workerを定義するただし 実装: impl-review-loop の contract blocked 時エスカレーションを blocked reason 3 分類と worker 自律修正手順に置換する #569 の Allowed Paths は preparation.md と SKILL.md だけなので、subagent 定義や hook 追加が必要なら 実装: impl-review-loop の contract blocked 時エスカレーションを blocked reason 3 分類と worker 自律修正手順に置換する #569 のスコープを広げるか、別 Issue に分ける必要があります。現在の Stop Conditions は nested SubAgent delegation を止めるため、worker 導入とも矛盾します。([GitHub]1)
Blocker 3: #564 の
intake_gate_failedと #569 のhuman_escalation更新が衝突する#564 は
impl-review-looppreparation にintake_gate_failedを独立したtermination_reasonとして追加し、missing_contract_go / metadata_not_ready / stale_contract_review / body_snapshot_mismatchのサブ理由を持たせる設計です。([GitHub][4])#569 は SKILL.md の
human_escalation説明を新分類に沿って更新するだけなので、#564 の状態体系を取り込まないと termination taxonomy が二重化します。([GitHub]1)推奨は、#569 の分類を
human_escalationの置換ではなく、次のように #564 側の intake gate vocabulary に接続することです。Blocker 4: 3分類の判定基準が LLM 任せで、決定論的でない
#569 は分類自動化スクリプト追加を Out of Scope にしています。([GitHub]1)
それ自体は許容できますが、ならば preparation.md に 既存
CONTRACT_REVIEW_RESULT_V1.checks.vc_preflight.classifications[]から 3分類へ落とす決定表 が必要です。現在の preparation はvc_preflight.classifications[]を正本として参照する設計なので、分類もこの既存データから派生させるべきです。([GitHub]3)最低限、こういう表が必要です。
unexpected_passで、修正がpreflight-scope付与または対象セクション限定に閉じ、AC/VC/Allowed Paths/acceptance semantics を変えないsimple_contract_hygiene_fixcontract_refinement_requiredhuman_decision_requiredhuman_decision_requiredまたは fail-closedClaude Code 公式ドキュメント上も、Markdown の指示は挙動を形成するもので、強制層ではありません。強制したい場合は settings / hooks 側でブロックする必要があります。([Claude API Docs][5])
Blocker 5: Issue 本文 mutation 後の stale snapshot 無効化が不足
#560 は、human_escalation 後に Issue 本文を 1 文字でも変更した場合、prior contract-review result は stale になり、full contract review 再実行が必要だと定義しています。([GitHub]2)
#564 も body_sha256 と comment freshness を intake gate に入れ、古い
status: goを無効化する設計です。([GitHub][4])#569 は “Issue 本文を修正し issue-contract-review を再実行” とは書いていますが、以下が足りません。
Major: #543 の例を
simple_contract_hygiene_fixと断定するのは危険#543 は人間の manual playtest 証跡を
docs/playtest/m2-combat-mvp.mdに追加する Issue で、AI / Playwright の自動代替は不可と明記されています。([GitHub][6])その中で
tested_commit:が既存 frontmatter にあるため baseline pass した、という問題は単なるpreflight-scope: pr_review_only付与で済むとは限りません。([GitHub]1)より安全な修正は、VC を 対象セクション限定 にすることです。
preflight-scope: pr_review_onlyは「存在確認が baseline 差分性を持てないが、PR reviewer が変更 diff 上で確認すればよい」場合に限るべきです。人間 playtest 証跡の正当性や実施事実はhuman_decision_requiredに寄せる方が安全です。Major: AC が token grep だけで、workflow 品質を検証していない
#569 の AC1〜AC3 は
simple_contract_hygiene_fixなどの token が preparation.md に存在することだけを検証しています。([GitHub]1)これは「3分類が運用できる」「worker mutation が安全」「body_sha256 stale を扱える」「#543 型の停止が再発しない」を検証しません。
#564 は同種の handoff 問題に対し、#561 型の regression fixture / integration test を追加する方針を取っています。([GitHub][4])
#569 も docs-only にこだわるなら、最低限 preparation.md 内に
decision tableとworked examplesを AC 化すべきです。より堅い実装なら.claude/skills/impl-review-loop/tests/を Allowed Paths に加えて fixture 化するべきです。外部仕様調査からの実装上の示唆
Claude Code skills は prompt-based で、Claude に詳細手順を与えてツール orchestration させる仕組みです。つまり skill 文書だけでは deterministic enforcement にはなりません。([Claude API Docs][7])
一方、Claude Code hooks は
PreToolUse/PostToolUse/Stop/SubagentStopなどで tool call や停止をブロックでき、JSON decision や exit code 2 による制御が可能です。([Claude API Docs][8])subagent には frontmatter hooks や project-level
SubagentStart/SubagentStophooks も設定できます。([Claude API Docs][9])従って #569 の高品質化方向は、単なる prose 追加ではなく、少なくとも将来 Issue として次を切ることです。
Claude Code のセキュリティモデルも、編集・コマンド実行は権限ベースで扱われ、write scope や許可ルールを明示する前提です。([Claude API Docs][10])
推奨する #569 修正方針
実装: impl-review-loop の contract blocked 時エスカレーションを blocked reason 3 分類と worker 自律修正手順に置換する #569 を 実装: issue-refinement-loop と impl-review-loop の implementation-ready handoff を contract gate 化する #564 後続または 実装: issue-refinement-loop と impl-review-loop の implementation-ready handoff を contract gate 化する #564 依存 と明記する。
human_escalation置換ではなくintake_gate_failed.vc_preflight.contract_blocked_reasonとして統合する。Verification Commands に
preflight-scopeを付ける。特にpnpm typecheck/lint/test/buildはruntime_only。“worker” を明確化する。
implementation-workerではなく、contract-hygiene-workerまたはissue-refinement-loopに route する。blocked 時に orchestrator が直接 Issue 本文を書き換えない。simple_contract_hygiene_fixの自律修正許可条件を限定する。許可してよいのは
preflight-scope付与、section-scoped VC、明らかな grep 対象の限定などに限る。AC / Outcome / Allowed Paths / acceptance semantics 変更は不可。body mutation 後の
body_sha256stale invalidation と latestCONTRACT_REVIEW_RESULT_V1.status == go再取得を必須化する。test(#483): manual playtest の実施証跡を docs/playtest/m2-combat-mvp.md に追加する #543 型 example を明記する。
tested_commit:はpr_review_onlyではなく、まず## Human Playtest Evidenceセクション限定 VC に修正する例を載せる。人間 playtest 実施事実の判断はhuman_decision_required。AC を token grep から decision table / examples / stale handling の存在確認へ強化する。
そのまま Issue コメントに投げるなら
#569 は 発想は正しいが、現在の契約は実装準備未完了 です。修正後に
issue-contract-reviewを再実行してstatus: goを得てからimpl-review-loopに渡すべきです。# 既存衝突確認
git worktree list | grep "$WORKTREE" && echo "[WARN] worktree 既存" || echo "[OK] worktree 未作成"
git branch --list "$BRANCH" && echo "[WARN] branch 既存" || echo "[OK] branch 未作成"
```
既存衝突あり → 過去のイテレーションの残骸の可能性。人間判断を仰ぐ。
## 4. Product Spec Gate 評価完了後の LOOP_STATE 初期化
Product Spec Check 評価(1-d)を完了後、iteration = 0 で以下の状態で開始:
```yaml
LOOP_STATE:
issue_number:
contract_snapshot_url:
contract_snapshot_source: provided | detected_existing | materialized_by_issue_contract_review
iteration: 0
max_iterations: 3
worktree: .claude/worktrees/issue-<番号>-
branch: worktree-issue-<番号>-
last_step: null
last_loop_verdict: null
blockers_history: []
external_research_skip_basis: null
termination_reason: null
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: ""
body_sha256: ""
routing_action: continue | stop_human | refresh_contract_snapshot
```
routing_action が
stop_humanまたはrefresh_contract_snapshotの場合は、ループを開始せず人間判断へ escalate する。## 5. 外部仕様調査スキップ判断(任意)
internal-only 変更(
src/state/src/systems内の純粋ロジック変更等)ならexternal_research_skip_basisに理由を記録してスキップ。外部仕様が絡む場合は
gemini-cli-headless-delegationを先行起動して情報を集める。## 出力
LOOP_STATE 初期値を会話履歴に明示記録し、Step 1(Implementation)へ進む。
"
[4]: #564 "実装: issue-refinement-loop と impl-review-loop の implementation-ready handoff を contract gate 化する · Issue #564 · squne121/loop-protocol · GitHub"
[5]: https://docs.anthropic.com/en/docs/claude-code/memory "How Claude remembers your project - Claude Code Docs"
[6]: #543 "test(#483): manual playtest の実施証跡を docs/playtest/m2-combat-mvp.md に追加する · Issue #543 · squne121/loop-protocol · GitHub"
[7]: https://docs.anthropic.com/en/docs/claude-code/skills "Extend Claude with skills - Claude Code Docs"
[8]: https://docs.anthropic.com/en/docs/claude-code/hooks "Hooks reference - Claude Code Docs"
[9]: https://docs.anthropic.com/en/docs/claude-code/sub-agents "Create custom subagents - Claude Code Docs"
[10]: https://docs.anthropic.com/en/docs/claude-code/security "Security - Claude Code Docs"
squne121 commentedon Jun 2, 2026
人間からのコメントです。
「ただし、現 Issue は 自分自身が同じ contract preflight 問題を再発させる形 になっており、さらに #560 / #564 と責務境界が衝突しています。このまま ClaudeCode に実装させると、また issue-contract-review status: blocked か、control-plane が data-plane 作業を抱える設計劣化を起こす可能性が高いです。」再発しないようにエージェントスキルの改善案を別イシューとして検討してほしい。
squne121 commentedon Jun 2, 2026
#569 (comment)
推奨は #569 をこのまま実装させず、新規 Issue で「Issue 作成・編集・refinement 出力の公開前 self-preflight」を先に設計する です。
理由は明確です。#569 は
impl-review-loopの blocked 時分類を追加する Issue ですが、検証コマンドにpnpm typecheck/lint/test/buildのような baseline で既に PASS し得る一般検証を含んでおり、再び contract preflight に引っかかる構造です。さらに #560 は refinement 完了後のCONTRACT_REVIEW_RESULT_V1.status == "go"final gate、#564 はissue-refinement-loop → issue-contract-review → impl-review-loopの handoff gate を扱っており、#569 が「blocked 後の worker 自律修正」まで持つと責務境界が衝突します。([GitHub]1)Claude Code 的にも、これは「手順書に注意書きを足す」だけでなく、hook / script / subagent の組み合わせで公開前に止めるのが筋です。Claude Code hooks は
PreToolUseで tool call 前に実行でき、JSON 出力で allow/block/escalate を制御できます。subagent は独立 context・tool 制限を持てるため、control-plane に data-plane の契約判断を抱え込ませない用途に合います。([Claude Code]2)別 Issue 起票案
Title
Body
Parent Issue
#569 の post-mortem / scope split。
Parent Goal Ref
Goal: #569 型の「contract preflight 問題を直す Issue 自体が、同じ contract preflight 問題を再発させる」構造を公開前に検出する。
Desired Destination: Issue 本文を
gh issue create/editまたはgh apiで公開する前に、draft body に対して machine-readable な self-preflight が走り、以下を fail-closed で止める。pnpm typecheck/lint/test/buildなど delta を示さない一般検証を AC の primary VC として使う記述preflight-scope: pr_review_onlyなしの generic PASS commandBackground
#569 は
impl-review-loopがissue-contract-review status: blockedを受けた後の分類・自律修正手順を追加する Issue だが、Issue 自体に generic verification command が含まれており、baseline で通り得る VC を再導入する危険がある。また、#560 は issue-refinement-loop の complete 条件に contract gate を追加する scope、#564 は issue-refinement-loop と impl-review-loop の handoff を contract gate 化する scopeであり、#569 が worker 自律修正・contract gate・handoff を同時に持つと責務境界が崩れる。
この問題は #569 内で直すのではなく、Issue 作成・編集・refinement 出力を公開する前段で防ぐ必要がある。
Current Validated Scope
.claude/skills/create-issue/SKILL.mdにISSUE_CONTRACT_DRAFT_PREFLIGHT_V1を mandatory step として追加する.claude/skills/edit-issue/SKILL.mdに Issue 本文更新前の同 self-preflight を追加する.claude/skills/issue-refinement-loop/references/termination-policy.mdに「implementation-ready handoff 前に draft self-preflight が pass していること」を追記する.claude/hooks/guard-gh-issue-contract-draft.shを追加し、gh issue create/editとgh api .../issues/...の body 更新を対象に、公開前 draft body を検査する.claude/skills/create-issue/scripts/contract_draft_self_preflight.pyを追加し、hook と skill の両方から同じ判定ロジックを使う.claude/agents/contract-boundary-reviewer.mdを追加し、scope-collision 判定のみを read-only subagent に委譲するIn Scope
ISSUE_CONTRACT_DRAFT_PREFLIGHT_V1の定義status: pass | blocked | human_judgmentblocked_reasonsbaseline_pass_vcgeneric_pass_command_without_pr_review_onlyscope_collision_with_active_gate_issuecontrol_plane_data_plane_boundary_violationmissing_contract_gate_dependencyunverifiable_acceptance_criteriaimplementation Issue の
Verification Commandsに対する draft-time lintpnpm typecheckpnpm lintpnpm testpnpm buildrg/greppreflight-scope: pr_review_onlyの per-command marker 強制実装: issue-refinement-loop の完了条件に issue-contract-review gate を追加し VC 差分性違反を refinement 中に検出する #560 / 実装: issue-refinement-loop と impl-review-loop の implementation-ready handoff を contract gate 化する #564 / 実装: impl-review-loop の contract blocked 時エスカレーションを blocked reason 3 分類と worker 自律修正手順に置換する #569 のような active gate Issue を collision candidates として検出し、Issue 本文の
Out of Scope/Depends on/Parent Goal Refに明示されていなければ blockhook は blocking decision を JSON で返す
create/edit skill は hook に依存せず、起票・編集前に同じ script を明示実行する
Out of Scope
issue-contract-reviewの final gate ロジック変更baseline_vc_preflight.pyの分類ロジック変更Acceptance Criteria
create-issueにISSUE_CONTRACT_DRAFT_PREFLIGHT_V1の必須実行手順が追加されているedit-issueに Issue 本文更新前の同 self-preflight 手順が追加されているcontract_draft_self_preflight.pyが追加され、baseline で通る generic VC を block できるguard-gh-issue-contract-draft.shが追加され、gh issue create/editと本文更新系gh apiを block 対象にできるblocked_reasons: scope_collision_with_active_gate_issueとして表現できるpreflight-scope: pr_review_onlyが generic command の直前 1 行にない場合は block されるcontract-boundary-reviewerまたは self-preflight policy に明文化されているVerification Commands
Allowed Paths
.claude/skills/create-issue/SKILL.md.claude/skills/edit-issue/SKILL.md.claude/skills/issue-refinement-loop/references/termination-policy.md.claude/skills/create-issue/scripts/contract_draft_self_preflight.py.claude/hooks/guard-gh-issue-contract-draft.sh.claude/hooks/tests/**.claude/agents/contract-boundary-reviewer.mddocs/dev/agent-skill-boundaries.mddocs/dev/github-ops.mdStop Conditions
issue-contract-reviewの実行ロジック変更が必要になった場合baseline_vc_preflight.pyの仕様変更が必要になった場合Delivery Rule
1 Issue = 1 PR。まずこの Issue で公開前 self-preflight を導入し、その後 #569 を再 refine する。
結論として、#569 の前にこの新規 Issue を挟むべきです。既に
.claude/hooksとPreToolUse設定は存在するため、単なる運用文書ではなく hook で publish 前に止める実装まで含めるのが妥当です。([GitHub]3)推奨は #569 をこのまま実装させず、新規 Issue で「Issue 作成・編集・refinement 出力の公開前 self-preflight」を先に設計する です。
理由は明確です。#569 は
impl-review-loopの blocked 時分類を追加する Issue ですが、検証コマンドにpnpm typecheck/lint/test/buildのような baseline で既に PASS し得る一般検証を含んでおり、再び contract preflight に引っかかる構造です。さらに #560 は refinement 完了後のCONTRACT_REVIEW_RESULT_V1.status == "go"final gate、#564 はissue-refinement-loop → issue-contract-review → impl-review-loopの handoff gate を扱っており、#569 が「blocked 後の worker 自律修正」まで持つと責務境界が衝突します。([GitHub]1)Claude Code 的にも、これは「手順書に注意書きを足す」だけでなく、hook / script / subagent の組み合わせで公開前に止めるのが筋です。Claude Code hooks は
PreToolUseで tool call 前に実行でき、JSON 出力で allow/block/escalate を制御できます。subagent は独立 context・tool 制限を持てるため、control-plane に data-plane の契約判断を抱え込ませない用途に合います。([Claude Code]2)別 Issue 起票案
Title
Body
Parent Issue
#569 の post-mortem / scope split。
Parent Goal Ref
Goal: #569 型の「contract preflight 問題を直す Issue 自体が、同じ contract preflight 問題を再発させる」構造を公開前に検出する。
Desired Destination: Issue 本文を
gh issue create/editまたはgh apiで公開する前に、draft body に対して machine-readable な self-preflight が走り、以下を fail-closed で止める。pnpm typecheck/lint/test/buildなど delta を示さない一般検証を AC の primary VC として使う記述preflight-scope: pr_review_onlyなしの generic PASS commandBackground
#569 は
impl-review-loopがissue-contract-review status: blockedを受けた後の分類・自律修正手順を追加する Issue だが、Issue 自体に generic verification command が含まれており、baseline で通り得る VC を再導入する危険がある。また、#560 は issue-refinement-loop の complete 条件に contract gate を追加する scope、#564 は issue-refinement-loop と impl-review-loop の handoff を contract gate 化する scopeであり、#569 が worker 自律修正・contract gate・handoff を同時に持つと責務境界が崩れる。
この問題は #569 内で直すのではなく、Issue 作成・編集・refinement 出力を公開する前段で防ぐ必要がある。
Current Validated Scope
.claude/skills/create-issue/SKILL.mdにISSUE_CONTRACT_DRAFT_PREFLIGHT_V1を mandatory step として追加する.claude/skills/edit-issue/SKILL.mdに Issue 本文更新前の同 self-preflight を追加する.claude/skills/issue-refinement-loop/references/termination-policy.mdに「implementation-ready handoff 前に draft self-preflight が pass していること」を追記する.claude/hooks/guard-gh-issue-contract-draft.shを追加し、gh issue create/editとgh api .../issues/...の body 更新を対象に、公開前 draft body を検査する.claude/skills/create-issue/scripts/contract_draft_self_preflight.pyを追加し、hook と skill の両方から同じ判定ロジックを使う.claude/agents/contract-boundary-reviewer.mdを追加し、scope-collision 判定のみを read-only subagent に委譲するIn Scope
ISSUE_CONTRACT_DRAFT_PREFLIGHT_V1の定義status: pass | blocked | human_judgmentblocked_reasonsbaseline_pass_vcgeneric_pass_command_without_pr_review_onlyscope_collision_with_active_gate_issuecontrol_plane_data_plane_boundary_violationmissing_contract_gate_dependencyunverifiable_acceptance_criteriaimplementation Issue の
Verification Commandsに対する draft-time lintpnpm typecheckpnpm lintpnpm testpnpm buildrg/greppreflight-scope: pr_review_onlyの per-command marker 強制実装: issue-refinement-loop の完了条件に issue-contract-review gate を追加し VC 差分性違反を refinement 中に検出する #560 / 実装: issue-refinement-loop と impl-review-loop の implementation-ready handoff を contract gate 化する #564 / 実装: impl-review-loop の contract blocked 時エスカレーションを blocked reason 3 分類と worker 自律修正手順に置換する #569 のような active gate Issue を collision candidates として検出し、Issue 本文の
Out of Scope/Depends on/Parent Goal Refに明示されていなければ blockhook は blocking decision を JSON で返す
create/edit skill は hook に依存せず、起票・編集前に同じ script を明示実行する
Out of Scope
issue-contract-reviewの final gate ロジック変更baseline_vc_preflight.pyの分類ロジック変更Acceptance Criteria
create-issueにISSUE_CONTRACT_DRAFT_PREFLIGHT_V1の必須実行手順が追加されているedit-issueに Issue 本文更新前の同 self-preflight 手順が追加されているcontract_draft_self_preflight.pyが追加され、baseline で通る generic VC を block できるguard-gh-issue-contract-draft.shが追加され、gh issue create/editと本文更新系gh apiを block 対象にできるblocked_reasons: scope_collision_with_active_gate_issueとして表現できるpreflight-scope: pr_review_onlyが generic command の直前 1 行にない場合は block されるcontract-boundary-reviewerまたは self-preflight policy に明文化されているVerification Commands
Allowed Paths
.claude/skills/create-issue/SKILL.md.claude/skills/edit-issue/SKILL.md.claude/skills/issue-refinement-loop/references/termination-policy.md.claude/skills/create-issue/scripts/contract_draft_self_preflight.py.claude/hooks/guard-gh-issue-contract-draft.sh.claude/hooks/tests/**.claude/agents/contract-boundary-reviewer.mddocs/dev/agent-skill-boundaries.mddocs/dev/github-ops.mdStop Conditions
issue-contract-reviewの実行ロジック変更が必要になった場合baseline_vc_preflight.pyの仕様変更が必要になった場合Delivery Rule
1 Issue = 1 PR。まずこの Issue で公開前 self-preflight を導入し、その後 #569 を再 refine する。
結論として、#569 の前にこの新規 Issue を挟むべきです。既に
.claude/hooksとPreToolUse設定は存在するため、単なる運用文書ではなく hook で publish 前に止める実装まで含めるのが妥当です。([GitHub]3)squne121 commentedon Jun 2, 2026
issue-refinement-loop 終了レポート
残存 Blocker(人間修正待ち)
C9:
## Runtime Verification Applicabilityセクションの欠如Issue 本文に以下のセクションを追加してください:
修正後、再度
issue-refinement-loop 569を実行するか、issue-contract-reviewを実行してください。squne121 commentedon Jun 2, 2026
Contract Snapshot (2026-06-02T07:25:02Z)
Contract Summary
.claude/skills/impl-review-loop/steps/preparation.mdが更新され、issue-contract-review status: blocked受信時に blocked reason をsimple_contract_hygiene_fix/contract_refinement_required/human_decision_requiredの 3 種に分類し、simple_contract_hygiene_fixの場合は orchestrator が推奨修正案を提示してissue-refinement-loop経由で自律修正後にissue-contract-reviewを再実行できる手順が明文化された状態で、pnpm typecheck / lint / test / buildが全て PASS している。.claude/skills/impl-review-loop/steps/preparation.md,.claude/skills/impl-review-loop/SKILL.md.claude/worktrees/issue-569-impl-review-loop-contract-blocked-blockeworktree-issue-569-impl-review-loop-contract-blocked-blockesqune121 commentedon Jun 2, 2026
判定
REQUEST_CHANGES 相当。
#569 の方向性は妥当ですが、このまま実装すると
impl-review-loopの入口ゲート、契約レビュー再実行、Issue本文更新、VC preflight 分類の責務境界が曖昧になり、「contract blocked を自動修正できる」と見せかけて、実際には契約意味論や人間証跡判断まで自動化してしまう危険があります。#569 本体はpreparation.mdとSKILL.mdの更新を対象にし、blocked reason をsimple_contract_hygiene_fix / contract_refinement_required / human_decision_requiredに分ける設計ですが、現状のAC/VCはほぼ文字列存在確認で、制御フローの安全性を検証できません。([GitHub]1)主要ブロッカー
1. #564 の fail-only intake gate と衝突する記述が残る
#564 / PR #568 では、
impl-review-loopはissue-contract-reviewを自動実行せず、最新のCONTRACT_REVIEW_RESULT_V1 status: goがなければintake_gate_failedで止める方針になっています。PR #568 でも「auto issue-contract-review execution path」を deprecated にしています。([GitHub]2)一方、現在の
SKILL.mdにはまだ「contract_snapshot_url がなければ go コメントを探し、なければ issue-contract-review を auto-invoke する」という古い説明が残っています。([GitHub]3)#569 は
human_escalation語彙との統合だけでなく、この stale documentation を必ず修正対象に含めるべきです。修正方針:
2. “simple_contract_hygiene_fix” の定義が広すぎる
#569 は、
preflight-scope: pr_review_only追加や VC の対象セクション限定を「semantics unchanged」な簡易修正例として挙げています。([GitHub]1)しかし、VC の対象範囲を変えることは、場合によっては検証意味論の変更です。特に #543 の AC4 は
tested_commit:が既存frontmatterにも存在しうるため、単純なrg "tested_commit:"は baseline で通ってしまう、という背景があります。#543 側では Human Playtest Evidence セクション、tested_commit、実行証跡、手動操作証跡がAC/VCに絡んでいます。([GitHub]4)simple_contract_hygiene_fixにしてよい条件を、最低限こう固定すべきです。逆に、動画証跡URL、環境情報、
tested_commitの由来、accepted/deferred 判定、ローカルmp4のレビュー可能性などは、人間判断または契約再設計です。PR #570 のレビューでも、ローカル動画パス、環境情報不足、ビルド証跡不足、commit provenance 不明確性がブロッカーとして指摘されています。これらを “simple hygiene” に混ぜると危険です。([GitHub]5)3. #201 / PR #583 の classifier 境界を侵食している
#569 の out-of-scope には「issue-contract-review baseline VC classifier logic change」は #201 が扱うと明記されています。([GitHub]1)
実際、#201 / PR #583 は
trivially_pass分類をbaseline_vc_preflight.py側に追加し、match-ssot.sh --keywords --pathsのような強制include系を classifier 側で扱う実装です。([GitHub]6)したがって #569 は新しい分類ロジックを作るのではなく、
CONTRACT_REVIEW_RESULT_V1.checks.vc_preflight.classifications[]を消費して routing するだけに限定すべきです。分類が不明な場合はhuman_decision_requiredまたはcontract_refinement_requiredに落とすのが安全です。4. issue-refinement-loop 経由の本文変更が未定義
#569 は「simple の場合、issue-refinement-loop に route して Issue body を変更し、issue-contract-review を再実行し、go を得て再開」としています。([GitHub]1)
ただし、#569 の out-of-scope では issue-refinement-loop 自体の変更を除外しています。つまり、どのI/O contractで issue-refinement-loop を呼ぶのか、本文更新後にどの hash を検証するのか、同時編集をどう検出するのかが未定義です。
GitHub CLI では
gh issue edit --body-fileで本文更新でき、gh issue comment --body-fileでコメントも追加できますが、制御プレーンが直接編集しないという #569 の意図を守るなら、編集主体・body hash・再レビュー結果URLを明示する必要があります。([GitHub CLI]7)推奨する出力スキーマ:
5. Safety Claim Matrix がACにない
.claude/skills/**は安全性に関わる制御文書です。PR #568 ではこの点で一度 REQUEST_CHANGES になり、Safety Claim Matrix 追加後に approve されています。([GitHub]8)PR #583 も skills 配下変更に対して Safety Claim Matrix を含めています。([GitHub]9)
#569 は
.claude/skills/impl-review-loop/steps/preparation.mdとSKILL.mdを直接触るため、ACに以下を追加すべきです。Web調査に基づく高品質化ポイント
Claude Code の Subagent は独立コンテキストで動作し、最終結果だけをメインに返すため、
issue-refinement-loopや契約診断をサブエージェントに分離する設計とは相性がよいです。一方で、hooks は deterministic な制御・監査・ブロックに向いており、自然言語手順だけで安全性を担保するより、可能なら PreToolUse/PostToolUse/Stop hook やテストで不変条件を検査した方が堅いです。([Claude Code]10)ただし #569 は automation script 追加を out-of-scope にしているため、実装信頼性を上げるなら Allowed Paths を拡張してテストを追加するか、docs-only 改修であることを明記して期待値を下げるべきです。現状の
rgだけのVCでは、単語が書いてあるだけでACを満たしてしまいます。([GitHub]1)動画・プレイテスト証跡については、GitHub は issue/PR コメントへのファイル添付をサポートし、動画は free plan で 10MB、paid plan で 100MB まで添付可能です。公開リポジトリの添付ファイルは認証なしで閲覧可能になる点も明記されています。ローカル
file://やdocs/playtest/*.mp4参照より、PR/Issueコメント添付URL + sha256 の方がレビュー可能性は高いです。([GitHub Docs]11)#569 に追加すべき修正版AC
最低限、以下を足してください。
最終結論
#569 は「blocked だから人間へ丸投げ」を改善するIssueとしては価値があります。
ただし現状は、contract hygiene 自動修正、契約再設計、人間証跡判断、classifier 責務、intake gate の再開条件が混ざっています。
このIssueは、実装前に次の形へ絞るべきです。
この修正を入れないまま進めると、
impl-review-loopが「blocked を賢く分類する」のではなく、blocked の意味を曖昧にして go に持ち込む危険な抜け道になります。squne121 commentedon Jun 2, 2026
Contract Review: BLOCKED — 実装着手不可(2026-06-03)
VC preflight の結果、unexpected_pass が 2 件あり
status: blockedとなりました。ブロック理由の詳細
AC0:SKILL.md の VC が baseline で pass してしまう
対象コマンド:
rg "issue-contract-review.*自動実行しない|auto.*run.*deprecated|fail-only.*gate" .claude/skills/impl-review-loop/SKILL.md現状の
SKILL.mdの Step 1-b セクションにfail-only gateや「自動実行しない」相当の文言がすでに存在するため、実装前の baseline でも exit_code 0 になります。「実装後に初めて出現するパターン」という前提が成立しません。修正案(#569 が新たに追加するコンテンツにのみヒットするパターンへ変更):
AC11:preparation.md の VC が baseline で pass してしまう
対象コマンド:
rg "issue-refinement-loop.*経由|control-plane.*直接.*mutate.*しない|body_sha256.*go" .claude/skills/impl-review-loop/steps/preparation.mdpreparation.mdのstale_contract_review処理セクション(Step 0.3)がbody_sha256とgoを含むため、body_sha256.*goパターンが baseline でヒットします。修正案(
CONTRACT_BLOCKED_ROUTING_V1スキーマ固有のフィールド名を使う):推奨アクション
issue-refinement-loopの起動を推奨します。承認後に実行可能です。修正対象は
## Verification Commands内の AC0(SKILL.md 確認コマンド)と AC11 です。いずれも「baseline で必ず fail するパターン」に更新してください。squne121 commentedon Jun 2, 2026
Contract Snapshot — 実装着手許可 (2026-06-03T00:35:00Z)
Contract Summary — 契約概要
.claude/skills/impl-review-loop/steps/preparation.mdが更新され、issue-contract-review status: blocked受信時に blocked reason をsimple_contract_hygiene_fix/contract_refinement_required/human_decision_requiredの 3 種に分類し、simple_contract_hygiene_fixの場合は orchestrator が推奨修正案を提示してissue-refinement-loop経由で自律修正後にissue-contract-reviewを再実行できる手順が明文化された状態で、pnpm typecheck / lint / test / buildが全て PASS している。.claude/skills/impl-review-loop/steps/preparation.md、.claude/skills/impl-review-loop/SKILL.md.claude/worktrees/issue-569-impl-review-loop-contract-blocked-blockeworktree-issue-569-impl-review-loop-contract-blocked-blockesqune121 commentedon Jun 2, 2026
人間判断:scope rollup ブロック解除
scope_rollupが Issue #597(同一 Allowed Paths の OPEN Issue)を検出して停止しました。以下の通り判断します。判断:#569 を先に進める。#597 は設計再整合が完了するまで実装レーンから外す。
理由
#597 の現在の Outcome は
#564の fail-only gate 設計と競合する可能性があり、permissionMode: dontAskを含む権限関連の自動実行変更が含まれているため、設計再整合が先に必要です。#569 の実装スコープ(変更なし)
vc_preflight.status: blocked受信時の blocked reason 3 分類の追加simple_contract_hygiene_fix/contract_refinement_required/human_decision_requiredの分類と worker 自律修正フローの明文化preparation.mdとSKILL.mdへの記述追加#569 のスコープ外(明示)
missing_contract_go時の自動マテリアライゼーションissue-contract-reviewの自動実行 SubAgentpermissionMode: dontAsk関連の変更#597 の対応
phase/implementationラベルを除去し、#564 fail-only gate との整合が確認されるまで実装レーンから外します。/impl-review-loop 569を再実行します。squne121 commentedon Jun 2, 2026
implement-issue: 実装完了 (2026-06-03T08:35:00Z)
Issue #569 の実装が完了しました。
.claude/worktrees/issue-569-impl-review-loop-contract-blocked-blockeworktree-issue-569-impl-review-loop-contract-blocked-blockefix(#569): AC10 positive/negative example を contract 仕様に合わせて修正
squne121 commentedon Jun 2, 2026
REQUEST_CHANGES 修正を完了しました。
対応した修正点
BLOCKER-1 の解消
preflight-scope: pr_review_onlyの付与を positive example(正例)に移動しました。Issue contract の AC10 が指定する通り、これは「VC 意味論変更なし」の正例として位置づけられます。BLOCKER-2 の解消
negative examples に以下の 4 項目を追加しました。
tested_commit:由来の値を VC コマンドに組み込む変更 — 実行時依存の注入は意味論変更であり autonomous fix 禁止accepted/deferred判定を VC の結果評価に追加する変更 — VC 合否の意味論変更であり human_decision_required に該当品質ゲート
typecheck: pass / lint: pass / test: 313 passed (16 files) / build: pass
commit: 8a9c1ec
fix(#569): address REQUEST_CHANGES — Step 1-c routing, Section 6.4 LO…
squne121 commentedon Jun 3, 2026
REQUEST_CHANGES 対応完了
PR #603 に対する人間レビューの指摘を全件修正してコミット・プッシュしました。
修正内容(全件)
BLOCKER-1: Step 1-c の blocked 分岐を Section 6 routing に接続。blocked は Section 6 の 3 分類ルーティングへ委譲し、human_judgment のみ即停止する。
BLOCKER-2/4: Section 6.4 LOOP_STATE の state path を intake_gate.vc_preflight.contract_blocked_routing 配下に修正。source_contract_review_comment_url、body_sha256_before、classification_basis の全フィールドを追加。
BLOCKER-3: simple_contract_hygiene_fix の分類条件を拡張。trivially_pass/unexpected_pass の section-scoped VC rewrite と preflight-scope:pr_review_only の付与を追加。正例も追記。
MAJOR-5: PR body の Safety Claim Matrix を正確な記述に更新(docs-only 安全の誤った主張を除去)。
MAJOR-7: Unicode 制御文字チェック実施済み、問題なし。
検証結果
コミット: 23874d8
docs(#569): impl-review-loop の contract blocked 3 分類ルーティングと worker 自律…
feat(#607): uncertain 衝突に proceed_with_coordination を導入しキーワードベース即時停止を…