Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "PR body producer/validator と pr-review-judge が同じ evidence section / safety-sensitive contract を消費し、validator PASS 後の reviewer false-pass / late REQUEST_CHANGES を防ぐ"
change_kind: workflow
dedupe_key: "pr-body:open-pr-pr-review-judge-evidence-safety-contract-parity:v1"Parent Issue
none(PR #2806 の OWNER adversarial review で確認された独立 follow-up)。
Parent Goal Ref
- Goal: N/A(parent Issue なし。本 Issue は PR fix: summarize_agent_transcript.py の GitHub token redaction を github_pat_ 対応にする #2806 の OWNER adversarial review comment
5856207106で確認された独立 follow-up であり、単独スコープの goal は上記 Machine-Readable Contract のgoal_refを正本とする) - Desired Destination: N/A(parent Issue が存在しないため、本 Issue のスコープが正本。上位の Destination 制約は無い)
Source / Incident
PR #2806 の current-head review:
#2806 (comment)
PR #2808 自身に対する OWNER 敵対的レビュー(本 Issue の contract readiness / #144 との ownership 衝突 / AC4 の検証可能性 / root validator wrapper consumer 漏れ / AC1 authority topology 曖昧性 / AC5 negative control 弱さを指摘):
#2808 (comment)
PR #2806 は current .claude/skills/open-pr/scripts/validate_pr_body.py の LP052 と .github/pull_request_template.md が要求する
Summary / Checks / Schema Change Applicability / Schema Consumer Inventory / Safety Claim Matrix / Notes
を満たして validator を通過できる一方、current pr-review-judge / docs/dev/workflow.md が要求する
## 受け入れ条件の達成状況 / ## 検証コマンド結果 / ## Allowed Paths 遵守
を欠落したまま materialize された。
同じ review で、credential redaction を直接扱う PR なのに open-pr 側の path-based safety 判定では Safety Claim Matrix: N/A を許容し、pr-review-judge 側の safety-boundary wording / linked Issue based 判定では safety-sensitive になる producer/consumer drift も確認された。
これは #2806 固有の prose miss ではなく、authoring/validator と reviewer の semantic contract split-brain である。
Current Validated Scope
- current
pr-review-judge/references/ac-evidence-checks.mdは以下を Required PR セクションとして要求している:## 受け入れ条件の達成状況## 検証コマンド結果## Allowed Paths 遵守
- current LP052 / PR template は上記3セクションを required inventory に含めていない。
- current
pr-review-judge/references/safety-claim-gate.mdは changed path だけでなく PR/diff/Issue wording 等も safety-sensitive 判定に使う。 - open-pr validator の safety applicability は reviewer より狭く、fix: summarize_agent_transcript.py の GitHub token redaction を github_pat_ 対応にする #2806 では
N/Afalse-pass が成立した。現在のvalidate_pr_body.py::_is_safety_sensitive()はchanged_pathsのみを入力とし、PR body / linked Issue body を見ない。 open_pr.pyはget_linked_issue_body()を持つが、update_pr.pyは linked Issue body を取得しない(create path と update path で入力面が異なる)。- root の
scripts/pr_body_validator.pyは.claude/skills/open-pr/scripts/validate_pr_body.py::validate_pr_body()を直接 import する thin wrapper として現存し、scripts/tests/test_pr_body_validator.pyが既存する。canonical validator の consumer として明示する。 - 実装: PR本文 canonical heading の non-prose policy を整合させる #1641 は LP052 exact English heading grammar 自体の変更を Out of Scope としており本件を所有しない。
- 実装: Safety Claim Matrix を PR テンプレートの5列形式に統一する authoring guidance を整備する #610 は Safety Claim Matrix 5列 authoring guidance で validator/gate logic を Out of Scope としており本件を所有しない。
- 調査: secret-pattern migration の Issue authoring/refinement で consumer semantics 混同と false-pass VC を検査する regression/gate を設計する #2769 は secret-pattern Issue authoring/refinement の consumer semantics / false-pass VC を扱い、PR body producer/reviewer parity は所有しない。
- open の 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 は「changed files / PR diff / linked Issue body を入力に safety-sensitive を判定する deterministic gate」として新規
SAFETY_CLAIMS_V1schema と独立check_safety_claims.pygate を計画している。本 Issue はこの重い schema/gate 自体を所有しない(詳細は Out of Scope 参照)。本 Issue が所有するのは、既存 validator と既存 reviewer が最低限共有すべき deterministic minimum safety-applicability floor だけである。 - 実装: PR body hygiene 更新は update_pr.py wrapper 経由に限定する #964 は
update_pr.pyを canonical PR-body mutation route にする open work であり、本 Issue の update-path 入力パリティと関係する(Related 参照)。 - 実装: validate_pr_body.py を実装し GitHub PR body を open/update 前に機械検証する — #244-C #330/実装: PR body contract validator を追加する #469/実装: 安全境界を扱う PR には Safety Claim Matrix を本文必須セクション化し pr-review-judge で過大主張を検出する #137/実装: open-pr skill が safety-sensitive ファイル変更検出時に Safety Claim Matrix テンプレートを PR 本文に自動挿入する #253 は関連する過去実装だが closed で、current split-brain の回帰防止は未所有。
Remaining Parent Gaps
なし(parent Issue が存在しないため、本 Issue が引き継ぐ未解決 parent gap は無い)。
Outcome
PR body の authoring/template/validator と pr-review-judge が、required evidence sections と safety-sensitive applicability について単一の canonical contract(既存 authority の共有、または既存定義の直接再利用)を消費し、次を満たす状態にする。
- reviewer が必須とする evidence section を欠く PR body は open/update 前の deterministic validation で false-pass しない。
- safety-boundary wording / linked Issue semantics により reviewer が safety-sensitive と判断する代表ケースを、authoring/validator が
Safety Claim Matrix: N/Aとして通さない。 - 新しい approval layer、永続 schema、daemon、汎用 heavyweight semantic parser を増やさない。
Runtime Verification Applicability
- decision: not_applicable
- reason: 本 Issue の変更対象(PR body validator / PR template / pr-review-judge reference の deterministic parity)は fixture ベースの pytest と静的
rggrep で完結し、実 runtime(サーバ起動・実エージェント実行等)を必要としない。
In Scope
- LP052 / PR template / PR body generator・hygiene surface と
pr-review-judgeRequired PR section inventory の parity を取る。 - required evidence section inventory の重複定義を最小化し、producer/consumer が同じ canonical list を参照できる構造にする。canonical な required-section inventory は既存
.claude/skills/open-pr/scripts/validate_pr_body.py::REQUIRED_SECTIONSに置き、これを唯一の deterministic definition として拡張する(受け入れ条件の達成状況 / 検証コマンド結果 / Allowed Paths 遵守を追加)。.github/pull_request_template.mdとpr-review-judge/references/ac-evidence-checks.mdはこの canonical list の materialized projection(人間が読む静的コピー)とし、Python module の runtime import は要求しない。projection と canonical list の parity は focused deterministic pytest で検査する。 ## 受け入れ条件の達成状況は各 AC を[x]/[ ] + 根拠で表現できる authoring surface にする。## 検証コマンド結果と## Allowed Paths 遵守を validator/template/generator の通常 output に含める。- open-pr と pr-review-judge の safety-sensitive applicability を、deterministic minimum floor として揃える。入力は
changed_paths+ PR body + (利用可能な場合の)linked Issue body の3つに限定する。この floor が sensitive と判定した場合、authoring(validator)と reviewer は必ず Safety Claim Matrix を要求する。reviewer はこの floor の外側にある追加の semantic concern(safety-boundary wording の細かな解釈等)を引き続き検出してよく、本 Issue はその追加判断を機械化・複製しない。 open_pr.pyの create path(既存get_linked_issue_body())とupdate_pr.pyの update path の両方に、この deterministic minimum floor の入力(changed_paths + PR body + linked Issue body)を揃える。create path だけを直して update path を古い挙動のまま残さない。- root wrapper
scripts/pr_body_validator.py(validate_pr_body()を直接 import する thin wrapper)を consumer inventory に明記する。canonical validator の関数シグネチャや safety 入力面を変更する場合は、この wrapper とscripts/tests/test_pr_body_validator.pyが新 contract と齟齬しないことを検証する(wrapper 自体のコード変更が不要な場合は検証のみで良く、無変更のコード変更は行わない)。 - fix: summarize_agent_transcript.py の GitHub token redaction を github_pat_ 対応にする #2806 の credential-redaction scenario を positive regression fixture として固定する(
github_pat_/ personal access token / secret-like token / redaction 等の強い signal を使う)。 - fix: summarize_agent_transcript.py の GitHub token redaction を github_pat_ 対応にする #2806 相当の旧 body(旧 LP052 は PASS するが reviewer-required 3 section を欠く)を negative regression として固定する。
- ordinary non-safety PR を不要に safety-sensitive 扱いしない negative control を保持する。この negative control には、
token等の naive substring classifier が誤検知しやすい near-miss ケース(parser のtoken、UI のdesign token等、credential とは無関係な語)を含め、それでもSafety Claim Matrix: N/Aが許可されることを固定する。
Out of Scope
- fix: summarize_agent_transcript.py の GitHub token redaction を github_pat_ 対応にする #2806 / 実装: summarize_agent_transcript.py の GitHub token redaction パターンを fine-grained PAT (github_pat_) に対応させる #2736 の feature implementation 自体の修正。
- GitHub token regex / secret scanner / redactor 実装の変更。
- 新しい CI required check / approval service / schema registry / daemon の導入。
- free-form NLP を用いた汎用 safety classifier の新設。
- 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 が計画する新規
SAFETY_CLAIMS_V1schema、独立check_safety_claims.pygate、新 service/daemon/approval layer の実装。本 Issue はこれらに依存しない deterministic minimum floor のみを扱い、実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 の重い gate 構想を複製しない。 - 実装: Safety Claim Matrix を PR テンプレートの5列形式に統一する authoring guidance を整備する #610 の Safety Claim Matrix 5列 guidance そのものの再実装。
- 調査: secret-pattern migration の Issue authoring/refinement で consumer semantics 混同と false-pass VC を検査する regression/gate を設計する #2769 の Issue authoring/refinement regression gate の前倒し。
- LP052 の canonical heading language policy(実装: PR本文 canonical heading の non-prose policy を整合させる #1641)の変更。
- pr-review-judge の semantic judgment 全体を deterministic classifier に置き換えること。reviewer が floor 以外に拾う追加の semantic concern は維持する。
Acceptance Criteria
- AC1: PR authoring/template/validator と
pr-review-judgeが required evidence section inventory を同一の canonical source(.claude/skills/open-pr/scripts/validate_pr_body.py::REQUIRED_SECTIONS)から consume または直接 projection し、受け入れ条件の達成状況 / 検証コマンド結果 / Allowed Paths 遵守の requiredness が split-brain しない。PR template と pr-review-judge reference は canonical list の materialized projection であり、parity は focused pytest で検査する(Python module の runtime import は要求しない)。 - AC2: fix: summarize_agent_transcript.py の GitHub token redaction を github_pat_ 対応にする #2806 相当の旧 PR body fixture(旧 LP052 required headings は全て存在するが上記3 section を欠く)は deterministic validator で fail する regression test がある。
- AC3: 上記3 section と実根拠を追加した body は validator を pass し、existing schema/safety/related-issue checks も回帰しない。
- AC4: safety-sensitive applicability の deterministic minimum floor(入力: changed_paths + PR body + 利用可能な場合の linked Issue body)が、credential redaction / secret-like token を扱う代表 fixture(fix: summarize_agent_transcript.py の GitHub token redaction を github_pat_ 対応にする #2806 相当)で sensitive と判定し、authoring/validator が
Safety Claim Matrix: N/Aを受理する false-pass が再発しない。この floor はopen_pr.py(create path)とupdate_pr.py(update path)の両方で同一に適用される。 - AC5: ordinary non-safety PR fixture は Safety Claim Matrix の不要な semantic burden を追加されず、既存 workflow を不必要に block しない。この fixture には parser の
tokenや UI のdesign tokenなど credential と無関係な near-miss 語を含む本文が含まれ、それでもN/Aが許可されることを固定する。 - AC6: 新規 approval layer / permanent daemon / generic NLP classifier / independent duplicate validator / 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 が計画する
SAFETY_CLAIMS_V1schema・check_safety_claims.pygate を追加せず、既存 open-pr / pr-review-judge authority の共有で完結する。 - AC7:
uv run pytest .claude/skills/open-pr/scripts/tests/test_validate_pr_body.py -qと関連する current pr-review-judge regression suite が PASS する。 - AC8: root wrapper
scripts/pr_body_validator.pyが canonical validator の新 safety-applicability 入力面と齟齬せず、uv run pytest scripts/tests/test_pr_body_validator.py -qが PASS する。 - AC9: canonical required-section inventory(
validate_pr_body.py::REQUIRED_SECTIONS)と.github/pull_request_template.md/pr-review-judge/references/ac-evidence-checks.mdの projection が parity を保つことを検査する focused test が存在し PASS する。
Verification Commands
実装開始時に current test layout を fresh 確認し exact node-id を確定する。最低限:
# AC1
# baseline-expect: pass
$ rg -n "受け入れ条件の達成状況|検証コマンド結果|Allowed Paths 遵守" .github/pull_request_template.md .claude/skills/open-pr/scripts/validate_pr_body.py .claude/skills/pr-review-judge/references/ac-evidence-checks.md
# AC2
$ uv run pytest .claude/skills/open-pr/scripts/tests/test_validate_pr_body.py -q
# AC3
$ uv run pytest .claude/skills/open-pr/scripts/tests/test_validate_pr_body.py -q
# AC4
$ uv run pytest .claude/skills/open-pr/scripts/tests/test_validate_pr_body.py -q
# AC5
$ uv run pytest .claude/skills/open-pr/scripts/tests/test_validate_pr_body.py -q
# AC6
# baseline-expect: pass
$ test ! -f .claude/skills/pr-review-judge/scripts/check_safety_claims.py
# AC7
$ uv run pytest .claude/skills/open-pr/scripts/tests/test_validate_pr_body.py -q
# AC8
$ uv run pytest scripts/tests/test_pr_body_validator.py -q
# AC9
$ uv run pytest .claude/skills/open-pr/scripts/tests/test_validate_pr_body.py -qAllowed Paths
.claude/skills/open-pr/scripts/validate_pr_body.py.claude/skills/open-pr/scripts/open_pr.py.claude/skills/open-pr/scripts/update_pr.py.claude/skills/open-pr/scripts/tests/test_validate_pr_body.py.claude/skills/pr-review-judge/references/ac-evidence-checks.md.claude/skills/pr-review-judge/references/safety-claim-gate.md.github/pull_request_template.mddocs/dev/workflow.md(canonical cross-reference の整合に必要な場合のみ)scripts/pr_body_validator.pyscripts/tests/test_pr_body_validator.py.claude/skills/impl-review-loop/tests/test_handoff_pr_hygiene_regression.py.claude/skills/open-pr/scripts/generate_pr_body.py.claude/skills/open-pr/scripts/tests/fixtures/pr_body/not_schema_change_with_na_inventory.md.claude/skills/open-pr/scripts/tests/fixtures/pr_body/valid_not_schema_change.md.claude/skills/open-pr/templates/pr_body.ja.md.claude/skills/open-pr/tests/test_pr_body_hygiene.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合。
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合。特に required evidence section inventory の canonical location、safety floor の入力面の変更が必要になった場合。
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)。
- 後続 Phase / 別スコープへの波及が判明した場合。
- nested SubAgent delegation が必要になった場合。
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合。
- current repository に本件を既に所有する open Issue / canonical implementation が見つかった場合は重複実装せず reuse/close recommendation に切り替える。
- required-section authority を統一するために新規の独立 schema/gate/service が必要になる場合は scope を拡張せず、既存 authority を再利用するより小さい設計を再検討する。
- safety applicability parity に汎用 NLP classifier や network dependency が必要になる場合は停止し、fix: summarize_agent_transcript.py の GitHub token redaction を github_pat_ 対応にする #2806 の concrete failure class を防ぐ bounded design に戻す。
- destructive operation、secret/credential の取得・変更・公開、permission bypass が必要な場合は停止する。
Required Design References
- docs/dev/agent-skill-boundaries.md
- .claude/skills/open-pr/scripts/validate_pr_body.py
- .claude/skills/pr-review-judge/references/ac-evidence-checks.md
- docs/dev/workflow.md
Required Skills
なし
Related
- Source PR: fix: summarize_agent_transcript.py の GitHub token redaction を github_pat_ 対応にする #2806
- Source Issue: 実装: summarize_agent_transcript.py の GitHub token redaction パターンを fine-grained PAT (github_pat_) に対応させる #2736
- Related but overlapping (narrowed, not duplicate): 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 — 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 の重い新
SAFETY_CLAIMS_V1schema / 独立check_safety_claims.pygate は本 Issue の対象外(Out of Scope)。本 Issue は 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 が前提とし得る deterministic minimum floor のみを所有する。 - Related but not duplicate: 実装: PR body hygiene 更新は update_pr.py wrapper 経由に限定する #964 —
update_pr.pyを canonical PR-body mutation route にする open work。本 Issue の update-path 入力パリティ(AC4)と関係する。 - Related but not duplicate: 実装: PR本文 canonical heading の non-prose policy を整合させる #1641
- Related but not duplicate: 実装: Safety Claim Matrix を PR テンプレートの5列形式に統一する authoring guidance を整備する #610
- Related but not duplicate: 調査: secret-pattern migration の Issue authoring/refinement で consumer semantics 混同と false-pass VC を検査する regression/gate を設計する #2769
- Historical validator implementation: 実装: validate_pr_body.py を実装し GitHub PR body を open/update 前に機械検証する — #244-C #330 / 実装: PR body contract validator を追加する #469
- Historical Safety Claim Gate: 実装: 安全境界を扱う PR には Safety Claim Matrix を本文必須セクション化し pr-review-judge で過大主張を検出する #137 / 実装: open-pr skill が safety-sensitive ファイル変更検出時に Safety Claim Matrix テンプレートを PR 本文に自動挿入する #253
Activity
squne121 commentedon Sep 27, 2026
敵対的レビュー結果
判定:
REQUEST_CHANGES。ただし、Issue #2808 が捉えている元の不具合は実在し、2026-09-27 時点の current
main(a3bbd85ca2b82129820371383769984401f160db)でも根本原因は残っています。PR #2806 の本文自体は修正されて merge 済みですが、open-prとpr-review-judgeの contract drift は未解消です。確認した範囲では #2808 にコメントはまだなく、
Closes #2808/Refs #2808の実装 PR もありません。Findings
P1 / Blocker — 再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 自身が現在の implementation Issue contract を満たしておらず、実装前 preflight で止まる状態です。
Evidence: current
.github/ISSUE_TEMPLATE/implementation.ymlではParent Goal Ref、Remaining Parent Gaps、Runtime Verification Applicability、Required Skillsが required です。review-issue/scripts/check_issue_contract.pyは template のvalidations.required: trueを動的に読み取って C1 を判定しますが、再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 にはこの4セクションがありません。さらにVerification Commandsは current C4 が要求する fenced bash 内の$ <command>形式になっておらず、C5 が要求する# AC1...# AC7の対応もありません。したがって現状では C1/C4/C5/C9 系で implementation-ready になりません。Impact: 本来レビューしたい contract drift の実装に入る前に
issue-refinement-loop/issue-contract-reviewが本文修復へ戻ります。最小修正: 欠けている4セクションを追加し、VC を canonical
$ command+# ACn形式へ書き換える。Runtime Verification Applicabilityは fixture-based pytest で完結するためnot_applicableが自然です。これは新しい仕組みではなく、既存 workflow への適合だけです。P1 / Blocker — safety applicability の ownership が open Issue 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 と衝突しています。現在の dedupe 記述では不十分です。
Evidence: 再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 は 実装: PR本文 canonical heading の non-prose policy を整合させる #1641/実装: Safety Claim Matrix を PR テンプレートの5列形式に統一する authoring guidance を整備する #610/調査: secret-pattern migration の Issue authoring/refinement で consumer semantics 混同と false-pass VC を検査する regression/gate を設計する #2769 を related-but-not-duplicate と整理していますが、open の 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 はまさに「changed files / PR diff / linked Issue body を入力に safety-sensitive を判定する deterministic gate」を In Scope にしています。これは 再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 AC4 の「credential redaction / secret-like linked Issue/PR wording で authoring 側の N/A false-pass を防ぐ」と直接重なります。実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 は
check_safety_claims.pyとSAFETY_CLAIMS_V1の追加まで計画しており、一方 再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 AC6 は independent duplicate validator / new schema を禁止しています。両方をそのまま実装すると contract が衝突します。Impact: safety classifier が再び二重化するか、実装途中で Stop Condition の「既存 owner 発見」に当たります。
最小修正: 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 を Related/Dedupe に明示追加し、ownership を先に確定するべきです。個人趣味開発・minimal harness 方針なら、再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 が 既存 validator と reviewer が共有する最小 applicability baseline だけを所有し、実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 の重い新 schema/gate 部分は superseded / narrow / not-planned のいずれかとして整理するのが過剰設計を避けやすいです。実装: Safety Claim Matrix を PR テンプレートの5列形式に統一する authoring guidance を整備する #610 自身も 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 を related validation context として認識しています。
P1 / Blocker — AC4 の「safety contract parity」が、現状では検証可能な契約になっていません。
Evidence: current
validate_pr_body.py::_is_safety_sensitive()はchanged_pathsだけを見ます。一方pr-review-judge/references/safety-claim-gate.mdは changed path に加えて PR/diff/Issue wording も判定材料にします。しかも reviewer 側の prose は「safety boundary words」など意味的条件を含み、完全な lexical grammar は定義されていません。さらに publication path でも入力面が違います。open_pr.pyは既にget_linked_issue_body()を持つ一方、update_pr.pyは linked Issue body を取得しません。つまり「同じ判定」を要求するだけでは実装者が ad-hoc keyword list を増やすか、create path だけ直して update path に false-pass を残す可能性があります。Impact: fix: summarize_agent_transcript.py の GitHub token redaction を github_pat_ 対応にする #2806 の再発テストだけ green でも、producer/consumer divergence 自体は残せます。
最小修正: 「reviewer と deterministic validator の全意味論を一致」ではなく、共有する deterministic minimum floor を定義する方が適切です。例えば
changed_paths + PR body + 必要なら linked Issue bodyを入力する小さな純粋 predicate とし、これが sensitive なら authoring も reviewer も必ず Safety Claim Matrix を要求する。reviewer はそれ以外の semantic concern を追加で拾ってよい、と明文化します。これなら reviewer の能力を弱めず、authoring 側の false-pass だけ閉じられます。P1 — canonical validator の既存 consumer
scripts/pr_body_validator.pyが 再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 の scope / verification から抜けています。Evidence: Issue 実装: PR body contract validator を追加する #469 は
.claude/skills/open-pr/scripts/validate_pr_body.pyを source of truth とし、root のscripts/pr_body_validator.pyを thin wrapper consumer として導入しました。current main にも残っており、scripts/tests/test_pr_body_validator.pyが存在します。しかし 再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 AC7 の明示的な pytest は.claude/skills/open-pr/scripts/tests/test_validate_pr_body.pyだけです。新しい required evidence headings や safety-context parameter を canonical validator に追加すると、この root wrapper が旧 contract のまま残る可能性があります。Impact: 「単一 canonical contract」を実現したつもりで、公開済み deterministic entrypoint がもう一つ古い判定を提供する状態になります。
最小修正:
scripts/pr_body_validator.pyを consumer inventory に明記し、少なくともscripts/tests/test_pr_body_validator.pyを AC7/VC に追加する。新 input が必要なら wrapper を互換的に拡張するため、その場合だけ Allowed Paths に当該2パスを明示追加するべきです。無変更で済むならコード変更は不要です。P2 — AC1 の「template / validator / reviewer が同じ canonical source を consume」は authority topology が曖昧です。
Evidence: GitHub の PR template は、PR 作成時に Markdown 内容を body へ自動挿入する仕組みです。required validation を持つ Issue Forms は PR では利用できません。したがって
.github/pull_request_template.md自体が Python module を runtime import する、といった literal な単一 consumer 化はできません。:chatgpt-content-reference{index="0"}Impact: 実装者によって「3ファイルに同じ文字列を書いて終わり」「template parser を新設」「新 YAML schema を作る」など、AC1 の解釈が分岐します。前者は再 drift、後者は 再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 AC6 と minimal-harness 方針に反します。
最小修正: authority topology を AC に一文追加するべきです。例えば「canonical required-section inventory は既存 open-pr 配下の単一 deterministic definition に置く。validator は直接 consume。PR template と reviewer reference は materialized projection とし、pytest で canonical inventory との parity を検査する」。Claude/Agent Skills は reference files と executable scripts を組み合わせられ、決定論が必要な処理には code を使う設計が公式にも想定されています。:chatgpt-content-reference{index="1"} 新 service・hook・approval layer は不要です。
P2 — AC5 の non-safety negative control が弱く、workflow を過剰に safety-sensitive 化する regression を防げません。
Evidence: 再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 は「通常の非 safety PR fixture は過剰 requirement を受けない」としていますが、fixture の境界条件を指定していません。単なる
src/foo.pyのような明白な negative fixture なら、token|auth|secretのような広すぎる keyword classifier を導入してもテストは PASS します。current reviewer の semantic surface を naive substring に落とし込むと false positive が増えます。Impact: PR authoring が不要な Safety Claim Matrix を要求されるようになり、今回重視している「security/harness が通常 workflow を邪魔しない」に反します。
最小修正: AC5 を near-miss negative にするべきです。例えば parser の「token」や UI の「design token」など、credential と無関係だが単純 keyword classifier では誤検知しやすい本文を含め、それでも
N/Aが許可されることを固定する。fix: summarize_agent_transcript.py の GitHub token redaction を github_pat_ 対応にする #2806 positive fixture はgithub_pat_/ personal access token / secret-like / redaction といった強い signals を使えば十分です。Source incident の妥当性
#2808 の起票根拠自体は正確です。PR #2806 の OWNER comment
5856207106で、実際に二つの P1 が観測されています。一つは LP052/template が英語6セクションしか要求せず、reviewer が要求する受け入れ条件の達成状況 / 検証コマンド結果 / Allowed Paths 遵守を欠いた本文を通したこと。もう一つは、Issue #2736 と PR #2806 が PAT・secret-like token・redaction を明示していたにもかかわらず、path-only_is_safety_sensitive()によりSafety Claim Matrix: N/Aが通ったことです。しかも PR #2806 の merge 後も current main では、
validate_pr_body.py::REQUIRED_SECTIONSと.github/pull_request_template.mdは旧6セクションのまま、pr-review-judge/references/ac-evidence-checks.mdは日本語3セクションを要求しています。したがって #2808 は stale follow-up ではありません。修正後の狙うべき contract
この Issue は拡大せず、二つの failure class に限定するのが妥当です。
Evidence 側は「canonical required evidence inventory → validator が fail-closed → template/reviewer の parity regression test」。Safety 側は「bounded deterministic sensitive baseline → authoring と reviewer が最低限同じ floor を共有 → reviewer の追加 semantic judgment は維持」です。
特に pr-review-judge の semantic judgment 全体を deterministic classifier に置き換えるべきではありません。current repository 自身も deterministic processing script に semantic findings を生成させない境界を持っています。#2808 は reviewer を機械化する Issue ではなく、reviewer が必ず要求する最低条件を authoring 時点でも落とさない Issue と定義した方が scope が安定します。
また #964 は重複ではありませんが、
update_pr.pyを canonical PR-body mutation route にする open work なので、#2808 の update-path regression と関係します。少なくとも Related に置いておく価値があります。推奨 disposition
Issue refinement を1回通してから実装に進めるべき状態です。 修正内容は、Issue contract の不足補完、VC の canonical 化、#144/#964/#469 consumer の ownership 明記、AC4 の「deterministic minimum floor」化、AC5 の near-miss negative 強化に限定すれば十分です。
新しい CI required check、GitHub hook、daemon、global schema registry、generic NLP classifier、別 validator は不要です。GitHub の PR template 自体には required-field enforcement がないため、既存
open-prvalidator と fixture parity test に寄せる現在の #2808 の基本方針は適切です。:chatgpt-content-reference{index="2"}squne121 commentedon Sep 27, 2026
GitHub の current state と対象コメントを確認しました。対象コメント
5856762395は repository ownersqune121によるauthor_association: OWNERなので、preflight.run.with_human_contextの anchor として扱う前提が成立します。currentmainはa3bbd85ca2b82129820371383769984401f160dbで、コメント記載どおり contract drift は残っています。推奨は、#2808 を refinement して実装可能な契約へ直す一方、#144 自体はこの run では close / not-planned / rewrite しない方針です。#144 が計画している
check_safety_claims.py/docs/dev/safety-claim-policy.mdは current main にはまだ存在せず、計画 ownership は競合しています。そのため #2808 は「既存 producer/reviewer が共有する deterministic minimum floor」に限定するのが最小です。またscripts/pr_body_validator.pyは現在も canonical validator の thin consumer なので consumer inventory と regression verification に含める必要があります。issue-refinement-loopは既定最大3 iteration・iteration ごとの承認不要で、canonical Step 2 自体はissue-reviewerSubAgent を起動しません。SubAgent は独立調査に使い、結果を親へ戻してから canonical routing を進める構成にしています。Claude Code公式仕様でも Skill と Subagent は別概念で、Subagent は隔離 context で作業し結果を親へ返す用途です。:chatgpt-content-reference{index="0"}そのまま既存の auto mode 対話セッションへ貼れる形です。
repo
squne121/loop-protocolで、次の OWNER comment を anchor として Issue #2808 のissue-refinement-loopを実行してください。Target Issue:
#2808
Trusted human-context anchor:
#2808 (comment)
目的は Issue #2808 の contract を current repository SSOT に適合させ、対象 OWNER adversarial review の findings を解消し、implementation-ready / refinement approved の terminal state まで進めることです。
既に auto mode で起動済みの対話的 Claude Code session を継続してください。新しい Claude Code session や別 launcher/profile を起動しないでください。loop iteration ごとの人間承認は不要です。Claude Code の permission mode は変更せず、
bypassPermissions/--dangerously-skip-permissions等も使わないでください。最初に fresh state を固定する
過去の会話や下記参考情報を current state と仮定せず、最初に必ず fresh に確認してください。
mainHEAD5856762395の本文・author・author_association.github/ISSUE_TEMPLATE/implementation.yml.claude/skills/review-issue/scripts/check_issue_contract.py.claude/skills/issue-refinement-loop/SKILL.mdSKILL.mdがMUST_READまたは progressive disclosure で要求する references.claude/skills/open-pr/scripts/validate_pr_body.py.claude/skills/open-pr/scripts/open_pr.py.claude/skills/open-pr/scripts/update_pr.pyscripts/pr_body_validator.pyscripts/tests/test_pr_body_validator.py.claude/skills/pr-review-judge/references/ac-evidence-checks.md.claude/skills/pr-review-judge/references/safety-claim-gate.md.github/pull_request_template.mddocs/dev/workflow.mdcurrent Skill / scripts / planner / deterministic checker を authority とし、この prompt 内の記述と current repository が食い違う場合は current repository を優先してください。
SubAgent の使用
SubAgent を実際に使用してください。ただし canonical
issue-refinement-looprouting を独自 orchestration で置き換えないでください。最初の read-only investigation として current
.claude/agents/codebase-investigator.mdの契約を読み、codebase-investigatorを使って最低限以下を調査してください。open_pr.pyとupdate_pr.pyで safety applicability の入力面に差があるかSubAgent は read-only / advisory とし、Issue mutation、final classification、scope ownership 決定を委譲しないでください。
SubAgent を dispatch しただけで完了扱いにしないでください。必ずその SubAgent が terminal completion し、最終結果を親 conversation が受け取るまで待ってください。その結果を確認した後に downstream step へ進んでください。
current
REFINEMENT_LOOP_PLAN_V1がinvestigation_policy.required == trueを返す場合は Skill の canonical Step 1 contract に従ってください。web_research_policy.required == trueの場合は currentweb-researcherSubAgent も使用し、Step 1 と Step 1b を並列化できる場合は並列化して構いませんが、両方の最終結果を回収してから Step 2 へ進むという current Skill contractを守ってください。canonical Step 2 が current Skill 上
issue-reviewerSubAgent を使わない設計なら、それを独自判断で復活させないでください。issue-refinement-loop の起動
対象 comment は、このユーザーが今回直接指定した human context です。
current Skill が示す canonical executor/profile を使い、root/default-branch control-plane から
preflight.run.with_human_contextを実行してください。概念上の入力は:
2808squne121/loop-protocolhttps://github.com/squne121/loop-protocol/issues/2808#issuecomment-5856762395コマンド文字列をこの prompt からコピーして固定せず、必ず current
.claude/skills/issue-refinement-loop/SKILL.mdとscripts/command_registry.pyの canonical command profile を読み取って実行してください。preflight.run.with_human_contextが trusted contract patch plan /contract_update_requiredを返した場合、current Skill の Step 0g に従い、必要なら同一 investigation evidence transport manifest を保持したままcontract_update.run.with_human_contextへ進めてください。read-only preflight と mutation phase を混同しないでください。今回の推奨 scope resolution
OWNER finding に対する bounded design の推奨は以下です。ただし deterministic planner/reviewer の current result が矛盾する場合はそちらを優先し、理由を evidence とともに扱ってください。
1. Issue contract readiness の修復
#2808 を current implementation Issue template に完全適合させてください。
特に current template/checker が required とする以下を欠落させないこと:
Parent Goal RefRemaining Parent GapsRuntime Verification ApplicabilityRequired SkillsRuntime Verification Applicabilityは、current scope が fixture/deterministic pytest だけで十分で実 runtime を必要としないことが fresh investigation でも成立するなら、decision: not_applicableと具体的 reason を設定してください。Verification Commandsは current checker が認識する canonical formへ修正してください。bash$ <command># AC2-AC4のような unsupported range 記法は使わない2. #144 との ownership 衝突は #2808 側を narrow して解く
この run では Issue #144 を close / not-planned / superseded mutation / rewrite しないでください。
#144 は Related / Dedupe / ownership analysis に明示し、#2808 の responsibility を次の bounded contract に限定する方向を優先してください。
#2808 owns:
既存 PR authoring / validator / reviewer が共通で消費できる deterministic minimum safety-applicability floor と required evidence-section parity。
#2808 does not own:
新しい
SAFETY_CLAIMS_V1schema、独立したcheck_safety_claims.pygate、新 service/daemon/approval layer、generic NLP safety classifier。shared floor が sensitive と判定した場合は authoring/validator/reviewer の全てで Safety Claim Matrix を必要とする。一方 reviewer は shared floor の外側にある追加の semantic concern を引き続き検出してよいものとしてください。
つまり「reviewer の全 semantic reasoning を validator に複製する」のではなく、「producer が reviewer の deterministic minimum floor より弱くならない」を contract にしてください。
#144 の重い machine-readable gate 構想を #2808 へ複製しないでください。
3. safety applicability の入力契約を具体化
current implementation を fresh に確認したうえで、AC を検証可能な bounded input contract にしてください。
候補は以下ですが current code を authority として最小化してください。
PR diff 全体や free-form semantic NLP が minimum floor に本当に必要かは fresh evidence で判断し、#2806 の failure class を閉じるために不要なら入れないでください。
create path だけ直して update path を残さないこと。
open_pr.py/update_pr.pyの両 publication path を consumer inventory として確認してください。positive regression は #2806 相当の credential redaction / secret-like token scenario を使ってください。
negative control は単純な
src/foo.pyではなく、tokenという語を含む parser token / UI design token など、naive substring classifier が誤検知しやすい near-miss fixture を含め、ordinary workflow を不必要に safety-sensitive 化しないことを contract にしてください。4. root validator wrapper を consumer inventory に入れる
current main に
scripts/pr_body_validator.pyが canonical open-pr validator の thin wrapper として存在する場合、それを明示的 consumer として扱ってください。必要に応じて:
scripts/pr_body_validator.pyscripts/tests/test_pr_body_validator.pyを Allowed Paths / VC に追加してください。
ただしコード変更が不要なら変更自体は行わず、consumer compatibility を verification で固定するだけにしてください。
Allowed Paths の拡張が current scope guard に触れる場合は、勝手に gate を bypass せず、今回取得した codebase-investigator の exact path evidence と trusted human-context lane を current Skill が定める形で使ってください。
5. required evidence sections の authority topology を明確化
「template / validator / reviewer が literally 同じ runtime module を importする」ことを要求しないでください。
新しい schema registry / parser / generator framework を増やさず、既存 authority を使った最小 topology を Issue contract に明記してください。
例えば current architecture が許すなら:
という構造を検討してください。
実際の canonical location は fresh repository investigation で決め、既存 authority を再利用してください。
loop continuation
needs_fix/request_changes/ deterministic repair / structural repair は通常停止理由にしないでください。current Skill の bounded loop policy に従い、iteration 上限までは人間承認なしで:
inspect → repair/refine → fresh review → repair/refine → fresh review
を継続してください。
各 mutation 後は stale evidence を再利用せず、Issue body の fresh readback と current HEAD を使ってください。
NEXT_ACTION/STATUS/ repair artifact / blocker は current deterministic output をそのまま routing authority とし、prose で再分類しないでください。再発防止 follow-up Issue
refinement 中に、#2808 の scope外で今後も再発しそうな 別個の構造的 defect を発見した場合は、まず open/closed Issue、dedupe key、related historical PR を検索してください。
既存 Issue が ownership を持つ場合は新規 Issue を作らず、その Issue を関連付けてください。
既存 owner がなく、具体的 failure class・再現条件・最小 AC/VC を定義できる場合、この prompt は 非破壊的な再発防止 follow-up Issue の新規作成を明示的に許可します。current repository-native follow-up materialization /
issue-creator契約を使って起票し、#2808 から Related として追跡できるようにしてください。ただし以下は新規 Issue として重複起票しないこと:
SubAgent に GitHub mutation を任せず、root control-plane が current canonical mutation lane で行ってください。
停止境界
以下以外では原則としてユーザー確認を要求しないでください。
human_judgment_requiredを返し、今回明示した「再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 を narrow し 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 は変更しない」という bounded resolution でも解消不能通常の contract defect、test/check failure、review finding、stale evidence、修正可能な environment/problem は可能な範囲で自動修復・再検証してください。
終了点
この依頼は Issue refinement のみです。
Issue #2808 が current canonical workflow 上
approvedになったら、currentissue-refinement-loopの termination publish contract に従って終了報告を Issue に投稿してください。approvedを implementation 開始許可と解釈しないでください。この run では:
impl-review-loopを起動しないrefinement approved の terminal state で停止してください。
最後にこの対話へ、簡潔に以下を報告してください。
調査だけ・提案だけで終了せず、current repository-native
issue-refinement-loopを実際に terminal state まで実行してください。なお、現状では私から別の再発防止 Issue を即時起票するほど独立した新 failure class は確認できませんでした。今回の主要再発問題は #2808 自身が所有し、隣接する safety gate 計画は #144、5列 authoring guidance は #610 が既に所有しています。そのため prompt では dedupe-first の条件付き起票にしています。
squne121 commentedon Sep 27, 2026
issue-refinement-loop 終了報告(refinement approved)
判定:
approved(iteration 3 / 全 review PASS、canonical_step2_route: step_2_5→semantic_review_applicable: falseにより Step 2.5 スキップ → deterministic approve が確定)対象
OWNER 敵対的レビュー(https://github.com/squne121/loop-protocol/issues/2808#issuecomment-5856762395、`author_association: OWNER`)で指摘された6件の P1/P2 finding を解消するため、本文全体を rewrite しました。
主な contract 変更
Parent Goal Ref/Remaining Parent Gaps/Runtime Verification Applicability(decision: not_applicable、理由: fixture ベース pytest と静的rgで完結)/Required Skills/Required Design Referencesを追加。SAFETY_CLAIMS_V1schema・独立check_safety_claims.pygate」を明示的に Out of Scope とした。再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 は既存 validator/reviewer が共有する deterministic minimum safety-applicability floor(入力: changed_paths + PR body + 利用可能な場合の linked Issue body)のみを所有するよう scope を narrow 化。実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 は close/not-planned/supersede していません。open_pr.py(create path)とupdate_pr.py(update path)の両方に同一 floor を適用することを AC 化。scripts/pr_body_validator.py/scripts/tests/test_pr_body_validator.pyを Allowed Paths・AC8・VC に追加。.claude/skills/open-pr/scripts/validate_pr_body.py::REQUIRED_SECTIONSに置き、PR template / pr-review-judge reference はその materialized projection とする旨を明記(AC1/AC9)。token/ UI のdesign token等、credential と無関係な near-miss fixture を明示的に AC5 へ追加。$ command形式へ全面書き換え(AC1〜AC9 と1対1対応)。baseline preflight で検出されたbroad_search_path/vc_no_tests_collected(-kfilter 除去)/unexpected_pass(# baseline-expect: passannotation 追加、2箇所)を iteration 2〜3 で解消。#144 との ownership resolution
Relatedに「Related but overlapping (narrowed, not duplicate): #144」を追加。#144 は open のまま維持し、close/not-planned/supersede は行っていません。#2808 の Out of Scope に「#144 が計画する新規SAFETY_CLAIMS_V1schema、独立check_safety_claims.pygate、新 service/daemon/approval layer の実装」を明記し、AC6 に対応する VC(# baseline-expect: pass/test ! -f .claude/skills/pr-review-judge/scripts/check_safety_claims.py)を追加しました。Iteration / Review verdict
human_judgment_required(missing_required_section+structural_repair_action: human_review_required)Required Design References追加・Stop Conditions 標準文言復元)-kfilter 除去、AC6 差し替え)step_4(needs-fix)broad_search_path1件 +vc_no_tests_collected4件 +unexpected_pass1件)# baseline-expect: pass追加step_4(needs-fix)unexpected_pass残1件: AC1)# baseline-expect: pass追加step_2_5blocking_issues: [])Step 2.5(semantic design review applicability)は
semantic_review_trigger.pyによりsemantic_review_applicable: false(checker_gap_count=0/heuristic_concern_count=0/severity_tagged_anchor_findings=[]/owner_decision_conflict=false/cross_contract_change全 false /user_requested=false)と判定され、スキップして deterministic approve が確定しました。Verification / Checker 結果(最終)
check_issue_contract.py(fresh readback):verdict: approve/status: ok/blocking_issues: []run_root_review_pipeline.py produce:status: ok/canonical_step2_route: step_2_5/compact_result.verdict: approve/compact_result.next_action: proceed/structured_blockers: []新規 recurrence Issue
作成していません(dedupe 判断)。今回発見した個別の構造的懸念は、いずれも既存 owner が確認できました:
update_pr.pyの linked-issue-body 未取得(create/update path 差異)→ 再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 自身が AC4 として所有(Related の 実装: PR body hygiene 更新は update_pr.py wrapper 経由に限定する #964 とも関連、実装: PR body hygiene 更新は update_pr.py wrapper 経由に限定する #964 は既存 open)。SAFETY_CLAIMS_V1schema /check_safety_claims.pygate → 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 が既存 owner(open)。以上より、再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 のスコープ外で owner 不在の新規構造的欠陥は確認されませんでした。
Final Termination
termination_cause: approved(refinement approved)。issue_kind: implementationですが、本 run のスコープは Issue refinement のみであり、issue-contract-reviewを実行していないためLOOP_HANDOFF_RESULT_V1marker は本コメントでは出力しません(contract_review.gate_resultの fresh 値が本 run では未確定のため、捏造せず省略します)。impl-review-loopの起動・implementation worker・実装 branch/worktree・実装 PR の作成は本 run では一切行っていません。approvedは実装開始の代替承認ではありません。 implementation を開始する場合は、別途issue-contract-reviewの fresh 実行を経てimpl-review-loop(またはユーザーの明示的な実装依頼)を通じて着手してください。🤖 Generated with Claude Code
squne121 commentedon Sep 27, 2026
確認した current state では、#2808 は refinement 済みなので、そのまま
impl-review-loopへ進めるのが推奨です。確認できた要点は次のとおりです。
5857074167はapproved。Issue body は AC1〜AC9、Allowed Paths、VC、実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 との ownership 境界まで修復済み。mainHEAD は8fac56af67e9f8da89092e880b5c9a1ab3c8d2f6。Closes #2808/Refs #2808の実装PRは現時点で見つかっていません。SAFETY_CLAIMS_V1/ 独立 gate を実装せず、既存 producer/reviewer の minimum floor に限定されています。issue-contract-reviewはまだ実装着手認可として実行されていません。現行impl-review-loopは root-owned synchronous transition 内で freshissue-contract-review→ live readback → Step 1 dispatch を行うのが正規経路です。impl-review-loopはimplementation-worker → test-runner → pr-reviewer → routingで進み、各 SubAgent の terminal result を回収してから次へ進む設計です。impl-review-loopStep 5 の正規契約に存在します。別の仕組みを足す必要はありません。以下を、現在 auto mode で動作中の対話的 Claude Code セッションへそのまま貼る形を推奨します。
repo
squne121/loop-protocolの Issue #2808 を、current repository の.claude/skills/impl-review-loopを正規 entrypoint として、実装・検証・PR review・必要な修正反復まで自律実行し、人間が最終マージ判断できる直前の canonical terminal state まで進めてください。Target Issue:
#2808
既に auto mode で起動している現在の対話的 Claude Code session をそのまま継続してください。新しい session / launcher / profile を起動しないでください。
このユーザー指示は、今回の #2808 implementation run について、通常の非破壊的な実装、worktree/branch 作成、commit、push、PR 作成・更新、CI確認、review/fix iteration、および独立した再発防止 follow-up Issue の canonical な起票に対する明示的な承認です。したがって
open-prの publish gate では、この指示をpublish: yesの人間承認として扱い、PR publication のためだけに追加確認を求めないでください。ただし permission mode 自体は変更せず、
bypassPermissions/--dangerously-skip-permissions等は使用しないでください。0. 最初に current state を fresh 取得する
過去 transcript、以前の SHA、以前の refinement report を current state と仮定しないでください。
最初に最低限以下を fresh に確認してください。
mainHEADCLAUDE.md.claude/skills/impl-review-loop/SKILL.mdsteps/**/ references.claude/agents/implementation-worker.md.claude/agents/test-runner.md.claude/agents/pr-reviewer.md.claude/skills/implement-issue/SKILL.md.claude/skills/pr-review-judge/SKILL.md.claude/skills/open-pr/SKILL.md.claude/skills/issue-contract-review/SKILL.mdこの prompt と current repository が矛盾する場合、current repository の canonical Skill / script / deterministic checker / live Issue contract を優先してください。
1.
impl-review-loopの root-owned synchronous entry contract を守るrefinement の
approvedcomment を、実装開始 authorization の代用にしないでください。current
impl-review-loopのRoot-Owned Synchronous Entry Transitionに従い、root/main thread が単一の継続した control flow の中で:issue-contract-reviewまで実行してください。
既存の古い contract snapshot や GitHub comment を authorization packet として再利用しないでください。
fresh
issue-contract-reviewの deterministic result が current contract defectを返した場合は、current workflow が許す自動修復可能な hygiene defect なら修復・再評価してください。本当に
human_judgment_required、irreconcilable scope conflict、authority外変更が必要な場合だけ停止してください。2. duplicate implementation / duplicate PR を作らない
current
preparation.mdの Evidence-Based Landing Disposition を正本として使ってください。implementation_already_landed→ worker / worktree / new PR を作らないexisting_pr_resume→ 既存 PR / branch / worktree を再利用already_satisfied→ canonical no-change terminal を返すordinary_dispatch_or_explicit_recovery→ 通常 Step 1reconciliation_required→ fresh evidence を reconciliation し、勝手に duplicate work を作らないfree-text の
Refs #2808検索だけで landing authority を推定しないでください。現時点の外部観測では #2808 を close する実装PRは確認できていませんが、実行時には必ず fresh state を再取得してください。
3. SubAgent を実際に使い、必ず terminal completion を待つ
root/main thread は control-plane に徹し、data-plane 作業は current Skill が指定する SubAgent に委譲してください。
通常経路:
Step 1 — Implementation
current
.claude/agents/implementation-worker.mdを読み、implementation-workerSubAgent を起動してください。Issue #2808 の live contract を正本として実装させてください。
SubAgent を dispatch した時点で Step 1 完了扱いにしないでください。
implementation-worker が terminal completion し、最終
IMPLEMENT_RESULTを親 conversation が実際に受け取るまで待ってください。terminal result を確認してからのみ Step 2 へ進んでください。
Step 2 — Verification
current
.claude/agents/test-runner.mdに Issue #2808 の current AC / Verification Commands / target PR/head を明示して委譲してください。test-runner についても dispatch だけで完了扱いにせず、terminal result を回収してください。
current
impl-review-loopの VC adjudication / current-head binding を使い、stale result を使い回さないでください。Step 4 — PR Review
current
.claude/agents/pr-reviewer.mdを使い、current.claude/skills/pr-review-judge/SKILL.mdの手順で current PR HEAD をレビューしてください。pr-reviewer の最終 result:
verdictreviewed_head_shablockers[]warnings[]を親 control-plane が受け取るまで待ってください。
SubAgent の self-report で mergeability を代用せず、control-plane が live GitHub mergeability を取得してください。
Step 5 — Routing
current
route_loop_verdict_v2()を authority とし、prose で独自に verdict を再分類しないでください。REQUEST_CHANGES→ blocker を exact fix_delta にして implementation-worker へ戻すupdate_branchroute → verification / review 再実行APPROVE単独では終了しないdependent な Step を並列実行しないでください。
独立した read-only 調査だけは current Skill が許す場合に並列化して構いませんが、必要な SubAgent 全ての terminal result を回収してから downstream routing してください。
4. #2808 の実装 scope を守る
live Issue body が最終 authorityですが、現在の refined contract の中心は以下です。
Evidence section parity
canonical required-section inventory は既存:
.claude/skills/open-pr/scripts/validate_pr_body.py::REQUIRED_SECTIONSを authority とし、少なくとも reviewer-required の:
受け入れ条件の達成状況検証コマンド結果Allowed Paths 遵守を producer-side validation でも落とさないこと。
PR template と pr-review-judge reference は materialized projection とし、新しい schema registry / daemon / separate validator framework を作らないでください。
focused deterministic test で projection parity を固定してください。
Safety applicability minimum floor
#2808 が所有するのは、既存 producer と reviewer が共有すべき bounded な deterministic minimum floor だけです。
current Issue contract の入力面:
を守り、create path と update path の両方で false-pass を閉じてください。
#2806 相当の credential redaction / secret-like strong signal は sensitive と判定させてください。
一方で:
tokendesign tokenのような credential と無関係な near-miss は不要に safety-sensitive 化しない regression test を維持してください。
generic NLP classifier、network classifier、過剰な keyword matcher は追加しないでください。
#144 との boundary
Issue #144 が計画している:
SAFETY_CLAIMS_V1check_safety_claims.pyは #2808 の Out of Scope です。
#144 を勝手に close / supersede / rewrite しないでください。
existing consumer
scripts/pr_body_validator.pyとscripts/tests/test_pr_body_validator.pyを既存 consumer として忘れずに compatibility / regression verification してください。5. Allowed Paths を厳守する
Issue #2808 の current
## Allowed Pathsを live fetch して正本として使用してください。Allowed Paths 外の変更が必要に見えた場合、まず設計を縮小して既存 authority の再利用で解決できないか確認してください。
foreign dirty work / 他 task の branch / 他 worktree は変更・削除しないでください。
Issue contract の scope / fixed contract 自体を変更しなければ実装不能な場合は Stop Condition として扱い、勝手に scope を拡張しないでください。
6. PR publication
今回のユーザー指示は #2808 の PR publication を明示的に承認しています。
current
open-prSkill がpublish: yesを要求する場合はpublish: yesを渡してください。PR 作成のための追加の人間確認は不要です。ただし:
open-prSkill / canonical wrapper を使うgh pr createで workflow を bypass しないしてください。
7. Review / fix loop を自律継続する
iteration ごとの人間承認は不要です。
current Skill の bounded
max_iterationsを使い:inspect
→ implement
→ verify
→ review
→ fix
→ re-verify
→ fresh-head re-review
を自律継続してください。
次は停止理由にしないでください。
REQUEST_CHANGES修正後は必ず fresh HEAD に対して verification と review をやり直してください。
8. 再発防止 follow-up Issue
current
impl-review-loopStep 5 の **「APPROVE 時の follow-up Issue 自動起票」**を正規手順として使ってください。独自の別 follow-up mechanism は作らないでください。実装・test・review 中に、#2808 の現在 scope では直すべきでないが再発性のある独立 failure class を発見した場合:
issue-creatorSubAgent /create-issuecanonical route で起票mandatory_follow_up相当なら current Skill の規定どおり APPROVE 確定前に materialize/reuse。optional_follow_upなら APPROVE 後に dedupe して起票してください。以下は新規再発防止 Issue として重複起票しないでください。
SAFETY_CLAIMS_V1/独立 safety gateなお、#2808 の current implementation scope を変更しなければ解決できない「scope split」は、単なる optional follow-up 起票とは区別し、Issue #2808 の Stop Conditions を尊重してください。
9. 外部調査
本件は repository-internal contract parity が中心なので、外部調査を目的化しないでください。
current
impl-review-loopが external research を不要と判断するなら、skip basis を記録して進めて構いません。ただし GitHub / Claude Code / upstream の current behavior が実装判断に直接必要になった場合のみ、current Skill の canonical external-research route で公式一次情報を調査してください。
10. 停止境界
以下の場合だけ停止・escalate してください。
mergeable == CONFLICTINGまたはmergeStateStatus == DIRTY) に対し canonical runbook でも解消不能HUMAN_REVIEW_REQUIREDterminal を返した場合SubAgent の単なる
human_review_required: true自己申告だけを独自の即時停止理由にしないでください。currentimpl-review-looprouting contract に従ってください。11. 終了点
実マージはしないでください。
auto-merge を有効化しないでください。
force push しないでください。
current
impl-review-loopが定義する canonical terminal、原則として:IMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_readyかつ current Skill が要求する merge-ready 条件を満たし、人間が最終マージ判断できる状態になったところで停止してください。
draft_pr_readyは repository workflow の terminal status であり、GitHub Draft flag と同一視せず、current Skill の定義をそのまま使用してください。最後にこの対話へ次を簡潔に報告してください。
issue-contract-review結果IMPL_REVIEW_LOOP_RESULT_V1調査や実装提案だけで止まらず、current repository-native
impl-review-loopの canonical terminal まで実際に実行してください。このケースでは、追加の issue-refinement-loop をもう一度回すより、fresh
issue-contract-reviewを内包した現行impl-review-loopへ直接入るのが適切です。再発防止Issueについても、現行 Step 5 に既に dedupe-first の自動起票経路があるため、それを使わせる構成にしています。squne121 commentedon Sep 27, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
squne121 commentedon Sep 27, 2026
implement-issue: 実装完了 (2026-09-27T21:20:37Z)
.claude/worktrees/issue-2808-evidence-safety-contract-parityworktree-issue-2808-evidence-safety-contract-paritysqune121 commentedon Sep 27, 2026
Scope Delta Approval
OWNER として、impl-review-loop 実装中に判明した Allowed Paths 不足(PR #2813 レビュー #2813 (comment) で
fail_closedと判定された6ファイル)について、以下の scope delta を承認します。承認範囲は Allowed Paths への6パス追加のみに限定し、Outcome / Acceptance Criteria / In Scope / Out of Scope / Verification Commands / safety floor 入力面 / #144・#964 との ownership boundary は変更しません。
追加理由: AC1(
validate_pr_body.py::REQUIRED_SECTIONSへの3 evidence section 追加)が、既存の generator/template(generate_pr_body.py/pr_body.ja.md)とその consumer test(test_pr_body_hygiene.py)、および impl-review-loop 側の regression fixture(test_handoff_pr_hygiene_regression.py)・open-pr の pre-existing PASS fixture 2件に不可避な ripple を生じさせることが、実装検証で実証されたため(revert するとtest_pr_body_hygiene.pyの既存4テストが regression する)。🤖 Generated with Claude Code
squne121 commentedon Sep 27, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
fix: safety-claim-gate.md の見出し日本語比率不足を修正する
実装: PR body authoring validator と pr-review-judge の evidence/safety c…