Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "gate 導入前の履歴 Issue の注記更新が、既存の readiness 欠陥だけを理由に edit transaction で拒否される状態を解消する"
change_kind: workflowParent Issue
none
Parent Goal Ref
- Goal: 過去実装を再開しない履歴・注記更新で、編集前から存在する readiness 欠陥を新たな編集ブロッカーにしない。
- Desired Destination:
edit_issue_txn.pyが、編集前 live body と同一の blocking 欠陥のみを持つ CLOSED 履歴 Issue の note-only 更新を通し、新規実装・再開 Issue の readiness は従来どおり適用する状態。
Current Validated Scope
- CLOSED の履歴 Issue 実装: workflow trusted signalsとIssue/PR Task equivalenceをTask Contextへ統合する #2565 の本文を、過去実装を再開しない明確化のみの note-only 更新として
.claude/skills/edit-issue/scripts/edit_issue_txn.py経由で行おうとしたところ、RUNTIMEASSERT001(contract_readiness_check.pyの runtime_assertion_binding_coverage。hook-chain-runtime-smokeの 2 assertion とsubagent-lifecycle-causal-evidence-smokeの 1 assertion のruntime_assertion_bindings未宣言)でfailed_no_mutationになった。編集前の live 本文でも同じneeds_fixだった。結果として 実装: workflow trusted signalsとIssue/PR Task equivalenceをTask Contextへ統合する #2565 には本文更新ではなく comment 追記で退避した。 - 証跡: 実装: Runtime Verification の assertion 単位 applicability を表現し、無関係な assertion の AC binding が readiness 通過のための空 evidence になる false-required を防ぐ #2852 の 2026-09-30 comment(marker
loop-protocol/evidence:2852:from-2827:2565:v1)と、OWNER 指摘 実装: Runtime Verification の assertion 単位 applicability を表現し、無関係な assertion の AC binding が readiness 通過のための空 evidence になる false-required を防ぐ #2852 (comment) の「4. P2」。 edit_issue_txn.pyのrun_transactionは 2 箇所で拒否し得る。(a)_fetch_issueより前に、forwarding payload のneeds_fix(resolution_evidence無し)をreadiness_needs_fix_without_resolution_evidenceで即failed_no_mutationにする。(b) hygiene autofix 後のmutated_candidateに対するcontract_readiness_check.py --mode staticが非 0 ならguard_or_readiness_failed_before_mutationでfailed_no_mutationにする。いずれも edit 前の live body の readiness とは比較しない。_fetch_issueはtitle,body,updatedAtのみを取得し state を持たない。contract_readiness_check.pyのRUNTIMEASSERT001は assertion ごとではなく aggregate error 1 件を返し、assertion 単位の構造化 fingerprint は公開契約に無い。ISSUE_EDIT_TXN_RESULT_V1はadditionalProperties: falseで、成功時の互換記録用 field は無い。- 本 Issue の write-capable scope は
edit_issue_txn.pyの入口判定とその tests に限る。 - 近接だが別件: 実装: Runtime Verification の assertion 単位 applicability を表現し、無関係な assertion の AC binding が readiness 通過のための空 evidence になる false-required を防ぐ #2852(assertion 単位 applicability の表現。PR feat: Runtime Verification の assertion 単位 applicability を disposition として表現する (#2852) #2927 でマージ済み)、再発防止: skill-invocation-runtime-smoke の assertion applicability を明示化する #2775(policy の assertion 選択精度)、実装: orchestrate_runtime_smoke() の aggregate status=pass が、必須 scenario が skipped でも AC の PASS 証跡として使える欠陥を防ぐ #2841(skipped aggregate)、実装: Issue 本文の書き込み前 gate で canonical H2 の重複を fail-closed に拒否し、malformed body の live 書き込みを防ぐ #2819(canonical H2 重複 gate)。
Remaining Parent Gaps
なし(独立した follow-up)。#2852 の matcher / checker 変更とは Allowed Paths を重ねない。
Outcome
edit_issue_txn.py が、live state が CLOSED で、body のみの transaction であり、## Notes for Reviewer 以外の全 H2 section が live body と byte 同一で、かつ live body と candidate の blocking readiness 欠陥が完全一致する更新を、pre-existing defect だけを理由に拒否しない。guard / hygiene、expected_previous_body_sha256 / updatedAt 照合、post-edit readback は維持され、OPEN Issue・欠陥増加・note surface 外変更・title / relationship 同居は従来どおり拒否され、ISSUE_EDIT_TXN_RESULT_V1 の key / schema は不変である状態が、.claude/skills/edit-issue/scripts/edit_issue_txn.py と .claude/skills/edit-issue/tests/test_edit_issue_txn.py の更新と新規 .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py の追加(1 PR)と、下記 AC の pytest がすべて PASS することで確認できる。
Runtime Verification Applicability
- decision: not_applicable
- reason: 変更対象は edit transaction helper の静的な判定ロジックと unit test であり、fake の gh / readiness 実行で決定論的に検証できる。hook や Claude process の実行時挙動は変更しない。
In Scope
- 前段 gate の遅延:
readiness_forwarding_payload.readiness_result.statusがneeds_fix(resolution_evidence無し)の場合のみ、_fetch_issueによる live readback 後まで拒否判定を遅延する。human_judgment/input_or_runtime_errorは従来どおり即 fail-closed とする。下記互換 lane の条件を 1 つでも満たさない場合は、従来と同一のreadiness_needs_fix_without_resolution_evidence・failed_no_mutation・子プロセス起動なし・mutation なしを維持する。既存 guard を無条件には解除しない。 _fetch_issueの 1 回の live readback(--json title,body,updatedAt,state)からtitle/body/updatedAt/stateを同一 snapshot として取得し、そのstateで CLOSED を判定する(caller 申告・別 request の state 取得は使わない)。この変更で exact-argv の fake が壊れるscripts/agent-guards/tests/test_skill_runtime_exec_anchor.pyは、production の semantics を歪めず、fake の許容 argv にstate付き形を追随させる最小修正のみ行う。- 互換 lane は transaction 全体を拘束する。以下をすべて満たす場合のみ、candidate の readiness 失敗を pre-existing defect だけとして通す。
- live state が CLOSED である。
title_updateが absent またはrequired == falseである。native_relationshipsが absent、または明確な no-op(parent.action == unchangedかつadd_*/remove_*がすべて空)である。- note surface: 実際に write される hygiene autofix 後の
mutated_candidateについて、変更可能なのは## Notes for Reviewersection のみ(無ければ追加)とし、それ以外の全 H2 section が live body と byte 同一である。比較対象は raw candidate ではなくmutated_candidate。H2 境界と fenced code block の判定は、独自 parser を持たず、repo の GFM/CommonMark 準拠 shared primitive(.claude/skills/create-issue/scripts/prose_boundary_policy.pyのiter_markdown_blocks()/parse_atx_heading_line())を再利用する(indent 4 spaces 以上の fence 風 line は fence opener ではない、closing fence は同種かつ opening 以上の長さのみ、0-3 spaces indent の ATX H2 も H2 として扱う)。 - defect identity: live body と
mutated_candidateの双方に実contract_readiness_check.py --mode staticを実行し、errors[]の各要素の(rule_id, category, section, minimal_context)を不透明な値とする multiset(collections.Counter、multiplicity 保持)が完全一致する。line_start/line_end/fix_hintは比較から除外する。minimal_context等の prose は再パースしない。checker 出力が JSON でない、または exit code が 0 / 1 以外なら fail-closed とする。candidate が live に無い error を持つ、または件数が増える場合は拒否する。subset / partial repair は対象外(通常 readiness lane に任せる)。
- 通した場合も guard / hygiene、
expected_previous_body_sha256照合、updatedAt 照合、post-edit readback は従来どおり実行する。 ISSUE_EDIT_TXN_RESULT_V1の key / schema は変更せず、成功 result のerrorsは空のままとする(成功時errors[]を telemetry に流用しない)。- 上記を新規 test file test_edit_issue_txn_preexisting_readiness.py の test で固定する(既存 test_edit_issue_txn.py は必要な更新・共通 helper 利用のみ)。gh の mutation / readback は fake でよいが、実
contract_readiness_check.py --mode staticを historical RUNTIMEASSERT001 系 fixture 本文(hook-chain-runtime-smoke/subagent-lifecycle-causal-evidence-smokeのruntime_assertion_bindings未宣言を再現するもの)に対して起動する test を最低 1 本含める。
Out of Scope
- assertion 単位 applicability の表現(実装: Runtime Verification の assertion 単位 applicability を表現し、無関係な assertion の AC binding が readiness 通過のための空 evidence になる false-required を防ぐ #2852 / PR feat: Runtime Verification の assertion 単位 applicability を disposition として表現する (#2852) #2927)、policy の assertion 選択精度(再発防止: skill-invocation-runtime-smoke の assertion applicability を明示化する #2775)、skipped aggregate(実装: orchestrate_runtime_smoke() の aggregate status=pass が、必須 scenario が skipped でも AC の PASS 証跡として使える欠陥を防ぐ #2841)、canonical H2 重複 gate(実装: Issue 本文の書き込み前 gate で canonical H2 の重複を fail-closed に拒否し、malformed body の live 書き込みを防ぐ #2819)の再実装。
- 新規 approval layer、schema registry、wrapper / harness、generic framework、unrelated hardening の追加。
- CLOSED Issue 全般の検査免除(CLOSED でも欠陥の悪化や note surface 外の変更は従来どおり拒否する)。
contract_readiness_check.py/ matcher /check_issue_contract.pyの変更。.claude/skills/edit-issue/SKILL.mdとdocs/dev/agent-skill-boundaries.mdの変更。ISSUE_EDIT_TXN_RESULT_V1/ISSUE_EDIT_TXN_INPUT_V1の key / schema の変更。- 実装: workflow trusted signalsとIssue/PR Task equivalenceをTask Contextへ統合する #2565 本体の本文更新。
Acceptance Criteria
- AC1: live state が CLOSED で、body のみの transaction であり、
mutated_candidateの## Notes for Reviewer以外の全 H2 section が live body と byte 同一で、live と candidate の blocking error multiset が完全一致する更新は、needs_fixforwarding 経由でも candidate static readiness 失敗経由でも pre-existing defect だけを理由に拒否されず、body 更新と readback が実行される。 - AC2: candidate が live body に無い readiness 欠陥を追加する、または同一 key の欠陥件数を増やす更新、および欠陥を一部解消する subset 更新は、従来どおり
failed_no_mutationで拒否される。line_start/line_end/fix_hintの差だけでは拒否されない。 - AC3: live state が OPEN の Issue(新規実装・再開 Issue を含む)は、live body に同じ欠陥があっても従来どおり拒否される。
needs_fix(resolution_evidence無し)forwarding はreadiness_needs_fix_without_resolution_evidenceでfailed_no_mutationとなり、子プロセス起動も mutation も行われない。 - AC4: CLOSED でも、
mutated_candidateの## Notes for Reviewer以外のいずれかの H2 section(Machine-Readable Contract、Outcome、In Scope、Out of Scope、Acceptance Criteria、Verification Commands、Allowed Paths、Stop Conditions、Delivery Rule 等)が live body と異なる更新は拒否される。hygiene autofix で変化した内容も比較対象に含まれる。 - AC5: 互換 lane でも
expected_previous_body_sha256不一致と updatedAt 不一致は拒否され、post-edit readback 不一致はfailed_after_mutationとして報告される。 - AC6: forwarding の
human_judgment/input_or_runtime_errorは live state・内容に関わらず従来どおり即 fail-closed(human_judgment、mutation なし)となる。 - AC7: CLOSED でも
title_update.required == true、またはnative_relationshipsが no-op でない(parent.actionがset/remove、またはadd_*/remove_*が非空)transaction は互換 lane で拒否される。 - AC8: 実
contract_readiness_check.py --mode staticを historical RUNTIMEASSERT001 系 fixture 本文に対して起動する test が存在し、live と note 追記後 candidate の error multiset 一致(行番号差を許容)と、欠陥増加時の不一致を検出する。checker 出力が JSON でない、または exit code が 0 / 1 以外の場合は fail-closed となる。 - AC9: 互換 lane 成功時の
ISSUE_EDIT_TXN_RESULT_V1は key 集合が従来と同一で、errorsが空である。 - AC10:
edit_issue_txn.py、既存 test_edit_issue_txn.py、新規 test_edit_issue_txn_preexisting_readiness.py を含む.claude/skills/edit-issue/tests/配下の test がすべて PASS する。 - AC11:
_fetch_issueが 1 回のgh issue view --json title,body,updatedAt,statereadback から state を取得し(別 request の state 取得 helper を持たない)、scripts/agent-guards/tests/test_skill_runtime_exec_anchor.pyが PASS する。 - AC12:
## Notes for Reviewerの境界判定が CommonMark の fence semantics と一致する。4 spaces indent の fence 風 line は fence opener にならず、4-backtick opener は 3-backtick で閉じず、同種かつ opening 以上の長さの closer のみが閉じ、Notes より後ろの real H2(0-3 spaces indent 含む)の変更が互換 lane で拒否される(readiness defect multiset が偶然同一でも拒否される end-to-end を含む)。
Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_note_only_allowed -q# AC2
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_worsened_rejected -q# AC3
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_open_issue_unchanged -q# AC4
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_note_surface_only -q# AC5
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_sha_and_readback_preserved -q# AC6
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_human_judgment_fail_closed -q# AC7
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_title_or_relationship_rejected -q# AC8
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_real_checker_integration -q# AC8
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_checker_output_fail_closed -q# AC9
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_result_schema_unchanged -q# AC10
$ uv run --locked pytest .claude/skills/edit-issue/tests/ -q# AC11
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_single_snapshot_fetch_issue -q# AC11
$ uv run --locked pytest scripts/agent-guards/tests/test_skill_runtime_exec_anchor.py -q# AC12
$ uv run --locked pytest .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py::test_preexisting_readiness_note_boundary_commonmark_fence_semantics -qAllowed Paths
- .claude/skills/edit-issue/scripts/edit_issue_txn.py
- .claude/skills/edit-issue/tests/test_edit_issue_txn.py
- .claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.py
- scripts/agent-guards/tests/test_skill_runtime_exec_anchor.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合(特に
contract_readiness_check.py/ matcher /SKILL.md/docs/dev/agent-skill-boundaries.mdの変更が必要になった場合) - In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合(
ISSUE_EDIT_TXN_INPUT_V1/ISSUE_EDIT_TXN_RESULT_V1の closed key 追加が必要な場合を含む) - 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
- Python / pytest(subprocess と gh の fake による決定論的 test、および実 checker 起動 test)
Required Design References
- .claude/skills/edit-issue/SKILL.md(読み取り参照のみ)
- docs/dev/agent-skill-boundaries.md(読み取り参照のみ)
- .claude/skills/create-issue/scripts/prose_boundary_policy.py(読み取り参照のみ。shared Markdown boundary primitive として import 再利用)
Scope Delta(任意)
- 追加 path:
scripts/agent-guards/tests/test_skill_runtime_exec_anchor.py(exact-argv の fake が_fetch_issueの 1 回 readback(state付き argv)を許容するよう最小追随させるためのみ。production semantics・schema・Skill・docs の変更は含まない)。 - 根拠: PR fix: edit transaction が履歴 Issue の note-only 更新を既存 readiness 欠陥だけで拒否しないようにする (#2922) #2934 の OWNER review fix: edit transaction が履歴 Issue の note-only 更新を既存 readiness 欠陥だけで拒否しないようにする (#2922) #2934 (comment) の finding 2(Option A: approved contract の単一 snapshot readback へ戻す)。
Delivery Rule
1 Issue = 1 PR、専用 worktree、Draft PR 既定。- 実装: Runtime Verification の assertion 単位 applicability を表現し、無関係な assertion の AC binding が readiness 通過のための空 evidence になる false-required を防ぐ #2852 は hard blocker にしない。実装: Runtime Verification の assertion 単位 applicability を表現し、無関係な assertion の AC binding が readiness 通過のための空 evidence になる false-required を防ぐ #2852 の Allowed Paths(matcher / 両 checker)と重ねない。
Notes for Reviewer
- OWNER review(https://github.com/squne121/loop-protocol/issues/2922#issuecomment-5981371212)の finding と AC の対応: finding 1 は AC1 / AC3 / AC6、finding 2 は AC7、finding 3 は AC4、finding 4 は AC1 / AC2 / AC8、finding 5 は AC9(result 記録要件を削除し schema 不変を固定)、finding 6 は AC8。
- 欠陥比較で subset を採らない理由: checker の
RUNTIMEASSERT001は aggregate error 1 件で、assertion 単位の canonical な構造化 fingerprint が公開契約に無い。prose の再パースは checker semantics の複製になるため避け、(rule_id, category, section, minimal_context)を不透明値とする multiset の完全一致に限定した。部分 repair は通常 readiness lane に任せる。 - SKILL.md は readiness 自己是正(
.claude/skills/**/SKILL.mdが extension-surface policy の hard 対象になる)のため Allowed Paths から外した。挙動の記述は後続で別途扱う。 - VC は未作成の新規 test file
test_edit_issue_txn_preexisting_readiness.pyの node-id 形式(Issue 実装: VC baseline-fail 用 pytest command を canonical form に正規化して contract-review 往復を削減する #1285 の canonical shape)で、実装者はtest_preexisting_readiness_*の名前で test 関数を当該新規 file に作成する。実 checker integration test も同 file に置く。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Oct 4, 2026
結論
現状の #2922 は
REQUEST_CHANGES相当です。 方向性自体は妥当で、#2565 で実際に起きた false-reject を小さく解消する follow-up として価値があります。ただし、currentmainの実装契約に照らすと、この Issue の AC をそのまま実装しても historical note-only edit を確実に救済できない経路と、逆に note-only 以上の変更を通し得る穴が残っています。2026-10-04 現在、
mainは940ede55df45eedf8423e7bb983c48e962ae0be7。#2852 は CLOSED、PR #2927 は merge 済みなので、#2922 は disposition 対応後の現行 readiness 実装を前提にレビューしています。#2922 自体に実装 PR は現時点では見当たりません。Findings
[P0]
needs_fixforwarding の前段 gate があるため、Issue に書かれた live/candidate 比較まで到達しない経路が残る。edit_issue_txn.py:1008–1054は_fetch_issue()より前にreadiness_forwarding_payload.readiness_result.statusを見て、needs_fixかつresolution_evidence無しならreadiness_needs_fix_without_resolution_evidenceで即failed_no_mutationにします。既存 testtest_needs_fix_forwarding_does_not_mutate_without_resolution_evidenceも「子プロセスすら起動しない」ことを固定しています。一方 実装: edit transaction が履歴 Issue の note-only 更新を pre-existing readiness 欠陥だけで拒否しないようにする #2922 は主として後段の candidatecontract_readiness_check.py --mode static非0経路だけを変更対象として記述しています。したがって caller が pre-existing defect をneeds_fixとして forwarding する場合、AC1 の historical compatibility lane に入れません。最小修正はhuman_judgment/ runtime error は従来どおり即 fail-closed とし、needs_fixだけは live readback 後まで判定を遅延し、CLOSED + note-only + defect-equivalence を満たす場合だけ例外化することです。OPEN 等では現在の既存 test と同じ拒否を維持すべきです。[P1] 「note-only」の判定が body diff にしか掛からず、同じ transaction の title / native relationships を拘束していない。
現行 transaction は
title_updateとnative_relationshipsを同時に扱えます。実装: edit transaction が履歴 Issue の note-only 更新を pre-existing readiness 欠陥だけで拒否しないようにする #2922 の条件は「CLOSED」「readiness defect subset」「特定 body section を変更していない」ですが、このままなら historical compatibility lane に title rename や parent / blockedBy / blocking の変更を同居させられます。これは「過去実装を再開しない注記更新」という Goal より広いです。compatibility lane は body-only に限定し、少なくともtitle_update.required == false、native_relationshipsは absent/no-op を必須化するのが小さい修正です。新しい approval/harness は不要です。[P1] protected section の列挙が狭すぎて、実質的な contract rewrite を note-only と誤分類できる。
実装: edit transaction が履歴 Issue の note-only 更新を pre-existing readiness 欠陥だけで拒否しないようにする #2922 が保護するのは AC / VC / Allowed Paths / Runtime Verification Applicability / Machine-Readable Contract だけです。しかし current
create-issue/SKILL.mdの implementation contract にはOutcome、In Scope、Out of Scope、Stop Conditions、Parent Goal Ref、Current Validated Scope、Remaining Parent Gaps、Delivery Ruleなどもあります。例えば CLOSED Issue のOutcomeとIn Scopeを全面変更しても、列挙された5 sectionさえ不変なら AC4 上は note-only になり得ます。最小で堅牢なのは「変更可能な note surface」を正に限定することです。それが難しければ、少なくとも全 canonical contract-bearing section の変更を拒否してください。また比較対象は raw candidate ではなく、hygiene autofix 後に実際に書き込むmutated_candidateにする必要があります。[P1] 「error code + 対象」の defect identity が現行 checker の公開契約に存在せず、subset 判定が仕様不足。
contract_readiness_check.py:1802–1825のRUNTIMEASSERT001は、個別 assertion ごとの error を返さず、1個の aggregate error にminimal_context = verdict["reasons"]を詰めます。shared evaluator 自体はmissing/unknown/duplicate/invalid_*の構造化情報を持ちますが、readiness result ではそのまま公開されません。つまり 実装: edit transaction が履歴 Issue の note-only 更新を pre-existing readiness 欠陥だけで拒否しないようにする #2922 の「error code と対象の組」は、現行ISSUE_CONTRACT_READINESS_RESULT_V1だけからは機械的に一意に作れません。表示文minimal_contextを再パースする実装は consumer 側で checker semantics を複製するため避けるべきです。この Issue の目的なら、「candidate の blocking defect projection が live と完全一致する」まで狭めるのが最も実用的です。履歴注記には十分で、部分 repair は通常 readiness lane に任せられます。どうしても subset を要件にするなら、canonical な structured fingerprint を先に定義する必要があります。さらに AC2 の「同種欠陥を増やす」を正確に扱うなら plain
setでは multiplicity が消えるため、multiset が必要です。Python のCounterは count を保持した包含比較を標準で提供しています。[Python documentation](https://docs.python.org/ja/3.12/library/collections.html?utm_source=chatgpt.com)[P1] 「許容した defect code を result に記録する」と「result schema を変更したら Stop」が衝突している。
canonical
ISSUE_EDIT_TXN_RESULT_V1はdocs/dev/agent-skill-boundaries.mdでadditionalProperties: falseです。現行 result に successful compatibility decision 専用の carrier はありません。実装: edit transaction が履歴 Issue の note-only 更新を pre-existing readiness 欠陥だけで拒否しないようにする #2922 は AC1 で「許容した欠陥 code が結果に記録される」と要求する一方、Allowed Paths に canonical schema document を含めず、Stop Conditions では固定 schema/key の変更が必要なら停止としています。実装者は、正常終了なのにerrors[]に情報を押し込むか、Issue の Stop Condition に当たるかの二択になります。consumer が不要なら result 記録要件を削除するのが最小です。必要なら逆に schema change を明示承認し、readiness_compatibility: {applied, preexisting_codes}のような専用 field と canonical schema doc を Allowed Paths に含めるべきです。成功時errors[]を telemetry として流用するのは勧めません。[P2] fake readiness だけのテストでは、Finding 4 の不存在フィールドを前提にした false-green を作れる。
current Issue は fake gh / fake readiness の deterministic test を想定していますが、今回の核心は実際の
contract_readiness_check.py出力構造です。最低1本は GitHub write/readback だけ fake にし、実contract_readiness_check.py --mode staticを RUNTIMEASSERT001 fixture に対して起動する integration test にすべきです。外部サービスも新規 runtime harness も不要です。これで live/candidate の比較実装が real checker contract に接続されていることを固定できます。推奨する最小設計
#2922 は scope を広げるより、compatibility lane を次のように狭めるのがよいです。
_fetch_issue()は現在title,body,updatedAtを取得しているので、stateを1フィールド足すだけで済みます。GitHub CLI の公式gh issue view --jsonはstate、body、updatedAt、titleをすべて正式に提供しており、新規 API wrapper や別 harness は不要です。GitHub CLI特に **defect の「subset」より「完全一致」**を推します。#2922 の目的は「古い欠陥を抱えたまま注記だけ直す」ことであって、「historical compatibility lane で readiness repair まで行う」ことではありません。完全一致なら #2565 の failure class を直接解消しつつ、parser/producer/consumer 間に新しい defect-fingerprint protocol を増やさずに済みます。
総評
#2852 / PR #2927 との責務分離、
contract_readiness_check.py自体を変更しない方針、CLOSED 全般を無条件免除しない方針は適切です。#2775 / #2841 / #2819 を吸収する必要もありません。ただし実装着手前に、少なくとも 前段
needs_fixgate、transaction-wide body-only 条件、protected section 範囲、defect identity、result-schema 矛盾の5点を Issue contract に反映すべきです。ここを直せば、追加の security layer や generic framework を増やさず、既存 transaction/checker を再利用した小さい修正にできます。squne121 commentedon Oct 4, 2026
確認した live state では、#2922 は OPEN、対象コメント
5981371212は repository ownersqune121によるREQUEST_CHANGES相当です。確認時点のmainは940ede55df45eedf8423e7bb983c48e962ae0be7で、#2922 の実装PRはまだありません。推奨は、対象コメントをpreflight.run.with_human_contextの trusted anchor として使い、実装には進まず、Issue contract を修正→fresh review→approved termination まで完走させることです。特にコメントの6 findingsは妥当なので、前段
needs_fixgate、transaction-wide body-only、contract-bearing section 保護、defect subset→原則 exact equivalence、result schema 矛盾解消、real checker integration test を refinement の主要到達点に据えるのがよいです。既に auto mode で起動済みの、この対話的 Claude Code セッションをそのまま継続して実行してください。新しい Claude Code セッションを起動し直さないでください。
対象 repository:
squne121/loop-protocol対象 Issue:
https://github.com/squne121/loop-protocol/issues/2922operator-selected trusted human context / anchor:
https://github.com/squne121/loop-protocol/issues/2922#issuecomment-5981371212目的は、current repository の canonical
issue-refinement-loopを使って #2922 の Issue contract を精緻化し、対象 OWNER コメントのREQUEST_CHANGESを解消し、canonical review が approve になるか、repository contract 上の正当な terminal stop に到達するまで自律的に処理することです。これは Issue refinement の依頼です。実装開始、
impl-review-loop起動、production code の実装、実装用 branch/worktree 作成、commit/push、PR 作成、merge は今回の依頼範囲ではありません。refinement が approved になったら、currentissue-refinement-loopの termination/handoff contract に従って終了してください。明示的な operator approval
この invocation について、私は以下を明示的に承認します。
issue-refinement-loopが必要とする read-only repository/GitHub 調査issue-editor/edit-issuecontrolled transaction を通じた Issue 実装: edit transaction が履歴 Issue の note-only 更新を pre-existing readiness 欠陥だけで拒否しないようにする #2922 本文更新loop_iteration_approval_gate.default_required: falseに従った iteration ごとの自動継続codebase-investigator/web-researcher等の SubAgent 利用上記について、iteration ごとの人間承認を取りに戻らず実行してください。
ただし、この承認は Claude Code の permission mode を変更するものではありません。
bypassPermissions、--dangerously-skip-permissions、permission hook の迂回、secret/credential の取得・変更、force push、履歴破壊、その他 destructive operation は承認していません。repository contract が本当にhuman_judgment_requiredを要求する場合も、それを勝手に迂回しないでください。0. 最初に live state を fresh に取得する
過去チャット、以前の SHA、コメント内に記載された SHA を authority として固定しないでください。
最初に以下を fresh に確認してください。
origin/mainと current canonical main root / default branch5981371212の live snapshot、author、target Issue bindingこの prompt 作成時点では main は
940ede55df45eedf8423e7bb983c48e962ae0be7でしたが、実行時には必ず再取得し、drift があれば fresh state を優先してください。1. current canonical workflow を読む
少なくとも current HEAD から以下を読み、古い知識で procedure を再構築しないでください。
.claude/skills/issue-refinement-loop/SKILL.md.claude/skills/issue-refinement-loop/references/index.mdreferences/anchor-comment-handling.mdreferences/refinement-loop-plan-output.mdreferences/semantic-design-review.mdreferences/termination-policy.mdreferences/follow-up-materialization.mdreferences/ac-vc-reflection.mdreferences/scope-signal-guard.mdscripts/command_registry.py.claude/agents/codebase-investigator.md.claude/agents/web-researcher.md.claude/agents/issue-editor.md.claude/skills/edit-issue/SKILL.mddocs/dev/agent-skill-boundaries.mdcreate-issueSkill / body-authoring SSOTSkill description、slash 名、Agent 名だけから procedure や権限を推測しないでください。current file contents を authority にしてください。
2. anchor comment を direct human context として canonical preflight へ渡す
対象コメントは operator-selected direct human context です。
current
issue-refinement-loopとISSUE_REFINEMENT_COMMAND_REGISTRY_V1が定める canonical profile を使い、#2922 と anchor comment URL を binding したpreflight.run.with_human_contextを実行してください。手書きの代替 wrapper、unlabeled anchor profile、agent-report lane に置き換えないでください。
current Skill/registry の command shape がこの prompt 内の記憶と異なる場合は current registry を優先してください。
preflight の canonical
STATUS/NEXT_ACTION/MUST_READ/COMMANDS_JSON/ARTIFACT/ repair disposition を consume し、prose で判定を再実装しないでください。contract_update.run.with_human_context、repair_action.apply、structural_repair_action.apply、issue_editor_required等が canonical result から要求された場合は、current Skill の正規経路に従ってその action を実際に行ってください。提案だけで停止しないでください。NEXT_ACTION: issue_editor_requiredの場合、今回 main thread 自身が渡した anchor URLhttps://github.com/squne121/loop-protocol/issues/2922#issuecomment-5981371212を
reviewer_feedback_urlとして currentissue-editorlane へ渡してください。raw comment snapshot を自由形式で転記して別 authority にしないでください。3. 調査は planner authority に従い、必要な SubAgent を使う
REFINEMENT_LOOP_PLAN_V1.decisions.investigation_policyとweb_research_policyを authority にしてください。investigation_policy.required == trueならcodebase-investigatorを起動してください。web_research_policy.required == trueならweb-researcherを起動してください。両方 required かつ相互依存が無ければ並列 dispatch して構いません。ただし、SubAgent を dispatch しただけで完了扱いにしないでください。
各 SubAgent への依頼には少なくとも以下を明示してください。
そして、起動した全 SubAgent が terminal state に到達するまで待ち、最終 structured result を実際に取得してから次の Step へ進んでください。
Step 1 と Step 1b を並列実行した場合も、両方の completion を join した後で Step 2 に進んでください。
SubAgent の結論をそのまま権威化せず、main/root thread で current repository bytes、GitHub state、一次資料等と照合してください。
issue-editorに rewrite を委譲した場合も同様に、Agent dispatch を completion とみなさず、terminal compact result と controlled transaction の readback を取得してから downstream に進んでください。issue-editor自身に nested SubAgent delegation を要求しないでください。必要な追加調査は main thread が orchestration してください。4. OWNER REQUEST_CHANGES の解消要件
anchor comment の findings は trusted human review directive として扱ってください。ただし current source が変化している可能性があるため、まず fresh evidence で各 finding を検証してください。
current evidence が明確に反証しない限り、Issue #2922 の contract は少なくとも以下を解消する必要があります。
A. 前段
needs_fixforwarding gateedit_issue_txn.pyの candidate static readiness check より前に、readiness_forwarding_payload.readiness_result.status == needs_fixを resolution evidence 無しで即拒否する経路が current code に残っているか確認してください。残っているなら、historical compatibility lane がそこへ到達できるよう Issue contract を修正してください。
推奨する狭い仕様は:
human_judgment/input_or_runtime_errorは従来どおり fail-closedneeds_fixだけは live readback 後まで判定を遅延可能既存 guard を無条件解除しないでください。
B. transaction-wide body-only 制約
historical note compatibility lane では body diff だけでなく transaction 全体を制約してください。
少なくとも current schema/semantics に照らし、
parent/blockedBy/blockingrelationship mutation が absent または明確な no-op であることを必要条件にする方向を検討してください。
「CLOSED Issue なら title/relationship 変更も note-only」という扱いにしないでください。
C. note surface / contract-bearing section
現在の Issue が列挙している数個の protected section だけで contract rewrite を防げるか current create/edit Issue contract SSOT と照合してください。
Outcome、In Scope、Out of Scope、Stop Conditions、Parent Goal Ref、Current Validated Scope、Remaining Parent Gaps、Delivery Rule等も含む current canonical contract-bearing surface を確認してください。可能なら「変更禁止 section を部分列挙」より 変更可能な note surface を正に限定する小さい仕様を優先してください。
それが current architecture 上不適切なら、少なくとも全 canonical contract-bearing sections を保護してください。
比較対象は raw pre-hygiene candidate ではなく、実際に write される post-hygiene / mutated candidate にしてください。
D. defect identity は consumer 側で prose 再パースしない
current
contract_readiness_check.py/ result schema が「error code + assertion target」の canonical structured fingerprint を本当に公開しているか確認してください。公開していないなら、
minimal_context等の表示 prose を consumer 側で再パースして新しい fingerprint protocol を作らないでください。この Issue の目的は historical note-only edit の救済なので、current public contract で実装できるなら live と candidate の blocking defect projection が完全一致する場合だけ許可する狭い compatibility semantics を優先してください。
「subset / partial repair」まで compatibility lane に背負わせる必要はありません。部分 repair は通常 readiness lane に任せられるか検証してください。
subset semantics を本当に必要とする場合は、それを支える canonical structured identity がどこに存在するかを証明してください。存在しない場合は Issue 内で曖昧なまま要求しないでください。
E. result schema conflict
current
ISSUE_EDIT_TXN_RESULT_V1とdocs/dev/agent-skill-boundaries.mdを確認してください。「成功した compatibility allow について defect code を result に追加記録する」という AC と、「result schema/key 変更は Stop / Allowed Paths 外」という契約が衝突しているなら解消してください。
consumer requirement が無いなら、最小修正として 成功 result に pre-existing defect code を新規記録する要件を削除する方向を優先してください。
成功時
errors[]を telemetry carrier として流用しないでください。本当に result schema field が必要なら、その schema change は隠れて行わず、scope / Allowed Paths / consumer inventory を明示的に変更する必要があります。ただし #2922 の目的に不要な generic schema拡張は避けてください。
F. real checker integration regression
fake readiness producer だけで AC を満たしたことにしないでください。
少なくとも1本、GitHub mutation/readback 側は fake のままでもよいので、実
contract_readiness_check.pyの static/preflight-static path を historical RUNTIMEASSERT 系 fixture に対して起動する integration/regression test を Issue contract に要求することを検討してください。これにより、実際には存在しない readiness output field を fake test だけが提供して false-green になる failure class を固定してください。
5. scope discipline
#2922 の目的は historical / note-only edit compatibility の小さい修正です。
以下を無理に吸収しないでください。
品質を上げるための具体的な欠陥修正は行ってよいですが、個人趣味開発の workflow を重くする抽象層を追加すること自体を目的にしないでください。
6. canonical Step 2 review は background launch 後に必ず join
current
issue-refinement-loopの Step 2 contract を厳守してください。run_root_review_pipeline.py produceを current contract どおり background 実行する場合、background launch した時点を Step 2 completion とみなさないこと。
task notification / completion を join し、実際の final JSON result を取得してから routing してください。
routing は current output の
canonical_step2_routeを唯一の authority とし、status/verdict/next_actionから独自に再分類しないでください。deterministic approve 後に Step 2.5 semantic design review が applicable なら current Skill に従って実行してください。
semantic review transport等も completion 前に downstream へ進まないでください。
7. needs-fix は bounded に自動修復・再レビューする
通常の
needs-fix/request_changesは停止理由にしないでください。current Skill の bounded loop policy に従い、
inspect → rewrite/update → readback → fresh preflight/readiness → fresh reviewを自動で繰り返してください。
current Skill の default max iteration を使用し、iteration ごとの人間 approval は要求しないでください。
rewrite は必ず current
issue-editor/edit-issuecontrolled transaction route を使い、rawgh issue editによる直接 mutation で shortcut しないでください。修正前 review artifact を修正後の approval evidence として再利用せず、body revision ごとに fresh review を取得してください。
max iteration 到達、no-progress、canonical
human_judgment_required、environment/integrity failure は current termination policy に従って処理してください。これらを「auto mode だから」と無視しないでください。8. 再発防止 Issue
今回の調査・rewrite・review 中に、#2922 とは別スコープで今後も同型 failure を生む 具体的かつ再現可能な recurrent root cause が確認された場合は、まず repository 内を検索して既存 Issue がないか確認してください。
既存 Issue があれば重複起票せず、その Issue を follow-up として参照してください。
既存 Issue がなく、独立 Issue として扱う価値がある場合のみ、current
issue-refinement-loopの follow-up materialization /issue-creatorcontract を使って GitHub Issue を起票してください。follow-up Issue は:
こと。
follow-up を起票することを理由に、#2922 自体で解消可能な REQUEST_CHANGES を未解決のまま残さないでください。
9. terminal condition
approvedに到達した場合:LOOP_HANDOFF_RESULT_V1contract を出力してください。
今回は実装依頼ではないため、approved termination を
impl-review-loop起動許可と誤解しないでください。一方、canonical authority が以下を返した場合のみ正当な停止として扱ってください。
human_judgment_required通常の needs-fix、review finding、修正可能な readiness error、stale review evidence は停止理由ではありません。
10. 最終報告
最後に簡潔に、以下を報告してください。
途中で「次に何をしますか」「修正してよいですか」等の routine approval を求めず、上記の明示承認と current repository-native workflow の範囲で最後まで自律実行してください。
この prompt は、現在の Skill で重要になっている human-context preflight → planner-authoritative SubAgent routing → completion join → controlled rewrite → fresh root review → bounded iteration → approved で実装せず終了 を明示しています。
squne121 commentedon Oct 4, 2026
issue-refinement-loop 終了報告(approved)
OWNER の REQUEST_CHANGES(https://github.com/squne121/loop-protocol/issues/2922#issuecomment-5981371212)を解消し、fresh な deterministic review が approve になったため、refinement を approved で終了する。
sha256:5b25d4b1ee3ad68ce540dbf73c449a1b37d1c94d6f3da0bd2b17af5ec962c05c940ede55df45eedf8423e7bb983c48e962ae0be7反映した主な変更
needs_fixforwarding gate を live readback 後まで遅延。human_judgment/input_or_runtime_errorは従来どおり即 fail-closed。## Notes for Reviewerのみに限定し、post-hygiene のmutated_candidateで他の全 H2 section が live と byte 同一であることを要求。ISSUE_EDIT_TXN_RESULT_V1は不変)。contract_readiness_check.pyを RUNTIMEASSERT001 系 fixture に対して起動する integration test を AC に追加。.claude/skills/edit-issue/SKILL.mdを除外し、本文自体のEXTSURF001/RUNTIMEASSERT001を解消。VC は未作成の新規 test file の node-id 形式(Issue 実装: VC baseline-fail 用 pytest command を canonical form に正規化して contract-review 往復を削減する #1285 の canonical shape)に統一。レビュー結果
approve(blocker 0、非 blocking の warning はscope_cvs_in_scope_mismatchのみ)semantic_review_applicable: false(全 signal が false のため skip)go(readiness errors なし、VC preflight pass)。go comment の materialization は今回行っていない。注意
approvedは実装開始の承認ではない。impl-review-loopは起動していない。LOOP_HANDOFF_RESULT_V1marker は、contract_review.gate_result == fresh_goに必要な contract review go comment が未 materialize のため出力しない。実装の依頼時にimpl-review-loopの entry gate が処理する。squne121 commentedon Oct 4, 2026
推奨は、現在の refinement 済み #2922 をそのまま authority とし、current
impl-review-loopの root-owned synchronous entry から開始することです。refinement はapproved、最終 body SHA は5b25d4b1…で、実装はまだ開始されていません。添付ログとも一致します。貼り付けたテキスト(1)特に重要なのは、refinement 終了時に
LOOP_HANDOFF_RESULT_V1が出ていないことを blocker と解釈しない点です。currentimpl-review-loopは、同一 root invocation 内で capability preflight → live Issue fetch → current-runissue-contract-review→ live 再取得 → routing → Step 1 dispatch を行う契約です。過去 comment/artifact を implementation authorization として再利用させない方が現行仕様に合っています。また current Skill は
implementation-worker → test-runner → pr-reviewer → route_loop_verdict_v2()の順で、defaultmax_iterations=3。APPROVE単独では終了せず、live mergeability がCLEAN/HAS_HOOKS、かつ blocker なしでdraft_pr_readyに到達するまで回します。既存 PR が見つかれば canonical landing-disposition に従って resume し、重複 PR を作らせないのが適切です。その前提を反映した prompt です。
既に auto mode で起動済みの、この対話的 fresh Claude Code セッションをそのまま継続して実行してください。新しい Claude Code セッションを起動し直さないでください。
対象 repository:
squne121/loop-protocol対象 Issue:
https://github.com/squne121/loop-protocol/issues/2922refinement 時の OWNER context:
https://github.com/squne121/loop-protocol/issues/2922#issuecomment-5981371212refinement approved report:
https://github.com/squne121/loop-protocol/issues/2922#issuecomment-5985116184目的は、current repository の canonical
.claude/skills/impl-review-loopを使い、Issue #2922 を実装 → 検証 → PR review → 必要な修正反復まで自律的に完遂し、人間が merge 判断できる直前の canonical terminal state まで到達することです。実 merge、auto-merge、force push、履歴破壊、permission bypass は行わないでください。
明示的な operator approval
この invocation について、私は以下を明示的に承認します。
main/ default branch、Issue 実装: edit transaction が履歴 Issue の note-only 更新を pre-existing readiness 欠陥だけで拒否しないようにする #2922 の live body/state/comments、関連 Issue/PR、CI、current repository assets の取得.claude/skills/impl-review-loop/SKILL.mdと、そのsteps/**/ references、関連 Skill / Agent / SSOT の読取りimpl-review-loopが要求する root-owned synchronous entry transitionissue-contract-reviewexisting_pr_resumeを選んだ場合の既存 PR / branch / worktree 再利用open-pr/ repository-owned workflow を通じた push と Draft PR 作成または既存 PR 更新上記の通常作業について、途中で「実行してよいですか」「修正してよいですか」「PR を作ってよいですか」等の routine human approval を取りに戻らず、自律的に進めてください。
ただし、この operator approval は Claude Code の permission mode を変更するものではありません。
以下は承認していません。
bypassPermissions--dangerously-skip-permissionsrepository contract が genuine
human_judgment_required、actual Git conflict、evidence integrity failure、irreconcilable scope conflict 等を canonical に返した場合は、それを勝手に迂回しないでください。0. 必ず live state を fresh に取得する
この prompt に書かれた SHA や過去 comment の snapshot を current authority として固定しないでください。
実行開始時に fresh に確認してください。
origin/main/ default branch の current HEAD5985116184impl-review-loopsteps/preparation.mdsteps/step-1-implementation.mdsteps/step-2-verification.mdsteps/step-4-pr-review.mdsteps/step-5-feedback-and-termination.mdsteps/step-5-mergeability-handling.md.claude/agents/implementation-worker.md.claude/agents/test-runner.md.claude/agents/pr-reviewer.md.claude/skills/implement-issue/SKILL.md.claude/skills/pr-review-judge/SKILL.mddocs/dev/workflow.md過去 refinement 時点では main は
940ede55df45eedf8423e7bb983c48e962ae0be7でしたが、必ず fresh に再取得してください。
1. refinement report を implementation authorization として再利用しない
refinement approved comment は文脈 evidence として参照して構いませんが、それ自体を Step 1 implementation authorization にしないでください。
特に、refinement 終了時には
LOOP_HANDOFF_RESULT_V1marker が materialize されていませんでした。current
impl-review-loopの正規契約に従い、root/main thread 自身が単一の continuous invocation 内で:issue-contract-reviewを行ってください。
旧 handoff artifact / old comment / digest / token / snapshot のみを implementation authorization として扱わないでください。
逆に、current root-entry contract が implementation start を許可した場合は、古い
LOOP_HANDOFF_RESULT_V1の不在だけを理由に停止しないでください。2. Evidence-Based Landing Disposition を最初に使う
worker dispatch / worktree 作成 / new PR 作成の前に、current
impl-review-loopが定める Evidence-Based Landing Disposition の canonical producer を実行してください。producer の structured result を authority とし、prose から再判定しないでください。
implementation_already_landedexisting_pr_resumealready_satisfiedordinary_dispatch_or_explicit_recoveryreconciliation_required検索結果だけから「PR が無い」と自己判断して new PR を作成しないでください。必ず canonical producer の fresh result を使ってください。
3. Issue #2922 の live contract を実装 authority にする
current live Issue body の Outcome / In Scope / Out of Scope / AC / VC / Allowed Paths / Stop Conditions を正本にしてください。
refinement approved 時点の Allowed Paths は次の 3 件でしたが、実行時に必ず live body から再取得してください。
.claude/skills/edit-issue/scripts/edit_issue_txn.py.claude/skills/edit-issue/tests/test_edit_issue_txn.py.claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.pyAllowed Paths 外を変更して Issue scope を黙って拡張しないでください。
特に以下は #2922 の現在の Out of Scope / Stop boundary として扱い、live contract が変わっていない限り編集しないでください。
contract_readiness_check.py.claude/skills/edit-issue/SKILL.mddocs/dev/agent-skill-boundaries.mdISSUE_EDIT_TXN_INPUT_V1/ISSUE_EDIT_TXN_RESULT_V1schema実装中にこれらの変更が不可避と判明した場合は、勝手に scope を広げず current canonical routing / Stop Condition に従ってください。
4. 実装の中心要件
live Issue の AC を逐語的に正本とし、少なくとも次の failure class が実装・test で固定されることを確認してください。
needs_fix(resolution evidence 無し)は、historical compatibility 判定のため必要な live readback 前に無条件 reject しないhuman_judgment/input_or_runtime_errorは従来どおり即 fail-closed_fetch_issueの readback から取得## Notes for Reviewerのみmutated_candidateを比較(rule_id, category, section, minimal_context)を opaque value とした multiset 完全一致で比較line_start/line_end/fix_hintのみの差は identity に含めないminimal_contextの内部意味を再パースしないISSUE_EDIT_TXN_RESULT_V1schema/key は不変、成功時errorsは空5. SubAgent orchestration
current
impl-review-loopの役割分担を維持してください。通常経路:
root/main control-plane→
implementation-worker→
test-runner→
pr-reviewer→ root の
route_loop_verdict_v2()必要な repair は current Skill の structured fix route を使ってください。
重要:
SubAgent を dispatch しただけで完了扱いにしないでください。
各 SubAgent について:
background dispatch を使う場合も、必ず completion notification / final result を join してください。
特に:
verdict / reviewed_head_sha / blockers / warningsを取得する前に Step 5 routing を行わない親会話の暗黙 context を SubAgent に期待せず、必要な Issue / PR / head / Allowed Paths / AC / VC / fix_delta を明示的に渡してください。
6. Step 1 — implementation
canonical root entry が Step 1 を許可し、landing disposition が通常 dispatch の場合のみ implementation-worker を起動してください。
current repository-owned worktree bootstrap / implement-issue contract を使用してください。
-既存 transaction/checker semantics を可能な限り再利用する
実装者自身の self-report を merge readiness authority にしないでください。
7. Step 2 — verification
test-runner を使い、current Issue が宣言する VC を実行してください。
refinement approved 時点では、新規
.claude/skills/edit-issue/tests/test_edit_issue_txn_preexisting_readiness.pyに対する node-id VC と、
.claude/skills/edit-issue/tests/ -qが宣言されています。必ず live body の VC を再取得し、それを正本にしてください。
特に AC8 の real checker integration test は fake の readiness success だけで代替しないでください。
VC / test failure が implementation defect なら停止せず Step 1 の fix route に戻してください。
通常の failing test、修正可能な CI failure、stale-head は人間 escalation の理由にしないでください。
8. Step 4 — PR Review
current
pr-reviewer/pr-review-judgeを使用してください。review は latest PR head に bind してください。
最低限:
を確認してください。
REQUEST_CHANGESが返った場合は、iteration budget 内で implementation-worker に structured fix_delta を渡して修正し、fix → re-test → fresh PR reviewを自動で繰り返してください。
古い review result を修正後 head の approval evidence として再利用しないでください。
9. Step 5 — terminal routing
current
route_loop_verdict_v2()の structured result をそのまま authority としてください。APPROVE単独で終了しないでください。canonical approved terminal は少なくとも:
APPROVE[]CLEAN/HAS_HOOKS等)ことを current router が確認した場合です。
主な route は current Skill のまま処理してください。
approvedIMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_readyroute_to_update_branchroute_stale_head_rereviewcontinue_loopalready_satisfiedroute_human_escalationdefault
max_iterationsは current Skill の値(現在 3)を使用してください。prompt 側で独自の iteration 数を増やさないでください。Step 1-4 SubAgent が単に
human_review_required: trueと自己申告しただけなら、current Skill の routing policy に従い、それだけを理由に即停止しないでください。10. CI / GitHub 操作
通常の workflow に必要な以下は明示承認済みです。
ただし:
は行わないでください。
11. 外部 Web 調査
#2922 は repository-internal transaction logic が中心なので、current
impl-review-loopの方針どおり、外部仕様調査が実装判断に不要ならスキップして構いません。その場合は
external_research_skip_basisに理由を記録してください。実装中に GitHub CLI / Python / pytest 等の current upstream semantics が実際に blocker になった場合だけ、current Skill の正規 external research route を使用してください。
12. 再発防止 Issue
実装・test・review・CI の途中で、#2922 自体とは独立し、今後も同型 failure を生む具体的・再現可能な recurrent root cause を確認した場合:
create-issue/issue-creatorroute で再発防止 Issue を起票してください。
follow-up Issue は:
こと。
ただし current #2922 contract / canonical Skill が、その follow-up materialization 自体を genuine
human_judgment_required/ Stop Condition と判定した場合は、それを迂回しないでください。13. 停止境界
以下だけを正当な停止候補として扱ってください。
以下は単独では停止理由にしないでください。
-通常の test failure
human_review_required: true自己申告14. 最終到達点
目的は merge そのものではなく、人間が merge 判断できる直前です。
canonical
approved/draft_pr_readyに到達したら:を簡潔に報告して終了してください。
approved後に merge / auto-merge を実行しないでください。まず current
impl-review-loopと必要な step/reference/agent 定義を current HEAD から読み、live Issue / current-run root entry / canonical landing disposition を fresh に取得してから開始してください。この prompt では、過去の refinement comment を handoff token の代用品にせず、現行 Skill が要求する current-run root transition から入り直す点を強めています。また
triage-required等の label は current workflow では presentation-only なので、それだけで止めない構成です。squne121 commentedon Oct 4, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
fix: _fetch_issue の gh argv を従来形に戻し live state を別 helper で取得する (#2922)
squne121 commentedon Oct 5, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
squne121 commentedon Oct 5, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
fix: Notes 境界判定を CommonMark fence 準拠にし、live state を単一 snapshot readba…
squne121 commentedon Oct 5, 2026
Contract Review Result
fix: 境界 SSOT 欠落時の FileNotFoundError を fail-closed で拒否する (#2922)
fix: edit transaction が履歴 Issue の note-only 更新を既存 readiness 欠陥だけで拒否しな…