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: "reviewer blocker と deterministic checker の taxonomy parity を導入し、checker-backed blocker の不要な reviewer 再実行を止める"
change_kind: codeParent Issue
なし(単独改善)
Parent Goal Ref
- Goal: deterministic checker で裏付け可能な reviewer blocker が unbacked 判定されて再レビューに流れる浪費をなくす
- Desired Destination: reviewer claim と checker 結果の対応が table-driven で drift 検出可能な状態
Current Validated Scope
.claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.pyに table-driven taxonomy(REVIEWER_CHECKER_TAXONOMY_V1)を導入- taxonomy parity テストの追加
--dump-taxonomyCLI の追加
Remaining Parent Gaps
- SubAgent 起動の launch plan 制限は別 Issue で扱う
- VC baseline shape compiler は別 Issue で扱う
Outcome
reviewer_claim_replay.py が reviewer code / deterministic check 名 / readiness rule id / readiness category を単一 taxonomy entry へ正規化し、deterministic check が fail している同一 body hash の blocker を reviewer 再実行 route に戻さず、taxonomy drift をテストで検出できる状態。
Runtime Verification Applicability
- decision: not_applicable
- reason: 本 Issue のスコープは
.claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.py(Python スクリプト)へのテーブル駆動 taxonomy 追加と--dump-taxonomyCLI 実装であり、プロセス起動・外部通信・Canvas/UI ランタイム挙動を伴わない。検証は pytest による unit test(AC1〜AC5 の Verification Commands)で完結し、静的検証(typecheck 相当の型整合含む)のみで判定可能。
Background
#1277 のログでは、C5 AC/VC number alignment が deterministic failure であるにもかかわらず、alias / evidence mapping の不足で unbacked 判定され、手動確認と追加 reviewer run が発生した。現在の reviewer_claim_replay.py は C5_ac_vc_number_alignment への mapping 自体は持つが、readiness errors 側では LP010 系 rule id だけを alignment evidence として拾うため、checker artifact inconsistency / unbacked route が残り得る。
In Scope
REVIEWER_CHECKER_TAXONOMY_V1の table-driven 定義(reviewer_codes / deterministic_checks / readiness_rule_ids / readiness_categories / domain_keys を entry 単位で束ねる)- deterministic check fail + body hash 一致の場合、category mapping 欠落を
checker_artifact_inconsistencyでなく machine-actionable なtaxonomy_gapとして返し、同一 body/kind で reviewer を再実行しない routing - taxonomy 未登録の reviewer blocker は
checker_gapとして分類し、reviewer rerun を最大 1 回に制限 --dump-taxonomyで taxonomy JSON を出力する CLI と drift 検出テスト
Out of Scope
check_issue_contract.pyの checker 追加・判定変更- issue-reviewer SubAgent の出力 schema 変更
- refinement loop planner の routing 全面再設計
Acceptance Criteria
- AC1:
c5/vc_number_alignment/C5_ac_vc_number_alignmentが同一 taxonomy entry に正規化される - AC2:
c9/rva_immediate_field_missing/C9_runtime_applicability_presentが同一 taxonomy entry に正規化される - AC3: deterministic check が fail している同一 body hash の blocker は reviewer rerun route に戻らない
- AC4: taxonomy にない reviewer blocker は
checker_gapとして分類され、reviewer rerun は最大 1 回に制限される - AC5:
--dump-taxonomyが JSON を出力し、テストが checker / reviewer code / readiness category の drift を検出する
Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py::test_ac1_c5_aliases_normalize_to_single_entry -q
# AC2
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py::test_ac2_c9_aliases_normalize_to_single_entry -q
# AC3
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py::test_ac3_checker_backed_blocker_no_reviewer_rerun -q
# AC4
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py::test_ac4_unknown_blocker_checker_gap_single_rerun -q
# AC5
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py::test_ac5_dump_taxonomy_json_drift_detection -qAllowed Paths
- .claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.py
- .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py
- .claude/skills/issue-refinement-loop/tests/
- .github/ci/python-test-plan.json
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
なし
Scope Delta(任意)
N/A
Notes for Reviewer
- 既存の
reviewer_claim_replay.pyのテストを破壊しないこと(fail-closed 挙動は維持し、taxonomy 化は既存 mapping の superset として実装する) - taxonomy entry の追加はコード変更でなく table 追記だけで済む構造にする
## Allowed Pathsのscripts/python-test-plan.jsonは repo 実体と不一致だったため.github/ci/python-test-plan.json(実在パス)へ修正した(issue-refinement-loop 実行で検出)## Runtime Verification Applicabilityセクションを追加した(docs/dev/runtime-verification-policy.mdの適用判定スキーマに基づきnot_applicable)。refinement loop の Step 2 review が本セクション欠如を blocker(C9)として2回連続報告し、reviewer_claim_replay.pyの taxonomy 上 deterministic checker に裏付けられずreviewer_false_positive_suspectedで human_escalation となったため、人間承認を得て control-plane が直接追加した
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Jul 3, 2026
判定: REQUEST_CHANGES
#1286 の方向性は正しいです。ただし、現状の Issue 契約のまま実装すると、#1086 / PR #1101 で固定した fail-closed semantics と衝突します。特に危険なのは、#1286 が
taxonomy_gapという新しい判定概念を導入している一方で、issue-refinement-loop/SKILL.mdの Step 2a 出力契約にはその routing が存在せず、Allowed Paths にSKILL.mdも含まれていない点です。#1286 自体はコメント 0 件なので、関連 Issue / PR / 実装資産側の契約を正本として見る必要があります。#1286 は
reviewer_claim_replay.pyに table-drivenREVIEWER_CHECKER_TAXONOMY_V1を導入し、C5 / C9 の reviewer code・deterministic check・readiness rule/category・domain key を同一 entry に束ねることを狙っています。背景には #1277 の loop log で、C5 AC/VC alignment failure が deterministic failure であるにもかかわらず mapping gap のため unbacked 扱いになった問題があります。関連履歴から見た前提
#1021 / PR #1032 は、reviewer blocker が deterministic checker と結び付かないまま semantic iteration を消費する問題を止めるために、Step 2a の replay arbitration を追加した流れです。PR #1032 では
reviewer_claim_replay.pyが compact review result と readiness artifact を消費し、exact mapping のみに限定し、prefix 判定を廃止し、state file をbody_sha256 + reviewer_blocker_code + normalized_kindで保持する設計になっています。#1042 / PR #1058 は producer 側の fail-closed contract です。
REVIEW_ISSUE_RESULT_V1にfindings[]を導入し、deterministic_domain_blockerは checker evidence 必須、evidence 不足の deterministic-domain 指摘はchecker_gap/blocking=falseに落とす設計です。#1086 / PR #1101 はその後の重要な補正です。C4/C5 の deterministic failure が compact/replay 経由で
checker_gapに誤降格され、human escalation に進む問題を直すため、C4/C5 fail を self-evidence 付きdeterministic_domain_blockerとして保持し、checker_artifact_inconsistencylane と fallback evidence 探索を追加しています。Blocker 1:
taxonomy_gapの routing contract が存在しない現行
issue-refinement-loop/SKILL.mdの Step 2a 出力契約は、deterministic_fail_confirmed、reviewer_claim_unbacked_by_deterministic_checker、reviewer_false_positive_suspected、input_or_runtime_errorを文書化しています。実装上は #1086 後にchecker_artifact_inconsistencyもありますが、taxonomy_gapは routing contract にありません。したがって #1286 の「deterministic check fail + same body hash なのに taxonomy mapping が欠けている場合は
taxonomy_gap」という仕様は、このままだと consumer が解釈できません。さらに #1286 の Allowed Paths はreviewer_claim_replay.pyと tests 周辺に限定されており、Step 2a contract を更新するSKILL.mdが含まれていません。これは実装前に Issue 側で修正すべきです。修正方針は二択です。
issue-refinement-loop/SKILL.mdと呼び出し側 routing を更新して、verdict: taxonomy_gap/routing: fix_taxonomyを正式 contract にする。verdict: checker_artifact_inconsistencyのままにし、reason_code: taxonomy_gap、taxonomy_entry_id、taxonomy_gap_blockers[]を追加する。現実的には 2 が安全です。#1086 の fail-closed contract と互換し、routing surface を増やさずに taxonomy gap を機械可読化できます。
Blocker 2: #1086 の
checker_artifact_inconsistencyと #1286 のtaxonomy_gapが衝突している現行 tests は、
deterministic_checks.C5_ac_vc_number_alignment=failとfindings[].checker_gapが同居する場合にchecker_artifact_inconsistencyを期待しています。C5 だけでなく C1/C4/C9 の parametrized regression でも同じ期待が固定されています。これは #1086 の AC5 と整合しています。#1086 は deterministic check fail と checker_gap が同居する場合、
reviewer_false_positive_suspectedではなくchecker_artifact_inconsistencyに分離することを目的にしていました。#1286 が
taxonomy_gapを新 verdict として導入すると、既存 regression の期待値をどこまで変更するかが未定義になります。ここを曖昧にしたまま実装すると、#1086 の回帰テストを「直す」つもりで壊します。必要な定義はこれです。
逆に、
checker_evidenceが stale、artifact_schema不正、body_sha256mismatch、producer が evidence を出すべきなのに出していない場合は、引き続きchecker_artifact_inconsistencyのままにすべきです。Blocker 3: 現実装は taxonomy ではなく重複 dict 群で動いている
現在の
reviewer_claim_replay.pyは、KIND_ALIASES、KIND_TO_DETERMINISTIC_DOMAIN_KEY、KIND_TO_DETERMINISTIC_CHECK、rule/category set、_matching_readiness_errors()の if/elif 分岐に mapping が分散しています。#1286 が単に
--dump-taxonomyを追加するだけだと、taxonomy は「表示用の別表」になり、実 routing は旧 dict を見続けます。それでは drift 防止になりません。実装要件として、旧 mapping を taxonomy entry から派生させる必要があります。
最小構造は次です。
重要なのは
readiness_categoriesを単独 set にしないことです。category=body_lintのような汎用 category を category だけで照合すると過剰一致します。(source_check, category)またはrule_idのどちらで match したかを evidence に残すべきです。Blocker 4: C9 は producer evidence ではなく fallback taxonomy で扱う必要がある
C4/C5 は
check_issue_contract.py側で self-evidence を生成し、C5 はrule_id="C5_ac_vc_number_alignment"、category="vc_number_alignment"の evidence を付ける実装になっています。一方 C9 は現在、
runtime_applicabilitydomain のheuristic_concernとして append されており、C4/C5 のような self-evidence 付きdeterministic_domain_blockerではありません。REVIEW_ISSUE_RESULT_V1schema は、deterministic_domain_blockerにはblocking=trueとchecker_evidence>=1を要求し、checker_gapはblocking=falseに制限しています。したがって #1286 の AC2「
c9/rva_immediate_field_missing/C9_runtime_applicability_presentが同じ entry」は、C9 がfindings[]で evidence-backed になることを期待してはいけません。#1286 の Allowed Paths ではcheck_issue_contract.pyは変更不可なので、C9 はdeterministic_checks.C9_runtime_applicability_present=failと readiness category の fallback によって backed 判定する仕様にすべきです。Blocker 5:
--dump-taxonomyは現 argparse 設計と衝突する現行 CLI は
--review-result-fileと--readiness-result-fileをrequired=Trueにしています。--dump-taxonomyを追加しても、このままでは taxonomy dump だけを実行できません。Python の
argparseではaction='store_true'による on/off flag が標準的に使えますが、required=Trueの option は存在しないとparse_args()時点で error になります。([Python documentation]1) ([Python documentation]1)実装はこうすべきです。
JSON 出力は既存の strict JSON 方針に合わせ、
allow_nan=False、入力側はparse_constantreject を維持すべきです。Pythonjsondocs はallow_nan=Falseでnan/inf/-infの serialize をValueErrorにし、parse_constantでNaN/Infinity/-Infinityを例外化できることを明記しています。([Python documentation]2)dump の安定性は
sort_keys=Trueと compact separator で担保できます。Python docs でもsort_keys=Trueにより dict key が sorted output になること、separators=(',', ':')で whitespace を除いた compact encoding にできることが示されています。([Python documentation]2)Blocker 6: same-body 判定が片側だけに寄っている
現行
analyze()はbody_sha256をreadiness_resultから取り、checker evidence のbody_sha256もそれに一致するかを検査します。しかし compact artifact には
producer_body_sha256が保持されています。#1286 が「same body hash」を条件にするなら、少なくとも次を fail-closed にすべきです。
これを入れないと、古い compact review artifact と新しい readiness artifact を組み合わせた場合に、taxonomy gap と stale artifact を誤分類します。
Blocker 7: mixed blocker aggregate verdict が曖昧
現行 tests は、supported deterministic blocker と unsupported blocker が混在しても、全体 verdict が
deterministic_fail_confirmedになり、rewrite_ready_blockersだけが 1 件になることを固定しています。これは「Step 4 に渡す payload が
rewrite_ready_blockersのみ」という consumer contract があるなら成立します。しかしissue-refinement-loop/SKILL.mdはdeterministic_fail_confirmedなら Step 4 rewrite に進むとしか書いていません。#1286 で
taxonomy_gap/checker_gaplane を増やすなら、aggregate output は少なくとも次を持つべきです。これを明記しないと、taxonomy gap を「deterministic fail confirmed の一種」と誤って Step 4 に流す余地が残ります。
Blocker 8: taxonomy dump は schema / invariant が必要
--dump-taxonomyをただの JSON print にすると、将来の drift test が弱くなります。JSON Schema 側ではrequiredで必須 property を指定でき、enumで値を固定集合に制限でき、additionalProperties: falseで未知 property を拒否できます。([JSON Schema]3) ([JSON Schema]3) (JSON Schema)dump schema は最低限これを固定してください。
{ "schema": "REVIEWER_CHECKER_TAXONOMY_V1", "entries": [ { "id": "vc_number_alignment", "reviewer_codes": ["c5", "ac_vc_number_mismatch"], "domain_keys": ["vc_number_alignment"], "deterministic_checks": ["C5_ac_vc_number_alignment"], "readiness_rule_ids": ["LP010"], "readiness_category_sources": [ {"source_check": "check_issue_contract", "category": "vc_number_alignment"} ] } ] }invariant test は次が必要です。
pytest は
@pytest.mark.parametrizeで複数入力・期待値の組を同一 test function に流せるため、taxonomy entry の drift tests は table-driven に寄せるべきです。([pytest ドキュメント]5)Issue #1286 に入れるべき修正文案
このまま Issue 本文に追記するなら、以下を追加してください。
追加 AC は以下です。
最終実装順序
TaxonomyEntryと compile-time duplicate validation を追加する。_classify_blocker()、_matching_findings()、_matching_readiness_errors()、_has_deterministic_check_failure()を taxonomy entry driven に置換する。--dump-taxonomyを input 不要 branch として追加する。producer_body_sha256とreadiness_result.body_sha256の一致検査を追加する。taxonomy_gapはまずreason_codeとして追加する。verdict: taxonomy_gapを正式化するなら、実装: reviewer_claim_replay と deterministic checker の taxonomy parity を検証する #1286 の Allowed Paths にissue-refinement-loop/SKILL.mdと routing consumer を追加する。現契約のままなら、最も安全な結論は「
taxonomy_gapを新 verdict にしない。checker_artifact_inconsistencyの subreason として実装する」です。squne121 commentedon Jul 3, 2026
Refinement Loop: Human Escalation Required
The loop has terminated and requires human review. Cause: human judgment required
human_escalationhuman_judgment_requiredBlockers
squne121 commentedon Jul 3, 2026
Refinement Loop: Human Escalation Required
The loop has terminated and requires human review. Cause: human judgment required
human_escalationhuman_judgment_requiredBlockers
squne121 commentedon Jul 3, 2026
Refinement Loop: Human Escalation Required
The loop has terminated and requires human review. Cause: human judgment required
human_escalationhuman_judgment_requiredBlockers
squne121 commentedon Jul 3, 2026
Contract Review Result
squne121 commentedon Jul 3, 2026
implement-issue: 実装完了
.claude/worktrees/issue-1286-reviewer-claim-taxonomyworktree-issue-1286-reviewer-claim-taxonomytest_reviewer_claim_replay.py(24件)・test_compact_review_result.py(24件)・issue-refinement-loop/tests/全体(1100件)・issue-refinement-loop/scripts/tests/(34件)も回帰なし。fix: reviewer_claim_replay に SKILL.md 後方互換 verdict_legacy_v1 を追加する (#…
fix: reviewer_claim_replay の verdict を常に legacy 4値へ正規化する (#1286)
fix: reviewer_claim_replay の body hash 検証を fail-closed にする (#1286)
feat: reviewer_claim_replay に table-driven taxonomy を導入する (#1304)