Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "issue-refinement-loop termination publisher: dry-run without GitHub mutation"
change_kind: code
dedupe_key: "issue-refinement-loop:legacy-termination-publisher-dry-run-must-not-post"Parent Issue
none(#2979 refinement session で発見された独立した failure class)
Parent Goal Ref
publish_termination_report.py --dry-run を指定した検証実行では、呼出しモードにかかわらず GitHub 投稿と Task Context signal 発行が発生しないこと。
Current Validated Scope
2026-10-08 時点の main 4cfcab02df4edafee19994fd88033d2322b67438 では .claude/skills/issue-refinement-loop/scripts/publish_termination_report.py の main() が --dry-run を受け取るが、--human-history-request-file 経路でのみ dry_run=args.dry_run を渡す。legacy --issue-number / --body-file 経路では publish(...) に dry_run を渡さない。publish() は _post_github_comment(...) を通常投稿として呼び、approved の場合は Task Context signal も試行する。一方 _post_github_comment() 自体は dry_run 引数と controlled executor の --dry-run への転送を既に持つ。
Issue #2979 の refinement 実行ログで --dry-run 付き legacy command を実行したところ、GitHub に実際のコメント #6048387394 が投稿された。これは CLI オプションが受理されるのに legacy mode で silently ignored になる再発可能な誤投稿リスクである。再投稿しての再現は行わない。
Remaining Parent Gaps
- 実装: post-merge cleanup guard が issue worktree を repository root と誤認する root selection を是正する #2979 の root selection / cleanup 修正とは独立。実装: post-merge cleanup guard が issue worktree を repository root と誤認する root selection を是正する #2979 の Allowed Paths は変更しない。
- human-history の既存 idempotency、controlled
issue_comment.publish、Task Context signal の通常成功経路は維持する。
Outcome
legacy と human-history のどちらの経路でも --dry-run が GitHub への mutation と approved signal を抑止し、validation-only の結果として明示的に報告される。通常投稿の semantics は維持される。
In Scope
main()から legacypublish()/_post_github_comment()へdry_runを正しく伝搬する。- dry-run 時の Task Context signal 抑止と、
comment postedではない正確な診断。 - 新規の限定された public CLI subprocess regression test(body-file と stdin の両方、隔離された controlled executor / Task Context の観測)。既存
test_publish_termination_report.pyの通常投稿回帰。
Out of Scope
- 新しい publisher、hook、approval layer、schema、transport の追加。
- 実装: post-merge cleanup guard が issue worktree を repository root と誤認する root selection を是正する #2979 の実装、既存の machine-readable termination marker・Task Context identity 契約変更。
- 実 GitHub へのテストコメント投稿。legacy
--dry-runを live GitHub に向けて再実行しない。
Acceptance Criteria
- AC1: 隔離した public CLI subprocess で legacy
--issue-number N --body-file F --dry-run --termination-reason approved --approved-body-sha256 <有効な64桁hex>と有効なCLAUDE_CODE_SESSION_IDを同時に指定し、非空 body と正しい repo を渡す。正常な validation-only 終了(exit 0)、fake controlled executor の実 argv に--dry-run、GitHub POST/PATCH 相当の副作用 0、task_contextctl.py signal apply呼出し 0 を独立に観測し、comment posted等の通常投稿成功文言を出さない。signal 0 が無効な session/SHA や早期 return による偽陽性でないことを、同じ入力から--dry-runだけを外した positive control で確かめる。その control は投稿成功後に signal apply に到達し、投稿失敗なら signal apply 0 とする。実 GitHub には投稿しない。 - AC2: human-history の
--human-history-request-file R --dry-runは従来どおり validation-only (dry_run_ok) とし、同じ隔離 subprocess fixture で executor argv の dry-run 伝搬、GitHub mutation 0 と signal apply 0 を検証する。既存の stable identity marker / idempotency(通常投稿時の再実行は duplicate/no-op、不要な二重投稿なし)を維持する。 - AC3:
--dry-runなしの legacy/approved 通常経路は既存のissue_comment.publishによる投稿成功後のみ Task Context signal を試行する。投稿失敗は非成功かつ signal 0(fail-closed)、signal 失敗は成功した投稿を取り消さず既存の診断・artifact に記録する。human-history の通常投稿 / 重複処理も維持する。 - AC4: legacy の
--body-fileと stdin の入力互換性を維持し、両方の非空入力で dry-run の validation-only / 通常投稿の区別を検証する。空 body(stdin および file)・不存在 body-file は非成功で executor を呼ばず、GitHub mutation / signal とも 0。controlled dry-run validation が失敗した場合も非成功で mutation / signal とも 0、comment postedを出さない。
Verification Commands
# AC1
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_publish_termination_report_dry_run.py -k test_ac1_ -q
# AC2
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_human_history_351_scope.py -k test_production_entrypoint_is_a_real_subprocess_boundary_not_python_c -q
# AC3
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_publish_termination_report.py -k 'test_publishable_body_normal_post or test_gh_failure_records_artifact_and_fails_closed' -q
# AC4
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_publish_termination_report_dry_run.py -k test_ac4_ -qAC2 の baseline PASS は既存 human-history public subprocess boundary テスト(1 passed)、AC3 の baseline PASS は既存 normal post / GitHub failure テスト(2 passed)で確認する。これらはそれぞれ dry-run 時の executor 実 argv・mutation / signal 計測、投稿成功後の signal 順序まで保証するものではない。新規 test_publish_termination_report_dry_run.py はまだ存在せず、その test_ac1_ / test_ac4_ VC の現時点の pytest exit 4 は usage error / missing file と分類して欠陥の再現とはしない。exit 5 も no tests collected であり再現証拠にも PASS にも使わない。新規ファイル作成後・production 修正前に test_ac1_ / test_ac2_ / test_ac3_ / test_ac4_ の各収集件数 > 0 を確認し、AC1 は実 assertion failure(exit 1)を記録する。新規 test_ac2_ / test_ac3_ は既存 PASS VC と別に argv・mutation・signal / 順序を検査し、現行挙動の結果を記録する(未作成ファイルへの baseline PASS は要求しない)。AC4 の新規 dry-run 異常系は現行挙動ごとに PASS / FAIL(assertion failure)を分け、test_ac4_existing_ は既存入力の PASS を、test_ac4_dry_run_ は修正前に assertion failure となる dry-run 固有の差分を検査する。上記 AC4 aggregate の baseline-expect: fail は後者の差分にのみ由来し、既存 AC4 の失敗を要求しない。production 修正後は新規 test_ac1_ / test_ac2_ / test_ac3_ / test_ac4_ のすべてを PASS(exit 0)とし、既存の test_publish_termination_report.py 全体も別途 uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_publish_termination_report.py -q で修正前後 PASS を確認する。新規テスト不在時の exit 4 を修正前の assertion failure と混同しない。
fixture は publisher の public CLI を subprocess で呼び、fake executor の受信した実 argv で --dry-run の有無を判別する。--dry-run が欠落した場合は POST/PATCH 相当の副作用を必ず計数し、dry-run ありの場合のみ validation-only とする(常に無作用の mock は不可)。GitHub mutation 件数と Task Context signal apply 件数は別の観測値として、成功・投稿失敗・validation 失敗・signal 失敗を各々検査する。tested HEAD、CLI argv/exit、executor argv/exit、mutation 件数、signal 件数と順序を検証証跡に残す。fixture は live GitHub へ接続しない。
Runtime Verification Applicability
decision: immediate
reason: "公開副作用を伴う CLI の動作変更であり、legacy approved / human-history の public CLI subprocess と副作用を計数する fake executor で実 argv と signal の発火条件を検証可能。実 GitHub への試験投稿は不要。"
applicable_acs: [AC1]
execution_environment: "isolated public CLI subprocess with argv-sensitive fake controlled executor / independently counted signal apply"
skip_conditions: "実行不可は unavailable と記録し PASS へ昇格しない"
fallback_policy: "mock の return value のみで成功とせず、dry-run 欠落時の副作用計数、positive control、mutation/signal の独立計測を確認する"
artifact_requirements: "tested HEAD, CLI argv/exit, controlled executor argv/exit, GitHub POST/PATCH-equivalent count, signal apply count and post-success ordering"Allowed Paths
.claude/skills/issue-refinement-loop/scripts/publish_termination_report.py.claude/skills/issue-refinement-loop/tests/test_publish_termination_report_dry_run.py(新規).claude/skills/issue-refinement-loop/tests/test_publish_termination_report.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
なし(Python CLI / pytest)
Required Design References
.claude/skills/issue-refinement-loop/SKILL.md.claude/skills/issue-refinement-loop/scripts/publish_termination_report.pydocs/dev/runtime-verification-policy.md
Delivery Rule
1 Issue = 1 PR。#2979 の実装 PR と混在させない。
Activity
squne121 commentedon Oct 8, 2026
Issue #2988 敵対的レビュー
対象: 再発防止: publish_termination_report の legacy --dry-run が終了コメントを実投稿する
問題設定は妥当です。 現行の Python CLI には、
--dry-runを指定しても legacy 経路で実投稿が発生する欠陥が存在します。単なる理論上のリスクではなく、関連 Issue #2979 に誤投稿の実例が残っています。一方、現行 Issue の Acceptance Criteria と Verification Commands には、修正後の実装が不完全でもテストを通過し得る箇所があります。新しいセキュリティ機構を追加する必要はありませんが、既存の CLI と controlled executor の境界を正確に検証する契約へ改善すべきです。
Findings — 重要度順
P1-1: dry-run 時の approved signal 抑止を AC1 が十分に検証できない
問題
Issue #2988 の AC1 は、次の legacy 呼び出しを中心に定義しています。
しかし現行実装で Task Context の
refinement_approvedsignal が発行されるのは、--termination-reason approvedのときだけです。したがって、記載された呼び出しだけで signal がゼロだったとしても、dry-run によって signal が抑止された証拠にはなりません。
根拠
publish() の投稿・signal 発行処理:
termination_reason == "approved"の場合のみ signal を発行。CLI 引数と main():
--termination-reasonと--approved-body-sha256は独立した引数。影響
実装者が
_post_github_comment()にだけdry_runを伝搬させ、publish()内の signal 発行条件を修正しなくても、AC1 の単純なテストでは見逃す可能性があります。最小修正
AC1 に approved 経路の検証を明示します。
--termination-reason approved、有効な--approved-body-sha256、CLAUDE_CODE_SESSION_IDを指定し、次の両方を確認してください。dry-run あり:controlled executor に
--dry-runが伝搬し、GitHub mutation とtask_contextctl.py signal applyがともにゼロ。dry-run なし:正常な投稿成功後に signal 発行経路へ到達する。
特に signal 呼び出しゼロは、セッション ID 不在やハッシュ不正による早期リターンではなく、dry-run 分岐そのものによって成立することを確認する必要があります。
P1-2: AC2・AC3 に baseline failure を一律要求すると、正常な既存挙動まで失敗させる設計になる
問題
Verification Commands では、新規テストファイルの AC1〜AC4 すべてに
# baseline-expect: failが指定されています。新規ファイルが存在しない時点では、各コマンドが pytest exit 4 になること自体は正しい分類です。しかし、テスト追加後の修正前コードでもすべての AC が assertion failure になるべき、という扱いは不適切です。
AC2 は既存 human-history の非投稿挙動を維持する条件、AC3 は正常投稿や失敗処理を維持する条件です。これらは修正前にも成功することが期待されます。
実際に既存の human-history public CLI subprocess test は、
--dry-runの結果としてstatus_detail: dry_run_okと exit 0 を確認しています。影響
実装者が AC2・AC3 のテストにも意図的な失敗を追加したり、AC1 のバグに依存させたりすると、独立した回帰検証になりません。
pytest の公式仕様でも、exit 1 は実行したテストの失敗、exit 4 はコマンド使用エラー、exit 5 は未収集と区別されています。
最小修正
baseline-expect: failの指定は未作成テストファイルの baseline 分類として維持可能です。ただし、テスト追加後の期待値を分離してください。確認した
mainHEAD はd76e69f14c6dfa8ee6bc1dc3dc331615b880d7adです。Issue が参照する4afb0551と比較して、対象 publisher の blob SHA は同一であり、指摘された本体コードは変わっていません。#2988 自体にコメントはなく、専用実装 PR も確認できませんでした。なお、今回のレビューは live GitHub コード・コメント・公式文書に基づく静的検証です。pytest の独立実行、および誤投稿時の元の CLI argv の実測再検証は行っていません。
推奨は、P1 の2点を先に是正し、P2 のテスト証跡と stdin 互換性を明確化した上で、既存3 Allowed Paths 内で実装することです。 新しい publisher、schema、hook、approval gate の導入は不要です。
squne121 commentedon Oct 8, 2026
推奨方針
Issue #2988 の契約修正を、既存の
issue-refinement-loopで承認不要のまま完了させる方針を推奨します。対象コメント #6059253132 と現行リポジトリを確認しました。
今回の優先事項は次の4点です。
--dry-runの approved 経路で、GitHub 投稿とrefinement_approvedsignal の両方が抑止されることを検証対象にする。現行 Skill は 最大3回の review/fix 反復と、各反復における人間承認不要の継続をサポートしています。ただし、これと Claude Code のツール権限は別です。既存の auto mode は維持し、権限バイパスは要求しません。
Claude-GPT に貼り付けるプロンプト
Issue #2988 — issue-refinement-loop 自律実行指示
あなたは、既に auto mode で起動している対話的 Claude-GPT セッションです。現在のセッションを継続し、Claude Code の既存 harness、Skills、SubAgents、tools、hooks、permissions、worktree をそのまま使用してください。
対象
squne121/loop-protocol.claude/skills/issue-refinement-loop/SKILL.mdissue-refinement-loopmax_iterations: 31. 明示的な人間承認
私は repository OWNER として、次の作業を本 invocation に対して明示的に承認します。
各 iteration や通常の Issue 本文更新について、人間承認を取り直す必要はありません。
調査・提案だけで終了せず、必要な Issue 本文更新、remote readback、fresh review、termination まで実行してください。
ただし、Claude Code の auto mode と repository-owned loop policy は別の制御です。既存の auto mode を維持し、
bypassPermissions、--dangerously-skip-permissions、permission/hook policy の迂回は行わないでください。本依頼は Issue refinement の実行承認であり、production implementation の開始、PR merge、force push、secret 操作、他者の作業破壊を承認するものではありません。
2. Source of Truth の再取得
最初に GitHub と repository の current state を取得してください。
6059253132が 実装: 再発防止: publish_termination_report の legacy --dry-run が終了コメントを実投稿する #2988 に所属すること、author identity / association、body、updatedAt を検証して snapshot を固定する。6048387394を確認する。.claude/skills/issue-refinement-loop/SKILL.mdと必要なreferences/**を読む。CLAUDE.md、関連.claude/agents/*.md、canonical scripts、contract checker、runtime verification policy を確認する。古い commit SHA、過去の会話、過去の workflow 手順を最新 authority として再利用しないでください。
対象コメントの内容を検証済み事実と同一視せず、current main の実コード・テスト・GitHub evidence と照合してください。
3. Skill の正規実行
issue-refinement-loopを現在の SKILL.md に従って実行してください。選択したコメントは OWNER による human review directive として扱い、canonical
with_human_contextlane の使用可能性を検証してください。現行 Skill に記載されている preflight の呼び出し形は次のとおりです。
実行直前に command registry と current Skill contract を再確認し、差異があれば current canonical command に従ってください。
run_refinement_preflight.pyを直接呼んで capability gate を迂回しない。STATUS、NEXT_ACTION、MUST_READ、ARTIFACT、canonical decision fields をそのまま consume する。contract_update.run.with_human_contextを使用する。issue_editor_requiredの場合は Step 4 のissue-editorへ handoff する。preflight または consumer が返した判断を prose で上書きしないでください。
4. 今回解消すべきレビュー findings
P1-1: approved signal 抑止の false-green 防止
Issue #2988 の AC1 を改善し、legacy
--dry-runで approved 経路を実際に通る条件を明記してください。少なくとも次の inputs と観測を要求します。
--issue-number--body-file--dry-run--termination-reason approved--approved-body-sha256CLAUDE_CODE_SESSION_IDtask_contextctl.py signal applyの呼出し回数dry-run 有効時は次を同時に保証します。
--dry-runが伝搬する。refinement_approvedsignal 呼出しはゼロ。comment postedを出さない。dry-run 無効時は通常投稿後にのみ approved signal 経路へ到達することを検証します。
signal 抑止がセッション ID 不在、ハッシュ不正、入力不正による早期終了だけで成立する false-green を禁止します。
P1-2: baseline expectation の是正
修正前コードの期待挙動を、テストファイルの存在状態と各 AC の意味に分解してください。
pytest の結果は次を区別してください。
exit 4 または exit 5 を defect 再現の証拠として扱わないでください。
AC2・AC3 を意図的に失敗させるテスト設計は禁止します。
P2: 回帰検証と互換性
対象コメントの残りの推奨事項も取り込み、必要な contract 改善を行ってください。
特に次を確認してください。
--body-file経路と stdin 経路の互換性維持test_acN_の収集件数が正であること既存の normal-publish regression と human-history idempotency も守ってください。
5. Scope と設計制約
#2988 の目的は、legacy dry-run の欠陥を既存 publisher の最小変更で修正可能にする Issue contract を完成させることです。
既定の Allowed Paths は以下の3つです。
.claude/skills/issue-refinement-loop/scripts/publish_termination_report.py.claude/skills/issue-refinement-loop/tests/test_publish_termination_report_dry_run.py.claude/skills/issue-refinement-loop/tests/test_publish_termination_report.pyrefinement では、原則としてこれらのまま実装可能な AC / VC に改善してください。
#2979 の scope と混在させず、別 publisher、schema、wrapper、hook、approval gate の追加は提案しないでください。
本 invocation では production code の実装、実装 PR の作成を開始しません。refinement 完了後の implementation は別 invocation とします。
注意: 現在の #2988 は、legacy
publish_termination_report.py --dry-runが実投稿し得る不具合を対象としています。そのため、修正前の legacy dry-run を live GitHub 上で試験実行してはいけません。再現・検証には isolation fixture と fake executor を使用してください。
正規 termination report の実投稿は今回承認していますが、意図した controlled publish 経路だけを利用し、曖昧な結果に対する盲目的な再投稿はしないでください。
6. SubAgent の利用と完了待ち
SubAgent が必要なフェーズでは、current planner の判断に従って必ず使用してください。
Step 1: Investigation
investigation_policy.required == trueの場合、current.claude/agents/codebase-investigator.mdに従いcodebase-investigatorを起動してください。依頼には以下を含めてください。
Step 1b: Web research
web_research_policy.required == trueの場合のみweb-researcherを使用してください。外部仕様が必要なら公式資料を優先し、現在の実装と仕様の差分を検証してください。
Step 1 と Step 1b は依存関係がなければ並列起動して構いません。
ただし、両 SubAgent の実行が terminal state に到達し、最終結果を取得するまで Step 2 に進まないこと。
Step 2: Review
current Skill の root-owned review pipeline を使用してください。
canonical Step 2 は
issue-reviewerSubAgent を単に起動する手順ではありません。root_review_pipeline.produceは current contract に従い明示的 background Bash execution として起動し、task notification を join して最終 JSON を取得してください。background dispatch 成功を review 完了と扱わないでください。
canonical_step2_routeを routing authority とし、独自の判定を重複実装しないでください。Step 2.5 / Step 4
semantic review は trigger が適用を要求する場合のみ実施してください。
Rewrite が必要なら、current
.claude/agents/issue-editor.mdとedit-issueskill の契約に従ってissue-editorSubAgent に委譲してください。SubAgent の実行開始や中間ログをもって更新完了としないでください。
SubAgent 自身に nested delegation を要求せず、必要な sequential delegation は main thread が担当してください。
7. 自律反復と停止条件
次の事象は通常の作業として自動的に処理してください。
ただし、retry は current Skill / script の bounded policy に従い、ambiguous mutation outcome の盲目的再実行は禁止します。
max_iterations=3を維持してください。human_judgment_required、scope authority の衝突、証拠完全性の破綻、canonical 上限到達、destructive operation、secret 操作、permission bypass 必須といった真正の停止条件では、成功を偽装せず、構造化された blocker とともに停止してください。このプロンプトによる承認を、deterministic policy の無条件 override と解釈しないでください。
8. 終了条件
次の条件を満たすまで完了扱いにしないでください。
approvedになった場合も、impl-review-loopを自動起動しないでください。最終報告には以下を簡潔に記載してください。
この指示を受信したら、計画の提示だけで止まらず、ただちに current repository の確認から開始し、canonical workflow が許す terminal completion まで自律実行してください。
補足
今回のポイントは、review findings を単に Issue 本文へ追記するのではなく、実装担当が false-green を起こさない検証契約に変えることです。
また、pytest の exit code 1・4・5 は公式に異なる結果として定義されています。テスト未収集やファイル不在を、修正対象の欠陥が再現された証拠として使わない構成にしています。
image
pytest documentation
今回の指示範囲は Issue refinement の完了までです。実装・PR レビューループは別途
impl-review-loopで実行する設計にしています。squne121 commentedon Oct 8, 2026
issue-refinement-loop: human_escalation
step_5_operator_intervention_required)needs-fix、final contract gate はhuman_judgment。164213074ffde1006bb4ac123e06d21b0d56cc9cc06eb1761c47743a54c45243→e3cfd8cb293849d7c288612af1d94d15b9f7c8ac88cca4db99184bebc7893969(GitHub readback 一致)。baseline-expect: passを設定したため、実際は両方 pytest exit 4(missing file)。これは regression でも欠陥再現でもなく、baseline_regression_failed/contract_readiness_human_judgmentと分類された。AC2/AC3 の baseline PASS は既存の収集可能なテストへの VC で検証し、新規ファイルの AC 別テストは作成後の期待値として分離する必要がある。現判定を prose で上書きせず、approved終了・実装着手はしない。4cfcab02df4edafee19994fd88033d2322b67438。fresh preflightpass、更新後 root reviewneeds-fix(operator intervention)、final gatehuman_judgment。legacy--dry-runは live 実行していない。squne121 commentedon Oct 8, 2026
推奨アクション
Issue #2988 の Verification Commands(VC)を最小修正し、
issue-refinement-loopを再実行する方針を推奨します。GitHub の現行 Issue 本文とリポジトリを確認しました。今回の停止は実装上の欠陥が新たに発生したためではなく、未作成テストファイルに対して baseline PASS を要求した契約上の不整合です。
現行
mainは00275db676ef448287ddeea77ec0bd37aefa6ffeです。前回の4cfcab02から対象 publisher・既存テストの変更はありません。新規test_publish_termination_report_dry_run.pyは引き続き未作成です。今回、Issue #2988 の AC2/AC3 の VC と、その整合性を保つ説明文の修正を明示的に承認するのが適切です。
baseline-expectを一律failに変えるだけの形式的な回避は認めず、実際に収集・実行可能な既存テストを使用します。実装・PR 作成には進まず、fresh review と contract gate が正式に通過するところまでを今回の到達目標とします。
補足として、pytest の公式仕様でも exit 4 は usage error、exit 5 はテスト未収集であり、assertion failure の exit 1 とは区別されています。
Claude-GPT に貼り付ける再開プロンプト
以下は、既に auto mode で起動している対話的 Claude-GPT セッションへの指示です。前回の
human_escalationを無理に上書きせず、今回の明示的な OWNER 判断によって修正を再開する構成です。Issue #2988 — operator intervention 解消・refinement 完遂指示
あなたは既に auto mode で起動している対話的 Claude-GPT です。現在の Claude Code セッション、repository-owned launcher/profile、Skills、SubAgents、hooks、permissions、tools を継続使用してください。
対象と目的
Repository:
squne121/loop-protocolIssue: https://github.com/squne121/loop-protocol/issues/2988
停止報告: https://github.com/squne121/loop-protocol/issues/2988#issuecomment-6059672704
元の OWNER review: https://github.com/squne121/loop-protocol/issues/2988#issuecomment-6059253132
Skill:
.claude/skills/issue-refinement-loop/SKILL.md反復上限:
max_iterations=3目的は、AC2/AC3 の baseline VC 不整合を修正し、Issue refinement を正式な
approvedtermination まで完遂することです。前回の
operator_intervention_requiredは正規の判断として尊重してください。今回の指示は、その停止原因に対する新しい明示的な OWNER 判断です。前回の verdict を変更・偽装するのではなく、実際の Issue contract を是正して fresh evidence を取得してください。
1. 今回の OWNER 判断と明示的承認
私は repository OWNER として、以下を承認します。
Issue 実装: 再発防止: publish_termination_report の legacy --dry-run が終了コメントを実投稿する #2988 の AC2/AC3 における Verification Commands の修正。
修正に必要な baseline expectation、検証説明文、AC/VC 対応の限定的改善。
既存テストを baseline PASS の検証元として採用すること。
未作成の新規テストに対する baseline FAIL と、実装後の期待値を分離すること。
edit-issue/issue-editorの正規 controlled transaction を用いた Issue 本文更新。Issue の remote readback、修正後の fresh preflight、review、semantic review、final contract gate。
正規 Skill に従う SubAgent 起動、bounded recovery、自動 review/fix iteration。
重複しない必要最小限の GitHub コメント投稿と、正規 termination report の投稿。
canonical workflow が要求する非破壊的な worktree / artifact 操作。
正規 workflow が必要と判断する独立 follow-up Issue の materialization。
上記について、iteration ごとの追加承認は不要です。
今回の承認により、前回停止した VC 不整合について人間判断を改めて要求せず、正規の Issue 編集経路で修正してください。
ただし、これは既存の canonical judgment を上書きする許可ではありません。新しい OWNER 指示に基づく実際の修正が必要です。
Claude Code の auto mode を維持し、permission bypass、
--dangerously-skip-permissions、hook 迂回は要求しません。production implementation、実装 PR 作成、PR merge、force push、secret 操作、他者の作業破壊は承認しません。
2. 最初に fresh state を確認
GitHub と repository の最新状態を取得してください。
default branch の HEAD
Issue 実装: 再発防止: publish_termination_report の legacy --dry-run が終了コメントを実投稿する #2988 の現本文・コメント・state
元の OWNER review と停止報告
既存の関連 Issue / PR
CLAUDE.md、current Skill、references、必要な Agent 定義baseline VC preflight と contract readiness の実装
既存 publisher と既存テスト
前回記録された Issue body SHA は
e3cfd8cb293849d7c288612af1d94d15b9f7c8ac88cca4db99184bebc7893969です。これは比較用であり、最新状態の authority には使用しません。
前回使用した main HEAD は
4cfcab02df4edafee19994fd88033d2322b67438です。最新 main は再取得してください。前回の semantic review 結果を再調査の代替にせず、現在の repository evidence と突き合わせてください。
3. 修正すべき VC の正確な意味
現状の AC2/AC3 は、未作成の
test_publish_termination_report_dry_run.pyに対してbaseline-expect: passを設定しています。このため pytest exit 4 が発生し、canonical readiness が
baseline_regression_failedと判定しました。この判定を無効化するのではなく、VC の参照先を是正してください。
AC2: human-history の既存正常挙動
既存ファイル:
.claude/skills/issue-refinement-loop/tests/test_human_history_351_scope.py候補テスト:
test_production_entrypoint_is_a_real_subprocess_boundary_not_python_c既存テストが実際に収集・実行可能で、exit 0 になることを確認し、そのコマンドを AC2 の
baseline-expect: passに採用してください。この既存テストが保証する範囲と、新規テストで追加検証する argv・mutation・signal 計測の範囲は区別してください。
AC3: 通常投稿と失敗処理の維持
既存ファイル:
.claude/skills/issue-refinement-loop/tests/test_publish_termination_report.py既存の正常投稿・失敗処理テストを確認してください。
必要に応じて以下を検証元として使用します。
test_publishable_body_normal_posttest_gh_failure_records_artifact_and_fails_closed既存テストファイル全体の regression suite
実際に baseline PASS を確認できたコマンドを AC3 の
baseline-expect: passに採用してください。これらのテストだけで AC3 の新しい subprocess / signal ordering 要件を完全に検証したと主張しないでください。
新規テストの扱い
新規ファイル:
.claude/skills/issue-refinement-loop/tests/test_publish_termination_report_dry_run.pyこれはまだ存在しないため、そのファイルを指定する
test_ac2_/test_ac3_は現在 baseline PASS を保証できません。新規ファイルに対する検証は、実装時にテストを作成した後の期待値として分離してください。
canonical VC に記載する場合は、新規ファイル不在による
baseline-expect: failと、実装後に要求する PASS を明確に区別してください。各 VC には個別の
# AC2、# AC3形式の marker を付けます。複数 AC を一つの marker にまとめないでください。重要な制約:
exit 0: 実際にテストが収集・実行され成功
exit 1: assertion failure
exit 4: pytest usage error / missing file
exit 5: no tests collected
exit 4 / 5 を defect reproduction の証拠として扱いません。
baseline-expect: passをfailに変更するだけで問題解決としないでください。既存テストの実 PASS、未作成テストの状態、修正後の期待結果を独立に確認してください。
4. AC1 / AC4 とスコープの維持
今回の主修正は AC2/AC3 の VC です。
既に反映された以下の内容は維持してください。
AC1 の approved signal positive / negative controls
--termination-reason approvedと有効な body SHA / session IDcontrolled executor の
--dry-run伝搬確認dry-run 時の GitHub mutation 0、Task Context signal 0
通常投稿成功後の signal 発火順序
AC4 の body-file / stdin 互換性
空 body、存在しない file、validation failure の扱い
副作用計測と evidence requirements
human-history idempotency
AC4 の既存正常系を意図的に失敗させないでください。
Allowed Paths は原則として次の3つを維持します。
.claude/skills/issue-refinement-loop/scripts/publish_termination_report.py.claude/skills/issue-refinement-loop/tests/test_publish_termination_report_dry_run.py.claude/skills/issue-refinement-loop/tests/test_publish_termination_report.py今回の refinement では、これらの production code・テストファイルを実装変更する必要はありません。
Issue 本文の VC と説明だけを修正します。
新しい publisher、wrapper、schema、hook、approval gate は追加しません。
5. SubAgent の使用と完了待ち
current planner と Skill の routing authority に従ってください。
Investigation
investigation_policy.required == trueの場合、current.claude/agents/codebase-investigator.mdを確認してcodebase-investigatorを起動します。依頼する内容:
current HEAD の既存 AC2/AC3 テスト特定
実際のテスト名と収集条件
既存 PASS と追加テストの責任境界
baseline classifier が
baseline-expectを解釈する条件追加する VC による別の readiness failure の可能性
read-only とし、file/line evidence、expected output、failure classification を返させてください。
過去の investigator は inconclusive でした。今回は具体的な repository evidence を要求してください。SubAgent の証跡不足をそのまま結論にせず、main thread でも確認してください。
Web research
web_research_policy.required == trueの場合のみweb-researcherを起動します。pytest の exit code は公式 documentation を使用します。
Repository-local なテストの存在や挙動は Web evidence ではなく repository evidence で検証してください。
Issue 編集
今回の OWNER 指示による限定修正を、current
edit-issueSkill と.claude/agents/issue-editor.mdに従い、issue-editorSubAgent へ委譲してください。前回の Step 2 は operator intervention で終了しています。前回の reviewer 判定を
request_changesに偽装して Step 4 に進むことは禁止します。この指示を新しい operator-authorized remediation として扱い、現在の repository workflow が許可する controlled Issue 編集経路を使用してください。
編集の前に pre-edit readiness と body snapshot を確定してください。
SubAgent へ渡す指示には、対象 Issue、現在 SHA、修正する VC、維持する AC、Allowed Paths、禁止事項、期待する証跡を明記してください。
SubAgent 自身へ nested delegation は要求せず、必要な sequential delegation は main thread が行ってください。
完了待ち
SubAgent の dispatch 成功を完了とみなしてはいけません。
起動したすべての SubAgent について、terminal state への到達と最終結果の取得を確認してください。
依存する次工程は、先行 SubAgent の結果を join してから開始してください。
6. Controlled Issue 更新
Issue editor が修正した本文について以下を実施します。
Candidate body の static readiness。
正規 controlled transaction による更新。
GitHub remote body の独立 readback。
期待 body SHA と readback SHA の一致確認。
最新本文による fresh preflight。
Fresh root-owned review。
適用される semantic review。
Final contract readiness。
raw
gh issue edit、手組みの contract snapshot、架空の PASS evidence は使用しません。更新結果が曖昧な場合は、まず remote readback で確定してください。mutation を盲目的に再実行してはいけません。
7. 正規 issue-refinement-loop の再実行
VC の是正が完了した後、current Skill に従って新しい本文に対する
issue-refinement-loopを実行してください。元の OWNER anchor comment は、所属・origin を検証したうえで利用してください。
まず current command registry を確認し、正規の
preflight.run.with_human_contextlane を使用します。前回の body hash や contract-review artifact を再利用しません。
Step 2 は current canonical contract に従い、
root_review_pipeline.produceを main thread の Bash で明示的 background 実行してください。background task notification を join して最終 JSON を取得してから routing します。
canonical_step2_routeが唯一の routing authority です。issue-reviewerSubAgent を別の判定 authority として重複起動しないでください。Semantic review が必要なら、current
semantic_review_trigger.py、semantic_review_transport.py、join_review_results.pyを使用します。review が needs-fix なら、正規 rewrite lane で原因を修正し fresh review を繰り返してください。
max_iterations=3を維持し、上限回避のために iteration を恣意的にリセットしないでください。今回の新しい OWNER 指示と前回終了済み invocation の関係は、current workflow の規定に従って扱ってください。8. Validation と終了条件
最低限、次を確認します。
AC2 の既存 baseline VC が実際に PASS
AC3 の既存 baseline VC が実際に PASS
各 baseline PASS に正のテスト収集件数がある
新規テストファイル不在は正しく分類されている
AC1 の defect reproduction 要件は保持されている
AC4 の期待値分類は維持されている
Verification Commands の marker と各 AC が一致
Issue 本文の readback 一致
fresh deterministic review の正式 verdict
semantic review の最終 result が join 済み
final contract-review の
status: go最終 verdict・body SHA・contract snapshot の freshness 一致
すべてを満たした場合だけ
approvedtermination としてください。最終 termination report は正規 publisher / controlled mutation lane から投稿してください。前回の停止コメントを重複投稿しないでください。
修正前の legacy
publish_termination_report.py --dry-runを live GitHub に向けて実行してはいけません。正常な termination report の投稿と、不具合再現のための dry-run を混同しないでください。
同じ原因による再停止が発生した場合は、VC の実測結果と canonical reason code を再調査してください。通常の修正可能な不整合は、残存する正規ループ予算内で自律的に修復します。
真正の新規 authority conflict、証拠完全性の破綻、canonical 上限到達、不可避の permission bypass については、成功を偽装せず正式に escalation してください。
9. 最終報告
完了時に以下を報告してください。
Issue 実装: 再発防止: publish_termination_report の legacy --dry-run が終了コメントを実投稿する #2988 の最終状態と URL
使用した main HEAD
Issue body SHA の before / after
修正した VC と実際の baseline 結果
使用した SubAgents とそれぞれの terminal result
fresh review / semantic review / final contract gate
termination reason
残 blocker
必要な follow-up Issue の有無
approvedとなっても、production implementation やimpl-review-loopは開始しません。計画提示だけで終了せず、今回の明示的 OWNER 判断に基づき、Issue 本文の実修正から fresh validation、正規 termination まで自律実行してください。
この指示の重要な点は、前回の
operator_intervention_requiredを無視するのではなく、その停止原因に対する具体的な OWNER 判断を新たに与えることです。既存のレビュー権限・チェック機構を緩和せずに再開できます。なお、ここでは実際の Issue 本文更新やテスト実行は行っていません。Claude-GPT 側での controlled transaction と fresh verification を完了条件としています。
squne121 commentedon Oct 8, 2026
Contract Review Result
[-]再発防止: publish_termination_report の legacy --dry-run が終了コメントを実投稿する[/-][+]実装: 再発防止: publish_termination_report の legacy --dry-run が終了コメントを実投稿する[/+]squne121 commentedon Oct 8, 2026
issue-refinement-loop: approved
operator_intervention_requiredは正規の停止判定として維持し、新しい OWNER 判断 実装: 再発防止: publish_termination_report の legacy --dry-run が終了コメントを実投稿する #2988 (comment) に基づき AC2/AC3 の VC だけを是正した。00275db676ef448287ddeea77ec0bd37aefa6ffe。Issue body SHA-256:e3cfd8cb293849d7c288612af1d94d15b9f7c8ac88cca4db99184bebc7893969→9c857681d5054310c33684e7bb72e8861bd5bc286e40f667fc532b0a57bd87c6(遠隔 readback 一致)。termination hygiene として題名に実装:を付け、本文 SHA は維持した。inconclusive(source-level evidence 不足、main thread が実コード・テストで独立確認)、web-researcherinconclusive(pytest 公式 exit-code のみ確認、repository 固有の判断は repository evidence で確定)、issue-editorok(controlled transaction)、issue-design-reviewerclear(fresh bundle)。Web join は repository decision 独立確定によるproceed_with_notes。pass、root-owned reviewapprove、semantic joinapprove、final contract gatego。Contract Snapshot: https://github.com/squne121/loop-protocol/issues/2988#issuecomment-6070241142(独立 GET と currentness checkok)。未解決 blocker なし、follow-up Issue なし。production implementation・PR 作成・merge は行わない。squne121 commentedon Oct 8, 2026
推奨アクション
Issue #2988 は refinement が
approvedで終了しているため、impl-review-loopによる実装へ進む方針を推奨します。GitHub の現行状態では、Issue は OPEN で、実装用の契約と検証条件が整っています。
gosnapshot9c857681d5054310c33684e7bb72e8861bd5bc286e40f667fc532b0a57bd87c6今回の実装は、
publish_termination_report.pyの legacy--dry-runが実際の GitHub コメント投稿や Task Context signal を引き起こし得る不具合を修正するものです。推奨する実行範囲は、実装 → テスト → 敵対的 PR レビュー → 修正 → 再検証 → merge-ready 判定までです。各反復の追加承認は不要とし、実際の merge は行いません。
特に、未作成テストによる pytest exit 4 を欠陥再現と扱わないこと、SubAgent の起動後に最終結果を取得すること、修正前の legacy dry-run を live GitHub に対して実行しないことが重要です。
現行
impl-review-loopを確認した結果、次の運用をプロンプトに反映します。重要な実行条件: Step 1 は root-owned synchronous entry から開始し、Step 2 の
test-runnerは最終 report と terminalcompletedの両方を確認します。PR review 前にはstep4-adjudicateで current-head VC gate を通し、最終承認はstep5-terminal-gateの exit 0 のみに従います。Claude-GPT に貼り付けるプロンプト
Issue #2988 — impl-review-loop 自律実装・レビュー指示
あなたは、既に auto mode で起動している対話的 fresh Claude-GPT セッションです。
現在の Claude Code session、repository-owned Claude-GPT launcher/profile、Skills、SubAgents、tools、hooks、permissions、worktrees をそのまま使用してください。新しい session を起動し直したり、backend/model mapping を変更したりしないでください。
目標は Issue #2988 の実装、独立検証、PR レビュー、必要な修正を完了し、人間が merge 判断できる直前まで到達することです。
計画や調査だけで終了しないでください。
1. 対象と承認済み契約
squne121/loop-protocol.claude/skills/impl-review-loop/SKILL.mdimpl-review-loop9c857681d5054310c33684e7bb72e8861bd5bc286e40f667fc532b0a57bd87c6上記 SHA と snapshot は参照情報です。現在の GitHub Issue、main、PR、CI、repository contract を fresh に再取得してください。
refinement_approvedコメント自体を Step 1 の implementation authorization に代用せず、現行 Skill の root-owned synchronous entry transition を実行してください。2. 明示的な OWNER 作業承認
私は repository OWNER として、Issue #2988 のこの実装・レビューループについて、以下を一括して承認します。
impl-review-loopと必要な関連 Skills の実行REQUEST_CHANGESに対応する bounded fix iterationupdate_branch、PR body hygiene の正規修復これらについて、iteration ごと・通常の修正ごとに人間承認を取り直す必要はありません。
通常の test failure、CI failure、review finding、stale HEAD、修正可能な PR body 不備は、停止理由ではなく次の自動修正アクションへの入力として扱ってください。
ただし、Claude Code auto mode と repository loop policy は別物です。現行 auto mode を維持し、
bypassPermissions、--dangerously-skip-permissions、permission/hook の迂回は行いません。承認しない操作:
真の authority conflict、不可避な Allowed Paths 外の修正、明示的 human stop、canonical 上限到達などは正規 escalation としてください。
3. 初期調査と Source of Truth
最初に以下を確認してください。
CLAUDE.md、関連.claude/rules/**。.claude/skills/impl-review-loop/SKILL.mdとsteps/**。.claude/skills/implement-issue/SKILL.md、.claude/skills/pr-review-judge/SKILL.md、必要なopen-prSkill。.claude/agents/implementation-worker.md、test-runner.md、pr-reviewer.md。docs/dev/workflow.md、docs/dev/runtime-verification-policy.md、関連 canonical scripts / tests。既存 PR が #2988 の scope を実際に所有するなら原則再利用し、重複 PR を作らないでください。
現在の Issue 本文が十分であれば、追加の planning artifact や approval layer を増やさず実装を開始してください。
4. Root-owned entry の実行
現行
impl-review-loopの Root-Owned Synchronous Entry Transition を尊重してください。root/main thread が同一の連続した control flow で、
capability preflight → live Issue fetch → current-run issue-contract-review → fresh live fetch → canonical routing → Step 1 起動
を実行します。
古い
invocation_tokenや保存済み approval packet を再提示して Step 1 を開始しないでください。snapshot、launch ledger、scope-rollup 等の advisory artifact が missing/stale であるだけでは停止しません。ただし live Issue identity、Allowed Paths、worktree state、実テスト、required CI、明示 human stop など実際の safety boundary は守ります。
最新 Skill の判定と、このプロンプトの古くなった手順に差がある場合は、最新 Skill および canonical script の判断を優先してください。
5. 実装仕様 — 最小修正
Issue #2988 の主目的は、legacy
publish_termination_report.py --dry-runが GitHub に実投稿し得る欠陥の修正です。現在の実コードを確認したうえで、次を最小差分で実装してください。
AC1: legacy approved dry-run
legacy CLI で指定された
--dry-runをmain()→publish()→_post_github_comment()→ controlled executor まで伝搬してください。approved 経路については、以下を同時に有効にした public CLI subprocess を隔離環境で検証します。
--issue-number--body-file--dry-run--termination-reason approved--approved-body-sha256CLAUDE_CODE_SESSION_ID検証すべき結果:
--dry-runがある。task_contextctl.py signal apply呼出しが 0。comment postedのような通常投稿成功メッセージがない。--dry-runだけを外した positive control では、投稿成功後に approved signal 経路へ到達することを検証します。無効な session ID・SHA や早期 return によって signal 0 が成立しただけの false-green を禁止します。
AC2: human-history 互換
既存の
--human-history-request-file R --dry-runの動作を維持してください。dry_run_ok、非投稿、signal 0、stable identity marker、idempotency、duplicate/no-op の既存契約を保持します。AC3: 通常投稿の互換性
--dry-runがない場合は通常投稿の semantics を維持します。AC4: 入力・異常系
--body-fileと stdin の両方を検証してください。空 body、存在しない body-file、controlled dry-run validation failure は非成功とし、誤った投稿・signal 発行・成功文言を許しません。
6. テスト設計と baseline
修正前の legacy
--dry-runを live GitHub に向けて実行することを禁止します。実行時のテストには public CLI subprocess fixture と argv-sensitive fake controlled executor を用います。
fake executor が常に副作用 0 を返すだけの空疎なテストは禁止します。
--dry-runが欠落した場合には、POST/PATCH 相当の副作用を計数できるようにしてください。GitHub mutation 件数と Task Context signal 件数を独立計測します。
作業順序:
pytest exit code は厳密に区別します。
0: テストが収集・実行され成功1: 収集・実行されたテストの失敗4: usage error / missing file5: no tests collectedexit 4 / 5 を defect reproduction と主張しません。
既存の AC2 baseline PASS と AC3 baseline PASS を維持し、修正前コードで AC2/AC3 を意図的に失敗させません。
AC4 は既存正常系と新規 dry-run 固有の異常系を分けて記録します。
新規テスト作成後には
test_ac1_、test_ac2_、test_ac3_、test_ac4_の収集件数がそれぞれ正であることを確認します。修正後には全 AC と既存 regression suite を PASS させます。
各テストの証跡として tested HEAD、CLI argv / exit、executor argv / exit、mutation count、signal count、signal ordering を残してください。
Runtime Verification Applicability は
immediateです。実行できなかった検証はunavailableとして扱い、PASS に昇格しないでください。7. Allowed Paths
原則として以下の3ファイルに収めてください。
.claude/skills/issue-refinement-loop/scripts/publish_termination_report.py.claude/skills/issue-refinement-loop/tests/test_publish_termination_report_dry_run.py.claude/skills/issue-refinement-loop/tests/test_publish_termination_report.py既存ファイルの変更と新規テストの追加に限定します。
新しい publisher、schema、wrapper、hook、approval gate、専用 SubAgent framework は導入しません。
Allowed Paths 外の実変更が不可避なら canonical scope authority に従い、無断変更や contract gate 迂回で解決しないでください。
8. SubAgent の実行と完了待ち
必要な SubAgent を使用し、root/main thread は control-plane、routing、state tracking を担当してください。
Step 1 — Implementation
現行
.claude/agents/implementation-worker.mdを確認してimplementation-workerを起動してください。current
implement-issueSkill に従い、worktree、実装、テスト、commit、push、PR 作成まで実行させてください。依頼には実値として次を含めてください。
IMPLEMENT_RESULT_V1単なる調査 report や diff 提案だけで Step 1 を終了しないでください。
Step 2 — Verification
test-runnerSubAgent を使用し、実装担当とは独立に検証させてください。current Issue body から canonical
extract-vc-metadataを使用して(ac, raw_command, command_hash)を取得し、実値で渡します。SubAgent は各 command の AC label、command、command_hash を逐語的に保持した
TEST_VERDICT_MACHINE/v2を返す必要があります。AC_UNKNOWNや複数 AC の label を勝手に改名・集約・再計算しないでください。report に無い GitHub workflow ID、artifact ID、producer receipt を捏造しないでください。
Step 4 — PR Review
現行
pr-reviewerとpr-review-judgeSkill を使用してください。レビュー対象は必ず最新 PR HEAD とし、Issue contract、実 diff、周辺コード、CI、runtime evidence を照合します。
重点レビュー:
dry_run伝搬漏れレビュー結果は
verdict、reviewed_head_sha、blockers、warningsの現行最小 convention で受け取ります。全 SubAgent 共通 Completion Protocol
SubAgent dispatch 成功を、作業完了として扱ってはいけません。
すべての dispatch について次を実行してください。
spawn_agentが返した canonical task name を保持する。wait_agentは mailbox activity の待機として利用する。list_agentsにより同一 task name の terminalcompletedを確認する。completedの両方が揃った後にのみ downstream へ進む。errored、interrupted、shutdown、not_found、timeout、途中の mailbox update は成功ではありません。SubAgent は親会話の暗黙 context を継承すると仮定せず、task、target、authority、constraints、必要な evidence、expected output を明示してください。
独立作業は必要に応じて並列化して構いませんが、依存工程は先行 task の final result を join してから進めてください。
SubAgent 自身による不要な nested delegation は避け、必要な順次 dispatch は root/main thread が管理してください。
9. PR / CI / review loop
既存 PR があれば再利用してください。新規なら
1 Issue = 1 PRに従って作成します。implementation-workerの terminal completion 後、必ず独立test-runnerを実行してください。Step 4 起動直前には現行の
adjudicate_vc_result.py step4-adjudicateを用い、current HEAD、Issue body SHA、literal command hashes、実 test report の binding を確認してください。VC gate が blocking の場合、成功として PR review を続行しません。必要な修正へ route します。
required CI は current HEAD に対して待機・確認し、失敗時はログと原因を調査します。
pr-reviewerの final report を取得したら、実 GitHub mergeability と合わせて canonical Step 5 routing を行ってください。Terminal approval は
step5-terminal-gateが exit 0 を返した場合に限ります。特に次を守ってください。
dispatch_seqを保存する。APPROVEの自己申告だけで merge-ready にしない。BLOCKED、UNKNOWN、UNSTABLEを自動的に Git conflict と決めつけない。REQUEST_CHANGESなら blockers をfix_deltaにして implementation-worker へ戻します。PR body の evidence 同期だけが残る場合は、current
body_only_repair_plan.pyの eligibility 判定に従い、適格なら既存 bounded body-only lane を使用してください。update_branchが選択された場合は正規 worker に委譲し、更新後に verification と PR review を再実行します。max_iterations=3を維持し、canonical body-only 例外以外で無制限に反復しないでください。通常の修正可能な failure について新たな人間承認を求めず、既に承認した範囲内で修正と再検証を進めてください。
10. 再発防止
今回の欠陥は #2988 自体が再発防止 Issue なので、同じ原因の Issue を重複起票しないでください。
実装・レビュー中に別の独立した再発性 defect を発見した場合は、まず既存 Issue を検索してください。
明確な別 failure class であり、今回の Allowed Paths 内では解決できない場合に限り、問題・再現条件・影響・最小修正・回帰検証条件を持つ follow-up Issue を起票して構いません。
恒久的な gate や schema を増やすだけの一般的 hardening は不要です。
11. 停止境界
以下の場合のみ canonical policy に従い正式に停止・escalation してください。
同じ HEAD に対する単なる CI failure、review finding、artifact warning、修復可能な VC mismatch を安易な停止理由にしないでください。
12. 最終到達点
次を満たして初めて実装・レビューループ完了としてください。
APPROVEstep5-terminal-gateが exit 0到達したら PR は人間が merge 判断できる状態で残してください。
実 merge、auto-merge、不可逆 cleanup は行わないでください。
最終報告には Issue/PR URL、main SHA、PR HEAD SHA、変更ファイル、AC 別テスト結果、baseline reproduction、runtime evidence、CI、各 SubAgent の terminal result、最終 reviewer verdict、terminal gate、残 blocker、再発防止 Issue の有無を記載してください。
この指示を受信したら、計画提示だけで停止せず、直ちに current repository の確認と正規
impl-review-loop起動から始め、merge 直前の terminal completion まで自律実行してください。補足として、pytest の exit 0・1・4・5 の区別は公式仕様にも一致しています。
image
pytest documentation
今回は特に、実装前に隔離テストで本当の assertion failure を再現し、修正後の PASS と対比することを実装品質の中心に置いています。
squne121 commentedon Oct 8, 2026
implement-issue: 実装完了
.claude/worktrees/issue-2988-termination-dry-runworktree-issue-2988-termination-dry-run31465965e9adba50f23c8086e6999fc81b530456uv_version_mismatch(一時 fixture に uv version pin がない既存箇所)で失敗。PR 本文に診断と runtime 証跡を記載。test: isolate termination publisher CLI fixture writes (#2988)
fix: legacy termination dry-run でコメントと signal を抑止する (#2988) (#3003)