Skip to content

再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808

Closed

Description

@squne121

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

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

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 の共有、または既存定義の直接再利用)を消費し、次を満たす状態にする。

  1. reviewer が必須とする evidence section を欠く PR body は open/update 前の deterministic validation で false-pass しない。
  2. safety-boundary wording / linked Issue semantics により reviewer が safety-sensitive と判断する代表ケースを、authoring/validator が Safety Claim Matrix: N/A として通さない。
  3. 新しい 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 と静的 rg grep で完結し、実 runtime(サーバ起動・実エージェント実行等)を必要としない。

In Scope

  • LP052 / PR template / PR body generator・hygiene surface と pr-review-judge Required 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

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_V1 schema・check_safety_claims.py gate を追加せず、既存 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 -q

Allowed 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.md
  • docs/dev/workflow.md(canonical cross-reference の整合に必要な場合のみ)
  • scripts/pr_body_validator.py
  • scripts/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

Activity

  1. added
    phase/implementation
    agent/implementer
    follow-up
    on Sep 27, 2026
  2. squne121 commented on Sep 27, 2026

    @squne121
    OwnerAuthor

    敵対的レビュー結果

    判定: 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

    1. 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 への適合だけです。

    2. 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 として認識しています。

    3. 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 だけ閉じられます。

    4. 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パスを明示追加するべきです。無変更で済むならコード変更は不要です。

    5. 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 は不要です。

    6. 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-pr validator と fixture parity test に寄せる現在の #2808 の基本方針は適切です。:chatgpt-content-reference{index="2"}

  3. squne121 commented on Sep 27, 2026

    @squne121
    OwnerAuthor

    GitHub の current state と対象コメントを確認しました。対象コメント 5856762395 は repository owner squne121 による author_association: OWNER なので、preflight.run.with_human_context の anchor として扱う前提が成立します。current main は 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-reviewer SubAgent を起動しません。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 に確認してください。

    current Skill / scripts / planner / deterministic checker を authority とし、この prompt 内の記述と current repository が食い違う場合は current repository を優先してください。

    SubAgent の使用

    SubAgent を実際に使用してください。ただし canonical issue-refinement-loop routing を独自 orchestration で置き換えないでください。

    最初の read-only investigation として current .claude/agents/codebase-investigator.md の契約を読み、codebase-investigator を使って最低限以下を調査してください。

    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 の場合は current web-researcher SubAgent も使用し、Step 1 と Step 1b を並列化できる場合は並列化して構いませんが、両方の最終結果を回収してから Step 2 へ進むという current Skill contractを守ってください。

    canonical Step 2 が current Skill 上 issue-reviewer SubAgent を使わない設計なら、それを独自判断で復活させないでください。

    issue-refinement-loop の起動

    対象 comment は、このユーザーが今回直接指定した human context です。

    current Skill が示す canonical executor/profile を使い、root/default-branch control-plane から preflight.run.with_human_context を実行してください。

    概念上の入力は:

    • issue_number: 2808
    • repo: squne121/loop-protocol
    • anchor_comment_url:
      https://github.com/squne121/loop-protocol/issues/2808#issuecomment-5856762395
    • max_iterations: current Skill default。current main で既定が 3 なら 3。

    コマンド文字列をこの 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 Ref
    • Remaining Parent Gaps
    • Runtime Verification Applicability
    • Required Skills

    Runtime Verification Applicability は、current scope が fixture/deterministic pytest だけで十分で実 runtime を必要としないことが fresh investigation でも成立するなら、decision: not_applicable と具体的 reason を設定してください。

    Verification Commands は current checker が認識する canonical formへ修正してください。

    • fenced bash
    • 実行コマンドは $ <command>
    • AC coverage は current checker の grammar に従う
    • AC1...ACn が VC から追跡可能
    • # 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_V1 schema、独立した check_safety_claims.py gate、新 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 として最小化してください。

    • changed paths
    • PR body
    • linked Issue body(必要な場合)

    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.py
    • scripts/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 required-section inventory: 既存 deterministic authority に置く
    • validator: canonical definition を直接 consume
    • static PR template / reviewer reference: materialized projection
    • parity: focused deterministic test で検査

    という構造を検討してください。

    実際の 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 で行ってください。

    停止境界

    以下以外では原則としてユーザー確認を要求しないでください。

    通常の contract defect、test/check failure、review finding、stale evidence、修正可能な environment/problem は可能な範囲で自動修復・再検証してください。

    終了点

    この依頼は Issue refinement のみです。

    Issue #2808 が current canonical workflow 上 approved になったら、current issue-refinement-loop の termination publish contract に従って終了報告を Issue に投稿してください。

    approved を implementation 開始許可と解釈しないでください。

    この run では:

    • implementation worker を起動しない
    • impl-review-loop を起動しない
    • implementation branch/worktree を作らない
    • implementation PR を作らない

    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 の条件付き起票にしています。

  4. squne121 commented on Sep 27, 2026

    @squne121
    OwnerAuthor

    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 変更

    1. contract readiness の修復: Parent Goal Ref / Remaining Parent Gaps / Runtime Verification Applicability(decision: not_applicable、理由: fixture ベース pytest と静的 rg で完結)/ Required Skills / Required Design References を追加。
    2. 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 との ownership 衝突の解消: 実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 を Related に明示し、「実装: SAFETY_CLAIMS_V1 parser を追加して Safety Claim Matrix を機械的に検証する決定論的ゲートを導入する(#137 Phase 2) #144 が計画する新規 SAFETY_CLAIMS_V1 schema・独立 check_safety_claims.py gate」を明示的に 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 していません。
    3. AC4 の検証可能性向上: safety floor の入力面を明文化し、open_pr.py(create path)と update_pr.py(update path)の両方に同一 floor を適用することを AC 化。
    4. root validator wrapper の consumer inventory化: scripts/pr_body_validator.py / scripts/tests/test_pr_body_validator.py を Allowed Paths・AC8・VC に追加。
    5. AC1 authority topology の明確化: canonical required-section inventory を .claude/skills/open-pr/scripts/validate_pr_body.py::REQUIRED_SECTIONS に置き、PR template / pr-review-judge reference はその materialized projection とする旨を明記(AC1/AC9)。
    6. AC5 negative control の強化: parser の token / UI の design token 等、credential と無関係な near-miss fixture を明示的に AC5 へ追加。
    7. Verification Commands を canonical $ command 形式へ全面書き換え(AC1〜AC9 と1対1対応)。baseline preflight で検出された broad_search_path / vc_no_tests_collected(-k filter 除去)/ unexpected_pass(# baseline-expect: pass annotation 追加、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_V1 schema、独立 check_safety_claims.py gate、新 service/daemon/approval layer の実装」を明記し、AC6 に対応する VC(# baseline-expect: pass / test ! -f .claude/skills/pr-review-judge/scripts/check_safety_claims.py)を追加しました。

    Iteration / Review verdict

    iteration rewrite 内容 canonical_step2_route verdict
    0 (fresh preflight) — human_judgment_required(missing_required_section + structural_repair_action: human_review_required) blocked
    1 4必須セクション追加 + #144 ownership + AC1/4/5/6/8/9 + Allowed Paths 拡張(issue-editor が更に Required Design References 追加・Stop Conditions 標準文言復元) — (local checker: approve, ok)
    2 VC canonical化(AC1 rg narrow化、AC2/4/5/9 の -k filter 除去、AC6 差し替え) step_4(needs-fix) request_changes(broad_search_path 1件 + vc_no_tests_collected 4件 + unexpected_pass 1件)
    3 AC6 に # baseline-expect: pass 追加 step_4(needs-fix) request_changes(unexpected_pass 残1件: AC1)
    4 AC1 に # baseline-expect: pass 追加 step_2_5 approve(blocking_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 が確認できました:

    Final Termination

    termination_cause: approved(refinement approved)。issue_kind: implementation ですが、本 run のスコープは Issue refinement のみであり、issue-contract-review を実行していないため LOOP_HANDOFF_RESULT_V1 marker は本コメントでは出力しません(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

  5. squne121 commented on Sep 27, 2026

    @squne121
    OwnerAuthor

    確認した current state では、#2808 は refinement 済みなので、そのまま impl-review-loop へ進めるのが推奨です。

    確認できた要点は次のとおりです。

    以下を、現在 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 に確認してください。

    この prompt と current repository が矛盾する場合、current repository の canonical Skill / script / deterministic checker / live Issue contract を優先してください。

    1. impl-review-loop の root-owned synchronous entry contract を守る

    refinement の approved comment を、実装開始 authorization の代用にしないでください。

    current impl-review-loop の Root-Owned Synchronous Entry Transition に従い、root/main thread が単一の継続した control flow の中で:

    1. capability preflight
    2. live Issue fetch
    3. current-run の fresh issue-contract-review
    4. 直後の live Issue readback
    5. canonical routing decision
    6. 条件成立時のみ同じ invocation 内で Step 1 の implementation dispatch

    まで実行してください。

    既存の古い 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 1
    • reconciliation_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-worker SubAgent を起動してください。

    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:

    • verdict
    • reviewed_head_sha
    • blockers[]
    • 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 へ戻す
    • stale reviewed HEAD → current HEAD で再review
    • BEHIND → canonical update_branch route → verification / review 再実行
    • CI failure →原因を確認し、修正可能なら修正して再検証
    • APPROVE 単独では終了しない
    • current-head required CI、live mergeability、blockers 空を含む canonical terminal condition を満たして初めて終了

    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 の入力面:

    • changed paths
    • PR body
    • 利用可能な linked Issue body

    を守り、create path と update path の両方で false-pass を閉じてください。

    #2806 相当の credential redaction / secret-like strong signal は sensitive と判定させてください。

    一方で:

    • parser の token
    • UI の design token

    のような credential と無関係な near-miss は不要に safety-sensitive 化しない regression test を維持してください。

    generic NLP classifier、network classifier、過剰な keyword matcher は追加しないでください。

    #144 との boundary

    Issue #144 が計画している:

    • SAFETY_CLAIMS_V1
    • 独立 check_safety_claims.py
    • 新規 heavyweight gate / daemon / approval layer

    は #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-pr Skill が publish: yes を要求する場合は publish: yes を渡してください。PR 作成のための追加の人間確認は不要です。

    ただし:

    してください。

    7. Review / fix loop を自律継続する

    iteration ごとの人間承認は不要です。

    current Skill の bounded max_iterations を使い:

    inspect
    → implement
    → verify
    → review
    → fix
    → re-verify
    → fresh-head re-review

    を自律継続してください。

    次は停止理由にしないでください。

    • 通常の test failure
    • CI failure で原因が修正可能
    • REQUEST_CHANGES
    • stale reviewed head
    • BEHIND
    • PR body hygiene defect
    • deterministic validator failure
    • current scope 内で修正可能な regression

    修正後は必ず fresh HEAD に対して verification と review をやり直してください。

    8. 再発防止 follow-up Issue

    current impl-review-loop Step 5 の **「APPROVE 時の follow-up Issue 自動起票」**を正規手順として使ってください。独自の別 follow-up mechanism は作らないでください。

    実装・test・review 中に、#2808 の現在 scope では直すべきでないが再発性のある独立 failure class を発見した場合:

    1. failure class、再現条件、root cause、最小 AC/VC を具体化
    2. open / closed Issue と dedupe key を検索
    3. 既存 owner があれば再利用し、新規 Issue を重複作成しない
    4. closed completed / duplicate / not_planned を勝手に reopen しない
    5. owner 不在なら current issue-creator SubAgent / create-issue canonical route で起票
    6. issue-creator を dispatch しただけで完了扱いせず、terminal result と GitHub readback を確認
    7. 再発防止: PR body authoring validator と pr-review-judge の evidence/safety contract drift を解消する #2808 の終了報告に follow-up Issue 番号・dedupe判断を記録

    mandatory_follow_up 相当なら current Skill の規定どおり APPROVE 確定前に materialize/reuse。
    optional_follow_up なら APPROVE 後に dedupe して起票してください。

    以下は新規再発防止 Issue として重複起票しないでください。

    なお、#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 してください。

    • destructive operation が必要
    • secret / credential の取得・変更・公開が必要
    • force push / history rewrite が必要
    • permission bypass が必要
    • live Issue contract の fixed scope を変えないと実装不能
    • Allowed Paths 外の変更が不可避
    • irreconcilable ownership / dependency conflict
    • evidence integrity を維持不能
    • actual Git conflict (mergeable == CONFLICTING または mergeStateStatus == DIRTY) に対し canonical runbook でも解消不能
    • canonical max iteration 到達
    • current deterministic workflow が真に HUMAN_REVIEW_REQUIRED terminal を返した場合

    SubAgent の単なる human_review_required: true 自己申告だけを独自の即時停止理由にしないでください。current impl-review-loop routing 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 の定義をそのまま使用してください。

    最後にこの対話へ次を簡潔に報告してください。

    • 実行開始時と終了時の relevant main / PR HEAD
    • fresh issue-contract-review 結果
    • landing disposition
    • 使用した各 SubAgent
    • 各 SubAgent の terminal result を親 thread が回収したこと
    • 実装した内容
    • changed files と Allowed Paths 遵守
    • Verification Commands 結果
    • CI 結果
    • review iteration ごとの verdict / blocker / fix
    • 最終 PR URL
    • final live mergeability
    • IMPL_REVIEW_LOOP_RESULT_V1
    • follow-up Issue を作成/reuseした場合は番号・理由・dedupe結果
    • follow-up を作らなかった場合はその dedupe判断
    • 残 blocker
    • merge は未実行であること

    調査や実装提案だけで止まらず、current repository-native impl-review-loop の canonical terminal まで実際に実行してください。

    このケースでは、追加の issue-refinement-loop をもう一度回すより、fresh issue-contract-review を内包した現行 impl-review-loop へ直接入るのが適切です。再発防止Issueについても、現行 Step 5 に既に dedupe-first の自動起票経路があるため、それを使わせる構成にしています。

  6. squne121 commented on Sep 27, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  7. squne121 commented on Sep 27, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-09-27T21:20:37Z)

  8. squne121 commented on Sep 27, 2026

    @squne121
    OwnerAuthor

    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 する)。

    schema_version: ANCHOR_SCOPE_REFRAME_V1
    target:
      repo: squne121/loop-protocol
      issue_number: 2808
    decision: approve_scope_delta
    allowed_path_deltas:
      - .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
    rationale: "AC1 の REQUIRED_SECTIONS 拡張は generate_pr_body.py/pr_body.ja.md とその consumer test_pr_body_hygiene.py、および test_handoff_pr_hygiene_regression.py の regression fixture、2件の pre-existing PASS fixture に不可避な producer/consumer ripple を生じる。revert 検証で test_pr_body_hygiene.py の既存4テストが regression することを実装で確認済み。Allowed Paths 追加のみを承認し、goal/AC/In Scope/Out of Scope/safety floor 入力面/#144・#964 ownership boundary は変更しない。"
    required_rerun:
      - contract_review
      - allowed_paths_gate

    🤖 Generated with Claude Code

  9. squne121 commented on Sep 27, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

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

    agent/implementerfollow-upphase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions