Repository navigation
Open
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_CHECKER_TAXONOMY_V1 を唯一のSSOTとして readiness の full error と producer metadata を deterministic domain に正規化し、既知 blocker の checker_gap 降格と readiness/replay の split-brain を防ぐ"
change_kind: codeParent Issue
none(単独改善)。依存順は #1549 → #1810 → #1555 とし、#1564 の完了待ち条件は設けない。
Source
- 実装: RDR001/command_not_allowed taxonomy と readiness semantics の split-brain を解消する #1564 の RDR001 /
command_not_allowedtaxonomy 要件を本 Issue に統合する。 - taxonomy SSOT の entry と producer metadata を正本とし、局所 special-case や第二の hardcoded mapping は作成しない。
Parent Goal Ref
- Goal: readiness authority と replay authority の split-brain を解消し、full readiness error を source-qualified に deterministic backing する。
- Desired Destination: 実装: reviewer_claim_replay.py の taxonomy に RDR001 / VCP_COMMAND_NOT_ALLOWED を追加し parent_replay_binding.py に C9 evidence 経路を追加する #1555 へ deterministic taxonomy/replay 契約を引き渡す。
Remaining Parent Gaps
- 実装: reviewer checker taxonomy の最小 SSOT foundation と既存ファイル未登録node-id resolver #1549 が提供する taxonomy SSOT 契約を前提に本 Issue を実装する。
- 実装: reviewer_claim_replay.py の taxonomy に RDR001 / VCP_COMMAND_NOT_ALLOWED を追加し parent_replay_binding.py に C9 evidence 経路を追加する #1555 は本 Issue の統合済み出力を後続作業として扱う。
Background
- readiness error は
source_check,rule_id,category,source_payloadの全フィールドを保持し、taxonomy entry のentry_id,reviewer_codes,domain,deterministic_domain_keyと producer metadata により解決する必要がある。 command_not_allowedは reason_class(body_author_fixable/tooling_gap/policy_violation/unsafe_mutation)に応じて routing し、needs_fixはbody_author_fixableの場合だけ許可する。RDR001 はautofixable:falseを尊重し自動 rewrite に送らず human judgment とする。- strict schema、型、body hash、source/category/rule、producer-shape が一致しない readiness artifact、unknown / ambiguous / conflict は fail-closed とする。
Current Validated Scope
.claude/skills/issue-contract-review/scripts/contract_readiness_check.py、.claude/skills/issue-refinement-loop/scripts/parent_replay_binding.py、.claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.pyと対応テストを変更する。REVIEWER_CHECKER_TAXONOMY_V1を唯一の SSOT として VCS001 / LP001 / RVA001 に加えVCP_COMMAND_NOT_ALLOWEDと RDR001 を登録し、entry と producer metadata を同一 entry から解決する。- full readiness error は rule/category/source/producer-shape の AND 条件で source-qualified に lookup し、unknown / ambiguous / conflict を fail-closed で
fix_checker_artifactへ routing する。
Outcome
taxonomy SSOT から reviewer blocker code と deterministic domain key、routing、autofix 可否を一意に解決し、readiness artifact の strict validation と parent replay binding を production wiring する。command_not_allowed は reason_class に応じて routing し body-author-fixable のみ needs_fix、RDR001(required_design_references_missing_or_empty)は autofixable:false を保持して human judgment へ送る。VCS001 / LP001 / RVA001 / VCP_COMMAND_NOT_ALLOWED / RDR001 の E2E が deterministic-backed または契約どおり human judgment となり、checker_gap への誤降格を防止する。
In Scope
- taxonomy entry に
entry_id,reviewer_codes,domain,deterministic_domain_key,source_check,rule_id,category,producer_shape,reason_class,autofixableを定義し、第二の mapping table/dict/match 分岐を禁止する。 contract_readiness_check.pyの producer metadata からVCP_COMMAND_NOT_ALLOWEDと RDR001 の full error を生成し、reason_class routing とautofixable:falseを保持する。parent_replay_binding.py/reviewer_claim_replay.pyで child claim code と parent-owned readiness artifact を照合し、entry_id は blocker code、deterministic_domain_key は finding domain に格納する。- strict schema validation(missing/wrong schema/wrong type/stale body/wrong source/category/rule/producer-shape の拒否)、unknown/ambiguous/conflict の fail-closed、iteration と
consecutive_unbacked_count不変、downgrade 禁止を実装する。 - E2E:
baseline_vc_preflight -> contract_readiness_check -> merge_readiness -> compact_review_result -> REVIEWER_BLOCKER_CLAIM_V1 -> parent_replay_binding -> reviewer_claim_replay.analyzeを VCS001/LP001/RVA001/VCP_COMMAND_NOT_ALLOWED/RDR001 で検証する。
Out of Scope
- 実装: reviewer checker taxonomy の最小 SSOT foundation と既存ファイル未登録node-id resolver #1549 の taxonomy SSOT 定義そのもの、実装: reviewer_claim_replay.py の taxonomy に RDR001 / VCP_COMMAND_NOT_ALLOWED を追加し parent_replay_binding.py に C9 evidence 経路を追加する #1555 の後続作業。
- taxonomy にない code の追加、既存 readiness 契約の弱体化、ラベル・コメント・依存関係以外の metadata 変更。
command_not_allowedの policy/tooling/unsafe 判定を body-author-fixable に変更する判断、または RDR001 を自動 rewrite へ送る変更。
Acceptance Criteria
- AC1: taxonomy SSOT が VCS001/LP001/RVA001 と VCP_COMMAND_NOT_ALLOWED/RDR001 の entry_id・reviewer_codes・domain・deterministic_domain_key・producer metadata を一意に定義し、第二の hardcoded mapping が存在しない。
- AC2: full readiness error(
source_check,rule_id,category,source_payload)を rule/category/source/producer-shape の AND で source-qualified に解決し、entry_id と deterministic_domain_key の格納先を固定する。 - AC3:
command_not_allowedの reason_class routing は body-author-fixable のみneeds_fixとし、tooling_gap/policy_violation/unsafe_mutation は rewrite に進めない。RDR001 のautofixable:falseは human judgment を維持する。 - AC4: readiness artifact の strict schema/type/body-SHA/source/category/rule/producer-shape 検証が wrong/missing/stale/ambiguous/conflict を fail-closed(
fix_checker_artifact、iteration/counter 不変、downgrade 禁止)で拒否する。 - AC5: child claim code と parent-owned readiness artifact の production wiring が一致し、VCS001/LP001/RVA001 の指定 E2E は
deterministic_backed:true、deterministic_fail_confirmed、checker_gap:falseで再生される。 - AC6: VCP_COMMAND_NOT_ALLOWED の baseline preflight と readiness が source-qualified に再生され、body-author-fixable のみ
proceed_to_rewrite、その他 reason_class は fail-closed になる。 - AC7: RDR001 の readiness は
required_design_references_missing_or_empty、source_check: contract_readiness_check、autofixable:falseを保持し、自動 rewrite に送られず human judgment となる。 - AC8: dedicated new test file の node-id で、strict schema、wrong source/category/rule、stale body、unknown/ambiguous/conflict、state counter、taxonomy invariant、parent binding、全5 code の E2E が PASS する。
Verification Commands
# AC1
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_taxonomy_entries_and_no_duplicate_mapping
# AC2
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_source_qualified_full_readiness_error_resolution
# AC3
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_reason_class_routing_and_rdr001_autofix_guard
# AC4
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_strict_schema_and_fail_closed_guards
# AC5
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_parent_binding_and_legacy_taxonomy_e2e
# AC6
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_vcp_command_not_allowed_e2e
# AC7
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_rdr001_human_judgment_e2e
# AC8
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_all_taxonomy_contract_invariantsAllowed Paths
.claude/skills/issue-contract-review/scripts/contract_readiness_check.py.claude/skills/issue-refinement-loop/scripts/parent_replay_binding.py.claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.py.claude/skills/issue-contract-review/tests/test_contract_readiness_check_broad_search_path.py.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_taxonomy_entries_and_no_duplicate_mapping.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_source_qualified_full_readiness_error_resolution.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_reason_class_routing_and_rdr001_autofix_guard.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_strict_schema_and_fail_closed_guards.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_parent_binding_and_legacy_taxonomy_e2e.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_vcp_command_not_allowed_e2e.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_rdr001_human_judgment_e2e.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_ssot.py::test_all_taxonomy_contract_invariants
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 実装: reviewer checker taxonomy の最小 SSOT foundation と既存ファイル未登録node-id resolver #1549 の SSOT 契約が未提供、または 実装: reviewer_claim_replay.py の taxonomy に RDR001 / VCP_COMMAND_NOT_ALLOWED を追加し parent_replay_binding.py に C9 evidence 経路を追加する #1555 以外への scope 波及が判明した場合
command_not_allowedの policy/tooling/unsafe 判定を body-author-fixable に変更する判断、または RDR001 を自動 rewrite へ送る判断が必要になった場合
Required Skills
- Python(taxonomy table-driven design、strict schema validation、pytest)
Required Design References
docs/dev/agent-skill-boundaries.md.claude/skills/issue-refinement-loop/SKILL.md.claude/skills/issue-contract-review/SKILL.md
Runtime Verification Applicability
- decision: not_applicable
- reason: readiness/preflight/replay の決定論的ロジックと pytest のみで完結し、外部 runtime 接続を要しない。
Delivery Rule
- 1 Issue = 1 PR
- worktree で作業し Draft PR を既定とする
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Jul 26, 2026
create-issue transaction partial-failure
Issue: #1810
Failure stage: label-apply
Message: label-apply failed
Requested:
Completed steps: create
Failure context: command=gh issue edit --repo squne121/loop-protocol 1810 --add-label triage-required,review-issue-related,enhancement,phase/implementation,agent/implementer
output=failed to update #1810: 'review-issue-related' not found
failed to update 1 issue
matching_issue_numbers=[1810]
issue_number=1810
Recovery hint: stage 'label-apply' encountered an unexpected failure.
Generic guidance: verify the issue state manually and re-run the transaction if safe.
gh issue view 1810 --repo squne121/loop-protocol --json number,title,labels,state
idempotent re-run: depends on the specific failure
Please recover deterministically before re-running the create issue transaction.
squne121 commentedon Jul 28, 2026
判定
REQUEST_CHANGES — 問題設定は正しいものの、Issue #1810 は現状の契約では実装開始不可です。
readiness_error_to_structured_blocker()がcodeに生のrule_id、deterministic_domain_keyに生のcategoryを入れる一方、replay 側の通常 lookup は readiness ID/category を参照しません。このため、VCS001などが未知コードとしてchecker_gapに分類される経路は実在します。問題の発見自体は妥当です。ただし、現在のACでは「変換関数を追加したが実運用経路には接続されていない」「誤った正規化で別の split-brain を作る」という実装でも完了扱いになります。
Blocker 1 —
entry_idとdeterministic_domain_keyを混同しているIssue本文は複数箇所で「taxonomy
entry_id(deterministic_domain_key)」と同一視していますが、現行taxonomyでは明確に別物です。missing_sectionのentry_idに対する domain key はrequired_sectionsrva_immediate_field_missingの domain key はruntime_applicabilityvc_command_formatのみ、たまたま両者が同名さらに finding 照合は、
entry_idではなくエントリの先頭domain_keysとfinding.deterministic_domain_keyを比較します。したがって、例えばLP001 → missing_sectionだけを実装し、その値をdeterministic_domain_keyに入れると、既存のrequired_sectionsfinding と一致しません。必要な修正
変換結果を最低でも次の2値として明記してください。
structured_blocker.codeとdeterministic_domain_keyのどちらに何を格納するかもACで固定する必要があります。Blocker 2 — 単体変換関数では本番経路を直せない
実際の parent replay に渡される child claim は、次の4項目だけです。
reviewer_blocker_codemessageline_startline_endcategory、deterministic_domain_key、checker_evidenceは渡されません。compact_review_result.pyはstructured_blockers[].codeを claim の code に採用し、parent binding はそのcodeだけで replay用のreview_resultを再構築します。findingsとdeterministic_checksは意図的に空です。したがって、次の実装はACを通しても不具合を直しません。
関数がどこからも呼ばれなければ、parent replay は従来どおり
VCS001を未知コードとして扱います。これはPR #1801で一度発生した「adapter関数は存在するがproduction wiringがない」という失敗パターンと同型です。PR #1801自身もこのtaxonomy不整合を未対応follow-upとして記録しています。必要な修正
ACに次のE2Eを追加してください。
この経路で
VCS001、LP001、RVA001がそれぞれ以下になることを検証すべきです。Blocker 3 — 「fail-closed」の出力契約が未定義
Issueは未知ruleを「fail-closed」「unmappedとして明示」としていますが、具体的な verdict、routing、state counter がありません。
現行実装では未知codeは次のようになります。
checker_gap→downgrade_to_non_blockingchecker_gap_repeated→human_escalationconsecutive_unbacked_countが増加つまり、変換関数が
Noneを返すだけでは、Issueが解消したい現在の挙動をそのまま残します。未知・曖昧・矛盾時の契約を、例えば次のように固定する必要があります。
input_or_runtime_error / human_judgment_requiredを選ぶ設計も可能ですが、少なくとも「どの値になるか」をACで固定しなければなりません。High 1 — 文字列だけのlookupへ追加すると、producer検証を弱体化する
現行taxonomyは、readiness categoryを単なる文字列ではなく、実質的に次の複合キーとして扱っています。
また、切り詰められる
VCP_*ruleについては、rule IDとcategoryの両方に加え、source_payloadのproducer shapeまで検証しています。taxonomy invariantも、category単体ではなく(source_check, category)ペアの重複を検出します。したがって、
TAXONOMY_LOOKUPに以下を単純追加する方式は不適切です。これではwrong sourceや、将来別producerが同じcategory名を使った場合の衝突を検出できません。外部の入力検証指針でも、個々のフィールドだけでなく、関連フィールド間の整合性と業務ルールを検証することが求められます。([CWE]1)
正規化関数は生文字列ではなく、少なくとも完全なreadiness errorを入力にすべきです。
判定規則も必要です。
High 2 — #1564との「独立に並行可能」は成立していない
#1564は同じ
reviewer_claim_replay.pyとtaxonomy parity testsを変更し、RDR001/command_not_allowedに対してrule ID・category・sourceのAND semanticsとproducer-shape検証を追加するIssueです。#1549も同じtaxonomyへ切り詰めVCP_*エントリを追加します。いずれも現在openです。さらに#1555は#1564をprerequisiteとし、既存6 taxonomy entryの意味論変更を明示的にスコープ外としています。一方#1810は、その既存entryに対する解決方法自体を変更します。
推奨順序
または、#1810へ#1549・#1564のtaxonomy変更を統合し、重複Issueを整理する必要があります。単なる「マージコンフリクトに留意」では不十分です。
Medium 1 — SSOTに反する二重マッピングを許している
taxonomyは既に次を同じentryに保持するtable-driven SSOTとして設計されています。
#1286とPR #1304の設計目的も、個別dictや分岐を増やさず、追加をtaxonomy tableだけで完結させることです。
しかし#1810の記述では、独立した次のようなdictでもACを満たせます。
これは将来taxonomyとのdriftを再発させます。
ACに以下を追加すべきです。
なお、
RVA001は現行entryのreadiness_rule_idsに入っておらずcategoryだけで紐づいているため、table自体に追加するか、categoryを含むresolverで扱うかを明記する必要があります。Medium 2 — テスト計画が単体・happy pathに偏っている
現在のACでは、関数単体の期待値を書くだけで完了可能です。最低限、以下が必要です。
source_check + rule_id + categoryの正しい組み合わせVCP_*の衝突とsource_payload検証既存テストはtaxonomy entry集合、category、重複をかなり厳格に固定しているため、#1810で新しいresolverを追加するなら同じinvariant suiteへ組み込むべきです。
Low — Issue作成transactionが未回復
Issueコメントには、存在しない
review-issue-relatedlabelの適用に失敗したpartial transactionが残っています。現在のラベル集合も要求された完全な状態ではありません。実装上のblockerではありませんが、再実行前にtransactionをdeterministically recoveryすべきです。推奨する設計
現行のtrust boundaryを維持するなら、parent-owned readiness artifactを使って正規化する方式が適切です。
処理は次の順序にします。
source_check、rule_id、category、必要ならsource_payloadをtaxonomy tableと照合する。entry_idとdomain keyを得る。rule_id/categoryはevidenceとして保持し、canonical識別子と混ぜない。RFC 9457では機械的な識別に安定したtype identifierを使い、人間向けdetailの解析に依存しない設計が推奨されています。OpenTelemetryも
error.typeを予測可能かつ低カーディナリティのcanonical identifierにするよう規定しています。ここでも生のproducer ruleとcanonical taxonomy IDを分離するのが妥当です。([RFC Editor]2)最低限のAC改訂案
結論: #1810は削除すべきIssueではありません。実障害を正しく捉えています。ただし、canonical identity、production wiring、unknown時のrouting、source-qualified validation、関連Issueの順序を契約に追加してから実装へ進めるべきです。現行のままでは、表面的なunit testだけを追加して再び「関数はあるが実運用ではchecker_gap」という状態になる可能性が高いです。
今回の判定はGitHub上の現行コード・Issue・PR・コメントを用いた静的レビューです。リポジトリのテストコマンド自体は実行していません。
squne121 commentedon Jul 28, 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 28, 2026
Contract Review Result
squne121 commentedon Jul 28, 2026
impl-review-loop: 人間判断要請(2026-07-28T21:54:00Z)
sha256:e244ba564e1f55f915eec80ad3f6c7d75f4f7cafc80cafa885b16afe1fb60f2d人間の判断後、依存完了を live readback してから本 loop を再開してください。
squne121 commentedon Jul 28, 2026
impl-review-loop: structural overlap による人間判断要請(2026-07-28T22:00:00Z)
4303a6c288e026247b3fd2a9cb06e96b77e92fd1(未公開)停止理由
#1549/#1564 が OPEN であるだけでは停止していません。live readback では両 Issue の open PR と対応ローカル branch はありませんでした。
ただし fresh overlap preflight は以下の structural collision を
human_review_requiredと判定しました。REVIEWER_CHECKER_TAXONOMY_V1REVIEWER_BLOCKER_CLAIM_V1、REVIEWER_CHECKER_TAXONOMY_V1この分類は open-pr の waiver 対象外で、
proceed_with_collision_evidenceを満たす既存証跡もありません。そのため sanctioned publish / Draft PR 起票を行いません。