Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "baseline_vc_preflight の通常実行・canonical VC plan・static-only が同一の shared VC command grammar を消費し、説明用 bash fence 内の非 $ 行を実コマンド候補へ昇格させない"
change_kind: fixParent Issue
none
Parent Goal Ref
- Goal: baseline_vc_preflight の通常実行・canonical VC plan・static-only が同一の shared VC command grammar authority を消費し、説明用の非
$行を実コマンド候補へ昇格させない状態にする - Desired Destination: standalone issue(parent issue なし)のため、本 Issue の Outcome がそのまま到達点
Current Validated Scope
baseline_vc_preflight.pyの command extraction を shared VC parser authority へ統一するvc_contract_syntax.pyへ quote-aware compound detection primitive を追加する- 上記の regression test を追加する
Remaining Parent Gaps
なし
Source
- PR fix: VC section 抽出の authority を prose_boundary_policy.py へ一本化する #2786 OWNER review: fix: VC section 抽出の authority を prose_boundary_policy.py へ一本化する #2786 (comment)
- OWNER 敵対的レビュー(本 Issue への直接コメント、2026-09-26): 実装: baseline_vc_preflight の通常実行を shared VC parser に統一し説明用 bash 行の誤実行候補化を防ぐ #2788 (comment)
- Related closed implementation: fix(agent-ops): Issue VC grammar を vc_contract_syntax に単一化し、C4/C5 と LP010/LP011 の矛盾を解消する #993
- Related research-only section-boundary inventory: 調査: canonical Markdown section extractor の重複実装を棚卸しし parser drift 再発箇所を特定する #2784
- dedupe_key:
baseline-vc-preflight-normal-execution-shared-command-parser-v1
Background
PR #2786 の OWNER review で、Verification Commands 内の bash コードフェンスに含まれる説明用の非 $ 行が実コマンド候補として扱われ得る既存制約が再現された。
現行 .claude/skills/issue-contract-review/scripts/vc_contract_syntax.py::parse_verification_commands_section() は canonical VC grammar として「bash fence 内の command は $ で始まる」ことを要求し、非空・非コメントの non-$ 行を non_dollar_command error として扱う。
一方、.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py では:
--static-onlyは sharedparse_verification_commands_section()を使う- 通常実行は legacy
extract_fenced_bash_blocks()+parse_commands_from_block()を使う compute_canonical_vc_plan()も同じ legacy command extraction を使う- legacy
parse_commands_from_block()は$がない非空・非コメント行も command として取り込む
という authority drift が残っている。
このため、同じ Issue body が static-only では non-canonical と判定される一方、通常実行 / canonical plan では説明行が command / timeout-budget candidate に昇格し得る。
#993 は shared parser を追加し baseline_vc_preflight.py --static-only をそこへ寄せたが、通常実行と canonical plan の command source 統一までは扱っていないため、本 Issue はその残存 gap を bounded に閉じる。
上記の敵対的レビュー(OWNER, 2026-09-26)により、legacy parser を shared parser へ単純置換するだけでは次の既存正常系が壊れることが判明した。(1) vc_contract_syntax.py の _COMPOUND_SHELL_RE は command 全体に正規表現を適用し quote-aware でないため、rg -n "foo|bar" PATH のような quoted regex alternation を誤って compound_shell と判定する(#589 の既存回帰契約に反する)。(2) shared VcCommandEntry は vc-regex-intent と annotation_source(line/raw)provenance を保持しておらず、#589 の literal-pipe-ok annotation と #889 AC11 の result JSON 契約が失われる。(3) grouped AC(ac_refs)から normal execution の scalar ac representation への写像が未定義で、雑な adapter は command 実行回数を変える恐れがある。(4) compute_canonical_vc_plan() の直接 caller(contract_readiness_check.py / run_contract_review_once.py / run_root_review_pipeline.py)は Allowed Paths 外にあり、新しい例外型を導入すると未処理 exception で workflow を落とすリスクがある。(5) _distinct_command_texts_from_body() は docstring で compute_canonical_vc_plan() と同じ command population を宣言しているが、現状は独立に legacy parser を使っており、本 Issue 後もそこだけ legacy のままだと宣言が偽になる。本 Issue の contract は以下でこれらを踏まえて拡張した。
Outcome
baseline_vc_preflight.py の static-only・通常実行・compute_canonical_vc_plan() が同一の canonical VC command grammar authority を消費し、説明用の non-$ 行を subprocess 実行候補または command budget candidate にしない状態にする。
新しい独自 parser は追加せず、既存 vc_contract_syntax.parse_verification_commands_section() / VcParseResult を authority として再利用する。
Runtime Verification Applicability
- decision: not_applicable
- reason: 静的検証のみで完結するため
In Scope
baseline_vc_preflight.py通常実行の command extraction を shared VC parser の command entries に統一するcompute_canonical_vc_plan()の command source を通常実行と同じ shared VC parser authority に統一する- shared parser が返す non-canonical parse errors を、subprocess 起動前に deterministic に blocked / extraction error として扱う
- canonical
$ command、AC marker、grouped AC marker、inline AC suffix、preflight-scope、baseline-expect、vc-roleの既存 shared semantics を維持する - 説明用 non-
$行を含む bash fence と canonical$ commandの regression fixture/test を追加し、static-only / canonical plan / normal execution の3経路が同じ command set / reject semantics を持つことを固定する - legacy parser helper を即時削除するかは、実 consumer が残る場合は別途判断する。ただし本 Issue の3経路が legacy grammar を authority として使い続けないことは必須
vc_contract_syntax.pyの_COMPOUND_SHELL_REベースの compound 判定を、shlex ベースの quote-aware primitive へ委譲する形に統一し、baseline_vc_preflight.detect_compound_command()と同一の判定ロジックを共有する(新しい独立 regex 判定を追加しない)- shared
VcCommandEntryにvc-regex-intentの値、およびannotation_source(line/raw)provenance を追加し、既存 実装: VC コマンドの正規表現メタ文字を shell pipe と誤判定しない検証を追加する #589 / 実装: baseline-expect VC annotation と deterministic repair pass で issue-refinement-loop 反復失敗を防ぐ #889 semantics を losslessly 保持する - grouped AC(
ac_refs)は additive な representation として保持し、既存 scalaracrepresentation との backward-compat を deterministic に定義する。1 source command = 1 canonical plan occurrence = 1 subprocess launch を崩さない _distinct_command_texts_from_body()(history snapshot command population)を、上記で統一した command source と一致させるcompute_canonical_vc_plan()の non-canonical parse-error rejection は、既存 direct caller(contract_readiness_check.py/run_contract_review_once.py/run_root_review_pipeline.py)に未処理 exception を伝播させない設計とする。可能な限り、body を shared parser で一度 parse し、parse error がある場合は plan producer 自体を呼ばない構造を優先し、Allowed Paths の拡張を避ける
Out of Scope
- Markdown level-2 section boundary extraction(実装: 再発防止: issue-contract-review の Verification Commands section 抽出を GFM-aware canonical parser に統一する #2782 / 調査: canonical Markdown section extractor の重複実装を棚卸しし parser drift 再発箇所を特定する #2784)
- canonical parent / delivery-rollup skip 判定統合(contract_readiness_check.py の canonical parent skip 判定を run_contract_review_once.py と共有する #1945)
- 新規 Markdown parser dependency
- VC grammar 自体の新仕様追加
- repo-wide parser 全数統合
- PR fix: VC section 抽出の authority を prose_boundary_policy.py へ一本化する #2786 の merge blocker 化
compute_duplicate_diagnostic_report()の diagnostic 表示ロジック自体の再設計(診断専用表示のため、parser authority 統一の対象外。legacy command population を使い続けるかは実装 PR で明示する)
Acceptance Criteria
- AC1:
baseline_vc_preflight.pyの通常実行がvc_contract_syntax.parse_verification_commands_section()または同じVcParseResult.commandsを source of truth とする薄い shared adapter から runnable command を取得し、legacyparse_commands_from_block()独自 grammar で command set を決めない - AC2:
compute_canonical_vc_plan()が AC1 と同一の command source を使用し、normal execution と command occurrence / budget candidate の集合が drift しない - AC3: bash fence 内の説明用 non-
$行を含む fixture で、static-only / canonical plan / normal execution のいずれもその行を runnable command として扱わず、subprocess 起動前に non-canonical input として一貫して拒否する - AC4: canonical
$ commandfixture では従来どおり command が抽出され、plan count と通常実行対象が一致する - AC5: bare
# ACN、grouped marker、inline AC suffix、preflight-scope、baseline-expect、vc-role、vc-regex-intent: literal-pipe-ok、および result JSON のannotation_source.line/annotation_source.rawprovenance の既存 shared parser semantics を回帰させない - AC6: 同一 body に対する static-only / canonical plan / normal execution の parser authority 一致を pytest で固定する
- AC7:
baseline_vc_preflight.pyに新しい第三の command grammar parser を追加しない - AC8: 既存 baseline VC preflight / VC syntax regression suite が PASS する
- AC9:
rg -n "foo|bar" PATHのような quoted regex alternation を含む VC command が、vc_contract_syntax.py/baseline_vc_preflight.detect_compound_command()のいずれでもcompound_shell/compound_command_disallowedとして誤判定されない(quote-aware primitive への統一により、独立した新しい regex ベース判定を追加しない) - AC10:
rg -n "foo\|bar" PATHは annotation なしの場合regex_literal_pipe_suspectedとして従来どおり扱われ、# vc-regex-intent: literal-pipe-okannotation 付きの場合は shared-parser 統一後の normal execution でも実行可能である - AC11: grouped AC(
# AC2, AC3等)は1つの source command に対して1つの canonical plan occurrence / 1回の subprocess launch のみを生成し、AC association を理由に同じ command を複数回実行しない。ac_refsrepresentation は set の iteration order に依存しない deterministic な形式である - AC12:
_distinct_command_texts_from_body()(history snapshot command population)が、AC1/AC2 で統一した command source と一致する command set を返す - AC13:
compute_canonical_vc_plan()の non-canonical parse-error rejection は、既存 direct caller(contract_readiness_check.py/run_contract_review_once.py/run_root_review_pipeline.py)に未処理 Python exception を伝播させない。Allowed Paths を変更せずに実現できない場合は、その旨と必要な Allowed Paths 拡張を PR で明示する
Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.py -q# AC2
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.py -q# AC3
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.py -q# AC4
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.py -q# AC5
$ uv run --locked pytest .claude/skills/issue-contract-review/tests/ -q# AC6
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.py -q# AC7
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.py -q# AC8
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py -q# AC9
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.py -q# AC10
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.py -q# AC11
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.py -q# AC12
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.py -q# AC13
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.py -qAllowed Paths
.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py.claude/skills/issue-contract-review/scripts/vc_contract_syntax.py.claude/skills/issue-contract-review/scripts/tests/.claude/skills/issue-contract-review/tests/tests/fixtures/issue-body/
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- shared VC parser の canonical grammar 自体を変更する必要がある場合は、既存 fix(agent-ops): Issue VC grammar を vc_contract_syntax に単一化し、C4/C5 と LP010/LP011 の矛盾を解消する #993 contract との整合を再確認して scope を明示する
- section boundary parser の変更が必要になった場合は 調査: canonical Markdown section extractor の重複実装を棚卸しし parser drift 再発箇所を特定する #2784 と重複しないよう分離する
- Allowed Paths 外の production code 変更が必要な場合は別 Issue に分離する
- PR fix: VC section 抽出の authority を prose_boundary_policy.py へ一本化する #2786 の着地を本 Issue の完了待ちにしない
Required Skills
- Python 3
- pytest
- 既存 VC parser(
vc_contract_syntax.py/baseline_vc_preflight.py)の内部構造理解
Required Design References
.claude/skills/issue-contract-review/scripts/vc_contract_syntax.py(既存 shared VC command grammar authority の実体。AC5/AC9-AC13 の preserved semantics 判断根拠)docs/dev/workflow.md(必須検証節。VC 実行契約の repo-wide 位置づけ)
Notes for Reviewer
本 Issue は PR #2786 の non-blocking follow-up。#2786 では OWNER review が推奨した test hygiene の局所改善のみを行い、本 command grammar 問題を同 PR へ混ぜない。
本 Issue 本文は、OWNER の敵対的レビュー(Source 参照)を反映して issue-refinement-loop により更新された。反映内容: (1) quote-aware compound shell 判定の regression 固定(AC9)、(2) vc-regex-intent: literal-pipe-ok semantics の保持(AC5/AC10)、(3) annotation provenance(annotation_source.line/raw)の保持(AC5)、(4) grouped AC の subprocess launch 数不変 invariant(AC11)、(5) history snapshot command population の parity(AC12)、(6) compute_canonical_vc_plan() の parse-error caller-facing contract(AC13)。Allowed Paths は変更していない(AC13 の推奨設計は既存 caller への変更を避ける方向のため)。
Activity
squne121 commentedon Sep 26, 2026
Issue #2788、関連する [PR #2786](https://github.com/squne121/loop-protocol/pull/2786)、その OWNER review、[Issue #993](#993) / [PR #1002](https://github.com/squne121/loop-protocol/pull/1002)、[[#589](https://github.com/squne121/loop-protocol/issues/589)](https://github.com/squne121/loop-protocol/issues/589)、[[#814](https://github.com/squne121/loop-protocol/issues/814)](https://github.com/squne121/loop-protocol/issues/814)、[[#889](https://github.com/squne121/loop-protocol/issues/889)](https://github.com/squne121/loop-protocol/issues/889)、[[#2784](https://github.com/squne121/loop-protocol/issues/2784)](https://github.com/squne121/loop-protocol/issues/2784)、および current
mainの実装・テストを突き合わせました。結論は、#2788 の問題設定自体は正しく、優先して直す価値があります。ただし現在の Issue 契約のまま実装に入るのは危険です。少なくとも2件の blocker と、2件の contract gap を先に明文化すべきです。 特に「legacy parser を shared parser に置換するだけ」は #589 の既存正常系を壊します。
敵対的レビュー
BLOCKER — shared parser 自体が 実装: VC コマンドの正規表現メタ文字を shell pipe と誤判定しない検証を追加する #589 の quoted regex alternation を誤って
compound_shellにします。current
vc_contract_syntax.pyは_COMPOUND_SHELL_RE = re.compile(r"[;&|]|>+|<+")を command 全体へ適用しています。このため、正当な VC である$ rg -n "foo|bar" .claude/にも
|が含まれるだけでcompound_shellparse error が付きます。一方、通常実行側には既に
detect_compound_command()があり、shlex.shlex(..., posix=True, punctuation_chars=True)で quote-aware に判定しています。実際にリポジトリのtest_vc_quality_guards.py/test_vc_regex_pipe_semantics.pyでは「quotedfoo|barは compound ではない」が回帰契約になっています。これは [#589](実装: VC コマンドの正規表現メタ文字を shell pipe と誤判定しない検証を追加する #589) の明示要件です。外部仕様とも一致します。Python の
shlexはpunctuation_chars=Trueで();<>|&を shell-like に token 化する用途を提供しており、現在のdetect_compound_command()の方向が適切です。:chatgpt-content-reference{index="0"} Rustregexの syntax でもx|yは alternation で、escape はメタ文字を literal 化します。:chatgpt-content-reference{index="1"} ripgrep も通常は regex pattern を扱い、-Fで初めて fixed-string に切り替わります。:chatgpt-content-reference{index="2"}修正方針:
vc_contract_syntax.pyに新しい regex ベース判定を増やさず、quote-aware な compound detection primitive を shared 側へ移し、baseline_vc_preflight.detect_compound_command()もそれへ delegate するのが最小です。これなら harness は増えず、むしろ重複が減ります。BLOCKER —
VcCommandEntryにvc-regex-intentがなく、単純移行すると既存 annotation semantics が消えます。legacy
parse_commands_from_block()は各 command についてを返しています。
通常実行では
vc_regex_intent == "literal-pipe-ok"のときregex_literal_pipe_suspectedblock を解除する実処理があります。ところが sharedVcCommandEntryは現在、だけです。実装: baseline_vc_preflight の通常実行を shared VC parser に統一し説明用 bash 行の誤実行候補化を防ぐ #2788 AC5 も bare/grouped/inline AC、
preflight-scope、baseline-expect、vc-roleしか列挙しておらず、[#589](実装: VC コマンドの正規表現メタ文字を shell pipe と誤判定しない検証を追加する #589) の# vc-regex-intent: literal-pipe-ok reason="..."が抜けています。したがって AC5 を満たしたつもりでも、既存の正当な literal-pipe VC が blocked になります。
Issue 本文で
vc-regex-intentを明示的な preserved semantic に追加すべきです。 これは hardening ではなく既存互換性の維持です。MAJOR — grouped AC を shared parser から通常実行へどう写像するか未定義です。
shared parser の
VcCommandEntry.ac_refsは set なので# AC2, AC3は{"AC2", "AC3"}を表現できます。これは [#814](実装: issue-refinement-loop の checker approve が max_rewrite_attempts を超えて human_escalation される問題を修正する #814) / PR fix(agent-ops): Issue VC grammar を vc_contract_syntax に単一化し、C4/C5 と LP010/LP011 の矛盾を解消する #1002 由来の既存契約です。しかし通常実行 result は現在、
という scalar です。
ここで adapter を雑に作ると、「AC2だけ選ぶ」「set の
next(iter(...))で非決定的に選ぶ」「AC2/AC3 の2 jobに展開して同じ command を2回実行する」のいずれかになります。最後の案はcommand_occurrence_countや budget/dedup semantics まで変えます。推奨は、1 source command = 1 plan occurrence = 1 execution を維持することです。その上で result に additive な
ac_refs: ["AC2", "AC3"]を持たせ、旧acは単一 AC なら従来値、grouped の backward-compatible fallback は deterministic に定義します。少なくとも「grouped AC は subprocess 数を増やさない」を AC に入れるべきです。MAJOR —
compute_canonical_vc_plan()の「reject」の API が決まっておらず、Allowed Paths と衝突します。実装: baseline_vc_preflight の通常実行を shared VC parser に統一し説明用 bash 行の誤実行候補化を防ぐ #2788 AC3 は non-canonical input を canonical plan でも reject する方向ですが、現在
compute_canonical_vc_plan()の caller は複数あります。少なくともcontract_readiness_check.py、run_contract_review_once.py、run_root_review_pipeline.pyが直接呼んでいます。現行 callers が明示的に処理しているのは主に timeout/budget 系 typed exception です。新しく例えば
VcParseContractErrorを raise すると、run_root_review_pipeline.pyの exception tuple に入っておらず、run_contract_review_once.pyも Step 5 の plan 計算を直接行っています。つまり「きれいに needs_fix/block する」つもりが Python exception で review workflow 自体を落とす可能性があります。しかもこれら caller は 実装: baseline_vc_preflight の通常実行を shared VC parser に統一し説明用 bash 行の誤実行候補化を防ぐ #2788 の Allowed Paths に含まれていません。
ここは Issue 契約で先に決めるべきです。個人開発として余計な schema/harness を増やさないなら、body → shared parse result を上位で1回取得し、parse error がある body に対してそもそも plan producer を呼ばない構造が扱いやすいです。どうしても plan 自身を total function にしたければ、schema変更ではなく小さい typed exception と全 direct caller の catch 更新が必要なので、その場合は Allowed Paths を広げるべきです。
MAJOR/P2 — 「3経路の authority 統一」だけでは同ファイル内に legacy command-population authority が残ります。
baseline_vc_preflight.pyでは通常実行とcompute_canonical_vc_plan()以外にも、が
extract_fenced_bash_blocks()+parse_commands_from_block()を直接使用しています。特に
_distinct_command_texts_from_body()は history snapshot 用で、docstring 自身が「compute_canonical_vc_plan()と同じ command population」と宣言しています。実装: baseline_vc_preflight の通常実行を shared VC parser に統一し説明用 bash 行の誤実行候補化を防ぐ #2788 後にそこだけ legacy のままだと宣言が偽になります。duplicate diagnostic は status authority ではないので残す選択も可能ですが、history population は同じ shared commands に寄せるべきです。新しい抽象化を何層も作る必要はなく、
VcParseResult.commandsを受け取る小さな helper 1つで十分です。追加で気になる compatibility
shared parser の
line_numberは Verification Commands section 内の行番号ですが、legacy parser のline_numberは bash block 内の行番号です。また legacy はannotation_line_no/annotation_rawを保持し、result JSON のannotation_source.line/rawに出しています。sharedVcCommandEntryはこの provenance を持っていません。[#889](#889) では result JSON の
annotation_source.lineが AC11 として明示されています。そのため、adapter を作る際に値だけ (baseline_expect,vc_role) 保存して provenance を落とすのは回帰です。これは blocker までは上げませんが、AC5 を「annotation value semantics」だけでなく existing result provenance semantics まで含めるよう修正した方がよいです。
外部仕様から見たスコープ判断
ここで一般的な Markdown parser を導入する必要はありません。GFM そのものでは fenced code block は3個以上の backtick/tilde、最大3スペースの indentation、info string などを許容します。:chatgpt-content-reference{index="3"} 一方 LOOP_PROTOCOL の
```bash+$ commandは GFM grammar ではなくプロジェクト固有の実行契約です。したがって [#2784](#2784) のような repo-wide Markdown parser 統合へ広げず、#2788 は VC execution grammar の収束だけに留めるのが妥当です。これは [PR #2786 の OWNER review](#2786 (comment)) の「大きい Markdown parser 問題をこの修正へ持ち込まない」という方向とも整合します。
実行についても、Python は
subprocessに args sequence を渡す方式を一般に推奨し、デフォルトのshell=Falseなら shell meta character が暗黙に shell 解釈されません。:chatgpt-content-reference{index="4"} なので今回、セキュリティ理由でさらに command sandbox/harness を増やす必要はありません。既存のshlex+ argv execution 方針を維持し、parser の semantic drift を減らす方が有用です。Issue #2788 に入れるべき修正
現行 AC を全面的に作り直す必要はありません。最低限、次を追加・修正すれば実装可能な契約になります。
テスト matrix には最低でも
non-$ explanation, canonical$, grouped AC, inline suffix, quotedfoo|bar,foo\|barannotated/unannotated,baseline-expect,preflight-scope, annotation source の各ケースを置くべきです。大きな E2E harness は不要で、shared parser unit test + plan unit test + subprocess launch monkeypatch/counter で「実行されない/1回だけ」を証明すれば十分です。判定
REQUEST_CHANGES 相当です。
#2788 の中心命題――「通常実行と canonical plan が legacy parser を command authority にしているため non-
$説明行を実行候補化する」――は currentmainで再現可能で、修正価値があります。[PR #1002](#1002) が shared parser を導入した後に残った実際の gap です。ただし、現状の契約で実装すると #589 の regex semantics 消失、
vc-regex-intent消失、grouped AC の lossless adapter 不在、canonical-plan caller の例外契約未定義が残ります。特に最初の2点は実装後の正常系破壊につながるため、着手前に Issue 本文へ固定した方がよいです。また、PR #1002 の初回レビューでも shared parser の stricter 化が
edit-issueの既存 autofix を9件壊した実績があります。今回も「parser を統一したから正しい」で終わらせず、既存 semantic consumer の全フィールドを inventory してから置換するのが再発防止として最も効きます。セキュリティ層や新しい harness を追加するより、この consumer parity をテストで固定する方を優先すべきです。squne121 commentedon Sep 27, 2026
推奨は、#2788 をまだ実装へ渡さず、対象 OWNER comment を
operator_asserted_human_contextとしてissue-refinement-loopに投入し、契約を再精緻化してからrefinement_approvedまで回すことです。current
mainを確認すると、対象コメントの主要指摘は実装と一致しています。vc_contract_syntax.pyの shared parser は quote-aware ではない_COMPOUND_SHELL_REを持つ一方、baseline_vc_preflight.py側には quote-aware なdetect_compound_command()が残っています。またVcCommandEntryにはvc_regex_intentと annotation provenance がなく、_distinct_command_texts_from_body()も legacyparse_commands_from_block()を使っています。したがって単純な parser 差し替えでは #589/#889 系の既存 semantics を壊す可能性があります。再発防止については、現時点では別Issueを先に作るより、#2788 自体に consumer parity の回帰条件を組み込む方が重複が少ないと判断します。検索上も
vc-regex-intentの shared-parser 移行を直接扱う既存Issueは #2788 です。ClaudeCode の調査で「#2788 に収めると別PRになる独立した再発性問題」が判明した場合だけ、dedupe 後に follow-up を起票させるのが適切です。以下を、そのまま既に auto mode で起動している ClaudeCode に渡してください。
squne121/loop-protocolの Issue #2788 を、現在の repository の.claude/skills/issue-refinement-loop/SKILL.mdを正本として、人間の追加承認なしで refinement 完了まで進めてください。対象:
実装: baseline_vc_preflight の通常実行を shared VC parser に統一し説明用 bash 行の誤実行候補化を防ぐ #2788 (comment)
このコメントは今回のユーザーが明示的に選択した human context です。
unlabeled
with_anchorや agent-report lane として扱わず、currentissue-refinement-loopが定義するpreflight.run.with_human_context/ 必要時のcontract_update.run.with_human_context経路を使用してください。コマンドの argv をこのプロンプトから手書きで再構成せず、current
mainのISSUE_REFINEMENT_COMMAND_REGISTRY_V1/command_registry.pyと SKILL.md を読み、現在登録されている canonical command profile をそのまま使用してください。目的
対象 OWNER comment のレビュー結果を repository の実状態と照合し、Issue #2788 の contract を実装可能な状態へ精緻化してください。
今回は
issue-refinement-loopの実行だけが依頼されています。までは自律的に実施してください。
一方で、refinement が
approved/refinement_approvedになっても、この invocation からimpl-review-loop、implementation-worker、実装用 worktree、production code 修正、commit、push、PR 作成へ進んではいけません。Issue #2740 以降の current skill contract に従い、refinement 完了後は正常終了してください。
人間承認
通常の needs-fix、Issue 本文 rewrite、AC/VC修正、Allowed Paths の整合化、review iteration のたびにユーザーへ承認を求めないでください。
current skill の
loop_iteration_approval_gate.default_required: falseに従って bounded loop を自律継続してください。対象 comment が要求している refinement を、単に「scope/AC が変わる」という理由だけで人間へ差し戻さないでください。
operator-selected human-context 用の current canonical route、
references/anchor-comment-handling.mdのOperator-Selected Human-Context 継続と Accepted Trust Modelを使用してください。
特に exact Allowed Paths の追加候補が comment 本文だけでは確定しない場合は、人間へ path を聞く前に current skill が規定する read-only
codebase-investigatorを使用して repository-relative exact paths を導出してください。新しい独自 bypass や approval mechanism は作らないでください。
必須の SubAgent 利用
root/main thread だけで調査から rewrite まで済ませないでください。
まず current planner/preflight を実行し、その結果が investigation を要求する場合は、必ず
codebase-investigatorSubAgent を起動してください。今回については対象コメントが current-main の複数 consumer / parser field の inventory を要求しているため、少なくとも以下を read-only 調査対象としてください。
.claude/skills/issue-contract-review/scripts/vc_contract_syntax.py.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.pycompute_canonical_vc_plan()の全 direct caller_distinct_command_texts_from_body()compute_duplicate_diagnostic_report()VcCommandEntryparse_commands_from_block()detect_compound_command()vc-regex-intentannotation_source関連 Issue / PR も確認してください。
最低限:
SubAgent を spawn したら、必ず completion を待ってください。
completion 前に調査済みとみなしたり、Issue rewrite / final classification へ進んだりしないでください。
planner が Web research を required と判定した場合は
web-researcherも current skill に従って使用してください。codebase-investigator と並列化してよいですが、両者が required の場合は両方の completion を join してから Step 2 へ進んでください。
Issue rewrite が必要になり
issue-editorSubAgent を起動した場合も、その completion を待ち、GitHub 上の live Issue body を readback してから次の review iteration へ進んでください。対象コメントから検証すべき technical points
コメントの結論を無条件に採用せず、current main の実装と regression contract で fact-check してください。
ただし少なくとも次の論点は明示的に検証してください。
1. quote-aware compound shell semantics
current shared parser の compound-shell 判定と、
baseline_vc_preflight.detect_compound_command()の quote-aware 判定を比較してください。既存 #589 の契約:
rg -n "foo|bar" PATHの quoted regex alternation は shell pipe ではないrg -n "foo\|bar" PATHは literal-pipe semantics として別判定を壊さないことを Issue contract に固定してください。
実装方針を contract に過剰指定する必要はありませんが、shared authority へ寄せる結果として quoted regex alternation が
compound_shell/compound_command_disallowedに誤分類されないことを testable AC にしてください。2.
vc-regex-intentparitylegacy parser が保持している
vc-regex-intent: literal-pipe-okと shared
VcCommandEntryの field set を比較してください。shared parser migration 後も #589 の annotation semantics が lossless に維持されることを AC / tests に明記してください。
annotation を落として normal execution が regression する contract は approve しないでください。
3. annotation provenance parity
#889 と current result JSON consumer/test を確認し、
annotation_source.lineannotation_source.raw等、既存 externally-observable semantics を inventory してください。
単に
baseline_expect/vc_roleの値だけ残して provenance を消す rewrite は避けてください。どの provenance が current contract 上で必須かは repository evidence から決定してください。
4. grouped AC mapping
shared
VcCommandEntry.ac_refsと normal execution 側の scalaracrepresentation の差を確認してください。最低限、Issue contract に以下の invariant を固定してください。
1 source command = 1 canonical plan occurrence = 1 subprocess launch
grouped AC association を理由に同じ command を複数回実行してはいけません。
必要なら additive
ac_refs等の representation を検討してください。ただし backward-compatible scalar representation の具体形は、current consumer inventory を行った上で deterministic に決めてください。set の iteration order に依存する非決定的 mappingは禁止です。
5. canonical-plan parse-error contract
compute_canonical_vc_plan()の direct caller を current main から全数確認してください。少なくとも対象コメントが挙げる:
contract_readiness_check.pyrun_contract_review_once.pyrun_root_review_pipeline.pyを検証してください。
non-canonical VC parse error を canonical plan でも拒否する場合に、未処理 Python exception で workflow 全体が落ちない caller-facing contract を Issue に定義してください。
可能なら、個人開発向けに余計な schema/harness を増やさない最小設計を優先してください。
body を shared parser で一度 parse し、error 時に plan producer 自体を呼ばない構造で現在の Allowed Paths 内に収まるならそれを優先候補にしてください。
一方、typed exception と direct caller 更新が本当に必要と repository evidence が示すなら、必要な exact path を調査して Issue の Allowed Paths を整合させてください。
「Allowed Paths に無いから人間へ聞く」で停止せず、今回の operator-selected human-context route と read-only investigation により current skill が許す範囲で contract を更新してください。
6. history / diagnostic command population
_distinct_command_texts_from_body()とcompute_duplicate_diagnostic_report()が現在どの parser authority を使うか確認してください。特に history snapshot が
compute_canonical_vc_plan()と「same command population」を契約しているなら、#2788 後もその invariant が真になるよう Issue scope / AC を修正してください。duplicate diagnostic が diagnostic-only であり migration scope に入れる必要がない場合は、その理由を明示してください。
「同じファイルに legacy parser がある」という理由だけで無条件に全部変更しないでください。
Issue #2788 の refinement 方針
対象 OWNER comment の提案を repository evidence が支持する場合、少なくとも以下を Issue contract に反映してください。
preflight-scopebaseline-expectvc-rolevc-regex-intent: literal-pipe-okfoo|barが compound shell と誤判定されない regressionfoo\|barannotated / unannotated の既存 実装: VC コマンドの正規表現メタ文字を shell pipe と誤判定しない検証を追加する #589 semanticsテスト matrix は repository evidence を踏まえて、最低でも次を検討してください。
$explanation$ command"foo|bar""foo\|bar"without annotation"foo\|bar"withliteral-pipe-okbaseline-expectpreflight-scopevc-role大規模 E2E harness、新しい Markdown parser、新規 security layer はこの目的だけのために追加しないでください。
unit / focused regression test と subprocess launch monkeypatch/counter 等で十分証明できるならそちらを優先してください。
#2784 の section-boundary 問題や repo-wide Markdown parser 刷新を #2788 に吸収しないでください。
Review / rewrite loop
current
issue-refinement-loopの Step 2 を正本としてください。canonical Step 2 では legacy
issue-reviewerSubAgent を新たに起動せず、currentrun_root_review_pipeline.py produce/canonical_step2_route経路を使ってください。Step 2 が background execution を要求する current contract なら:
の順を守ってください。
background launch 時点を completion とみなさないでください。
review が
needs-fix / request_changesなら current skill の bounded loop に従ってissue-editorrewrite → completion wait → live readback → fresh review を自律的に繰り返してください。通常の修正可能な review finding ごとにユーザーへ確認を求めないでください。
再発防止 follow-up
今回すでに確認されている
「shared parser へ authority を統一する際、legacy consumer が依存する semantic field / provenance を inventory せず移行すると既存正常系を壊す」
という問題については、まず #2788 の AC / regression test として直接固定できるか判断してください。
#2788 自体に consumer parity regression を入れれば十分なものを、重複する generic follow-up Issue に分離しないでください。
ただし調査中に、#2788 の bounded implementation scopeとは独立した、具体的な再現証拠付きの再発性問題が見つかった場合は、Step 4.5 の current follow-up materialization contract に従って GitHub Issue 化してください。
その場合:
この target comment 由来で独立 follow-up が本当に必要になった場合の dedupe key 候補は:
follow-up:squne121/loop-protocol:issues/2788#issuecomment-5848560731:vc-parser-consumer-parityです。
ただし #2788 の修正そのものと重複するなら 作成しない でください。
Stop conditions
通常の contract refinement、review finding、testable AC の追加、既存 semantics 保存、今回コメントに基づく Allowed Paths 調整だけでは停止しないでください。
以下は current skill の hard boundary に従って停止してください。
停止する場合も、単に「人間判断が必要」とだけ返さず、current skill の reason code / blocker evidence を残してください。
完了条件
以下を満たすまで終了しないでください。
codebase-investigatorSubAgent completion を待ったweb-researchercompletion も待ったissue-editorを使った場合、その completion を待ったrefinement_approved相当になったLOOP_HANDOFF_RESULT_V1が current skill 上必要なら正規経路で投稿した最後に root/main thread から一度だけ簡潔に報告してください。
報告には最低限:
impl-review-loop/ implementation / commit / PR 作成を開始していないことを含めてください。
この形なら、今回のコメントを単なる advisory review として読み飛ばさず、明示的な human-context authority → 調査 → Issue rewrite → fresh review の正規ルートに載せられます。また、現行 skill では refinement 完了が実装開始の認可ではないため、ここで
impl-review-loopまで連結しないのが重要です。squne121 commentedon Sep 27, 2026
issue-refinement-loop 終了報告
Termination: approved
対象 OWNER コメント(Operator-Selected Human-Context): #2788 (comment)
実施内容
STATUS: blocked(missing_required_section:.github/ISSUE_TEMPLATE/implementation.ymlが要求する6セクション欠落)。issue-editorによる structured 補完(Parent Issue / Parent Goal Ref / Current Validated Scope / Remaining Parent Gaps / Runtime Verification Applicability / Required Skills の6セクション追加)を経てSTATUS: passに解消。codebase-investigatorSubAgent を起動し completion を待機。対象 OWNER コメントが指摘した VC parser consumer parity(vc_contract_syntax.pyの_COMPOUND_SHELL_RE、legacyparse_commands_from_block()の field 差分、compute_canonical_vc_plan()の direct caller 3件、_distinct_command_texts_from_body()等)を current main の実装・テストと照合し、OWNER コメントの技術的主張が全て正しいことを確認。issue-editor経由、3回、いずれも completion 待機 + live body readback で確認):# preflight-scope: pr_review_only追加(既存の低速な regression suite が Step 2 の per-command timeout を超過したための既存サポート済み annotation 適用)run_root_review_pipeline.py produce、background実行 + completion join、2回): 最終的にverdict: approve/next_action: proceed(blocking findings なし)。issue-design-reviewerSubAgent、completion待機):effective_verdict: approve。low-severity の non-blocking clarity finding 2件を記録(rewrite不要、warningとして残存)。guard-issue-body.py::_strip_fenced_code_blocks()が prose 内の孤立backtick列を実fenceと誤ペアリングする不具合。#2788の実装scopeとは無関係)について、重複確認(既存Issue検索で重複なし)の上、新規 Issue 実装: guard-issue-body.py の _strip_fenced_code_blocks() が prose 内の孤立backtick列を実fenceと誤ペアリングし template_guard を false-positive にする不具合を修正する #2794 を起票。Consumer Parity / 技術論点の最終 disposition
vc-regex-intent: literal-pipe-ok: AC5 拡張で保持を明記annotation_source.line/raw): AC5 拡張で保持を明記compute_canonical_vc_plan()の parse-error caller-facing contract: AC13 で明記(Allowed Paths 拡張を避ける設計を優先候補として明記)Allowed Paths
変更なし。AC13 の設計方針(既存 direct caller への変更を避け、shared parser で一度 parse してから plan producer を呼ぶかどうかを判断する構造を優先する)により、
contract_readiness_check.py等への Allowed Paths 拡張は不要と判断。Follow-up
guard-issue-body.pyfence pairing 不具合。実装: baseline_vc_preflight の通常実行を shared VC parser に統一し説明用 bash 行の誤実行候補化を防ぐ #2788 の実装 scope とは独立、重複確認済み)実装フェーズへの移行について
本 invocation は
issue-refinement-loopの実行のみを依頼されたものであり、impl-review-loop/ implementation-worker / 実装用 worktree / production code 修正 / commit / push / PR 作成のいずれも開始していない。squne121 commentedon Sep 27, 2026
推奨は、#2788 をそのまま
impl-review-loopに投入して実装フェーズへ移行です。Issue はすでにrefinement_approvedまで到達しており、現行main(確認時f8fa7428ab006ccf04d0d8e3ae624f2d2b17de81)でも、normal execution / canonical plan / history population の legacy parser 利用、shared parser の quote-unaware compound 判定、vc-regex-intent/ annotation provenance 欠落が残っています。つまり no-op ではありません。再発防止については、refinement 中に発見された独立問題がすでに #2794 として起票されています。今回の調査では、それとは別に今すぐ追加Issue化すべき独立問題は見つかっていません。実装中に新たな再発性問題が判明した場合のみ、重複検索して follow-up を起票するのが適切です。PR #2786 はすでに merge 済みで、検索上
baseline_vc_preflight/vc_contract_syntaxを対象にした open PR も見つかりませんでした。ただしimpl-review-loopの pre-Step-1 landing disposition で live 状態を再確認させるべきです。以下を、そのまま auto mode の ClaudeCode に渡せます。
squne121/loop-protocolの Issue #2788 を対象に、current repository の.claude/skills/impl-review-loop/SKILL.mdを正本として、実装・テスト・PR作成・レビュー修正ループを マージ直前の merge-ready 状態まで、人間の追加承認なしで 自律実行してください。
対象:
実装: baseline_vc_preflight の通常実行を shared VC parser に統一し説明用 bash 行の誤実行候補化を防ぐ #2788 (comment)
実装: baseline_vc_preflight の通常実行を shared VC parser に統一し説明用 bash 行の誤実行候補化を防ぐ #2788 (comment)
.claude/skills/impl-review-loop/SKILL.mdこのプロンプト作成時点では Issue #2788 は
refinement_approved済みであり、implementation phase へ進める状態です。分析時点の
mainHEAD はf8fa7428ab006ccf04d0d8e3ae624f2d2b17de81でしたが、これを固定値として信用せず、開始時に必ず live
main、Issue body、Issue comments、関連 PR、CI、repository state を再取得してください。最終目標
Issue #2788 の live contract、Acceptance Criteria、Verification Commands、Allowed Paths を満たす実装を行い、
Closes #2788の設定を bounded loop で繰り返し、current
impl-review-loopが定義する merge-ready 条件まで到達してください。PR の merge 自体は実行しないでください。
auto-merge も有効化しないでください。
merge 可能な直前状態で終了し、最終報告を出してください。
人間承認について
通常の実装判断・needs-fix・テスト失敗修正・レビュー指摘対応・再push・review iteration ごとに人間へ確認を求めないでください。
current
impl-review-loopの loop policy と routing を使用し、通常のcontinue_loop/ fix_delta は自律継続してください。以下は承認待ち理由にしないでください。
UNKNOWNの bounded retryただし、live Issue #2788 の hard Stop Conditions や current
impl-review-loopが定義する actual conflict / hard escalation boundary を無視してはいけません。特に以下は勝手に突破しないでください。
これらが発生した場合は、可能な非破壊的調査・再発防止 Issue materialization まで行ったうえで、その理由と evidence を最終報告してください。
pre-Step-1: duplicate / landing disposition
implementation-worker を起動する前に、current
impl-review-loopの Evidence-Based Landing Disposition を必ず実施してください。Issue #2788 を満たす:
が存在しないか live evidence で確認してください。
検索結果を自己解釈して新規PRを即作成せず、current skill の canonical disposition producer を利用してください。
routing は current skill に従い:
implementation_already_landedexisting_pr_resumealready_satisfiedordinary_dispatch_or_explicit_recoveryreconciliation_requiredをそのまま扱ってください。
既存PRが見つかれば duplicate PR を作らず resume してください。
分析時点では #2788 を閉じる implementation PR は確認できていませんが、この情報は stale になり得るため必ず live re-check してください。
必須 SubAgent 利用
root/main thread 自身だけで実装・テスト・レビューを完結させないでください。
current
impl-review-loopが規定する SubAgent を使用してください。最低限:
implementation-workertest-runnerpr-reviewerを適切な Step で使用してください。
追加調査が必要なら
codebase-investigator等、current skill が許可する read-only SubAgent を使用してください。completion / join の絶対条件
SubAgent を spawn した場合、必ずその SubAgent の completion を待ってください。
特に:
こと。
SubAgent の未完了状態を理由に root thread が同じ仕事を横取りして完了扱いすることは禁止します。
Issue #2788 で特に確認すべき実装ポイント
Issue body を正本としつつ、以下は実装レビューで明示的に確認してください。
1. parser authority の一本化
現在の
baseline_vc_preflight.pyでは少なくとも normal execution が legacyextract_fenced_bash_blocks()+parse_commands_from_block()を使用しています。
compute_canonical_vc_plan()も同じ legacy parser population を使用しています。_distinct_command_texts_from_body()も legacy parser を使用しています。これらを Issue #2788 の AC1 / AC2 / AC6 / AC12 に従い、既存
vc_contract_syntax.parse_verification_commands_section()またはその
VcParseResult.commandsを source of truth とする薄い shared adapter へ統一してください。新しい第三の VC grammar parser を作らないでください。
2. quote-aware compound detection
current
vc_contract_syntax.pyの_COMPOUND_SHELL_REによる command 全体への regex 判定は、rg -n "foo|bar" PATHの quoted regex alternation を shell pipe と誤認し得ます。
一方
baseline_vc_preflight.detect_compound_command()にはshlexベースの quote-aware 判定があります。Issue AC9 に従い、compound-shell 判定 primitive を shared authority に一本化してください。
少なくとも以下を regression test で固定してください。
"foo|bar"は shell pipe ではない|,&&,;, redirect 等は compound shell3.
vc-regex-intentを lossless に保持legacy parser が持つ
# vc-regex-intent: literal-pipe-okの semantics を shared parser migration で消さないでください。
特に:
rg -n "foo\|bar" PATHが
regex_literal_pipe_suspectedに分類される既存挙動と、# vc-regex-intent: literal-pipe-okが付いた場合に normal execution が許可される既存挙動を両方固定してください。
単に annotation 行を parser が「コメントとして無視する」だけでは不十分です。
値を downstream execution まで保持してください。
4. annotation provenance
Issue #889 由来の externally-observable result semantics を維持してください。
最低限 current consumers/tests を inventory し、
annotation_source.lineannotation_source.rawを shared parser migration 後も lossless に扱ってください。
既存 result JSON から provenance が消える変更は regression として扱ってください。
5. grouped AC
shared parser の
VcCommandEntry.ac_refsと normal execution の scalaracの差を明示的に処理してください。必須 invariant:
1 source command = 1 canonical plan occurrence = 1 subprocess launchです。
# AC2, AC3のような grouped marker を AC association ごとに複製して、同じ subprocess を2回以上実行してはいけません。ac_refsの representation が必要なら additive / deterministic にしてください。set iteration order に依存して scalar
acを決める実装は禁止します。backward-compatible scalar
acが current consumer に必要なら、consumer inventory に基づいて deterministic rule を定義・testしてください。6. canonical plan parse-error contract
non-canonical VC inputを canonical plan / normal execution の subprocess candidate にしてはいけません。
特に説明用 non-
$行が bash fence 内に存在する場合は、subprocess 起動前に deterministic に拒否してください。一方、
compute_canonical_vc_plan()の direct caller に新しい未処理 Python exception を漏らして workflow 自体を crash させてはいけません。current main の direct callers を再確認してください。
少なくとも refinement 時点では:
contract_readiness_check.pyrun_contract_review_once.pyrun_root_review_pipeline.pyが確認されています。
Issue #2788 はこれらを Allowed Paths に含めていません。
そのため AC13 に従い、まず Allowed Paths 内で parse result を一度確定し、parse error がある場合は unsafe な plan/execution pathへ進まない最小設計 を検討してください。
もし AC13 を正しく満たすために本当に Allowed Paths 外の production code 修正が不可避だと repository evidence が示した場合、無理な workaround を入れないでください。
Issue の hard Stop Condition として扱い、必要なら独立 follow-up Issue を起票して evidence を報告してください。
7. history population
_distinct_command_texts_from_body()が docstring どおり canonical plan と同じ command population を使用することを AC12 の test で固定してください。8. duplicate diagnostic
compute_duplicate_diagnostic_report()自体の diagnostic 表示再設計は Issue の Out of Scope です。ACを満たすために不要なら scope creep させないでください。
legacy population を残す場合は、なぜ status authority ではなく diagnostic-only として許容されるのか PR に明記してください。
テスト
Issue body の Verification Commands を正本として実行してください。
特に新設予定の focused regression:
.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_shared_command_parser.pyで AC1-AC4 / AC6-AC7 / AC9-AC13 を明確に固定してください。
既存 suites:
.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py.claude/skills/issue-contract-review/tests/も Issue の VC / current workflow contract に従って実行してください。
AC8 の
pr_review_onlyannotation は尊重し、baseline phase と PR-review phase の execution scope を勝手に混同しないでください。focused tests が通っただけで merge-ready にしないでください。
current repository の branch protection / required CI を live 取得し、PR current head に対する required checks を確認してください。
分析時点では main branch の required checks として少なくとも:
が設定されていました。
これも live state を正本として再確認してください。
PR
新規 implementation が必要なら current skill /
implement-issue/open-prの canonical workflow に従い dedicated worktree を使用してください。PR はまず Draft とし、Issue #2788 を閉じる relation を明示してください。
PR body に:
Closes #2788を含めてください。
Issue の current scope/AC/Allowed Paths と PR diff の対応を明確にし、可能なら current workflow が要求する implementation scope coverage marker / evidence を生成してください。
Issue body の Allowed Paths 外へ diff を広げないでください。
PR作成後はそこで終了せず、そのPRを対象として同じ
impl-review-loopのレビュー・fix_delta loop を継続してください。review loop
pr-reviewer の verdict を current skill の canonical routing へそのまま入力してください。
REQUEST_CHANGES/ blockers があれば implementation-worker に fix_delta として返し、修正完了を待ってください。修正後:
を必要に応じて再実行してください。
review thread を修正した場合、修正内容を確認したうえで current skill が許可する場合のみ resolve してください。
単に「対応しました」とコメントしただけで blocker 解消扱いしないでください。
merge-ready 判定
verdict: APPROVEだけでは終了しないでください。current
impl-review-loopの merge-ready 条件を正本としてください。少なくとも:
blockers == []ことを確認してください。
mergeability / CI が stale なら再取得してください。
PR head 更新前の成功結果を流用しないでください。
再発防止 Issue
実装・テスト・レビュー中に、#2788 の局所修正だけでは再発しそうな 独立した問題 を発見した場合は、GitHub Issue を起票してください。
ただし必ず先に open / closed Issue を検索して重複確認してください。
以下の分類をしてください。
#2788 scope 内の問題
#2788 の AC を正しく満たすために必要で、Allowed Paths 内で修正できる問題なら、原則として current PR で修正してください。
別Issueへ逃がして #2788 を false-green にしないでください。
独立した non-blocking recurring problem
#2788 の AC 達成には不要だが同じ failure pattern が今後再発し得る場合:
を記載した follow-up Issue を起票してください。
起票後も #2788 と独立で non-blocking なら current loop を継続してください。
blocking / out-of-scope recurring problem
#2788 を正しく完了するために必要だが Allowed Paths 外変更等の hard Stop Condition に当たる場合:
としてください。
Issue contract を黙って逸脱して突破してはいけません。
既存 #2794
refinement 中に発見された
guard-issue-body.py::_strip_fenced_code_blocks()の orphan backtick / fence pairing 問題はすでに Issue #2794 として起票済みです。
同じ問題を新しいIssueとして重複起票しないでください。
#2794 は #2788 implementation の blocker ではありません。
禁止事項
最終報告
終了時は少なくとも以下を構造化して報告してください。
merge_ready: true|falsenonemerge-ready の場合、人間が行う次の操作は PR の最終確認と merge のみにしてください。
このプロンプトでは、通常の修正ループは止めず、Issue 自体の hard Stop Condition だけは突破しないよう分離しています。特に #2788 は AC13 が Allowed Paths 境界に接しているため、そこを無理に自動突破させないのが重要です。
squne121 commentedon Sep 27, 2026
implement-issue: 実装完了 (2026-09-27T04:51:27Z)
.claude/worktrees/issue-2788-vc-shared-parserworktree-issue-2788-vc-shared-parsersqune121 commentedon Sep 27, 2026
impl-review-loop: 完了 (2026-09-27T05:15:00Z)
fix: baseline_vc_preflight の通常実行を shared VC parser に統一する (#2796)