Repository navigation
Closed
Labels
triage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "#2939 の refinement で見つかった、create-issue の削除確認 VC guidance が rg -c を成功条件 0 件の形で規定し no-match の exit 1 で成否が逆転する問題を是正する"
change_kind: docsParent Issue
none
Parent Goal Ref
- Goal: create-issue の削除確認 VC の authoring guidance を、現行の VC verifier(baseline_vc_preflight)が実際に実行・分類できる「1 command = 1 file、成功時 exit 0」の形へ是正し、guidance 起因の VC 成否逆転を再発させない。
- Desired Destination: create-issue の authoring guidance が、削除・不存在を成功条件とする VC を
rg --files-without-match --fixed-strings -- "<literal>" <file>(plainrg、-qなし、1 command = 1 concrete file)として示し、rg -c/rg --countを「0 件を成功とする」形で推奨しない状態にする。 - 出所: 実装: Claude-GPT launcher の loopback 判定を厳密化し、runner help の旧 hook 記述を現在の挙動へ合わせる #2939 (note_id: negative-vc-rg-c-exit-semantics)。単独の recurrence-prevention follow-up(親子関係・dependency は作らない)。
- 再 refinement の根拠(trusted human context): 実装: 削除確認 VC の authoring guidance が rg -c を成功条件 0 件の形で規定しており、no-match の exit 1 で成否が逆転するため guidance を exit 0 成功の negative assertion へ是正する #2943 (comment)
Current Validated Scope
.claude/skills/create-issue/references/body-authoring.mdの「### 削除確認パターン」節(main 9a0f24a で 310-318 行付近、fenced bash block)が# count が 0 であることを確認する(rg は 0 件の場合 exit 1 を返す)とrg -c "削除対象の記述" <file>を示している。コメント自身が「0 件は exit 1」と述べており、削除完了後に exit 1(false failure)、削除前の baseline で exit 0(false pass /Command unexpectedly passed)になる。.claude/skills/create-issue/SKILL.mdの「VC 作成の決定論的ルール」(131 行付近、inline code の箇条書き 1 行)が「削除確認パターン:rg -c "削除対象" <file>の出力が 0 件であることを確認する」と規定している。fenced block ではなく inline code である。- 同ファイル内の他の
rg -c(body-authoring.mdの 582 行・595 行rg -c "# AC[0-9]" issue_body.md)は「count が 1 以上であること」を使う正の件数確認であり、削除確認ではない。本 Issue の是正対象外であり変更しない。 - 観測事例: 実装: Claude-GPT launcher の loopback 判定を厳密化し、runner help の旧 hook 記述を現在の挙動へ合わせる #2939 の初版 AC4 VC
rg -c "subagent-start-stop instead of" scripts/agent-ops/run_worktree_agent_runtime_smoke.py(baseline は count 1 / exit 0、修正後は count 0 / exit 1)が、canonical review でCommand unexpectedly passed [missing_annotation]と指摘された。guidance 起因の pattern であり、guidance に従う任意の Issue で再発しうる。 - 検証済み事実(main 9a0f24a、ripgrep 14.1.0 での実測と upstream 一次資料):
- 通常の
rg PATTERN fileは match で exit 0、no-match で exit 1、error で exit 2。rg -c/rg --countも no-match(--include-zero付きでも)で exit 1。 rg --files-without-match --fixed-strings LITERAL <1 file>は、literal あり → exit 1(file は出力されない)、literal なし → exit 0(file 名を出力)、file 不存在 → exit 2。複数 file を渡すと「少なくとも 1 file に literal がない」だけで exit 0 になるため、削除確認には 1 command = 1 concrete file でのみ使える。-qと--files-without-matchの併用は ripgrep 14.1.0 で exit status が反転する upstream bug #3108 があり、15.0.0(2025-10-16)で修正された。バージョン依存を避けるため-qを併用しない。
- 通常の
- 検証済み事実(baseline_vc_preflight の実分類、real CLI を temp git repo fixture に対して実行して実測):
! rg/! grepは_is_negated_search_command()により静的分類され(classify_result()先頭付近と main 実行経路)、command は実行されない(exit_code: None)。literal が存在しても存在しなくてもclassification: expected_fail/category: expected_baseline_failになる。test_negated_rg_is_not_run(.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py)がこの挙動を現行 contract として固定している。したがって! rg -qは shell 上は正しいが、repo の VC verifier では「削除前 baseline で fail、削除後に pass」という遷移を実証できず、canonical guidance にしてはならない。- 置換形
rg --files-without-match --fixed-strings -- "<literal>" <file>(file は Allowed Paths 内の 1 file)は baseline mode で literal あり →exit_code: 1、classification: expected_fail、category: expected_baseline_fail、decision: go。--evidence-mode current-head --reviewed-head-sha <sha>(--cwdと--format json必須)で literal なし →exit_code: 0、classification: expected_pass、category: expected_pass_resolved_on_current_head、decision: go。 _rg_extract_path_operands()は--files-without-matchと--fixed-stringsを長形式 boolean flag として既に扱っている(実装: VC preflight の rg path operand 抽出が長形式の真偽 flag を PATH と誤認し VCP_BROAD_SEARCH_PATH_UN を誤発する欠陥を是正する #2900 / PR fix: VC preflight の rg path 抽出が長形式 boolean flag を PATH と誤認する欠陥を是正する #2904)。checker / baseline_vc_preflight の論理変更なしで置換形は実行・分類される。
- dedupe 証跡(再議論しない): dedupe_key
follow-up:squne121/loop-protocol:https://github.com/squne121/loop-protocol/issues/2939:negative-vc-rg-c-exit-semanticsの exact-match 検索(open + closed)は 0 件。関連参照のみ(同一 ownership ではない): 実装: Issue VC 設計改善: 「削除確認 VC は削除対象 literal を列挙する」原則を body-authoring.md に追記し review-issue の non-blocking warning check に反映する #46(OPEN、削除確認 VC は削除対象 literal を列挙する原則。literal inventory という別の失敗クラス)、改善: review-issue checker の vc_negative_grep_without_literal_inventory を inventory marker 強化と negative grep pattern 拡張で堅牢化する #397(OPEN、review-issue checkervc_negative_grep_without_literal_inventoryの robustness)、実装: VC preflight の rg path operand 抽出が長形式の真偽 flag を PATH と誤認し VCP_BROAD_SEARCH_PATH_UN を誤発する欠陥を是正する #2900(CLOSED/completed、baseline_vc_preflight の rg long boolean flag path-operand 誤解析。本 Issue はその成果を再利用する)。 - Runtime Verification 判定:
docs/dev/extension-surface-runtime-policy.yamlの evaluator(scripts/agent-guards/extension_surface_policy_matcher.pyのevaluate_allowed_paths)に本 Issue の Allowed Paths を与えると、.claude/skills/**/SKILL.mdが hard selector に一致しfinal_decision: immediateとなる。したがって decision は not_applicable ではなく immediate とする。
Remaining Parent Gaps
- 実装: Issue VC 設計改善: 「削除確認 VC は削除対象 literal を列挙する」原則を body-authoring.md に追記し review-issue の non-blocking warning check に反映する #46 / 改善: review-issue checker の vc_negative_grep_without_literal_inventory を inventory marker 強化と negative grep pattern 拡張で堅牢化する #397 / 実装: VC preflight の rg path operand 抽出が長形式の真偽 flag を PATH と誤認し VCP_BROAD_SEARCH_PATH_UN を誤発する欠陥を是正する #2900 の ownership は変更しない。既存 Issue 本文の一括書き換え、checker / baseline_vc_preflight の論理変更(
!否定検索を実行対応にする拡張を含む)は本 Issue の対象外であり、必要なら別 Issue で扱う。
Outcome
.claude/skills/create-issue/SKILL.md と .claude/skills/create-issue/references/body-authoring.md の削除確認パターンが、0 件を成功とする rg -c の例ではなく、plain rg の 1 command = 1 concrete file の absence 形 rg --files-without-match --fixed-strings -- "<literal>" <file> を示す状態になり、追加した focused pytest が次を観測して PASS している状態にする。(a) 両文書の削除確認 section に zero-count 成功の -c / --count 例が残らず、canonical 置換形が存在する。(b) 置換形が real な baseline_vc_preflight の分類 path で、literal が存在する baseline fixture では failure 側、literal が存在しない current-head fixture では success 側に分類される。
Runtime Verification Applicability
decision: immediate
applicable_acs:
- AC1
execution_environment: "local の uv・pytest・ripgrep(rg)・git のみ。pytest が temp git repo fixture に対して baseline_vc_preflight.py を real subprocess で呼び出し、実際の VC 分類を local で観測する。network request・live Claude runtime・実 Skill 起動は使わない"
skip_conditions: "uv・pytest・rg・git のいずれかが利用不能な場合は PASS として扱わない。focused pytest は rg / git 不在を assertion failure(hard FAIL)にし、SKIP にも PASS にもしない。exit 77 のためだけの wrapper / adapter は追加しない。失敗は Stop Conditions へエスカレーションする"
fallback_policy: "fallback 経由でのみ成功した場合(classifier の mock / fake / hand-written imitation を含む)は FAIL として扱い、実 baseline_vc_preflight 分類の観測へ戻す"
artifact_requirements: "pytest 実行ログ(exit code と、baseline fixture の expected_fail / current-head fixture の expected_pass_resolved_on_current_head の観測)を PR 本文に引用する"
reason: "SKILL.md を Allowed Paths に含むため extension-surface policy の evaluator が immediate と判定する。AC1 は guidance 文書の置換形が実 baseline_vc_preflight の分類で baseline は expected_fail、current-head は expected_pass_resolved_on_current_head になることを local で観測する。実 Skill 起動は伴わない"
runtime_assertion_bindings: - profile: skill-invocation-runtime-smoke
assertion: procedure_steps_executed_in_declared_order
disposition: not_applicable
reason: "変更は VC authoring guidance の例示コマンドの是正のみで、SKILL.md の Procedure の実行順序・分岐条件は変更しない" - profile: skill-invocation-runtime-smoke
assertion: output_contract_schema_fields_present
disposition: not_applicable
reason: "出力契約(Output / ISSUE_AUTHOR_RESULT 系の field)は変更しない" - profile: subagent-lifecycle-causal-evidence-smoke
assertion: subagent_start_stop_causal_evidence_correlated
disposition: not_applicable
reason: "SubAgent の start/stop や delegation 挙動は変更しない。guidance 文書の例示のみを変更する"
In Scope
references/body-authoring.mdの「### 削除確認パターン」節を是正する。rg -cを「0 件を成功とする」形で示す例とコメントを除去し、plainrgの absence 形rg --files-without-match --fixed-strings -- "<literal>" <file>を fenced block で示す。併記する説明は次の 4 点とする。(0)--は option parsing の終端であり、--settings/--fooのように-で始まる literal を pattern として扱うために必須とする。(1) 成功は exit 0(literal が file に存在しない)、literal が存在すれば exit 1 になる。(2) 1 command = 1 concrete file とし、複数 file を一度に渡さない(1 file でも literal を含まなければ exit 0 になり「全 file から消えた」と誤読できるため、file ごとに VC を分ける)。(3)-q/--quietを併用しない(ripgrep 14.1.0 の upstream bug #3108 による exit status 反転を避ける)。(4)rg -c/rg --countは no-match で exit 1 を返すため、0 件を成功条件にする削除確認には使えない(存在確認・正の件数確認など「count が 1 以上であること」を成功とする用途とは区別する)。! rg -q/! grepを canonical な削除確認の例として示さない(repo の VC verifier は否定検索を静的分類し実行しないため)。SKILL.mdの「削除確認パターン」箇条(131 行付近、inline code)を同じ形へ是正する(inline code で同じ canonical 置換形・1 command = 1 concrete file・-q非併用を簡潔に示す)。- 最小 regression test を
.claude/skills/create-issue/tests/test_deletion_vc_guidance_exit_semantics.pyとして追加する(既存tests/は.github/ci/python-test-plan.jsonの targets に登録済みのため、plan の変更は不要)。次の 2 件を含む。test_guidance_deletion_section_has_canonical_single_file_absence_form:SKILL.mdの「削除確認パターン」箇条とbody-authoring.mdの「### 削除確認パターン」節(次の見出しまで)をそれぞれ特定し、各 section 内の inline code と fenced block の双方からrgcommand を抽出して token 化する。(i) いずれのrgcommand にも-c/--count(短形式クラスタ内のcを含む)が現れないこと。(ii)-q/--quietが現れないこと。(iii)--files-without-matchと--fixed-stringsと--separator を持つ canonical 置換形が両文書に存在し、その path operand がちょうど 1 つであること。(iv)!で始まる否定検索が削除確認の例として現れないこと。を検証する。検証は削除確認 section に限定し、body-authoring.mdの他箇所の正の件数確認rg -c(582 行・595 行付近)は対象外とする。test_replacement_command_classified_by_real_baseline_vc_preflight:body-authoring.mdの canonical 置換形を fenced block から抽出して<literal>/<file>を fixture の値に置換し、temp git repo fixture に対して repo のbaseline_vc_preflight.pyを real subprocess で呼び出して実分類を観測する。fixture の literal は-で始まる--DELETION_TARGET_LITERAL_2943を使い、--separator が option parse error を起こさず dash-leading literal を pattern として扱えることも固定する。classifier の mock / fake / hand-written imitation は使わない。(a) literal が存在する baseline fixture(baseline mode)でclassification: expected_fail/category: expected_baseline_fail/exit_code: 1。(b) literal が存在しない fixture(--evidence-mode current-head --reviewed-head-sha <fixture HEAD> --cwd <fixture> --format json)でclassification: expected_pass/category: expected_pass_resolved_on_current_head/exit_code: 0。両者を観測して assert する。対照として、旧形rg -c "<literal>" <file>を同じ baseline fixture で実行すると exit 0 で unexpected pass として分類され、literal を除去した後は exit 1 になる(成否が逆転する)ことも real runner で確認する。
Out of Scope
- review-issue checker / baseline_vc_preflight の論理変更(
!否定検索の実行対応を含む) - 実装: Issue VC 設計改善: 「削除確認 VC は削除対象 literal を列挙する」原則を body-authoring.md に追記し review-issue の non-blocking warning check に反映する #46 / 改善: review-issue checker の vc_negative_grep_without_literal_inventory を inventory marker 強化と negative grep pattern 拡張で堅牢化する #397 / 実装: VC preflight の rg path operand 抽出が長形式の真偽 flag を PATH と誤認し VCP_BROAD_SEARCH_PATH_UN を誤発する欠陥を是正する #2900 の ownership の変更、および literal inventory の規定そのものの変更
- 既存 Issue の本文の一括書き換え
- 削除確認以外の
rg -c(正の件数確認)の用法の変更 - security / harness 一般への guidance の一般化
- 親子関係・dependency の新設
Acceptance Criteria
- AC1: guidance の canonical 置換形
rg --files-without-match --fixed-strings -- "<literal>" <file>が、real なbaseline_vc_preflightの分類 path で、literal が存在する baseline fixture ではexpected_fail/expected_baseline_fail(exit_code: 1)、literal が存在しない current-head fixture ではexpected_pass/expected_pass_resolved_on_current_head(exit_code: 0)になることを、test_replacement_command_classified_by_real_baseline_vc_preflightが local で実観測して PASS する。mock / fake classifier による成功、tool 不在による SKIP / FAIL、fallback 経由でのみの成功は PASS として扱わない。 - AC2:
test_guidance_deletion_section_has_canonical_single_file_absence_formが PASS し、両文書の削除確認 section に-c/--countの zero-count 成功例、-q/--quiet併用、!否定検索の例が残らず、1 file の canonical 置換形が存在する。 - AC3:
SKILL.mdにrg -c "削除対象形の削除確認例が残らない。 - AC4:
references/body-authoring.mdにrg -c "削除対象形の削除確認例が残らない。 - AC5:
references/body-authoring.mdに canonical 置換形rg --files-without-match --fixed-strings -- "<literal>" <file>が記載されている。 - AC6:
SKILL.mdに canonical 置換形rg --files-without-match --fixed-strings -- "<literal>" <file>が記載されている。 - AC7: 既存の VC single command guardrail の docs test が引き続き PASS する。
Verification Commands
# AC1
# baseline-expect: fail
$ uv run pytest .claude/skills/create-issue/tests/test_deletion_vc_guidance_exit_semantics.py::test_replacement_command_classified_by_real_baseline_vc_preflight
# AC2
# baseline-expect: fail
$ uv run pytest .claude/skills/create-issue/tests/test_deletion_vc_guidance_exit_semantics.py::test_guidance_deletion_section_has_canonical_single_file_absence_form
# AC3
# baseline-expect: fail
$ rg --files-without-match --fixed-strings -- 'rg -c "削除対象' .claude/skills/create-issue/SKILL.md
# AC4
# baseline-expect: fail
$ rg --files-without-match --fixed-strings -- 'rg -c "削除対象' .claude/skills/create-issue/references/body-authoring.md
# AC5
# baseline-expect: fail
$ rg -q -F -e 'rg --files-without-match --fixed-strings -- "<literal>" <file>' .claude/skills/create-issue/references/body-authoring.md
# AC6
# baseline-expect: fail
$ rg -q -F -e 'rg --files-without-match --fixed-strings -- "<literal>" <file>' .claude/skills/create-issue/SKILL.md
# AC7
$ uv run pytest .claude/skills/create-issue/tests/test_verify_vc_single_command_guardrail_docs.pyAllowed Paths
- .claude/skills/create-issue/SKILL.md
- .claude/skills/create-issue/references/body-authoring.md
- .claude/skills/create-issue/tests/test_deletion_vc_guidance_exit_semantics.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
baseline_vc_preflight.py/ review-issue checker の論理変更が置換形の実行・分類に不可避と判明した場合(その場合は実装を止めて別 Issue へ分離する)- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 動作検証 AC の VC が SKIP(exit 77)または tool 不在による FAIL を返した場合(実行環境不可のためエスカレーション。tool 不在を PASS にしない)
- fallback 経由でのみ「成功」する場合(classifier の mock / fake を含む。FAIL として扱い、実行環境を確認)
Required Skills
なし
Required Design References
- docs/dev/agent-skill-boundaries.md
- docs/dev/workflow.md
Delivery Rule
1 Issue = 1 PR、専用 worktree、Draft PR 既定。- dependency / 親子関係は設定しない。
Scope Delta(任意)
N/A
Metadata
Metadata
Assignees
Labels
triage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Oct 5, 2026
レビュー結果
判定: REQUEST_CHANGES 相当。実装着手前に #2943 を再 refinement した方がよいです。
発端の defect 自体は実在します。current main
6b59f108fe8905728f392462c8c3bc4f273906b2でも、create-issue/SKILL.mdは削除確認をrg -c "削除対象" <file>の count 0 と規定body-authoring.mdも「0 件なら exit 1」と書きながら同じrg -cを例示しており、#2939 で観測された baseline false-pass / post-fix false-fail の root cause は妥当です。ripgrep 自体も通常は no-match を exit 1 とするので、この原因分析は upstream semantics と一致します。GitHub
一方、#2943 が現在指定している置換形
! rg -qは、この repository の VC verifier の実 semantics と整合していません。ここが blocker です。Findings
[P1 / Blocker]
! rg -qでは AC1 の「baseline expected_fail → 修正後 pass」を実証できません。current
baseline_vc_preflight.pyでは_is_negated_search_command()が! rg/! grepを特別扱いし、classify_result()の先頭付近で実行結果を見ずにexpected_fail / expected_baseline_fail / goと静的分類します。さらに main execution path も negated search を検出すると
exit_code=Noneとして コマンドを実行しません。既存 test にもtest_negated_rg_is_not_runがあり、この挙動は偶然ではなく現在の contract です。Bash 上では
!が command status を反転するので! rg -q自体は shell として正しいです。GNU しかし repository verifier はshell=False前提で、! rgを shell 実行せず静的 shortcut にしています。つまり shell-correct だが repository-verification-correct ではありません。その結果、実装: 削除確認 VC の authoring guidance が rg -c を成功条件 0 件の形で規定しており、no-match の exit 1 で成否が逆転するため guidance を exit 0 成功の negative assertion へ是正する #2943 の
test_replacement_negative_assertion_classified_expected_fail_then_passは現在の Allowed Paths のままでは仕様どおり実装不能です。literal が存在しても消えても! rgは同じexpected_failになります。無理に通すと、classifier を mock/fake して false-green にするか、Out of Scope のbaseline_vc_preflight.pyを変更する必要が生じます。最小修正: canonical replacement を
! rg -qではなく、plainrgの absence mode に変えるのが最も狭いです。upstream でも
--files-without-matchは「0 match のファイルだけを返す」ための first-class option です。GitHub repository 側も 実装: VC preflight の rg path operand 抽出が長形式の真偽 flag を PATH と誤認し VCP_BROAD_SEARCH_PATH_UN を誤発する欠陥を是正する #2900 / PR fix: VC preflight の rg path 抽出が長形式 boolean flag を PATH と誤認する欠陥を是正する #2904 で--files-without-matchと--fixed-stringsを_rg_extract_path_operands()の boolean flag として既に対応済みです。追加 checker や wrapper は不要です。これなら単一ファイルについて、
expected_failrgとして current-pass certification →expected_pass_resolved_on_current_headという 実装: 削除確認 VC の authoring guidance が rg -c を成功条件 0 件の形で規定しており、no-match の exit 1 で成否が逆転するため guidance を exit 0 成功の negative assertion へ是正する #2943 が本来求める遷移を実測できます。
[P1] 提案 guidance を
! rgのまま採用すると、再発防止 Issue 自体が別の false-green mechanism を正本化します。実装: 削除確認 VC の authoring guidance が rg -c を成功条件 0 件の形で規定しており、no-match の exit 1 で成否が逆転するため guidance を exit 0 成功の negative assertion へ是正する #2943 の Outcome は単に documentation を見栄えよく直すことではなく、「create-issue が今後生成する VC を正しくする」ことです。ところが current preflight は negated search の対象 literal・path・実結果を一切観測せず
expected_fail/goにします。したがって
! rg -qを canonical guidance にすると、baseline では都合よく green になる一方、absence assertion が実際に働くことを canonical producer が証明しない形を標準化します。これは今回直そうとしている「VC の表示上の意味と実 verifier semantics の乖離」と同じ failure class の別形です。checker を
!実行対応へ拡張するより、すでに repo が parser/certifier 対応済みの plainrg --files-without-matchを利用する方が、個人開発の速度と保守性の両方で有利です。なお
-q --files-without-matchは避けるべきです。ripgrep 14.1.0 では両 flag の組み合わせで status が逆転する既知 bug #3108 があり、その後 upstream で修正されています。GitHub repo CI は ripgrep を OS package から入れており、ここでバージョン依存を増やす理由はありません。--files-without-match単独 +--fixed-stringsが堅いです。[P2] 新規 regression test の「両文書から fenced command を抽出」という contract が現実の文書構造と一致していません。
body-authoring.mdの削除例は fenced bash block ですが、SKILL.mdの削除確認は inline code です。実装: 削除確認 VC の authoring guidance が rg -c を成功条件 0 件の形で規定しており、no-match の exit 1 で成否が逆転するため guidance を exit 0 成功の negative assertion へ是正する #2943 In Scope はtest_guidance_has_no_zero_count_rg_c_deletion_exampleについて「上記2文書から削除確認パターンの fenced コマンドを抽出」と指定しています。このままだと実装者は、SKILL.md を test 対象から実質外すか、test のためだけに SKILL.md の formatting を変更することになります。AC3 が別途 SKILL.md を grep しているので即時 false-green にはなりにくいものの、test contract が曖昧です。
最小修正: 「各文書の削除確認 section を抽出し、その section 内の inline/fenced command tokens を検査する」とするか、SKILL.md は AC3、body-authoring.md の executable example は focused test、と責務を明示的に分けるべきです。
[P2] AC3/AC4 は
rg -cだけを禁止しており、同じ defect のrg --countを通します。現在の VC:
は exact-ish な表記しか検出しません。たとえば
を「0 が成功」と説明すれば同じ bug が再導入されても AC3/AC4 は通ります。
focused pytest を authority にするなら、command を token 化して deletion/absence example 内の
-cまたは--countを拒否し、AC3/AC4 は単なる anchor check と位置づけるのが妥当です。全文 regex を複雑化する必要はありません。推奨する contract delta
#2943 の scope を広げず、次の変更だけで整合します。
特に
--files-without-matchは複数ファイルを一度に渡すと「少なくとも一つのファイルに literal がない」だけでも exit 0 になり得るため、削除確認 guidance は単一<file>に限定した方がよいです。これは既存の「marker 単位の独立確認」とも整合します。関連 ownership の評価
#46 は「削除対象 literal inventory」、#397 はその review warning の robustness、#2900 は
rglong boolean flag の path operand parsing で、#2943 と同一 root cause ではありません。dedupe 判断は妥当です。特に #2900 / PR #2904 の成果はむしろ今回の最小解を可能にする既存資産なので、checker を新設・変更するより再利用すべきです。#2943 には現時点で linked PR も Issue comment もなく、main の
306086d8 → 6b59f108の差分も今回の Allowed Paths には触れていません。したがって、今が Issue contract を直す最も安いタイミングです。結論として、問題設定は正しいが、解決策
## レビュー結果! rg -qが repository verifier の SSOT と衝突しています。rg --files-without-match --fixed-stringsに置き換えて AC1 を real baseline/current-head classification に合わせれば、harness の追加改修なしで狙った再発防止を達成できます。判定: REQUEST_CHANGES 相当。実装着手前に #2943 を再 refinement した方がよいです。
発端の defect 自体は実在します。current main
6b59f108fe8905728f392462c8c3bc4f273906b2でも、create-issue/SKILL.mdは削除確認をrg -c "削除対象" <file>の count 0 と規定body-authoring.mdも「0 件なら exit 1」と書きながら同じrg -cを例示しており、#2939 で観測された baseline false-pass / post-fix false-fail の root cause は妥当です。ripgrep 自体も通常は no-match を exit 1 とするので、この原因分析は upstream semantics と一致します。[GitHub](https://github.com/BurntSushi/ripgrep/discussions/2976?utm_source=chatgpt.com)
一方、#2943 が現在指定している置換形
! rg -qは、この repository の VC verifier の実 semantics と整合していません。ここが blocker です。Findings
[P1 / Blocker]
! rg -qでは AC1 の「baseline expected_fail → 修正後 pass」を実証できません。current
baseline_vc_preflight.pyでは_is_negated_search_command()が! rg/! grepを特別扱いし、classify_result()の先頭付近で実行結果を見ずにexpected_fail / expected_baseline_fail / goと静的分類します。さらに main execution path も negated search を検出すると
exit_code=Noneとして コマンドを実行しません。既存 test にもtest_negated_rg_is_not_runがあり、この挙動は偶然ではなく現在の contract です。Bash 上では
!が command status を反転するので! rg -q自体は shell として正しいです。[GNU](https://www.gnu.org/software/bash/manual/html_node/Pipelines.html?utm_source=chatgpt.com) しかし repository verifier はshell=False前提で、! rgを shell 実行せず静的 shortcut にしています。つまり shell-correct だが repository-verification-correct ではありません。その結果、実装: 削除確認 VC の authoring guidance が rg -c を成功条件 0 件の形で規定しており、no-match の exit 1 で成否が逆転するため guidance を exit 0 成功の negative assertion へ是正する #2943 の
test_replacement_negative_assertion_classified_expected_fail_then_passは現在の Allowed Paths のままでは仕様どおり実装不能です。literal が存在しても消えても! rgは同じexpected_failになります。無理に通すと、classifier を mock/fake して false-green にするか、Out of Scope のbaseline_vc_preflight.pyを変更する必要が生じます。最小修正: canonical replacement を
! rg -qではなく、plainrgの absence mode に変えるのが最も狭いです。upstream でも
--files-without-matchは「0 match のファイルだけを返す」ための first-class option です。[GitHub](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md?utm_source=chatgpt.com) repository 側も 実装: VC preflight の rg path operand 抽出が長形式の真偽 flag を PATH と誤認し VCP_BROAD_SEARCH_PATH_UN を誤発する欠陥を是正する #2900 / PR fix: VC preflight の rg path 抽出が長形式 boolean flag を PATH と誤認する欠陥を是正する #2904 で--files-without-matchと--fixed-stringsを_rg_extract_path_operands()の boolean flag として既に対応済みです。追加 checker や wrapper は不要です。これなら単一ファイルについて、
expected_failrgとして current-pass certification →expected_pass_resolved_on_current_headという 実装: 削除確認 VC の authoring guidance が rg -c を成功条件 0 件の形で規定しており、no-match の exit 1 で成否が逆転するため guidance を exit 0 成功の negative assertion へ是正する #2943 が本来求める遷移を実測できます。
[P1] 提案 guidance を
! rgのまま採用すると、再発防止 Issue 自体が別の false-green mechanism を正本化します。実装: 削除確認 VC の authoring guidance が rg -c を成功条件 0 件の形で規定しており、no-match の exit 1 で成否が逆転するため guidance を exit 0 成功の negative assertion へ是正する #2943 の Outcome は単に documentation を見栄えよく直すことではなく、「create-issue が今後生成する VC を正しくする」ことです。ところが current preflight は negated search の対象 literal・path・実結果を一切観測せず
expected_fail/goにします。したがって
! rg -qを canonical guidance にすると、baseline では都合よく green になる一方、absence assertion が実際に働くことを canonical producer が証明しない形を標準化します。これは今回直そうとしている「VC の表示上の意味と実 verifier semantics の乖離」と同じ failure class の別形です。checker を
!実行対応へ拡張するより、すでに repo が parser/certifier 対応済みの plainrg --files-without-matchを利用する方が、個人開発の速度と保守性の両方で有利です。なお
-q --files-without-matchは避けるべきです。ripgrep 14.1.0 では両 flag の組み合わせで status が逆転する既知 bug #3108 があり、その後 upstream で修正されています。[GitHub](https://github.com/BurntSushi/ripgrep/issues/3108?utm_source=chatgpt.com) repo CI は ripgrep を OS package から入れており、ここでバージョン依存を増やす理由はありません。--files-without-match単独 +--fixed-stringsが堅いです。[P2] 新規 regression test の「両文書から fenced command を抽出」という contract が現実の文書構造と一致していません。
body-authoring.mdの削除例は fenced bash block ですが、SKILL.mdの削除確認は inline code です。実装: 削除確認 VC の authoring guidance が rg -c を成功条件 0 件の形で規定しており、no-match の exit 1 で成否が逆転するため guidance を exit 0 成功の negative assertion へ是正する #2943 In Scope はtest_guidance_has_no_zero_count_rg_c_deletion_exampleについて「上記2文書から削除確認パターンの fenced コマンドを抽出」と指定しています。このままだと実装者は、SKILL.md を test 対象から実質外すか、test のためだけに SKILL.md の formatting を変更することになります。AC3 が別途 SKILL.md を grep しているので即時 false-green にはなりにくいものの、test contract が曖昧です。
最小修正: 「各文書の削除確認 section を抽出し、その section 内の inline/fenced command tokens を検査する」とするか、SKILL.md は AC3、body-authoring.md の executable example は focused test、と責務を明示的に分けるべきです。
[P2] AC3/AC4 は
rg -cだけを禁止しており、同じ defect のrg --countを通します。現在の VC:
は exact-ish な表記しか検出しません。たとえば
を「0 が成功」と説明すれば同じ bug が再導入されても AC3/AC4 は通ります。
focused pytest を authority にするなら、command を token 化して deletion/absence example 内の
-cまたは--countを拒否し、AC3/AC4 は単なる anchor check と位置づけるのが妥当です。全文 regex を複雑化する必要はありません。推奨する contract delta
#2943 の scope を広げず、次の変更だけで整合します。
! rg -q "<literal>" <file>rg --files-without-match --fixed-strings "<literal>" <file>! rgが baseline expected_fail / post-fix passrgを real preflight で baselineexpected_fail/ current-headexpected_pass_resolved_on_current_head! rg -qが存在--files-without-match+ fixed-string form が存在rg -cのみ禁止-c/--countの zero-count-success form を禁止特に
--files-without-matchは複数ファイルを一度に渡すと「少なくとも一つのファイルに literal がない」だけでも exit 0 になり得るため、削除確認 guidance は単一<file>に限定した方がよいです。これは既存の「marker 単位の独立確認」とも整合します。関連 ownership の評価
#46 は「削除対象 literal inventory」、#397 はその review warning の robustness、#2900 は
rglong boolean flag の path operand parsing で、#2943 と同一 root cause ではありません。dedupe 判断は妥当です。特に #2900 / PR #2904 の成果はむしろ今回の最小解を可能にする既存資産なので、checker を新設・変更するより再利用すべきです。#2943 には現時点で linked PR も Issue comment もなく、main の
306086d8 → 6b59f108の差分も今回の Allowed Paths には触れていません。したがって、今が Issue contract を直す最も安いタイミングです。結論として、問題設定は正しいが、解決策
! rg -qが repository verifier の SSOT と衝突しています。rg --files-without-match --fixed-stringsに置き換えて AC1 を real baseline/current-head classification に合わせれば、harness の追加改修なしで狙った再発防止を達成できます。squne121 commentedon Oct 5, 2026
推奨アクションは #2943 を実装へ進めず、対象コメントを trusted human context として再 refinement です。current main は確認時点で
9a0f24aeac58a864bb538787bea9f67fdd00f83f。repo 実装上も! rgは非実行の特別扱いで、--files-without-match/--fixed-stringsは既存 parser が対応しています。upstream でも--files-without-matchは zero-match file 用の first-class option で、-q併用には ripgrep 14.1.0 の既知 bug があり、その後修正されています。したがって version 差を持ち込まず--files-without-match --fixed-stringsを単独利用する方向が妥当です。[GitHub](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md?utm_source=chatgpt.com)以下を、既に auto mode で起動中の対話的 Claude Code セッションにそのまま貼り付けてください。
repo=
squne121/loop-protocol対象:
.claude/skills/issue-refinement-loop/SKILL.mdこの既存の interactive Claude Code / auto mode セッションをそのまま継続してください。新しい Claude Code セッションを起動し直さないでください。
目的は #2943 の再 refinement を current repository contract に従って完了させることです。実装には着手しません。対象レビューコメントは REQUEST_CHANGES 相当の trusted human context として扱い、指摘を要約するだけで終わらず、必要な Issue contract 修正を実際に #2943 へ反映し、canonical review が approve になるところまで bounded loop を実行してください。
この指示により、issue-refinement-loop の通常の refinement 作業について、iteration ごとの人間承認は不要です。current Skill が許可する範囲で、read-only investigation、Web research、SubAgent dispatch、controlled Issue body/comment mutation、label hygiene、deterministic repair、review/rewrite iteration、fresh readback、fresh review、dedupe 検索、および必要と判断された再発防止 follow-up Issue の起票を明示的に承認します。
ただし、この承認は Claude Code の permission bypass を意味しません。
bypassPermissions、--dangerously-skip-permissions、permission mode の変更、force push、merge、secret/credential 操作、破壊的 cleanup は要求・実行しないでください。repository contract が genuinehuman_judgment_required、operator intervention、environment/integrity failure 等を terminal stop と定義している場合は、それを捏造して回避しないでください。最初に必ず live state を fresh 取得してください。過去の SHA やこの prompt 内の観測値を current fact として固定しないでください。
origin/main、実装: 削除確認 VC の authoring guidance が rg -c を成功条件 0 件の形で規定しており、no-match の exit 1 で成否が逆転するため guidance を exit 0 成功の negative assertion へ是正する #2943 の最新 body、全 comments、対象 anchor comment、関連 Issue / PR、open PR、必要な repository assets を取得する。.claude/skills/issue-refinement-loop/SKILL.mdを読み、planner・references・termination policy・follow-up materialization 等、今回必要と指示された reference を current HEAD から読む。.claude/agents/*.mdを読む。少なくとも planner が要求する場合のcodebase-investigator、web-researcher、rewrite が必要な場合のissue-editor、follow-up 起票時のissue-creatorの現在の契約・tool 制約を確認する。/<name>表記を built-in command と仮定しない。repository Agent Skill / SubAgent / slash invocation / built-in command を混同せず、current Claude Code harness semantics に従う。対象 anchor は direct human context として扱い、current Skill が規定する canonical
preflight.run.with_human_contextlane を使用してください。root/main thread が canonical preflight を所有し、isolation SubAgent に canonical executor を直接実行させないでください。LOOP_PLANNED_OPERATIONS_JSON等の exact invocation details は current command registry / SKILL.md を authority とし、この prompt の prose で再実装しないでください。preflight が trusted contract update / deterministic repair /
issue_editor_required等を返した場合は、current canonical consumer route にそのまま従ってください。rawgh issue editなどで shortcut せず、current controlled mutation path を利用してください。今回、必ず fact-check する核心
対象レビューコメントの以下の主張を current main で再検証してください。
.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.pyの_is_negated_search_command()が! rg/! grepを特別扱いしていること。.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.pyのtest_negated_rg_is_not_runがその挙動を contract として固定していること。_rg_extract_path_operands()系が--files-without-match、--fixed-stringsを boolean flag として既に認識していること。rg -cを示しているか。過去確認時には main 上でこれらが成立していたが、必ず current HEAD で再確認してください。
SubAgent
REFINEMENT_LOOP_PLAN_V1が investigation を要求する場合、codebase-investigatorを使ってください。external claim / upstream semantics の検証を planner が要求する場合、
web-researcherを使ってください。今回の ripgrep semantics は Issue contract の解決策に直接影響するため、必要なら公式 ripgrep repository / docs / release notes / upstream Issue を一次資料として確認してください。特に以下を確認対象にしてください。
--files-without-matchの intended semantics-q/--quietと--files-without-matchの組み合わせに存在した upstream bug #3108 と、current upstream での修正状態-qを組み合わせない形が最小で堅いかStep 1 と Step 1b がともに required なら current Skill が許す範囲で並列 dispatch してよいですが、両 SubAgent の terminal completion と final structured result を取得するまで Step 2 へ進まないでください。dispatch しただけで完了扱いしてはいけません。
SubAgent には親会話の暗黙 context に依存させず、task / target / authority / constraints / evidence requirements / expected output を明記してください。
target contract delta の有力候補
以下は target review の修正要求であり、current evidence で再検証してから Issue body に反映してください。repository authority と矛盾した場合は current authority を優先し、その理由を記録してください。
canonical deletion/absence VC の有力な置換形:
原則:
! rg -qを canonical replacement にしない。-q --files-without-matchの組み合わせも避ける。rg -cだけでなくrg --countの同型も禁止する。rg -c/--count自体を全面禁止するのではなく、存在確認・positive count 等、その exit semantics と成功条件が整合する用途とは区別する。#2943 の AC / Outcome / In Scope / VC / regression test contract は、この semantics に一貫して合わせてください。
特に AC1 は、置換形を real
baseline_vc_preflightclassification path に通し、という状態遷移を本当に観測する contract にしてください。
classification enum 名はレビューコメントの古い文字列を無条件にコピーせず、current implementation が返す exact value を確認して採用してください。mock / fake classifier や hand-written imitation による false-green は禁止です。
regression test の extraction contract も現実の文書構造に合わせてください。現在
create-issue/SKILL.mdの削除確認 guidance は inline code、references/body-authoring.mdは fenced example なので、「両方から fenced command を抽出」という不可能/曖昧な requirement を残さないでください。推奨は、
-c/--countを拒否--files-without-match --fixed-stringssingle-file form が存在することを検証という形です。より単純で current checker と整合する同等案が repository evidence から得られれば、それを採用して構いません。
既存
baseline_vc_preflight.py/ review checker のロジック変更は、current evidence がそれを不可避と証明しない限り #2943 に取り込まないでください。今回のレビューの狙いは checker/harness を増やすことではなく、既存 verifier が正しく実行・分類できる VC form を guidance に採用することです。Review / rewrite loop
current
issue-refinement-loopの Step 2 canonical root review pipeline を使用してください。旧issue-reviewerrelay や廃止済み Step 2a 等を復活させないでください。canonical review が needs-fix / request_changes を返した場合は、人間承認を求めず current loop policy の上限まで Step 4 rewrite を継続してください。
issue-editorを使う場合、その SubAgent 自身は nested Agent を持てないため、root/main thread が orchestration owner です。各 rewrite 後に必ず:
を current Skill の順序で完了させてください。
stale evidence や rewrite 前の review result を再利用して approve を主張しないでください。
通常の needs-fix、既知の deterministic repair、body の修正で解消可能な
command_not_allowed等は停止理由にしません。canonical max iteration / rewrite router / no-progress 判定は prose で再実装せず、current deterministic router の結果に従ってください。再発防止 follow-up Issue
調査中に #2943 の scope 外だが、同じ failure class が再発しそうで別 ownership として残す価値がある具体的 defect を発見した場合は、終了報告だけで済ませず GitHub Issue として起票してください。
ただし:
FOLLOW_UP_ISSUE_REQUEST_V1.dedupe_keyベースで dedupe する。issue-creator→create-issuecontrolled transaction route を使う。rawgh issue createshortcut は使わない。issue-creatorの terminalISSUE_AUTHOR_RESULT_COMPACT_V1を取得・確認してから先へ進む。ユーザーは、この条件を満たす再発防止 Issue の起票をこの invocation で明示的に承認しています。
終了条件
#2943 が current Skill 上
approvedに到達するまで refinement を進めてください。ただし今回は refinement のみです。approved になっても
impl-review-loopを起動せず、implementation worker、実装 worktree、commit、push、PR 作成へ移行しないでください。current #2740 boundary を守ってください。approved 時は current termination contract に従って必要な終了コメント /
LOOP_HANDOFF_RESULT_V1を発行し、そこで停止してください。canonical
human_judgment_required、operator intervention、environment/integrity failure、max iteration/no-progress 等で停止した場合は、成功扱いせず、exact reason / blocker / fresh evidence / 次に必要な人間判断を終了報告に明示してください。最後に main thread から次を簡潔に報告してください。
「調査した」「提案した」だけで終了せず、repository-native
issue-refinement-loopの terminal state まで実行してください。この prompt は、レビュー指摘をそのまま強制するのではなく、current main で再検証したうえで #2943 本文を実際に修正するようにしています。特に
! rgを shell semantics だけで正当化して verifier semantics を見落とす再発を防ぐ構成です。squne121 commentedon Oct 5, 2026
issue-refinement-loop 終了報告: #2943 は approved(refinement のみ・実装未着手)
trusted human context(https://github.com/squne121/loop-protocol/issues/2943#issuecomment-5993884964)の REQUEST_CHANGES 相当の指摘を current main(9a0f24ae)で再検証し、#2943 の contract を修正しました。実装・commit・push・PR 作成・
impl-review-loopの起動は行っていません。再検証した事実
baseline_vc_preflight.pyは! rg/! grepを静的分類し実行しない(exit_code: None、literal の有無によらずexpected_fail)。test_negated_rg_is_not_runがその挙動を固定している。指摘どおり。rg --files-without-match --fixed-strings "<literal>" <file>は real CLI(temp git repo fixture)で、baseline の literal あり →expected_fail/expected_baseline_fail(exit 1)、current-head の literal なし →expected_pass/expected_pass_resolved_on_current_head(exit 0)に分類された。-q --files-without-matchは upstream bug #3108(15.0.0 で修正)。--files-without-match/--fixed-stringsは 実装: VC preflight の rg path operand 抽出が長形式の真偽 flag を PATH と誤認し VCP_BROAD_SEARCH_PATH_UN を誤発する欠陥を是正する #2900 / PR fix: VC preflight の rg path 抽出が長形式 boolean flag を PATH と誤認する欠陥を是正する #2904 で既に boolean flag として認識済み。checker / baseline_vc_preflight の論理変更は不要。contract delta
! rg -qからrg --files-without-match --fixed-strings "<literal>" <file>(1 command = 1 concrete file、-q非併用)へ変更。baseline_vc_preflight分類 path で baselineexpected_fail、current-headexpected_pass_resolved_on_current_headを観測する契約へ変更(mock / fake classifier は FAIL)。SKILL.mdは inline code、body-authoring.mdは fenced block)。-c/--countの zero-count 成功形、-q、!否定検索を section 内で拒否。他箇所の正の件数確認rg -cは対象外。SKILL.md側の canonical 形を AC6 に分離)。AC3〜AC6 の VC は自身も置換形を使う。Stop Conditions に「checker 論理変更が不可避と判明した場合は別 Issue へ分離」を追加。証跡
baseline_vc_preflight.pyに対して実行。39f8f4a51db3287c3b98f2b84cbb030cd0e3c4e14213cc682e01e7358daaad09)。STATUS: pass/NEXT_ACTION: proceed。status: ok/verdict: approve/next_action: proceed(canonical_step2_route: step_2_5)。semantic_review_applicable: false(全 signal が false)のため skip。--mode execute):status: go、body_sha256 は live body と一致。VC preflight は expected_fail 6 件・expected_pass(regression_gate)1 件・unexpected_pass 0 件・blocked 0 件。go コメントは投稿していない(ローカル観測のみ)。FOLLOW_UP_MATERIALIZATION_RESULT_V1は空)。scope 外に同じ failure class の具体的 defect を.claude/docs/.githubで見つけられなかった。approvedは実装開始の代替承認ではありません。実装は、実装を明示的に依頼した invocation でimpl-review-loopが自身のエントリゲートを通して開始します。squne121 commentedon Oct 5, 2026
推奨アクションは 再 refinement ではなく、#2943 を current
impl-review-loopで実装開始し、Draft PR を人間が merge 判断できる直前まで仕上げる です。live GitHub では #2943 は OPEN、refinement 後の契約が反映済みで、最新終了コメントは refinement approved / implementation 未着手です。確認時点のmainは9a0f24aeac58a864bb538787bea9f67fdd00f83fで、#2943 を exact scope とする既存 PR は見つかりませんでした。ただし実行時には必ず再取得させます。添付 transcript でも同じ terminal state と「実装には明示依頼が必要」が確認できます。貼り付けたテキスト(1)current
impl-review-loopは root-owned synchronous entry を要求し、implementation-worker → test-runner → pr-reviewer → control-plane judgmentを正規経路としています。また Step 5 には follow-up Issue の dedupe /issue-creatormaterialization 経路があります。以下を、そのまま既に起動済みの fresh interactive Claude Code / auto mode に貼り付けてください。repo=
squne121/loop-protocol対象:
.claude/skills/impl-review-loop/SKILL.mdこの 既に auto mode で起動している fresh interactive Claude Code セッションをそのまま継続してください。新しい Claude Code session を起動し直さないでください。
目的は、Issue #2943 を current repository contract に従って実装し、検証・PR review・必要な修正反復まで完了させ、人間が merge 判断できる直前の状態まで持っていくことです。
#2943 は refinement 済みです。過去の refinement approval comment は Step 1 の authorization token ではありません。この invocation における私の明示的な実装依頼を起点として、current
impl-review-loop自身の Root-Owned Synchronous Entry Transition を fresh に通してください。この invocation では、current repository workflow が許す通常の implementation / verification / review / repair 操作について、iteration ごとの人間承認は不要です。以下を明示的に承認します。
git fetch等の非破壊的な freshness 更新impl-review-loopとその normative references / step docs の読取り.claude/agents/*.mdの必要な契約確認ただし、この承認は permission bypass ではありません。
bypassPermissions、--dangerously-skip-permissions、permission mode の変更を要求しないでください。merge / auto-merge、force push、履歴破壊、secret/credential の取得・変更・公開、他 task の branch/worktree の変更・削除、不可逆 cleanup は行わないでください。PR は merge しないでください。Issue #2943 も手動 close しないでください。最終到達点は、人間が merge 判断できる直前です。
0. 最初に current authority を fresh 取得する
過去の SHA、添付 transcript、この prompt 内の観測値を current fact として固定しないでください。
canonical main root から少なくとも以下を fresh に取得してください。
origin/main/ default branch HEAD#issuecomment-5994148343.claude/skills/impl-review-loop/SKILL.mdimpl-review-loop/steps/の今回必要な normative docs.claude/agents/implementation-worker.md.claude/agents/test-runner.md.claude/agents/pr-reviewer.md.claude/agents/issue-creator.mdとcreate-issuecontractdocs/dev/workflow.md、docs/dev/agent-skill-boundaries.mdその他 current Skill が MUST READ とする SSOT/<name>表記、Agent Skill、SubAgent、built-in command、slash invocation を混同しないでください。currentSKILL.md/ agent frontmatter / references を authority にしてください。1. Root-Owned Synchronous Entry Transition を正規に通す
Step 1 worker を直接 shortcut 起動しないでください。
current
impl-review-loopの preparation contract に従い、root/main thread が current invocation 内で capability/live-state check → current-run issue-contract review → fresh re-fetch → routing → Step 1 dispatch を一続きで実行してください。LOOP_HANDOFF_RESULT_V1、過去 comment、artifact、digest、古い contract snapshot 等を Step 1 authorization として扱わないでください。current
root_entry_router.py/run_root_transition()が authority です。exact command や payload schema は current repository implementation から取得し、この prompt の prose で再実装しないでください。pre-Step-1 の landing disposition も必ず current producer で評価してください。
既存 PR / branch / worktree が見つかった場合は原則再利用し、duplicate PR を作らないでください。
確認時点では #2943 exact-scope の PR は見つかっていませんが、実行時に必ず fresh discovery してください。
2. #2943 の実装 scope を厳守する
live Issue body の Outcome / In Scope / Acceptance Criteria / Verification Commands / Allowed Paths / Stop Conditions が実装 authority です。
現在 refinement 済み contract の中心は次です。ただし live body と食い違えば live body を優先してください。
canonical deletion/absence guidance:
要求 semantics:
rg-q/--quietを併用しないrg -c/rg --countを使わない! rg/! grepを使わないrg -cまで一括禁止・変更しないbaseline_vc_preflight.py/ review checker の logic は変更しないAllowed Paths は live Issue body を正本にしてください。refinement 時点では次の 3 件だけです。
Allowed Paths 外の変更を安易に行わないでください。
特に
baseline_vc_preflight.pyを「test を通すため」に変更したり、classifier mock/fake/hand-written imitation へ逃げたりしないでください。3. Implementation worker
current
implementation-workerSubAgent と currentimplement-issueSkill を使ってください。SubAgent に親会話の暗黙 context を期待せず、少なくとも以下を明示して dispatch してください。
rg -cは変更対象外」baseline_vc_preflight.pysubprocess を観測することimplementation-worker を dispatch しただけで完了扱いにしないでください。
terminal completion と final structured result を取得・検査し、worktree / branch / commit / PR の live readback を確認してから Step 2 へ進んでください。
4. AC1 / focused regression test は false-green を許さない
特に AC1 は実装品質の核心です。
新規 focused test は、guidance の canonical command を実際に抽出し、temp git repo fixture 上で repository の real
baseline_vc_preflight.pyを subprocess として呼び出して分類を観測してください。期待値は live Issue contract を authority にしますが、refinement 時点では:
baseline fixture:
expected_failexpected_baseline_failcurrent-head fixture:
expected_passexpected_pass_resolved_on_current_headです。
mock、monkeypatch による classifier の偽装、hand-written classifier、分類値の直書き比較だけで PASS にする test は不可です。
旧
rg -cの成否逆転も contract が要求する範囲で real runner により対照確認してください。5. Step 2 Verification
implementation-worker 自身の「test passed」自己申告だけを authority にしないでください。
current
impl-review-loopStep 2 と currenttest-runnercontract に従い、Issue の Verification Commands を fresh PR HEAD に対して実行してください。test-runner を dispatch する場合:
(ac, raw_command, command_hash)binding等を current schema どおり渡してください。
SubAgent の terminal completion を必ず待ってください。
SKIP は PASS ではありません。fallback 経由だけの成功も PASS としないでください。
Issue #2943 の runtime verification AC が SKIP / environment unavailable なら、Issue contract の Stop Condition に従って成功扱いせず報告してください。
Step 2 の current-head VC adjudication / binding を current canonical script で生成し、Step 4 が要求する gate を満たしてください。prose で adjudication semantics を再実装しないでください。
6. PR review
Step 2 gate を通過してから current
pr-reviewerSubAgent /pr-review-judgeSkill で fresh PR review を行ってください。pr-reviewer には少なくとも:
を明示してください。
pr-reviewer の dispatch だけで完了扱いにせず、terminal completion と final verdict result を取得してください。
reviewer の
verdict / reviewed_head_sha / blockers / warningsを current contract どおり消費し、mergeability は reviewer 自己申告ではなく root/control-plane が GitHub から fresh に取得してください。APPROVE単独で終了しないでください。currentroute_loop_verdict_v2()と Step 5 contract に従ってください。7. REQUEST_CHANGES / CI failure は自動修復する
REQUEST_CHANGES、通常の test failure、修正可能な CI failure、stale reviewed HEAD、BEHIND 等を通常は停止理由にしないでください。current Skill が定義する bounded loop 内で:
review finding
→ fix_delta 構築
→ implementation-worker の current repair mode
→ commit
→ canonical push
→ fresh verification
→ fresh current-head PR review
→ fresh mergeability / CI evaluation
まで自動で進めてください。
古い review result や修正前 SHA の test result を再利用して approve を主張しないでください。
reviewer が
REQUEST_CHANGESを返した場合、blocker を実際に修正してください。「指摘を確認した」「提案した」で終了しないでください。branch update が必要なら raw API / ad-hoc merge/rebase ではなく、current
impl-review-loopが指定するimplementation-worker/ canonicalupdate_branchpath を使ってください。更新後は HEAD が変わるため verification と PR review を fresh にやり直してください。8. CI と merge readiness
PR を作成または更新した後は current required CI/checks を確認してください。
current workflow が required CI の完了待ち・評価を要求する場合は、その canonical evaluator に従ってください。
通常の CI failure が #2943 scope 内で修正可能なら、修正 → push → fresh CI / verification → re-review を続行してください。
BLOCKED/UNSTABLE/DRAFT等を単純に「人間が必要」と解釈せず、currentimpl-review-loopの live CI / branch-protection routing を使用してください。actual Git conflict (
mergeable == CONFLICTING/merge_state_status == DIRTY) は current conflict runbook に従ってください。force push 等で回避しないでください。9. 再発防止 follow-up Issue
実装・test・review 中に、#2943 の Allowed Paths 外で、今回と同型または関連する recurrence mechanism を持つ具体的 defect を発見した場合は、単に final report にメモして終わらせないでください。
ただし、以下を守ってください。
FOLLOW_UP_ISSUE_REQUEST_V1.dedupe_key相当の current canonical key で open + closed Issue を dedupe する。issue-creatorを dispatch し、currentcreate-issuecontrolled transaction を使用する。rawgh issue createshortcut は使わない。issue-creatorの terminal completion とISSUE_AUTHOR_RESULT_COMPACT_V1を取得・確認するまで materialization 完了扱いにしない。この invocation で、上記条件を満たす 再発防止 follow-up Issue の起票を明示的に承認します。
ただし、follow-up が #2943 の current AC 達成に必須の Out-of-Scope change である場合は、#2943 に混ぜず Stop Condition として扱ってください。独立 follow-up であり #2943 が現在の Allowed Paths のまま完了できる場合は、follow-up を起票した上で #2943 の loop を継続してください。
10. 停止境界
次は通常の停止候補です。
baseline_vc_preflight.py/ review checker logic の変更が不可避一方、次だけでは原則停止しないでください。
-修正可能な CI failure
human_review_required: trueを自己申告しただけの場合exact routing は current
impl-review-loopを authority にしてください。11. merge 直前で停止する
終了目標は current
impl-review-loopの approved terminal routeです。以下を fresh に満たしてください。
route_loop_verdict_v2()の approved 条件を満たすその後、
IMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_ready相当の current terminal result を出し、merge は行わず停止してください。auto-merge も有効化しないでください。
12. 最終報告
main/root thread から、最低限次を報告してください。
-実行した Verification Commands と AC1〜AC7 の結果
baseline_vc_preflightclassification evidenceroute_loop_verdict_v2()の final route-残 blocker
SubAgent は dispatch した時点ではなく、terminal completion と final structured result を取得した時点でのみ完了扱いしてください。
調査や提案だけで止まらず、
inspect → root entry → implement → test/verify → PR → adversarial PR review → fix → re-test → fresh re-review → CI/mergeability gate → follow-up materialization → merge直前の terminal result
まで current repository-native
impl-review-loopを完遂してください。この prompt では、#2943 固有の重要点である「checker を変更せず、real
baseline_vc_preflight経路を regression test で踏むこと」と「! rgに戻さないこと」を明示しています。通常のREQUEST_CHANGESや CI failure では止まらず、自動修復して fresh HEAD で再レビューする設定です。squne121 commentedon Oct 5, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
squne121 commentedon Oct 5, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
fix: 削除確認 VC の canonical 形に -- separator を追加し dash 始まり literal を扱えるよう…
squne121 commentedon Oct 5, 2026
Contract Review Result
docs: 削除確認 VC の guidance を exit 0 成功の rg --files-without-match 形へ是正する (…