Repository navigation
feat(#492): add contract_readiness_check.py and wire into review-issue / edit-issue - #497
Conversation
…e / edit-issue Implements ISSUE_CONTRACT_READINESS_RESULT_V1 helper that routes validate_issue_body and baseline_vc_preflight errors into structured needs_fix / human_judgment feedback consumable by review-issue and edit-issue without re-implementing judgment logic. - contract_readiness_check.py: --mode static (no network/auth) and --mode execute - status mapping: compound_command_disallowed/unexpected_pass → needs_fix, env/tool missing / regression gate fail / human_judgment → human_judgment - RVA AC4 check: decision: immediate required fields guard - issue412_contract_blocked.md / issue412_contract_go.md: synthetic fixtures - test_contract_readiness.py: 18 tests covering AC2/3/4/8/9/10/12/13 - review-issue/SKILL.md + issue-reviewer.md: consume ISSUE_CONTRACT_READINESS_RESULT_V1 - edit-issue/SKILL.md: Step 4.5 fail-closed guard before gh issue edit Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=BEHIND
Evidence Check
- AC coverage: × — PR 本文に
## 受け入れ条件の達成状況セクションが存在しない。## Verification Resultsに VC 結果は記載されているが、AC1〜AC13 の各 AC について[x]+ 根拠形式での達成状況が明示されていない(テンプレート要件未充足)。 - Allowed Paths: 遵守 — changed files 9 件すべて linked issue の Allowed Paths に収まっている。
- CI Verification: CI_CHECK_RUN_SCOPED 有効(run 26669130585, head_sha=099459ed3970546f268eaa0e508de7f3ac93f7bc と一致, python-test/test/lint/typecheck/build/e2e すべて conclusion=success)。TEST_VERDICT_MACHINE コメントは存在しない。
- 検証コマンド結果:
## Verification Resultsセクションに pytest / rg / pnpm 各コマンドの PASS 記録あり(PR body self-report)。CI_CHECK_RUN_SCOPED が補助証跡として有効なため PR_BODY_SELF_REPORT_ONLY_APPROVE_PROHIBITED は非適用。
Blockers
-
AC coverage セクション欠落(BLOCKER): PR 本文に
## 受け入れ条件の達成状況セクションが存在しない。linked issue の AC1〜AC13 について[x]/[ ]+ 根拠形式での記載が必要。現状の## Verification Resultsは VC 実行結果のみで、AC 番号との対応が明示されていない(AC5, AC6, AC7 等は rg コマンド結果のみで達成根拠が不明確)。 -
Schema Change Applicability セクション欠落(BLOCKER):
ISSUE_CONTRACT_READINESS_RESULT_V1スキーマを新規追加しており、review-issue/SKILL.mdおよびissue-reviewer.mdが consumer として参照する。consumer 境界をまたぐ contract の新規追加はschema_changeに該当する。PR 本文に## Schema Change Applicabilityセクションが存在しないため APPROVE 禁止(Step 4.5 規則)。 -
Safety Claim Matrix セクション欠落(BLOCKER): 以下の fail-closed 条件を複数満たすため safety-sensitive PR と判定: changed paths に
.claude/skills/**を含む、diff にruntime verificationキーワードを含む。PR 本文に## Safety Claim Matrixセクションが存在しないため APPROVE 禁止(Step 4.6 規則)。
Non-blockers
issue-author.mdは Allowed Paths に記載されているが diff に含まれていない(rg VC_SINGLE_COMMAND_GUARDRAIL issue-author.md: PASS (already present)で AC6 達成と self-report)。AC coverage セクションで AC6 の達成根拠としてalready presentの理由を明示することを推奨。issue492_contract_blocked.md/issue492_contract_go.mdが追加されているが、Allowed Paths はissue412fixture のみ明示。これらは.claude/skills/issue-contract-review/scripts/tests/fixtures/配下であり技術的には Allowed Paths 内。追加 fixture の意図を PR 本文で一言説明すると良い。
LOOP_VERDICT
verdict: REQUEST_CHANGES
blockers:
- id: ac_coverage_section_missing
description: "PR 本文に受け入れ条件の達成状況セクションが存在しない(AC1〜AC13 の [x]+根拠形式記載なし)"
- id: schema_change_applicability_missing
description: "ISSUE_CONTRACT_READINESS_RESULT_V1 新規スキーマ追加に対し ## Schema Change Applicability セクション欠落(APPROVE 禁止)"
- id: safety_claim_matrix_missing
description: ".claude/skills/** 変更 + runtime verification キーワードにより safety-sensitive PR と判定。## Safety Claim Matrix セクション欠落(APPROVE 禁止)"
mergeable: MERGEABLE
mergeStateStatus: BEHIND
reviewed_head_sha: 099459ed3970546f268eaa0e508de7f3ac93f7bc
recommendations: []
follow_up_issue_requests: []
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=BEHIND
Evidence Check
- AC coverage: AC1-AC13 全項目 [x] + 根拠記載あり
- Allowed Paths: 全 9 ファイルが issue Allowed Paths 内に収まっている(逸脱なし)
- CI Verification: CI run 26669130585 (head_sha=099459ed3970546f268eaa0e508de7f3ac93f7bc) — build/e2e/lint/python-test/test/typecheck 全 conclusion=success。issue-contract-review/scripts/tests/ で 99 passed, 1 skipped(skipped は test_baseline_vc_preflight.py 内のもので contract_readiness tests は全 passed)
- 検証コマンド結果: PR 本文
## Verification Resultsに各 VC の結果が具体的に記載。CI_CHECK_RUN_SCOPED 条件(head_sha 一致・workflow/job=python-test が対象 VC 対応・conclusion=success)を満たす - Schema Consumer Inventory:
schema_change明示、before/after 差分、consumer 列挙コマンド結果、3 consumer の更新状況テーブルあり。compatibility: backward_compatible - Safety Claim Matrix: 4 行、Not controlled 列はすべて空、無限定安全主張なし
Blockers
なし
Non-blockers
- mergeStateStatus=BEHIND のため、merge 前に
gh pr update-branchまたは rebase を推奨
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: BEHIND
reviewed_head_sha: "099459ed3970546f268eaa0e508de7f3ac93f7bc"
recommendations: [update_branch]
follow_up_issue_requests: []
Verdict: REQUEST_CHANGESPR #497 は、PR本文・関連Issue・既存レビューコメント上は一度 主要ブロッカー1. 通常経路が
|
Blocker 1 & 4 (--mode preflight-static + operator sync): - Add --mode preflight-static as alias for static in contract_readiness_check.py; review-issue/SKILL.md and issue-reviewer.md now use --mode preflight-static so the distinction between static compound detection vs execute-only unexpected_pass is explicit in the consumer contract - Sync compound_operators set with baseline_vc_preflight.py: add <, >, <<< Blocker 2 (structured_blockers): - review-issue/SKILL.md: separate ISSUE_CONTRACT_READINESS_RESULT_V1 errors[] into blocking_issues (human-readable fix_hint strings) and structured_blockers (full error structs for machine processing / issue-author repair payload) - issue-reviewer.md: update contract readiness consumer section and output schema; add structured_blockers pass-through to ORCHESTRATOR_IO_BOUNDARY_V1 constraints Blocker 3 (issue-author repair contract): - body-authoring.md: add "Issue-Author Repair Contract by Blocker Category" section with repair procedures for compound_command_disallowed, unexpected_pass, regression_gate fails, and rva_immediate_field_missing Blocker 5 (non-assertive AC3 tests): - test_contract_readiness.py: add 5 unit tests that pass synthetic baseline_vc_preflight/v1 JSON to map_preflight_result_to_errors() directly; no environment-dependent rg execution Blocker 6 (PR Safety Claim Matrix): - Updated PR #497 body to accurately describe --mode static VC non-execution, --issue auth/network requirement, and --body-file --mode static as auth-free path Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
AC coverage: All AC1–AC13 marked [x] with evidence references in PR body. Coverage complete.
Allowed Paths: All 10 changed files are within Allowed Paths defined in #492.
CI Verification: All CI jobs passed at head SHA a55f86a886046a23d97a540835063ed2ff1cf7e9 (run 26669740596): test, lint, typecheck, e2e, build, python-test — all conclusion=success. Head SHA in CI matches PR headRefOid. CI_CHECK_RUN_SCOPED conditions met: python-test job covers the AC11 VC (uv run pytest issue-contract-review/scripts/tests/).
Iteration 2 fix verification:
-
--mode preflight-staticadded as static alias incontract_readiness_check.pydocstring and implementation.review-issue/SKILL.mdcalls--mode preflight-static. Compound detection is static (no execution), unexpected_pass requires--mode execute— correctly documented. -
structured_blockersfield present in REVIEW_ISSUE_RESULT_V1 output schema, passingerrors[]as-is from contract_readiness_check.py (machine-processing payload for issue-author). -
AC6
body-authoring.mdnow has## Issue-Author Repair Contract by Blocker Categorywith explicit repair contracts for:compound_command_disallowed,unexpected_pass,regression_gate fails,rva_immediate_field_missing. Theissue-author.mdreferences body-authoring.md SSOT at line 49 without duplicating rules. -
AC3 synthetic unit tests: 4 new assertive tests added —
test_unexpected_pass_maps_to_needs_fix,test_compound_command_maps_to_needs_fix,test_human_judgment_decision_not_collapsed,test_expected_baseline_fail_maps_to_go. All usemap_preflight_result_to_errors()with synthetic preflight JSON. -
Safety Claim Matrix:
--mode static subprocess is validate_issue_body.py onlyand--issue path requires auth/networkare now correctly scoped bounded claims. -
edit-issue/SKILL.mdStep 4.5 uses--mode static(not preflight-static) — consistent with the intent that pre-mutation guard uses static mode only.
검증コマンド結果: PR body records all VC results with specific pytest -k counts. python-test CI job confirms test suite passes at head SHA.
Schema Consumer Inventory: Present, new schema addition (no breaking changes to existing consumers). Compatibility: backward_compatible, migration_required: no.
Safety Claim Matrix: Present with 6 bounded claims, all Not-controlled columns empty, Evidence columns reference pytest PASS results.
Runtime Verification Applicability: decision: immediate with all required fields (applicable_acs, execution_environment, skip_conditions, fallback_policy, artifact_requirements) present.
Blockers
なし
Non-blockers
なし
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: a55f86a886046a23d97a540835063ed2ff1cf7e9
recommendations: []
follow_up_issue_requests: []
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
AC coverage: All AC1-AC13 marked [x] with evidence references in PR body. Coverage complete.
Allowed Paths: All 10 changed files are within Allowed Paths defined in #492.
CI Verification: All CI jobs passed at head SHA a55f86a (run 26669740596): test, lint, typecheck, e2e, build, python-test - all conclusion=success. Head SHA in CI matches PR headRefOid. CI_CHECK_RUN_SCOPED conditions met: python-test job covers the AC11 VC.
Iteration 2 fix verification:
- --mode preflight-static added as static alias; review-issue/SKILL.md calls --mode preflight-static.
- structured_blockers field passes errors[] as-is in REVIEW_ISSUE_RESULT_V1 output schema.
- AC6: body-authoring.md has Issue-Author Repair Contract by Blocker Category with compound_command_disallowed, unexpected_pass, regression_gate fails, rva_immediate_field_missing. issue-author.md references body-authoring.md SSOT without duplicating rules.
- AC3 synthetic unit tests: 4 new tests added using map_preflight_result_to_errors() with synthetic preflight JSON.
- Safety Claim Matrix: --mode static and --issue path claims correctly scoped.
Schema Consumer Inventory: Present, new schema addition, backward_compatible, migration_required: no.
Safety Claim Matrix: Present with 6 bounded claims, all Not-controlled empty, Evidence references pytest PASS.
Runtime Verification Applicability: decision: immediate with all 5 required fields present.
Blockers
none
Non-blockers
none
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: a55f86a886046a23d97a540835063ed2ff1cf7e9
recommendations: []
follow_up_issue_requests: []
Verdict: REQUEST_CHANGESPR本文と後続コメント上は APPROVE まで進んでいますが、実装契約としてはまだ危険です。特に 確認した前提PR #497 は 親Issue #492 のスコープは、 Blockers1.
|
impl-review-loop: human_escalation(max_iterations 到達)
全イテレーション ブロッカー履歴iteration 0 → PR 本文 3 セクション欠落(AC coverage / Schema Change / Safety Claim Matrix) → 修正済み iteration 1 → 実装品質 6 件 → 修正済み
iteration 2(未解決) → 人間レビュアーが指摘した 6 件が残存
推奨アクション以下のいずれかを選択してください:
|
… source_payload, structured_blockers contract, redirect op exclusion, bidi check, PR body update
- Blocker 1: run_validate_issue_body TimeoutExpired → validator_tool_error, empty/JSONDecodeError → validator_internal_error; compute_aggregate_status maps these to human_judgment (not needs_fix)
- Blocker 2: map_preflight_result_to_errors adds source_payload{classification,decision,confidence,exit_code,command_hash,duration_ms} to each preflight error (AC3 lossless)
- Blocker 3: issue-author.md adds Contract Readiness Repair Input Contract section with category→action routing table
- Blocker 4: check_vc_static_syntax compound_operators drops <,>,<<,>>,<<< per body-authoring.md#VC_SINGLE_COMMAND_GUARDRAIL SSOT
- Blocker 5: PR #497 body Safety Claim Matrix and AC6 updated to reflect changes
- Blocker 6: bidi/hidden Unicode scan confirmed clean (no changes needed)
- Tests: add test_source_payload_present_in_preflight_errors, test_redirect_operators_not_flagged, test_control_operators_still_flagged, test_validator_tool/internal_error_maps_to_human_judgment (28 passed)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
- AC coverage: 13/13 [x] 全項目に根拠記載あり
- Allowed Paths: 遵守(変更ファイル全11件が Allowed Paths 内)
- CI Verification: CI_CHECK_RUN_SCOPED — run 26672862536, head_sha 4fc6b04, workflow ci, job python-test(
uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/)conclusion=success。typecheck/lint/test/build/e2e 全 job pass。 - 検証コマンド結果: pytest 22/22 PASS(AC2/3/4/8/9/10/12/13 網羅)、pnpm typecheck/lint/test/build PASS
Previous REQUEST_CHANGES Blockers — Resolution Confirmed
- validator tool/internal failure → human_judgment:
TimeoutExpired→validator_tool_error,JSONDecodeError/VALIDATOR_JSON_ERROR→validator_internal_error, これらをhuman_judgmentに分類する実装が追加。test_validator_tool_error_maps_to_human_judgment()が deterministic に検証。 - AC3 lossless mapping (source_payload):
map_preflight_result_to_errors()がclassification,decision,confidence,exit_code,command_hash,duration_msをsource_payloadとして各 error に付与する実装を確認。OPTIONAL_ERROR_KEYS = {"source_payload"}で schema に明示。 - AC6 issue-author.md:
## Contract Readiness Repair Input Contract+ category 別 routing table がissue-author.mdに追加。body-authoring.mdにIssue-Author Repair Contract by Blocker Categoryセクションも追加。SSOT 二重定義なし。 - static operator set:
compound_operators = frozenset(["&&", "||", "|", ";", "&"])—< > << >> <<<を除外。body-authoring.mdの VC_SINGLE_COMMAND_GUARDRAIL 禁止 operator テーブルと一致(redirect 系は「機械的 enforce を行わない」と明記)。 - unexpected_pass テスト:
test_unexpected_pass_maps_to_needs_fix()が syntheticbaseline_vc_preflight/v1JSON をmap_preflight_result_to_errors()に直接渡し、aggregate == "needs_fix"およびcategory == "unexpected_pass"を deterministic にアサート。前回の schema-only テストとは別に追加済み。 - Safety Claim Matrix: 「VC 実行なし(validator subprocess のみ:
validate_issue_body.py)」に修正。--issue経路の auth/network 要件も明示。実装と一致。
Schema Consumer Inventory
- schema_change_applicability: schema_change(新規スキーマ追加)
- consumer 全3件(review-issue/SKILL.md, issue-reviewer.md, edit-issue/SKILL.md)が更新済み
- compatibility: backward_compatible(新規追加のため既存コードへの影響なし)
Safety Claim Gate
- safety-sensitive PR(.claude/skills/** path 変更)— Safety Claim Matrix 存在確認済み
- Not controlled 列が空 — 無限定安全主張なし — overclaim なし
Blockers
なし
Non-blockers(任意改善)
unexpected_passの execute mode での通常経路統合(現時点は preflight-static では検出不可)。issue-reviewer.mdの note で設計上の制約として文書化済みのため blocker にはならないが、#492 の「前段で潰せる」目標を完全達成するには follow-up で execute mode integration が必要になる可能性がある。
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 4fc6b04a34221142d367c1dcdfa199770ac4d9be
recommendations: []
follow_up_issue_requests:
- title: "review-issue execute mode integration for unexpected_pass detection in normal refinement path"
issue_kind: implementation
severity: optional_follow_up
source:
kind: pr_review
url: "https://github.com/squne121/loop-protocol/pull/497"
note_id: "1"
dedupe_key: "follow-up:squne121/loop-protocol:https://github.com/squne121/loop-protocol/pull/497:1"
desired_destination: "review-issue が --mode execute を呼ぶ経路(または等価な preflight 統合)で unexpected_pass が通常の refinement path で検出される"
validated_scope_delta: "review-issue/SKILL.md に --mode execute 呼び出し条件を追加し、unexpected_pass → needs_fix の通常経路統合を実装する"
origin_skill: pr-review-judge
labels:
- triage-required
post-merge-cleanup: 完了 (2026-05-30T06:10:00Z)
FOLLOW_UP_MATERIALIZATION_RESULT_V1:
schema_version: 1
materialized_by: post-merge-cleanup
follow_up_issues:
- request_dedupe_key: "follow-up:squne121/loop-protocol:pr/497:contract-execute-mode-wiring"
status: created
issue:
number: 502
url: "https://github.com/squne121/loop-protocol/issues/502"
reason: "unexpected_pass は --mode preflight-static では検出不可。optional follow-up として起票"
- request_dedupe_key: "follow-up:squne121/loop-protocol:pr/497:structured-blockers-passthrough"
status: skipped_closed_completed
issue: null
reason: "impl-review-loop iteration 2 で structured_blockers フィールド追加済み。PR APPROVE 後マージ"
- request_dedupe_key: "follow-up:squne121/loop-protocol:pr/497:repair-rules-in-issue-author"
status: skipped_closed_completed
issue: null
reason: "impl-review-loop で Contract Readiness Repair Input Contract を issue-author.md に追加済み"
- request_dedupe_key: "follow-up:squne121/loop-protocol:pr/497:compound-operator-sync"
status: skipped_closed_completed
issue: null
reason: "impl-review-loop で operator set を body-authoring SSOT に同期済み"
- request_dedupe_key: "follow-up:squne121/loop-protocol:pr/497:unexpected-pass-unit-test"
status: skipped_closed_completed
issue: null
reason: "impl-review-loop で synthetic preflight JSON unit test を追加済み"
- request_dedupe_key: "follow-up:squne121/loop-protocol:pr/497:safety-claim-accuracy"
status: skipped_closed_completed
issue: null
reason: "impl-review-loop で Safety Claim Matrix を実装と一致する内容に修正済み"
note_only_observations:
- dedupe_key: "worktree-issue-496-staged-files"
source_url: "https://github.com/squne121/loop-protocol"
source_note_id: "cleanup-warning"
summary: "worktree-issue-496 に staged/untracked ファイルあり。手動確認が必要" |
B2: Add .claude/skills/review-issue/tests/ to python-test job in ci.yml
(pytest step + ci_test_selection artifact entry)
B3: Clarify SKILL.md output contract — explicit merge rules for errors[]
into blocking_issues / structured_blockers; human_judgment vs needs-fix
separation made explicit with failure_class annotation
B4: Strengthen test_human_judgment_not_collapsed_to_needs_fix with
_HUMAN_JUDGMENT_ISSUE_CONTENT inline fixture (nonexistent tool → exit 127
→ env_missing_dep → human_judgment); assertion now confirms len > 0
before checking non-collapse invariant
B5: PR body Safety Claim Matrix updated to 5-column format matching #497
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
B2: Add .claude/skills/review-issue/tests/ to python-test job in ci.yml
(pytest step + ci_test_selection artifact entry)
B3: Clarify SKILL.md output contract — explicit merge rules for errors[]
into blocking_issues / structured_blockers; human_judgment vs needs-fix
separation made explicit with failure_class annotation
B4: Strengthen test_human_judgment_not_collapsed_to_needs_fix with
_HUMAN_JUDGMENT_ISSUE_CONTENT inline fixture (nonexistent tool → exit 127
→ env_missing_dep → human_judgment); assertion now confirms len > 0
before checking non-collapse invariant
B5: PR body Safety Claim Matrix updated to 5-column format matching #497
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…r unexpected_pass detection (#509) * feat(#502): wire --mode execute into review-issue / issue-reviewer for unexpected_pass detection review-issue SKILL.md と issue-reviewer.md の contract_readiness_check.py 呼び出しを --mode preflight-static から --mode execute に切り替え、VC 実行経路を通じて unexpected_pass を refinement ループ内で検出可能にする。 - SKILL.md: preflight-static → execute、lossless pass-through / human_judgment 非畳み込み / shell=False の明示 - issue-reviewer.md: 同上、Note を execute 対応に統一 - fixtures/unexpected_pass_issue.md: $ true を使った統合テスト用フィクスチャを追加 - tests/test_check_issue_contract.py: --mode execute 統合テストクラス(7件)を追加 - AC9: baseline_vc_preflight が source_checks に含まれることで execute 呼び出しを確認 - AC3: unexpected_pass fixture → status=needs_fix + category=unexpected_pass - AC4: source_check/source_payload lossless pass-through - AC5: human_judgment は needs_fix に畳み込まれない - AC7: --body-file のみ使用(gh/network 不要) - AC8: shell=True 未使用をスクリプト本体で確認 Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(#502): inline unexpected_pass fixture, remove fixtures/ entry Replace fixtures/unexpected_pass_issue.md with an inline string constant _UNEXPECTED_PASS_ISSUE_CONTENT in test_check_issue_contract.py. Three tests updated to call run_contract_readiness_from_content() instead of the file-based run_contract_readiness() path. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(#502): address PR #509 blockers B2/B3/B4/B5 B2: Add .claude/skills/review-issue/tests/ to python-test job in ci.yml (pytest step + ci_test_selection artifact entry) B3: Clarify SKILL.md output contract — explicit merge rules for errors[] into blocking_issues / structured_blockers; human_judgment vs needs-fix separation made explicit with failure_class annotation B4: Strengthen test_human_judgment_not_collapsed_to_needs_fix with _HUMAN_JUDGMENT_ISSUE_CONTENT inline fixture (nonexistent tool → exit 127 → env_missing_dep → human_judgment); assertion now confirms len > 0 before checking non-collapse invariant B5: PR body Safety Claim Matrix updated to 5-column format matching #497 Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Summary
contract_readiness_check.pywithISSUE_CONTRACT_READINESS_RESULT_V1output schema--mode static(default): VC syntax + section + schema only; no network, no auth, no VC execution--mode execute: also runsbaseline_vc_preflight.pycompound_command_disallowed/unexpected_pass→needs_fix; env/tool/regression/human_judgment →human_judgmentapplicable_acs,execution_environment,skip_conditions,fallback_policy,artifact_requirementsreview-issue/SKILL.md+issue-reviewer.md: consumeISSUE_CONTRACT_READINESS_RESULT_V1, transferfix_hinttoblocking_issuesedit-issue/SKILL.md: Step 4.5 fail-closed guard beforegh issue editissue-contract-review/scripts/tests/Checks
pnpm typecheckpnpm lintpnpm testpnpm build受け入れ条件の達成状況
contract_readiness_check.pyが存在し--body-fileでISSUE_CONTRACT_READINESS_RESULT_V1JSON を返す —test -fPASSpytest -k contract_readiness_result_v1_schema1 passedbaseline_vc_preflight.py結果が lossless に写像される —pytest -k compound_command_disallowed or unexpected_pass22+ passeddecision: immediateRVA 必須フィールド不足がneeds_fix検出される —pytest -k runtime_verification_applicability18 passedreview-issue/issue-reviewer.mdがISSUE_CONTRACT_READINESS_RESULT_V1を consume —rg ISSUE_CONTRACT_READINESS_RESULT_V12 matchesissue-author.mdにstructured_blockers入力契約(category→修復アクション routing table)を追加 —rg "Contract Readiness Repair Input Contract" .claude/agents/issue-author.mdPASSedit-issueが mutation 前に contract readiness check を fail-closed で実行 —rg contract_readiness_check edit-issue/3 matchespytest -k issue4122 passedstatus: go—pytest -k contract_go_fixture1 passedpytest -k no_logic_in_orchestration_skills1 passeduv run pytest issue-contract-review/scripts/tests/に含まれる--mode staticは GitHub token / auth / network 不要 —pytest -k no_network_required or static_mode2 passedpytest -k golden_fixture or schema_strict2 passedSchema Change Applicability
schema_changeISSUE_CONTRACT_READINESS_RESULT_V1を新規追加。review-issue/SKILL.md、issue-reviewer.md、edit-issue/SKILL.mdが consumer。Schema Consumer Inventory
変更対象 schema:
ISSUE_CONTRACT_READINESS_RESULT_V1before/after 差分:
Consumer 列挙:
Consumer 更新状況:
.claude/skills/review-issue/SKILL.mdISSUE_CONTRACT_READINESS_RESULT_V1consume セクション追加.claude/agents/issue-reviewer.mdblocking_issuesへの転写手順追加.claude/skills/edit-issue/SKILL.mdCompatibility Decision
additivebackward_compatiblenoSafety Claim Matrix
--mode staticは VC 実行なし(validator subprocess のみ:validate_issue_body.py)。--issue経路は auth/network 必要pytest -k static_mode_no_baseline_preflight_source_checkPASS--mode preflight-staticはstaticのエイリアス(VC 実行なし、compound_command_disallowed を静的検出)pytest -k preflight_static_mode_schema_validPASS--mode executeはbaseline_vc_preflight.py経由のみ(arbitrary command 禁止)contract_readiness_check.pyが直接 shell を呼ばないedit-issuepre-mutation guard は--mode staticのみ使用(VC 実行なし)rg contract_readiness_check edit-issue/PASS--issue経路ではgh issue viewを実行するため auth/network が必要gh_auth_failedを返す--body-file --mode staticのみが auth/network 不要pytest -k no_network_requiredPASSVerification Results
test -f contract_readiness_check.py: PASSuv run pytest ... -k "contract_readiness": 17/17 PASSuv run pytest ... -k "compound_command_disallowed or unexpected_pass or preflight_scope or contract_readiness": 22/22 PASSuv run pytest ... -k "issue412": 2/2 PASSuv run pytest ... -k "contract_go_fixture": 1/1 PASSuv run pytest ... -k "no_logic_in_orchestration_skills": 1/1 PASSuv run pytest ... -k "no_network_required or static_mode": 2/2 PASSuv run pytest ... -k "golden_fixture or schema_strict": 2/2 PASSrg ISSUE_CONTRACT_READINESS_RESULT_V1 review-issue/ issue-reviewer.md: PASSrg VC_SINGLE_COMMAND_GUARDRAIL issue-author.md: PASS (already present, body-authoring.md SSOT)rg contract_readiness_check edit-issue/: PASSpnpm typecheck: PASSpnpm lint: PASSpnpm test: 179/179 PASSpnpm build: PASSNotes
Closes #492
🤖 Generated with Claude Code