Repository navigation
docs: step-4-pr-review に discovery-failure recovery routing を追記 - #2429
Conversation
SubAgent 定義変更後の delegation `not found` を即座に停止条件とせず、 Stage A(bounded live-reload retry)→ Stage B(candidate-head fresh direct invocation)→ Stage C(child delegation diagnostic、必要時のみ) の順に自律的に回復を試みる運用手順を pr-reviewer spawn_agent 直前に明記する。 `--add-dir` の watch 挙動と本 repository が採用しない理由、および candidate head 変更時の runtime evidence stale 化ルールも併記する。 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2429/ The preview will be removed when this PR is closed. |
PR Review Verdict (impl-review-loop Step 4)Mergeability: mergeable=MERGEABLE, merge_state_status=BLOCKED, isDraft=true verdict: APPROVE
reviewed_head_sha: "fb60fda024817899a83a815afea35fa511bf8360"
blockers: []
warnings:
- "merge_state_status is BLOCKED and PR is a Draft; deferred to control-plane routing (route_loop_verdict_v2)." |
判定REQUEST_CHANGES です。 方向性はかなり改善されています。Issue #2416 の旧案にあった「live reload されない前提」「 ただし、Stage B の中心契約が、現在参照している repository asset では実際に満たせません。 ここは merge 前に直すべきです。 P1 / blocking — Stage B の「candidate-head 定義を使用した証明」を推奨 route 自身ができないPR は Stage B の成功条件として、
ことを要求し、その実行手段として しかし、その runner の canonical documentation は project-discovery lane について明確に、
と定義しています。つまり、PR が Stage B の標準 route として推薦している route では、PR 自身の成功条件 (ii) を証明できません。 これは形式論ではありません。Claude Code は同名 agent に対して managed settings → 最小修正は、新しい harness を作ることではありません。Stage B を次のように分離すれば十分です。
なお公式にも P1 / blocking — Stage B の「レビュー結果を通常ループへ戻す」handoff が未定義新しい Stage B は fresh これは実行すると問題になります。
一方 さらにその直後の Common Completion Protocol は、通常 child route の 今の文面だと実装者によって、
のいずれも起こり得ます。 ここも docs 数行で直せます。Stage B に、
と明記するのが最小です。 これは PR #2398 で既に問題になった「テスト/producer が成功している意味と、実 control-plane が消費する意味を一致させる」という基準とも整合します。PR #2398 の敵対的レビューでも、CI green ではなくこの semantic wiring のズレを blocker としています。 P1 / current-state blocker — 現在の APPROVE は current head に対して stale現在の PR head は 一方、PR に残っている APPROVE verdict は しかも current head は 2026-08-30 05:11 UTC の これは新しい gate を増やす話ではありません。上の修正を入れた最終 head で 一度だけ current-head review + required CI を再取得すれば十分です。 P2 —
|
OWNER REQUEST_CHANGES review に基づき、既存の Discovery-Failure Recovery Routing 節の Stage B を修正する。 - plain --agent route は canonical review recovery を回復するのみで、 candidate-definition binding の証明にはならないことを明示し、証明が 必要な場合の passthrough tier (verify_pr_reviewer_permission_boundary.py と同じ仕組みの再利用) を追加した (P1) - Stage B のハンドオフ (実際の pr_number / reviewed_head_sha を渡し、 fresh process の出力を canonical LOOP_VERDICT として parse し、成功時は そのイテレーションの pr-reviewer 結果を代替すること) を明文化した (P1) - pre-dispatch discovery failure と、生成済み child task の list_agents not_found (Common Completion Protocol の対象) の区別を追記した (P2) - Stage B の fresh Claude runtime は呼び出し元 session と同じ runtime/adapter (例: claude-gpt) を継承することを明記した (P2) 新しい harness/schema/script は追加せず、既存の passthrough パターンと 既存節の記述のみを修正する。
OWNER REQUEST_CHANGES fix_delta 対応(新 head:
|
PR Review Verdict (impl-review-loop Step 4, iteration 1 — 再レビュー)OWNERのREQUEST_CHANGES(issuecomment-5466891128)を受け、fix_deltaを適用した head に対する独立再レビュー。 Mergeability: mergeable=MERGEABLE, merge_state_status=BLOCKED(Draft), isDraft=true
verdict: APPROVE
reviewed_head_sha: "0e45579c567d3fa81930c4afe45adcce55f93c60"
blockers: []
warnings:
- "PR body's 検証コマンド結果 section shows stale line-number output from pre-fix commit fb60fda0, not refreshed against current head 0e45579c."
- "Issue #2416's own AC2 text does not yet reflect the now-implemented Tier 1/Tier 2 split for Stage B (authorized refinement, but Issue body not updated for permanent record)." |
Summary
.claude/skills/impl-review-loop/steps/step-4-pr-review.mdのpr-reviewerspawn_agent直前に「Discovery-Failure Recovery Routing」セクションを新設し、SubAgent 定義(.claude/agents/*.md)変更後に対象 agent への delegation がnot found等で失敗しても、Stage A(bounded live-reload retry)→ Stage B(candidate-head fresh direct invocation)→ Stage C(child delegation diagnostic、必要時のみ)の順に自律的に回復を試みる運用手順を明記した。--add-dirは.claude/agents/を discovery 対象としてロードするが watch されないこと、本 repository が--add-dirを recovery route の第一候補にしない理由(${CLAUDE_PROJECT_DIR}interpolation を壊すため。discovery 不可が理由ではない)、および candidate head が変わった場合の既存 runtime evidence の stale 化・再取得ルールを明記した。.claude/skills/impl-review-loop/steps/step-4-pr-review.md)単独への追記のみで、既存記述の削除・再構成は行っていない(65 insertions, 0 deletions)。Checks
pnpm typecheck(tsc --noEmitexit 0)pnpm lint(eslint .exit 0)pnpm test(vitest run— Test Files 109 passed / Tests 1881 passed)pnpm build(tsc && vite buildexit 0).claude/skills/impl-review-loop/steps/step-4-pr-review.mdのみを変更する docs-only 変更のため src/ 配下への影響は想定していないが、必須検証(docs/dev)に従い全 4 コマンドを実際に実行して確認した。加えてuv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.pyも 24 passed を確認済み。Schema Change Applicability
not_schema_changeSchema Consumer Inventory
N/A(
not_schema_changeのため)。Safety Claim Matrix
step-4-pr-review.mdの記述追記のみであり、既存の permission / sandbox / hook の実行時挙動(.claude/settings.json、.claude/hooks/*、agent frontmatter 等)を一切変更しないgit diff --statは.claude/skills/impl-review-loop/steps/step-4-pr-review.md1 ファイルのみ、65 insertions / 0 deletions(コード・設定ファイルの変更なし)--agent <name>直接起動、またはverify_pr_reviewer_permission_boundary.pyと同様の--agents <json>passthrough route のみを再利用し、新しい permission 緩和・bypass 機構を追加しないworktree-agent-runtime-smokestructured lane・--claude-agent-name <name>route、またはverify_pr_reviewer_permission_boundary.pyと同様の route を再利用してよい」と明記し、新規 harness/script の追加を行っていない(Out of Scope に明記)worktree-agent-runtime-smokeの subagent causal evidence 機構(hook_id_correlated判定)をそのまま使い、新規の evidence 偽装経路を作らないrun_worktree_agent_runtime_smoke.pyへの変更を行っていない記載ルール遵守:
Not controlledは全行n/aのため、無限定のsafe/read-only/sandboxed/isolated/completeの主張は本 PR 本文に含めていない。Notes
impl-review-loopStep 4(PR review)の運用手順ドキュメントのみを対象とし、worktree-agent-runtime-smokeharness 自体・verify_pr_reviewer_permission_boundary.py・PR feat: route_canonical_step2_result() に verified failure_class ベースの operator intervention route を追加する #2398 / PR fix: pr-reviewer の hooks frontmatter を block-style YAML に書き換える #2415 の feature diff には一切触れていない(Issue 実装: SubAgent 定義変更時の candidate-head bootstrap review を worktree-agent-runtime-smoke で自動回復する #2416 の Out of Scope に準拠)。検証コマンド結果
Issue #2416 の Verification Commands(rg ベースの静的テキスト照合)を実装後に実行し、全て PASS を確認した。
いずれも exit 0(PASS)。追加で
validate_japanese_content.py --threshold 0.1をローカル preflight として実行し、aggregate_ratio: 0.408(全 47 prose block PASS)を確認済み。