Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: research
parent_issue: "none"
goal_ref: "## Allowed Paths の grammar を mutation allowlist として明確化し、read-only 慣用句・lexical heuristic に依存しない canonical no-path marker + legacy 後方互換を全 producer/parser/consumer で確定する"
change_kind: research-onlyParent Issue
なし(issue-refinement-loop / issue-contract-review の共有 checker に対する再発防止 Issue)
Source
- Issue 調査: markdownlint-cli2 の gitignore option 導入是非を検討する #2730 の issue-refinement-loop 実行中(Step 2 canonical review)に実証された defect
- 関連する既に closed の類似 fix: 実装: fix(#648): broad-path 検査が backtick/注釈付き Allowed Paths を正規化できず正当な rg VC を誤検知する #683 / PR fix(#683): extract_allowed_paths が backtick/注釈付き Allowed Paths を正規化できない問題を修正 #684(backtick/注釈付き Allowed Paths の broad-path 誤検知を修正。本 Issue はそれとは異なる独立したサブケース)
- OWNER 敵対的レビュー(本 Issue の research scope を再フレーム): 調査: read-only Issue の Allowed Paths prose が rg VC の broad-path 誤検知を起こす #2779 (comment)
Background
.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py::extract_allowed_paths() は ## Allowed Paths セクション内の非空行を無条件に path literal として扱う。このリポジトリの read-only / research issue 向け標準慣用句「- 読み取り専用。リポジトリ変更なし(既定)」はプロースだが path として誤抽出され、_rg_has_broad_search_path() が実際の rg VC を broad-path として誤検知する(Issue #2730 で実証済み)。
この慣用句は単なる repo 内の慣用表現ではなく、.github/ISSUE_TEMPLATE/research.yml(Allowed Paths フィールドの attributes.value default)が生成する 公式 canonical input である。GitHub Issue Forms の仕様上、textarea.attributes.value はフォームの事前入力テキストであり、そのまま submit すれば Issue 本文に反映される(GitHub 公式ドキュメント: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema の value 属性定義)。したがって producer 側(テンプレート)を含めて対応しない限り、GitHub UI から research Issue を作成するたびに同じ入力が再生産される。
Findings / Design Decision
OWNER 敵対的レビューと、codebase-investigator SubAgent による current-main の網羅的なコード読解、および web-researcher SubAgent による一次資料調査により、以下を設計判断として確定する。
1. Allowed Paths の意味
## Allowed Paths は repository mutation の allowlist と定義する。read-only / research Issue の調査対象ファイルを列挙する欄として兼用しない。調査対象は In Scope / Required Design References / Findings / Verification Commands 等へ記述する。
2. lexical heuristic の棄却
以下のような推測ベースの prose 除外は 採用しない。
- 日本語の文章だから prose
。等の句読点があるから prose- ASCII portable filename character set 外の文字を含むから prose
- 空白を含むから prose
読み取り専用という語を含むから prose
根拠(一次資料で確認済み):
- POSIX.1-2017 のファイル名定義(IEEE/The Open Group, https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html)は、ファイル名に許可されないバイトを NUL と
/のみと定義しており、Unicode・句読点・空白を含む文字列は技術的に合法なファイル名になり得る。 - GNU Coreutils 公式マニュアルの
pathchk -p(https://www.gnu.org/software/coreutils/manual/html_node/pathchk-invocation.html)が検査する「POSIX portable filename character set」(ASCII 英数字と._-/)は、有効な全ファイル名の集合ではなく、移植可能性を検査するための限定的な部分集合である。 - Python 公式ドキュメント(
pathlib, https://docs.python.org/3/library/pathlib.html)の実装例には非ASCII文字を含むパス(`PureWindowsPath('c:/', 'Users', 'Ximénez')`)が実際に登場する。 - 現在のリポジトリには
docs/日本語。mdのような Unicode・句読点を含む正当なパスや、some/path.py(読み取り専用)のように実在パスへ read-only 注釈が付いた例が存在し得る。これらを上記のような lexical heuristic で除外すると、正当なリポジトリパスを誤って除外する。
したがって、採るべきは path らしさを推測する heuristic ではなく explicit grammar である。
3. explicit no-path grammar(canonical no-path marker)
canonical no-path marker を明示的な予約 token として定義する。第一候補:
## Allowed Paths
- (none)
(none) は「path に見えないから除外」するのではなく、契約上予約された no-path marker として 0 paths に解釈する。
4. backward compatibility(legacy exact marker)
既存 Issue を一括 rewrite しない。少なくとも legacy exact marker:
読み取り専用。リポジトリ変更なし(既定)
を 0 paths として解釈する後方互換を要求する。基本 semantics:
canonical `(none)` -> zero paths
legacy exact marker -> zero paths(exact match のみ、fuzzy/substring matching は導入しない)
ordinary path entries -> 既存の path semantics を変更しない
現在 OPEN の research Issue には legacy exact marker を使うものが多数(少なくとも24件、うち #2605, #1934, #499, #2778, #1759, #2730 を含む8件以上が Verification Commands に rg を含む)確認されており、既存 Issue の一括書き換えや migration daemon は不要とする。
5. producer inventory
canonical marker 採用時は parser だけでなく producer も同期させる。current main の網羅的な検索(codebase-investigator による調査)により、## Allowed Paths の no-path デフォルト値を生成している producer は以下のみと確認した。
.github/ISSUE_TEMPLATE/research.yml(Allowed Pathsフィールドのattributes.value。唯一の producer。implementation.yml/parent.yml/bug-report.yml/feature-request.ymlには同種の no-path default value は存在しない)
create-issue / edit-issue skill 配下には、Issue 本文の ## Allowed Paths セクション自体を生成する固定テンプレート文字列は存在せず(check_issue_overlap.py 等はあくまで既存 Issue 本文の parse 側であり producer ではない)、producer scope は .github/ISSUE_TEMPLATE/research.yml に限定される。
6. parser/consumer inventory(全体棚卸し)
codebase-investigator による current main の網羅的な調査により、## Allowed Paths セクションを独自に parse している実装は以下の 8 系統であることを確認した(extract_allowed_paths() の直接 consumer に限定しない)。
| # | ファイル | 関数 | 用途 | no-path prose の現在の扱い |
|---|---|---|---|---|
| 1 | .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py |
extract_allowed_paths() |
VC の broad-path 判定(_rg_has_broad_search_path()) |
誤抽出する(本 Issue の defect) |
| 2 | .claude/skills/create-issue/scripts/check_issue_overlap.py |
extract_allowed_paths() / extract_allowed_path_entries() |
Issue 間の overlap / duplicate 判定(same_path_set() 等) |
誤抽出する(無関係な2つの read-only research Issue が duplicate 候補に入り得る) |
| 3 | .claude/skills/create-issue/scripts/path_classification.py |
extract_allowed_paths() |
path kind classification(docs_only 等) |
誤抽出する |
| 4 | .claude/skills/issue-refinement-loop/scripts/check_vc_scope.py |
_extract_allowed_paths() |
VC の path scope 検査(独自の _broad_search_check() を含む) |
誤抽出する |
| 5 | .claude/skills/issue-refinement-loop/scripts/plan_issue_scope_rollup.py |
_extract_allowed_paths() |
scope rollup の exact_allowed_paths_equal overlap signal |
誤抽出する |
| 6 | .claude/skills/issue-refinement-loop/scripts/repair_issue_contract.py |
_extract_allowed_paths_ric() |
contract repair | 誤抽出する |
| 7 | .claude/skills/edit-issue/scripts/issue_contract_hygiene_autofix.py |
(## Allowed Paths セクション抽出、C9 autofix 判定) |
hygiene autofix の runtime/non-runtime path 判定 | 誤抽出する可能性がある |
| 8 | scripts/agent-ops/pr_head_replay_publish_exec.py |
_allowed_paths() |
PR head replay/publish executor の mutation-path allowlist 判定(変更ファイルが Allowed Paths に含まれるかの検査、PROTECTED_PREFIXES と並ぶ mutation gate) |
誤抽出する(baseline_vc_preflight.extract_allowed_paths() への delegation なし。no-path prose 行が非空文字列であれば無条件に path として追加される独自 line-split parser) |
一方、以下の3実装は既に baseline_vc_preflight.extract_allowed_paths() を importlib 経由で呼び出す canonical delegation になっており、baseline 側の修正がそのまま反映される(新規修正不要、ただし fix 適用後の regression 確認対象には含める)。
scripts/agent-guards/materialize_issue_scope_snapshot.py(_allowed_paths()).claude/skills/impl-review-loop/scripts/ensure_contract_snapshot.py(extract_allowed_paths_from_body()).claude/skills/impl-review-loop/scripts/build_intake_capsule.py(_live_allowed_paths_hash())
設計判断: 新しい heavyweight validator / daemon は追加しない。上記 7 系統それぞれに canonical no-path 判定((none) および legacy exact marker → 0 paths)を適用する最小の共有ヘルパー(例: baseline_vc_preflight.py の既存 _normalize_allowed_path_entry() を拡張した no-path 判定関数、または独立した小さな shared helper 関数)を追加し、7系統の parser がそれぞれこの判定を通す形に統一する。3つの delegation 実装は変更不要。
Outcome
## Allowed Paths の grammar を mutation allowlist として明確化し、canonical no-path marker((none))と legacy exact-marker(読み取り専用。リポジトリ変更なし(既定))の両方を 0 paths と解釈する契約を、producer(.github/ISSUE_TEMPLATE/research.yml)と全 7 parser/consumer 系統に対して確定した。lexical heuristic による prose 除外は棄却した。この設計判断に基づく implementation Issue を起票し、本 Issue がそれを link する。
In Scope
## Allowed Paths= mutation allowlist という意味論の確定(完了、上記 Findings 参照)- lexical heuristic(日本語・句読点・文字セット等による prose 判定)の棄却(完了)
- canonical no-path marker
(none)の採用と、legacy exact marker の後方互換 semantics の確定(完了) - producer inventory の確定(
.github/ISSUE_TEMPLATE/research.ymlが唯一の producer であることの確認、完了) - parser/consumer inventory の網羅的な棚卸し(7系統の独自 parser + 3系統の canonical delegation、完了)
- 採用方針に基づく implementation Issue のスコープ・regression 要件の確定
Out of Scope
- Issue 調査: markdownlint-cli2 の gitignore option 導入是非を検討する #2730 自体の contract 内容の変更(既に issue-editor により rewrite 済み。本 Issue はその過程で発見された独立した checker defect のみを扱う)
#683が既に対応した backtick/注釈付き Allowed Paths のケース(本 Issue はプロースのみのケースを扱う)- checker 全体の再設計・新規 validator / daemon の導入
- 既存 OPEN Issue(24件確認)の一括 rewrite・migration harness の導入
#2762型の mixed prose(read-only 宣言 + 調査対象説明)の扱いは、本 Issue では「mutation allowlist と investigation prose を混同しない」という原則を明示するに留め、既存の annotation-normalization semantics(PR fix(#683): extract_allowed_paths が backtick/注釈付き Allowed Paths を正規化できない問題を修正 #684)自体の再設計は行わない
Acceptance Criteria
-
extract_allowed_paths()の現在の実装がプロース行をパスとして誤抽出することが、再現手順とともに記載されている(Background 参照) - lexical heuristic を棄却し、canonical no-path marker
(none)+ legacy exact-marker 後方互換を採用方針として確定している(Findings 2-4 参照) -
.github/ISSUE_TEMPLATE/research.ymlが producer inventory に含まれ、他に該当 producer が存在しないことを確認している(Findings 5 参照) -
baseline_vc_preflight.extract_allowed_paths()の直接 consumer に限定せず、## Allowed Pathsを独自 parse する全 8 系統の parser/consumer を棚卸ししている(Findings 6 参照。issue-design-reviewerによるセマンティックレビューで欠落が指摘され、scripts/agent-ops/pr_head_replay_publish_exec.py::_allowed_paths()を追加して修正済み) - 採用方針に基づく implementation Issue が起票され、本 Issue がそれを link している(実装: Allowed Paths の canonical no-path marker (none) を legacy 慣用句と互換のまま current-main の全 independent parser/consumer へ導入する #2783、GitHub native sub-issue として登録済み)
Verification Commands
-
AC: 現在の
extract_allowed_paths()がプロース行を path として誤抽出することの再現手順は Background セクションに記載済み(PYTHONPATH=.claude/skills/issue-contract-review/scripts uv run python3 -c "..."という形式は本 Issue の VC preflight 許可コマンド形(rg/test/grep/uv run pytest等)に該当しないため、ここでは実行可能コマンドとして提示しない。Background の記述と、本 Issue の research 実施過程で実際に検証済みの結果を証跡とする)。 -
AC:
.github/ISSUE_TEMPLATE/research.ymlが現在も legacy marker を default value として生成していることを確認する(producer が現在も legacy marker を生成し続けていることの確認であり、baseline で pass することが意図通り)
# baseline-expect: pass
$ grep -n "読み取り専用。リポジトリ変更なし" .github/ISSUE_TEMPLATE/research.yml- AC: 採用方針に基づく implementation Issue が起票され、本 Issue がリンクしていることを確認する(起票後、実際の Issue 番号で以下を実行して確認する。番号は起票前は未確定のため、ここでは実行可能コマンドとして提示しない):
gh issue view <IMPLEMENTATION_ISSUE_NUMBER> --repo squne121/loop-protocol --json number,title,body
Allowed Paths
- (none)
Stop Conditions
- Outcome / Scope / AC が検索可能な形で記載されていない場合は即停止
- Allowed Paths 外への書き込みを試みた場合は即停止
- 権限不足(permission denied)により操作が完了できない場合は即停止
- 成果物の書き込みに失敗した場合(I/O エラー等)は即停止
Handoff Contract
Current Objective:## Allowed Pathsの grammar を mutation allowlist として明確化し、canonical no-path marker ((none)) + legacy exact-marker 後方互換を全 producer/parser/consumer に対して確定した設計判断を、実装可能な implementation Issue へ引き継ぐBounded Current Context:baseline_vc_preflight.py::extract_allowed_paths()を含む 7 系統の独自 parser(詳細は Findings 6 の表)が read-only 慣用句をプロースとして誤抽出しており、.github/ISSUE_TEMPLATE/research.ymlがその慣用句を default value として生成し続けているOpen Questions: なし(lexical heuristic 棄却・canonical marker・legacy 後方互換・producer/parser inventory はすべて本 Issue で確定済み)Next Action: 実装は 実装: Allowed Paths の canonical no-path marker (none) を legacy 慣用句と互換のまま current-main の全 independent parser/consumer へ導入する #2783 で進行する(起票済み・link済み)。本 Issue (調査: read-only Issue の Allowed Paths prose が rg VC の broad-path 誤検知を起こす #2779) 自体はこれ以上のアクション不要Artifact Refs: Issue 調査: markdownlint-cli2 の gitignore option 導入是非を検討する #2730(実際に誤検知が発生した事例)、Issue 実装: fix(#648): broad-path 検査が backtick/注釈付き Allowed Paths を正規化できず正当な rg VC を誤検知する #683 / PR fix(#683): extract_allowed_paths が backtick/注釈付き Allowed Paths を正規化できない問題を修正 #684(closed の類似 fix、backtick/注釈正規化)、.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py、.github/ISSUE_TEMPLATE/research.yml、OWNER 敵対的レビュー(https://github.com/squne121/loop-protocol/issues/2779#issuecomment-5845797870)
Notes for Reviewer
- 本 Issue は Issue 調査: markdownlint-cli2 の gitignore option 導入是非を検討する #2730 の issue-refinement-loop 実行中(Step 2 canonical review 時)に実証された、独立した再発可能な checker defect の記録である。
- 本 Issue自身の
## Allowed Pathsは canonical no-path marker(none)を使用する(本 Issue には具体パスを指すrgVC を含めていないため、この Issue 自体は本 defect を踏まない)。 - 実装スコープは
baseline_vc_preflight.py単体ではなく、Findings 6 に列挙した 8 系統の parser/consumer 全体に及ぶ。実装 Issue の Acceptance Criteria / Verification Commands には、少なくとも以下の regression を含めることを要求する(詳細は実装 Issue 本文で具体化する):- legacy exact marker
読み取り専用。リポジトリ変更なし(既定)→allowed_paths == [] - canonical marker
(none)→allowed_paths == [] - read-only body +
rg pattern specific/file.py→broad_search_path_unboundedにならない rg pattern/rg pattern .→ 従来どおり broad と判定される(ripgrep 公式 GUIDE.md:rg fooはrg foo ./と等価、https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md)docs/日本語。md等の Unicode / punctuation を含む real path → path として保持されるsome/path.py(読み取り専用)→ 既存の annotation normalization semantics(PR fix(#683): extract_allowed_paths が backtick/注釈付き Allowed Paths を正規化できない問題を修正 #684)を壊さず real path を保持する#2762型の mixed prose(read-only 宣言 + 調査対象説明)を mutation allowlist と investigation prose を混同しない仕様として明示し regression 化する#2730と同型の contract/body を canonical Step 2 pipeline に通し、本 defect を理由としてoperator_intervention_requiredに落ちない integration regressioncheck_issue_overlapで、無関係な2つの read-only research Issue が no-path marker の一致だけを理由にsame_path_set/ duplicate evidence を得ない regression
- legacy exact marker
Activity
squne121 commentedon Sep 26, 2026
結論
Issue #2779 の不具合認識と再現は正しいです。#2730 で起きた
broad_search_path_unboundedは、現在のbaseline_vc_preflight.py::extract_allowed_paths()の実装から説明できます。ただし、現状の contract のまま implementation Issue を materialize するのは勧めません。特に In Scope にある「日本語の文章・句点・既知のパス文字セットなどで prose を判定する」という方向は避けるべきです。
敵対的に見ると、現在の #2779 は「rg の false positive」を発見できていますが、実際には
Allowed Pathsの no-path/read-only 表現そのものが machine-readable contract になっていないことが根因です。そのため、局所的にbaseline_vc_preflight.pyだけ直すと別 consumer に同じ意味論的汚染が残ります。P0 — 実際の producer が In Scope から抜けています
最も大きな欠落です。
現在の
.github/ISSUE_TEMPLATE/research.ymlはAllowed Pathsの既定値として、まさにを生成しています。つまりこれは単なる「repo 内で広く使われる慣用句」ではなく、公式 Research Issue Form が生成している canonical input です。
GitHub Issue Forms は
.github/ISSUE_TEMPLATE/*.ymlをフォーム定義として使い、textarea.attributes.valueはフォームに事前入力され、その回答が Issue 本文の Markdown に変換されます。:chatgpt-content-reference{index="0"}ところが #2779 の代替案では「
create-issue/edit-issueskill のテンプレートを寄せる」としか書かれていません。これだけ直しても、GitHub UI から research Issue を作れば旧表現が再生産されます。必須修正: In Scope に少なくとも
.github/ISSUE_TEMPLATE/research.ymlを明記し、を research outcome に入れるべきです。
P0 — 「path らしさを推測する」設計は採用しない方がいいです
#2779 の現在の候補:
は危険です。
たとえば以下は十分あり得る repository path です。
GNU Coreutils の
pathchk -pが ASCII 英数字と._-/を「POSIX portable filename character set」として特別に検査しているのも、それが全ての有効なファイル名ではなく、移植可能な部分集合だからです。Python の pathlib の公式例にも非ASCII名が普通に登場します。:chatgpt-content-reference{index="1"}しかも current repo には、
のような本当に path である entry に read-only 注釈が付いている例もあります。したがって
読み取り専用という語の存在で落とすのも不正解です。採るべきなのは lexical heuristic ではなく explicit grammar です。
推奨は、
です。
たとえば canonical marker を
(none)にするのは妥当です。重要なのは(none)が「path らしくないから除外」ではなく、契約上予約された no-path token だから除外することです。P0 — 問題は
baseline_vc_preflight.extract_allowed_paths()の consumer だけではありません#2779 の In Scope は、
を調べる、としています。
これは不十分です。リポジトリには Allowed Paths を独自に parse している実装が複数あります。
確認できたものだけでも、
issue-contract-review/scripts/baseline_vc_preflight.pycreate-issue/scripts/path_classification.pycreate-issue/scripts/check_issue_overlap.pyissue-refinement-loop/scripts/check_vc_scope.pyissue-refinement-loop/scripts/plan_issue_scope_rollup.pyissue-refinement-loop/scripts/repair_issue_contract.pyimpl-review-loop/scripts/ensure_contract_snapshot.pyimpl-review-loop/scripts/build_intake_capsule.pyなどがあります。
特に
check_issue_overlap.pyは実害候補が大きいです。現在は、Allowed Pathsを抽出same_path_set()なら duplicate 候補にするという構造です。
したがって、候補比較まで到達した無関係な2つの research Issue がどちらも
を「path」として持つと、title/goal が違っても同一 Allowed Paths set として duplicate 判定経路に入れます。
「全 research Issue が常に duplicate になる」という意味ではありません。candidate discovery の条件があります。しかし、candidate に入った後にこの prose が path-overlap evidence として意味を持つこと自体が欠陥です。
よって調査対象は、
ではなく、
へ拡張すべきです。
これは新しい heavyweight validator を増やす必要はありません。既存 helper の共通化か、小さな parity regression test で十分です。
P1 — 既存 Issue の backward compatibility が AC にありません
現在、canonical phrase
を持つ OPEN Issue は24件確認できました。
そのうち少なくとも 8件が Verification Commands に
rgを含んでいます。#2605、#1934、#499、#2778、#1759、#2730 などです。全8件がこの不具合だけで必ず terminal になる、という意味ではありません。他の VC defect を持つものもあります。ただし、現在の checker に対して同じ false-positive 条件へ露出しています。
そのため、
だけでは不十分です。
既存 Issue を手動 rewrite させない方が、この個人開発リポジトリでは有用性が高いです。実装は、
という後方互換にするのが適切です。
既存24 Issueの一括書き換えや migration daemon は不要です。
P1 —
Allowed Pathsの意味を先に固定する必要があります#2762 にはさらに厄介な実例があります。
概略、
となっています。
2行目は「write-allowed path」ではなく、read/investigation target を説明する proseです。現在の parser はこれも path literal として扱い得ます。
したがって research の結論で、
Allowed Pathsは何を表す欄なのかを確定すべきです。
この repo の現在の用途なら、最も単純なのは、
です。
これなら read-only research と implementation authorization が混ざりません。
また
rgの path 無指定は ripgrep 自身が current directory 全体の再帰検索として扱います。公式ガイドでもrg fooはrg foo ./相当です。したがって no-path /.を broad としてブロックする現在の checker 方針自体は維持してよいです。:chatgpt-content-reference{index="2"}P1 — regression test が helper 単体だけでは不足します
#683 / PR #684 では backtick・注釈正規化の helper-level regression が入りました。それでも今回の別サブケースが残りました。
#2779 の implementation follow-up には最低限、次を要求した方がよいです。
読み取り専用。リポジトリ変更なし(既定)→allowed_paths == [](none)→allowed_paths == []rg pattern specific/file.py→broad_search_path_unboundedにならないrg pattern/rg pattern .→ 従来通り broaddocs/日本語。mdのような Unicode / punctuation path → path として保持some/path.py(読み取り専用)→ real path を保持operator_intervention_requiredへ落ちない integration regressioncheck_issue_overlapで、2つの read-only research Issue が no-path marker だけを理由にsame_path_set/ duplicate にならない特に 8 と 9 が重要です。単に
extract_allowed_paths()の戻り値だけ直して終えると、今回と同じ「別 consumer で残る」パターンを繰り返します。推奨する研究結論
#2779 の Open Question はかなり絞れます。
「prose 除外 heuristic」案は棄却し、「canonical no-path marker + legacy exact-marker compatibility」の組み合わせを採用するのが最も小さく、ワークフロー阻害も少ないです。
実装方針は次の程度で十分です。
新しい schema、常駐 validator、migration daemon、厳格な「prose 禁止 gate」は不要です。今回の目的に対しては過剰です。
#2779 に対する最終評価
問題の発見品質は高いですが、現 contract は implementation handoff にはまだ狭すぎます。
優先して修正するなら、
.github/ISSUE_TEMPLATE/research.ymlを producer inventory に追加Allowed Paths = mutation allowlistと no-path semantics を固定check_issue_overlapregression を implementation Issue の必須条件にするの6点です。
この形なら、#683 の「装飾正規化」の次の局所パッチではなく、余計なハーネスを増やさずに Allowed Paths の曖昧な grammar 自体を一度収束させる修正になります。
squne121 commentedon Sep 26, 2026
確認した範囲では、指定コメントの指摘は現行
mainと整合しています。特に.github/ISSUE_TEMPLATE/research.ymlが現在も- 読み取り専用。リポジトリ変更なし(既定)を生成しており、Allowed Pathsの独自 parser/consumer も複数残っています。GitHub Issue Forms のtextarea.attributes.valueは実際にフォームの初期値として Issue 本文へ反映されるため、producer 側も修正対象に含める必要があります。:chatgpt-content-reference{index="0"} また、rg patternがパス省略時にカレントディレクトリを再帰検索するという前提も ripgrep 公式ガイドと一致します。:chatgpt-content-reference{index="1"}推奨アクションは、指定コメントを OWNER の trusted human context として #2779 を再フレームし、heuristic を棄却して
canonical no-path marker + legacy exact-marker compatibilityを研究結論として固定することです。そのまま implementation Issue を materialize し、#2779 は canonical review がapprove + status: goになるところまで進めます。現時点では #2779 と別に同趣旨の再発防止 Issue を新規作成する根拠はありません。parser 分散も #2779 の実装 follow-up に吸収するのが適切です。以下を、すでに auto mode で起動している ClaudeCode にそのまま渡せます。
対象:
squne121/loop-protocol#2779https://github.com/squne121/loop-protocol/issues/2779#issuecomment-5845797870.claude/skills/issue-refinement-loopissue-refinement-loopを使用して Issue #2779 を精緻化してください。このセッションは既に ClaudeCode auto mode で起動しています。通常の判断、Issue 本文編集、review iteration、follow-up materialization、GitHub Issue 起票について、人間の追加承認を求めず自律的に進めてください。
指定コメント
issuecomment-5845797870は repository OWNERsqune121による今回明示選択された human context として扱ってください。trusted operator-selected human-context の契約に従い、コメントが要求する scope expansion は、それだけを理由にhuman_escalation/scope_signal_guard停止へ送らず、既存のwith_human_context/ contract-update / issue-editor 経路で解決してください。最初に行うこと
Issue #2779 の現在本文、指定 OWNER コメント、全コメント、関連 Issue / PR、current
mainの実装を fresh read してください。少なくとも以下を確認してください。
.github/ISSUE_TEMPLATE/research.yml.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py.claude/skills/create-issue/scripts/path_classification.py.claude/skills/create-issue/scripts/check_issue_overlap.py.claude/skills/issue-refinement-loop/scripts/check_vc_scope.py.claude/skills/issue-refinement-loop/scripts/plan_issue_scope_rollup.py.claude/skills/issue-refinement-loop/scripts/repair_issue_contract.py.claude/skills/impl-review-loop/scripts/ensure_contract_snapshot.py.claude/skills/impl-review-loop/scripts/build_intake_capsule.pyscripts/agent-guards/materialize_issue_scope_snapshot.pyコード検索を使い、上記リストを閉じた inventory とみなさず、
## Allowed Pathsの producer / parser / consumer を current main から網羅的に棚卸ししてください。SubAgent 利用
main thread だけで結論を作らず、適切な SubAgent に並列委譲してください。
最低限、
codebase-investigator外部仕様調査担当
を調査してください。
外部調査では一次資料を優先してください。
すべての SubAgent を開始した後、各 SubAgent の完了を必ず待って結果を取得してから判断・Issue 編集へ進んでください。fire-and-forget にしないでください。
以後も issue-editor / reviewer / issue-creator 等を SubAgent に委譲した場合、必ずその作業完了を join して結果を検証してから次の routing を行ってください。
#2779 で確定させる研究結論
指定 OWNER コメントを起点として事実確認し、current main と矛盾しなければ、以下を contract の明確な設計判断として確定してください。
1. Allowed Paths の意味
## Allowed Pathsは repository mutation の allowlist と定義する。read-only / research Issue の調査対象ファイルを列挙する欄として兼用しない。
調査対象は In Scope / Required Design References / Findings / Verification Commands 等へ記述する。
2. lexical heuristic を棄却
以下のような推測ベースの prose 除外は採用しない。
。等の句読点があるから prose読み取り専用という文字を含むから proseUnicode、句読点、空白等を含む正当な repository path を壊し得るため。
3. explicit no-path grammar
canonical no-path marker を明示的な予約 token として定義する。
第一候補は:
(none)は「path に見えないから除外」するのではなく、契約上予約された no-path marker として 0 paths に解釈する。4. backward compatibility
既存 Issue を一括 rewrite しない。
少なくとも legacy exact marker:
を 0 paths として解釈する後方互換を要求する。
基本 semantics:
legacy marker の fuzzy / substring matching は導入しない。
5. producer inventory
canonical marker 採用時は parser だけでなく producer も同期させる。
最低でも current main の:
を明示的な対象に含める。
create-issue / edit-issue その他の producer については current main を検索し、実際に該当 producer が存在するものだけ scope に含めること。
6. parser/consumer inventory
調査対象を
だけに限定しない。
## Allowed Pathsを独自 parse している producer/parser/consumer 全体を対象にし、間で no-path semantics が一致する設計にする。
新しい heavyweight validator、daemon、常設 migration harness は追加しない。
既存 canonical helper の再利用、または小さな shared parser/helper と parity regression で解決できるならそちらを優先する。
implementation follow-up に必須とする regression
implementation Issue の Acceptance Criteria / Verification Commands は、最低限次を実証できる形にしてください。
legacy exact marker
読み取り専用。リポジトリ変更なし(既定)→ zero paths
canonical marker
(none)→ zero paths
read-only body +
rg pattern specific/file.py→ no-path prose の誤解釈だけを理由に
broad_search_path_unboundedにならないrg patternおよびrg pattern .→ 従来どおり broad と判定される
docs/日本語。md等の Unicode / punctuation を含む real path→ path として保持される
some/path.py(読み取り専用)→既存の annotation normalization semantics を壊さず real path を保持する
調査: SubAgent の Bash/Write/Edit tool 経由操作が pre-existing untracked file を意図せず削除・上書きする guard gap を調査する #2762 型の mixed prose
→ mutation allowlist と investigation prose を混同しない仕様を明示し regression 化する
調査: markdownlint-cli2 の gitignore option 導入是非を検討する #2730 と同型の contract/body を canonical Step 2 pipeline に通し、
この defect を理由として
operator_intervention_requiredに落ちない integration regression
check_issue_overlapで、無関係な2つの read-only research Issue がno-path marker の一致だけを理由に
same_path_set/ duplicate evidenceを得ない regression
helper 単体テストだけで終了しないでください。#683 / PR #684 後にも別 consumer/subcase で今回の defect が残った事実を踏まえ、consumer-level/integration coverage を含めてください。
#2779 本文の編集
current body を部分パッチで継ぎ足して矛盾させず、必要であれば issue-editor に full rewrite を委譲してください。
少なくとも以下を更新してください。
OWNER コメント内の
:chatgpt-content-reference{...}のような ChatGPT 内部参照文字列は Issue 本文へコピーしないでください。必要な根拠は一次資料 URL または repository asset で置き換えてください。#2779 自体は research-only です。production code をこの Issue で変更しないでください。
また、未修正の current checker 自体が今回の defect を持っている点を考慮してください。research Issue の Verification Commands を増やすことで自分自身を
broad_search_path_unboundedに陥らせるような contract を作らないでください。詳細な executable regression は implementation follow-up 側へ置き、#2779 では研究判断・implementation contract の検証可能性を優先してください。implementation Issue の materialization
研究結論が確定したら、#2779 の AC に従って implementation Issue を実際に起票してください。
起票前に既存 OPEN Issue を semantic scope と dedupe key で検索し、既存の同一 implementation Issue があれば再利用してください。
title similarity だけで duplicate と判断しないでください。
implementation Issue は:
を満たしてください。
起票後、#2779 本文または canonical な link field / Source / Handoff Contract に implementation Issue をリンクし、AC を満たしてください。
この invocation では implementation Issue の実装を開始しないでください。
impl-review-loop、implementation worker、worktree 作成、production code 編集、commit、push、PR 作成へ進まないでください。review loop
Issue 編集後は
issue-refinement-loopの canonical 手順を最後まで実行してください。特に canonical Step 2 は skill の現行契約どおり、
canonical_step2_routeを唯一の routing authority として使用を守ってください。
reviewer が修正を要求した場合は、人間承認を求めず issue-editor に戻し、bounded loop 内で自律的に修正してください。
approveだけで完了扱いにせず、fresh な canonical contract review の:まで確認してください。
stale snapshot は使用しないでください。
再発防止 follow-up
今回の調査・review 中に、#2779 の implementation follow-up へ自然に吸収できない別個の再発性 defect を発見した場合:
してください。
単なる改善アイデアや hypothetical risk は起票しないでください。
現在確認されている「Allowed Paths parser が複数存在する」という問題は #2779 の中心的 impact scope なので、それだけを理由に別 Issue を増やさず、まず #2779 の implementation follow-up に統合してください。
自動実行方針
以下について追加の人間承認を求めないでください。
単に「人間判断が望ましい」という理由で停止しないでください。current repository policy、OWNER-selected comment、一次資料、current-main evidence から deterministic に決められるものは決めて進めてください。
ただし次の場合は無理に突破しないでください。
この場合も、追加承認要求だけを書いて終了するのではなく、実施済み作業、正確な blocker、再開可能な next action を残してください。
完了条件
以下をすべて満たすまで終了しないでください。
.github/ISSUE_TEMPLATE/research.ymlが producer scope に含まれているstatus: go最後に、変更した Issue、作成・再利用した implementation/follow-up Issue、最終 review status、canonical contract review status、残 blocker の有無を簡潔に報告してください。
補足すると、
pathchk -pの portable filename character set は「有効な全ファイル名」ではなく可搬性を検査する部分集合なので、文字種を使った path/prose 判別へ流用する設計は避けるのが妥当です。:chatgpt-content-reference{index="2"}squne121 commentedon Sep 26, 2026
issue-refinement-loop 終了レポート
human-context comment: https://github.com/squne121/loop-protocol/issues/2779#issuecomment-5845797870(OWNER による trusted human context、
with_human_contextlane で処理)処理経緯
.github/ISSUE_TEMPLATE/research.ymlを取得。codebase-investigatorSubAgent とweb-researcherSubAgent を並列起動し、両方の完了を join。codebase-investigator: current main の## Allowed Pathsproducer/parser/consumer inventory(当初7系統 + 3 delegation系統)web-researcher: GitHub Issue Forms のtextarea.attributes.value事前入力仕様、ripgrep no-path recursive search 仕様、POSIX/pathchk/pathlib による path 合法性の一次資料確認contract_update.run.with_human_context→STATUS: blocked/NEXT_ACTION: human_judgment_required(BLOCKERS: PLANNER_FAIL_CLOSED)。scope_signal_delta.classify_scope_delta_authority()を直接実行し根本原因を特定: directive のdirective.confidenceは"explicit"だがdetect_boundary_flags()がexpands_allowed_paths: trueを検出しroute.action: human_escalationになっていた(## Allowed Pathsという語 + 複数の repository path literal の列挙が false positive trigger)。investigation_derived_path_literalsによる 実装: operator-selected human context の scope reframe を自動継続し scope expansion stop を撤去する #2086 AC3 の救済経路も試したが、contract_patch_plan.operationsが非空化しdecide_human_review_directive_editor_route()(実装: trusted human contract feedback を controlled editor handoff に接続する #2620)のoperations_emptyeligibility を満たせないことを確認した。この独立した control-plane defect は再発防止 Issue 調査: trusted human-context directive の Allowed Paths boundary/operation が section-local source binding を失う #2785 として記録した(下記参照)。contract_updateを no-progress retry せず(write は 0 のまま)、issue-editorSubAgent による controlled full-rewrite(reviewer_feedback_urlに anchor comment URL を使用)で Issue 本文を全面改稿した。preflight.run.with_human_context→STATUS: pass/NEXT_ACTION: proceed。run_root_review_pipeline.py produce、background 起動・完了 join)→ 当初canonical_step2_route: step_5_operator_intervention_required(VC preflight allowlist 外のコマンド形 + 本 Issue 自身の Allowed Paths(none)に対する broad-path 誤検知 + 未確定 issue 番号 placeholder の分類不能、計3件の blocking issue)。issue-editorによる2回の部分パッチ(Verification Commands の command-form修正、baseline-expect注釈追加)で解消し、canonical_step2_route: step_2_5/verdict: approveに到達。issue-design-reviewerSubAgent、3サイクル、都度 pin-bundle → 起動・completion join → record-result → join_review_results):scripts/agent-ops/pr_head_replay_publish_exec.py::_allowed_paths()という8番目の独立 parser を欠落)。独立検証の上で issue-editor へ転送し、Findings 6 の表を7系統→8系統へ修正。issue_contract_hygiene_autofix.pyの defect confidence の hedge表現、per-system regression coverage の一部欠落)。finding_policy: route_high_open_to_rewriteにより non-blocking(effective_verdict: approve)。effective_verdict: approve)。expands_allowed_pathsboundary flag の false positive +investigation_derived_path_literals適用時のoperations非空化)について dedupe検索(既存 OPEN Issue に重複なし)の上、research Issue 調査: trusted human-context directive の Allowed Paths boundary/operation が section-local source binding を失う #2785 を起票。STATUS: pass/NEXT_ACTION: proceed。最終 fresh canonical Step 2 review →canonical_step2_route: step_2_5/verdict: approve/blocking_issues: []。.claude/skills/issue-contract-review/scripts/run_contract_review_once.py(CONTRACT_REVIEW_RESULT_V1相当、CONTRACT_REVIEW_ONCE_RESULT_V1)を 調査: read-only Issue の Allowed Paths prose が rg VC の broad-path 誤検知を起こす #2779 に対して実行しstatus: goを確認(VC preflight もpass)。Contract に反映した主要 delta
## Allowed Paths= repository mutation の allowlist と定義し、read-only Issue の調査対象列挙欄との兼用を廃止(none)+ legacy exact marker読み取り専用。リポジトリ変更なし(既定)の後方互換 semantics を確定(exact match のみ、fuzzy/substring matching は不採用).github/ISSUE_TEMPLATE/research.ymlのみが該当(GitHub Issue Forms のtextarea.attributes.value事前入力仕様を一次資料で確認)baseline_vc_preflight.py/check_issue_overlap.py/path_classification.py/check_vc_scope.py/plan_issue_scope_rollup.py/repair_issue_contract.py/issue_contract_hygiene_autofix.py/pr_head_replay_publish_exec.py)+ canonical delegation 3系統を確定主要 evidence
codebase-investigator: current main の producer/parser/consumer inventory(当初7系統検出、semantic design review で8系統目を追加確認)web-researcher: GitHub 公式ドキュメント(Issue Forms syntax)、ripgrep 公式 GUIDE.md、POSIX.1-2017、GNU Coreutilspathchkマニュアル、Pythonpathlib公式ドキュメントによる一次資料確認scope_signal_delta.classify_scope_delta_authority()の直接実行による PLANNER_FAIL_CLOSED 根本原因診断scripts/agent-ops/pr_head_replay_publish_exec.py::_allowed_paths()(L74-100)の直接読解による8番目 parser の独立確認Follow-up Issue
expands_allowed_pathsboundary flag の false positive +investigation_derived_path_literals適用時のoperations非空化により 実装: trusted human contract feedback を controlled editor handoff に接続する #2620/実装: operator-selected human context の scope reframe を自動継続し scope expansion stop を撤去する #2086 AC3 いずれの自動解決経路にも到達できない control-plane defect)Terminal Verdict
canonical_step2_disposition:route: step_2_5→ semantic design review 3サイクル完了 →effective_verdict: approveCONTRACT_REVIEW_ONCE_RESULT_V1.status: go(.claude/skills/issue-contract-reviewの readiness checker、VC preflight pass)実装作業(
impl-review-loop、implementation worker、worktree 作成、production code 編集、commit、push、PR 作成)はこの invocation では一切開始していない。起動した全 SubAgent(
codebase-investigator×1、web-researcher×1、issue-editor×5、issue-design-reviewer×3、issue-creator×2)はすべて完了を join済み。squne121 commentedon Sep 27, 2026
全 child issue(#2783)がマージ済み PR #2791 の完了をもってクローズされたため、本 research issue をクローズします。post-merge-cleanup(PR #2791 完了後)による自動判定。