Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "issue-refinement-loop の approved 終了を impl-review-loop への無条件 implementation handoff から切り離し、精緻化の成功と実装開始依頼を別責務として扱う"
change_kind: codeParent Issue
なし(#2713 レビューコメントからの scope 分離 follow-up)
Parent Goal Ref
- Goal:
issue-refinement-loopは Issue の調査・計画具体化・レビュー・本文改善を自律的に繰り返して正常終了する。実装可能になったこと(approved/issue_kind: implementation/ contract reviewgo)を実装開始の指示として扱わない。 - Desired Destination: 単独の implementation Issue として起票(実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 の子ではない。実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 レビュー P1-1 の分離 follow-up)
Current Validated Scope
.claude/skills/issue-refinement-loop/SKILL.mdの Step 5 終了処理から、approved終了時に同一 turn でrun_root_transition()を無条件実行しinvoked: trueの場合その場でimpl-review-loopを起動する記述を撤去する。run_root_transition()/root_entry_router.py::decide_root_entry_route()自体の判定ロジックは変更しない(SKILL.md は orchestrator への prose 指示であり、この指示を消すだけで無条件呼び出しは止まる。fresh investigation で確認済み)。.claude/skills/issue-refinement-loop/references/termination-policy.mdのLOOP_HANDOFF_RESULT_V1producer 契約を更新し、approved終了時に新規生成する値をstatus: refinement_approved/routing_action: none(または同義の非-implementation-dispatch値)に変更する。旧status: impl_ready/routing_action: run_impl_review_loopは legacy telemetry の reader compatibility としてのみ許容し、新規 producer はこれらの値を生成しない。- 上記に対応する既存テスト(
.claude/skills/issue-refinement-loop/tests/test_loop_handoff_contract.py、.claude/skills/issue-refinement-loop/scripts/tests/test_root_entry_router_workflow_capability.py)の更新と、refinement-only negative / explicit-implementation positive の2シナリオを分離した新規回帰テストの追加。 .claude/skills/impl-review-loop/steps/preparation.mdの Implement-issue Handoff Gate 記述を、「実装は明示的な実装依頼から開始する」契約に整合させる。docs/dev/agent-skill-boundaries.mdとdocs/dev/workflows/impl-review-loop-design.md(fresh investigation で、両ファイルが現時点でもissue-refinement-loop → run_root_transition() → impl-review-loopを無条件正規フローとして説明していることを確認済み)を、本 Issue の契約と矛盾しないよう更新する。
Remaining Parent Gaps
- なし(本 Issue は 実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 レビュー P1-1 から分離された単独 follow-up であり、親 Issue を持たない。実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 側に残る pre-Step-1 data-plane 判定の DRY/wiring 改善は 実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 側の作業として引き続き残る)
Outcome
issue-refinement-loop が approved で終了した場合、run_root_transition() を呼び出さず、impl-review-loop の起動・implementation worker の起動・実装用 worktree の作成・production code の実装・commit/push/PR 作成のいずれも行わずに正常終了する状態になっている。
ユーザーが実装を明示的に依頼した invocation(例: /impl-review-loop <N> の直接呼び出し、または実装依頼を伴う自然文プロンプト)では、impl-review-loop が既存の contract review / fresh review / live-state 確認を経て正規に開始でき、開始後の自律的な実装・テスト・修正・レビューの能力は維持されている。
issue_kind: implementation であること、contract review が go であること、過去の LOOP_HANDOFF_RESULT_V1 コメントの存在は、単独では実装開始の承認として扱われない。
LOOP_HANDOFF_RESULT_V1 の新規 producer 値は status: refinement_approved / routing_action: none(または同義の非-dispatch値)であり、impl_ready / run_impl_review_loop は legacy reader compatibility のためだけに残る。
Runtime Verification Applicability
- decision: immediate
- reason: 宣言する Allowed Paths が
.claude/skills/issue-refinement-loop/SKILL.mdを含み、docs/dev/extension-surface-runtime-policy.yamlの risk-trigger ruleskill-invocation-procedure-or-contract-change/subagent-lifecycle-start-stop-delegation-fallback(いずれもdefault_decision: immediate)に一致する(fresh investigation で確認済み、scripts/agent-guards/extension_surface_policy_matcher.py::evaluate_issue_risk_trigger()の deterministic gate)。両 rule のexecutable_or_prompt_semantics_unchanged例外は、本 Issue が Step 5 の分岐条件(run_root_transition()を呼ぶか否か)そのものを変更するため適用できない。
applicable_acs: AC8
execution_environment: 既存のworktree-agent-runtime-smokeskill(.claude/skills/worktree-agent-runtime-smoke/SKILL.md、scripts/agent-ops/run_worktree_agent_runtime_smoke.py)による structured mode smoke。新規 harness は追加しない。
skip_conditions:claude実行ファイルが解決できない、worktree bootstrap が実行不能、または runner 自身の capability SKIP(exit 77)が発生した場合は SKIP を宣言する。
fallback_policy: SKIP 宣言時はdocs/dev/runtime-verification-policy.mdの SKIP 規約に従い、SKIP:プレフィックス付き理由を stdout に出力し、AC8 を FAIL とはせず human_escalation の Stop Condition に連動させる。既存 fake-transport pytest(AC4/AC5)はこの runtime smoke の代替にならない(policy が要求するのは実 process 起動証跡)。
artifact_requirements:run_worktree_agent_runtime_smoke.pyの--output-dirに生成されるsummary.md(唯一の永続 evidence ファイル)を PR 本文に引用する。raw prompt / raw transcript / reasoning は保存しない。
In Scope
issue-refinement-loop/SKILL.mdStep 5 からrun_root_transition()の無条件呼び出し指示を除去し、approved終了時はLOOP_HANDOFF_RESULT_V1marker(audit telemetry として維持してよい)を出力した上で正常終了する契約に変更するreferences/termination-policy.mdの該当セクションを更新し、「approvedは実装開始の代替承認ではない」「follow-up materialization / refinement / contract review の完了は実装依頼と同一視しない」ことを明記するreferences/termination-policy.mdのLOOP_HANDOFF_RESULT_V1schema について、approved終了時の新規 producer 値をstatus: refinement_approved/routing_action: none(または同義の非-dispatch値)に変更する(本 Issue に限り Stop Condition の固定契約変更禁止の明示的例外とする。余分な schema key は追加しない)。同セクション更新時に、Task Context のsignal_kind: "refinement_approved"(scripts/task-context/task_context_workflow_signals.py、Issue 実装: workflow trusted signalsとIssue/PR Task equivalenceをTask Contextへ統合する #2565 由来の別スキーマ)と本LOOP_HANDOFF_RESULT_V1.status: refinement_approvedが同じ文字列を共有するが異なる概念であることを明記する一文を追加するimpl-review-loop側の正規実装入口(/impl-review-loop <N>相当のユーザー起点呼び出し)が、これまで通り fresh review / live-state 確認を経て開始できることを保つ(impl-review-loop自体の自律的な実装・検証・PR レビュー能力は変更しない)run_root_transition()/root_entry_router.pyの実装自体は削除せず、呼び出し元(issue-refinement-loopの自律終了処理)からの呼び出しのみを切断する。root_entry_router.py::decide_root_entry_route()の判定ロジック自体は変更しない.claude/skills/issue-refinement-loop/tests/test_step5_termination_no_auto_dispatch.py(新規ファイル)に、### Step 5セクション本文を対象としてrun_root_transition/run_impl_review_loopの imperative 呼び出しが存在しないことを検証する pytest を追加する(grep VC ではなくセクション抽出 + pytest によるピン留め。新規テストファイルとして追加する — 既存ファイルへの新規 node-id 追加は本リポジトリの VC baseline 規約(Issue 実装: VC baseline-fail 用 pytest command を canonical form に正規化して contract-review 往復を削減する #1285/feat: VC baseline-fail pytest command を canonical form に正規化する compiler を追加 #1305、existing_file_missing_node_id_noncanonical)に反するため避ける).claude/skills/issue-refinement-loop/scripts/tests/test_refinement_only_vs_explicit_implementation_dispatch.py(新規ファイル)に、既存の fake transport / spy パターン(test_root_entry_router_workflow_capability.py由来)を再利用した以下2つの新規テストを追加する:test_refinement_only_termination_never_dispatches_implementation(refinement-only negative:invoke_step1呼び出し回数 0 を検証)test_explicit_implementation_request_invokes_step1_exactly_once_after_fresh_review(explicit-implementation positive: fresh review go + live-state 一致でinvoke_step1exactly once、fetch_calls["count"] == 2の既存不変条件も維持)
impl-review-loop/steps/preparation.mdの Implement-issue Handoff Gate 記述の整合を取る(実装開始条件の記述が本変更と矛盾しないようにする。status: impl_readyを例示している箇所も新語彙に更新する)docs/dev/agent-skill-boundaries.mdとdocs/dev/workflows/impl-review-loop-design.mdの「Root-Owned Synchronous Entry Transition」/「Entry Transition(Step 1 起動契約)」記述を、「明示的実装依頼がある場合にのみ Step 1 が起動する」契約に整合させる。Issue 実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記 #260(docs/dev/agent-skill-boundaries.mdへの human-gate 原則の docs-only 追記)とは補完関係であり重複しないことを本文に明記する(実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記 #260 側の docs 変更は行わない)- 既存の extension-surface risk-trigger policy(
docs/dev/extension-surface-runtime-policy.yaml)のskill-invocation-procedure-or-contract-change/subagent-lifecycle-start-stop-delegation-fallbackに整合するRuntime Verification Applicability: immediate宣言と、既存worktree-agent-runtime-smokeskill を用いた対応 AC/VC を追加する(新規 harness は作らない)
Out of Scope
impl-review-loop起動後の自律的な実装・修正・テスト・レビュー能力の縮小(維持する)- 各工程で人間承認を追加するような設計変更(依頼された作業範囲を守る修正であり、承認ゲートの追加ではない)
disable-model-invocation/user-invocable/allowed-tools等の Claude Code skill frontmatter 設定変更(今回の最小修正では扱わない)- 新しい承認トークン・永続台帳・権限ハーネスの新設
- Issue 実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記 #260 の scope(docs-only、human-gate 原則の文書化)自体の変更(本 Issue は補完関係にあり、実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記 #260 の docs 文言自体は編集しない)
root_entry_router.pyの判定ロジック(decide_root_entry_route()の capability/identity/body-base/review-verdict 判定)自体の変更(呼び出し経路の切断のみを扱う)scripts/claude-gpt/runtime_smoke_test.sh/scripts/claude-gpt/tests/test_runtime_smoke_issue_to_impl.pyの変更(fresh investigation で、既に fake transport による non-mutating 設計であり、run_root_transition()呼び出し自体を構造的に assertion 済みであることを確認した。本 Issue の SKILL.md 契約変更と矛盾しない。無条件 refinement-success→implementation transition を固定する実装ではないため、追加変更は不要と判断する)- Issue 調査: issue-refinement-loop の root_entry_router が post-merge の duplicate impl-review-loop handoff を防げない blind spot を調査し、follow-up 実装方針を確定する #2680 / 実装: impl-review-loop intakeにevidence-based landing dispositionを実装する #2699 / PR feat: add evidence-based landing intake #2700(post-merge landed 判定に基づく duplicate implementation dispatch 防止)の scope(implementation request の存在判定とは別軸の問題であり、本 Issue では扱わない)
- Task Context workflow-signal pipeline(
scripts/task-context/task_context_workflow_signals.pyのrefinement_approvedsignal 処理、.claude/skills/issue-refinement-loop/scripts/publish_termination_report.py::_emit_refinement_approved_signal())の変更。これはissue-refinement-loopの approved termination publish 時に best-effort でrefineActivity を DONE にしimplementationActivity を ACTIVE に遷移させる別レイヤーの永続化契約であり、本 Issue が扱う orchestration 層(run_root_transition()呼び出しの有無)とは独立した既知のギャップである(semantic design review で検出、severity: high。詳細は Notes for Reviewer 参照)。Task Context 側の signal 契約変更は別サブシステムの独自 AC/VC/テスト戦略を要するため、本 Issue の Allowed Paths には含めない
Acceptance Criteria
- AC1:
issue-refinement-loop/SKILL.mdの### Step 5セクション本文に、run_root_transition()を無条件実行する imperative 指示が存在しないことを、新規テストファイルtest_step5_termination_no_auto_dispatch.pyのセクション抽出 + pytest で検証している(grep VC ではない) - AC2:
issue-refinement-loop/SKILL.mdまたはreferences/termination-policy.mdに、「approvedは実装開始の代替承認ではない」ことが明記されている - AC3:
references/termination-policy.mdの## LOOP_HANDOFF_RESULT_V1 — Terminal Contractセクション全体(Schema block のstatus/routing_actionenum、適用範囲節の「marker が出力されない以上、marker 内のstatus: impl_ready/routing_action: run_impl_review_loopフィールドも一切出力されない」という言及、### impl_ready定義節の見出しと6条件 invariant checklist の条件6の自己参照、Routing Rules 表、Hygiene Delegation Contract の「impl_readyに貢献する」の一文、および## Root-Owned Synchronous Entry Transition節冒頭の例示値を含むが、これらの列挙に限定されない — セクション内に残るimpl_ready/run_impl_review_loopの裸の言及はすべて対象)が、approved終了時の新規発行値としてstatus: refinement_approved/routing_action: none(LOOP_HANDOFF_RESULT_V1のstatusフィールドとして、既存の別概念である Handoff Staterefinement_approved_gate_pendingおよび Task Contextsignal_kind: refinement_approvedとは区別できる形で)を正式スキーマとし、旧impl_ready/run_impl_review_loopを明示的に legacy reader compatibility 専用と demarcate した、内部無矛盾な状態になっている。既存の readiness-invariant 前提条件(contract_review.gate_result == fresh_go/ hygiene auto-fix evidence 完備 /blockers空)はrefinement_approved発行条件としてそのまま維持する(実装開始の自動 authorization ゲートから、精緻化完了 telemetry の発行条件へ意味を変えるだけで、ゲーティングロジック自体の再設計は行わない、という設計判断。semantic design review 指摘への disposition) - AC4: 新規テストファイル
test_refinement_only_vs_explicit_implementation_dispatch.pyにtest_refinement_only_termination_never_dispatches_implementationが追加され、.claude/skills/issue-refinement-loop/scripts/*.py(root_entry_router.py自身を除く)を AST 解析しrun_root_transition(呼び出しがいずれのモジュールにも存在しないことを構造的に検証している(構造/静的検査であり、独立した runtime 振る舞い証拠ではない。production path に接続されていないローカル spy の呼び出し回数を assert する tautological な検証は行わない -- PR 実装: issue-refinement-loop の approved 終了と impl-review-loop への implementation handoff を分離する #2748 OWNER レビュー disposition、issuecomment-5825945601) - AC5: 同じ新規テストファイルに
test_explicit_implementation_request_invokes_step1_exactly_once_after_fresh_reviewが追加され、fresh review go + live-state 一致の場合にinvoke_step1が exactly once 呼ばれ、fetch_calls["count"] == 2の既存不変条件も維持されていることを検証している - AC6:
docs/dev/agent-skill-boundaries.mdとdocs/dev/workflows/impl-review-loop-design.mdが本 Issue の契約(明示的実装依頼がある場合にのみ Step 1 起動)と整合するよう更新され、Issue 実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記 #260 との重複がないことが本文に明記されている - AC7:
impl-review-loop/steps/preparation.md:39のLOOP_HANDOFF_RESULT_V1(status: impl_ready)例示が、legacyまたは旧を伴う形で新語彙(refinement_approved)と明示的に区別できるよう更新されている(既存のtest_preparation_entry_policy.pyは ROOT_IMPLEMENTATION_ENTRY_ROUTE_V1 命名検証のみで語彙更新を検証しないため、専用 VC で直接ピン留めする) - AC8: refinement-only 終了パスにおいて
run_root_transition()/ implementation-worker / Step 1 dispatch が一度も起動されないことの決定的 evidence は、test_step5_termination_no_auto_dispatch.py(SKILL.md### Step 5セクション本文の静的検証、AC1)とtest_refinement_only_vs_explicit_implementation_dispatch.pyの AST wiring 検査(run_root_transition(呼び出しが production スクリプト群のいずれにも存在しないことの静的証明、AC4)が担う。既存のworktree-agent-runtime-smokeskill による structured mode smoke(--require-clean-postcondition)は、これらの決定的 evidence を補完する実行時の補助 evidence(実 runtime が正常終了し、worktree に unexpected mutation が発生せず、clean postcondition であること)としてのみ位置づけ、runtime smoke 単独を「implementation dispatch が一度も起動されなかったこと」の直接証明としては扱わない(PR 実装: issue-refinement-loop の approved 終了と impl-review-loop への implementation handoff を分離する #2748 OWNER レビュー disposition、issuecomment-5825945601。環境不可時は SKIP exit 77 を宣言し human_escalation の Stop Condition に連動する) - AC9: 本 Issue で変更・新規追加した pytest ファイル(
test_step5_termination_no_auto_dispatch.py、test_loop_handoff_schema_vocabulary.py、test_refinement_only_vs_explicit_implementation_dispatch.py、test_loop_handoff_contract.py、test_root_entry_router_workflow_capability.py、test_preparation_entry_policy.py)はすべて PASS している。加えて.claude/skills/issue-refinement-loop/tests/、.claude/skills/issue-refinement-loop/scripts/tests/、.claude/skills/impl-review-loop/tests/の3ディレクトリについて、established baseline(本 Issue の変更前から存在する既知 failure。現状は.claude/skills/issue-refinement-loop/tests/test_command_registry.py::TestAuthorityTransportPrivilegedExecutorRealSubprocessDispatchの3テストがuv_version_mismatch(decide_run/produce/consumeの real subprocess dispatch が空 stdout を返しjson.loadsが失敗する、本 Issue の Allowed Paths 外の既存インフラ起因)で fail する既知状態)と比較して新規 failure が発生していないことを確認している。unrelated なuv_version_mismatchbaseline インフラの修正は本 Issue の scope に含めない
Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_step5_termination_no_auto_dispatch.py -q
# AC2
$ rg -n -e "代替承認ではない" -e "実装開始.*代替" -e "not.*alternative.*approval" .claude/skills/issue-refinement-loop/SKILL.md .claude/skills/issue-refinement-loop/references/termination-policy.md
# AC3
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_loop_handoff_schema_vocabulary.py -q
# AC4
# AC5
$ uv run --locked pytest .claude/skills/issue-refinement-loop/scripts/tests/test_refinement_only_vs_explicit_implementation_dispatch.py -q
# AC6
$ rg -n -e "明示的.*実装依頼" -e "実装開始.*人間" docs/dev/agent-skill-boundaries.md docs/dev/workflows/impl-review-loop-design.md
# AC7
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_preparation_entry_policy.py -q
# AC7
$ rg -n -e "legacy.*impl_ready" -e "impl_ready.*legacy" -e "旧.*impl_ready" -e "impl_ready.*旧" .claude/skills/impl-review-loop/steps/preparation.md
# AC8 (decisive evidence: AC1 + AC4 static tests. runtime smoke below is supplementary only)
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_step5_termination_no_auto_dispatch.py .claude/skills/issue-refinement-loop/scripts/tests/test_refinement_only_vs_explicit_implementation_dispatch.py -q
# AC8 (supplementary runtime evidence only; does not independently prove dispatch absence)
# preflight-scope: runtime_only
$ uv run --locked python3 scripts/agent-ops/run_worktree_agent_runtime_smoke.py --runtime claude --mode structured --worktree "$WORKTREE" --prompt-file tmp/runtime-smoke/issue-2740-refinement-only.md --output-dir artifacts/runtime-smoke/issue-2740-refinement-only --timeout-seconds 180 --max-turns 6 --require-clean-postcondition
# exit 0: 実 runtime が正常終了し unexpected mutation がない(PASS、補助 evidence)/ exit 1: postcondition 違反等(FAIL)/ exit 77: capability SKIP(human_escalation へ連動)
# AC9 (baseline-aware: 変更対象/新規テストは全PASS必須。3ディレクトリは established baseline 比で新規failureがないことを確認する)
# preflight-scope: pr_review_only
# baseline-expect: 3 failed (test_command_registry.py::TestAuthorityTransportPrivilegedExecutorRealSubprocessDispatch, uv_version_mismatch, Allowed Paths外・本Issue無関係)
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/ -q
# AC9
# preflight-scope: pr_review_only
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/issue-refinement-loop/scripts/tests/ -q
# AC9
# preflight-scope: pr_review_only
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/ -qAllowed Paths
- .claude/skills/issue-refinement-loop/SKILL.md
- .claude/skills/issue-refinement-loop/references/termination-policy.md
- .claude/skills/issue-refinement-loop/scripts/root_entry_router.py
- .claude/skills/issue-refinement-loop/tests/test_loop_handoff_contract.py
- .claude/skills/issue-refinement-loop/tests/test_step5_termination_no_auto_dispatch.py
- .claude/skills/issue-refinement-loop/tests/test_loop_handoff_schema_vocabulary.py
- .claude/skills/issue-refinement-loop/scripts/tests/test_root_entry_router_workflow_capability.py
- .claude/skills/issue-refinement-loop/scripts/tests/test_refinement_only_vs_explicit_implementation_dispatch.py
- .claude/skills/impl-review-loop/steps/preparation.md
- .claude/skills/impl-review-loop/tests/test_preparation_entry_policy.py
- docs/dev/agent-skill-boundaries.md
- docs/dev/workflows/impl-review-loop-design.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合。ただし本 Issue に限り、
LOOP_HANDOFF_RESULT_V1/ Handoff State の既存 field value semantics(status/routing_actionの許容値)の更新は明示的にこの Stop Condition の例外とする。新規 schema key の追加や新規永続 contract の新設は引き続き禁止する - 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
impl-review-loop起動後の自律実行能力(実装・テスト・修正・レビューの反復)を縮小する変更が必要になった場合- 新しい承認トークン・永続台帳・権限ハーネスの新設が必要と判明した場合
- Issue 実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記 #260 の docs 変更と矛盾する記述変更が必要になった場合(実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記 #260 側との整合を先に確認する)
- AC8 の runtime smoke 実行のために
worktree-agent-runtime-smokeskill 以外の新規 runtime harness が必要と判明した場合
Required Skills
- worktree-agent-runtime-smoke(AC8)
Required Design References
- .claude/skills/issue-refinement-loop/references/termination-policy.md
- .claude/skills/issue-refinement-loop/scripts/root_entry_router.py
- docs/dev/agent-skill-boundaries.md
- docs/dev/workflows/impl-review-loop-design.md
- .claude/skills/worktree-agent-runtime-smoke/SKILL.md
Notes for Reviewer
由来・分離理由: 本 Issue は Issue #2713 の operator-selected human-context anchor(issuecomment-5808708572)レビュー P1-1 の分離 follow-up。#2713 は impl-review-loop の pre-Step-1 data-plane 判定(.claude/skills/impl-review-loop/scripts/build_intake_capsule.py 等)の DRY/wiring 改善に維持し、本 Issue は issue-refinement-loop 自身の終了処理の責務修正を扱う。両者は Allowed Paths が完全に非重複。
本 Issue に対する operator-selected human-context anchor review(issuecomment-5814806368、OWNER、レビュー基準 main@0a7c42a)を反映し、以下を改訂した:
LOOP_HANDOFF_RESULT_V1の新規 producer 値をimpl_ready/run_impl_review_loopからrefinement_approved/noneへ変更する契約を In Scope / AC3 に追加し、Stop Condition に明示的例外を設けた。- 第1 VC(
rg -n "run_root_transition" SKILL.md)を、### Step 5セクション限定の pytest(AC1)へ置き換えた。 docs/dev/agent-skill-boundaries.md/docs/dev/workflows/impl-review-loop-design.mdを Allowed Paths / AC6 / Required Design References に追加した。- refinement-only negative(AC4)と explicit-implementation positive(AC5)の regression シナリオを分離し、具体的なテスト関数名を明記した。
scripts/claude-gpt/runtime_smoke_test.sh系は fresh investigation の結果、既に fake transport による non-mutating 設計でrun_root_transition()呼び出しを構造的に assertion 済みと確認できたため、Out of Scope として維持し変更しない(アンカーレビュー finding 6 は fresh evidence により resolved)。Runtime Verification Applicabilityをnot_applicableからimmediateへ変更した。これはアンカーレビューの想定と異なるが、fresh investigation の結果、docs/dev/extension-surface-runtime-policy.yamlの risk-trigger policy(skill-invocation-procedure-or-contract-change/subagent-lifecycle-start-stop-delegation-fallback、いずれもdefault_decision: immediate)に本 Issue の Allowed Paths が一致し、scripts/agent-guards/extension_surface_policy_matcher.pyの deterministic gate がnot_applicable宣言を needs_fix と判定することを確認したため(declared_decisionのランクがfinal_decisionのランクを下回る場合は fail-closed)。両 rule の「executable_or_prompt_semantics_unchanged」例外は、本 Issue が Step 5 の分岐条件そのものを変更するため適用できない。AC8 は既存のworktree-agent-runtime-smokeskill を再利用するのみで、新規大規模 runtime harness は追加しない。
Dedupe 確認結果(fresh investigation、SubAgent C による独立調査で再確認済み):
- Issue 実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記 #260(
実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記、OPEN、docs-only): 同じ原則(impl-review-loop 開始は人間起点)を扱うが、Allowed Paths はdocs/dev/agent-skill-boundaries.mdのみで、Out of Scope に「skill 本体の変更」「自動委譲・auto_chain の追加」を明記して除外している docs-only の Issue。本 Issue が扱うissue-refinement-loop/SKILL.md/termination-policy.md/root_entry_router.pyの実際の挙動変更、およびdocs/dev/agent-skill-boundaries.mdへの対応する記述更新はカバーしない別レイヤーの作業であり、重複ではなく補完関係。本 Issue がdocs/dev/agent-skill-boundaries.mdを編集する際は、実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記 #260 が今後追記する原則文言と矛盾しないことを実装時に確認する。 - Issue 調査: issue-refinement-loop の root_entry_router が post-merge の duplicate impl-review-loop handoff を防げない blind spot を調査し、follow-up 実装方針を確定する #2680(研究、OPEN)→ Issue 実装: impl-review-loop intakeにevidence-based landing dispositionを実装する #2699(CLOSED)/ PR feat: add evidence-based landing intake #2700(MERGED): 「post-merge recovery で実装スコープが既に landed している場合の duplicate impl-review-loop dispatch 防止」という implementation request 後の重複実行防止の問題であり、本 Issue が扱う「implementation request の存在そのものを実装開始の条件にする」問題とは別軸。overlap なし。
- Issue 実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713(CLOSED)/ PR refactor: pre-Step-1 data-plane判定をresolve_pre_step1_data_plane_action()に統合する #2741(MERGED): PR feat: add evidence-based landing intake #2700 レビュー指摘の DRY 違反解消。Issue 実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 本文が「
issue-refinement-loopのapproved終了がimpl-review-loopへの自動 implementation handoff をトリガーする責務混同の解消は本 Issue では scope 外、独立 follow-up(本 Issue)で対処」と明記しており、本 Issue がその follow-up であることを確認済み。overlap なし(意図的分離)。 - Issue 実装: issue-refinement-loop から impl-review-loop への fresh implementation entry contract を統一する #2272(CLOSED)/ PR 実装: issue-refinement-loop から impl-review-loop への fresh implementation entry contract を統一する (#2272) #2282(MERGED): 現行の「
issue-refinement-loopapproved 終了 →run_root_transition()無条件実行 →impl-review-loop起動」という配線(root-direct 方式)を導入した起源。docs/dev/agent-skill-boundaries.mdとdocs/dev/workflows/impl-review-loop-design.mdの該当記述も同 PR に由来する。本 Issue はこの設計を「明示的実装依頼がある場合のみ」に修正する位置づけ。 - 上記以外に、本 Issue と同一 semantic scope の open Issue は確認されなかった。
設計原則の要約(レビューコメントより):
issue-refinement-loopは、Issue の調査・計画の具体化・レビュー・本文改善を自律的に繰り返して終了する。実装可能になったことを、実装開始の指示として扱わない。
impl-review-loopは、ユーザーが実装を依頼したときに開始し、開始後の実装・テスト・修正・レビューは自律的に進める。
「各工程で人間承認を追加する」設計ではなく、依頼された作業範囲を守る修正であることに留意する。
Semantic design review finding(issue-design-reviewer、severity: high、requires_owner_choice: true): pinned body に対する semantic design review で、Task Context の refinement_approved signal(.claude/skills/issue-refinement-loop/scripts/publish_termination_report.py::_emit_refinement_approved_signal() → scripts/task-context/task_context_workflow_signals.py:560-591)が approved termination のたびに refine Activity を DONE にし implementation Activity を無条件で ACTIVE 化することが検出された。コードコメント自身が「Its approved handoff is the canonical implementation phase start」と明記しており、これは本 Issue が orchestration 層(issue-refinement-loop の Step 5)で解消しようとしている「approved を実装開始指示として扱わない」原則と、別レイヤー(Task Context 永続化)で矛盾する。
Disposition(本 Issue のスコープ判断): 本 Issue の Allowed Paths / In Scope には含めない(上記 Out of Scope 参照)。理由: (1) 本 Issue は issue-refinement-loop / impl-review-loop の orchestration 層契約修正に意図的にスコープを絞っており、Task Context の永続化契約は完全に別サブシステムである、(2) その修正には Task Context 独自の AC/VC/テスト戦略(scripts/task-context/* 配下の signal 処理・cold-restart resume との相互作用検証を含む)が必要で、本 Issue の Allowed Paths を大きく超える、(3) 本 refinement invocation は新規 follow-up Issue の起票を許可されていない。本 Issue のマージ後も、approved termination のたびに Task Context 上は implementation Activity が開始済みとして記録され続ける点は既知の残存ギャップとして受け入れ、次の独立した Issue(scripts/task-context/task_context_workflow_signals.py の refinement_approved 処理を「明示的実装依頼」の有無で条件分岐させる、または signal 自体を廃止・改名する)での対処を推奨する。
Semantic design review finding 2(issue-design-reviewer、2回目の iteration、severity: high、requires_owner_choice: true、対応済み): 初版の AC3 VC(termination-policy.md 内の単純な文字列 grep)は、## LOOP_HANDOFF_RESULT_V1 — Terminal Contract セクションが持つスキーマ全体(Schema block の enum、### impl_ready 定義節とその6条件 invariant checklist の条件6の自己参照、Routing Rules 表、Hygiene Delegation Contract の該当文)を捕捉できず、実装者が一文追記するだけで VC を通し、同一ファイル内で新旧語彙が矛盾したまま残るリスクが指摘された。対応として AC3 を上記スコープ全体を要求する形に拡張し、test_loop_handoff_schema_vocabulary.py(新規ファイル)による pytest 検証に置き換えた。この新規テストは、## LOOP_HANDOFF_RESULT_V1 セクションを抽出し、(1) Schema block の status/routing_action enum が refinement_approved/none を新規発行値として持つこと、(2) 旧 ### impl_ready 定義節見出しがそのままの形では存在しない(改名または明示的な legacy 注記を伴う)こと、(3) セクション内に残る impl_ready の裸の言及がすべて legacy/旧 等の限定語を伴うこと、を検証する。既存の readiness-invariant 前提条件(contract_review freshness / hygiene auto-fix evidence / blockers)は refinement_approved 発行条件としてそのまま維持する設計判断とした(ゲーティングロジックの再設計は Out of Scope のまま)。
Semantic design review 非-blocking 指摘(low severity、2件、実装時の参考情報):
## Root-Owned Synchronous Entry Transition節冒頭の導入文がLOOP_HANDOFF_RESULT_V1.status: impl_readyを例示している。AC3 実装時にこの例示値もrefinement_approvedに更新するか、「(旧impl_ready相当)」等の但し書きを添える。- 既存の回帰テスト
.claude/skills/issue-refinement-loop/tests/test_termination_marker_scoping_1914.py(Allowed Paths 外だが AC9 の pytest 全件実行対象)が、termination-policy.mdの delivery-rollup-parent forbidding 段落に対して隣接文字列の正規表現をピン留めしている。AC3 実装時にtermination-policy.mdを編集する際、この段落の文言・隣接関係を意図せず崩すと AC9 が失敗するため注意する。
Semantic design review が Task Context disposition を再検証した結果(妥当と確認): 2回目の iteration で scripts/task-context/task_context_resume_dispatcher.py と impl-review-loop 配下を fresh に再調査し、Task Context の Activity 種別(refine vs implementation)が Herdr cold-restart resume 判断や impl-review-loop の Step 1 起動判断のいずれにも使われていないことを確認した。したがって Task Context 側の残存ギャップ(上記 Out of Scope 参照)が、本 Issue が閉じようとしている「approved を実装開始指示として扱わない」契約を別経路から迂回させることはないと結論づけられた。disposition は妥当なまま維持する。
Semantic design review finding 3(issue-design-reviewer、3回目の iteration、対応済み): 過去2回の semantic finding(Task Context disposition、AC3 VC 深度)への対応は fresh re-verification で妥当と確認された。新たに、(a) AC7 の VC が preparation.md:39 の impl_ready 例示更新を実際には検証しない(severity: high)、(b) AC3 の列挙が termination-policy.md:298(適用範囲節の裸の言及)を明示していない(severity: medium)、の2点が指摘された。対応として AC7 に専用 VC(legacy/旧 と impl_ready の隣接を要求する rg チェック)を追加し、AC3 の対象範囲を「セクション内に残る impl_ready / run_impl_review_loop の裸の言及はすべて対象(列挙は非網羅的)」と明記して曖昧さを解消した。低 severity の informational 指摘(test_apply_triage_label_transition.py の docstring 例示が陳腐化するが AC9 は失敗しない)は Allowed Paths 外かつ non-blocking のため対応不要と判断した。
enforcement point に関する fresh investigation の知見: LOOP_HANDOFF_RESULT_V1 はハードコードされた producer script ではなく termination-policy.md の prose 契約であり、orchestrator(LLM agent)自身がこの契約に従い手動で YAML を組み立てて投稿する。実効的な enforcement point は root_entry_router.py::decide_root_entry_route() だが、この関数自体には「明示的実装依頼」を判定する分岐が元々存在しない。しかし SKILL.md Step 5 が単に「approved 終了と同じ turn 内で run_root_transition() を呼べ」という prose 指示を出しているだけなので、この指示を除去するだけで、orchestrator は approved 終了後にこの関数を自発的に呼ばなくなる。decide_root_entry_route() 自体の判定ロジック変更は不要(Out of Scope のまま)。
PR #2748 OWNER レビュー disposition(敵対的レビュー、issuecomment-5825945601、対応済み): 初版実装(PR #2748 初回 head)に対する OWNER の敵対的レビューで、AC8/AC9 の verification contract に以下の false-green リスクが指摘された。
- P1(AC8):
worktree-agent-runtime-smokeの--require-clean-postconditionによる clean postcondition は、「worktree に mutation が発生しなかったこと」の証拠であって「run_root_transition()/ Step 1 dispatch が一度も起動されなかったこと」の直接証明ではない(read-only prompt であれば旧経路が一度起動しても mutation なしで false-green になり得る)。対応として AC8 の文言を、決定的 evidence を AC1(Step 5 セクション静的検証)と AC4(AST wiring 静的検証)に置き、runtime smoke は実行時の補助 evidence(正常終了・no unexpected mutation・clean postcondition)としてのみ位置づける形に修正した。「旧配線なら mutation が発生して FAIL したはず」という推論的 negative control の主張は PR 本文から除去する。 - P1(AC9): 当初の AC9 は3ディレクトリの pytest 全件 PASS を要求していたが、
.claude/skills/issue-refinement-loop/tests/には本 Issue と無関係な既存 baseline failure 3 件(TestAuthorityTransportPrivilegedExecutorRealSubprocessDispatch、uv_version_mismatch由来)が存在し、全件 PASS の文言と矛盾していた。canonical 環境(uv run --locked pytest)で fresh に再実行し baseline再現・本 PR の変更と無関係であることを確認した上で、AC9 を「本 Issue で変更・新規追加した pytest は全て PASS。3ディレクトリについては established baseline 比で新規 failure がないことを確認する」という baseline-aware な契約に修正した。unrelated なuv_version_mismatchインフラの修正は本 Issue の scope に含めない。 - P2(AC4):
test_refinement_only_termination_never_dispatches_implementationのローカル spyinvoke_step1の呼び出し回数 0 assertion は、そのカウンタが production path に一度も接続されないため AST 検査結果に関わらず常に真になる tautological な assertion であり、独立した振る舞い証拠を追加していなかった。この誤解を招く assertion を削除し、AC4 を AST 静的検査のみを独立した証拠として要求する文言に修正した(有用な AST assertion 自体は維持、positive 側test_explicit_implementation_request_invokes_step1_exactly_once_after_fresh_reviewとfetch_calls["count"] == 2不変条件は変更しない)。 - P2(Schema Change Applicability):
docs/dev/schema-governance.mdの schema 定義(PR comment YAML / Markdown table contract も schema として扱う)に照らすと、LOOP_HANDOFF_RESULT_V1のstatus/routing_actionの producer 語彙・semantics 変更は schema boundary change に該当する。PR body のSchema Change Applicabilityをnot_schema_changeからschema_changeに修正し、最小限の Consumer Inventory(production parser 不在、legacy reader 互換のため旧値保持、新 producer は新値のみ発行、追加の schema version/permission mechanism/harness は新設しない)を明記する。docs/dev/schema-governance.md自体への新規 catalog entry 追加は本 Issue のスコープ外(Allowed Paths 外)のため行わない。 - P3 / follow-up(Task Context): refinement 終了時に Task Context が
implementationActivity を ACTIVE にする既知ギャップは、引き続き本 Issue の blocker にしない。scope 拡張・追加 Issue 起票のいずれも行わない(disposition は既存の Out of Scope 記載のまま)。
Source
- refinement follow-up
- origin_issue: 実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713
- origin_anchor: 実装: impl-review-loop の pre-Step-1 data-plane 判定を resolve_pre_step1_data_plane_action() に統合する #2713 (comment)
- human_context_anchor: 実装: issue-refinement-loop の approved 終了と impl-review-loop への implementation handoff を分離する #2740 (comment)
- dedupe_key: follow-up:squne121/loop-protocol:issue/2713:refinement-implementation-handoff-separation
Activity
squne121 commentedon Sep 24, 2026
結論
Issue #2740 の方向性自体は妥当です。
issue-refinement-loopの成功を「実装してよい」ではなく「Issue 契約の精緻化が完了した」と扱い、実装開始は別のユーザー意図としてimpl-review-loopに渡す、という責務分離は現在の構造より明確です。起点になった #2713 のレビュー指摘とも整合しています。Issue #2740 #2713 の起点レビューただし、現状の Issue 契約は Request Changes 相当です。そのまま実装すると、「自動 handoff の1行を消した」一方で、機械可読契約・SSOT・回帰テストが旧設計を保持する可能性があります。レビュー基準は 2026-09-24 の main
0a7c42aです。現時点で #2740 自体にコメントはなく、対応PRも見つかりませんでした。reviewed main 0a7c42a敵対的レビュー
特に直した方がよい契約
最終的な制御フローは、これくらい単純にした方がよいです。
ここで重要なのは、
run_root_transition()自体を捨てないことです。#2272 / PR #2282 で導入した fresh-review / live-state の検証には価値があります。問題なのは router ではなく、「refinement が正常終了した」という事実から router を無条件に呼ぶ現在の call site です。Issue #2272 PR #2282また #2680 → #2699 / PR #2700 で作った pre-Step-1 の landed/already-satisfied 判定も、そのまま保持すべきです。これは「ユーザーが実装を依頼したあと、重複実装を開始しない」ための機能であり、「そもそもユーザーが実装を依頼したか」とは別軸です。Issue #2680 PR #2700
Claude Code の現行仕様との整合
Claude Code の Skill はデフォルトではユーザーも Claude も起動可能で、
/impl-review-loopの明示呼び出しと、description に合致する自然文からの自動選択の両方が成立します。disable-model-invocation: trueを使えばユーザーだけに限定できますが、その場合は「自然文で『Issue 2740を実装して』と言えば起動」という現在の使い勝手を失います。Claudeしたがって #2740 の Out of Scope にある「frontmatter をいじらない」は、今回の運用方針には合っています。さらに
allowed-toolsはツール制限ではなく、その turn の pre-approval ですから、この問題への対策にはなりません。ClaudeAnthropic の現在のプロンプト指針でも、勝手な実装を避けたい場合は「実装・編集は明示的に依頼された場合だけ」と明記する方式が推奨例として示されています。つまり、この用途で新しい承認トークン、permission harness、hook を増設する必要はありません。Claude Platform Docs
ただしその代わり、AC の表現は「Claude が世界中のどの経路からも絶対に skill を起動しない」ではなく、**「canonical
issue-refinement-looptermination path は implementation dispatch を生成しない」**に限定すべきです。前者は default の Skill 自動選択を残したまま静的 pytest だけでは証明できません。#2740 に入れる修正
実装前に Issue 本文へ反映するなら、最小限これで十分です。
LOOP_HANDOFF_RESULT_V1の新規 producer 値からimpl_ready/run_impl_review_loopを撤去し、refinement 完了 telemetry にする。この変更を Stop Condition の「固定契約変更禁止」の例外として明示する。docs/dev/agent-skill-boundaries.mdとdocs/dev/workflows/impl-review-loop-design.mdを Allowed Paths に追加する。実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記 #260 は吸収または superseded 扱いにする。rg "run_root_transition"VC を廃止し、Step 5 セクションを対象にした pytest にする。goでinvoke_step1exactly once。issue_to_implscenario が「明示的 implementation request を含む」ことを固定するか、refinement-only scenario を追加する。Runtime Verification Applicability: not_applicableは維持してよい。今回の境界変更のために Claude 実機セッションや新しい権限ハーネスを必須化する価値は低いです。この修正なら、自律性はほぼ落とさず、「精緻化を頼んだだけなのに勝手に実装まで始まる」という責務漏れだけを除去できます。 #2740 の狙いにも、個人趣味開発としての運用コストにも合っています。
## 結論Issue #2740 の方向性自体は妥当です。
issue-refinement-loopの成功を「実装してよい」ではなく「Issue 契約の精緻化が完了した」と扱い、実装開始は別のユーザー意図としてimpl-review-loopに渡す、という責務分離は現在の構造より明確です。起点になった #2713 のレビュー指摘とも整合しています。[Issue #2740](https://github.com/squne121/loop-protocol/issues/2740?utm_source=chatgpt.com) [#2713 の起点レビュー](#2713)ただし、現状の Issue 契約は Request Changes 相当です。そのまま実装すると、「自動 handoff の1行を消した」一方で、機械可読契約・SSOT・回帰テストが旧設計を保持する可能性があります。レビュー基準は 2026-09-24 の main
0a7c42aです。現時点で #2740 自体にコメントはなく、対応PRも見つかりませんでした。[reviewed main 0a7c42a](0a7c42a?utm_source=chatgpt.com)敵対的レビュー
LOOP_HANDOFF_RESULT_V1が依然として実装開始命令を表現しているstatus: impl_readyとrouting_action: run_impl_review_loopを持っています。#2740 の AC は「marker は audit telemetry として維持可」としていますが、この機械可読値を変更する AC がありません。Step 5 の呼び出しだけ消しても、契約上は依然「実装ループを走らせろ」と書かれたままです。[現行 termination-policy.md](https://github.com/squne121/loop-protocol/blob/0a7c42ae5b1b7baee14d6a14cc340059f751cfc3/.claude/skills/issue-refinement-loop/references/termination-policy.md?utm_source=chatgpt.com)status: refinement_approved/routing_action: noneに変更してください。旧impl_readyは historical telemetry として読めても、新規には生成しない設計が扱いやすいです。impl_ready/run_impl_review_loop意味論を直すには、少なくとも enum semantics の変更が必要です。つまり Goal と Stop Condition が衝突しています。LOOP_HANDOFF_RESULT_V1/ Handoff State の意味論更新を明示的に許可してください。キー集合を増やす必要はありません。rg -n "run_root_transition" .../SKILL.mdは「Step 5 から削除されたこと」を証明しません。しかも正しく全出現を削除するとrgは exit 1 になるので、通常の VC evaluator ではむしろ failure です。現在も Step 0 周辺などに同語が存在します。[現行 Step 5](loop-protocol/.claude/skills/issue-refinement-loop/SKILL.md
Lines 346 to 352 in 0a7c42a
### Step 5セクションを抽出してrun_root_transition/run_impl_review_loopの imperative がないことを pytest で検証してください。docs/dev/agent-skill-boundaries.mdとdocs/dev/workflows/impl-review-loop-design.mdは現在もissue-refinement-loop → run_root_transition → impl-review-loopを正規フローとして説明します。#260 は前者だけを直す docs-only Issue ですが、まだ OPEN です。[Issue #260](https://github.com/squne121/loop-protocol/issues/260?utm_source=chatgpt.com)impl_review_loop_entryPhase 5 で productionrun_root_transition()を呼ぶことを固定しています。scripts/claude-gpt/tests/test_runtime_smoke_issue_to_impl.pyはその呼び出し自体を assertion しています。#2740 の Allowed Paths / VC には入っていません。[runtime_smoke_test.sh](https://github.com/squne121/loop-protocol/blob/0a7c42ae5b1b7baee14d6a14cc340059f751cfc3/scripts/claude-gpt/runtime_smoke_test.sh?utm_source=chatgpt.com) [対応テスト](https://github.com/squne121/loop-protocol/blob/0a7c42ae5b1b7baee14d6a14cc340059f751cfc3/scripts/claude-gpt/tests/test_runtime_smoke_issue_to_impl.py?utm_source=chatgpt.com)run_root_transitionの positive fixture から Step 1 callback 1 回を検証する形が明確です。invoked: trueと「Step 1 が実際に起動した」が混同されやすいrun_root_transition()の in-process 経路は callback を実行しますが、production CLI はinvoke_step1=lambda: Noneで、JSON のinvoked: trueを root/main thread が読み同じ turn で skill を続行する設計です。したがって CLI のinvokedだけを positive test にしても、実装開始能力の保持は証明できません。[root_entry_router.py](loop-protocol/.claude/skills/issue-refinement-loop/scripts/root_entry_router.py
Lines 945 to 971 in 0a7c42a
invoke_step1spy を用いて exactly-once を確認してください。大規模 runtime harness は不要です。特に直した方がよい契約
最終的な制御フローは、これくらい単純にした方がよいです。
ここで重要なのは、
run_root_transition()自体を捨てないことです。#2272 / PR #2282 で導入した fresh-review / live-state の検証には価値があります。問題なのは router ではなく、「refinement が正常終了した」という事実から router を無条件に呼ぶ現在の call site です。[Issue #2272](https://github.com/squne121/loop-protocol/issues/2272?utm_source=chatgpt.com) [PR #2282](https://github.com/squne121/loop-protocol/pull/2282?utm_source=chatgpt.com)また #2680 → #2699 / PR #2700 で作った pre-Step-1 の landed/already-satisfied 判定も、そのまま保持すべきです。これは「ユーザーが実装を依頼したあと、重複実装を開始しない」ための機能であり、「そもそもユーザーが実装を依頼したか」とは別軸です。[Issue #2680](https://github.com/squne121/loop-protocol/issues/2680?utm_source=chatgpt.com) [PR #2700](https://github.com/squne121/loop-protocol/pull/2700?utm_source=chatgpt.com)
Claude Code の現行仕様との整合
Claude Code の Skill はデフォルトではユーザーも Claude も起動可能で、
/impl-review-loopの明示呼び出しと、description に合致する自然文からの自動選択の両方が成立します。disable-model-invocation: trueを使えばユーザーだけに限定できますが、その場合は「自然文で『Issue 2740を実装して』と言えば起動」という現在の使い勝手を失います。:chatgpt-content-reference{index="13"}したがって #2740 の Out of Scope にある「frontmatter をいじらない」は、今回の運用方針には合っています。さらに
allowed-toolsはツール制限ではなく、その turn の pre-approval ですから、この問題への対策にはなりません。:chatgpt-content-reference{index="14"}Anthropic の現在のプロンプト指針でも、勝手な実装を避けたい場合は「実装・編集は明示的に依頼された場合だけ」と明記する方式が推奨例として示されています。つまり、この用途で新しい承認トークン、permission harness、hook を増設する必要はありません。:chatgpt-content-reference{index="15"}
ただしその代わり、AC の表現は「Claude が世界中のどの経路からも絶対に skill を起動しない」ではなく、**「canonical
issue-refinement-looptermination path は implementation dispatch を生成しない」**に限定すべきです。前者は default の Skill 自動選択を残したまま静的 pytest だけでは証明できません。#2740 に入れる修正
実装前に Issue 本文へ反映するなら、最小限これで十分です。
LOOP_HANDOFF_RESULT_V1の新規 producer 値からimpl_ready/run_impl_review_loopを撤去し、refinement 完了 telemetry にする。この変更を Stop Condition の「固定契約変更禁止」の例外として明示する。docs/dev/agent-skill-boundaries.mdとdocs/dev/workflows/impl-review-loop-design.mdを Allowed Paths に追加する。実装: docs/dev/agent-skill-boundaries.md に impl-review-loop 開始の人間起点ゲート原則を追記 #260 は吸収または superseded 扱いにする。rg "run_root_transition"VC を廃止し、Step 5 セクションを対象にした pytest にする。goでinvoke_step1exactly once。issue_to_implscenario が「明示的 implementation request を含む」ことを固定するか、refinement-only scenario を追加する。Runtime Verification Applicability: not_applicableは維持してよい。今回の境界変更のために Claude 実機セッションや新しい権限ハーネスを必須化する価値は低いです。この修正なら、自律性はほぼ落とさず、「精緻化を頼んだだけなのに勝手に実装まで始まる」という責務漏れだけを除去できます。 #2740 の狙いにも、個人趣味開発としての運用コストにも合っています。
squne121 commentedon Sep 24, 2026
確認したところ、対象コメントのレビュー基準
main@0a7c42aと、現在のmainHEAD は 同じ0a7c42ae5b1b7baee14d6a14cc340059f751cfc3です。したがって、コメントの指摘は現時点でもほぼそのまま fresh evidence として扱えます。推奨は、対象コメント
issuecomment-5814806368を operator-selected trusted human context としてissue-refinement-loopのwith_human_contextlane に投入することです。特にこのコメントはLOOP_HANDOFF_RESULT_V1の意味論変更、Allowed Paths 拡張、#260 の吸収/重複整理を要求しているので、通常の refinement よりこの経路が適しています。また重要なのは、現在の
SKILL.mdStep 5 がまだapproved → run_root_transition() → impl-review-loopを実行する状態だという点です。今回のユーザー指示は refinement-only なので、この invocation 自体ではその自動 handoff を明示的に禁止します。通常の承認待ちは不要にしつつ、Issue 本文更新・fresh review・readiness までは自律反復させる構成がよいです。Issue #2740 を、以下の operator-selected human-context anchor を基準として
issue-refinement-loopで再精緻化してください。TARGET:
squne121/loop-protocol#2740https://github.com/squne121/loop-protocol/issues/2740https://github.com/squne121/loop-protocol/issues/2740#issuecomment-5814806368.claude/skills/issue-refinement-loop/SKILL.mdこのセッションは既に Claude Code auto mode で起動済みです。
通常の途中承認・確認質問は行わず、既存の canonical route に従って自律的に refinement loop を完遂してください。
Invocation boundary
これは refinement-only work order です。
この invocation は Issue #2740 の調査、契約改善、Issue 本文 rewrite、fresh review、contract/readiness validation、および refinement termination までを承認します。
一方、この invocation 自体は implementation work order ではありません。
したがって、この refinement の終了を理由として以下を実行してはいけません。
run_root_transition()による implementation dispatchimpl-review-loopの開始implementation-workerの開始現行
.claude/skills/issue-refinement-loop/SKILL.mdStep 5 にapproved → run_root_transition() → impl-review-loopという旧挙動が残っていても、今回の明示的な refinement-only invocation boundary を優先してください。
必要な refinement termination comment / audit telemetry は投稿して構いませんが、今回の invocation から implementation dispatch を発生させないでください。
特に legacy
LOOP_HANDOFF_RESULT_V1がstatus: impl_ready/routing_action: run_impl_review_loopを表す場合、それを implementation authority として consume してはいけません。Human-context authority
上記
issuecomment-5814806368は、この invocation でユーザーが明示的に選択した trusted human review directive として扱ってください。canonical main root / default branch で、可能な場合は
issue-refinement-loopの既存with_human_contextlane を利用してください。具体的には現行 SKILL の契約に従い、
preflight.run.with_human_contextcontract_update.run.with_human_contextNEXT_ACTION: issue_editor_requiredなら既存issue-editorfull-rewrite routeを利用し、同一の canonical anchor comment URL を保持してください。
NEXT_ACTIONが deterministic repair / structural repair / contract update / issue editor を示す場合、通常の人間承認を求めず canonical consumer を実行し、その後 authoritative readback → fresh preflight → fresh review → fresh readiness を行ってください。手書きの
ANCHOR_SCOPE_REFRAME_V1の再入力をユーザーへ要求しないでください。Freshness
開始時に必ず live
mainHEAD、live Issue #2740 body、関連 Issue / PR / repository assets を再取得してください。このプロンプト作成時点では
mainHEAD は:0a7c42ae5b1b7baee14d6a14cc340059f751cfc3であり、anchor review のレビュー基準と一致しています。
ただし実行時点で HEAD が変化している可能性があるため、anchor comment に書かれた repository-state の事実を無条件に固定せず current main で再検証してください。
anchor のレビュー指示・要求事項は authority として扱いつつ、既に別変更で解消済みの finding があれば fresh evidence を根拠に resolved としてください。
SubAgent execution — REQUIRED
少なくとも以下の独立した read-only SubAgent investigation を並列で開始してください。
SubAgent A — handoff / SSOT / call-site investigation
current main を読み、
.claude/skills/issue-refinement-loop/SKILL.md.claude/skills/issue-refinement-loop/references/termination-policy.md.claude/skills/issue-refinement-loop/scripts/root_entry_router.py.claude/skills/impl-review-loop/steps/preparation.mdLOOP_HANDOFF_RESULT_V1run_root_transitionrouting_actionimpl_readyの producer / consumer / call-site / SSOT を追跡してください。
特に、
「refinement approved」と
「explicit implementation request」
が機械可読契約上も分離されるために必要な変更範囲を特定してください。
SubAgent は mutation しないこと。
SubAgent B — regression / Verification investigation
anchor review が指摘したテストギャップを current main で検証してください。
最低限、
.claude/skills/issue-refinement-loop/tests/test_loop_handoff_contract.py.claude/skills/issue-refinement-loop/scripts/tests/test_root_entry_router_workflow_capability.py.claude/skills/impl-review-loop/tests/test_preparation_entry_policy.pyscripts/claude-gpt/runtime_smoke_test.shscripts/claude-gpt/tests/test_runtime_smoke_issue_to_impl.pyを確認してください。
次の2 scenario を別々に回帰保護するために必要な exact paths / assertions を提案してください。
refinement-only:
explicit implementation request:
invoke_step1exactly once大規模 Claude runtime harness を新設する案は避け、既存 fake transport / spy / deterministic smoke を優先してください。
SubAgent は mutation しないこと。
SubAgent C — overlap / dedupe / design-history investigation
以下との semantic overlap と ownership を確認してください。
特に #260 の
docs/dev/agent-skill-boundaries.mdhuman-gate scope を #2740 へ吸収するか、superseded とするかを canonical dedupe policy に従って判断してください。
また #2680 → #2699 / PR #2700 の landed/already-satisfied 判定は、
「ユーザーが implementation を依頼した後の duplicate prevention」
であり、
「implementation request の存在」
とは別問題であることを確認してください。
SubAgent は mutation しないこと。
SubAgent completion barrier
SubAgent を fire-and-forget にしてはいけません。
全 SubAgent の作業開始後、親 orchestrator はそれぞれについて terminal completion を確認してください。
completedになったことの両方を確認してから統合判断へ進んでください。
1つでも実行中のまま親 thread が Issue rewrite / final review / termination に進んではいけません。
nested SubAgent delegation は行わないでください。
Anchor review findings to resolve
fresh investigation で既に解消済みと証明されない限り、以下を #2740 の revised contract に反映してください。
1. LOOP_HANDOFF_RESULT_V1 semantics
marker 名を互換性のため維持することは許容しますが、新規 producer が
status: impl_readyrouting_action: run_impl_review_loopを refinement approval の意味として生成する設計は終了させてください。
推奨 semantic destination は、
status: refinement_approvedrouting_action: noneまたは current repository vocabulary に存在する意味的に同等で、implementation dispatch を表さない値です。
余分な schema key は追加しないでください。
legacy telemetry の reader compatibility と、新規 producer semantics を分離してください。
2. Stop Condition conflict
現行 #2740 の
「固定契約(キー集合・スキーマ・型定義)の変更が必要なら停止」
が Goal と衝突しています。
この Issue に限り、
LOOP_HANDOFF_RESULT_V1/ Handoff State の既存 field value semantics の更新を明示的に In Scope / Stop Condition exception としてください。
不要な schema key 追加や新規永続 contract は引き続き禁止してください。
3. Verification correction
以下のような単純 grep absence check を完了条件の中心にしないでください。
rg -n "run_root_transition" .claude/skills/issue-refinement-loop/SKILL.mdrun_root_transitionは Step 5 以外で正当に存在し得ます。代わりに、
### Step 5の canonical termination section について、run_root_transitionを imperative に呼ばないrun_impl_review_loopを dispatch しないことを executable pytest で固定してください。
4. SSOT docs
current main を確認し、必要なら少なくとも以下を #2740 の Allowed Paths / AC / VC に含めてください。
docs/dev/agent-skill-boundaries.mddocs/dev/workflows/impl-review-loop-design.mdIssue #260 と scope が重なる場合は二重実装を残さないでください。
canonical dedupe policy が既存 Issue の supersede/close を許可するならその route を使用してください。
別 Issue mutation が適切でない場合でも、#2740 本文上で ownership / supersession を明確にしてください。
新しい follow-up Issue は作らないでください。
5. Regression scenarios
refinement-only negative regression と explicit-implementation positive regression を分離してください。
negative regression は可能な限り spy/callback/call-count を使って、
を検証してください。
positive regression は direct
/impl-review-loop <N>または意味的に明示された implementation request が fresh checks を通過した場合に、invoke_step1exactly onceを検証してください。
production CLI の単なる
invoked: trueだけを implementation capability 保持の証拠にしないでください。6. Existing runtime smoke
scripts/claude-gpt/runtime_smoke_test.sh/scripts/claude-gpt/tests/test_runtime_smoke_issue_to_impl.pyが現在 refinement success → implementation transition を無条件に固定しているなら、exact current implementation を調査し、必要な path を Allowed Paths に追加してください。
既存 positive smoke を削除するのではなく、
を意味的に区別してください。
7. Preserve useful gates
run_root_transition()自体を削除しないでください。以下は維持してください。
impl-review-loop開始後の自律実装・test・review・fix loop問題は router の存在ではなく、refinement approved から router を無条件 call する call-site です。
8. Keep unnecessary governance out of scope
以下は今回追加しないでください。
disable-model-invocation等の frontmatter redesignRuntime Verification Applicability: not_applicableは、fresh investigation で反証されない限り維持して構いません。
Rewrite requirements
SubAgent results と fresh repository evidence を統合した後、必要なら Issue #2740 本文を canonical issue-editor route で完全 rewrite してください。
少なくとも以下を相互矛盾なく更新してください。
「Goal では semantic change が必要なのに Stop Condition では禁止」のような自己矛盾を残さないでください。
Allowed Paths は abstract directory ではなく current main から導出した exact repository-relative paths を優先してください。
Loop continuation
Issue rewrite 後は必ず authoritative live readback を取得してください。
その後、
を繰り返し、
approvedに到達するか、canonical な irrecoverable stop condition に到達するまで自律継続してください。routine approval を求めないでください。
一時的・決定論的に修復可能な blocker は既存 canonical repair route を利用してください。
同じ no-progress operation を無限再試行しないでください。
Hard stop
以下の場合のみ停止して最終報告してください。
「通常なら人間確認したい」という理由だけでは停止しないでください。
Final report
完了時は簡潔に以下を報告してください。
run_root_transitioninvocation count for this refinement work order:0impl-review-loopinvocation count for this refinement work order:00refinement の完了後も、実装開始は行わず終了してください。
この形なら、対象レビューを「単なる参考コメント」ではなく、現行スキルが持っている trusted human-context → controlled rewrite の正規経路に載せられます。また、#2740 を精緻化した結果、その #2740 が修正対象としている旧 Step 5 によって勝手に実装まで始まる自己参照的な事故も明示的に防げます。
squne121 commentedon Sep 24, 2026
Refinement Loop Termination(
issue-refinement-loop)verdict: approved
operator-selected human-context anchor(issuecomment-5814806368、OWNER)を基準に、fresh investigation(read-only SubAgent 3件: handoff/SSOT 調査、regression/検証調査、overlap/dedupe 調査)と 4 回の deterministic review + semantic design review(
issue-design-reviewer)サイクルを経て Issue 本文を改訂した。approve(blocking issue なし)assessment: clear(findings なし)。過去 4 iteration の指摘(Task Context workflow-signal disposition、AC3 の VC 深度不足、AC7 の VC 深度不足、AC3 列挙の曖昧さ)はすべて本文改訂で解消・fresh re-verification 済みnot_applicableからimmediateへ変更(docs/dev/extension-surface-runtime-policy.yamlの risk-trigger policy 一致を fresh investigation で確認したため)。既存のworktree-agent-runtime-smokeskill を再利用する AC8 を追加docs/dev/agent-skill-boundaries.md、docs/dev/workflows/impl-review-loop-design.md、新規テストファイル3件(test_step5_termination_no_auto_dispatch.py、test_refinement_only_vs_explicit_implementation_dispatch.py、test_loop_handoff_schema_vocabulary.py)を追加publish_termination_report.py::_emit_refinement_approved_signal()→task_context_workflow_signals.py)との既知のアーキテクチャ上のギャップは、fresh investigation で「本 Issue の orchestration 層修正を別経路から迂回させるものではない」ことを確認した上で、Out of Scope として明示的に受け入れ、次の独立した Issue での対処を推奨する disposition としたfinal body sha256:
f39de8eb80fd30d64bde63ecdf4ffdc1221da36addf9428e1eada835d5f83945squne121 commentedon Sep 24, 2026
確認結果では、#2740 は refinement が完了しており、最新の termination comment は
verdict: approvedです。現在の Issue 本文には AC1–AC9、Allowed Paths、AC8 の runtime smoke、Stop Conditions まで固定されており、#2740 を実装する PR は現時点では見つかりませんでした。現在確認できたmainHEAD は843837ee796f26fb35427b1859200096190e0547です。この Issue では特に、今回のあなたの指示そのものを explicit implementation request として扱うのが重要です。旧
LOOP_HANDOFF_RESULT_V1や直前のrefinement_approvedを implementation authority にするのではなく、この invocation を authority にしてimpl-review-loopを開始させるのが #2740 の狙いと一致します。推奨アクションは、fresh live-state 確認 → pre-Step-1 duplicate/landed 判定 → implementation → independent verification → PR review → fix delta 反復 → AC1–AC9・CI・mergeability を満たした地点で停止、です。マージ、auto-merge、merge queue 投入だけは禁止します。また Issue の Stop Conditions は尊重し、特に AC8 が capability SKIP/exit 77 なら Issue 契約どおり
human_escalationで停止させるべきです。通常の途中確認は不要です。以下を、そのまま既に auto mode で起動している対話的 Claude Code に投入するのがよいです。
Issue #2740 を対象に、repository canonical skill
.claude/skills/impl-review-loop/SKILL.mdを使用して、実装・検証・PR review・fix loop を自律実行し、マージ直前の状態まで完遂してください。TARGET:
squne121/loop-protocol#2740https://github.com/squne121/loop-protocol/issues/2740.claude/skills/impl-review-loop/SKILL.mdこの Claude Code セッションは既に auto mode で起動済みです。
Authorization / invocation semantics
これは明示的な implementation work order です。
Issue #2740 の目的そのものが、
issue-refinement-loopのapproved/refinement_approvedを別の authority として扱うことです。
したがって、今回
impl-review-loopを開始する authority は、過去のLOOP_HANDOFF_RESULT_V1、refinement_approvedtelemetry、contract reviewgo、Issue のissue_kind: implementationではなく、このユーザーによる明示的な implementation request です。一方、過去の refinement telemetry を implementation authorization として再解釈してはいけません。
今回の explicit implementation request を起点に、canonical
impl-review-loopentry route を使用してください。Current known state — MUST revalidate
このプロンプト作成時点で確認済みの状態:
https://github.com/squne121/loop-protocol/issues/2740#issuecomment-5816422553approvedf39de8eb80fd30d64bde63ecdf4ffdc1221da36addf9428e1eada835d5f83945mainHEAD:843837ee796f26fb35427b1859200096190e0547ただし、これらは execution-time authority ではありません。
開始時に必ず以下を fresh に取得・再評価してください。
mainHEAD実行中に repository state が変わっていた場合は、fresh evidence を優先してください。
Primary execution rule
.claude/skills/impl-review-loop/SKILL.mdを canonical control-plane として実行してください。独自の簡易フローへ置き換えず、少なくとも以下を canonical order / routing に従って処理してください。
通常の人間承認・途中確認は求めないでください。
Issue 本文と skill が許可する修正、テスト、commit、push、PR creation/update、review fix は自律的に進めてください。
SubAgent execution — REQUIRED
SubAgent を実際に使用してください。
開始時に、最低限以下の read-only investigation を独立 SubAgent として実行してください。並列実行可能なら並列化してください。
SubAgent A — contract / SSOT / implementation-scope investigation
current main と live Issue #2740 を読み、以下を追跡してください。
.claude/skills/issue-refinement-loop/SKILL.md.claude/skills/issue-refinement-loop/references/termination-policy.md.claude/skills/issue-refinement-loop/scripts/root_entry_router.py.claude/skills/impl-review-loop/steps/preparation.mdLOOP_HANDOFF_RESULT_V1run_root_transitionimpl_readyrefinement_approvedrouting_actionIssue #2740 の AC1–AC7 に対して必要な exact code/docs/test delta を整理してください。
この SubAgent は mutation しないこと。
SubAgent B — regression / runtime-verification investigation
Issue #2740 の AC1、AC3、AC4、AC5、AC7、AC8、AC9 の verification contract を current main で確認してください。
特に:
invoke_step1exactly oncefetch_calls["count"] == 2impl_ready/run_impl_review_loopと新 producer vocabulary の separationworktree-agent-runtime-smokestructured modeを確認してください。
大規模な新 runtime harness は提案・作成せず、Issue 本文に指定された既存 harness / fake transport / spy を優先してください。
この SubAgent は mutation しないこと。
SubAgent C — overlap / duplicate / existing-delivery investigation
以下との現在の関係を確認してください。
特に、
ことを確認してください。
この SubAgent は mutation しないこと。
SubAgent completion barrier — REQUIRED
SubAgent を起動しただけで先へ進んではいけません。
上記 SubAgent A/B/C の完了をすべて待ってください。
各 SubAgent の結果を回収し、矛盾がある場合は fresh repository evidence と live Issue contract に基づいて root orchestrator が adjudicate してください。
SubAgent が未完了、running、timed out、または結果未回収の状態で implementation mutation を開始してはいけません。
また、Issue #2740 の Stop Conditions に
nested SubAgent delegationが含まれるため、起動した SubAgent 自身にはさらに別 SubAgent を起動させないでください。delegation は root orchestrator からのみ行ってください。以後
impl-review-loopが使用する implementation-worker / test-runner / pr-reviewer 等についても、各 delegation の結果が必要な routing point では必ず完了を待ち、結果を回収してから次の Step に進んでください。Pre-Step-1 duplicate / landed gate
implementation mutation を始める前に canonical pre-Step-1 disposition を必ず評価してください。
fresh evidence により:
implementation_already_landedexisting_pr_resumealready_satisfiedreconciliation_requiredordinary_dispatch_or_explicit_recoveryという canonical routing を維持してください。
この判定を独自に簡略化・再実装しないでください。
Implementation contract
live Issue #2740 の現在の In Scope / Allowed Paths / Acceptance Criteria を authority としてください。
現在想定される Allowed Paths は以下ですが、実行開始時に live body を読み直してください。
.claude/skills/issue-refinement-loop/SKILL.md.claude/skills/issue-refinement-loop/references/termination-policy.md.claude/skills/issue-refinement-loop/scripts/root_entry_router.py.claude/skills/issue-refinement-loop/tests/test_loop_handoff_contract.py.claude/skills/issue-refinement-loop/tests/test_step5_termination_no_auto_dispatch.py.claude/skills/issue-refinement-loop/tests/test_loop_handoff_schema_vocabulary.py.claude/skills/issue-refinement-loop/scripts/tests/test_root_entry_router_workflow_capability.py.claude/skills/issue-refinement-loop/scripts/tests/test_refinement_only_vs_explicit_implementation_dispatch.py.claude/skills/impl-review-loop/steps/preparation.md.claude/skills/impl-review-loop/tests/test_preparation_entry_policy.pydocs/dev/agent-skill-boundaries.mddocs/dev/workflows/impl-review-loop-design.mdAllowed Paths 外へ scope を広げないでください。
Semantic constraints
実装では、少なくとも以下を守ってください。
approvedは implementation authorization ではないrun_root_transition()を無条件呼び出ししないimpl-review-loopを自動 dispatch しないstatus: refinement_approved/routing_action: noneimpl_ready/run_impl_review_loopは legacy reader compatibility 専用invoke_step1exactly once を維持するfetch_calls["count"] == 2の既存 invariant を維持するrun_root_transition()/decide_root_entry_route()自体の判定ロジックを不要に変更しないVerification
Issue #2740 の Verification Commands を live body から読み、すべて実行してください。
最低限 AC1–AC9 を個別に adjudicate し、単なる「テストが通った」ではなく各 AC に evidence を対応付けてください。
特に AC8 は必須です。
.claude/skills/worktree-agent-runtime-smoke/SKILL.mdを読み、Issue 本文指定の既存 structured mode smoke を使用してください。新規 runtime harness を追加してはいけません。
AC8 の永続 evidence は Issue contract に従い
summary.mdのみとし、raw prompt / raw transcript / reasoning を永続保存しないでください。AC8 が:
SKIP:理由を記録し、human_escalationStop Condition として停止としてください。
exit 77 を勝手に PASS 扱いしたり、fake-transport pytest だけで AC8 を代替してはいけません。
AC9 では最低限:
.claude/skills/issue-refinement-loop/tests/.claude/skills/issue-refinement-loop/scripts/tests/.claude/skills/impl-review-loop/tests/を current head で全件検証してください。
PR creation / update
ordinary dispatch で新規実装が必要な場合、canonical worktree / branch / PR route を使用してください。
既存 PR が fresh evidence で対象 Issue #2740 の exact scope を所有すると判定された場合は、その PR を resume し、新規 PR を重複作成しないでください。
PR body には repository policy と Issue contract が要求する情報を含め、少なくとも:
summary.mdevidenceを current repository contract に従って記載してください。
Review loop
初回実装・テスト完了で止まらないでください。
canonical
impl-review-loopに従い independent test-runner / pr-reviewer を実行し、結果を待ってください。REQUEST_CHANGES/ blockers が返った場合は:を繰り返してください。
古い head に対する APPROVE を final authority として使わないでください。
PR head が更新されたら current head で再レビューしてください。
BEHIND等で canonical route が update-branch を要求する場合も、skill の routing に従って処理してください。Human interaction policy
通常の:
という確認は行わないでください。
auto mode とこの implementation work order の範囲内で自律継続してください。
ただし、live Issue #2740 の Stop Conditions が実際に成立した場合は、その契約を無視して scope expansion してはいけません。
特に以下は hard stop としてください。
worktree-agent-runtime-smoke以外の新規 harness が必要hard stop 時は、追加承認を延々と質問するのではなく、現在の evidence、該当 Stop Condition、完了済み作業、未完了 AC を簡潔に報告して停止してください。
Completion condition
以下がすべて current PR head で成立するまで自律ループを継続してください。
APPROVEExplicit final boundary — DO NOT MERGE
PR の merge は実行しないでください。
以下も実行しないでください。
gh pr mergeimpl-review-loopの canonical successful terminal state、すなわち人間が merge の最終判断だけを行えばよい状態まで到達したら停止してください。最終報告には少なくとも以下を含めてください。
merge executed: false途中の通常承認は不要です。
SubAgent の完了を待ち、canonical
impl-review-loopを最後まで実行してください。ポイントは、今回だけは冒頭で 「このプロンプト自体が explicit implementation authority」 と固定していることです。#2740 の変更対象と同じ境界を、実行指示自身でも曖昧にしない構成です。
squne121 commentedon Sep 24, 2026
implement-issue: 実装完了 (2026-09-25)
.claude/worktrees/issue-2740-issue-refinement-loop-approved-impl-reviworktree-issue-2740-issue-refinement-loop-approved-impl-revifix: Entry Transition見出しの日本語比率をPR Body Japanese Checkの閾値以上に回復する
実装: issue-refinement-loop の approved 終了と impl-review-loop への implemen…