Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phase
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "delivery-rollup parentのmissing_required_parent_sectionを、既存owner_anchor structural repairが完全に解消できる場合だけcanonical apply laneへ安全に遷移させる"
change_kind: codeParent Issue
none(#2572 のM5 Workstreamではなく、issue-refinement-loopの独立したtooling修正)
Parent Goal Ref
- Goal: trusted direct-human contextから得たexact owner-anchor source spanを、既存のstructural repair modelで安全に消費する。
- Desired Destination: parent delivery-rollupのrequired sectionがauto-apply-safeに完全被覆されるときだけ、無関係なfail-closed blockerを許容せずcanonical structural repairへ進む。
Current Validated Scope
run_refinement_preflight.pyのdeadlock overrideが、parent planner固有のmissing_required_parent_sectionを、既存のimplementation/research用missing_required_sectionと同じ「当該structural repair自身が完全に解消する」原因として扱えていない。- 導入: M5 Playable Slice Hardening 実装 parent tracker #2572 のfresh preflightでは、
Quality Decision Record、Child Issues、Remaining Parent Gapsの3件がtrusted OWNER anchorからexactに解決され、bundleの3 itemはいずれもauto_apply_safeかつexactである。 - それでも
PLANNER_FAIL_CLOSED、missing_required_parent_section、structural_repair_action_deferred:structural_auto_apply_safe_items_presentによりblockedとなる。
Remaining Parent Gaps
- 導入: M5 Playable Slice Hardening 実装 parent tracker #2572 のcontract updateとWS2/WS4 materializationは、この修正がmainへmergeされた後にfresh preflightから再開する。
Outcome
parent delivery-rollupの完全被覆されたauto-apply-safe structural repairが needs_fix / apply_deterministic_structural_repair に到達し、無関係なblockerは引き続きfail-closedとなる。
Runtime Verification Applicability
- decision: not_applicable
- reason: issue-refinement-loopのPython routingとfixture-based regressionのみを変更し、browser/runtime実行を伴わないため。
In Scope
_structural_deadlock_override_eligible()の許容原因コードに、parent delivery-rollupのmissing_required_parent_sectionを限定追加する。ただし対象のmissing_required_parent_sectionは、当該 structural repair bundle 自身が required parent sections(Quality Decision Record / Child Issues / Remaining Parent Gaps)を exact かつ full coverage で解消できる場合に限り eligible とする。- override 採用後の blocker cleanup(
result["blockers"]からの除去)も同一 scope として拡張し、上記条件を満たすmissing_required_parent_section・対応するstructural_repair_action_deferred:*・companionPLANNER_FAIL_CLOSEDを除去する。無関係な blocker は絶対に除去しない。 - 現状 eligibility 判定と cleanup 判定は同一の reason-code 条件をミラーする形で個別実装されており(fact-check済み、現時点で drift はない)、片方だけを拡張すると再び乖離しうる。小さな共通 predicate/helper の抽出は許容するが、新しい policy framework の導入は行わない。
- parent delivery-rollup production shape(
issue_kind: parent、parent_mode: delivery-rollup、必要ならclosure_mode: child-complete、required targets: Quality Decision Record / Child Issues / Remaining Parent Gaps、structural repair bundle の対象3itemがexactかつauto_apply_safe、required targetsを過不足なくfull coverage、planner reasonがmissing_required_parent_section)で、最終結果がneeds_fix/apply_deterministic_structural_repairかつ対応blocker cleanup済みとなるpositive regressionを追加する。可能なら.github/ISSUE_TEMPLATE/parent.ymlのrequired section名をtest doubleへ反映し、reason string単独をimplementation fixtureへ注入するfake-positiveを避ける。 - 既存の無関係blocker namespace、ambiguous insertion、不完全coverage(structural bundleのcovered targetsがrequired targetsより多い/少ない場合を含む)、auto_apply_safeでないitem、exactでないinsertionをdeferredのまま保つ回帰を維持する。
- implementation/researchの既存
missing_required_sectiondeadlock arbitration regression、および既存 owner-anchor/source-span regression(test_structural_repair_known_scalars_wiring.py)を壊さない。
Out of Scope
- authority kind、derivation model、provenance schema、generic approval/security harness、persistent ledgerの追加。
- #2572本文の直接編集、WS2/WS4のmaterialization、M5 runtime実行。
structural_repair_action.applyconsumer、Issue template、GitHub workflow/CI laneの変更。missing_required_parent_sectionのgeneric human-reframe overridability(FAIL_CLOSED_REWRITE_CONSTRAINTS_V1等)の変更。本Issueの変更は「human decisionだからparent fail-closedを無視する」ものではなく、「exact/full-coverageのstructural repairがそのparent failureを完全に解消する場合に限り、severity arbitrationのdeadlockを解除する」限定exceptionである。- refinement result schema、planner schema、authority kind、provenance schema、permission/security policy、command registry/profileの変更。
- PR #2583で既に成立しているowner-anchor/source-span provenance・stale-source・mutation直前freshness validationのnegative matrixの重複追加(新規security/provenance harnessは追加しない。既存suiteでの維持確認のみ行う)。
Acceptance Criteria
- AC1: parent plannerの
missing_required_parent_sectionとPLANNER_FAIL_CLOSEDだけが存在し、auto-apply-safeなstructural repair bundleがrequired parent sections(Quality Decision Record / Child Issues / Remaining Parent Gaps)をexactに完全被覆する場合、preflightはneeds_fix/apply_deterministic_structural_repairを返し、かつresult["blockers"]から解消済みのmissing_required_parent_section・対応するstructural_repair_action_deferred:*・companionPLANNER_FAIL_CLOSEDが除去され、無関係なblockerは誤って除去されない。needs_fixと「既に解消済みのblockerが残っている状態」が同時成立しない。 - AC2:
missing_required_sectionとmissing_required_parent_section以外のblocker namespace、ambiguous insertion、または不完全coverage(structural bundleのcovered targetsがrequired targetsより多い/少ない場合、itemがauto_apply_safeでない場合、insertionがexactでない場合を含む)がある場合、既存どおりstructural actionをdeferしblockedを維持する。 - AC3: implementation/researchの既存
missing_required_sectiondeadlock arbitration regressionと、既存owner-anchor/source-span regression(test_structural_repair_known_scalars_wiring.py)が維持される。
Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_structural_repair_deadlock_arbitration.py
# AC2
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_structural_repair_deadlock_arbitration.py
# AC3
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_structural_repair_known_scalars_wiring.pyAllowed Paths
.claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py.claude/skills/issue-refinement-loop/tests/test_structural_repair_deadlock_arbitration.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- authority kind、derivation model、command profileの変更が必要と判明した場合。
Required Skills
なし
Required Design References
.claude/skills/issue-refinement-loop/SKILL.mddocs/dev/agent-skill-boundaries.mddocs/dev/workflow.md
Scope Delta(任意)
N/A
Source
- parent incident: 導入: M5 Playable Slice Hardening 実装 parent tracker #2572
- trusted anchor: 導入: M5 Playable Slice Hardening 実装 parent tracker #2572 (comment)
- current failure: fresh canonical
preflight.run.with_human_contexton 2026-09-09
Delivery Rule
- 1 Issue = 1 PR。既存PRをhijackせず、dedicated worktreeでDraft PRを作成する。
- PRがmerge-readyになってもactual mergeおよびauto-merge enableは実行しない。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phase
Activity
squne121 commentedon Sep 10, 2026
結論
Issue #2598 は方向性・スコープとも概ね正しいですが、現状のまま実装開始するなら
REQUEST_CHANGESを推奨します。修正必須はかなり narrow です。特に
missing_required_parent_sectionを eligibility に追加するだけでは不十分で、override 成立後の blocker cleanup も同じ reason code を消費する契約にしないと、解消済み blocker が残ります。新しい schema、authority、permission/security layer、command profile、live canary は不要です。#2598 は、#2582 / PR #2583 で
Severity | Finding | 判定 -- | -- | -- P1 | override 成立後の blocker cleanup が #2598 の scope/AC に入っていない | 修正必須 P1 | positive regression が implementation-shaped fixture のままでも通せる余地があり、parent production shape を証明していない | 修正必須寄り P2 | generic human-reframe override と structural deadlock override の意味論を明確に分離しておいた方がよい | 明文化推奨 P3 | Verification Commands が重複している。新規 runtime/security harness は不要 | 軽微owner_anchor/source_span_exactが実装済みになった後に露呈した次段の arbitration bugとして切り出されており、その分離自体は適切です。#2582 は completed、PR #2583 も merge 済みで、OWNER comment の mutation 前 freshness validation まで既に入っています。P1 — eligibility だけ直すと「needs_fix + 解消済み blocker」が残る
これが最重要です。
現在の
_structural_deadlock_override_eligible()は、blocker として許すものをmissing_required_section[:*]/structural_repair_action_deferred:*/PLANNER_FAIL_CLOSEDに限定しています。#2598 が指摘する通り、ここに
missing_required_parent_sectionがないため #2572 は deadlock します。しかし、その後 override を採用した際の cleanup も現在は、
missing_required_section/structural_repair_action_deferred:*/PLANNER_FAIL_CLOSEDだけを
blockersから除去しています。parent reason はここにもありません。ところが #2598 の In Scope は「
_structural_deadlock_override_eligible()の許容原因コードに限定追加」としか明示していません。したがって素直に実装すると、
のような自己矛盾した result を作り得ます。さらに後段が
blockersを authoritative に扱えば、再度 blocked に寄る危険もあります。Issue の In Scope と AC1 に、少なくとも以下の意味論を追加すべきです。
テストでも
statusとnext_actionだけでなく、まで要求した方がよいです。
実装上は、eligibility と cleanup が別々の reason-code 判定を持っていること自体が今回のような drift を生みやすいため、同じ小さな predicate を双方から使うのも妥当です。ただし新しい policy framework にする必要はありません。
P1 — regression は「parent reason を渡した」だけでは弱い
現在の
test_structural_repair_deadlock_arbitration.pyは、基本的に Implementation Issue の test template/body から structural bundle を作っています。positive case もissue_kind: implementationとmissing_required_sectionを前提にしています。一方、production planner は delivery-rollup parent の required section 欠落を明示的に別 reason code、
missing_required_parent_sectionとして扱い、missing_required_sectionではないことまで既存 regression で保証しています。さらに実際の parent template では
Quality Decision Record、Child Issues、Remaining Parent Gapsはすべて required field で、QDR は delivery-rollup ならN/Aを許容する、という固有意味論があります。したがって、
と reason string だけ parent に差し替えた implementation fixture では、今回の実インシデントを十分証明できません。
推奨する positive regression は、少なくとも次の形です。
issue_kind: parent+parent_mode: delivery-rollup→ required targets がQuality Decision Record / Child Issues / Remaining Parent Gaps→ 3 item が exact + auto_apply_safe → planner reason がmissing_required_parent_section→needs_fix / apply_deterministic_structural_repair→ 対応 blocker が全消去。trusted OWNER source-span の詳細な provenance negative matrix は PR #2583 ですでにかなり厚く検証されています。PR #2583 のレビューでも stale source、container heading、実 #2572 shape が検討され、その後 source comment の mutation 直前 re-fetch まで実装されています。ここを #2598 でも再テストする必要はありません。
つまり parent-shaped arbitration fixture は必要、owner-anchor security/provenance suite の複製は不要です。
P2 —
missing_required_parent_sectionを generic override に昇格させない少し紛らわしい点があります。
現在の planner/schema では
missing_required_parent_sectionは generic な human-decision reframe のnon_overridable_in_current_result側に置かれています。一方missing_required_section/missing_required_contract_keyは generic override 可能です。これは #2598 と直ちに矛盾するものではありません。今回必要なのは、
「human decision だから parent failure を無視する」
ではなく、
「その exact structural repair 自身が、その parent failure の required targets を過不足なく修復するので、一時的な blocked precedence を解除する」
という別の arbitration だからです。
したがって #2598 の Out of Scope にある schema / generic approval policy を変更しない方針は維持すべきです。むしろ一文、
と書いておくと、実装者が「schemaとの整合性のため」と
refinement_preflight_result_v1.schema.jsonやplan_refinement_loop.pyにまで変更を広げる事故を防げます。技術・配布方式の観点
現在の設計で十分です。
Claude Code の公式ドキュメントでも、project skill は
.claude/skills/<skill-name>/SKILL.mdとその配下の supporting scripts として Git 管理され、Claude Code が project filesystem から発見します。supporting Python/shell scripts を Skill 内に置くこと自体が正式な設計です。したがって今回の routing 修正のために plugin packaging、release artifact、installer、別 daemon などを足す必要はありません。(Claude) Anthropic 自身も Agent Skills では決定論的処理を bundled script に任せる設計を推奨しています。(Anthropic)また GitHub Issue Forms の
validations.requiredはフォーム提出時の制約で、生成された回答は Markdown の Issue body になり、その後ユーザーが編集可能です。つまり「parent template では required だった section が後の編集で欠落し、repository tooling が structural repair する」というモデル自体は GitHub の実際の仕様と整合しています。(GitHub Docs)推奨する #2598 の修正
Issue は破棄・再設計せず、次の3点だけ追記してから実装へ進めるのが最も効率的です。
In Scope に、override eligibility だけでなく adopt 後の resolved parent blocker cleanup を追加する。AC1でも
missing_required_parent_section/ structural deferred / companionPLANNER_FAIL_CLOSEDが残っていないことを要求する。positive regression を delivery-rollup parent production shape に固定する。単に implementation fixtureへ parent reason string を注入したテストは AC1 の証拠として認めない。
generic
FAIL_CLOSED_REWRITE_CONSTRAINTS_V1/ human-reframe policy / schema は変更せず、今回の override が exact/full-coverage structural repair 専用であることを明記する。この修正後なら Issue 設計は
APPROVEでよいと判断します。特に、新規 schema、persistent ledger、追加 permission gate、live GitHub mutation canary、Claude native/Claude-GPT の dual-runtime smoke、ブラウザ runtime verificationなどは今回の defect には不要です。#2598 の
## 結論Runtime Verification Applicability: not_applicableと narrow Allowed Paths は維持するのが適切です。テストも既存 Python regression 2系統で十分で、ここでハーネスを増やす方が保守コストの方が大きくなります。Issue #2598 は方向性・スコープとも概ね正しいですが、現状のまま実装開始するなら
REQUEST_CHANGESを推奨します。修正必須はかなり narrow です。特に
missing_required_parent_sectionを eligibility に追加するだけでは不十分で、override 成立後の blocker cleanup も同じ reason code を消費する契約にしないと、解消済み blocker が残ります。新しい schema、authority、permission/security layer、command profile、live canary は不要です。#2598 は、#2582 / PR #2583 で
owner_anchor/source_span_exactが実装済みになった後に露呈した次段の arbitration bugとして切り出されており、その分離自体は適切です。#2582 は completed、PR #2583 も merge 済みで、OWNER comment の mutation 前 freshness validation まで既に入っています。P1 — eligibility だけ直すと「needs_fix + 解消済み blocker」が残る
これが最重要です。
現在の
_structural_deadlock_override_eligible()は、blocker として許すものをmissing_required_section[:*]/structural_repair_action_deferred:*/PLANNER_FAIL_CLOSEDに限定しています。#2598 が指摘する通り、ここに
missing_required_parent_sectionがないため #2572 は deadlock します。しかし、その後 override を採用した際の cleanup も現在は、
missing_required_section/structural_repair_action_deferred:*/PLANNER_FAIL_CLOSEDだけを
blockersから除去しています。parent reason はここにもありません。ところが #2598 の In Scope は「
_structural_deadlock_override_eligible()の許容原因コードに限定追加」としか明示していません。したがって素直に実装すると、
のような自己矛盾した result を作り得ます。さらに後段が
blockersを authoritative に扱えば、再度 blocked に寄る危険もあります。Issue の In Scope と AC1 に、少なくとも以下の意味論を追加すべきです。
テストでも
statusとnext_actionだけでなく、まで要求した方がよいです。
実装上は、eligibility と cleanup が別々の reason-code 判定を持っていること自体が今回のような drift を生みやすいため、同じ小さな predicate を双方から使うのも妥当です。ただし新しい policy framework にする必要はありません。
P1 — regression は「parent reason を渡した」だけでは弱い
現在の
test_structural_repair_deadlock_arbitration.pyは、基本的に Implementation Issue の test template/body から structural bundle を作っています。positive case もissue_kind: implementationとmissing_required_sectionを前提にしています。一方、production planner は delivery-rollup parent の required section 欠落を明示的に別 reason code、
missing_required_parent_sectionとして扱い、missing_required_sectionではないことまで既存 regression で保証しています。さらに実際の parent template では
Quality Decision Record、Child Issues、Remaining Parent Gapsはすべて required field で、QDR は delivery-rollup ならN/Aを許容する、という固有意味論があります。したがって、
と reason string だけ parent に差し替えた implementation fixture では、今回の実インシデントを十分証明できません。
推奨する positive regression は、少なくとも次の形です。
issue_kind: parent+parent_mode: delivery-rollup→ required targets がQuality Decision Record / Child Issues / Remaining Parent Gaps→ 3 item が exact + auto_apply_safe → planner reason がmissing_required_parent_section→needs_fix / apply_deterministic_structural_repair→ 対応 blocker が全消去。trusted OWNER source-span の詳細な provenance negative matrix は PR #2583 ですでにかなり厚く検証されています。PR #2583 のレビューでも stale source、container heading、実 #2572 shape が検討され、その後 source comment の mutation 直前 re-fetch まで実装されています。ここを #2598 でも再テストする必要はありません。
つまり parent-shaped arbitration fixture は必要、owner-anchor security/provenance suite の複製は不要です。
P2 —
missing_required_parent_sectionを generic override に昇格させない少し紛らわしい点があります。
現在の planner/schema では
missing_required_parent_sectionは generic な human-decision reframe のnon_overridable_in_current_result側に置かれています。一方missing_required_section/missing_required_contract_keyは generic override 可能です。これは #2598 と直ちに矛盾するものではありません。今回必要なのは、
「human decision だから parent failure を無視する」
ではなく、
「その exact structural repair 自身が、その parent failure の required targets を過不足なく修復するので、一時的な blocked precedence を解除する」
という別の arbitration だからです。
したがって #2598 の Out of Scope にある schema / generic approval policy を変更しない方針は維持すべきです。むしろ一文、
と書いておくと、実装者が「schemaとの整合性のため」と
refinement_preflight_result_v1.schema.jsonやplan_refinement_loop.pyにまで変更を広げる事故を防げます。技術・配布方式の観点
現在の設計で十分です。
Claude Code の公式ドキュメントでも、project skill は
.claude/skills/<skill-name>/SKILL.mdとその配下の supporting scripts として Git 管理され、Claude Code が project filesystem から発見します。supporting Python/shell scripts を Skill 内に置くこと自体が正式な設計です。したがって今回の routing 修正のために plugin packaging、release artifact、installer、別 daemon などを足す必要はありません。(Claude) Anthropic 自身も Agent Skills では決定論的処理を bundled script に任せる設計を推奨しています。(Anthropic)また GitHub Issue Forms の
validations.requiredはフォーム提出時の制約で、生成された回答は Markdown の Issue body になり、その後ユーザーが編集可能です。つまり「parent template では required だった section が後の編集で欠落し、repository tooling が structural repair する」というモデル自体は GitHub の実際の仕様と整合しています。([GitHub Docs]3)推奨する #2598 の修正
Issue は破棄・再設計せず、次の3点だけ追記してから実装へ進めるのが最も効率的です。
missing_required_parent_section/ structural deferred / companionPLANNER_FAIL_CLOSEDが残っていないことを要求する。FAIL_CLOSED_REWRITE_CONSTRAINTS_V1/ human-reframe policy / schema は変更せず、今回の override が exact/full-coverage structural repair 専用であることを明記する。この修正後なら Issue 設計は
APPROVEでよいと判断します。特に、新規 schema、persistent ledger、追加 permission gate、live GitHub mutation canary、Claude native/Claude-GPT の dual-runtime smoke、ブラウザ runtime verificationなどは今回の defect には不要です。#2598 の
Runtime Verification Applicability: not_applicableと narrow Allowed Paths は維持するのが適切です。テストも既存 Python regression 2系統で十分で、ここでハーネスを増やす方が保守コストの方が大きくなります。squne121 commentedon Sep 10, 2026
推奨は、対象コメントをそのまま operator-selected human context として #2598 の refinement を再実行することです。コメントは
OWNER投稿で、別の human-decision comment を作り直す必要はありません。今回の refinement で固定すべき点はかなり明確です。現行コードでは
_structural_deadlock_override_eligible()と override 採用後の blocker cleanup が別々に reason code を列挙しており、実際に drift が存在します。 また現行 regression は implementation-shaped fixture が主体です。 一方、production の parent template ではQuality Decision Record、Child Issues、Remaining Parent Gapsが required で、delivery-rollup の QDR は N/A を許容しています。サブエージェントについては、対象コメントが現行コード・テスト・PR #2583 の事実を主張しているため、
codebase-investigatorによる read-only fact-check が適合します。canonical Step 2 のために legacyissue-reviewerSubAgent を別途起動するのは避けるべきです。なお現在の
issue-refinement-loopは implementation Issue が approved になると、通常は同一 turn でimpl-review-loopへの root transition まで進む設計です。今回は依頼範囲を Issue refinement の完了までに限定する文面にしています。そのまま対話中の Claude Code に投入するなら、以下を推奨します。
以下を、人間の追加承認なしで実行してください。
対象 repository:
squne121/loop-protocol対象 Issue:
#2598今回の operator-selected human context / anchor comment:
https://github.com/squne121/loop-protocol/issues/2598#issuecomment-5611723077使用する canonical Skill:
.claude/skills/issue-refinement-loopあなたは既に auto mode で起動している対話的 Claude Code です。
/permissionの実行、permission mode の変更、通常の Issue 編集や refinement iteration ごとの人間承認要求は不要です。現在の auto mode をそのまま使用してください。このタスクの目的は、上記 OWNER comment のレビュー指摘を fact-check した上で #2598 の Issue contract に反映し、
issue-refinement-loopを canonical に完走させ、Issue を implementation-ready な品質まで refinement することです。このタスクでは repository 実装そのものには着手しません。Issue body/comment の refinement は実行してよいですが、#2598 の実装用 branch/worktree 作成、repository file の変更、commit、PR 作成、
impl-review-loopによる実装開始は行わないでください。Authority / anchor handling
このプロンプトを実行している operator は、
https://github.com/squne121/loop-protocol/issues/2598#issuecomment-5611723077を今回の
operator_asserted_human_contextとして明示的に選択しています。したがって、この URL を canonical
with_human_contextlane の anchor としてください。同じ内容を新しい human-decision comment として再投稿する必要はありません。
この comment 自体が今回の refinement feedback です。
agent report / unlabeled anchor として再分類しないでください。
ただし、コメント中の repository/current-code に関する事実は権威だけを理由に無条件採用せず、current main に対して fact-check してください。
Canonical entry
.claude/skills/issue-refinement-loop/SKILL.mdと必要な references を読み、そこを SSOT としてください。production preflight を
run_refinement_preflight.pyの直接呼び出しで迂回しないでください。canonical command registry / workflow entrypoint を使用し、今回の anchor について
preflight.run.with_human_context相当の正規 lane を使用してください。skill/planner が生成した routing decision、rewrite constraints、review result を prose で再実装しないでください。
SubAgent requirement
mutation より前に、少なくとも
codebase-investigatorSubAgent を使用して対象コメントの repository fact-check を行ってください。特に以下を current main で確認させてください。
.claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py_structural_deadlock_override_eligible()missing_required_sectionmissing_required_parent_sectionstructural_repair_action_deferred:*PLANNER_FAIL_CLOSED.claude/skills/issue-refinement-loop/tests/test_structural_repair_deadlock_arbitration.py.github/ISSUE_TEMPLATE/parent.ymlQuality Decision RecordChild IssuesRemaining Parent GapsIssue 導入: M5 Playable Slice Hardening 実装 parent tracker #2572 と、その trusted OWNER anchor
https://github.com/squne121/loop-protocol/issues/2572#issuecomment-5584982649Issue 実装: issue-refinement-loop structural repair が trusted human-context anchor の section source_span を consume できるようにする #2582 / merged PR fix: trusted owner anchor section spans #2583
SubAgent は read-only investigation に限定してください。
SubAgent を起動したら、必ずその完了を待って結果を受け取ってから Step 2 以降へ進んでください。SubAgent を fire-and-forget しないでください。
codebase-investigatorとweb-researcherの両方が planner により required と判定された場合は並列実行して構いませんが、両方の完了を待ってから review に合流してください。planner が web research を required としないなら、今回の refinement のためだけに不要な外部調査を追加しないでください。
canonical Step 2 の代替として legacy
issue-reviewerSubAgent を起動しないでください。root-owned review pipeline をそのまま使用してください。Target refinement
対象コメントの結論を単純にコピーするのではなく、fact-check 結果と既存 Issue contract に整合させて #2598 を最小限修正してください。
特に以下を成立させてください。
1. blocker eligibility と blocker cleanup を同一 scope にする
現在の In Scope が eligibility の追加だけに読める場合は修正してください。
少なくとも次の意味論を Issue contract に固定してください。
missing_required_parent_sectionは、structural repair 自身が required parent targets を exact/full coverage して解消できる場合だけ deadlock override eligibility に含める。missing_required_parent_sectionを result blockers から除去する。PLANNER_FAIL_CLOSEDとstructural_repair_action_deferred:*も、その override に対応するものだけ cleanup する。2. AC1 を result consistency まで要求する
AC1 は、
status == needs_fixかつ
next_action == apply_deterministic_structural_repairだけでは不十分です。
成功時に少なくとも以下も契約として要求してください。
missing_required_parent_sectionがresult["blockers"]に残らないstructural_repair_action_deferred:*が残らないPLANNER_FAIL_CLOSEDが残らないneeds_fixと「既に解消済みの blocker が残っている状態」が同時成立しないことを明示してください。3. positive regression を parent production shape にする
単に既存 implementation fixture の
reason_codes=["missing_required_parent_section"]だけを書き換えるテストを AC1 の十分な証拠として認めないでください。
positive regression は少なくとも次の production semantics を持つ形にしてください。
issue_kind: parentparent_mode: delivery-rollup必要なら canonical な
closure_mode: child-completerequired targets:
Quality Decision RecordChild IssuesRemaining Parent Gapsstructural repair bundle の対象3 itemが
exact3 itemすべて
auto_apply_saferequired targets を過不足なく full coverage
planner reason が
missing_required_parent_section最終結果:
needs_fixapply_deterministic_structural_repair可能なら
.github/ISSUE_TEMPLATE/parent.ymlの production semantics を test double に反映し、parent reason string だけを implementation fixture に注入する fake-positive を避けてください。ただし、この refinement で production template 自体を変更対象に追加しないでください。
4. negative regression を維持する
以下はいずれも従来どおり blocked/deferred を維持する契約としてください。
既存 implementation/research の
missing_required_sectiondeadlock arbitration regression も壊さないでください。5. generic human-reframe policy と分離する
Issue に明記してください。
missing_required_parent_sectionの generic human-reframe overridability は変更しない。今回の変更は、
「human decision なので parent fail-closed を無視する」
ものではなく、
「exact/full-coverage の structural repair 自身がその parent failure を完全に解消する場合に限り、severity arbitration の deadlock を解除する」
ための限定 exception です。
したがって、今回の refinement の結果として以下を scope に追加しないでください。
FAIL_CLOSED_REWRITE_CONSTRAINTS_V1の generic policy変更6. PR #2583 の regression を重複させない
PR #2583 で既に成立している owner-anchor / source-span provenance、stale source、mutation直前 freshness validation の negative matrix を #2598 にコピーしないでください。
#2598 では parent-shaped arbitration regression に集中してください。
trusted owner-anchor regression が既存 suite で維持されることの確認は必要ですが、同じ security/provenance harness を新規追加しないでください。
7. Verification Commands を整理する
AC1 / AC2 が同じ test file を使用すること自体は問題ありませんが、同一 command の意味のない重複列挙は整理してください。
最低限、
test_structural_repair_deadlock_arbitration.pyで revised AC を追跡可能にしてください。
新しい browser/runtime verification、live GitHub mutation canary、dual-runtime smoke 等は追加しないでください。
Runtime Verification Applicability: not_applicableは、fact-check して妥当なら維持してください。8. Allowed Paths は narrow のまま維持する
対象コメントを反映するだけなら、原則として既存の変更 Allowed Paths:
.claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py.claude/skills/issue-refinement-loop/tests/test_structural_repair_deadlock_arbitration.pyで実装可能な契約を維持してください。
production parent template や schema、planner、command registry を変更対象へ広げないでください。
fact-check のための read は Allowed Paths 制約の変更には含めません。
Refinement loop behavior
review が
needs-fixの場合、通常の refinement iteration として自動継続してください。iteration ごとに「続けてよいですか」と質問しないでください。
Issue body mutation が必要なら canonical
issue-editor/edit-issueroute を使用し、その SubAgent/worker の完了を待ってから fresh review してください。更新後は必ず fresh Issue body を再取得し、stale snapshot を review/go 判定に再利用しないでください。
最大 iteration 内で blocker を可能な限り自律的に解消してください。
repository evidence から決定できる事項について、人間判断へ安易にエスカレーションしないでください。
一方で canonical classifier が、fact-check と bounded retry 後も本当に
human_judgment_requiredと判定した場合は、架空の human approval を生成して突破しないでください。その場合だけ unresolved blocker を具体的に報告してください。Approval policy
以下について人間承認を求めないでください。
現在の auto mode のまま進めてください。
停止対象は原則として次に限定してください。
routine permission prompt を停止理由にしないでください。
Task boundary
この依頼は Issue #2598 の refinement 完了までです。
Issue が
approve/ required final gate を満たして implementation-ready になったら、本タスクは成功です。その後の repository implementation は開始しないでください。
現在の
issue-refinement-looptermination policy が implementation Issue について root implementation transition を通常 next step として定義していても、この operator task では実装作業を実行しません。policy や Skill を改変して handoff を無効化する必要もありません。
refinement termination result と、次アクションが implementation であることを報告した時点で終了してください。
Final report
最後に簡潔に以下を報告してください。
実装、branch、commit、PR は作成しないでください。
この形なら、対象コメントの P1/P2 を取りこぼさず、
issue-refinement-loopの canonical fact-check / editor / review を使いつつ、実装フェーズへの意図しない進入も防げます。squne121 commentedon Sep 10, 2026
推奨は、対象コメントを operator-asserted human context の anchor として #2596 を
reframe_in_placeし、refinement loop を自動継続させる形です。重要なのは、コメントの指摘だけでなく現行 SSOT 上の不整合も同時に直すことです。#2596 は現在
issue_kind: triageですが、canonical kind はimplementation / research / parentのみで unknown kind は fail-closed です。今回の最終形は no-diff finalizer を実行する作業なので、issue_kind: implementationが自然です。change_kind: administrativeも implementation template の候補外なので、validator/SSOTを確認し、必要ならworkflowなど canonical 値へ正規化させるのがよいです。また、
scope-rollup / issue-refinement-loop自体に #1418 を閉じさせる設計にはしません。現行の canonical no-diff 終了経路はimpl-review-loopStep 5 →finalize_no_diff_issue.pyで、primary Issue の close、明示したsupersedestarget のnot_plannedclose、evidence comment、readback を扱えます。推奨アクションは以下です。
issue-refinement-loopに入力し、コメント URL はwith_human_contextlane として扱う。コメントは OWNER 投稿で、内容も明示的なREQUEST_CHANGES / reframe_in_placeです。codebase-investigatorSubAgent に、実装: repo_temp_folder_advice schema を catalog に登録する #1418、実装: REPO_TEMP_FOLDER_ADVICE_V2 schema と write-root/legacy-root 分離を導入する #2007、PR feat: REPO_TEMP_FOLDER_ADVICE_V2 schema と write-root/legacy-root 分離を導入する #2581、finalizer、issue-kind SSOT、catalog/governance の live main 状態を fact-check させる。起動した SubAgent は必ず完了まで待って結果を回収してから rewrite/review に進む。#2596, reason=completed, supersedes=[1418]、実装: repo_temp_folder_advice schema を catalog に登録する #1418=not_plannedを完了契約にする。AC1/AC2 は文字列存在ではなく exact mapping / governance semantics を証明し、AC3 の current-main failure は 実装: repo_temp_folder_advice schema を catalog に登録する #1418 起因か unrelated regression かを分類する。loop_iteration_approval_gate.default_required: falseです。現在の Claude Code auto mode は変更せず、/permissionや permission mode の変更を通常フローに持ち込まない。canonical skill が明示的にhuman_judgment_required/ environment failure 等を返した場合だけ停止する。そのまま対話的 Claude Code に投入するなら、以下を推奨します。
squne121/loop-protocolの canonical main root で、以下を実行してください。対象:
.claude/skills/issue-refinement-loop目的:
対象コメントを authoritative な operator-selected human context として扱い、Issue #2596 を
REQUEST_CHANGES / reframe_in_placeの方針で改善してください。すでに Claude Code は auto mode で起動しています。
routine な refinement iteration、read-only 調査、Issue 本文更新、skill が許可する GitHub mutation ごとに人間承認を求めないでください。
現在の permission mode を変更したり、
/permissionを要求したり、dangerous permission bypass を追加したりしないでください。.claude/skills/issue-refinement-loopの canonical routing、command registry、controlled mutation lane をそのまま使用してください。必須の進め方
最初に
.claude/skills/issue-refinement-loop/SKILL.mdと、planner がMUST_READとして要求する reference/SSOT を読み、現行契約を正本として実行してください。prose で routing を再実装せず、planner/reviewer/dispatcher の machine-readable result に従ってください。
anchor comment は URL だけの unlabeled lane や agent-report lane ではなく、operator-selected human context として扱ってください。
canonical profileが必要なら
preflight.run.with_human_context相当の正規 lane を使用してください。SubAgent を使用してください。
少なくとも read-only の
codebase-investigatorSubAgent に、anchor comment の事実関係と現在の repository state を独立調査させてください。調査対象には最低限以下を含めてください。
schemas/catalog.yamldocs/dev/schema-governance.md.claude/skills/issue-refinement-loop/.claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md.claude/skills/impl-review-loop/scripts/finalize_no_diff_issue.pydocs/dev/github-ops.mdのISSUE_KIND_POLICY_V1必要なら別の read-only SubAgent を追加して構いません。
起動したすべての SubAgent の作業完了を必ず待ってください。
SubAgent がまだ実行中の状態で Issue rewrite、final review、termination に進まないでください。
各 SubAgent の最終結果を回収・統合してから次の段階へ進んでください。
canonical Step 2 が legacy
issue-reviewerSubAgent を使用しない契約になっている場合、それを勝手に復活させないでください。anchor comment の主張を live repository evidence で fact-check してください。
特に次を確認してください。
repo_temp_folder_advice/v1の catalog entry が current main に存在することschemas/repo_temp_folder_advice_v1.schema.jsonであることscope-rollupが mutation-free planner であり absorbed Issue の close executor ではないことissue-refinement-loopのsuperseded_decision/ Step 4.5 が今回の 実装: repo_temp_folder_advice schema を catalog に登録する #1418 close executor ではないことimpl-review-loopStep 5 のfinalize_no_diff_issue.pyであることtriage: Issue #1418 の superseded 判定と close 処理 #2596 の Machine-Readable Contract も現行 SSOTに照らして修正してください。
現在の
issue_kind: triageをそのまま残さないでください。ISSUE_KIND_POLICY_V1の canonical taxonomy を確認し、今回が「コード差分なしでも GitHub 上の termination mutation を実行する delivery task」であることを踏まえ、原則issue_kind: implementationに正規化してください。change_kind: administrativeについても現行 contract/template/validator の許容値を確認してください。非canonicalなら、意味を変えない最も近い canonical value、原則
workflowを使用してください。推測より live SSOT / validator を優先してください。
anchor comment の内容を反映して triage: Issue #1418 の superseded 判定と close 処理 #2596 を in-place reframe してください。
少なくとも以下を成立させてください。
goal_refと Background から、scope-rollup / issue-refinement-loop が #1418 を canonical superseded close するという誤った routing contract を除去する。
canonical destination を、
impl-review-loopの no-diff / superseded termination と.claude/skills/impl-review-loop/scripts/finalize_no_diff_issue.pyにする。
semantic termination decision を明確化する。
#2596completed[1418]not_plannedevidence は最低限、
実装: repo_temp_folder_advice schema を catalog に登録する #1418 AC1〜AC3の検証結果、
実装: REPO_TEMP_FOLDER_ADVICE_V2 schema と write-root/legacy-root 分離を導入する #2007、
PR feat: REPO_TEMP_FOLDER_ADVICE_V2 schema と write-root/legacy-root 分離を導入する #2581、
triage: Issue #1418 の superseded 判定と close 処理 #2596
に束縛する。
triage: Issue #1418 の superseded 判定と close 処理 #2596 自身の完了条件を追加する。
「実装: repo_temp_folder_advice schema を catalog に登録する #1418 が閉じたが triage: Issue #1418 の superseded 判定と close 処理 #2596 は open」の状態を成功扱いしない。
final postcondition は
ISSUE_FINALIZE_RESULT_V1と live readback を正本に寄せる。少なくとも成功時に、
を確認可能にする。
AC1 は単なる
rghit ではなく、schema_id,definition path,
producer,
consumer
の exact mapping を evidence にする。
AC2 は単なる文字列存在ではなく、
governance docs の producer / consumer / compatibility/provenance semantics を確認する。
AC3 の test failure を分類する。
repo_temp_folder_advice/v1の吸収自体が壊れている場合は 実装: repo_temp_folder_advice schema を catalog に登録する #1418 の superseded close を見送る。unrelated/current-main regression の場合は、それだけを理由に 実装: repo_temp_folder_advice schema を catalog に登録する #1418 を存続させない。
必要なら既存 follow-up materialization policyに従って別 follow-up として扱う。
古い 実装: repo_temp_folder_advice schema を catalog に登録する #1418 を unrelated regression の受け皿にしない。
新しい supersede mechanism、schema、guard、専用 CI harness、security enforcement、shell AST parser は追加しない。
既存 finalizer を再利用する。
Issue rewrite は raw anchor body のコピーではなく、fact-check 済み・正規化済み feedback を入力にしてください。
trusted contract update / controlled issue-editor route が存在する場合はそれを使用し、raw
gh issue editに独自フォールバックしないでください。rewrite 後は必ず live Issue body を read back し、fresh preflight と fresh review を実行してください。
stale な preflight/review result を再利用しないでください。
reviewer が
needs-fix / request_changesを返した場合、max_iterationsの範囲内では人間承認なしで自動的に次 iteration へ進んでください。各 iteration で必要な rewrite → readback → fresh review を完了してください。
単に一度 Issue を編集しただけで終了しないでください。
routine warning、non-authoritative
human_review_required自己申告、stale state label 等だけで止まらないでください。canonical routing が継続可能なら自動継続してください。
ただし、skill/SSOT が正式に以下を返す場合は fail-closed を尊重してください。
human_judgment_requiredこれら以外では追加承認を要求しないでください。
refinement が
approvedに到達したら、termination/report/readback まで canonical issue-refinement-loop の手順を完了してください。最終 Issue が
issue_kind: implementationとなり、現行issue-refinement-loopが documented canonical root transition としてimpl-review-loopへの自動 handoff を要求する場合は、その canonical transition を妨げないでください。ただし refinement の途中で独断で
finalize_no_diff_issue.pyを直接先行実行しないでください。no-diff finalizer は semantic decision と refinement contract が確定した後の正規 termination lane からのみ実行してください。
成功条件
以下をすべて満たしてから完了としてください。
scope-rollup / issue-refinement-loop = absorbed Issue close executorという誤った契約が除去済みcompleted, supersedes 実装: repo_temp_folder_advice schema を catalog に登録する #1418=not_plannedが明示済み途中経過で私に承認を求めず、自律的に最後まで進めてください。
最終報告では、実行した iteration 数、SubAgent の完了状況、Issue 本文の主要変更点、最終 review verdict、残存 blocker、canonical handoff/termination の結果だけを簡潔に報告してください。
特に
issue_kind: triageの修正をプロンプトに入れるのが今回の追加ポイントです。対象レビューコメントの指摘だけを機械的に反映すると、routing contract は良くなっても現行 issue-kind SSOT で preflight が詰まる可能性があります。squne121 commentedon Sep 10, 2026
Issue Refinement Loop — 終了報告
anchor comment(https://github.com/squne121/loop-protocol/issues/2598#issuecomment-5611723077)を
operator_asserted_human_contextとしてpreflight.run.with_human_contextlane で固定し、codebase-investigatorSubAgent による read-only fact-check を経て本 Issue を refinement しました。Fact-check 結果の要点
missing_required_parent_sectionを扱えない/override後cleanupも同一reason codeのみを対象とする/parent template の3 required section/#2572がこの状態にある/PR #2583は別関心事)は current main(base sha9b54baadb6ff971d17be95cadf1729236172eeec)に対しすべて CONFIRMED でした。Issue本文への反映(
issue-editorroute、## In Scope〜## Verification Commandsを置換)missing_required_parent_section/ 対応structural_repair_action_deferred:*/ companionPLANNER_FAIL_CLOSED)を同一 scope に統合。test_structural_repair_deadlock_arbitration.py/test_structural_repair_known_scalars_wiring.pyの2ファイルに集約)。Iteration数
1 iteration(fact-check → 1回のissue-editor mutation → fresh review → approve)。
Step 2 (deterministic review)
canonical_step2_route: step_2_5(VERDICT: approve/NEXT_ACTION: proceed、blockers: 0)。non-blocking improvement 1件(scope_cvs_in_scope_mismatch、severity: warning、Current Validated ScopeとIn Scopeの語彙token重複が閾値未満という定型的な指摘、blockingではない)。Step 2.5 (semantic design review)
semantic_review_applicable: true(checker_gap_count由来)。issue-design-reviewerSubAgentがpinned bodyをレビューし、assessment: findings/ severity: low を1件返却(AC2の負例回帰にparent-shape variantを明示追加してはどうかという任意提案、requires_owner_choice: false)。join_review_results.pyのeffective_verdict: approve(low severityのみのためrewriteへはroutingされない)。Step 4.5
issue_kind: implementationのため follow-up materialization gate は素通り。派生follow-up issueの起票は行いませんでした(semantic reviewの提案は既存AC2の範囲内で実装時に対応可能な粒度のため)。Final Gate(issue-contract-review, mode=execute)
CONTRACT_REVIEW_ONCE_RESULT_V1.status: go(readiness: go, vc_preflight: pass, product_spec: pass, declared_path_overlap: advisory_only/disjoint, idempotency_check: 新規go、既存go commentなし)。Final Gate: passed(
## Verification Commandsを実際に execute しstatus: goを確認した通常経路)。運用上の注記
本 refinement は operator 指示により Issue #2598 の refinement 完了までをスコープとしています。以下の
LOOP_HANDOFF_RESULT_V1marker は通常のissue-refinement-loop終端契約として出力しますが、impl-review-loopへの実際の root transition(run_root_transition()/root_entry_router.pyの実行)はこの run では実行していません。次アクションは implementation(impl-review-loop)です。Note: この operator task の scope は refinement 完了までであり、上記
routing_action: run_impl_review_loopは次アクションの宣言に留まります。本 run では branch/worktree 作成・repository file変更・commit・PR作成・impl-review-loopの起動は一切行っていません。squne121 commentedon Sep 10, 2026
推奨は #2598 を再 refinement せず、fresh な Root-Owned Entry からそのまま
impl-review-loopに投入です。最新の refinement 終了報告では Final Gate がgo、blocker なし、routing_action: run_impl_review_loopまで到達しています。重要なのは、過去の
LOOP_HANDOFF_RESULT_V1を Step 1 の authorization として再利用せず、今回の turn 内で live Issue → current-run contract review → live再取得 → root routing を実施することです。 また、実装・検証・PRレビューはそれぞれimplementation-worker、test-runner、pr-reviewerに委譲するのが現行契約です。サブエージェントの「完了待ち」は特に強く指定した方がよいです。現行 Common Completion Protocol では、
wait_agentの通知だけでは完了扱いにせず、final result の取得とlist_agents上の terminalcompletedの両方が揃って初めて次の routing に進みます。終了点も明確です。
APPROVE単独ではなく、live mergeability がCLEAN/HAS_HOOKS、blocker が空になって初めてdraft_pr_ready。そこで停止して、人間がマージ判断します。 #2598 自身も actual merge と auto-merge enable を禁止しています。以下をそのまま、既に auto mode で起動中の対話的 Claude Code に投入するのを推奨します。
squne121/loop-protocolの canonical repository root で、Issue #2598 を対象に.claude/skills/impl-review-loopを実行してください。対象 Issue:
#2598
あなたは既に auto mode で起動している対話的 Claude Code です。
このタスクでは、通常の実装・検証・修正・PR更新・再レビューごとに人間承認を求めず、
impl-review-loopを マージ直前の canonicaldraft_pr_ready状態まで自律的に完走してください。現在の auto mode をそのまま使用してください。
/permissionの実行、permission mode の変更、dangerous permission bypass の追加、routine operation ごとの承認確認は行わないでください。ただし、canonical Skill / repository policy が定義する真正の hard stop は迂回しないでください。
1. Canonical entry を使用する
最初に以下を読み、current main の内容を SSOT としてください。
.claude/skills/impl-review-loop/SKILL.md.claude/skills/impl-review-loop/steps/preparation.md.claude/skills/impl-review-loop/steps/step-1-implementation.md.claude/skills/impl-review-loop/steps/step-2-verification.md.claude/skills/impl-review-loop/steps/step-4-pr-review.md.claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md.claude/skills/impl-review-loop/steps/step-5-mergeability-handling.mddocs/dev/workflow.mdIssue #2598 の過去の refinement 終了コメントや
LOOP_HANDOFF_RESULT_V1は audit / telemetry として参照して構いませんが、それ自体を Step 1 起動 authorization として使用しないでください。今回の同一 continuous invocation 内で canonical Root-Owned Synchronous Entry Transition を実施してください。
すなわち、
issue-contract-reviewinvoke_impl_review_loopの場合のみ Step 1 起動までを一続きで実行してください。
過去の body SHA、base SHA、GO comment、handoff result を fresh authorization の代用にしないでください。
current live Issue が変更されていれば current-run evidence を優先してください。
2. タスクのゴール
Issue #2598 の現在の contract / Acceptance Criteria を満たす最小実装を行い、
Implementation → Verification → PR Review → fix loop
を繰り返し、最終的に以下を成立させてください。
pr-reviewerの canonical verdict がAPPROVEreviewed_head_shaが一致route_loop_verdict_v2()がapprovedIMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_readyactual merge は実行しないでください。
auto-merge も enable しないでください。
draft_pr_readyに到達した時点を今回の成功終了点としてください。3. Issue #2598 の実装境界
Issue 本文の current live contract を正本にしてください。
特に変更可能範囲は原則として以下の Allowed Paths のみです。
.claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py.claude/skills/issue-refinement-loop/tests/test_structural_repair_deadlock_arbitration.py必要な read-only 調査では関連ファイルを読んで構いませんが、変更は Allowed Paths を越えないでください。
実装では少なくとも以下を成立させてください。
missing_required_parent_sectionを structural deadlock override の対象へ無条件追加するのではなく、当該 structural repair bundle が required parent targets をexactかつ full coverage で解消できる場合にだけ eligible とする。missing_required_parent_sectionstructural_repair_action_deferred:*PLANNER_FAIL_CLOSEDのみを cleanup し、unrelated blocker は除去しない。
eligibility と cleanup の reason-code semantics が今後片方だけ変更されて drift しないようにするため、既存設計を複雑化しない小さな共通 predicate/helper の抽出は許容します。
新しい policy framework は追加しないでください。
missing_required_parent_sectionの generic human-reframe overridability や schema / planner policy は変更しないでください。今回の例外は、
「human decision だから fail-closed を無視する」
ものではなく、
「exact/full-coverage structural repair 自身が failure を完全に解消できる場合だけ severity arbitration の deadlock を解除する」
限定的な structural repair arbitration としてください。
4. Regression の要求
AC1 の positive regression は、単に implementation-shaped fixture の reason code を
missing_required_parent_sectionへ変更しただけの fake-positive にしないでください。
少なくとも production parent semantics として、
issue_kind: parentparent_mode: delivery-rolluprequired targets:
Quality Decision RecordChild IssuesRemaining Parent Gaps3 item 全て
exact3 item 全て
auto_apply_saferequired targets の過不足ない full coverage
planner reason
missing_required_parent_sectionを表現し、
最終結果が
status: needs_fixnext_action: apply_deterministic_structural_repairmissing_required_parent_sectionが blockers に残らないstructural_repair_action_deferred:*が残らないPLANNER_FAIL_CLOSEDが残らないことまで assertion してください。
さらに既存の negative semantics、
auto_apply_safeでない itemでは従来どおり blocked / deferred を維持してください。
既存 AC2 の範囲内で低コストに実現できるなら、parent-shaped fixture を使った negative case も1つ以上追加し、positive case だけ parent production shape で negative case は implementation-shaped のまま、という盲点を減らしてください。
ただし、この追加のために Allowed Paths や policy scope を拡大しないでください。
PR #2583 ですでに保証されている owner-anchor / source-span provenance、stale-source、mutation直前 freshness validation の security/provenance matrix は複製しないでください。
5. SubAgent を必ず使用する
impl-review-loopの canonical delegation を守ってください。少なくとも以下を SubAgent として使用してください。
Step 1
implementation-worker.claude/skills/implement-issueを使わせ、dedicated worktree で、まで実行させてください。
1 Issue = 1 PR を維持し、既存の無関係 PR を hijack しないでください。
Step 2
test-runnerIssue #2598 の literal Verification Commands を current PR head に対して独立実行させてください。
Issue に記載された command を勝手に短縮・置換・省略しないでください。
current head SHA、Issue body SHA、literal command hashes に current-head binding された canonical verification evidence を作り、
VC_ADJUDICATION_RESULT_V1.blocking == falseが成立するまで Step 4 に進まないでください。Step 4
pr-reviewercurrent PR head を対象に
.claude/skills/pr-review-judgeの canonical review を実行させてください。reviewed head、diff、AC、Allowed Paths、Verification evidence を current live values へ具体化して渡してください。
REQUEST_CHANGESなら blocker をfix_deltaとして次の implementation iteration に渡し、修正 → 再検証 → 再レビューを自動継続してください。6. 起動した SubAgent は必ず完了まで待つ
SubAgent を fire-and-forget しないでください。
すべての dispatch site で Common Completion Protocol を厳密に使用してください。
各 SubAgent について、
spawn_agentの canonicaltask_nameを保存する。wait_agentは mailbox activity の待機にのみ使用する。list_agentsで同じ canonical task が terminalcompletedであることを確認する。completedの両方が確認できてからのみ次 Step / routing に進む。errored/interrupted/shutdown/ lifecycle 上のnot_foundは成功扱いにしないでください。新しい iteration では既存 task_name を再利用せず、canonical rule に従って新しい task_name を materialize してください。
nested SubAgent delegation は Issue #2598 の Stop Conditions に抵触するため行わないでください。
root orchestrator → canonical worker/test-runner/pr-reviewer の一段 delegation に留めてください。
7. 人間承認なしで loop を自動継続する
以下について人間へ「続けますか」「修正してよいですか」「pushしてよいですか」等の routine approval を求めないでください。
REQUEST_CHANGESに対する fix iterationBEHINDに対する canonicalupdate_branchrouteStep 1〜4 の SubAgent が単なる boolean field として返す
human_review_required: trueだけを理由に停止しないでください。
canonical Step 5 routing に従ってください。
REQUEST_CHANGESは人間承認要求ではなく loop continuation として扱い、iteration budget 内では自動修正してください。BEHINDは conflict と同一視せず、canonicalroute_to_update_branchを使用してください。reviewed head が stale なら人間を呼ばず
route_stale_head_rereviewで current head を再レビューしてください。BLOCKED/UNSTABLE/DRAFTの merge state を直ちに human escalation に変換せず、current-head CI / branch-protection evaluator と canonical bounded retry に委ねてください。8. genuine hard stop
以下の場合だけ、repository policy が要求する fail-closed / human escalation を尊重してください。
secret / credential / protected boundary の真正な問題
Allowed Paths 外の変更が不可避
Issue 実装: parent structural repair deadlock routingを修正する #2598 の固定 contract / schema / authority model の変更が必要
destructive / irreversible operation が必要
actual Git conflict:
mergeable == CONFLICTINGmerge_state_status == DIRTYcurrent owner が live Issue / PR 上で明示的に停止を要求
pr-reviewerが正式な canonical verdict としてHUMAN_REVIEW_REQUIREDを返したgenuine permission / authorization failure
SubAgent lifecycle integrity failure が canonical recovery 後も解消しない
unrecoverable environment failure
canonical max-iteration / bounded retry budget の exhaustion
Issue 実装: parent structural repair deadlock routingを修正する #2598 が明記するその他の Stop Conditions
routine warning、optional telemetry の欠落、artifact freshness warning、label presentation mismatch 等を独自に hard stop へ昇格させないでください。
hard stop に到達した場合は、policy を改変・無視して突破せず、停止理由と concrete evidence を最終報告してください。
9. PR review loop の終了判定
pr-reviewerのAPPROVEだけで終了しないでください。毎回 current live PR state を取得し、canonical
route_loop_verdict_v2()で判定してください。成功は少なくとも、
APPROVE[]reviewed_head_sha == current PR headroute_loop_verdict_v2().route == approvedを満たすことです。
これを満たしたら、
IMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_readyを emit して終了してください。
その先の merge は実行しないでください。
gh pr merge等を実行しないでください。auto-merge を enable しないでください。
10. 最終報告
最後に簡潔に以下を報告してください。
completedまで確認済みかroute_loop_verdict_v2()の final routeIMPL_REVIEW_LOOP_RESULT_V1.status成功時は
draft_pr_readyまでで終了してください。actual merge / auto-merge enable は行わないでください。
この prompt では、前回の refinement で得た
impl_readyを信用しすぎず fresh root entry を再実行することと、wait_agentの通知だけで先へ進まず SubAgent の final result + terminal completed を必須にすることを特に強化しています。これが現在のリポジトリ契約に最も沿っています。fix: 親issue delivery-rollup構造修復のseverity-arbitrationデッドロックを解消する (#2598)
squne121 commentedon Sep 10, 2026
impl-review-loop: 完了 (2026-09-10T04:00:00Z)
route_loop_verdict_v2()はmerge_state_status: BLOCKED(Draft PRのためbranch protection review未充足、実conflictではない)を検出しfail_closed/defer-to-CI-evaluator を返したが、required CI(build/lint/test/typecheck/validate-generated-artifact)はcurrent headで全てSUCCESS、blockersは空、reviewed_head_sha一致を確認済み)fix: structural deadlock override の insertion disposition 判定をpositive…
squne121 commentedon Sep 10, 2026
impl-review-loop: 完了 (2026-09-10T04:30:00Z)
今回処理した operator-selected fix delta
PR #2603 への敵対的レビューコメント(https://github.com/squne121/loop-protocol/pull/2603#issuecomment-5612862445)で指摘された P2 (non-blocking) finding を反映しました。
.claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py:_structural_deadlock_override_eligible()の insertion disposition 判定を negative check(disposition == "ambiguous"のみ拒否)から positive allowlist(disposition != "exact"は拒否)へ変更。既存の狭い predicate 内での意味論変更のみ。.claude/skills/issue-refinement-loop/tests/test_structural_repair_deadlock_arbitration.py:ambiguous以外の unknown/future な non-exact disposition("partial"/"unknown_future_value")で_structural_deadlock_override_eligible()がFalseを返す direct-unit regression を追加(schema validationをバイパスした直接呼び出し)。fix: 親issue delivery-rollup構造修復のseverity-arbitrationデッドロックを解消する (#2603)
squne121 commentedon Sep 10, 2026
post-merge-cleanup: 完了 (2026-09-10T04:42:00Z)