Skip to content

実装: Claude extension surface risk-trigger policy を review-issue / issue-contract-review の deterministic gate に配線する #2290

Closed
1 of 1 issue completed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "#2290 に対する OWNER REQUEST_CHANGES(https://github.com/squne121/loop-protocol/issues/2290#issuecomment-5396239195)で指示された scope reframe を実現する"
change_kind: workflow

Parent Issue

なし(#2283 は policy-definition を完了しマージ済み。本 Issue はその enforcement 配線側を担う独立 follow-up Issue である)

Parent Goal Ref

Current Validated Scope

  • scripts/agent-guards/ 配下に、docs/dev/extension-surface-runtime-policy.yaml を読み込み Allowed Paths と policy selector の overlap を判定する shared evaluator モジュールを新規追加する(既存の scripts/agent-guards/changed_file_matcher.py を .claude/skills/issue-contract-review/scripts/declared_path_overlap.py が動的ロードしている既存パターンを踏襲する)
  • .claude/skills/review-issue/scripts/check_issue_contract.py(review-issue の deterministic checker)へ、上記 shared evaluator を配線する
  • .claude/skills/issue-contract-review/scripts/contract_readiness_check.py(issue-contract-review の deterministic gate。check_rva_immediate_fields() と同型の追加関数として配線する)へ、同一の shared evaluator を配線する
  • 上記に対応するテスト・fixture を追加する

Remaining Parent Gaps

  • PR 実 diff と Issue 宣言の不一致を検出する consumer を pr-review-judge または impl-review-loop 側へ追加する作業は、本 Issue の Allowed Paths に含めず、規模次第でさらなる follow-up Issue に分離する
  • docs/dev/extension-surface-runtime-policy.yaml の selector coverage 自体を最新 Claude Code extension surface に追従させる拡張は、policy-definition 側の follow-up として本 Issue のスコープ外とする

Outcome

Issue の declared Allowed Paths と versioned runtime-risk policy(docs/dev/extension-surface-runtime-policy.yaml)の repository-resolved selectors を deterministic に照合し、Runtime Verification Applicability declaration の明白な矛盾を検出する。semantic diff 判定および PR actual diff 判定は行わない。review-issue と issue-contract-review の programmatic path が同一の shared evaluator を通じて同一の policy evaluation semantics を利用する状態になり、下記 Acceptance Criteria の決定論的テストケースが全て PASS していることを完了とする。

Runtime Verification Applicability

  • decision: not_applicable
  • reason: 本 Issue の変更対象は scripts/agent-guards/ 配下の shared evaluator(純粋な Python 静的ロジック)と、check_issue_contract.py / contract_readiness_check.py への配線、および対応テストである。.claude/agents/*.md の permissionMode や .claude/skills/*/SKILL.md の execution/mutation semantic は変更しないため、Claude Code のランタイム実行権限自体には影響しない。checker の decision 挙動変化は AC の決定論的テストケースで検証する

In Scope

  • docs/dev/extension-surface-runtime-policy.yaml(schema_version v2)の selectors[].source_scope: project かつ path_globs を読み込み、Issue の declared Allowed Paths(exact path / wildcard path 双方)との overlap を判定する shared evaluator を scripts/agent-guards/ に追加する
    • exact path は selector の path_globs と直接照合する
    • wildcard を含む Allowed Path は、完全な glob intersection engine を実装せず、normalized repo path の literal/static prefix 比較による conservative candidate 検出に留める(false negative を許容し false positive を避けない設計にはしない)
  • 複数の policy rule が一致した場合、policy 側の resolution.multiple_matches: evaluate_all / final_decision: most_restrictive に従って最終判定を導出するロジックを shared evaluator に実装する
  • 一致した rule 群から required verification_profiles を union で導出するロジックを shared evaluator に実装する(Issue 本文への verification_profile 名の重複記載は要求しない)
  • immediate 宣言時に、既存の Runtime Verification Applicability contract(docs/dev/runtime-verification-policy.md)が要求する runtime tag / applicable VC 等の必須フィールドが揃っているかを検証するロジックを shared evaluator 経由で check_issue_contract.py に配線する(新規ロジックは shared evaluator に集約し、check_issue_contract.py 固有の再実装は避ける)
  • check_issue_contract.py(review-issue)と contract_readiness_check.py(issue-contract-review、check_rva_immediate_fields() と同型の関数として追加)の双方へ shared evaluator を配線し、同一 fixture に対して同一 verdict を返すことをテストで担保する
  • 上記全てに対応する fixture とテストを scripts/agent-guards/tests/、.claude/skills/review-issue/tests/、.claude/skills/issue-contract-review/tests/ に追加する

Out of Scope

  • PR 実 diff と Issue 宣言の不一致を検出する pr-review-judge / impl-review-loop 側の consumer 実装(別 Issue で扱う)
  • Issue-time における semantic diff 判定(変更の意味的な正しさの評価)。本 Issue の evaluator は selector と Allowed Paths の構文的 overlap による candidate discovery のみを行う
  • docs/dev/extension-surface-runtime-policy.yaml の selector coverage 拡張・rule 内容の変更(policy-definition 側の follow-up)
  • production consumer inventory(fixture-only 宣言と実際の production 参照との矛盾検出)の deterministic 自動証明
  • human-evidence exception の deterministic 自動証明
  • 新規 Claude runtime harness / Claude CLI system test の追加
  • .claude/skills/review-issue/SKILL.md / .claude/skills/issue-contract-review/SKILL.md の workflow semantic 変更(説明反映が必要な場合も、単なる挙動追記に留め本 Issue の主目的にしない)
  • 最新 Claude Code の extension surface(hooks 種類、settings.json key 等)を consumer コード側へハードコードすること。selector の rule ID / frontmatter key は policy YAML 側にのみ存在させ、consumer コードへ複製しない

Acceptance Criteria

  • AC1: risky な exact Allowed Path(policy selector の path_globs と直接一致)を宣言しつつ Runtime Verification Applicability: not_applicable を宣言した fixture で、shared evaluator 配線後の checker が needs-fix を返す
  • AC2: risky な wildcard Allowed Path が policy selector と conservative overlap(literal/static prefix 一致)を持つ fixture で、checker が needs-fix を返す(semantic diff ではなく構文的 candidate 検出であることをテストコメントで明示する)
  • AC3: docs-only Allowed Paths のみを宣言し not_applicable を宣言した fixture で、checker が approve を返す
  • AC4: 複数の policy rule が一致する fixture で、shared evaluator が most_restrictive に従った単一の最終判定を返す
  • AC5: 複数の policy rule が一致する fixture で、required verification profile が matched rules から union で導出され、Issue 本文への重複宣言なしに判定へ反映される
  • AC6: immediate 宣言だが Runtime Verification Applicability contract が要求する runtime tag / applicable VC 等の必須フィールドが欠落している fixture で、checker が needs-fix を返す
  • AC7: 同一 fixture に対して check_issue_contract.py(review-issue)と contract_readiness_check.py(issue-contract-review)が shared evaluator 経由で同一の verdict を返す(parity test)
  • AC8: 既存の check_issue_contract.py / contract_readiness_check.py の他の checker ロジックが壊れていないことを既存テストスイート全体で確認する

Verification Commands

# AC1
$ uv run --locked pytest scripts/agent-guards/tests/test_extension_surface_policy_matcher.py -k exact_path_risky_not_applicable
# AC2
$ uv run --locked pytest scripts/agent-guards/tests/test_extension_surface_policy_matcher.py -k wildcard_conservative_overlap
# AC3
$ uv run --locked pytest scripts/agent-guards/tests/test_extension_surface_policy_matcher.py -k docs_only_not_applicable_approve
# AC4
$ uv run --locked pytest scripts/agent-guards/tests/test_extension_surface_policy_matcher.py -k multiple_rule_most_restrictive
# AC5
$ uv run --locked pytest scripts/agent-guards/tests/test_extension_surface_policy_matcher.py -k verification_profile_union_derived
# AC6
$ uv run --locked pytest .claude/skills/review-issue/tests/test_extension_surface_risk_trigger.py -k risk_trigger_immediate_incomplete
# AC7
$ uv run --locked pytest scripts/agent-guards/tests/test_extension_surface_policy_matcher.py -k review_issue_and_contract_readiness_parity
# AC8
$ uv run --locked pytest .claude/skills/review-issue/tests/
$ uv run --locked pytest .claude/skills/issue-contract-review/tests/
$ uv run --locked pytest scripts/agent-guards/tests/test_extension_surface_policy_matcher.py

Scope Delta(PR #2335 実装時に判明した Allowed Paths 拡張)

  • 拡張理由: 新規配線した EXTSURF001 check が .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_timeout_classification.py の既存 fixture(_FULL_ISSUE_BODY)における pre-existing な Runtime Verification Applicability 宣言の不整合(decision: not_applicable が declared Allowed Paths と matched policy selector の immediate 要求と矛盾)を正しく検出し、CI python-test-core を fail させた。
  • 拡張内容: 上記ファイルの fixture 内 Runtime Verification Applicability セクションのみを decision: immediate へ修正し、必須フィールドを補完する。テスト自体の意図(VCP_TIMEOUT classification 回帰カバレッジ)は変更しない。
  • Allowed Paths へ .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_timeout_classification.py を追加する。

Allowed Paths

  • scripts/agent-guards/extension_surface_policy_matcher.py
  • scripts/agent-guards/tests/test_extension_surface_policy_matcher.py
  • .claude/skills/review-issue/scripts/check_issue_contract.py
  • .claude/skills/review-issue/fixtures/**
  • .claude/skills/review-issue/schemas/**
  • .claude/skills/review-issue/tests/**
  • .claude/skills/issue-contract-review/scripts/contract_readiness_check.py
  • .claude/skills/issue-contract-review/tests/**
  • .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_timeout_classification.py

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • shared evaluator の配置が scripts/agent-guards/ 単体の追加で収まらず、大規模な cross-skill architecture change を要求すると判明した場合

Required Skills

なし

Required Design References

  • docs/dev/runtime-verification-policy.md
  • docs/dev/extension-surface-runtime-policy.yaml
  • docs/dev/agent-skill-boundaries.md
  • docs/adr/0008-deterministic-evidence-vs-semantic-judgment.md

Scope Delta(任意)

N/A

Background

Issue #2283(Claude extension surface risk-trigger policy の policy-definition)は PR #2291 でマージ済み・CLOSED。docs/dev/runtime-verification-policy.md §11 と docs/dev/extension-surface-runtime-policy.yaml(schema_version v2、selectors[].source_scope / path_globs / semantic_detectors[].type / verification_profiles / exceptions[] / resolution.multiple_matches: evaluate_all / final_decision: most_restrictive)が確定した。

本 Issue #2290 はその enforcement 配線側の follow-up として起票されたが、OWNER の REQUEST_CHANGES(https://github.com/squne121/loop-protocol/issues/2290#issuecomment-5396239195)で以下の設計方針転換が指示され、OWNER 本人により明示承認された。

  • Issue-time deterministic gate の責務を「declared Allowed Paths と runtime-risk policy selector を照合して candidate を発見し、Runtime Verification declaration の明白な矛盾を検出すること」に縮小する
  • Issue-time では semantic diff の意味判定を行わない(PR-time consumer の責務として Out of Scope に残す)
  • production consumer inventory や human-evidence exception の deterministic 自動証明は削除する
  • verification_profile を Issue 本文へ二重記載させず matched policy rule から導出する
  • issue-contract-review の programmatic route には SKILL.md 説明追記でなく executable integration を行う(run_contract_review_once.py は現状 check_issue_contract.py を一切 import しておらず、review-issue と issue-contract-review は完全に独立したプロセスであることを確認済み)

Notes for Reviewer

Delivery Rule

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    on Aug 22, 2026
  2. squne121 commented on Aug 24, 2026

    @squne121
    OwnerAuthor

    判定

    REQUEST_CHANGES。実装着手前に Issue #2290 を修正した方がよいです。

    ただし、必要なのはハーネス追加や安全策の強化ではありません。むしろ現状は、Issue-time の deterministic checker に「実diffの意味判定」まで背負わせすぎているのが問題です。個人開発としては、#2290 を「宣言されたパスから runtime-risk candidate を検出する軽量 gate」に縮小すると、かなり有用な仕組みになります。

    なお前提だった #2283 は PR #2291 で既に merge 済みで、最終レビューでも v2 policy の technical blocker 解消後に APPROVE されています。#2290 の「#2283 merge 待ち」は現在は stale です。

    優先度 | Finding | 判定 -- | -- | -- P0 | #2290 が自分自身の新 gate に違反する | blocker P0 | Issue review 時点には「実際の semantic delta」という入力が存在しない | blocker P0 | issue-contract-review の programmatic path に gate が配線されない | blocker P1 | Allowed Paths glob と policy glob の照合仕様がない | 要修正 P1 | AC5 の production consumer inventory は deterministic 化すべきでない | 削除推奨 P1 | AC6 の verification_profile 要求が二重SSOT | 要修正 P1 | 現行 v2 policy 自体が最新 Claude Code surface を取りこぼす | follow-up必須 P2 | #1712 と同一巨大checkerを触るため競合可能性あり | 非blocker P2 | #2283 dependency記述が古い | 文言修正

    P0-1 — #2290 が完成すると、#2290 自身が needs-fix になる

    これは最も明確な契約矛盾です。

    #2290 は Allowed Paths に review-issue/SKILL.md と issue-contract-review/SKILL.md を含め、それらの workflow/gate 挙動を変更しようとしています。一方で Runtime Verification Applicability は decision: not_applicable。そして AC2 は「.claude/skills/*/SKILL.md の execution/mutation semantic change + not_applicable は needs-fix」を要求しています。

    現行 v2 policy も SKILL.md の procedure body / output contract の変更を runtime-risk として扱っています。

    つまり、新checkerをそのまま #2290 にかけると、

    「SKILL の gate 実行手順を変更しているのに not_applicable」

    として自分を拒否するのが正しい結果になります。

    推奨修正は immediate に変えることではありません。 それでは checker の説明文を変更するだけのために live Claude runtime verification が必要になり、今回の目的に対して重すぎます。

    より良い修正は、#2290 から SKILL.md 編集を外し、実際の executable integration を変更することです。後述の contract_readiness_check.py 側へ配線すれば、#2290 自身は Python checker の静的変更なので not_applicable のまま合理的です。

    P0-2 — 「semantic change」を deterministic checker が判定するための入力がない

    Issue の Outcome/In Scope は「Allowed Paths / Runtime Verification と実際の変更 surface を照合する」としています。しかし同じ Issue の Out of Scope では PR actual diff vs Issue declaration の検査を別 consumer に分離しています。

    この2つは両立しません。

    check_issue_contract.py が Issue review 時点で持っているのは、基本的に Issue 本文です。現在も Allowed Paths を抽出して coarse な documentation / code_runtime / other を分類しているだけです。

    したがって、たとえば

    Allowed Paths:
    .claude/skills/foo/SKILL.md

    だけを見ても、

    • Procedure を変える

    • 実行commandを変える

    • 単なる整形をする

    • 誤字を直す

    のどれなのか deterministic code には分かりません。

    さらにこれは、このリポジトリが直近で採択した ADR 0008 と直接衝突します。ADR 0008 は「facts/invariants/syntax は deterministic code、semantics/architecture/trade-off は LLM reasoning」と明示し、script に semantic verdict を持たせる Option A を棄却しています。個人開発ではさらに advisory-by-default を採用しています。

    したがって #2290 は、

    「semantic detectorを実行するgate」ではなく「semantic review/runtime verificationが必要かもしれない path を決定論的に発見するgate」

    へ縮小すべきです。

    具体的には Issue-time では selectors[].path_globs と Allowed Paths だけを見る。semantic_detectors は PR actual diff が存在する後段で評価する。この分離なら ADR 0008 とも整合します。

    P0-3 — issue-contract-review には実際には配線されない

    Issue のタイトル・Outcome は review-issue / issue-contract-review 両方への deterministic gate 配線を要求しています。ところが Allowed Paths にある issue-contract-review 側ファイルは SKILL.mdだけです。

    現行の programmatic entry point run_contract_review_once.py は、実際には次の4系統を実行します。

    contract_readiness_check.py → blockers → product spec → baseline VC preflight

    check_issue_contract.py はここには含まれていません。

    さらに contract_readiness_check.py は本文 validation に validate_issue_body.py を起動しています。

    つまり SKILL.md に「このチェックをしろ」と書いても、interactive Claude が従う可能性はあっても、run_contract_review_once.py の deterministic status には寄与しません。

    これは Outcome 未達です。

    ここは Scope Delta して、

    issue-contract-review/scripts/contract_readiness_check.py とその unit test

    を Allowed Paths に入れるべきです。run_contract_review_once.py は既に readiness checker を呼んでいるので、そこまで変更する必要はありません。


    P1 — glob同士をどう照合するのか決まっていない

    これは実装時にかなり危険です。

    policy 側は、

    .claude/skills/**/SKILL.md

    のような glob を持ち、Issue の Allowed Paths 側も、

    .claude/skills/review-issue/**

    のような glob を持ち得ます。

    これは path vs glob ではなく glob vs glob の集合交差判定です。

    Python の fnmatch は / を特別扱いせず、glob は path segment を認識し、** の recursive semantics も別物です。したがって「とりあえず fnmatch()」では consumer ごとに判定がズレます。 (Python documentation)

    完全な glob-intersection engine を作るのは、この個人プロジェクトでは過剰です。

    実用上は、

    • exact path → 通常の policy glob match

    • Allowed Paths が wildcard → literal prefix 同士で overlap を保守的判定

    • repo path は / 区切りへnormalize

    • 一つでも overlap すれば candidate とする

    程度で十分です。

    そして AC に exact path 1件 + wildcard Allowed Path 1件だけ追加して挙動を固定すべきです。


    P1 — AC5 の「production consumer reference検出」は削った方がよい

    これは #2290 で最もハーネス化しやすく、かつ精度が悪い部分です。

    現行 policy 自身も production_consumer_inventory_empty 等を human_evidence_required として定義しています。つまり machine predicate として自動承認する契約ではありません。

    Claude Code の現在の subagent はファイルパスを参照して起動する必要がありません。agent の identity は frontmatter name で決まり、description に基づいて自動 delegation もされます。ディレクトリも再帰的に探索されます。 (Claude)

    hooks も project settings だけではなく、user settings、local settings、managed policy、plugin、skill/agent frontmatter から供給されます。 (Claude)

    したがって rg で「production code にファイルパス参照なし」を証明しても runtime unreachable の証明にはなりません。

    AC5 は deterministic gate から削除し、

    human-evidence exception は checker が自動適用しない

    だけにするのが最小かつ安全です。必要なら既存 semantic review lane に任せればよく、新しい consumer inventory scanner は不要です。


    P1 — AC6 の verification_profile は Issue に書かせない方がよい

    現在の policy は各 rule 自身が verification_profile を持っています。

    一方、現在の Runtime Verification Applicability 契約が immediate に要求しているのは applicable AC、環境条件、SKIP/exit 77、fallback扱い、artifact evidence 等であり、「profile名を Issue 本文へコピーする」という契約はありません。

    したがって AC6 の「tag / profile / VC が不足したら needs-fix」は 二重SSOTになります。

    profile は matched rule から自動導出すべきです。

    たとえば agent と SubAgent lifecycle の2 ruleに一致すれば、

    required_profiles:
    - subagent-delegation-runtime-smoke
    - subagent-lifecycle-causal-evidence-smoke

    と evaluator が返せばよい。

    Issue 作者に同じ文字列を書かせる必要はありません。これはかなり workflow friction を減らせます。


    P1 — v2 policy を hardcode するとすぐ陳腐化する

    ここは最新の Claude Code 公式仕様を確認すると重要です。

    現在の subagent frontmatter は permissionMode / tools / disallowedTools / description だけでなく、model, maxTurns, skills, mcpServers, hooks, memory, background, effort, isolation, initialPrompt なども runtime behavior を変更します。 (Claude)

    一方、現在 main の v2 policy の agent detector は主に permissionMode, disallowedTools, description, tools と body を見ています。

    Skills についても、Claude Code は SKILL.md と scripts/ だけでなく、reference、template、examples その他の supporting files を runtime にロードできます。 (Claude)

    つまり #2290 完了=Claude extension surface 完全カバーではありません。

    これは #2290 にさらにロジックを足して直すべきではありません。むしろ逆で、#2290 の consumer は rule ID や frontmatter key を一切 hardcode せず、policy v2 を純粋に読む構造にするべきです。

    そのうえで #2283 follow-up として、

    • agent runtime-affecting frontmatter拡充

    • skill supporting files

    • .claude/commands/**

    • .claude/rules/**

    などを改めて整理すれば、#2290 のコード変更なしで coverage が拡張できます。


    私なら #2290 をこう縮めます

    新しい Outcome は概念的には、

    Issue の declared Allowed Paths と v2 policy の repository-resolved selector を照合し、Runtime Verification declaration の明白な矛盾を deterministic に検出する。semantic diff 判定と PR actual diff 判定は行わない。

    にします。

    AC も次の7件程度で十分です。

    1. .claude/agents/foo.md を Allowed Paths に含み not_applicable → needs-fix

    2. .claude/skills/foo/SKILL.md を含み not_applicable → needs-fix

    3. docs/dev/foo.md のみ + not_applicable → approve

    4. wildcard Allowed Path と policy selector の overlap が検出される

    5. 複数rule一致時は policy の most_restrictive と profile union を使う

    6. immediate なのに runtime tag / applicable VC がない → needs-fix

    7. review-issue と contract_readiness_check が同じ fixture に同じ policy verdict を返す

    削除するもの: semantic diff 判定、production consumer inventory、human-evidence exception の自動証明、新しい runtime harness。

    これならテストは全部 pure Python fixture でよく、Claude CLIを起動する必要もありません。

    Allowed Paths も変更した方がよい

    現状の SKILL.md 2件は外し、代わりに少なくとも issue-contract-review/scripts/contract_readiness_check.py とその対象テストを入れるのが妥当です。

    これにより、

    shared evaluator → review-issue → contract-readiness → run_contract_review_once

    という実際の programmatic route ができます。

    また #1712 はまだ open で、current check_issue_contract.py の C5 は依然として broad re.findall(r'AC(\d+)') ベースです。 したがって #1712 を hard dependency にする必要まではありませんが、同じ巨大checkerを触るため #1712 merge 後に rebase する順番は維持した方が楽です。

    最終評価

    verdict: REQUEST_CHANGES
    

    blockers:

    • "#2290 自身の SKILL.md semantic change と decision:not_applicable が AC2 と自己矛盾"
    • "Issue-time checker には semantic_delta / actual changed surface を判定する入力が存在しない"
    • "issue-contract-review の programmatic path に gate を配線できる executable file が Allowed Paths にない"

    required_reframe:

    • "Issue-time は declared-path risk trigger のみに限定"
    • "semantic_detectors / actual diff は PR-time consumer へ残す"
    • "contract_readiness_check.py に同じ evaluator を配線"
    • "human-evidence exception / production consumer inventory の自動判定を削除"
    • "verification_profile は policy から導出"
    • "glob matching/overlap semantics を固定"

    non_blocking_followups:

    • "current Claude Code frontmatter fields の policy coverage 更新"
    • "skill supporting files の policy coverage 更新"
    • "#1712 との実装順序/rebase整理"

    方向性自体は有用です。問題は現在の #2290 が、Issue-time の静的 gate と PR-time の semantic/diff gate を一つにしようとしている点です。ここを分ければ、実装量もブロッキング頻度も減り、実際に役立つチェックだけ残せます。

    ## 判定

    REQUEST_CHANGES。実装着手前に Issue #2290 を修正した方がよいです。

    ただし、必要なのはハーネス追加や安全策の強化ではありません。むしろ現状は、Issue-time の deterministic checker に「実diffの意味判定」まで背負わせすぎているのが問題です。個人開発としては、#2290 を「宣言されたパスから runtime-risk candidate を検出する軽量 gate」に縮小すると、かなり有用な仕組みになります。

    なお前提だった #2283 は PR #2291 で既に merge 済みで、最終レビューでも v2 policy の technical blocker 解消後に APPROVE されています。#2290 の「#2283 merge 待ち」は現在は stale です。

    優先度 Finding 判定
    P0 #2290 が自分自身の新 gate に違反する blocker
    P0 Issue review 時点には「実際の semantic delta」という入力が存在しない blocker
    P0 issue-contract-review の programmatic path に gate が配線されない blocker
    P1 Allowed Paths glob と policy glob の照合仕様がない 要修正
    P1 AC5 の production consumer inventory は deterministic 化すべきでない 削除推奨
    P1 AC6 の verification_profile 要求が二重SSOT 要修正
    P1 現行 v2 policy 自体が最新 Claude Code surface を取りこぼす follow-up必須
    P2 #1712 と同一巨大checkerを触るため競合可能性あり 非blocker
    P2 #2283 dependency記述が古い 文言修正

    P0-1 — #2290 が完成すると、#2290 自身が needs-fix になる

    これは最も明確な契約矛盾です。

    #2290 は Allowed Paths に review-issue/SKILL.md と issue-contract-review/SKILL.md を含め、それらの workflow/gate 挙動を変更しようとしています。一方で Runtime Verification Applicability は decision: not_applicable。そして AC2 は「.claude/skills/*/SKILL.md の execution/mutation semantic change + not_applicable は needs-fix」を要求しています。

    現行 v2 policy も SKILL.md の procedure body / output contract の変更を runtime-risk として扱っています。

    つまり、新checkerをそのまま #2290 にかけると、

    「SKILL の gate 実行手順を変更しているのに not_applicable」

    として自分を拒否するのが正しい結果になります。

    推奨修正は immediate に変えることではありません。 それでは checker の説明文を変更するだけのために live Claude runtime verification が必要になり、今回の目的に対して重すぎます。

    より良い修正は、#2290 から SKILL.md 編集を外し、実際の executable integration を変更することです。後述の contract_readiness_check.py 側へ配線すれば、#2290 自身は Python checker の静的変更なので not_applicable のまま合理的です。

    P0-2 — 「semantic change」を deterministic checker が判定するための入力がない

    Issue の Outcome/In Scope は「Allowed Paths / Runtime Verification と実際の変更 surface を照合する」としています。しかし同じ Issue の Out of Scope では PR actual diff vs Issue declaration の検査を別 consumer に分離しています。

    この2つは両立しません。

    check_issue_contract.py が Issue review 時点で持っているのは、基本的に Issue 本文です。現在も Allowed Paths を抽出して coarse な documentation / code_runtime / other を分類しているだけです。

    したがって、たとえば

    Allowed Paths:
    .claude/skills/foo/SKILL.md
    

    だけを見ても、

    • Procedure を変える
    • 実行commandを変える
    • 単なる整形をする
    • 誤字を直す

    のどれなのか deterministic code には分かりません。

    さらにこれは、このリポジトリが直近で採択した ADR 0008 と直接衝突します。ADR 0008 は「facts/invariants/syntax は deterministic code、semantics/architecture/trade-off は LLM reasoning」と明示し、script に semantic verdict を持たせる Option A を棄却しています。個人開発ではさらに advisory-by-default を採用しています。

    したがって #2290 は、

    「semantic detectorを実行するgate」ではなく「semantic review/runtime verificationが必要かもしれない path を決定論的に発見するgate」

    へ縮小すべきです。

    具体的には Issue-time では selectors[].path_globs と Allowed Paths だけを見る。semantic_detectors は PR actual diff が存在する後段で評価する。この分離なら ADR 0008 とも整合します。

    P0-3 — issue-contract-review には実際には配線されない

    Issue のタイトル・Outcome は review-issue / issue-contract-review 両方への deterministic gate 配線を要求しています。ところが Allowed Paths にある issue-contract-review 側ファイルは SKILL.mdだけです。

    現行の programmatic entry point run_contract_review_once.py は、実際には次の4系統を実行します。

    contract_readiness_check.py → blockers → product spec → baseline VC preflight

    check_issue_contract.py はここには含まれていません。

    さらに contract_readiness_check.py は本文 validation に validate_issue_body.py を起動しています。

    つまり SKILL.md に「このチェックをしろ」と書いても、interactive Claude が従う可能性はあっても、run_contract_review_once.py の deterministic status には寄与しません。

    これは Outcome 未達です。

    ここは Scope Delta して、

    issue-contract-review/scripts/contract_readiness_check.py とその unit test

    を Allowed Paths に入れるべきです。run_contract_review_once.py は既に readiness checker を呼んでいるので、そこまで変更する必要はありません。


    P1 — glob同士をどう照合するのか決まっていない

    これは実装時にかなり危険です。

    policy 側は、

    .claude/skills/**/SKILL.md

    のような glob を持ち、Issue の Allowed Paths 側も、

    .claude/skills/review-issue/**
    

    のような glob を持ち得ます。

    これは path vs glob ではなく glob vs glob の集合交差判定です。

    Python の fnmatch は / を特別扱いせず、glob は path segment を認識し、** の recursive semantics も別物です。したがって「とりあえず fnmatch()」では consumer ごとに判定がズレます。 ([Python documentation]1)

    完全な glob-intersection engine を作るのは、この個人プロジェクトでは過剰です。

    実用上は、

    • exact path → 通常の policy glob match
    • Allowed Paths が wildcard → literal prefix 同士で overlap を保守的判定
    • repo path は / 区切りへnormalize
    • 一つでも overlap すれば candidate とする

    程度で十分です。

    そして AC に exact path 1件 + wildcard Allowed Path 1件だけ追加して挙動を固定すべきです。


    P1 — AC5 の「production consumer reference検出」は削った方がよい

    これは #2290 で最もハーネス化しやすく、かつ精度が悪い部分です。

    現行 policy 自身も production_consumer_inventory_empty 等を human_evidence_required として定義しています。つまり machine predicate として自動承認する契約ではありません。

    Claude Code の現在の subagent はファイルパスを参照して起動する必要がありません。agent の identity は frontmatter name で決まり、description に基づいて自動 delegation もされます。ディレクトリも再帰的に探索されます。 ([Claude]2)

    hooks も project settings だけではなく、user settings、local settings、managed policy、plugin、skill/agent frontmatter から供給されます。 ([Claude]3)

    したがって rg で「production code にファイルパス参照なし」を証明しても runtime unreachable の証明にはなりません。

    AC5 は deterministic gate から削除し、

    human-evidence exception は checker が自動適用しない

    だけにするのが最小かつ安全です。必要なら既存 semantic review lane に任せればよく、新しい consumer inventory scanner は不要です。


    P1 — AC6 の verification_profile は Issue に書かせない方がよい

    現在の policy は各 rule 自身が verification_profile を持っています。

    一方、現在の Runtime Verification Applicability 契約が immediate に要求しているのは applicable AC、環境条件、SKIP/exit 77、fallback扱い、artifact evidence 等であり、「profile名を Issue 本文へコピーする」という契約はありません。

    したがって AC6 の「tag / profile / VC が不足したら needs-fix」は 二重SSOTになります。

    profile は matched rule から自動導出すべきです。

    たとえば agent と SubAgent lifecycle の2 ruleに一致すれば、

    required_profiles:
    - subagent-delegation-runtime-smoke
    - subagent-lifecycle-causal-evidence-smoke
    

    と evaluator が返せばよい。

    Issue 作者に同じ文字列を書かせる必要はありません。これはかなり workflow friction を減らせます。


    P1 — v2 policy を hardcode するとすぐ陳腐化する

    ここは最新の Claude Code 公式仕様を確認すると重要です。

    現在の subagent frontmatter は permissionMode / tools / disallowedTools / description だけでなく、model, maxTurns, skills, mcpServers, hooks, memory, background, effort, isolation, initialPrompt なども runtime behavior を変更します。 ([Claude]2)

    一方、現在 main の v2 policy の agent detector は主に permissionMode, disallowedTools, description, tools と body を見ています。

    Skills についても、Claude Code は SKILL.md と scripts/ だけでなく、reference、template、examples その他の supporting files を runtime にロードできます。 ([Claude]4)

    つまり #2290 完了=Claude extension surface 完全カバーではありません。

    これは #2290 にさらにロジックを足して直すべきではありません。むしろ逆で、#2290 の consumer は rule ID や frontmatter key を一切 hardcode せず、policy v2 を純粋に読む構造にするべきです。

    そのうえで #2283 follow-up として、

    • agent runtime-affecting frontmatter拡充
    • skill supporting files
    • .claude/commands/**
    • .claude/rules/**

    などを改めて整理すれば、#2290 のコード変更なしで coverage が拡張できます。


    私なら #2290 をこう縮めます

    新しい Outcome は概念的には、

    Issue の declared Allowed Paths と v2 policy の repository-resolved selector を照合し、Runtime Verification declaration の明白な矛盾を deterministic に検出する。semantic diff 判定と PR actual diff 判定は行わない。

    にします。

    AC も次の7件程度で十分です。

    1. .claude/agents/foo.md を Allowed Paths に含み not_applicable → needs-fix
    2. .claude/skills/foo/SKILL.md を含み not_applicable → needs-fix
    3. docs/dev/foo.md のみ + not_applicable → approve
    4. wildcard Allowed Path と policy selector の overlap が検出される
    5. 複数rule一致時は policy の most_restrictive と profile union を使う
    6. immediate なのに runtime tag / applicable VC がない → needs-fix
    7. review-issue と contract_readiness_check が同じ fixture に同じ policy verdict を返す

    削除するもの: semantic diff 判定、production consumer inventory、human-evidence exception の自動証明、新しい runtime harness。

    これならテストは全部 pure Python fixture でよく、Claude CLIを起動する必要もありません。

    Allowed Paths も変更した方がよい

    現状の SKILL.md 2件は外し、代わりに少なくとも issue-contract-review/scripts/contract_readiness_check.py とその対象テストを入れるのが妥当です。

    これにより、

    shared evaluator → review-issue → contract-readiness → run_contract_review_once

    という実際の programmatic route ができます。

    また #1712 はまだ open で、current check_issue_contract.py の C5 は依然として broad re.findall(r'AC(\d+)') ベースです。 したがって #1712 を hard dependency にする必要まではありませんが、同じ巨大checkerを触るため #1712 merge 後に rebase する順番は維持した方が楽です。

    最終評価

    verdict: REQUEST_CHANGES
    
    blockers:
      - "#2290 自身の SKILL.md semantic change と decision:not_applicable が AC2 と自己矛盾"
      - "Issue-time checker には semantic_delta / actual changed surface を判定する入力が存在しない"
      - "issue-contract-review の programmatic path に gate を配線できる executable file が Allowed Paths にない"
    
    required_reframe:
      - "Issue-time は declared-path risk trigger のみに限定"
      - "semantic_detectors / actual diff は PR-time consumer へ残す"
      - "contract_readiness_check.py に同じ evaluator を配線"
      - "human-evidence exception / production consumer inventory の自動判定を削除"
      - "verification_profile は policy から導出"
      - "glob matching/overlap semantics を固定"
    
    non_blocking_followups:
      - "current Claude Code frontmatter fields の policy coverage 更新"
      - "skill supporting files の policy coverage 更新"
      - "#1712 との実装順序/rebase整理"

    方向性自体は有用です。問題は現在の #2290 が、Issue-time の静的 gate と PR-time の semantic/diff gate を一つにしようとしている点です。ここを分ければ、実装量もブロッキング頻度も減り、実際に役立つチェックだけ残せます。

  3. squne121 commented on Aug 24, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop: human_judgment_required で停止

    OWNER の REQUEST_CHANGES コメント(https://github.com/squne121/loop-protocol/issues/2290#issuecomment-5396239195)を anchor comment として preflight.run.with_human_context → contract_update.run.with_human_context を実行したところ、以下の理由で停止しました。

    • contract_update.run.with_human_context --consume-contract-patch-plan の実行が STATUS: blocked / NEXT_ACTION: human_judgment_required / BLOCKERS: PLANNER_FAIL_CLOSED を返しました。
    • この実行中に Issue 本文への write が1回発生し(contract_update.writes: 1)、その結果生成された本文が 破損(HTML パース残骸と思われる断片が ## Allowed Paths セクション等に混入) した状態で保存されていたことを検知しました(例: `docs/en/sub-agents"`、`.claude/commands/**</code></p></li><li><p><code` 等の不正な行)。
    • これは自動化ツール側(contract_update.run.with_human_context の patch 生成経路)の不具合と考えられ、OWNER コメントが指示するスコープ判断(enforcement gate の範囲縮小)とは別の問題です。
    • 本文は破損検知後、直前の正規スナップショット(sha256:195213c18a9c4b7c9438d3d4c65dc1906a5b1fcc76fd2c581b31432406e30db7、破損前の内容と同一)へ復元済みです。

    保留中の人間判断(refinement loop はここで停止)

    OWNER コメントは #2290 の enforcement 配線アプローチ自体に P0 blocker を3件指摘しており、「Issue-time deterministic checker に実 diff の意味判定まで背負わせない、軽量 gate に縮小する」という設計方針転換を提案しています。これは Issue 本文の Outcome / AC / Verification Commands の作り直しを伴う可能性が高く、issue-refinement-loop の「Scope Change Stop Conditions」(AC の追加/入替、Allowed Paths の変更)に該当しうるため、人間の意思決定が必要です。

    加えて、contract_update.run.with_human_context が本文破損を引き起こした事象自体もツールの不具合として別途調査・修正が必要です(再現性がある場合、本 loop を再実行する前に原因調査を推奨します)。

    自動継続はここで停止します。

  4. squne121 commented on Aug 24, 2026

    @squne121
    OwnerAuthor

    推奨は、OWNER の設計方針転換をそのまま採択して #2290 を縮小することです。これは既存 Issue の微修正ではなく、停止条件が要求していた human judgment をここで明示的に与える扱いにします。現行 #2290 は SKILL.md 変更を Allowed Paths に含めつつ not_applicable を宣言し、さらに Issue-time に観測できない semantic delta まで判定対象にしているため、OWNER 指摘の3つの P0 は実質 blocker です。

    具体的には、次の順序がよいです。

    1. 実装: Claude extension surface risk-trigger policy を review-issue / issue-contract-review の deterministic gate に配線する #2290 の human decision を確定する。Issue-time の責務を「Allowed Paths と policy selector の照合による runtime-risk candidate 検出」に限定し、semantic detector / actual diff 判定は PR-time 側へ残します。verification_profile は policy から導出、production consumer inventory の自動証明は削除、contract_readiness_check.py を programmatic route に追加します。run_contract_review_once.py は既に readiness checker を最初に実行する構造なので、この配線は自然です。
    2. 実装: Claude extension surface risk-trigger policy を review-issue / issue-contract-review の deterministic gate に配線する #2290 の本文更新と破損バグを別スコープにする。今回の anchor comment の raw body 自体に <!--StartFragment--> を含む literal HTML と同内容の Markdown が重複しています。したがって原因は contract_update 単独とはまだ断定せず、「anchor comment の生成/保存時点の汚染」と「consumer が malformed context を mutation 前に拒否できなかった」の両方を調査します。
    3. 原因が判明するまで contract_update.run.with_human_context に 実装: Claude extension surface risk-trigger policy を review-issue / issue-contract-review の deterministic gate に配線する #2290 を再度 mutate させない。既存の transaction-safe な Issue 編集経路を確認して、body-file ベースで 実装: Claude extension surface risk-trigger policy を review-issue / issue-contract-review の deterministic gate に配線する #2290 を直接更新し、write 後に body SHA と HTML 残骸不在を検証します。
    4. 破損バグは再現できたら別 Issue 化します。同じ PR に 実装: Claude extension surface risk-trigger policy を review-issue / issue-contract-review の deterministic gate に配線する #2290 enforcement と refinement-loop 修正を混ぜない方がよいです。特に「mutation 前に生成 body を再parseし、raw HTML fragment / contract section corruption があれば write=0 で fail closed」という最低限の data-integrity gate は価値があります。
    5. 実装: check_issue_contract.py の C5_ac_vc_number_alignment が AC セクション全体への広域正規表現で説明文中の AC 番号を誤抽出し、かつ VC の余分な AC 参照を検出しない問題を修正する #1712 は hard dependency にしないものの、現在も OPEN で check_issue_contract.py を共有しています。競合確認を行い、実装時の rebase 順序だけ考慮するのが妥当です。
    6. Claude Code の現行仕様も OWNER の follow-up 分離を支持しています。subagent は name で識別され、.claude/agents/ は再帰探索され、frontmatter も model, mcpServers, hooks, memory, background, isolation など広範です。また Skill は SKILL.md 以外の reference/example/script 等も runtime に利用できます。これらを 実装: Claude extension surface risk-trigger policy を review-issue / issue-contract-review の deterministic gate に配線する #2290 consumer に hardcode せず、policy definition 側の follow-up に残すのが適切です。([Claude]1)

    また ADR 0008 は deterministic code を facts/invariants/syntax/reproducible checks に、semantic judgment を LLM に割り当てています。今回の縮小案はこの既存設計と整合します。

    以下をそのまま Claude Code に渡すのがよいです。

    Issue #2290 human judgment 解消・本文再設計・破損バグ調査

    対象リポジトリ: squne121/loop-protocol

    対象 Issue: #2290

    Human Decision

    Issue #2290 の refinement loop が human_judgment_required で停止した件について、OWNER として以下を明示的に承認する。

    この Human Decision は、従来の Scope Change Stop Condition に対する OWNER authorization として扱ってよい。

    重要: 最初に SubAgent を使うこと

    実作業を開始する前に、main thread から以下の3つの独立 SubAgent を並列で起動すること。

    SubAgent A — #2290 contract reframe auditor

    Issue #2290、OWNER REQUEST_CHANGES コメント、#2283/PR #2291、#1712、ADR 0008、現行 runtime-verification policy、review-issue、issue-contract-review の実装を調査する。

    成果物:

    read-only で調査し、GitHub mutation やコード変更は禁止。

    SubAgent B — contract_update corruption investigator

    今回の本文破損事故を調査する。

    必ず以下を確認すること。

    今回の事故を、

    comment producer contamination
    anchor-context normalization bug
    patch-plan generation bug
    patch application bug
    pre-write validation gap

    のどこに分類できるか、証拠付きで切り分ける。

    可能なら local fixture だけで reproduction を作る方法を提示する。ただしこの SubAgent 自身はコード変更・GitHub mutationをしない。

    SubAgent C — independent adversarial reviewer

    A/B と独立して、以下を敵対的にレビューする。

    read-only。

    SubAgent synchronization requirement

    3つを起動したら、main thread は先に本文更新・Issue mutation・コード変更へ進んではならない。

    A/B/C の全 SubAgent が作業完了するまで明示的に待つこと。

    全SubAgentの最終結果を取得してから統合判断を行うこと。

    nested SubAgent delegation は禁止。SubAgent からさらに SubAgent を起動させない。

    Phase 1 — 調査結果を統合する

    3レポートを突き合わせ、事実と推測を分離する。

    OWNER REQUEST_CHANGES を盲目的に転記するのではなく、current main の実装で再検証すること。

    特に以下を repository assets で確認する。

    必要なら Claude Code 公式ドキュメントも確認する。ただし最新 Claude Code surface coverage の拡張は #2290 に実装せず、policy-definition follow-up として扱う。

    Phase 2 — #2290 の contract を再設計する

    原則として新しい Outcome は以下の意味にする。

    「Issue の declared Allowed Paths と versioned runtime-risk policy の repository-resolved selectors を deterministic に照合し、Runtime Verification declaration の明白な矛盾を検出する。semantic diff 判定および PR actual diff 判定は行わない。review-issue と issue-contract-review の programmatic path が同一の policy evaluation semantics を利用する。」

    AC は最小構成にする。

    少なくとも以下の挙動を contract 化する。

    1. risky な exact Allowed Path + not_applicable が needs-fix
    2. risky な wildcard Allowed Path と policy selector の conservative overlap を検出
    3. docs-only + not_applicable は approve
    4. 複数 policy rule 一致時は policy-defined most_restrictive を使う
    5. required verification profiles は matched rules から union で導出する
    6. immediate なのに既存 Runtime Verification contract が要求する runtime tag / applicable VC 等を満たさない場合は needs-fix
    7. review-issue と contract_readiness_check が同一 fixture に対して同一 policy verdict を返す
    8. existing checker regression suite が PASS

    以下は削除する。

    glob-vs-glob は完全な glob intersection engine を作らない。

    exact path は通常の policy selector matching、wildcard Allowed Path は normalized repo path の literal/static prefix 等を使った conservative candidate detection で十分かを検討し、最小仕様に固定すること。

    Phase 3 — Allowed Paths を再構成する

    OWNER reframe と current implementation の両方から導出すること。

    少なくとも、

    .claude/skills/issue-contract-review/scripts/contract_readiness_check.py

    および対応 unit test は候補に含める。

    現状の

    .claude/skills/review-issue/SKILL.md
    .claude/skills/issue-contract-review/SKILL.md

    は、単なる説明更新のためだけなら Allowed Paths から外す。

    path_classification.py については惰性で残さない。shared evaluator の配置・既存 classification API の責務を調査し、本当に必要な場合だけ残す。

    新規 shared evaluator file が必要な場合は、既存 policy consumer の責務・import boundary を調査して最小の配置を選ぶこと。rule ID や Claude Code frontmatter key を consumer 側へ hardcode してはならない。

    Phase 4 — Issue本文破損バグを切り分ける

    今回の anchor comment は、raw GitHub body に literal HTML fragment と Markdown duplication が保存されている可能性がある。

    したがって「contract_update が HTML を生成した」と先に決めつけないこと。

    producer と consumer の双方を調査する。

    最低限、次の invariants が必要か評価する。

    • GitHub comment retrieval で raw Markdown と rendered HTML を混同しない
    • anchor context の canonical representation を1種類に固定する
    • <!--StartFragment--> / <html> / GitHub-rendered <code class=...> 等が contract patch token として流入しない
    • patch-plan schema validation 後でも final Issue body を mutation 前に再validateする
    • malformed generated body の場合は GitHub write を0件のまま停止する
    • Issue body mutation後に初めて corruption を検出する設計にしない

    ただし過剰な sanitizer や巨大 HTML parser は導入しない。

    可能なら「malformed anchor context を mutation 前に reject / canonicalizeする小さな deterministic boundary」を優先する。

    Phase 5 — GitHub mutation の扱い

    この作業では contract_update.run.with_human_context を Issue #2290 の本文更新には再利用しないこと。

    原因未確定の mutation path だからである。

    repository の既存 edit-issue / transactional body-file update route を調査し、既存の安全な canonical route があればそれを使用する。

    body 更新前に現在の #2290 body を保存し SHA-256 を記録する。

    更新は complete body の body-file 方式で行い、shell quoting で本文を組み立てない。

    更新後に GitHub から body を再取得し、

    • expected section が存在する
    • literal <html>, <!--StartFragment-->, </code></p> 等の異常 fragment がない
    • Allowed Paths が意図した集合と一致する
    • AC と Verification Commands の対応が一致する
    • body SHA-256 を取得できる

    ことを確認する。

    異常があれば直前 snapshot へ復元して停止する。

    Phase 6 — 破損バグを別 Issue 化する

    SubAgent B の調査で再現可能な repository bug と確認できたら、既存 Issue を検索する。

    既存 Issue がなければ、今回の corruption bug 専用 Issue を1件起票してよい。

    #2290 と同じ Issue/PR に実装修正を混ぜない。

    新 Issue には、

    • raw malformed anchor fixture
    • clean anchor fixture
    • mutation前 rejection/canonicalization
    • writes == 0 の regression case
    • final body に HTML fragment が混入しない positive case
    • pre-write body validation
    • existing clean Markdown path の regression

    を AC/VC 候補として含める。

    原因が comment producer 側にもある場合は、consumer hardening と producer correction を同じ Issue に入れるべきかを scope で判断し、広すぎる場合は無理に統合しない。

    Phase 7 — #2290 を再レビューする

    本文更新後、mutation を伴わない fresh review を実行する。

    • deterministic issue contract review
    • contract readiness static review
    • semantic/adversarial review

    を current body に対して実行する。

    contract_update.run.with_human_context は使用しない。

    OWNER REQUEST_CHANGES の P0 3件がすべて解消していることを明示的に確認する。

    #1712 が現在も OPEN の場合は hard block せず、実装時 conflict/rebase note として残す。

    Stop / escalation

    以下の場合のみ停止して報告する。

    単なる Allowed Paths / AC / VC の入替えは今回 OWNER が明示承認済みなので停止理由にしない。

    最終報告

    最後に必ず以下を報告する。

    作業途中で SubAgent の完了を待たずに mutation へ進まないこと。

    このプロンプトなら、今回不足していた 「OWNER が scope reframe を承認した」という human context を先に固定しつつ、破損事故を理由に #2290 全体を無期限ブロックすることも避けられます。特に contract_update のバグ修正完了を #2290 実装の hard dependency にする必要はなく、壊れた mutation route だけ迂回して refinement を完了させるのが最も実用的です。

  5. squne121 commented on Aug 24, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了

    • PR: feat: extension surface risk-trigger policy を review-issue / issue-contract-review の deterministic gate に配線する #2335 (Draft)
    • Worktree: .claude/worktrees/issue-2290-claude-extension-surface-risk-trigger-po
    • Branch: worktree-issue-2290-claude-extension-surface-risk-trigger-po
    • head sha: ddd76c65be9cd0517e246cb389ba07531ec60770
    • Verification: AC1〜AC8 全て PASS(Issue 本文の Verification Commands をそのまま実行)
      • review-issue tests: 264 passed
      • issue-contract-review tests: 539 passed
      • scripts/agent-guards/tests/test_extension_surface_policy_matcher.py: 7 passed
      • ruff lint: all checks passed
    • Runtime Verification Applicability: not_applicable(Issue 本文どおり、実行環境の動作検証は不要)
    • 後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup
  6. self-assigned this
    on Aug 24, 2026
  7. squne121 commented on Aug 24, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: draft_pr_ready

    ループ経緯

    1. 実装(implementation-worker): shared evaluator scripts/agent-guards/extension_surface_policy_matcher.py を新規追加し、check_issue_contract.py / contract_readiness_check.py へ配線。全 AC 用テストを追加。
    2. 検証中、CI python-test-core が既存の無関係なテスト(test_baseline_vc_preflight_timeout_classification.py)の fixture で新規配線した EXTSURF001 check により pre-existing な不整合を検出し fail。fixture の Runtime Verification Applicability を not_applicable → immediate へ修正して解消。
    3. この修正が元の Allowed Paths 外だったため、Scope Delta として Allowed Paths を拡張(.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_timeout_classification.py を追加)。
    4. PR レビュー(pr-reviewer, head 1c2af68): APPROVE。
    5. mergeStateStatus が BEHIND だったため update_branch(main merge)を実行、head が 923151e に変化。
    6. 検証・PR レビューを新 head で再実行し、両方とも PASS / APPROVE。

    人間による最終マージ待ちです(本ループはマージ操作を実行しません)。

  8. squne121 commented on Aug 25, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: draft_pr_ready(OWNER REQUEST_CHANGES 対応完了)

    OWNER REQUEST_CHANGES 対応(https://github.com/squne121/loop-protocol/pull/2335#issuecomment-5409604950)

    人間による最終マージ待ちです(本ループはマージ操作を実行しません)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent/implementerenhancementphase/implementation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions