Skip to content

再発防止: Markdown/prose lint VC の対象ゼロ件 false-green を authoring ガイダンスで防ぐ #3034

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "Markdown/prose lint の Issue VC が glob/ignore 設定で変更対象を1件も検査しないのに exit 0 を PASS とみなす false-green を、VC authoring の最小ガイダンスで防ぐ"
change_kind: docs
dedupe_key: "agent-ops:vc-lint-ignored-target-zero-coverage-authoring-guidance:v1"

Parent Issue

なし(独立した再発防止)。発見元は #3031 の OWNER review。

Parent Goal Ref

  • Goal: lint VC の exit 0 と「要求した変更対象が実際に検査された」を区別し、後者の証拠が無い false-green を再発させない。
  • Destination: 既存 .claude/skills/create-issue/references/body-authoring.md の「VC 作成ガイダンス」に、短い指針と実測済みの具体例を追加する。

Current Validated Scope

Remaining Parent Gaps

なし。#3031 の AC9 自体の修正は #3031 の issue-refinement-loop が担当し、本 Issue は将来の Issue contract authoring に適用する再発防止だけを担当する。

Background

CI や lint コマンドが全体として exit 0 を返しても、config の ignore / glob / gitignore や既存 baseline 除外により、実際に更新した Markdown を検査していないことがある。#3031 の事例はこの false-green を具体的に示す。さらに、showFound の Found: や Linting: N を見て対象を検査したと判断すると、列挙と実検査のあいだに残る除外処理を見逃し、別の false-green が生まれる。Issue ごとの一時的な VC 修正だけでは、後続 Issue の contract 作成時に同じ誤りを繰り返しうる。

Outcome

将来の Markdown/prose lint VC の author は、「列挙された対象」と「実際に検査された対象」と「lint の verdict(exit code)」を区別し、要求した対象がすべて実検査されたことを示す VC を設計できる。新たな hook / schema / CI gate / wrapper は導入しない。

Runtime Verification Applicability

decision: not_applicable
reason: "VC authoring ガイダンスのみの Markdown 変更であり実ランタイムは変更しない"

In Scope

追記先は .claude/skills/create-issue/references/body-authoring.md の既存 ## VC 作成ガイダンス 節の末尾(次の ## VC_SINGLE_COMMAND_GUARDRAIL の直前)に新設する、見出しレベル ### の lint VC の対象 coverage(列挙と実検査の区別) の1節だけである。挿入位置は VC では確認せず、reviewer が照合する。

  1. 集合の区別: 期待対象集合を E、実際に lint 処理された集合を P と定義する。PASS に必要な条件は E ⊆ P である。ゼロ件、一部欠落、処理確認不能は PASS にしない。対象限定の検証例では、可能な限り P = E とする。
  2. 列挙は実検査の証拠ではない: showFound の Found: や Linting: N file(s) は列挙の証拠にすぎない。markdownlint-cli2 は列挙後にサブディレクトリの ignores を適用するため、これらの表示と exit 0 があっても対象は未検査でありうる。--config は cwd 設定を置換せず base として読まれ、cwd 設定が後から merge される(globs は結合、ignores 等の同名配列は置換)。cwd 設定が同名の ignores を持つ場合は、単に --config で ignores や globs を渡すだけでは除外を外せない。gitignore: true は git-ignored の対象を黙って除外し、config の globs は CLI の対象に合成されて別ファイルの診断が混ざる。いずれも、exit code や診断の有無から対象の検査を推定してはならない。
  3. negative control(canary): 意図的な違反(例: 言語指定のないコードフェンス MD040)を含む対象を含めて実行し、その違反が報告されることで、対象が実検査に到達したことを示す。:path 形式のリテラルパス指定も、Found: / Linting: N file(s) の表示だけでは実検査の証拠にならない(ignore 対象なら違反が報告されず exit 0 になる)。canary は、検証対象と同じディレクトリ・同じ設定スコープ・同じ指定経路(glob か literal path か)に置いた一時ファイルで行い、その後削除する。別の ignore 範囲に置いた canary の検出は、実対象が検査された証拠にならない。
  4. textlint の注意: --ignore-path は既定の .textlintignore を置換する。リテラルの明示パスは ignore されないが、glob 経由は ignore される。--output-file は違反があっても exit 0 になるため、exit code だけで判定しない。P は --format json の filePath 集合で確認し、E ⊆ P と exit code を別々に評価する。
  5. 実検査の確認方法(軽量): P を示す根拠を併記する。textlint は --format json の filePath 集合を使う。markdownlint-cli2 は、検査集合を直接出す機能に頼らず、canary(意図的違反の検出)を主たる根拠とする。showFound の一覧から per-directory の ignores を差し引く導出は補助の推論にすぎず、root の ignores・gitignore・--config の merge 結果の取りこぼしを検出できないため、単独では P の証拠にしない。canary は、その対象が検査に到達したことは示すが、E 内のほかの clean ファイルが検査されたことまでは示さない。E に複数の対象がある場合は、対象ごとに canary を置く。
  6. cwd と revision: cwd は、検証したい探索範囲と対象 revision に合わせる。通常の変更ファイル検査は、レビュー対象の変更内容が存在する worktree / checkout を対象にする。実装: body-authoring.md に lint 系 AC/VC の実行環境(worktree vs main repo root)を明示するガイドラインを追記する #217 / PR fix: eslint.config.mjs の ignores に .claude/worktrees/** を追加して worktree 環境での pnpm lint ノイズを排除する (#208) #215 は、main checkout 配下の worktree traversal と ESLint ignore を検証した個別の事例であり、すべての lint VC を main checkout で実行する規則ではない。実装: body-authoring.md に lint 系 AC/VC の実行環境(worktree vs main repo root)を明示するガイドラインを追記する #217 の実装や merge を本 Issue の前提にしない。
  7. baseline の切り分け: 既存違反と変更由来の違反を区別する。既存違反による非ゼロ終了を「PASS」と書き換えず、差分外ファイルの大規模改変や全体 ignore の廃止も要求しない。
  8. 実効性確認(実装時に一回): (a) 文書側: ガイダンスに掲載する限定 lint 例は、実行確認済みのものに限る旨と、証拠項目の一覧を記載する。(b) PR 側: 本 Issue の実装 PR 本文に、掲載例を一度だけ実行した実測証拠を記録する。(b) は VC では確認されず、reviewer が照合する。

Out of Scope

Acceptance Criteria

  • AC1: VC 作成ガイダンスに、見出し lint VC の対象 coverage(列挙と実検査の区別) の節が追加され、「lint の exit 0 は対象ファイルの coverage を保証しない」ことが、Found: / Linting: N file(s) と exit 0 があっても未検査になりうる具体例(違反を含む ignore 対象の :path 形式リテラルパス指定が 0 error・exit 0 になる negative control を含む)付きで説明される。
  • AC2: markdownlint-cli2 の ignores / globs / gitignore / --config の merge 順序(cwd 設定が後から merge される)と、textlint の .textlintignore / --ignore-path(置換)が、明示した path の実検査を妨げる例として記載される。gitignore: true による黙った除外と、config の globs 合成による別ファイル診断の混入も含む。--config が既存設定をすべて置換するという前提は採らず、実測できた範囲のみ記載し、未確認の挙動は断定しない。
  • AC3: 期待対象集合 E ⊆ 実検査集合 P を確認する軽量な方法が説明される。ゼロ件、一部欠落、処理確認不能は PASS にならない。showFound / Found: は列挙の証拠であり実処理の証拠ではないこと、textlint の --output-file は違反があっても exit 0 になること、P の根拠として --format json の filePath 集合(textlint)と canary(markdownlint-cli2)を使えること、showFound からの差し引きは補助にすぎず単独では P の証拠にならないことが明記される。
  • AC4: cwd は検証対象の内容・revision・探索範囲に合わせるという指針と、実装: body-authoring.md に lint 系 AC/VC の実行環境(worktree vs main repo root)を明示するガイドラインを追記する #217 / PR fix: eslint.config.mjs の ignores に .claude/worktrees/** を追加して worktree 環境での pnpm lint ノイズを排除する (#208) #215 が main checkout 配下の worktree traversal 検証の限定事例であること、既存違反と変更由来の違反の切り分け、新規 gate 不要の境界が明確に記載される。
  • AC5: (a) 文書側: ガイダンスは、掲載する限定 lint 例を実行確認済みのものに限ることを要求し、その証拠として installed version、対象 revision、cwd、期待対象集合 E、実検査集合 P の根拠、実際の exit code、diagnostics、既存違反と変更由来違反の区別を挙げる。(b) PR 側: 本 Issue の実装 PR 本文に、掲載例を一度実行した実測証拠が記録され、pnpm run lint:docs の一般結果とは別に記載される(lint:docs は body-authoring.md を検査しないため、対象の検査証拠として扱わない)。(b) は VC では確認されず、reviewer が AC1〜AC5 の記述の意味と実測証拠を照合する。

Verification Commands

# AC1
$ rg -n --fixed-strings 'lint VC の対象 coverage' .claude/skills/create-issue/references/body-authoring.md
# AC1
$ rg -n --fixed-strings 'negative control' .claude/skills/create-issue/references/body-authoring.md
# AC2
$ rg -n --fixed-strings 'showFound' .claude/skills/create-issue/references/body-authoring.md
# AC2
$ rg -n --fixed-strings 'gitignore' .claude/skills/create-issue/references/body-authoring.md
# AC2
$ rg -n --fixed-strings -- '--config' .claude/skills/create-issue/references/body-authoring.md
# AC2
$ rg -n --fixed-strings 'Linting:' .claude/skills/create-issue/references/body-authoring.md
# AC2
$ rg -n --fixed-strings -- '--ignore-path' .claude/skills/create-issue/references/body-authoring.md
# AC3
$ rg -n --fixed-strings 'E ⊆ P' .claude/skills/create-issue/references/body-authoring.md
# AC3
$ rg -n --fixed-strings 'canary' .claude/skills/create-issue/references/body-authoring.md
# AC3
$ rg -n --fixed-strings -- '--output-file' .claude/skills/create-issue/references/body-authoring.md
# AC3
$ rg -n --fixed-strings -- '--format json' .claude/skills/create-issue/references/body-authoring.md
# AC4
$ rg -n --fixed-strings 'main checkout' .claude/skills/create-issue/references/body-authoring.md
# AC4
$ rg -n --fixed-strings '変更由来' .claude/skills/create-issue/references/body-authoring.md
# AC5
$ rg -n --fixed-strings 'installed version' .claude/skills/create-issue/references/body-authoring.md

上記 VC は、今回追加する固有語の構造確認だけを行う(1 コマンドにつき単独の bare marker # AC<N> を1つ付ける。現行 validate_issue_body.py の LP016 は grouped marker を拒否するため、#1719 の完了を待たずに済む形にしている)。記述の意味的な正確性と、掲載例の実効性(PR 本文の実測証拠)は reviewer が照合する。

Allowed Paths

  • .claude/skills/create-issue/references/body-authoring.md

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • 新規 schema / hook / hard gate / wrapper が不可避の場合
  • 実装: Claude Code Auto memoryの保存判断を整理し、Issue/PR進捗の重複記録を抑制する #3031 の個別 AC9 を本 Issue の作業として変更する必要がある場合
  • 掲載する限定 lint 例を実行確認できず、E ⊆ P を示せない場合(未確認の例を載せない)
  • 不可逆削除や履歴破壊が必要な場合

Required Skills

なし(ガイダンスのみ。current Claude Code / repository / upstream 仕様を参照)

Required Design References

Delivery Rule

1 Issue = 1 Draft PR。既存の専用 issue worktree を確認・再利用し、人間の merge 判断まで進める。

Activity

  1. added
    enhancement
    on Oct 11, 2026
  2. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    判定:REQUEST_CHANGES

    P2 が3件あります。文書1ファイルへの追記という方針は維持してよいですが、検査証拠の定義、#217 の参照方法、Issue 自身の VC を修正すべきです。 特に、showFound を使うだけでは「対象が実際に検査された」ことを保証できず、再発防止の説明自体に false-green が残り得ます。

    今回は Issue 契約のレビューです。#3034 は確認時点でコメント0件、取得した timeline に実装 PR の関連付けはありませんでした。以下は、未公開の実装への指摘ではなく、現在の契約で誤った実装・検証が受け入れられる箇所への指摘です。

    Findings

    1. P2:showFound による「列挙」と「実検査」の間に、まだ除外処理がある

    問題

    In Scope 3 は、一時設定と showFound を使う選択証拠の例を要求し、AC3 は「対象ファイルの選択・処理を確認する」ことを要求しています。しかし、選択証拠から実処理の証拠へ進むための条件が未定義です。showFound を選択確認に使うこと自体は正しいものの、それだけで AC3 全体を満たす例を許してはいけません。

    リポジトリの lockfile が解決するバージョンは、markdownlint-cli2 0.17.2 と textlint 14.8.4 です。これは実行環境のインストール済みバージョンを測定した結果ではなく、今回のソース照合対象です。

    根拠

    [email protected] の実装順序は次のとおりです。

    ファイルを列挙して dirInfos を構築
        ↓
    Found: と Linting: N file(s) を出力
        ↓
    lintFiles() 内で、各ディレクトリの ignores を適用
        ↓
    除外後のファイルを markdownlint に渡す

    Found: と件数表示は lintFiles() 呼び出しより前です。一方、lintFiles() には、ディレクトリごとの ignores によって filesAfterIgnores を作る処理が残っています。upstream README も、サブディレクトリの ignore はファイル列挙後に適用されると説明しています。

    したがって、ソースから構成できる反例は、**「ルート側で列挙された対象を、下位設定が実検査前に除外する」**ケースです。この場合、対象名の Found: 出力と exit 0 があっても、対象を検査した証拠にはなりません。これは処理順序に基づく静的な反例であり、今回 CLI を実行して採取したログではありません。

    さらに、予定している「一時設定」にも注意が必要です。--config は、cwd の設定を無条件に置き換えるオプションではありません。 指定ファイルは base configuration として読み込まれ、その後に cwd の設定が通常どおり読み込まれます。実装でも、指定設定の後に cwd の設定を merge しています。単に一時設定へ ignores: [] や限定した globs を書いて渡すだけでは、リポジトリ側の除外・対象拡張が残り得ます。

    影響

    「exit 0 だけを見ない」という改善が、「exit 0 と Found を見ればよい」という別の不十分な判定に置き換わります。また、対象3件のうち1件だけ検査したケースも、「ゼロ件ではない」という確認では見逃します。

    最小修正

    AC3 と掲載例に、次の区別を入れてください。

    showFound は列挙の証拠であり、後段の除外がないことを確認せず実検査済みと扱わない。要求した対象ファイルがすべて実検査対象に含まれることを確認し、ゼロ件・一部欠落・確認不能を PASS としない。

    期待対象集合を E、実検査された集合を P とするなら、必要なのは E ⊆ P です。単なる 件数 > 0 ではありません。対象限定の例では、原則として P = E になる方が説明も検証も容易です。

    掲載する回避例は、設定の探索・優先順位まで含めて一度実行確認してください。新しい恒久 wrapper や target-count gate は不要です。

    2. P2:未実装の #217 を、そのまま一般的な cwd policy として参照している

    問題

    In Scope 5 は「#217 の cwd policy をそのまま参照」としています。しかし #217 は現在も open の実装 Issue であり、本文には、lint 系 VC は main repo root を cwd とするという一般化された要求が残っています。これは、今回の変更対象 Markdown を検査する場面へ無条件に適用すると不適切です。

    根拠

    #217 の発見元 PR #215 が検証したかったのは、main checkout の .claude/worktrees/ 配下が ESLint の traversal から除外されることでした。別 worktree 内で eslint . を実行しても、その sibling に当たる main 側の worktree 群を探索しないため、ignore の有効性を証明できない、という個別の問題です。OWNER のレビューコメントも、この探索範囲の不一致を指摘しています。

    PR #215 の最終的な証跡は、修正を main repo root の設定へ一時適用した上での検証でした。「main で実行すれば、どの変更でも正しい証拠になる」という先例ではありません。

    影響

    今回のように専用 worktree で body-authoring.md を更新している場合、main checkout 側の同名ファイルを検査しても、変更内容の品質確認にはなりません。

    対象選択の false-green を防ぐために、今度は 「正しいファイル名だが、古い内容を検査した」false-green を導入する可能性があります。また、未実装 Issue の内容を既存の確定済み policy と扱うことで、不必要な依存関係も生じます。

    最小修正

    #217/PR #215 は、次のように限定された事例として参照してください。

    cwd は検証したい探索範囲と対象 revision に合わせる。通常の変更ファイル検査は、レビュー対象の変更内容が存在する worktree/checkout を対象にする。#217/PR #215 は、main checkout 配下の worktree traversal を検証する場合の事例であり、すべての lint VC を main checkout で実行する規則ではない。

    #217 の実装を本 Issue に取り込む必要も、#217 が merge されるまで #3034 を止める必要もありません。必要なのは、参照の適用範囲を誤らせない数行です。

    3. P2:Issue 自身の AC マーカーが現行 parser と不整合で、修正後も既存語句による baseline 問題が残る

    問題

    現在の VC には、次のコメントがあります。

    # AC1-AC4: 単なる語句存在だけでなく、reviewer が意味と target-selection の例を照合する
    # AC5: 既存品質チェックの exit status と「実際の対象 coverage」は別途記録する

    現行の canonical parser は、単独の # AC1 や、接尾説明のない # AC1, AC2, AC3, AC4 を扱います。範囲表記や : 説明 付きのマーカーは正式な AC 参照として扱いません。

    根拠

    vc_contract_syntax.py は、この種の入力を suffixed_marker/colon_marker、LP016 として報告し、現在の実装ではそれらを static blocker に含めます。不正なマーカーにだけ現れる AC 参照は、正常な参照集合にも入りません。

    さらに、マーカーだけ直しても、少なくとも検索語の lint と 対象 は既存の body-authoring.md に既に存在します。現行 preflight の基本分類は baseline-fail expected なので、新しい説明を追加する前から成功する未注記の存在検査は、unexpected_pass による停止要因になります。

    影響

    本来は小さな文書改善なのに、契約レビューの入口で修復ループへ入ります。仮に既存語句の検索へ単純に baseline-expect: pass を付けても、今度は新しいガイダンスの追加を確認しない検査が残ります。

    最小修正

    マーカーは # AC1, AC2, AC3, AC4 と # AC5 にし、説明文を別のコメント行へ分けてください。その上で、構造確認用 VC は今回追加する固有の見出しや記述を対象にし、意味の妥当性は既に要求している reviewer の照合に残します。

    意図的に既存状態の確認を残すなら、現行の baseline annotation や pr_review_only の責務分担を適用します。ただし、それを新しい説明の充足証拠と混同しないことが必要です。parser や gate 側を変更して、この Issue の書式を受け入れる必要はありません。

    AC5 は「未検査の報告」に加え、掲載例の実効性を一度確認する形がよい

    AC5 が、既存除外による未検査を明示するとしている点は正しいです。ただし、現在の pnpm run lint:docs では、本 Issue 唯一の変更対象である body-authoring.md は markdownlint と textlint の双方から除外されます。したがって、そのコマンドだけでは、掲載する限定 lint 例が本当に動くかも、変更した文書が検査されたかも確認できません。

    AC3~AC5 は、次の程度の修正で十分です。

    AC | 追加・修正する内容 -- | -- AC3 | 列挙と実検査を区別し、要求した対象の全件包含を確認する。ゼロ件だけでなく一部欠落も PASS にしない。 AC4 | cwd は検証対象の内容・revision・探索範囲に合わせる。#217 は traversal 検証の事例として参照する。 AC5 | 掲載する限定検査の例を一度実行し、実行版、期待対象、実検査の根拠、実際の exit code、既存/変更由来違反を記録する。全体 lint:docs の結果とは分ける。

    この確認は PR 作成時の一回限りでよく、新規 CI job、専用 schema、恒久 helper は要りません。また、既存違反による非ゼロ終了を「コマンド PASS」と書き換えない一方、既存違反と変更由来違反を分離して、無関係な大規模 cleanup を避ける形が適切です。

    textlint の証跡保存にも、もう一つ注意点がある

    --ignore-path による代替 ignore 指定は公式にサポートされており、この方向は維持できます。ただし、フラグを指定した事実ではなく、実際の処理対象を確認する必要があります。textlint

    加えて、textlint 14.8.4 は --output-file 指定時、lint 違反があっても正常な出力処理後に exit 0 を返す実装です。ログ保存のためにこのオプションを付け、その exit code だけで判定すると、対象選択を直した後でも false-green が再発します。この挙動は現行公式 CLI 文書にも記載されています。textlint

    掲載例では、stdout を通常の実行ログとして取得するか、保存された診断内容も評価してください。これは現在の Issue に存在するコマンドの欠陥ではなく、実装時に回避すべき具体的な落とし穴です。

    維持すべき境界

    全体の ignore を外さない方針は維持すべきです。 #2777/PR #2781 は、生成物等の false-fail を減らしつつ、.claude/**・docs/** などの policy-specific な除外を意図的に残した変更です。#3034 のためにそれを撤回する必要はありません。

    同様に、#1103 が扱った既存 lint baseline と今回の対象選択は別問題です。全体設定の変更、既存 docs 全体の整形、恒久的な承認層の追加ではなく、正しく動く小さな例と、その証拠の読み方を同じ1ファイルへ追加するのが適切です。

    確認範囲と限界

    リポジトリ資産は main 60f0fc838e8b76a84c769a72b6361cd58e958e4d を基準に、#3034 本文・コメント・timeline、#3031 の OWNER 指摘、関連 Issue #217/#120/#1103/#2777、関連 PR #215 の本文・コメントと #2781 の差分、canonical VC parser、lint 設定・lockfileを照合しました。

    外部仕様は公式文書に加え、lockfile 解決版の upstream 実装まで確認しています。一方、ローカルでの CLI 実行、full preflight、実装後の検証は未実施です。GitHub への書き込みも行っていません。

    推奨は、上記3件を Issue 本文へ反映してから、元の1ファイル・docs-only の範囲で実装することです。

    ## 判定:REQUEST_CHANGES

    P2 が3件あります。文書1ファイルへの追記という方針は維持してよいですが、検査証拠の定義、#217 の参照方法、Issue 自身の VC を修正すべきです。 特に、showFound を使うだけでは「対象が実際に検査された」ことを保証できず、再発防止の説明自体に false-green が残り得ます。

    今回は Issue 契約のレビューです。#3034 は確認時点でコメント0件、取得した timeline に実装 PR の関連付けはありませんでした。以下は、未公開の実装への指摘ではなく、現在の契約で誤った実装・検証が受け入れられる箇所への指摘です。

    Findings

    1. P2:showFound による「列挙」と「実検査」の間に、まだ除外処理がある

    問題

    In Scope 3 は、一時設定と showFound を使う選択証拠の例を要求し、AC3 は「対象ファイルの選択・処理を確認する」ことを要求しています。しかし、選択証拠から実処理の証拠へ進むための条件が未定義です。showFound を選択確認に使うこと自体は正しいものの、それだけで AC3 全体を満たす例を許してはいけません。

    リポジトリの lockfile が解決するバージョンは、markdownlint-cli2 0.17.2 と textlint 14.8.4 です。これは実行環境のインストール済みバージョンを測定した結果ではなく、今回のソース照合対象です。

    根拠

    [email protected] の実装順序は次のとおりです。

    ファイルを列挙して dirInfos を構築
        ↓
    Found: と Linting: N file(s) を出力
        ↓
    lintFiles() 内で、各ディレクトリの ignores を適用
        ↓
    除外後のファイルを markdownlint に渡す
    

    Found: と件数表示は lintFiles() 呼び出しより前です。一方、lintFiles() には、ディレクトリごとの ignores によって filesAfterIgnores を作る処理が残っています。upstream README も、サブディレクトリの ignore はファイル列挙後に適用されると説明しています。

    したがって、ソースから構成できる反例は、**「ルート側で列挙された対象を、下位設定が実検査前に除外する」**ケースです。この場合、対象名の Found: 出力と exit 0 があっても、対象を検査した証拠にはなりません。これは処理順序に基づく静的な反例であり、今回 CLI を実行して採取したログではありません。

    さらに、予定している「一時設定」にも注意が必要です。--config は、cwd の設定を無条件に置き換えるオプションではありません。 指定ファイルは base configuration として読み込まれ、その後に cwd の設定が通常どおり読み込まれます。実装でも、指定設定の後に cwd の設定を merge しています。単に一時設定へ ignores: [] や限定した globs を書いて渡すだけでは、リポジトリ側の除外・対象拡張が残り得ます。

    影響

    「exit 0 だけを見ない」という改善が、「exit 0 と Found を見ればよい」という別の不十分な判定に置き換わります。また、対象3件のうち1件だけ検査したケースも、「ゼロ件ではない」という確認では見逃します。

    最小修正

    AC3 と掲載例に、次の区別を入れてください。

    showFound は列挙の証拠であり、後段の除外がないことを確認せず実検査済みと扱わない。要求した対象ファイルがすべて実検査対象に含まれることを確認し、ゼロ件・一部欠落・確認不能を PASS としない。

    期待対象集合を E、実検査された集合を P とするなら、必要なのは E ⊆ P です。単なる 件数 > 0 ではありません。対象限定の例では、原則として P = E になる方が説明も検証も容易です。

    掲載する回避例は、設定の探索・優先順位まで含めて一度実行確認してください。新しい恒久 wrapper や target-count gate は不要です。

    2. P2:未実装の #217 を、そのまま一般的な cwd policy として参照している

    問題

    In Scope 5 は「#217 の cwd policy をそのまま参照」としています。しかし #217 は現在も open の実装 Issue であり、本文には、lint 系 VC は main repo root を cwd とするという一般化された要求が残っています。これは、今回の変更対象 Markdown を検査する場面へ無条件に適用すると不適切です。

    根拠

    #217 の発見元 PR #215 が検証したかったのは、main checkout の .claude/worktrees/ 配下が ESLint の traversal から除外されることでした。別 worktree 内で eslint . を実行しても、その sibling に当たる main 側の worktree 群を探索しないため、ignore の有効性を証明できない、という個別の問題です。OWNER のレビューコメントも、この探索範囲の不一致を指摘しています。

    PR #215 の最終的な証跡は、修正を main repo root の設定へ一時適用した上での検証でした。「main で実行すれば、どの変更でも正しい証拠になる」という先例ではありません。

    影響

    今回のように専用 worktree で body-authoring.md を更新している場合、main checkout 側の同名ファイルを検査しても、変更内容の品質確認にはなりません。

    対象選択の false-green を防ぐために、今度は 「正しいファイル名だが、古い内容を検査した」false-green を導入する可能性があります。また、未実装 Issue の内容を既存の確定済み policy と扱うことで、不必要な依存関係も生じます。

    最小修正

    #217/PR #215 は、次のように限定された事例として参照してください。

    cwd は検証したい探索範囲と対象 revision に合わせる。通常の変更ファイル検査は、レビュー対象の変更内容が存在する worktree/checkout を対象にする。#217/PR #215 は、main checkout 配下の worktree traversal を検証する場合の事例であり、すべての lint VC を main checkout で実行する規則ではない。

    #217 の実装を本 Issue に取り込む必要も、#217 が merge されるまで #3034 を止める必要もありません。必要なのは、参照の適用範囲を誤らせない数行です。

    3. P2:Issue 自身の AC マーカーが現行 parser と不整合で、修正後も既存語句による baseline 問題が残る

    問題

    現在の VC には、次のコメントがあります。

    # AC1-AC4: 単なる語句存在だけでなく、reviewer が意味と target-selection の例を照合する
    # AC5: 既存品質チェックの exit status と「実際の対象 coverage」は別途記録する

    現行の canonical parser は、単独の # AC1 や、接尾説明のない # AC1, AC2, AC3, AC4 を扱います。範囲表記や : 説明 付きのマーカーは正式な AC 参照として扱いません。

    根拠

    vc_contract_syntax.py は、この種の入力を suffixed_marker/colon_marker、LP016 として報告し、現在の実装ではそれらを static blocker に含めます。不正なマーカーにだけ現れる AC 参照は、正常な参照集合にも入りません。

    さらに、マーカーだけ直しても、少なくとも検索語の lint と 対象 は既存の body-authoring.md に既に存在します。現行 preflight の基本分類は baseline-fail expected なので、新しい説明を追加する前から成功する未注記の存在検査は、unexpected_pass による停止要因になります。

    影響

    本来は小さな文書改善なのに、契約レビューの入口で修復ループへ入ります。仮に既存語句の検索へ単純に baseline-expect: pass を付けても、今度は新しいガイダンスの追加を確認しない検査が残ります。

    最小修正

    マーカーは # AC1, AC2, AC3, AC4 と # AC5 にし、説明文を別のコメント行へ分けてください。その上で、構造確認用 VC は今回追加する固有の見出しや記述を対象にし、意味の妥当性は既に要求している reviewer の照合に残します。

    意図的に既存状態の確認を残すなら、現行の baseline annotation や pr_review_only の責務分担を適用します。ただし、それを新しい説明の充足証拠と混同しないことが必要です。parser や gate 側を変更して、この Issue の書式を受け入れる必要はありません。

    AC5 は「未検査の報告」に加え、掲載例の実効性を一度確認する形がよい

    AC5 が、既存除外による未検査を明示するとしている点は正しいです。ただし、現在の pnpm run lint:docs では、本 Issue 唯一の変更対象である body-authoring.md は markdownlint と textlint の双方から除外されます。したがって、そのコマンドだけでは、掲載する限定 lint 例が本当に動くかも、変更した文書が検査されたかも確認できません。

    AC3~AC5 は、次の程度の修正で十分です。

    AC 追加・修正する内容
    AC3 列挙と実検査を区別し、要求した対象の全件包含を確認する。ゼロ件だけでなく一部欠落も PASS にしない。
    AC4 cwd は検証対象の内容・revision・探索範囲に合わせる。#217 は traversal 検証の事例として参照する。
    AC5 掲載する限定検査の例を一度実行し、実行版、期待対象、実検査の根拠、実際の exit code、既存/変更由来違反を記録する。全体 lint:docs の結果とは分ける。

    この確認は PR 作成時の一回限りでよく、新規 CI job、専用 schema、恒久 helper は要りません。また、既存違反による非ゼロ終了を「コマンド PASS」と書き換えない一方、既存違反と変更由来違反を分離して、無関係な大規模 cleanup を避ける形が適切です。

    textlint の証跡保存にも、もう一つ注意点がある

    --ignore-path による代替 ignore 指定は公式にサポートされており、この方向は維持できます。ただし、フラグを指定した事実ではなく、実際の処理対象を確認する必要があります。textlint

    加えて、textlint 14.8.4 は --output-file 指定時、lint 違反があっても正常な出力処理後に exit 0 を返す実装です。ログ保存のためにこのオプションを付け、その exit code だけで判定すると、対象選択を直した後でも false-green が再発します。この挙動は現行公式 CLI 文書にも記載されています。[textlint](https://textlint.org/docs/cli/)

    掲載例では、stdout を通常の実行ログとして取得するか、保存された診断内容も評価してください。これは現在の Issue に存在するコマンドの欠陥ではなく、実装時に回避すべき具体的な落とし穴です。

    維持すべき境界

    全体の ignore を外さない方針は維持すべきです。 #2777/PR #2781 は、生成物等の false-fail を減らしつつ、.claude/**・docs/** などの policy-specific な除外を意図的に残した変更です。#3034 のためにそれを撤回する必要はありません。

    同様に、#1103 が扱った既存 lint baseline と今回の対象選択は別問題です。全体設定の変更、既存 docs 全体の整形、恒久的な承認層の追加ではなく、正しく動く小さな例と、その証拠の読み方を同じ1ファイルへ追加するのが適切です。

    確認範囲と限界

    リポジトリ資産は main 60f0fc838e8b76a84c769a72b6361cd58e958e4d を基準に、#3034 本文・コメント・timeline、#3031 の OWNER 指摘、関連 Issue #217/#120/#1103/#2777、関連 PR #215 の本文・コメントと #2781 の差分、canonical VC parser、lint 設定・lockfileを照合しました。

    外部仕様は公式文書に加え、lockfile 解決版の upstream 実装まで確認しています。一方、ローカルでの CLI 実行、full preflight、実装後の検証は未実施です。GitHub への書き込みも行っていません。

    推奨は、上記3件を Issue 本文へ反映してから、元の1ファイル・docs-only の範囲で実装することです。

  3. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    推奨アクション

    Issue #3034 の OWNER REQUEST_CHANGES(P2 × 3)を受け入れ、issue-refinement-loop を人間の反復承認なしで実行する方針を推奨します。

    対象は Issue #3034 の指定コメント です。

    現行 Issue 本文と OWNER コメントを確認したところ、対応の中心は次の3点です。

    優先 | 修正事項 | 必要な対応 -- | -- | -- P2-1 | showFound による false-green | 列挙と実検査を区別し、期待対象集合 E ⊆ P を要求する P2-2 | #217 の cwd 規則の過度な一般化 | 対象 revision と探索範囲に応じた cwd 選択へ修正する P2-3 | AC/VC マーカーと baseline の不整合 | 正規 AC マーカーに修正し、変更固有の記述を検証する

    加えて AC5 に、掲載する限定 lint 例の実行確認を追加します。textlint の --output-file による exit 0 の誤判定も避けます。

    承認するのは Issue 契約の編集・検証・再レビュー・通常の修復反復です。 Claude Code の permission bypass や repository の canonical stop condition の無視ではありません。

    対象はあくまで docs-only・単一ファイルの実装契約です。新規 gate、wrapper、schema、全体 lint 設定の変更は不要です。

    現行 Skill との整合性

    現行 issue-refinement-loop/SKILL.md では、通常の反復承認は既定で不要で、最大反復数は3です。また、Step 2 は root-owned review pipeline が担当し、バックグラウンド実行の完了結果を取得してから判定する契約です。

    今回のコメントは OWNER のレビューコメントとして確認しました。ユーザーが明示的に選択した human-context anchor として扱い、preflight.run.with_human_context を使う構成が適切です。ただし、GitHub 投稿者情報だけで人間が直接投稿したと証明されたものとしては扱いません。

    外部仕様も確認できました。markdownlint-cli2 の ignores はディレクトリによってファイル列挙後に適用される場合があり、textlint は --output-file 指定時に lint 違反があっても exit 0 を返します。

    GitHub
    +2

    対話的 Claude Code 用プロンプト

    以下を、既に auto mode で起動しているセッションへ貼り付けてください。

    Issue #3034 — OWNER REQUEST_CHANGES 対応・自律 refinement

    対象 repository: squne121/loop-protocol

    対象 Issue:
    https://github.com/squne121/loop-protocol/issues/3034

    OWNER review anchor:
    https://github.com/squne121/loop-protocol/issues/3034#issuecomment-6107698075

    使用 Skill:
    .claude/skills/issue-refinement-loop/SKILL.md

    目的

    既に auto mode で起動している対話的 Claude Code セッションを継続し、Issue #3034 の OWNER REQUEST_CHANGES(P2 × 3)を反映する。

    current issue-refinement-loop を正規手順で実行し、Issue 本文の修正、検証、独立レビュー、必要な再修正、終了報告まで、人間の反復承認なしで自律的に完遂する。

    今回の invocation は Issue refinement 専用。実装 PR の作成や impl-review-loop 起動までは要求しない。

    1. 明示的な実行承認

    OWNER の3件の REQUEST_CHANGES と、AC5 の実効性確認に関する追加指摘を修正要求として受け入れる。

    以下を事前承認する。

    通常の needs-fix、既知の AC/VC syntax error、修正可能な readiness failure は、可能な限り自律的に解消する。

    iteration ごとの人間承認は要求しない。

    この承認は Claude Code permissions / hooks / capability preflight の迂回を意味しない。bypassPermissions や --dangerously-skip-permissions は設定しない。既存 auto mode を維持する。

    2. Fresh intake と canonical Skill 確認

    最初に current repository と GitHub live state を取得する。

    Issue #3034 の本文、指定コメント、その他のコメント、関連 Issue/PR、current main、作業中 worktree、既存 run-state を確認する。

    既存作業や他タスクの dirty work を上書きしない。重複 worktree・branch・Issue は作成しない。

    次の current 資産を確認する。

    • AGENTS.md、CLAUDE.md、関連 .claude/rules/**

    • issue-refinement-loop/SKILL.md と必要な references/**

    • anchor-comment-handling.md

    • ac-vc-reflection.md

    • semantic-design-review.md

    • termination-policy.md

    • follow-up-materialization.md

    • scripts/command_registry.py

    • .claude/agents/codebase-investigator.md

    • .claude/agents/issue-editor.md

    • 必要なら .claude/agents/web-researcher.md

    今回の OWNER anchor は、operator が明示的に選択した human context として扱う。

    canonical main root から、Skill に記載された preflight.run.with_human_context profile を使用する。単なる URL から origin を推定した扱いにしない。

    preflight の canonical 実行形は current Skill / command registry と照合する。指定する Issue は3034、anchor は上記 URL。

    trusted contract patch plan が得られた場合のみ、root control-plane が contract_update.run.with_human_context を実行する。

    同一 mutation を無条件に繰り返さない。issue_editor_required なら正規 issue-editor 経路へ handoff する。

    SubAgent に root-only の privileged executor を実行させない。

    3. OWNER finding の修正要件

    P2-1: 対象列挙と実検査を区別する

    Issue の In Scope / AC3 / AC5 / Verification Commands を整合させる。

    期待対象集合を E、実際に lint 処理された集合を P とする。

    PASS に必要な coverage 条件は E ⊆ P。対象限定の検証例では可能な限り P = E とする。

    ゼロ件、一部欠落、処理確認不能は PASS としない。

    showFound / Found: は列挙証拠であり、実処理証拠ではないことを明示する。

    markdownlint-cli2 の subdirectory ignores、config merge order、root globs、gitignore を考慮する。

    --config が既存設定をすべて置換するという前提は禁止。

    textlint の ignore-path と --output-file の exit-code 挙動も説明する。

    掲載する検証例は、実検査対象の包含と lint verdict を区別できるものにする。

    P2-2: #217 の cwd policy を限定的に参照する

    #217 / PR #215 の目的は、main checkout 配下の worktree traversal と ESLint ignore の検証だった。

    全 lint VC を main root で実行する一般規則として参照しない。

    通常の変更ファイル検査では、変更内容が存在する対象 worktree / revision を検証する。

    cwd、探索範囲、対象ファイル内容、revision identity の整合を説明する。

    #217 自体の実装や merge を #3034 の前提条件にしない。

    P2-3: AC/VC parser と baseline expectation を修正する

    current vc_contract_syntax.py と関連 validator を確認する。

    # AC1-AC4: や # AC5: のような不正 marker を廃止する。

    canonical marker の例:

    # AC1, AC2, AC3, AC4

    # AC5

    説明は別のコメント行へ分離する。

    rg 'lint' など既存文書に既に存在する語句のみを検索して、新規ガイダンスを検証したと判断しない。

    構造確認 VC は今回追加する固有の記述・見出し等に対応させる。

    意味的な正確性の判断は reviewer に残す。

    必要な baseline annotation / preflight-scope は既存 contract に従う。

    この Issue の記法を受け入れるために parser / gate / schema を改変してはならない。

    AC5: 実効性確認の契約を追加する

    掲載する限定 lint 例について、実装時に一回確認することを明記する。

    要求する証拠は installed version、対象 revision、cwd、期待対象集合、実検査集合の根拠、実 exit code、diagnostics、既存違反と変更由来違反の区別。

    pnpm run lint:docs の一般結果と、変更ファイル自体の実検査証拠を混同しない。

    既存違反による非ゼロ終了を PASS に偽装しない。

    新規 CI gate / wrapper / schema / 恒久的 lint 設定変更は追加しない。

    4. SubAgent orchestration

    必要な SubAgent を current planner policy に従って利用する。

    codebase-investigator には、VC parser、issue authoring guidance、lint config、関連 Issue/PR、version evidence の調査を委譲する。

    web-researcher は planner が required と判断した場合に起動する。markdownlint-cli2 と textlint の公式仕様、該当バージョンの source behavior を対象にする。

    issue-editor は既存 Issue 本文の rewrite が必要な場合に使う。

    canonical Step 2 の代わりに issue-reviewer SubAgent を起動しない。Step 2 は root-owned run_root_review_pipeline.py produce を用い、current Skill が要求する background launch + mandatory completion join に従う。

    各 SubAgent へ渡す task には対象 Issue、anchor、調査目的、権限境界、参照すべき SSOT、必要 evidence、期待 output を明示する。

    独立調査は並列化してよい。ただし dependent mutation は順序を守る。

    全 SubAgent の terminal result と artifact を取得してから downstream へ進む。

    dispatch 成功を作業完了として扱わない。background task も completion notification と実結果を join する。

    SubAgent の findings と canonical deterministic verdict を混同しない。

    5. Review / fix loop

    current Skill の Step 0 → Step 0f → Step 0g(該当時)→ Step 1 / 1b → Step 2 → Step 2.5(該当時)→ Step 4 → Step 4.5 → Step 5 を実行する。

    Step 2 の routing authority は producer の canonical_step2_route とする。自然言語で独自再判定しない。

    修正後は必ず fresh Issue body readback と fresh review を行う。

    body SHA、artifact identity、canonical readiness を確認する。

    通常の needs-fix は max_iterations 以内で修正・再レビューする。

    max_iterations は current Skill の既定3とし、上限や no-progress guard を越えて実行しない。

    environment/integrity failure と semantic review finding を同一視しない。修復可能な環境問題は正規 recovery 手順で対処する。

    human_judgment_required、真正の scope conflict、authority violation、整合性の回復不能など、canonical hard stop の場合だけ bounded escalation する。

    6. 再発防止 Issue

    新たに観測した独立した failure class があれば、既存 Issue/PR、open/closed 状態、dedupe_key、ownership を検索する。

    #3034、#217、#120、#839、#889、#993、#1719、#2277、#2777 との重複・責務衝突を確認する。

    既存 Issue が所有する場合は再利用し、重複起票しない。

    本 Issue の AC/VC 編集で完結する修正を別 Issue に切り出さない。

    独立した再発可能な root cause が確認された場合に限り、最小の再発防止 Issue を repository-native create-issue workflow で起票する。

    起票には reproduction、source evidence、既存対応との差異、最小修正、AC、VC、dedupe_key を含める。

    新規 gate / harness hardening を導入すること自体を目的にしない。

    7. Terminal completion

    approved と報告できるのは、final review と current-body-hash に対応する contract readiness が canonical 成功条件を満たした場合のみ。

    Step 4.5 の適用判定と Step 5 の正規終了処理を省略しない。

    終了結果を GitHub へ正規 publish し、必要な handoff marker を含める。

    最後に以下を報告する。

    今回は refinement 終了までとする。

    impl-review-loop、実装 commit、PR 作成、merge、auto-merge、破壊的 cleanup は行わない。

    調査・提案のみで停止せず、canonical Skill の終端まで実行する。

    再発防止 Issue の起票判断

    現時点では 新規 Issue は起票していません。

    確認した範囲では、対象選択の false-green は #3034 自身が所有し、cwd 証拠の問題は #217、既存語句に対する VC の精度は #120、AC/VC parser の整合性は #1719 などで扱われています。

    今回の3 finding は、まず #3034 の契約改善で解消するのが最小スコープです。実際の refinement 中にこれらと区別できる新たな再発 defect が判明した場合に限り、上記プロンプトに従って別 Issue を起票する方針にしています。

    到達目標は、#3034 の Issue 契約が canonical review で承認され、実装開始可能な状態で refinement が正常終了することです。

    ## 推奨アクション

    Issue #3034 の OWNER REQUEST_CHANGES(P2 × 3)を受け入れ、issue-refinement-loop を人間の反復承認なしで実行する方針を推奨します。

    対象は [Issue #3034 の指定コメント](#3034 (comment)) です。

    現行 Issue 本文と OWNER コメントを確認したところ、対応の中心は次の3点です。

    優先 修正事項 必要な対応
    P2-1 showFound による false-green 列挙と実検査を区別し、期待対象集合 E ⊆ P を要求する
    P2-2 #217 の cwd 規則の過度な一般化 対象 revision と探索範囲に応じた cwd 選択へ修正する
    P2-3 AC/VC マーカーと baseline の不整合 正規 AC マーカーに修正し、変更固有の記述を検証する

    加えて AC5 に、掲載する限定 lint 例の実行確認を追加します。textlint の --output-file による exit 0 の誤判定も避けます。

    承認するのは Issue 契約の編集・検証・再レビュー・通常の修復反復です。 Claude Code の permission bypass や repository の canonical stop condition の無視ではありません。

    対象はあくまで docs-only・単一ファイルの実装契約です。新規 gate、wrapper、schema、全体 lint 設定の変更は不要です。

    現行 Skill との整合性

    現行 issue-refinement-loop/SKILL.md では、通常の反復承認は既定で不要で、最大反復数は3です。また、Step 2 は root-owned review pipeline が担当し、バックグラウンド実行の完了結果を取得してから判定する契約です。

    今回のコメントは OWNER のレビューコメントとして確認しました。ユーザーが明示的に選択した human-context anchor として扱い、preflight.run.with_human_context を使う構成が適切です。ただし、GitHub 投稿者情報だけで人間が直接投稿したと証明されたものとしては扱いません。

    外部仕様も確認できました。markdownlint-cli2 の ignores はディレクトリによってファイル列挙後に適用される場合があり、textlint は --output-file 指定時に lint 違反があっても exit 0 を返します。

    image

    GitHub

    +2

    対話的 Claude Code 用プロンプト

    以下を、既に auto mode で起動しているセッションへ貼り付けてください。

    Issue #3034 — OWNER REQUEST_CHANGES 対応・自律 refinement

    対象 repository: squne121/loop-protocol

    対象 Issue:
    #3034

    OWNER review anchor:
    #3034 (comment)

    使用 Skill:
    .claude/skills/issue-refinement-loop/SKILL.md

    目的

    既に auto mode で起動している対話的 Claude Code セッションを継続し、Issue #3034 の OWNER REQUEST_CHANGES(P2 × 3)を反映する。

    current issue-refinement-loop を正規手順で実行し、Issue 本文の修正、検証、独立レビュー、必要な再修正、終了報告まで、人間の反復承認なしで自律的に完遂する。

    今回の invocation は Issue refinement 専用。実装 PR の作成や impl-review-loop 起動までは要求しない。

    1. 明示的な実行承認

    OWNER の3件の REQUEST_CHANGES と、AC5 の実効性確認に関する追加指摘を修正要求として受け入れる。

    以下を事前承認する。

    • Issue 再発防止: Markdown/prose lint VC の対象ゼロ件 false-green を authoring ガイダンスで防ぐ #3034 本文の編集、AC/VC 修正、既存セクションの再構成
    • canonical preflight、deterministic repair、controlled contract update
    • issue-editor による必要な full rewrite
    • SubAgent を使った調査と独立した事実確認
    • 修正後の fresh review と bounded review/fix iteration
    • canonical GitHub mutation、readback、終了コメント投稿
    • 根拠が確認できた独立の再発防止 Issue の起票。ただし dedupe 必須

    通常の needs-fix、既知の AC/VC syntax error、修正可能な readiness failure は、可能な限り自律的に解消する。

    iteration ごとの人間承認は要求しない。

    この承認は Claude Code permissions / hooks / capability preflight の迂回を意味しない。bypassPermissions や --dangerously-skip-permissions は設定しない。既存 auto mode を維持する。

    2. Fresh intake と canonical Skill 確認

    最初に current repository と GitHub live state を取得する。

    Issue #3034 の本文、指定コメント、その他のコメント、関連 Issue/PR、current main、作業中 worktree、既存 run-state を確認する。

    既存作業や他タスクの dirty work を上書きしない。重複 worktree・branch・Issue は作成しない。

    次の current 資産を確認する。

    • AGENTS.md、CLAUDE.md、関連 .claude/rules/**
    • issue-refinement-loop/SKILL.md と必要な references/**
    • anchor-comment-handling.md
    • ac-vc-reflection.md
    • semantic-design-review.md
    • termination-policy.md
    • follow-up-materialization.md
    • scripts/command_registry.py
    • .claude/agents/codebase-investigator.md
    • .claude/agents/issue-editor.md
    • 必要なら .claude/agents/web-researcher.md

    今回の OWNER anchor は、operator が明示的に選択した human context として扱う。

    canonical main root から、Skill に記載された preflight.run.with_human_context profile を使用する。単なる URL から origin を推定した扱いにしない。

    preflight の canonical 実行形は current Skill / command registry と照合する。指定する Issue は3034、anchor は上記 URL。

    trusted contract patch plan が得られた場合のみ、root control-plane が contract_update.run.with_human_context を実行する。

    同一 mutation を無条件に繰り返さない。issue_editor_required なら正規 issue-editor 経路へ handoff する。

    SubAgent に root-only の privileged executor を実行させない。

    3. OWNER finding の修正要件

    P2-1: 対象列挙と実検査を区別する

    Issue の In Scope / AC3 / AC5 / Verification Commands を整合させる。

    期待対象集合を E、実際に lint 処理された集合を P とする。

    PASS に必要な coverage 条件は E ⊆ P。対象限定の検証例では可能な限り P = E とする。

    ゼロ件、一部欠落、処理確認不能は PASS としない。

    showFound / Found: は列挙証拠であり、実処理証拠ではないことを明示する。

    markdownlint-cli2 の subdirectory ignores、config merge order、root globs、gitignore を考慮する。

    --config が既存設定をすべて置換するという前提は禁止。

    textlint の ignore-path と --output-file の exit-code 挙動も説明する。

    掲載する検証例は、実検査対象の包含と lint verdict を区別できるものにする。

    P2-2: #217 の cwd policy を限定的に参照する

    #217 / PR #215 の目的は、main checkout 配下の worktree traversal と ESLint ignore の検証だった。

    全 lint VC を main root で実行する一般規則として参照しない。

    通常の変更ファイル検査では、変更内容が存在する対象 worktree / revision を検証する。

    cwd、探索範囲、対象ファイル内容、revision identity の整合を説明する。

    #217 自体の実装や merge を #3034 の前提条件にしない。

    P2-3: AC/VC parser と baseline expectation を修正する

    current vc_contract_syntax.py と関連 validator を確認する。

    # AC1-AC4: や # AC5: のような不正 marker を廃止する。

    canonical marker の例:

    # AC1, AC2, AC3, AC4

    # AC5

    説明は別のコメント行へ分離する。

    rg 'lint' など既存文書に既に存在する語句のみを検索して、新規ガイダンスを検証したと判断しない。

    構造確認 VC は今回追加する固有の記述・見出し等に対応させる。

    意味的な正確性の判断は reviewer に残す。

    必要な baseline annotation / preflight-scope は既存 contract に従う。

    この Issue の記法を受け入れるために parser / gate / schema を改変してはならない。

    AC5: 実効性確認の契約を追加する

    掲載する限定 lint 例について、実装時に一回確認することを明記する。

    要求する証拠は installed version、対象 revision、cwd、期待対象集合、実検査集合の根拠、実 exit code、diagnostics、既存違反と変更由来違反の区別。

    pnpm run lint:docs の一般結果と、変更ファイル自体の実検査証拠を混同しない。

    既存違反による非ゼロ終了を PASS に偽装しない。

    新規 CI gate / wrapper / schema / 恒久的 lint 設定変更は追加しない。

    4. SubAgent orchestration

    必要な SubAgent を current planner policy に従って利用する。

    codebase-investigator には、VC parser、issue authoring guidance、lint config、関連 Issue/PR、version evidence の調査を委譲する。

    web-researcher は planner が required と判断した場合に起動する。markdownlint-cli2 と textlint の公式仕様、該当バージョンの source behavior を対象にする。

    issue-editor は既存 Issue 本文の rewrite が必要な場合に使う。

    canonical Step 2 の代わりに issue-reviewer SubAgent を起動しない。Step 2 は root-owned run_root_review_pipeline.py produce を用い、current Skill が要求する background launch + mandatory completion join に従う。

    各 SubAgent へ渡す task には対象 Issue、anchor、調査目的、権限境界、参照すべき SSOT、必要 evidence、期待 output を明示する。

    独立調査は並列化してよい。ただし dependent mutation は順序を守る。

    全 SubAgent の terminal result と artifact を取得してから downstream へ進む。

    dispatch 成功を作業完了として扱わない。background task も completion notification と実結果を join する。

    SubAgent の findings と canonical deterministic verdict を混同しない。

    5. Review / fix loop

    current Skill の Step 0 → Step 0f → Step 0g(該当時)→ Step 1 / 1b → Step 2 → Step 2.5(該当時)→ Step 4 → Step 4.5 → Step 5 を実行する。

    Step 2 の routing authority は producer の canonical_step2_route とする。自然言語で独自再判定しない。

    修正後は必ず fresh Issue body readback と fresh review を行う。

    body SHA、artifact identity、canonical readiness を確認する。

    通常の needs-fix は max_iterations 以内で修正・再レビューする。

    max_iterations は current Skill の既定3とし、上限や no-progress guard を越えて実行しない。

    environment/integrity failure と semantic review finding を同一視しない。修復可能な環境問題は正規 recovery 手順で対処する。

    human_judgment_required、真正の scope conflict、authority violation、整合性の回復不能など、canonical hard stop の場合だけ bounded escalation する。

    6. 再発防止 Issue

    新たに観測した独立した failure class があれば、既存 Issue/PR、open/closed 状態、dedupe_key、ownership を検索する。

    #3034、#217、#120、#839、#889、#993、#1719、#2277、#2777 との重複・責務衝突を確認する。

    既存 Issue が所有する場合は再利用し、重複起票しない。

    本 Issue の AC/VC 編集で完結する修正を別 Issue に切り出さない。

    独立した再発可能な root cause が確認された場合に限り、最小の再発防止 Issue を repository-native create-issue workflow で起票する。

    起票には reproduction、source evidence、既存対応との差異、最小修正、AC、VC、dedupe_key を含める。

    新規 gate / harness hardening を導入すること自体を目的にしない。

    7. Terminal completion

    approved と報告できるのは、final review と current-body-hash に対応する contract readiness が canonical 成功条件を満たした場合のみ。

    Step 4.5 の適用判定と Step 5 の正規終了処理を省略しない。

    終了結果を GitHub へ正規 publish し、必要な handoff marker を含める。

    最後に以下を報告する。

    今回は refinement 終了までとする。

    impl-review-loop、実装 commit、PR 作成、merge、auto-merge、破壊的 cleanup は行わない。

    調査・提案のみで停止せず、canonical Skill の終端まで実行する。

    再発防止 Issue の起票判断

    現時点では 新規 Issue は起票していません。

    確認した範囲では、対象選択の false-green は #3034 自身が所有し、cwd 証拠の問題は [#217](https://github.com/squne121/loop-protocol/issues/217)、既存語句に対する VC の精度は [#120](https://github.com/squne121/loop-protocol/issues/120)、AC/VC parser の整合性は [#1719](#1719) などで扱われています。

    今回の3 finding は、まず #3034 の契約改善で解消するのが最小スコープです。実際の refinement 中にこれらと区別できる新たな再発 defect が判明した場合に限り、上記プロンプトに従って別 Issue を起票する方針にしています。

    到達目標は、#3034 の Issue 契約が canonical review で承認され、実装開始可能な状態で refinement が正常終了することです。

  4. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    #3031 由来の追加 false-green 対照例(2026-10-11 の実行ログ)

    Issue #3031 approved 報告 に至る authoring のローカル実行ログで、markdownlint-cli2 0.17.2 のリテラルパス指定 :docs/dev/zz3031-bad.md が検証された。

    • 試験用ファイルには意図的に言語指定のないコードフェンス(MD040)を置いた。
    • pnpm exec markdownlint-cli2 :docs/dev/zz3031-bad.md の出力は Linting: 127 file(s)、Summary: 0 error(s)、exit 0。既定の docs/** ignore が残ったまま、明示した bad file の違反は報告されなかった。
    • :path と総件数の表示自体は、その対象が lint rule に実際に渡された証拠ではない。提示されたログは同一セッションの実測であり、独立環境での再現成功までは主張しない。
    • 再発防止: Markdown/prose lint VC の対象ゼロ件 false-green を authoring ガイダンスで防ぐ #3034 の OWNER P2-1「showFound / 列挙と実処理の区別」に対する追加 negative control として扱える。期待対象集合と実処理集合、baseline 対照を区別するガイダンスに含めるのが適切。

    同じ failure class を扱う #3034 が OPEN のため新規 Issue は作らない。恒久 lint gate や全体 ignore 解除は不要。

  5. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-10-11T10:14:14Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/3034
      body_sha256: "sha256:4499ea55a1a6486d1c1aa6d951c9dd14fe4e405f5fb4dfee9e30793ea4659757"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        product_spec_check: {"schema":"product_spec_check/v1","applicability":"applicable","decision":"pass","triggers":{"docs_product_allowed_paths":false,"tasks_md_mentioned":false,"specify_artifact_mentioned":false,"generated_task_mentioned":false,"product_spec_context_present":false,"machine_readable_contract_present":true},"conditions":{"docs_product_requires_spec_evidence":{"status":"pass","evidence":[]},"tasks_md_not_direct_source":{"status":"pass","evidence":[]},"specify_not_canonical":{"status":"pass","evidence":[]},"diff_first_rationale_present":{"status":"pass","evidence":[]},"generated_task_trace_present":{"status":"pass","evidence":[]},"task_dependencies_materialized":{"status":"pass","evidence":[]}},"blocked_reasons":[],"body_sha256":"sha256:4499ea55a1a6486d1c1aa6d951c9dd14fe4e405f5fb4dfee9e30793ea4659757","source_provenance":{"source_type":"body_file","body_file":"/tmp/contract_review_once_body_jxelg77i.md"}}
        vc_preflight:
          decision: pass
          classifications: '[{"ac":"AC1","line":2,"raw_command":"rg -n --fixed-strings ''lint VC の対象 coverage'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:99189ef92c821fba13e470ff39e8515bdba6da643cf548139ec47d31604cce50","execution_key_hash":"sha256:f35f92f694e0fbafc0aba1f83575271d63e21b3a3eec4984b9a125f2244c66ae","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:39718517ecf51a92499e7a4f8050c49a5e6354aef90dba65c0e6a989d64ed28d"}},{"ac":"AC1","line":4,"raw_command":"rg -n --fixed-strings ''negative control'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:eb4bc7f43efaa58aa91d177dc4992e9e732a573de34119e2384ca1b5d9fb2de6","execution_key_hash":"sha256:e3bb2f69d388db65b24fbb9163bdec94a3e94e456ddba0bbb1fae8504d36dd5a","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:fa03a8227720e089f48488ec6f4793d94e4f2033bb5a215696a074dfd934c645"}},{"ac":"AC2","line":6,"raw_command":"rg -n --fixed-strings ''showFound'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:551b8ef2d4b357159d772e81a34a1d19a17333e759ef7e9d31d4eec2bf18627a","execution_key_hash":"sha256:687d96214b35b71d3673c80cbca12e634ccdb6197b89bb1ab0851bdfcf8c2242","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:473fa032247f0512c656125b565678cfee1164f2450cb0a0525e862a553fb05c"}},{"ac":"AC2","line":8,"raw_command":"rg -n --fixed-strings ''gitignore'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:5dc1d4b2149ac7cf24f461f12d8393fbffedbe656e658a48a86d31b85476c58d","execution_key_hash":"sha256:1576fdc784f60de966162ef2044547cd00687f196e13113709fb23ea4829f8e2","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:f7a9ef9503154ff8ff91f463ce9131523200abd9c8eb5b65b8696da5d2ce383d"}},{"ac":"AC2","line":10,"raw_command":"rg -n --fixed-strings -- ''--config'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:66039f0797164c1db7db894ecc6156dcb89ac1f9e47f4b7ff8ef5e27d52bc289","execution_key_hash":"sha256:927f19c149aab045af9ab35f523fb2389014eb5558883c275002cadacbb0b5de","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:11cb900439d692a91c2724e42ddab4f4264e7373c1556d8426fbd5cc3c3893db"}},{"ac":"AC2","line":12,"raw_command":"rg -n --fixed-strings ''Linting:'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:649932343067a3bae499b97d821fa4cca2c185132dcb439837fee744bd38128e","execution_key_hash":"sha256:071ef8799b3fc2165ac418a6c4235b4e4c69887e82ef5f7aee1ef0e8dd6d8f41","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:66c208f69dc44814bb5f50aee3aac304f9eda2d9f19afd6c4b4295cf161e41c6"}},{"ac":"AC2","line":14,"raw_command":"rg -n --fixed-strings -- ''--ignore-path'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:12cbc8eb2a641f13bdeabb005c8290b81e6ef000804b4bfcdb68e6ae3624d3d1","execution_key_hash":"sha256:4c717208c62723e21a02ea0449a5e0ef8437284979f0dd9654b5dbcb7d87b358","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:27e1b9fb31424fda78c00dd3be5d206cfb70939425a067049923e89fa227c867"}},{"ac":"AC3","line":16,"raw_command":"rg -n --fixed-strings ''E ⊆ P'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:c09f45bae650ae010e04dcff816fe0847152ab8ee16ef622592f7ae14baa1434","execution_key_hash":"sha256:21ef2e39467af859cc328830d99b2ddecc33baf16b1931ae35c183b19eaf9ef9","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:cfa589ca09a57344e86e59d743f9bb89d8d306f78f8dcabb8ebd1be1d2370c73"}},{"ac":"AC3","line":18,"raw_command":"rg -n --fixed-strings ''canary'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:676ae44cf3b9b8f39634484660bb4c1038a7d9f980c5dae3cf6c4430de189f44","execution_key_hash":"sha256:4e2fa816257ce4e7881a1aab29f27c68a58031d364ec456ef4d32e2767b2dfb8","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:698935f1485904ec027ab2071e17940c388330a5191782874c46cde18d8a575e"}},{"ac":"AC3","line":20,"raw_command":"rg -n --fixed-strings -- ''--output-file'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:44334b561d45ddb308d4f18da28e8d81cda5f4a9cbee18e8810b6df031fb577c","execution_key_hash":"sha256:16c0ae3d2ebe0aba5e2f7d192ce0d77a8ea9621fac578574cd641164ab10277b","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:57f103268dc32c16f696e582f4d72bb764a1982beccd3d7e77c44c722dec2504"}},{"ac":"AC3","line":22,"raw_command":"rg -n --fixed-strings -- ''--format json'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:f7f9f2e615a86eac2c05f226e764043c605df7c0deb67eb009dc9822110cf3c7","execution_key_hash":"sha256:1aaade6829e0d0d7967d285f1b8cd46aa55ec9910bed85ad54a0cc8b1a3d9053","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:8b656ca6f2e8d60a80757a1fff591bf4d054b1a7419a7866182d307af923ece5"}},{"ac":"AC4","line":24,"raw_command":"rg -n --fixed-strings ''main checkout'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:335136a8db73619cbf26c3b07a4e937b80f41784ffea44717dbf6e5a988fc5ef","execution_key_hash":"sha256:52b78fa3427e18a5daeae3465532919cac1fb642c3dc84ff08ed48013bbdc7e3","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:fcbbeba264da2ce2013aa47e480c77b2447a757d74f4aa5c7a61df813995fddb"}},{"ac":"AC4","line":26,"raw_command":"rg -n --fixed-strings ''変更由来'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:8b592d906cdde641f3c132f9bb215a55cfa4860c6fa8e5141c9c377394af7157","execution_key_hash":"sha256:dfc6976c85d0c81c9a65ce4512560ba3a6395a824bb53fea9475cccf1fef08ab","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:87f3e525ee456dafb6bf772438d3e3da7e68337946aefd2eddb96204931d8a67"}},{"ac":"AC5","line":28,"raw_command":"rg -n --fixed-strings ''installed version'' .claude/skills/create-issue/references/body-authoring.md","command_hash":"sha256:2d055bae7a109eb9fa980789b69ab1f08c510472bae9e968161778c2f7551398","execution_key_hash":"sha256:10a1f8e9b1a887d81beede2d1fcde8527af6644d30945f3aa38889cddcc83b81","runner":"exec","exit_code":1,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_truncated":false,"stdout_original_line_count":1,"stderr_truncated":false,"stderr_original_line_count":1,"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"timeout_provenance":{"timeout_seconds":150,"cleanup_tail_seconds":15,"source":"static_fallback","estimator_version":"v2","estimator_input_digest":"sha256:8dced5cfd17d3c6c8567a0e3aca6691d3f0f7b7cd28e1d692c6a81c75942695f"}}]'
          classifications_transport: {"schema":"vc_preflight_classifications_transport/v1","classification_count":14,"original_payload_sha256":"sha256:42b0bda5e4927415187823f701c832cba4fd265e0650bcc47c647f91649cd263","compact":true,"truncated":true}
        declared_path_overlap: '{"schema":"declared_path_overlap/v1","advisory":true,"blocking":false,"decision":"advisory_only","disjoint":true,"overlapping_prs":[],"inventory":{"schema":"OPEN_PR_INVENTORY_V1","repo":"squne121/loop-protocol","state":"open","base_ref":"main","base_sha":"d5c39a182ed81fd3b484440a34a5844020522b25","draft_policy":"include_drafts","prs":[{"number":2831,"title":"実装: Claude-GPT model/proxy runtime migration の3分類ルーティングを追加する","base_ref_name":"main","head_ref_name":"worktree-issue-2810-runtime-migration-classifier","head_ref_oid":"7c06e272c14b2d38e8f01899abdf85f3d0d5c9ec","is_draft":false,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/2831","changed_files_count_graphql":20},{"number":2914,"title":"fix: test-runner が mergeStateStatus=BLOCKED/UNSTABLE だけで TEST_VERDICT を FAIL にしないようにする","base_ref_name":"main","head_ref_name":"worktree-issue-2908-test-runner-blocked-not-fail","head_ref_oid":"2f44329742e2117b1bbbb34452417362558175aa","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/2914","changed_files_count_graphql":1},{"number":2931,"title":"fix: Auto mode の固定 /tmp scratch 上書き false-deny を run-scoped workspace で解消する","base_ref_name":"main","head_ref_name":"worktree-issue-2860-run-scoped-scratch","head_ref_oid":"344f5da35326e04dacd13aa57dd962674888f336","is_draft":false,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/2931","changed_files_count_graphql":6},{"number":2940,"title":"feat: runner evidence に main-session init の permission_mode_observed を出力する","base_ref_name":"main","head_ref_name":"worktree-issue-2935-main-session-permission-mode","head_ref_oid":"37eb1ae20b98cc72fed816a7c88aca0d9b623a39","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/2940","changed_files_count_graphql":3},{"number":2946,"title":"fix: runtime smoke fixture の child 起動先を general-purpose に是正し 2.1.289 で hook_id_correlated を成立させる (#2941)","base_ref_name":"main","head_ref_name":"worktree-issue-2941-claude-2-1-289-causal-evidence","head_ref_oid":"0fbc32e03e377b36d5800c940ab8311479c8cf46","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/2946","changed_files_count_graphql":1},{"number":2974,"title":"fix: component-vrt-report の negative-control artifact を run_attempt 単位名に束縛する (#2969)","base_ref_name":"main","head_ref_name":"worktree-issue-2969-vrt-negctl-attempt-artifact","head_ref_oid":"2ab61441acc3f5062fa83fd147f570958f2dea3e","is_draft":false,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/2974","changed_files_count_graphql":2},{"number":3001,"title":"fix: repo-local 証跡を外部 claim の Web gate から分離する","base_ref_name":"main","head_ref_name":"worktree-issue-2857-repo-local-claims","head_ref_oid":"2d3d7a0536c5dd7e8f6c4f199cdc880b0e0697b9","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/3001","changed_files_count_graphql":5},{"number":3025,"title":"fix: refinement の pre-edit LP017 guard parity を確保 (#3006)","base_ref_name":"main","head_ref_name":"worktree-issue-3006-preedit-guard-parity","head_ref_oid":"62e6394df0a65260e29e7c55a0d8f21237949f9c","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/3025","changed_files_count_graphql":5},{"number":3029,"title":"fix: deferred VC annotation と Step 4 adjudicator の不整合を再発防止する","base_ref_name":"main","head_ref_name":"worktree-issue-3020-deferred-vc-annotation-step4-parity","head_ref_oid":"0d9b1b3aa7caf15edb7f26366f8ae460373ecfea","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/3029","changed_files_count_graphql":8}],"fetched_count":9,"totalCount":9,"has_next_page":false,"complete":true,"saturated":false,"limit":200,"page_count":1,"inventory_digest":"sha256:628a4354f7fcc270d257de2d28f0633fdea74e1a55331e4a1e4204f15f626ff5","errors":[]},"inventory_digest_extended":"sha256:a5a8d3974d35a148aa37c9f089e2c0ae96722d7130d17764e0dafef9e9ea7ce7","errors":[],"note":"changed-file 名の単純な重なりのみを証明する advisory check。3-way merge・hunk 競合・rename/delete 競合は評価しない(実 Git merge 競合の判定は Issue #1792 の PAIRWISE_MERGE_OBSERVATION_V1 producer の責務)。単独では blocking にしない。disjoint は tri-state(true/false/null)— 観測が不完全な場合は null。"}'
      source: ensure_contract_snapshot_auto
      expected_contract_fingerprint: '{"issue_number":3034,"contract_source_kind":"issue_comment","contract_source_id":"6107959038","contract_body_sha256":"sha256:4499ea55a1a6486d1c1aa6d951c9dd14fe4e405f5fb4dfee9e30793ea4659757","allowed_paths_normalized_sha256":"e662e4da7d66b836907a0fe98a7d834b222ab8f182985e81339077b21292bd53","base_ref":"main","base_sha_at_snapshot":"d5c39a182ed81fd3b484440a34a5844020522b25"}'
  6. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop 終了報告(approved)

    OWNER の REQUEST_CHANGES(P2 × 3 と AC5 の追加指摘)を反映し、Issue 契約を approved で終了します。実装・PR・merge は行っていません。

    • 終了理由: approved(3 iteration、最大 3 の範囲内)
    • 最終本文 SHA-256: sha256:4499ea55a1a6486d1c1aa6d951c9dd14fe4e405f5fb4dfee9e30793ea4659757
    • Step 2 の canonical route: step_2_5(deterministic approve、blocker なし)
    • Step 2.5(semantic design review): join_review_results.py の effective_verdict は approve。medium 以下の警告 2 件が残る(下記)
    • Final Gate: CONTRACT_REVIEW_RESULT_V1.status: go(現在の本文 SHA に束縛、VC 14 本はすべて baseline で expected_fail)
    • contract snapshot: 再発防止: Markdown/prose lint VC の対象ゼロ件 false-green を authoring ガイダンスで防ぐ #3034 (comment)

    OWNER P2 の解消状況

    指摘 解消内容
    P2-1 列挙と実検査の区別 E ⊆ P を PASS 条件とし、showFound / Found: / Linting: N を列挙の証拠と明記。--config は cwd 設定を置換しない前提、gitignore: true の黙った除外、config globs の合成、textlint の --ignore-path(置換)と --output-file(違反があっても exit 0)、--format json による P の確認、canary を契約化
    P2-2 #217 の参照範囲 #217 / PR #215 を main checkout 配下の worktree traversal 検証の限定事例とし、cwd は探索範囲・対象 revision に合わせる。#217 の実装を前提にしない
    P2-3 AC/VC marker と baseline # AC<N> の単独 bare marker に統一し、固有語(新設節にのみ現れる語句)の構造確認 VC 14 本へ置換。parser / gate / schema は改変していない
    AC5 実効性確認 文書側(実行確認済みの例だけを掲載、証拠項目の一覧)と PR 側(実装 PR 本文に一回限りの実測証拠、lint:docs の一般結果とは分離)に分離。新規 gate / wrapper / schema / 恒久設定変更なし

    追加の OWNER 実測コメント(https://github.com/squne121/loop-protocol/issues/3034#issuecomment-6107823504)の :path リテラルパス指定の negative control は、隔離環境で独立に再現したうえで In Scope / AC1 に反映しました。

    実測で OWNER 主張を補正した点

    残る警告(blocker ではない)

    • In Scope 5 と In Scope 3 の canary の証明範囲の記述に、軽微な食い違いが残る(同一ディレクトリ・同一設定スコープの canary は、ファイル単位の除外までは排除しない)。実装時に、対象ファイル自体へ一時的に意図的違反を加える確認を併記すること。最大 iteration に到達したため、本文はこれ以上修正していない。
    • 一部の VC 固有語は汎用性が高い。実装時に、着手前の body-authoring.md に既存ヒットがないこと(本 refinement 時点では 0 件を確認済み)を PR 本文に記録すること。

    follow-up と再利用した既存 Issue

    新規 Issue は起票していません。観測した 2 件の failure class は、既存の open Issue が所有しています。

    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
    schema_version: 1
    materialized_by: issue-refinement-loop
    follow_up_issues: []
    note_only_observations:
    - "#1719 が grouped AC marker の LP016 誤 reject を所有(再利用、新規起票なし)"
    - "#3006 が pre-edit static go と LP017 reject の判定不一致を所有(再利用、新規起票なし)"

    LOOP_HANDOFF_RESULT_V1:
      status: refinement_approved
      routing_action: none
      contract_review:
        status: go
        gate_result: fresh_go
        latest_comment_url: https://github.com/squne121/loop-protocol/issues/3034#issuecomment-6107959038
        generated_at: "2026-10-11T10:14:14Z"
        body_sha256: "sha256:4499ea55a1a6486d1c1aa6d951c9dd14fe4e405f5fb4dfee9e30793ea4659757"
      metadata:
        title_prefix_ready: true
      label_sync_observation:
        kind: presentation_sync
        result: noop
        detail: "ラベルは変更していない(presentation-only、authority を持たない)"
      auto_fixes:
        result: auto_fixed
        required: []
        skipped: []
      blockers: []
      permissions:
        unavailable: []
      generated_at: "2026-10-11T10:16:00Z"
      checked_body_sha256: "sha256:4499ea55a1a6486d1c1aa6d951c9dd14fe4e405f5fb4dfee9e30793ea4659757"
      checker_exit_code: 0
      missing_sections: []
      missing_contract_keys: []

    approved は実装開始の承認ではありません。impl-review-loop の起動は、ユーザーが実装を明示的に依頼した invocation でのみ行われます。

  7. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    1. 現状確認と推奨方針

    GitHub の live Issue と添付の Claude Code 実行ログを照合しました。

    Refinement approved
    実装未着手
    項目 | 確認結果 -- | -- 対象 | Issue #3034 Issue 状態 | OPEN 契約最終 SHA-256 | 4499ea55a1a6486d…4659757 Contract Review | go、14 VC が baseline expected_fail 実装 PR | 現時点の検索で該当 PR なし Allowed Paths | body-authoring.md の1ファイル Refinement 終了報告 | approved コメント

    したがって 新規 Issue は起票していません。実装・レビューの過程で別の root cause が再現された場合は、プロンプト内で dedupe と起票を明示的に承認しています。

    外部仕様についても、markdownlint-cli2 の globs / ignores / showFound と、textlint の --output-file / --format json の挙動は公式資料と整合しています。

    GitHub
    +2

    この実行方針なら、単一ファイルの小さな文書改善としてスコープを維持しながら、実検査の false-green を重点的に防ぎ、merge 直前まで自律実行することを狙えます。

    ## 1. 現状確認と推奨方針

    GitHub の live Issue と添付の Claude Code 実行ログを照合しました。

    Refinement approved

    実装未着手

    項目 確認結果
    対象 [Issue #3034](#3034)
    Issue 状態 OPEN
    契約最終 SHA-256 4499ea55a1a6486d…4659757
    Contract Review go、14 VC が baseline expected_fail
    実装 PR 現時点の検索で該当 PR なし
    Allowed Paths body-authoring.md の1ファイル
    Refinement 終了報告 [approved コメント](#3034 (comment))

    推奨は、refinement を繰り返さず、現在の Issue 契約から impl-review-loop を起動し、Draft PR の実装・テスト・独立レビュー・修正・再検証まで自律実行することです。

    特に重要なのは、前回の refinement で承認された契約にも、semantic reviewer が指摘した canary の証明範囲に関する不整合 が残っている点です。同じディレクトリの別ファイルに置いた canary が検出されても、変更対象ファイルそのものが検査されたとは限りません。

    今回の実装では、この不整合を解消したガイダンスを作り、実際に対象ファイルが検査されることを検証する必要があります。

    新しい CI gate、lint 設定の恒久変更、wrapper、approval layer は不要です。

    2. Claude Code に貼り付ける実行プロンプト

    現在の impl-review-loop/SKILL.md と Step 1 / 2 / 4 / 5 の契約を踏まえています。既に起動している fresh Claude Code の auto mode セッションへ、そのまま貼り付けてください。

    Issue #3034 — impl-review-loop 自律実装・独立レビュー・修正

    Repository: squne121/loop-protocol

    Target Issue:
    #3034

    Refinement completion:
    #3034 (comment)

    Contract snapshot:
    #3034 (comment)

    Required Skill:
    .claude/skills/impl-review-loop/SKILL.md

    目的

    現在 auto mode で起動済みの fresh interactive Claude Code セッションを継続し、Issue #3034 を現行 impl-review-loop の canonical workflow で実装する。

    実装、検証、Draft PR 作成、独立 PR レビュー、修正、再検証、CI 確認、terminal gate、終了報告まで、通常の iteration ごとの人間承認を要求せず、自律的に実施する。

    終了地点は 人間が merge 判断できる直前。

    実 merge、auto-merge、不可逆 cleanup は行わない。

    調査や実装計画の提示だけで終了せず、実際に Skill を起動して実装を完遂すること。

    1. 明示的な事前承認

    OWNER は、本 Issue の承認済みスコープに限り、以下を事前承認する。

    • 現行 Skill / Agent / SSOT / GitHub live state の調査
    • canonical root-owned entry transition と必要な preflight
    • 既存の dedicated worktree / branch / PR の再利用
    • 必要な場合の issue 専用 worktree / branch の作成
    • Allowed Paths 内の実装、編集、commit、push
    • implement-issue / open-pr を使用した Draft PR 作成・更新
    • SubAgent による実装、テスト、独立レビュー
    • 変更対象を実際に lint するための一時的・限定的な検証
    • 修復可能な lint / test / required CI failure の調査と修正
    • REQUEST_CHANGES の fix_delta 対応
    • 現 HEAD に対する再検証・再レビュー
    • 既存 branch への非破壊的な main 追従と再検証
    • canonical tool による PR 本文・evidence の更新
    • 独立した再発防止 Issue の dedupe 調査と、必要時の起票
    • 終了報告・GitHub コメントの正規投稿

    通常の needs-fix、REQUEST_CHANGES、修復可能な CI failure、stale HEAD、補完可能な evidence は、人間への逐次確認を挟まず canonical recovery に進むこと。

    ただし、これは Claude Code の permission、hooks、repository safety boundary の無効化を意味しない。既存 auto mode を維持し、bypassPermissions、--dangerously-skip-permissions、permission 設定の書き換えは行わない。

    実際の permission denial が発生した場合は、正規の許可経路または安全な代替経路で回復する。policy bypass はしない。

    2. Fresh intake

    最初に live GitHub と current repository を確認する。

    必須参照:

    前回の refinement 終了時点では、Issue body SHA-256 は次の値だった。

    4499ea55a1a6486d1c1aa6d951c9dd14fe4e405f5fb4dfee9e30793ea4659757

    この SHA は参照情報であり、今回の authority は live Issue と current HEAD から再取得する。

    前回の CONTRACT_REVIEW_RESULT_V1.status: go は確認済みだが、これを Step 1 起動の再利用可能な authorization token と見なさない。

    current Skill の Root-Owned Synchronous Entry Transition を正規手順で実行する。capability preflight、live Issue、current-run contract review、fresh re-read、routing、Step 1 dispatch の順序と同一 invocation 要件を守る。

    snapshot / ledger / session manifest 等の advisory artifact の欠落だけで実装を停止しない。実際の routing authority は current Skill と live state に従う。

    他タスクの dirty work、foreign branch、foreign worktree を変更・削除しない。

    3. Issue #3034 の実装スコープ

    Allowed Paths は原則として次の1ファイルのみ。

    .claude/skills/create-issue/references/body-authoring.md

    既存の ## VC 作成ガイダンス 節の末尾、次の ## VC_SINGLE_COMMAND_GUARDRAIL の直前に、Issue 契約で指定された ### 節を追加する。

    対象は Markdown/prose lint VC の target-selection coverage に関する authoring guidance。

    新規の lint gate、CI job、wrapper、schema、hook、approval layer、恒久 lint 設定変更は追加しない。

    .markdownlint-cli2.yaml、.textlintignore、.textlintrc、package.json の全体設定を本 Issue の都合で変更しない。

    #3031 の個別 AC9、#217、#120、#1719、#3006 の責務を横取りしない。

    4. 最重要: false-green の再発を実装内で防ぐ

    前回の refinement semantic review では、未解消の指摘が残っている。

    同じディレクトリ・設定スコープの別ファイルに置いた canary が検出されても、実対象ファイル自体が lint されたことは証明されない。

    これは実装時に必ず解消する。

    検査対象の集合

    • E = Issue が検査を要求する実対象ファイル集合
    • P = 実際に lint rule へ渡され処理された集合
    • PASS の coverage 条件 = E ⊆ P

    ゼロ件、一部欠落、確認不能は PASS にしない。

    showFound、Found:、Linting: N file(s) は列挙の証拠であり、実検査済みの根拠として単独採用しない。

    markdownlint-cli2

    現在の installed version、lockfile、upstream version-specific source を確認する。

    特に以下を扱う。

    • root globs と CLI glob の合成
    • root ignores
    • subdirectory ignores の後段適用
    • gitignore: true による対象除外
    • --config の base configuration と cwd configuration の merge
    • :path リテラル指定でも既存 ignore によって未検査となる negative control

    canary の検出範囲を過大に主張しない。

    別ファイルの canary は、同一設定スコープへ lint が到達した補助証拠にとどまる。

    ファイル単位の除外まで排除する必要がある場合は、対象ファイルそのものに対する一時的な意図的違反と、その対象パスへの診断出力を使った検証を検討する。

    一時変更を用いる場合は、作業前の内容を保存し、検証後に byte-identical に復元する。checksum と diff で復元を確認し、一時違反を commit / PR に残さない。

    必要なら隔離された scratch 環境で先に検証方法を調整する。ただし scratch の別ファイルだけの成功を actual target coverage の証明に格上げしない。

    textlint

    確認対象:

    • .textlintignore の適用
    • literal path と glob 指定の違い
    • --ignore-path による既定 ignore path の置換
    • --format json の filePath と messages
    • --output-file 指定時の exit code
    • 全件 ignore / 対象ゼロ件の出力

    前回の実測では、textlint 14.8.4 は literal path 指定の body-authoring.md を処理し、既存 prh 違反によって exit 1 になった。一方、glob 指定では ignore された。

    このバージョン依存の挙動を current installed version で確認する。

    --output-file 指定時の exit 0 を違反なしの証明として扱わない。

    掲載例と PR evidence

    ガイダンスに掲載する限定 lint 例は、実際に一度実行してから採用する。

    PR 本文に以下を記録する。

    1. installed CLI / engine version
    2. 検査した Git revision / PR HEAD
    3. cwd と検査対象の実内容
    4. 期待対象集合 E
    5. 実検査集合 P の根拠
    6. 実際の exit code
    7. diagnostics と negative / positive control の結果
    8. 既存違反と変更由来違反の区別

    pnpm run lint:docs の全体結果は別欄に記録し、変更した body-authoring.md がそのコマンドで検査されたと推測しない。

    既存違反による exit 1 を PASS と偽装しない。対象選択の確認、lint verdict、baseline 差分をそれぞれ別に報告する。

    5. AC / VC の検証

    Issue #3034 の AC1〜AC5 をすべて確認する。

    14 本の Verification Commands を current Issue から取得し、単なる baseline での既存文字列ヒットと、今回の追加文書の確認を区別する。

    着手前に、VC が検索する語句の既存ヒット状況を確認する。

    検索語が出現した事実だけで、記述の意味的な正しさや検証例の実効性を APPROVE しない。

    特に、ガイダンス新設節の存在、実際の E ⊆ P 検証、canary の限界、cwd / revision identity、既存 baseline の扱いを reviewer が照合する。

    レビュー対象は変更を含む dedicated implementation worktree とその HEAD。main checkout の古い同名ファイルを検査した結果で代用しない。

    6. SubAgent orchestration

    現行 Skill の canonical dispatch に従い、必要な SubAgent を利用する。

    Step 1 — implementation-worker

    implementation-worker に、Issue 番号・live Issue URL・実 Allowed Paths・作業 worktree・今回の具体的技術推奨・必要な fix_delta を明示して委譲する。

    implement-issue により、実装、ローカル検証、commit / push、既存 PR 更新または Draft PR 作成まで行わせる。

    既存 PR / branch があれば再利用し、重複 PR を作らない。

    Step 2 — test-runner

    test-runner に独立検証を委譲する。

    current Skill の要求に従い、live Issue 本文から取得した各 VC の (ac, raw_command, command_hash) を逐語で渡す。

    必要な HEAD / Issue body / command hash identity、exit code、実行結果、diagnostics を取得する。

    TEST_VERDICT_MACHINE/v2 の実結果を受け取り、canonical VC_ADJUDICATION_RESULT_V1 へ接続する。

    Step 4 — pr-reviewer

    current-head gate が reviewer invocation を許可した場合のみ pr-reviewer を起動する。

    pr-review-judge の正規手順を使用し、PR diff、AC、VC、Allowed Paths、evidence、required CI、既存 baseline、main drift を厳格に照合する。

    レビュー対象の exact HEAD を保持する。

    REQUEST_CHANGES の場合は、具体的な blocker と最小修正を fix_delta にして implementation-worker へ戻す。

    Completion barrier

    各 SubAgent には task、対象、authority、制約、参照 SSOT、必要 evidence、期待出力を個別に明示する。

    SubAgent が isolated context で動くことを前提とし、親会話の暗黙 context に依存させない。

    独立した read-only 調査は並列化してよいが、修正 → 検証 → レビューは依存順序を守る。

    dispatch の成功、background 起動の成功、completion notification のみを作業完了とみなさない。

    current Skill の Common Completion Protocol に従い、各 child task の terminal state と final result の両方を確認し、結果を取得してから downstream へ進む。

    結果が取得できない場合は正規 recovery を行い、推測で成功報告を作成しない。

    SubAgent discovery failure は current Skill の bounded Stage A / Stage B recovery に従う。Stage B の main-session persona binding を通常の child task と誤認しない。

    7. Review / fix loop

    現行 impl-review-loop の Step 1 → Step 2 → Step 4 → Step 5 に従う。

    通常の最大 iteration 数は current Skill 既定値の 3 とする。

    次の状態では人間への逐次承認を要求しない。

    • 修正可能な test / lint failure
    • reviewer REQUEST_CHANGES
    • CI の修正可能な failure
    • PR head drift
    • 修正後の fresh review 必要状態
    • 対応可能な branch update
    • PR evidence / body hygiene の同期不足

    ただし、canonical routing / iteration 上限を無視しない。

    body-only repair lane は current decide_body_only_repair が eligible と判定した場合だけ使用する。任意の substantive blocker を body-only と再分類しない。

    レビュー結果と current HEAD が一致しない場合は、fresh HEAD で必要な検証・レビューをやり直す。

    required CI の PASS は、必ず現在の HEAD に対応する実測として確認する。

    PR の live mergeability は control-plane が独立取得し、reviewer の自己申告から補完しない。

    最終承認には canonical step5-terminal-gate の成功を必須とする。

    APPROVE コメントのみ、step4-adjudicate の reviewer dispatch 許可のみ、CI PASS のみを terminal completion と扱わない。

    8. 再発防止 Issue

    作業中に独立した再発可能な failure class を発見した場合は、既存 open / closed Issue、PR、dedupe_key、責務範囲を検索する。

    事前に以下との重複を確認する。

    今回の body-authoring.md への追記で解決できる問題は #3034 の実装に含め、別 Issue として重複起票しない。

    独立した root cause が一次証拠と再現で確認され、既存 Issue が所有していない場合のみ、現行 create-issue Skill と必要な issue-creator SubAgent を用いて起票する。

    起票する Issue には、source evidence、reproduction、impact、minimal fix、AC、VC、Allowed Paths、dedupe_key を記載する。

    SubAgent に起票を委譲した場合も、terminal result と実際の GitHub Issue URL を取得するまで完了扱いしない。

    新たな generic gate / wrapper / schema を追加すること自体を目的にしない。

    9. 停止境界

    通常の不具合修正やレビュー反復は自律的に継続する。

    真正の hard stop に該当する場合だけ、理由と証拠を明記して停止・escalation する。

    例:

    • destructive operation や履歴破壊が不可避
    • secret / credential の操作が必要
    • authority 外の変更が不可避
    • 解消不能な actual Git conflict
    • canonical human_judgment_required
    • 証拠整合性を回復できない
    • iteration 上限と正規例外の終了
    • repository policy による実際の拒否

    承認済みの非破壊的な通常作業を、漠然とした permission / security 懸念によって停止しない。

    10. Terminal completion

    目標は IMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_ready に到達すること。

    ただし、状態を自己申告で捏造せず、canonical terminal gate と current HEAD の検証結果に従う。

    PR は Draft のまま残し、人間が merge 判断する。

    最後に以下を簡潔に報告する。

    • Issue 再発防止: Markdown/prose lint VC の対象ゼロ件 false-green を authoring ガイダンスで防ぐ #3034 の最終状態と使用した契約 SHA
    • PR URL、branch、worktree、最終 HEAD SHA
    • 変更したファイル・実装内容
    • AC1〜AC5 の達成状況
    • 限定 lint の E / P coverage evidence
    • 実際の lint exit code と baseline の切り分け
    • Verification Commands と required CI の結果
    • SubAgent の terminal state / final result
    • review / fix iteration 数
    • 最終 reviewer verdict、mergeability、terminal gate の結果
    • 再発防止 Issue の新規作成・既存再利用・見送り
    • 残 blocker、warnings、次の推奨アクション

    実装・検証・レビュー・修正・PR 更新を実行し、人間の merge 判断直前まで進めること。計画のみで停止しないこと。

    3. 再発防止 Issue の起票判断

    今回の live GitHub 調査では、現時点で追加起票すべき独立した failure class は確認できませんでした。

    問題 対応
    lint の対象未検査 false-green #3034 自身で修正
    canary が隣接ファイルの検査しか証明しない #3034 の AC3 実装で修正
    grouped AC marker の LP016 誤拒否 既存 [#1719](#1719) を再利用
    pre-edit readiness と LP017 の不一致 既存 [#3006](#3006) を再利用

    したがって 新規 Issue は起票していません。実装・レビューの過程で別の root cause が再現された場合は、プロンプト内で dedupe と起票を明示的に承認しています。

    外部仕様についても、markdownlint-cli2 の globs / ignores / showFound と、textlint の --output-file / --format json の挙動は公式資料と整合しています。

    image

    GitHub

    +2

    この実行方針なら、単一ファイルの小さな文書改善としてスコープを維持しながら、実検査の false-green を重点的に防ぎ、merge 直前まで自律実行することを狙えます。

  8. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-10-11T10:32:06Z)

  9. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-10-11T11:10:00Z)

    IMPL_REVIEW_LOOP_RESULT_V1:
      schema_version: 1
      status: draft_pr_ready
      pr_url: "https://github.com/squne121/loop-protocol/pull/3038"
      head_sha: "98a6e8738ef7f0eb96e8d5d860451bd544f9884c"
      issue_number: 3034
      termination_reason: approved
      merge_ready: true
      iteration: 2
    
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: impl-review-loop
      follow_up_issues: []
      note_only_observations: []
  10. added 2 commits that reference this issue on Oct 11, 2026
  11. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    訂正補足: --config の対応ファイル名について

    PR #3038 の OWNER レビュー(https://github.com/squne121/loop-protocol/pull/3038#issuecomment-6109028011)を受けた訂正です。Issue 本文は変更していません(本文 SHA-256 は 4499ea55… のままです)。

    訂正する記述

    Issue 本文の背景にある「--config のファイル名は .markdownlint-cli2.* の形式が必須」は、markdownlint-cli2 0.17.2 の実装と一致しません。また、同名の最上位 globs は「結合」ではなく、cwd 側の値で置換されることを実測しています(PR 側の文書は実測どおりに記載済みです)。

    upstream の根拠(v0.17.2)

    readOptionsOrConfig()(https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/markdownlint-cli2.mjs)は、ファイル名の末尾で読み込み方を分けます。lockfile 解決版の同じソースで分岐を確認しました。

    種類 受理される末尾 読み込まれ方
    CLI2 options .markdownlint-cli2.jsonc / .yaml / .cjs / .mjs options として読む
    markdownlint のルール設定 .markdownlint.jsonc / .json / .yaml / .yml / .cjs / .mjs ルール設定として読み、内部で { config } に包む

    対応する末尾を持つ prefix 付きの名前も受理されます。両形式は中身の形式が異なるため、ファイル名だけを変えて交換してはいけません。

    実測(隔離ディレクトリ、markdownlint-cli2 v0.17.2 / markdownlint v0.37.4)

    • rules.markdownlint.json と opts.markdownlint-cli2.jsonc は、どちらも読み込まれ、違反のない Markdown で exit 0 でした。
    • 対応する末尾を持たない bad.config.json は、設定ファイルの読込エラーで exit 2 でした(この名前での実測であり、一般化しません)。
    • MD040 違反を含む Markdown に {"MD040": false} を .markdownlint.json 系で渡すと exit 0、同じ内容を .markdownlint-cli2.jsonc に改名すると MD040 が報告されて exit 1 でした。

    読み込みに成功したことと、lint 全体が exit 0 になることは別の事象です。実装の正は PR #3038 の body-authoring.md の記述であり、この補足コメントは恒久仕様ではありません。

  12. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-10-11T13:30:00Z)

    IMPL_REVIEW_LOOP_RESULT_V1:
      schema_version: 1
      status: draft_pr_ready
      pr_url: "https://github.com/squne121/loop-protocol/pull/3038"
      head_sha: "9840f1a9ad8bef226aac5e9d8389bb3940bfd08e"
      issue_number: 3034
      termination_reason: approved
      merge_ready: true
      iteration: 1
    
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: impl-review-loop
      follow_up_issues: []
      note_only_observations: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions