Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "PR #2597 が追加した CLASSIFICATION_MAP の dead code エントリと map-membership-only テストの整理"
change_kind: codeParent Issue
none
Parent Goal Ref
- Goal: PR fix: classify conditional close evidence publication #2597(Issue 実装: ci-verdict-summary が conditional close-evidence-publication check を excluded として分類する #2587 実装)が
ci_verdict_summary_v2.pyのCLASSIFICATION_MAPに追加した("ci", "close-evidence-publication"): "excluded"エントリがCONDITIONAL_EXCLUDED_TUPLES経路により実行時に無視される dead code であることが独立検証で判明したため、その整理を単独 Issue として行う。 - Desired Destination:
.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.pyと対応 test ファイルの dead code / dead test 解消。
Current Validated Scope
.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.pyのCLASSIFICATION_MAPから("ci", "close-evidence-publication")エントリを削除する。.claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.pyのtest_close_evidence_publication_is_registered_as_excludedを削除する。
Remaining Parent Gaps
なし
Outcome
.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py の CLASSIFICATION_MAP から ("ci", "close-evidence-publication"): "excluded" エントリ(build_check_entry() が CONDITIONAL_EXCLUDED_TUPLES 経由で必ず再分類するため consumer path の判定には使われない dead code)を削除し、対応する map-membership-only テスト test_close_evidence_publication_is_registered_as_excluded を削除したコミットが .claude/skills/pr-review-judge 配下に存在し、CONDITIONAL_EXCLUDED_TUPLES 経由の既存 conditional behavioral test matrix(reliability-assessment / close-evidence-publication / ci-runtime-baseline-gate-ready の parameterized positive/negative cases)を変更せず全件 PASS している状態。
Runtime Verification Applicability
- decision: not_applicable
- reason: 静的コード整理とユニットテスト調整のみで完結するため
In Scope
CLASSIFICATION_MAPから("ci", "close-evidence-publication")エントリを削除するtest_close_evidence_publication_is_registered_as_excludedテストを削除する
Out of Scope
CONDITIONAL_EXCLUDED_TUPLES自体の内容変更、is_exact_ordinary_pr_dispatch_only_skip()の exact skip predicate の変更(PR fix: AC3 canary の親子因果証跡を bindする #2561 / commit 9a8cd2b の既存契約はそのまま維持する)CLASSIFICATION_MAPの他エントリの整理(本 Issue はclose-evidence-publicationエントリのみを対象とする)- pr-review-judge の他ロジック(severity 判定、verdict aggregation、workflow、schema 等)の変更
- live workflow dispatch、artifact readback、新規 runtime canary、追加 security harness の導入
Acceptance Criteria
- AC1: static
CLASSIFICATION_MAPに("ci", "close-evidence-publication")エントリが存在しない - AC2:
test_close_evidence_publication_is_registered_as_excludedという名前の関数がtest_ci_verdict_summary_v2.pyに存在しない - AC3:
CONDITIONAL_EXCLUDED_TUPLES経由の既存 conditional behavioral test(reliability-assessment/close-evidence-publication/ci-runtime-baseline-gate-readyの parameterized positive/negative cases)が変更されず維持されている - AC4:
.claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.pyの既存テストが全件 PASS している
Verification Commands
# AC1
$ ! rg -nF '("ci", "close-evidence-publication"): "excluded"' .claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py# AC2
$ ! rg -nF 'test_close_evidence_publication_is_registered_as_excluded' .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.py# AC3
# AC4
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.py -q単なる rg -n "close-evidence-publication" ci_verdict_summary_v2.py(negation なし)は CONDITIONAL_EXCLUDED_TUPLES 内の正当な occurrence にも一致するため、static entry 削除の verification としては使用しない。AC1/AC2 は削除成功時に exit 0 となる negative-presence check(! 否定)を使用する。
Allowed Paths
.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py.claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
なし
Required Design References
- .claude/skills/pr-review-judge/SKILL.md
- .claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py
Scope Delta(任意)
N/A
Notes for Reviewer
- 本 Issue は severity: optional_follow_up(tech-debt / code-clarity 目的)。緊急度は低い。
- PR fix: classify conditional close evidence publication #2597 は既にマージ済みであり、本 Issue は revert ではなく後続クリーンアップとして起票する。
- 2026-09-10、operator-asserted human context(issuecomment-5619029267、OWNER)の指摘を
codebase-investigatorで独立検証した結果、以下が current main(0666251d84223fbbaf7f9c3389917a7a40f3a753)で確認された:(1)CLASSIFICATION_MAPに対象 entry が存在する(ci_verdict_summary_v2.py:85)、(2) 同 tuple がCONDITIONAL_EXCLUDED_TUPLESにも存在する(ci_verdict_summary_v2.py:119)、(3)build_check_entry()は対象 tuple に対し static 値を最終値とせずis_exact_ordinary_pr_dispatch_only_skip()の結果で再分類する(ci_verdict_summary_v2.py:359-364)、(4) 既存 parameterized test が3 job共通で positive/negative の両方向を検証している(test_ci_verdict_summary_v2.py:475-576)、(5) map-membership のみを検証するtest_close_evidence_publication_is_registered_as_excludedが存在する(test_ci_verdict_summary_v2.py:478-480)。これにより cleanup の成功条件を delete-only に固定した。 CLASSIFICATION_MAPとCONDITIONAL_EXCLUDED_TUPLESの二重登録を防ぐ invariant regression(例:set(CLASSIFICATION_MAP).isdisjoint(CONDITIONAL_EXCLUDED_TUPLES))は有用だが、本 Issue の必須 AC ではない。実装者の裁量で追加してよい。- ruff check(対象 Python files)は実装者が手元で実行することを推奨するが、
baseline_vc_preflight.pyの VC preflight allowlist がuv run ruff/ruff系コマンドを許可していないため、決定論的 AC / Verification Commands には含めない(fresh review で判明した現状の tooling 制約)。
Source
- kind: post_merge_cleanup
- url: fix: classify conditional close evidence publication #2597
- note_id: pr-review-independent-verdict
- dedupe_key: follow-up:squne121/loop-protocol:pr/2597:dead-code-cleanup
Activity
squne121 commentedon Sep 10, 2026
結論
Issue #2604 の問題認識は正しいですが、現状の Issue contract には
REQUEST_CHANGESを出します。実装としては非常に小さく、PR #2597 が追加した static map entry と map-membership-only test を削除する方向が正解です。現 Issue のように「dead code にコメントを付けて残す」「既存と重複する behavioral test に置換する」まで成功扱いすると、cleanup Issue なのに dead state を温存できます。Issue #2604 自身がその両方を許容しています。
敵対的レビュー findings
Severity | Finding | 判定 -- | -- | -- P1 | AC1 が comment-only を許しており、Issue の目的を満たさなくても close できる | 修正必須 P1 | static CLASSIFICATION_MAP の "excluded" は runtime semantics と矛盾する | 削除推奨 P1 | AC2 の「behavior test に置換」は既存 parameterized regression と重複する | 削除または不変条件テストへ変更 P2 | Verification Commands が cleanup の成立を正確に検証できない | 修正推奨 P3 | この cleanup に runtime/live-CI harness を増やす必要はない | 現在の not_applicable を維持1. P1 — 「コメントを付ければOK」は cleanup として弱すぎる
現在の実装ではまず
get_classification()から static map の値を取得しますが、対象 tuple がCONDITIONAL_EXCLUDED_TUPLESに入っていれば、その直後にbuild_check_entry()が classification を 必ず再代入します。exact ordinary-PR skip ならexcluded、それ以外ならunknownです。したがって static map の("ci", "close-evidence-publication"): "excluded"は consumer path では判定に使われません。
さらに、単なる無害な重複でもありません。static map だけを見るコードからは「この check は無条件 excluded」に見える一方、実際の runtime contract は failure / cancelled / wrong event / stale provenance 等を
unknownとして fail-closed にするものです。コメントで dead entry を説明して残すより削除した方が single-source-of-truth が明確です。V1 evaluator はすでにこの3 jobを
ORDINARY_PR_SKIPPED_EXCLUDE_RULESだけで表現しており、close-evidence-publicationを無条件 exclusion としては持っていません。V2も同じモデルへ戻す方が整合的です。2. P1 — 新しい behavioral test は不要
PR #2597 が追加したコードは、実質的に map entry と
test_close_evidence_publication_is_registered_as_excludedだけです。
しかし現在の test suite にはすでに
close-evidence-publication、reliability-assessment、ci-runtime-baseline-gate-readyの3件を parameterize して、exact ordinary PR + completed + skipped + current head + exact CheckRun provenance →
excludedと、
failure / cancelled / pending / stale / incomplete provenance / wrong event / missing CheckRun ID →
unknown+gh_errorの両方向を検証するテストがあります。
pytest の
parametrizeも、同じ input→expected-output contract を複数ケースに適用するための標準機構です。現在の構造は素直です。 (pytestドキュメント)したがって、one-off behavioral test に置換する必要はありません。 より品質を上げるなら、重複そのものを再発防止する小さな invariant test の方が価値があります。
これは特定 job の実装詳細を固定するのではなく、「conditional policy と unconditional static policy を二重登録しない」という、このバグの本質を固定します。
3. Web検証 — conditional classification の設計自体は正しい
GitHub公式仕様では、job-level
ifが偽なら job は skipped になります。また Check Runs API は completed check の conclusion としてskippedを明示的に持ちます。一方、GitHub自身の status-check semantics では skipped は依存job等に対して成功相当として扱われます。 (GitHub Docs)このリポジトリではそこからさらに厳しく、
「名前がこのjobだから excluded」ではなく、「ordinary PRであり、exact current headの、provenance-completeな、本当に skipped されたCheckRunだから excluded」
と判定しています。この custom fail-closed policy は合理的です。PR #2561 がまさにその3 tuple用の conditional path を導入しており、
close-evidence-publicationの実 workflow 自体も manualworkflow_dispatchopt-in job として設計されています。したがって、
CONDITIONAL_EXCLUDED_TUPLESや exact predicate は触らないという #2604 の scope は正しいです。4. P2 — Verification Commands を直した方がいい
現在の
では、map entry を削除しても
CONDITIONAL_EXCLUDED_TUPLESに正当に残るため必ずヒットします。つまり AC1 の検証になりません。また、削除確認として普通に
rg test_close...を実行すると「見つからない」場合の exit code は非0なので、自動実行ハーネスによっては成功状態を失敗扱いします。推奨する verification は次の程度です。
推奨する Issue #2604 の着地点
実装方針は 「comment or delete」ではなく delete に固定するのがよいです。
CLASSIFICATION_MAPから1 entryを削除し、test_close_evidence_publication_is_registered_as_excludedを削除する。既存の conditional behavioral matrix はそのまま維持する。余力があれば上記のCLASSIFICATION_MAP ∩ CONDITIONAL_EXCLUDED_TUPLES == ∅invariant を1本だけ追加する、という構成です。これは実質的に PR #2597 の意味のなかった +7行を外科的に戻しつつ、PR #2561 が確立した runtime semantics は一切変更しない修正です。#2587 の独立検証でも、static entry は behavioral delta を作らず、existing exact guard が実際の挙動を所有していると記録されています。
また、live workflow dispatch、artifact readback、新しいcanary、追加security harness は不要です。
Runtime Verification Applicability: not_applicableはそのままでよく、個人開発でこの2ファイルcleanupのためにワークフローを重くする価値はありません。最終 verdict:
## 結論REQUEST_CHANGES。ただし実装方針の問題ではなく Issue contract の曖昧さが blocker です。 現状のまま自律エージェントへ渡すと、「dead entry にコメントだけ追加」「既存と重複するテストを追加」という、形式上ACを満たすが品質を改善しない収束が許されます。そこだけ先に潰すのを推奨します。Issue #2604 の問題認識は正しいですが、現状の Issue contract には
REQUEST_CHANGESを出します。実装としては非常に小さく、PR #2597 が追加した static map entry と map-membership-only test を削除する方向が正解です。現 Issue のように「dead code にコメントを付けて残す」「既存と重複する behavioral test に置換する」まで成功扱いすると、cleanup Issue なのに dead state を温存できます。Issue #2604 自身がその両方を許容しています。
敵対的レビュー findings
CLASSIFICATION_MAPの"excluded"は runtime semantics と矛盾するnot_applicableを維持1. P1 — 「コメントを付ければOK」は cleanup として弱すぎる
現在の実装ではまず
get_classification()から static map の値を取得しますが、対象 tuple がCONDITIONAL_EXCLUDED_TUPLESに入っていれば、その直後にbuild_check_entry()が classification を 必ず再代入します。exact ordinary-PR skip ならexcluded、それ以外ならunknownです。したがって static map の("ci", "close-evidence-publication"): "excluded"は consumer path では判定に使われません。
さらに、単なる無害な重複でもありません。static map だけを見るコードからは「この check は無条件 excluded」に見える一方、実際の runtime contract は failure / cancelled / wrong event / stale provenance 等を
unknownとして fail-closed にするものです。コメントで dead entry を説明して残すより削除した方が single-source-of-truth が明確です。V1 evaluator はすでにこの3 jobを
ORDINARY_PR_SKIPPED_EXCLUDE_RULESだけで表現しており、close-evidence-publicationを無条件 exclusion としては持っていません。V2も同じモデルへ戻す方が整合的です。2. P1 — 新しい behavioral test は不要
PR #2597 が追加したコードは、実質的に map entry と
test_close_evidence_publication_is_registered_as_excludedだけです。
しかし現在の test suite にはすでに
close-evidence-publication、reliability-assessment、ci-runtime-baseline-gate-readyの3件を parameterize して、exact ordinary PR + completed + skipped + current head + exact CheckRun provenance →
excludedと、
failure / cancelled / pending / stale / incomplete provenance / wrong event / missing CheckRun ID →
unknown+gh_errorの両方向を検証するテストがあります。
pytest の
parametrizeも、同じ input→expected-output contract を複数ケースに適用するための標準機構です。現在の構造は素直です。 ([pytestドキュメント]1)したがって、one-off behavioral test に置換する必要はありません。 より品質を上げるなら、重複そのものを再発防止する小さな invariant test の方が価値があります。
これは特定 job の実装詳細を固定するのではなく、「conditional policy と unconditional static policy を二重登録しない」という、このバグの本質を固定します。
3. Web検証 — conditional classification の設計自体は正しい
GitHub公式仕様では、job-level
ifが偽なら job は skipped になります。また Check Runs API は completed check の conclusion としてskippedを明示的に持ちます。一方、GitHub自身の status-check semantics では skipped は依存job等に対して成功相当として扱われます。 ([GitHub Docs]2)このリポジトリではそこからさらに厳しく、
「名前がこのjobだから excluded」ではなく、「ordinary PRであり、exact current headの、provenance-completeな、本当に skipped されたCheckRunだから excluded」
と判定しています。この custom fail-closed policy は合理的です。PR #2561 がまさにその3 tuple用の conditional path を導入しており、
close-evidence-publicationの実 workflow 自体も manualworkflow_dispatchopt-in job として設計されています。したがって、
CONDITIONAL_EXCLUDED_TUPLESや exact predicate は触らないという #2604 の scope は正しいです。4. P2 — Verification Commands を直した方がいい
現在の
rg -n "close-evidence-publication" ci_verdict_summary_v2.pyでは、map entry を削除しても
CONDITIONAL_EXCLUDED_TUPLESに正当に残るため必ずヒットします。つまり AC1 の検証になりません。また、削除確認として普通に
rg test_close...を実行すると「見つからない」場合の exit code は非0なので、自動実行ハーネスによっては成功状態を失敗扱いします。推奨する verification は次の程度です。
推奨する Issue #2604 の着地点
実装方針は 「comment or delete」ではなく delete に固定するのがよいです。
CLASSIFICATION_MAPから1 entryを削除し、test_close_evidence_publication_is_registered_as_excludedを削除する。既存の conditional behavioral matrix はそのまま維持する。余力があれば上記のCLASSIFICATION_MAP ∩ CONDITIONAL_EXCLUDED_TUPLES == ∅invariant を1本だけ追加する、という構成です。これは実質的に PR #2597 の意味のなかった +7行を外科的に戻しつつ、PR #2561 が確立した runtime semantics は一切変更しない修正です。#2587 の独立検証でも、static entry は behavioral delta を作らず、existing exact guard が実際の挙動を所有していると記録されています。
また、live workflow dispatch、artifact readback、新しいcanary、追加security harness は不要です。
Runtime Verification Applicability: not_applicableはそのままでよく、個人開発でこの2ファイルcleanupのためにワークフローを重くする価値はありません。最終 verdict:
REQUEST_CHANGES。ただし実装方針の問題ではなく Issue contract の曖昧さが blocker です。 現状のまま自律エージェントへ渡すと、「dead entry にコメントだけ追加」「既存と重複するテストを追加」という、形式上ACを満たすが品質を改善しない収束が許されます。そこだけ先に潰すのを推奨します。squne121 commentedon Sep 10, 2026
推奨アクションは、#2604 を実装へ進める前に、対象コメントを operator-asserted human context として
issue-refinement-loopに取り込み、Issue contract を delete-only へ修正することです。対象コメントの指摘どおり、現在の Issue は「dead entry にコメントを付けて残す」ことや「既存 behavioral test と重複するテストへの置換」でも AC を満たせます。 一方、current
mainではclose-evidence-publicationの static map entry が存在するものの、build_check_entry()はCONDITIONAL_EXCLUDED_TUPLESに対して必ずexcluded/unknownを再代入しており、static entry は runtime classification の正本ではありません。 また exact skip と各種 fail-closed ケースはすでに3 job共通の parameterized regression で検証されています。さらに current skill は、anchor comment の origin を GitHub metadata から推測せず、operator が
with_human_contextlane を選択した事実を authority とする設計です。今回はこちらの会話でユーザー自身がこのコメントを対象として明示しているため、この lane を使わせるのが適切です。 通常の refinement iteration 自体も approval gate は既定で不要です。以下を、すでに auto mode で動いている Claude Code にそのまま投入するのを推奨します。
squne121/loop-protocolの Issue #2604 と、次の anchor comment を対象に.claude/skills/issue-refinement-loopを実行してください。Issue:
#2604
対象 anchor comment:
#2604 (comment)
このコメントは、この実行において operator が明示的に選択した human context です。URL や GitHub の author metadata から origin を推測するのではなく、current
issue-refinement-loopcontract に従ってoperator_asserted_human_context/with_human_contextlane として扱ってください。目的はコメント本文を機械的に転記することではなく、current repository state・関連 Issue/PR・実コード・テストを独立検証した上で、Issue #2604 の contract を実装可能かつ曖昧性のない状態まで refinement することです。
自律実行方針
現在の Claude Code セッションはすでに auto mode です。
通常の in-scope refinement、調査、SubAgent 起動、Issue 本文更新、再レビュー、deterministic repair、label hygiene、iteration 継続について人間承認を求めないでください。
.claude/skills/issue-refinement-loop/SKILL.mdの current HEAD を正本として読み、その progressive-disclosure references、planner、canonical executor、routing contract に従ってください。anchor comment 付き entry では、current contract が要求する canonical
with_human_contextprofile を使用してください。run_refinement_preflight.py等の内部 wrapper を production path として直接呼び出して canonical executor を迂回しないでください。preflight が trusted contract patch plan を生成し、current skill contract 上
contract_update.run.with_human_contextを使用可能なら、その canonical phase を使用して Issue contract を更新してください。過去の artifact、過去の reviewer verdict、過去の preflight 結果を authorization として再利用せず、fresh state から判断してください。
SubAgent 必須
適用される調査・編集・web research 等を root/main thread が勝手に代替しないでください。
特に current planner / skill が要求する場合は、少なくとも以下の role を正規の SubAgent として使用してください。
codebase-investigatorweb-researcher(planner が required とした場合)issue-editor(rewrite lane が要求する場合)issue-refinement-loopがその Step に指定する SubAgent重要:
SubAgent を起動しただけで次の Step へ進まないでください。
各 SubAgent を起動した後は、その SubAgent が terminal result を返して作業完了するまで必ず待ってください。その出力・artifact・status を取得してから、current skill の consumer/routing contract に従って次の Step を実行してください。
複数 SubAgent を並列起動できる場合も、join が必要な全 SubAgent の完了を待ってから downstream decision を行ってください。
SubAgent の未完了状態、Task ID の発行、partial output、途中経過だけを「完了」と解釈してはいけません。
anchor comment の独立検証
対象コメントにある以下の主張を仮説として扱い、repository から独立に再検証してください。
current
mainの.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.pyに
("ci", "close-evidence-publication"): "excluded"という
CLASSIFICATION_MAPentry が存在する。同 tuple は
CONDITIONAL_EXCLUDED_TUPLESにも存在する。build_check_entry()は conditional tuple に対し static classification を最終値として使わず、is_exact_ordinary_pr_dispatch_only_skip()の結果によってexcludedunknownと再分類する。
current test suite はすでに
close-evidence-publicationreliability-assessmentci-runtime-baseline-gate-readyを共通 parameterized regression で検証しており、exact skip の positive case と failure / cancelled / pending / stale / incomplete provenance / wrong event / missing CheckRun ID 等の fail-closed negative casesを保持している。
PR fix: classify conditional close evidence publication #2597 が追加した本 Issue に関連する実質的な変更は static map entry と map-membership-only test であり、consumer runtime behavior を所有しているのは PR fix: AC3 canary の親子因果証跡を bindする #2561 由来の conditional path である。
関連履歴として少なくとも以下を必要に応じて確認してください。
9a8cd2b44468cf725ea4671b1793e1354dedf3f4コメントの結論を盲目的に採用せず、current HEAD が変化していれば current state を優先してください。
推奨する contract 修正方向
current repository state が上記仮説を支持する場合、Issue #2604 を以下の意味へ収束させることを推奨します。
Outcome
cleanup の成功条件を「comment or delete」ではなく delete に固定してください。
CLASSIFICATION_MAPから("ci", "close-evidence-publication"): "excluded"を削除する。
test_close_evidence_publication_is_registered_as_excludedを削除する。
CONDITIONAL_EXCLUDED_TUPLESとis_exact_ordinary_pr_dispatch_only_skip()の既存 conditional semantics は変更しない。dead entry にコメントを追加して温存するだけの解決を成功条件にしないでください。
既存 behavioral matrix と同じ input→output を再検証する one-off test を新設することも必須条件にしないでください。
再発防止 invariant
repository の現在設計と整合することを調査で確認できた場合、
CLASSIFICATION_MAPとCONDITIONAL_EXCLUDED_TUPLESが重複しないことすなわち概念的に
set(CLASSIFICATION_MAP).isdisjoint(CONDITIONAL_EXCLUDED_TUPLES)を保証する小さな invariant regression は有用です。
ただし anchor comment はこれを必須実装とはしていないため、無根拠に Acceptance Criteria を肥大化させないでください。
採用するなら「この specific job を static map に登録する」という one-off test ではなく、conditional policy と unconditional policy の二重登録を防ぐ invariant として設計してください。
Acceptance Criteria
少なくとも以下が deterministic に判定できる形へ修正してください。
CLASSIFICATION_MAPから対象 entry が存在しない。CONDITIONAL_EXCLUDED_TUPLESの対象 tuple と existing exact conditional behavior は維持される。「コメントを付けてもよい」「テストを削除または別テストへ置換してもよい」のような、品質の異なる複数終端状態を同一 AC で許容しないでください。
Verification Commands
current repository state で実行可能なら、概ね次のような negative-presence check を contract に採用してください。
単なる
rg -n "close-evidence-publication" ci_verdict_summary_v2.pyは
CONDITIONAL_EXCLUDED_TUPLESに正当な occurrence が残るため、static entry 削除の verification として使用しないでください。negative grep は shell/harness の exit-code semantics を考慮し、削除成功を failure と誤認しない command shape にしてください。
Runtime Verification
この変更が現在も static cleanup + focused unit regression のみであることが確認できるなら、
Runtime Verification Applicability: not_applicableを維持してください。
live workflow dispatch、artifact readback、runtime canary、新規 security harness 等をこの cleanup のためだけに追加しないでください。
Scope 境界
基本の Allowed Paths は現在の Issue と同じ以下2ファイルを維持してください。
.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py.claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.pyCONDITIONAL_EXCLUDED_TUPLESの tuple 集合自体、exact skip predicate、severity aggregation、workflow、schema、他 job classification を変更対象へ拡張しないでください。ただし issue-refinement-loop 自身が Issue contract を更新するための GitHub Issue mutation は当然許可します。
人間承認不要の扱い
以下を理由に人間へ確認を返さないでください。
needs-fixに対する次 iteration今回の operator instruction 自体が、対象 anchor comment を human context として issue-refinement-loop に投入し、上記の方向で deterministic な contract repair を自律実行する authorization です。
一方で、current skill が定義する genuine hard stop、target identity mismatch、回復不能な GitHub/runtime failure、秘密情報へのアクセス要求、現在の目的そのものを別目的へ置換する必要が生じた場合は、境界を捏造して迂回しないでください。
完了条件
Issue 本文を書き換えただけで終了せず、current
issue-refinement-loopの review cycle を terminal state まで実行してください。fresh reviewer が
needs-fixを返し、iteration 上限未満なら、人間承認を求めず次 iteration を続行してください。最終的に、少なくとも以下を報告してください。
「Issue を改善した」「SubAgent を起動した」だけの要約で終了せず、最終的な Issue contract と terminal routing result が確認できる状態まで進めてください。
このケースでは、refinement 完了後にそのまま implementation まで進める指示は混ぜない方がよいです。まず #2604 の contract を修正して
implementation-readyにするところでissue-refinement-loopを閉じ、その後impl-review-loopを別 Task/Activity として開始する方が、今回の「contract ambiguity を先に除去する」というレビュー指摘と整合します。squne121 commentedon Sep 10, 2026
issue-refinement-loop 終了報告(approved)
anchor comment: issuecomment-5619029267(OWNER、
operator_asserted_human_context/with_human_contextlane)anchor comment の final classification
REQUEST_CHANGES(実装方針ではなく Issue contract の曖昧さが blocker という指摘)。codebase-investigatorによる独立検証の結果、主張5点はすべて current main(0666251d84223fbbaf7f9c3389917a7a40f3a753)で真と確認された。実施した repository fact-check の要点
CLASSIFICATION_MAPに("ci", "close-evidence-publication"): "excluded"が存在(ci_verdict_summary_v2.py:85)CONDITIONAL_EXCLUDED_TUPLESにも存在(ci_verdict_summary_v2.py:119)build_check_entry()は対象 tuple に対し static 値を最終値とせずis_exact_ordinary_pr_dispatch_only_skip()の結果で再分類する(ci_verdict_summary_v2.py:359-364)reliability-assessment/close-evidence-publication/ci-runtime-baseline-gate-ready)が positive/negative 両方向を検証済み(test_ci_verdict_summary_v2.py:475-576)test_close_evidence_publication_is_registered_as_excludedが存在(test_ci_verdict_summary_v2.py:478-480)CLASSIFICATION_MAPとCONDITIONAL_EXCLUDED_TUPLESの重複は本 tuple 以外に存在しない。両者の disjoint invariant test は未存在Issue contract に加えた semantic changes
AC1〜AC4の番号付き・deterministic 判定可能な形へ再構成! rg -nF ...)+# AC<N>マーカー + 該当箇所へのbaseline-expect: passannotation へ修正ruff checkの AC/VC は当初 anchor comment 推奨に含めていたが、fresh review でbaseline_vc_preflight.pyの VC preflight allowlist がuv run ruffを許可しないことが判明したため削除し、Notes for Reviewer にその理由を明記(実装者への手動実行推奨のみ)Required Design Referencesに.claude/skills/pr-review-judge/SKILL.mdを追加final Acceptance Criteria
CLASSIFICATION_MAPに("ci", "close-evidence-publication")エントリが存在しないtest_close_evidence_publication_is_registered_as_excludedという名前の関数が存在しないCONDITIONAL_EXCLUDED_TUPLES経由の既存 conditional behavioral test が変更されず維持されているfinal Verification Commands
Runtime Verification Applicability
not_applicable(静的コード整理とユニットテスト調整のみで完結するため)Allowed Paths
.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py.claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.pyreview iteration 数
Step 2 review: 3回(1回目 needs-fix: AC番号未整備等 → rewrite。2回目 needs-fix:
uv run ruffが VC preflight allowlist 外 → rewrite。3回目 approve)。Step 2.5 semantic design review: 1回(severity: low の finding 1件、effective_verdict: approve、warning として記録)。final reviewer verdict / next action
deterministic Step 2:
approve/proceed。semantic Step 2.5:effective_verdict: approve(semantic_review_unavailable: false)。Final Gate(issue-contract-reviewexecute mode):status: go(readiness_status: go,vc_preflight_status: pass)。Issue #2604 が implementation-ready になったか
はい。
handoff_state: implementation_ready(approveかつCONTRACT_REVIEW_RESULT_V1.status == goかつ freshness 確認済み、body_sha256:3eb0aac68d8cd3a83d5bd6efe987d30a6645fb1de0094a505660146fad565f00)。operator の明示指示により、本 loop はここで
issue-refinement-loopを完了として終了し、impl-review-loopは別 Task/Activity として別途開始する(同一 turn での自動連結は行わない)。squne121 commentedon Sep 10, 2026
#2604 は refinement が完了しており、Final Gate は
go、handoff_state: implementation_readyです。現在のmainには削除対象の static map entry と map-membership-only test がまだ存在します。 また、現行impl-review-loopはimplementation-worker → test-runner → pr-reviewer → judgmentを反復し、APPROVEと live mergeability 条件が揃ったところでマージせず人間のマージ判断直前で終了する設計なので、今回の目的にそのまま合います。実装方針は、まず delete-only の最小差分を推奨します。Issue Notes では disjoint invariant test の追加も許されていますが、既存の3 job共通 parameterized behavioral matrix が既に runtime semantics を検証しています。今回そこで新しい invariant まで積極的に追加すると、cleanup のレビュー面積を不要に増やします。fresh reviewer が具体的に要求した場合だけ追加する方がよいです。
なお、現在のClaude Codeセッションが別のACTIVE Taskを持っている場合は、作業プロンプトの前に単独のメッセージとして次を送ってください。
/taskは Task Context の正式な明示rebind経路です。/task https://github.com/squne121/loop-protocol/issues/2604その後、以下をそのまま投入するのを推奨します。
squne121/loop-protocolの Issue #2604 を対象に、current HEAD の.claude/skills/impl-review-loopを使って、実装・検証・PRレビュー・レビュー指摘修正のループを、PRをマージする直前の terminal approved state まで、人間承認を挟まず自律実行してください。Target:
#2604
実行の正本
最初に current HEAD の以下を読み、記憶や過去の artifact ではなく current repository state を正本として実行してください。
.claude/skills/impl-review-loop/SKILL.mdsteps/**.claude/skills/implement-issue/SKILL.md.claude/skills/pr-review-judge/SKILL.mddocs/dev/workflow.md.claude/skills/impl-review-loopの current contract と本指示が重なる部分では current skill の canonical routing / executor / output contract を使用してください。過去の
issue-refinement-loopartifact、過去のgo判定、過去の reviewer verdict を Step 1 起動 authorization として再利用しないでください。current skill が要求する Root-Owned Synchronous Entry Transition に従い、fresh capability preflight → live Issue fetch → current-run issue-contract-review → live再取得 → routing → Step 1起動を同一の canonical entry transition として行ってください。Issue #2604 は既に refinement 済みですが、それを理由に current-run entry review を省略しないでください。
技術的な推奨実装
この Issue は cleanup なので、初回実装は最小の delete-only patch を優先してください。
.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.pyCLASSIFICATION_MAPから("ci", "close-evidence-publication"): "excluded"を削除する。
.claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.pytest_close_evidence_publication_is_registered_as_excludedを削除する。
以下は変更しないでください。
CONDITIONAL_EXCLUDED_TUPLESの内容is_exact_ordinary_pr_dispatch_only_skip()および関連 predicatereliability-assessmentclose-evidence-publicationci-runtime-baseline-gate-readyについて既に存在する parameterized positive / negative behavioral test matrix
Issue Notes にある
set(CLASSIFICATION_MAP).isdisjoint(CONDITIONAL_EXCLUDED_TUPLES)型の optional invariant test は、初回実装では追加しないことを推奨します。
既存 behavioral regression が十分であるため、まず delete-only の最小差分をレビューしてください。
ただし fresh
pr-reviewerが、この invariant または同等の regression guard の欠落を具体的な blockerとして返した場合は、Issue #2604 の Allowed Paths と目的の範囲内で追加して構いません。その場合もスコープを他の policy 整理へ拡大しないでください。Allowed Paths
Issue #2604 の live contract に従い、実装差分を次の2ファイルに限定してください。
.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py.claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.pyAllowed Paths 外の変更が必要だと判断した場合は、勝手にスコープを拡張せず current
impl-review-loopの canonical stop/routing contract に従ってください。Verification
Issue #2604 の live body に記載された literal Verification Commands を正本として実行してください。
特に AC1 / AC2 は単なる
rgのヒット有無ではなく、Issue記載どおりの negative-presence check を使用してください。Issue の Verification Commands を別コマンドへ置換したり、過去に問題になった
uv run ruffを literal VC に勝手に追加したりしないでください。current implementation skill が通常のローカル品質確認として追加の lint 等を実行できる場合、それ自体は妨げません。ただし Issue contract の deterministic AC/VC を勝手に変更しないでください。
SubAgent delegation は必須
root/main thread は control-plane、state tracking、canonical routing に徹してください。
current
impl-review-loopが定める SubAgent を正規に使用してください。少なくとも該当する各 Step では、implementation-workertest-runnerpr-reviewerを使用し、REQUEST_CHANGES 等の feedback loop では current skill の routing に従って必要な worker / reviewer を再委譲してください。
root/main thread が SubAgent の担当作業を便利だからという理由で直接代行しないでください。
SubAgent 完了待ちを厳守
SubAgent を spawn しただけで次の Step に進まないでください。
各 SubAgent を起動した後は、current
impl-review-loopの Common Completion Protocol / lifecycle contract に従い、対象 SubAgent が terminal result を返して作業を完了するまで必ず待ってください。完了後に、その SubAgent の canonical output、artifact、status、head binding 等を取得・検証・consume してから downstream routing を行ってください。
複数の SubAgent を並列起動可能な場面でも、downstream decision が依存する全 SubAgentについて join を完了し、全員の terminal result を取得してから次へ進んでください。
「起動した」「running になった」「task id を得た」ことを completion と解釈しないでください。
candidate HEAD が変わった場合は、旧 verification / review evidence を stale として扱い、current skill の binding rules に従って必要な verification / review を再取得してください。
人間承認不要の実行方針
現在のセッションはすでに auto mode です。
次のような通常の in-scope action について、人間へ承認を求めないでください。
Closes #2604による Issue linkageBEHINDに対する current skill 所定の update-branch routingREQUEST_CHANGESは人間確認理由ではありません。iteration 上限に達していなければ blockers を
fix_deltaとして次 iteration に渡し、自動的に Step 1 → Verification → Review を続けてください。APPROVE単独でも終了せず、currentroute_loop_verdict_v2()が要求する current-head review、blockers == []、live mergeability 等の terminal condition まで進めてください。current skill が定義する genuine hard stop / human escalation route は捏造して回避しないでください。一方、advisory artifact の欠落、SubAgent の単なる自己申告、通常の reviewer feedback、通常の recoverable discovery failure を勝手な human approval gate に昇格させないでください。
PRと終了境界
実装完了後は PR を作成し、本文で
Closes #2604を使用してください。PR作成だけでは終了しないでください。
そのPRについて、
Implementation
→ Verification
→ PR Review
→ Judgment
→ 必要なら修正
→ Verification
→ fresh PR Review
を current
impl-review-loopの terminal routing まで繰り返してください。最終目標は、
pr-reviewerverdict がAPPROVEという「人間が今すぐ merge 判断できる直前」の状態です。
PR自体はマージしないでください。
gh pr merge、GitHub APIによるmerge、auto-merge有効化は行わないでください。Issue #2604 も merge 前に手動 close しないでください。
Closes #2604により merge 時に閉じられる状態にしてください。最終報告
terminal state に到達したら、途中経過だけで終了せず、少なくとも以下をまとめて報告してください。
pr-reviewerverdictreviewed_head_shaと current PR head が一致していることIMPL_REVIEW_LOOP_RESULT_V1の最終 status / termination reason人間への通常承認要求を途中に挟まず、この terminal state まで一続きで進めてください。
このケースでは、特に**「optional invariant を初手で足さない」「過去の refinement
goを entry authorization として流用しない」「SubAgent spawn 後に必ず join/consume する」「merge/auto-mergeだけはしない」**の4点を明示しておくのが有効です。Implementation Step 自体もimplementation-workerへ委譲し、worktree・実装・検証・PR起票まで担当させる契約になっています。squne121 commentedon Sep 10, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
squne121 commentedon Sep 10, 2026
implement-issue: 実装完了 (2026-09-10T13:44:05Z)
.claude/worktrees/issue-2604-dead-code-cleanupworktree-issue-2604-dead-code-cleanuptest: CLASSIFICATION_MAP と CONDITIONAL_EXCLUDED_TUPLES の非重複 invariant…
squne121 commentedon Sep 15, 2026
impl-review-loop: 完了 (2026-09-15T11:15:00Z)
squne121 commentedon Sep 15, 2026
impl-review-loop: 完了 (2026-09-15T11:50:00Z)