Skip to content

実装: impl-review-loop 以外の skill 終了コメントにも note_only_observations / follow_up_issues フィールドを統一する #186

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
change_kind: docs
closure_mode: standalone
runtime_verification_applicability: not_applicable
runtime_verification_reason: "docs-only change; no runtime behavior to verify"
decision: go

Parent Issue

#89

Parent Goal Ref

  • Goal: follow-up 候補を人間が後追い確認するモデルから自動起票して人間が triage するモデルへ転換し、Issue/PR を主インターフェースとして follow-up 漏れを防ぐ
  • Desired Destination: docs/dev/agent-skill-boundaries.md に PR 経路と Issue refinement 経路の follow-up materialization sequence が明記され、各 skill の責務境界が機械可読に定義されている状態

Current Validated Scope

  • docs/dev/agent-skill-boundaries.md に FOLLOW_UP_MATERIALIZATION_RESULT_V1 の shared schema と各 skill の producer/materializer/reporter 責務を追記
  • .claude/skills/post-merge-cleanup/SKILL.md を「terminal materializer」として明記し、既存 schema との drift がある場合のみ修正
  • .claude/skills/issue-refinement-loop/references/follow-up-materialization.md または termination-policy.md に follow-up materialization 出口を追加
  • .claude/skills/issue-refinement-loop/references/termination-policy.md に全 termination reason 共通の result block を記載
  • .claude/skills/pr-review-judge/SKILL.md に follow_up_issue_requests producer として明記し、follow_up_issues を出さないことを negative AC として明記

Remaining Parent Gaps

  • session recording / manifest 基盤の設計・実装(別 Issue で対応)
  • impl-review-loop の非 approved 終了 path での FOLLOW_UP_MATERIALIZATION_RESULT_V1 統一(別 Issue で判断)

背景

PR #179(Issue #89)で impl-review-loop の Step 5 終了コメントに follow_up_issues / note_only_observations フィールドを追加した。しかし post-merge-cleanup / issue-refinement-loop / pr-review-judge では同フィールドの責務境界が未整理であり、各 skill が「context を保持して判断するのか」「値だけを routing するのか」が不明確なため、誤実装を誘発するリスクがある。

本 Issue は「フィールドを追加する」ことではなく、follow-up materialization の接続配線の責務境界を docs に明文化することを目的とする。

Outcome

docs/dev/agent-skill-boundaries.md に PR 経路と Issue refinement 経路の follow-up materialization sequence が記載され、各 skill(post-merge-cleanup = terminal materializer、issue-refinement-loop = thin orchestrator、pr-review-judge = request producer)の責務が明記されている状態。grep で責務境界の文言を確認できること。

In Scope

  • docs/dev/agent-skill-boundaries.md に producer / materializer / reporter の責務分界と sequence を追記
  • post-merge-cleanup/SKILL.md への「terminal materializer」明記(drift 修正含む)
  • issue-refinement-loop/references/ の termination-policy または follow-up-materialization への result block 追加
  • pr-review-judge/SKILL.md への follow_up_issue_requests producer 明記と follow_up_issues 出力禁止の negative rule 追記
  • follow_up_issues(materialization result)と follow_up_issue_requests(起票前候補)の命名分離の明文化

Out of Scope

  • AI 自身のセッション反省をコメント終了時に完結させること
  • セッション横断・Issue 横断の振り返り分析
  • EntireCLI 類似の session recording / manifest / artifact 基盤の設計・実装
  • issue-refinement-loop/SKILL.md 本体(thin entrypoint)への終了コメント schema 直書き
  • pr-review-judge に Issue 起票を行わせること
  • impl-review-loop の非 approved 終了 path の統一

Acceptance Criteria

  • AC1: docs/dev/agent-skill-boundaries.md に FOLLOW_UP_MATERIALIZATION_RESULT_V1 の follow_up_issues / note_only_observations の共通 schema が明記されている
  • AC2: 同 doc に post-merge-cleanup は terminal materializer であり、context owner ではないことが明記されている
  • AC3: 同 doc に issue-refinement-loop は thin orchestrator として follow-up の raw context を保持しないことが明記されている
  • AC4: 同 doc に pr-review-judge は FOLLOW_UP_ISSUE_REQUEST_V1 producer であり、Issue 起票をしないことが明記されている
  • AC5: follow_up_issues(materialize 結果)と follow_up_issue_requests(起票前候補)の命名が混同しないよう定義が明記されている
  • AC6: pr-review-judge/SKILL.md に follow_up_issue_requests を出力する旨と、follow_up_issues を出力しない旨の negative rule が記載されている
  • AC7: issue-refinement-loop/references/termination-policy.md または follow-up-materialization.md に全 termination reason 共通の result block が記載されている
  • AC8: post-merge-cleanup/SKILL.md の既存 schema と FOLLOW_UP_MATERIALIZATION_RESULT_V1 の間に drift がない(drift があれば修正済みである)

Verification Commands

# AC1: FOLLOW_UP_MATERIALIZATION_RESULT_V1 schema の確認(既存コンテンツ確認)
# preflight-scope: pr_review_only
$ rg -n "FOLLOW_UP_MATERIALIZATION_RESULT_V1" docs/dev/agent-skill-boundaries.md

# AC2: terminal materializer 明記の確認
$ rg -n "terminal materializer" docs/dev/agent-skill-boundaries.md

# AC3: thin orchestrator 明記の確認
$ rg -n "thin orchestrator" docs/dev/agent-skill-boundaries.md

# AC4: FOLLOW_UP_ISSUE_REQUEST_V1 producer 明記の確認(既存コンテンツ確認)
# preflight-scope: pr_review_only
$ rg -n "FOLLOW_UP_ISSUE_REQUEST_V1" docs/dev/agent-skill-boundaries.md

# AC5: follow_up_issue_requests 命名分離の確認(既存コンテンツ確認)
# preflight-scope: pr_review_only
$ rg -n "follow_up_issue_requests" docs/dev/agent-skill-boundaries.md

# AC6: pr-review-judge の follow_up_issue_requests 出力確認(既存コンテンツ確認)
# preflight-scope: pr_review_only
$ rg -n "follow_up_issue_requests" .claude/skills/pr-review-judge/SKILL.md

# AC6: pr-review-judge の follow_up_issues 出力禁止 negative rule 確認
$ rg -n "follow_up_issues.*禁止\|follow_up_issues を出力しない\|must not.*follow_up_issues\|negative rule" .claude/skills/pr-review-judge/SKILL.md

# AC7: issue-refinement-loop termination-policy の result block 確認
$ rg -n "FOLLOW_UP_MATERIALIZATION_RESULT_V1" .claude/skills/issue-refinement-loop/references/termination-policy.md

# AC7: issue-refinement-loop follow-up-materialization の follow_up_issues 確認
$ rg -n "follow_up_issues:" .claude/skills/issue-refinement-loop/references/follow-up-materialization.md

# AC8: post-merge-cleanup の FOLLOW_UP_MATERIALIZATION_RESULT_V1 確認(既存コンテンツ確認)
# preflight-scope: pr_review_only
$ rg -n "FOLLOW_UP_MATERIALIZATION_RESULT_V1" .claude/skills/post-merge-cleanup/SKILL.md

$ pnpm typecheck
$ pnpm lint
$ pnpm test
$ pnpm build

Allowed Paths

  • docs/dev/agent-skill-boundaries.md
  • .claude/skills/post-merge-cleanup/SKILL.md
  • .claude/skills/issue-refinement-loop/references/follow-up-materialization.md
  • .claude/skills/issue-refinement-loop/references/termination-policy.md
  • .claude/skills/pr-review-judge/SKILL.md

Stop Conditions

  • ## In Scope に新規の機能領域が追加された場合は停止して人間判断へ送る
  • ## Allowed Paths に上記以外のディレクトリが追加された場合は停止して人間判断へ送る
  • post-merge-cleanup に新規文脈判断ロジックが追加されようとした場合は停止して Out of Scope を確認する
  • pr-review-judge が Issue 起票を実行しようとした場合は停止して Out of Scope を確認する
  • issue-refinement-loop が follow-up の raw context を保持・再解釈するロジックを追加しようとした場合は停止して Out of Scope を確認する
  • docs/dev/agent-skill-boundaries.md 以外の docs ファイルを主対象にスコープが広がった場合は停止して人間判断へ送る

Required Skills

  • implement-issue

Runtime Verification Applicability

decision: not_applicable — docs-only の変更であり、実行時の動作を直接検証する対象がない。grep による static 確認で AC を満たす。

Source

Activity

  1. added
    enhancement
    triage-required
    on May 21, 2026
  2. squne121 commented on May 27, 2026

    @squne121
    OwnerAuthor

    Decision: Still needed

    Reasoning: Cross-cutting concern. Should not be closed in a single phase according to review feedback.

  3. squne121 commented on May 27, 2026

    @squne121
    OwnerAuthor

    sweep result (issue #395)

    SWEEP_DECISION_V1:
      generated_at: "2026-05-28T00:00:00Z"
      generated_by: issue-395-sweep
      issue_number: 186
      decision: still_needed
      reason: "impl-review-loop 以外の skill への note_only_observations / follow_up_issues field 統一は継続的な作業で #395 スコープ外"
      connection_points:
        - "docs/dev/agent-skill-boundaries.md#OUTPUT_BUDGET_V1 の follow_up_issues field schema に準拠すべき skill が複数残っている"
      action: "OPEN のまま維持。別途 implementation Issue として対応"
      sweep_source: https://github.com/squne121/loop-protocol/issues/395
  4. squne121 commented on May 28, 2026

    @squne121
    OwnerAuthor

    判定: REQUEST_CHANGES

    Issue #186 の狙いは妥当ですが、現行 main と関連 Issue/PR を見る限り、このまま実装すると契約境界を壊す可能性が高いです。特に、follow_up_issue_requests は「起票要求」、follow_up_issues / note_only_observations は「materialize 後の終了結果」です。この2つを混同しています。#186 自体は現時点で linked branch / PR がないため、これは Issue contract レベルの敵対的レビューです。([GitHub]1)

    主要ブロッカー

    1. post-merge-cleanup は既に満たしている可能性が高い

    #186 は post-merge-cleanup/SKILL.md に follow_up_issues / note_only_observations を追加せよ、としていますが、現行 main の post-merge-cleanup には既に FOLLOW_UP_MATERIALIZATION_RESULT_V1 として両フィールドがあり、follow_up_issue_requests の materialize 結果を終了コメントに出す設計になっています。ここを無条件に再編集すると、重複 schema・命名揺れ・回帰を生みます。([GitHub]1)

    要求修正: post-merge-cleanup は「追加」ではなく「既存 schema との一致確認」に落とすべきです。差分が必要なのは drift が見つかった場合だけです。


    2. pr-review-judge に follow_up_issues を出させるのは責務違反

    #186 は pr-review-judge の LOOP_VERDICT に follow_up_issues 記録フィールドを追加する、と読めます。しかし現行の pr-review-judge は follow_up_issue_requests を出すだけで、Issue 起票そのものは行わない設計です。follow_up_issues は created / reused_open / skipped_* や Issue number を含む materialization result なので、起票していない judge には正しく埋められません。([GitHub]2)

    要求修正: pr-review-judge は follow_up_issue_requests の producer に留めるべきです。むしろ negative AC として「pr-review-judge は follow_up_issues を出してはならない」を明記すべきです。


    3. issue-refinement-loop/SKILL.md へ直接テンプレートを足すのは設計と衝突する

    現行の issue-refinement-loop/SKILL.md は thin entrypoint で、Step 4.5 は references/follow-up-materialization.md、Step 5 は references/termination-policy.md に委譲されています。#186 のようにトップレベル SKILL.md に終了コメント schema を直書きすると、この分割設計を壊します。Claude Skills の公式ベストプラクティスでも、参照は深くしすぎず、必要な参照ファイルを直接辿れる構造にすることが推奨されています。([GitHub]3)

    要求修正: 追加先は主に以下にすべきです。

    .claude/skills/issue-refinement-loop/references/follow-up-materialization.md
    .claude/skills/issue-refinement-loop/references/termination-policy.md
    

    SKILL.md は参照関係と要約だけに留めるべきです。


    4. issue-refinement-loop の候補 schema が FOLLOW_UP_ISSUE_REQUEST_V1 に足りない

    issue-refinement-loop の planner 出力は follow_up_materialization.candidates を持っていますが、候補は dedupe_key, summary, source_evidence 程度です。一方、共通契約の FOLLOW_UP_ISSUE_REQUEST_V1 は title, issue_kind, severity, source, desired_destination, validated_scope_delta, origin_skill, labels などを要求します。さらに create-issue 側は desired_destination と validated_scope_delta がない orchestrator follow-up を拒否する契約です。([GitHub]4)

    要求修正: #186 は単なる終了コメント追加では足りません。次のどちらかを明記する必要があります。

    1. planner candidate を FOLLOW_UP_ISSUE_REQUEST_V1 へ enrichment する手順を追加する
    2. issue-refinement-loop では materialize せず、候補は note-only / record-only として扱う

    現状のまま「follow_up_issues を出す」と書くと、生成できない結果を要求する仕様になります。


    5. #181 と重複・陳腐化している

    関連 Issue #181 は note_only severity の記録先を定義するものですが、現行 agent-skill-boundaries.md には note_only_observations が既に定義され、impl-review-loop Step 5 の approved termination comment にも同フィールドがあります。#186 は #181 を参照・吸収・close 条件化しないと、同じ契約を二重に直す状態になります。([GitHub]5)

    要求修正: #186 の前に #181 を superseded / covered by current main / depends on #186 のいずれかで整理してください。


    6. 「全終了コメント統一」と言うなら impl-review-loop もまだ穴がある

    #186 は「impl-review-loop 以外」としていますが、現行 impl-review-loop でも approved の termination comment には FOLLOW_UP_MATERIALIZATION_RESULT_V1 がある一方、max_iterations や human_escalation の終了コメントには同じ result block が見えません。タイトル通り「skill 終了コメントの統一」を invariant にするなら、成功終了だけでなく全 termination path で空配列を含めて同じ field を出す必要があります。([GitHub]6)

    要求修正: #186 の scope を「impl-review-loop 以外」に限定するなら、統一 invariant は弱くなります。逆に invariant を強くするなら、impl-review-loop の非 approved 終了 path も対象に含めるべきです。

    推奨する修正版 contract

    contract_schema_version: v1
    issue_kind: implementation
    change_kind: docs
    goal: >
      Materializing skills must emit FOLLOW_UP_MATERIALIZATION_RESULT_V1
      in termination comments. Producer-only skills must emit only
      FOLLOW_UP_ISSUE_REQUEST_V1 requests.
    
    allowed_paths:
      - .claude/skills/post-merge-cleanup/SKILL.md
      - .claude/skills/issue-refinement-loop/SKILL.md
      - .claude/skills/issue-refinement-loop/references/follow-up-materialization.md
      - .claude/skills/issue-refinement-loop/references/termination-policy.md
      - .claude/skills/pr-review-judge/SKILL.md
      - docs/dev/agent-skill-boundaries.md

    Acceptance Criteria は最低限こう切るべきです。

    1. FOLLOW_UP_ISSUE_REQUEST_V1 と FOLLOW_UP_MATERIALIZATION_RESULT_V1 の責務差分を agent-skill-boundaries.md に明記する。
    2. post-merge-cleanup は既存 schema と一致していることを確認し、drift がある場合のみ修正する。
    3. issue-refinement-loop は termination-policy.md に全 termination reason 共通の result block を追加する。空の場合も follow_up_issues: [] / note_only_observations: [] を出す。
    4. issue-refinement-loop の planner candidate を FOLLOW_UP_ISSUE_REQUEST_V1 へ変換する条件、または変換しない場合の record-only 方針を明記する。
    5. pr-review-judge は follow_up_issue_requests のみを出し、follow_up_issues を出さないことを明記する。
    6. note_only は Issue 起票結果ではなく note_only_observations にのみ記録する。
    7. 検証は grep だけでなく、少なくとも schema 名・field 名・negative rule を確認する。

    検証例:

    rg -n "FOLLOW_UP_MATERIALIZATION_RESULT_V1|follow_up_issues:|note_only_observations:" \
      .claude/skills/post-merge-cleanup/SKILL.md \
      .claude/skills/issue-refinement-loop/references/follow-up-materialization.md \
      .claude/skills/issue-refinement-loop/references/termination-policy.md \
      docs/dev/agent-skill-boundaries.md
    
    ! rg -n "follow_up_issues:" .claude/skills/pr-review-judge/SKILL.md
    
    rg -n "follow_up_issue_requests:" \
      .claude/skills/pr-review-judge/SKILL.md

    外部仕様から見た高品質化ポイント

    dedupe は title search ではなく、gh issue list --state all --search "<dedupe_key>" 系で closed も含めて確認するべきです。GitHub CLI の gh issue list は --search と --state all を持つため、この設計は実装可能です。(GitHub CLI)

    triage-required を付ける運用は、ドキュメントに書くだけでは不十分です。GitHub 側では label の作成・適用権限が分かれているため、実際の起票経路で label 付与と検証を契約化する必要があります。([GitHub Docs]8)

    また mandatory follow-up を approve blocker とするなら、単に終了コメントへ記録するだけでは弱いです。GitHub Issues には sub-issues と dependencies の区別があるため、親子分解なのか、blocking dependency なのか、standalone follow-up なのかを materialization 時に分けるべきです。([GitHub Docs]9)

    結論

    #186 はそのまま実装せず、まず Issue 本文を修正すべきです。最小の正しい落とし所は以下です。

    • post-merge-cleanup: 追加ではなく verify/no-op
    • pr-review-judge: follow_up_issues を追加しない。request-only を明文化
    • issue-refinement-loop: SKILL.md 直書きではなく direct reference files に termination result contract を追加
    • planner candidate: FOLLOW_UP_ISSUE_REQUEST_V1 へ変換可能にするか、record-only と明記
    • 運用: FOLLOW_UP_ISSUE_REQUEST_V1 の note_only severity 記録先ルールを agent-skill-boundaries.md に定義する #181: supersede/close/dependency整理
    • impl-review-loop: 統一 invariant を強くするなら非 approved 終了 path も別 Issue か同一 Issue に含める

    現状の #186 は「フィールド名を揃える」Issue に見えますが、実際には producer / materializer / termination reporter の責務分離を固める Issue として再定義する必要があります。

  5. squne121 commented on May 28, 2026

    @squne121
    OwnerAuthor

    人間からのコメントです。
    「.claude/skills/post-merge-cleanup/SKILL.md の終了コメントに follow_up_issues / note_only_observations を追加」とありますが、post-merge-cleanupはこのプロジェクトにおける開発フローの終着点であり、post-merge-cleanupの改善はあることにはあると思いますが、そこでの気づきは少ないものと思います。どちらかというと、これはimpl-review-loop のフローからPRに蓄積されたfollow_up_issues / note_only_observationsをIssueへとに寄与したことを示す接続であると認識しています。
    「.claude/skills/issue-refinement-loop/SKILL.md の終了コメントに同フィールドを追加」とありますが、これはissue-refinement-loop内で見られたスコープの分割による新規イシューの起票や、レビューから認識されたスコープ外の新たなやるべきことなどを起票する起票する働きと認識しています。issue-refinement-loop自身はサブエージェント間でやりとりされるfollow_up_issues / note_only_observationsを値として認識するのみでコンテクスト自体を扱わなくて済むようにしてください。主なフローは .claude/skills/review-issue によりスコープ分割、スコープ外改善や実施すべきことが明示され、Issueコメントに記載される→ .claude/agents/issue-author.md へレビューIssueコメントを渡し、別Issueとして起票される→Issueレビュアーが起票を確認し、後続Issueへの接続をもってIssueの適切さを認識する。というような流れになると想定しています。
    「.claude/skills/pr-review-judge/SKILL.md の LOOP_VERDICT 出力に follow_up_issues の記録フィールドを追加」これは適切なものと認識しています。PRのスコープ外やレビューから見られた改善をPRレビュー・コメントとして記載し、.claude/agents/implementation-worker.md .claude/skills/open-pr はそれを受けてPR本文に追記→post-merge-cleanupにて .claude/agents/issue-author.md .claude/skills/create-issue がそれを起票する流れの認識です。

  6. squne121 commented on May 28, 2026

    @squne121
    OwnerAuthor

    人間からのコメントです。
    このIssueは局所的な作業とコンテクストにおいてAI自身が振り返り改善を行ったり、スコープの変更から別イシューを起票する流れを想定している。後者については有用と思うが、前者については自身のセッション反省という点から効果が薄いのではないかと考えている。それよりも別Issueで整備を進めているEntireCLIと類似したセッション自動記録について実装をすすめ、それを人間トリガーでimpl-review-loop全体の流れ、単一Issueのissue-refinement-loop→impl-review-loop→post-merge-cleanupまでの全体の流れ、他のIssueの実装との比較などを行える方が振り返り改善としては効果的ではないか?

  7. squne121 commented on May 28, 2026

    @squne121
    OwnerAuthor

    #186 (comment)

    結論: 人間コメントの方向が正しいです。Issue #186 は「各 skill の終了コメントに同じフィールドを足す」だけだと責務が曖昧で、post-merge-cleanup / issue-refinement-loop がコンテキストを抱える誤実装を誘発します。Issue 本文は、現状「post-merge-cleanup / issue-refinement-loop / pr-review-judge にフィールドを追加」とだけ書いています。([GitHub]1) 一方、既存の責務境界ドキュメントは、FOLLOW_UP_ISSUE_REQUEST_V1 を「後で Issue にすべき観察」を main thread に返すスキーマとし、起票は main thread が issue-author / create-issue 経由で担う、と定義しています。([GitHub]2)

    そのため、Issue #186 に貼るコメントは以下がよいです。

    人間判断コメントです。
    
    この Issue の意図は「各 skill が follow-up のコンテキストを保持・判断する」ことではなく、各フロー間で `follow_up_issues` / `note_only_observations` の materialization / reporting を機械可読に接続することだと整理してください。
    
    ## 1. post-merge-cleanup の位置づけ
    
    `.claude/skills/post-merge-cleanup/SKILL.md` は、このプロジェクトの開発フローの終着点です。
    
    したがって、post-merge-cleanup 自身が新しい改善観察を積極的に発見・判断する主担当ではありません。post-merge-cleanup で気づく改善はあり得ますが、主用途は次です。
    
    - impl-review-loop / pr-review-judge / PR 本文に蓄積された follow-up 候補を読む
    - dedupe_key に基づいて既存 Issue を検索する
    - `issue-author` + `create-issue` 経由で Issue 化する
    - 起票 / reuse / skip / note_only の結果を終了コメントの `FOLLOW_UP_MATERIALIZATION_RESULT_V1` として報告する
    
    つまり、post-merge-cleanup は「終端 materializer / reporter」であり、コンテキスト判断の主担当ではありません。
    
    禁止したい実装:
    - post-merge-cleanup に PR レビュー文脈の再解釈を持たせる
    - post-merge-cleanup が大きなレビューコンテキストを保持する
    - post-merge-cleanup-worker が直接 Issue 起票する
    
    許容する実装:
    - merged PR body / PR comments / `LOOP_VERDICT.follow_up_issue_requests` / `Follow-ups Intentionally Deferred` 相当の構造化セクションを入力として読む
    - `FOLLOW_UP_ISSUE_REQUEST_V1[]` を materialize する
    - 終了コメントに `FOLLOW_UP_MATERIALIZATION_RESULT_V1.follow_up_issues` / `note_only_observations` を出す
    
    ## 2. issue-refinement-loop の位置づけ
    
    `.claude/skills/issue-refinement-loop/SKILL.md` も、follow-up の raw context を保持・再解釈しないでください。
    
    ここで想定している主フローは次です。
    
    1. `.claude/skills/review-issue` が、スコープ分割・スコープ外改善・別 Issue 化すべき事項を明示する
    2. その結果を Issue コメント、または `REVIEW_ISSUE_RESULT_V1` / `FOLLOW_UP_ISSUE_REQUEST_V1` 相当の構造化値として残す
    3. `.claude/agents/issue-author.md` にレビュー Issue コメントまたは構造化 payload を渡す
    4. `.claude/skills/create-issue` 経由で別 Issue を起票する
    5. issue-reviewer が、後続 Issue への接続を確認して元 Issue の適切性を判断する
    
    したがって、issue-refinement-loop は follow-up 候補の「値」を routing / reporting するだけにしてください。  
    review-issue の判断内容や raw review context を issue-refinement-loop 自身に再実装しないでください。
    
    必要なら、`issue-refinement-loop` の終了コメントには `FOLLOW_UP_MATERIALIZATION_RESULT_V1` を出してよいですが、これは「refinement loop 内で materialize した結果の報告」であり、「loop が context を保持して follow-up を判断する」という意味ではありません。
    
    ## 3. pr-review-judge の位置づけ
    
    `.claude/skills/pr-review-judge/SKILL.md` の `LOOP_VERDICT` に `follow_up_issue_requests` を追加する方針は適切です。
    
    PR レビューでは、PR スコープ外の改善、レビューで見えた後続作業、mandatory / optional / note_only の観察が自然に発生します。  
    それらは PR review comment に `FOLLOW_UP_ISSUE_REQUEST_V1` として構造化して残すべきです。
    
    ただし、pr-review-judge は Issue 起票を実行しないでください。
    
    想定フロー:
    1. `pr-review-judge` が `LOOP_VERDICT.follow_up_issue_requests` を出す
    2. `impl-review-loop` がそれを読む
    3. `.claude/agents/implementation-worker.md` / `.claude/skills/open-pr` が PR 本文へ follow-up 候補を反映する
    4. PR merge 後、`post-merge-cleanup` が PR に蓄積された follow-up 候補を materialize する
    5. `post-merge-cleanup` が `issue-author` / `create-issue` に委譲して Issue 化する
    6. 終了コメントに `FOLLOW_UP_MATERIALIZATION_RESULT_V1` として結果を残す
    
    ## 4. Issue #186 の修正方針
    
    この Issue の Acceptance Criteria / 実装指示は、単なる「終了コメントにフィールド追加」ではなく、以下の責務分界を明示する形に修正してください。
    
    - `pr-review-judge`
      - `LOOP_VERDICT.follow_up_issue_requests` を出力する
      - Issue 起票はしない
      - PR レビュー上の non-blocker / mandatory follow-up / note_only を構造化する
    
    - `impl-review-loop`
      - `LOOP_VERDICT.follow_up_issue_requests` を consume する
      - PR 本文または終了コメントへ forwarding する
      - mandatory follow-up の未 materialize を APPROVE/merge 前の gate として扱うかを明示する
    
    - `implementation-worker` / `open-pr`
      - PR 本文に follow-up 候補を保持できる section を用意する
      - PR 本文更新時は validator / wrapper を経由する
      - follow-up の内容判断はしない。受け取った構造化候補を PR body surface に反映する
    
    - `post-merge-cleanup`
      - merged PR に蓄積された follow-up 候補を materialize する終端フロー
      - `issue-author` / `create-issue` に委譲する
      - `FOLLOW_UP_MATERIALIZATION_RESULT_V1.follow_up_issues` / `note_only_observations` を終了コメントに出す
      - 新規文脈判断の主担当ではない
    
    - `issue-refinement-loop`
      - `review-issue` 由来の scope split / out-of-scope improvement / follow-up candidate を routing する
      - `issue-author` / `create-issue` に委譲する
      - raw review context を保持・再解釈しない
      - 終了コメントには materialization 結果のみを出す
    
    ## 5. 受け入れ条件として追加してほしいこと
    
    - `docs/dev/agent-skill-boundaries.md` に、PR 経路と Issue refinement 経路の follow-up materialization sequence を明記する
    - `post-merge-cleanup` は terminal materializer であり、context owner ではないことを明記する
    - `issue-refinement-loop` は thin orchestrator として、follow-up の raw context を保持しないことを明記する
    - `pr-review-judge` は `FOLLOW_UP_ISSUE_REQUEST_V1` producer であり、Issue 起票をしないことを明記する
    - 起票は常に `issue-author` / `create-issue` 経由に統一する
    - `follow_up_issues` は「起票済み / reuse / skip の結果」、`follow_up_issue_requests` は「起票前の候補」として命名を混同しない

    補足すると、現行 agent-skill-boundaries.md は既に FOLLOW_UP_MATERIALIZATION_RESULT_V1 を follow_up_issues / note_only_observations の共通終了コメントスキーマとして定義しています。([GitHub]2) また、同ドキュメントは pr-review-judge は観察を LOOP_VERDICT.follow_up_issue_requests に出すだけ、post-merge-cleanup-worker は候補列挙のみ、main thread が dedupe 後に issue-author / create-issue へ委譲する、と責務を切っています。([GitHub]2)

    敵対的に見ると、Issue #186 の危険点は「follow_up_issues と follow_up_issue_requests の混同」です。前者は materialization result、後者は materialization 前の request に固定した方がよいです。現行 pr-review-judge も follow_up_issue_requests は non-blocker observations の構造化フィールドであり、自身は起票しないと書いているため、この命名分離に沿っています。([raw.githubusercontent.com]3)

  8. squne121 commented on May 28, 2026

    @squne121
    OwnerAuthor

    #186 (comment)

    結論: 人間コメントの方針に賛成です。#186 は「AI 自身の局所的なセッション反省」を強化する Issue として扱うより、follow-up / note-only の materialization 接続を標準化する Issueに狭めた方がよいです。振り返り改善の本命は、別系統の session recording / manifest / artifact 基盤で扱うべきです。

    #186 の本文は、impl-review-loop で導入済みの follow_up_issues / note_only_observations を post-merge-cleanup / issue-refinement-loop / pr-review-judge にも統一する、という機械可読フォーマット統一が主目的です。背景も「フォーマットが未追加で統一されていない」ことを問題にしています。([GitHub]1) 一方、#89 の親目的は「follow-up 候補を人間が後追い確認するモデル」から「自動起票して人間が triage するモデル」への転換であり、Issue/PR を主インターフェースにして follow-up 漏れを防ぐことです。([GitHub]2)

    現状の main を見ると、post-merge-cleanup は既に merged PR の本文・コメントから follow-up 候補を収集し、起票・スキップ結果を follow_up_issues、起票しない観察を note_only_observations に記録する構造を持っています。([GitHub]3) impl-review-loop Step 5 も、LOOP_VERDICT.follow_up_issue_requests を受けて mandatory / optional / note_only を処理し、終了報告コメントに FOLLOW_UP_MATERIALIZATION_RESULT_V1 を出す設計になっています。([GitHub]4) pr-review-judge も non-blocker observations を follow_up_issue_requests として出力するが、自身では起票しないと明記しています。([GitHub]5) つまり、#186 は「振り返りの高度化」ではなく、既に PR/loop 中に発生した観察を Issue 化・記録する配線の整合性修正として見るのが自然です。

    一方で、セッション振り返りについては #136 が既に「AC 読み落とし」「test-runner を実際に呼んだか」「SKIP exit 0 を黙認した理由」「PR 本文全面置換」「token/context 圧迫」などを事後検証する手段がないことを問題としており、EntireCLI 等の session 記録ツールの導入判断を対象にしています。([GitHub]6) Entire CLI 自体も、transcript / prompt / touched files / token usage / tool calls を commit に紐付けて記録し、検索可能な履歴を作るツールとして説明されています。([GitHub]7) Thoughtworks も Entire CLI を、AI agent session を Git workflow に沿って記録し、main branch history を汚さず audit trail と recovery を提供する新興ツールとして位置づけています。([Thoughtworks]8)

    したがって、コメントへの回答方針はこうです。

    この指摘に同意します。
    
    #186 は「AI 自身が局所セッション内で反省して改善する」ための Issue ではなく、各 loop / skill の終了時に発生した follow-up / note-only 観察を機械可読に materialize し、Issue/PR を主インターフェースとして人間が triage できるようにするための配線統一として扱うべきです。
    
    特に post-merge-cleanup は開発フローの終着点であり、そこで新しい改善観察を主に発見することを期待するより、impl-review-loop / pr-review-judge / PR 本文 / PR コメントに蓄積された follow_up_issue_requests / note_only_observations を回収・接続・記録する役割と定義する方が適切です。
    
    issue-refinement-loop については、refinement 中にスコープ分割・スコープ外作業・新規 child / sibling Issue 候補が見えるため、follow-up materialization の出口を持つ価値があります。ただし、これも「自己反省」ではなく、スコープ管理・Issue 分割・後続作業起票の materialization として扱うべきです。
    
    一方、振り返り改善そのものは、別 Issue で進めている EntireCLI 類似の session recording / agent_session_manifest / artifact 基盤を使い、人間トリガーで以下を分析できる形にした方が効果が高いと考えます。
    
    - impl-review-loop 単体の一連の判断・実行・検証・PR review の流れ
    - 1 Issue に対する issue-refinement-loop → impl-review-loop → post-merge-cleanup までの end-to-end lifecycle
    - 複数 Issue / PR 間の比較による recurring failure pattern の抽出
    - AC 読み落とし、test-runner 未実行、SKIP 黙認、PR 本文の証跡不足、context/token 圧迫などの再発傾向
    
    したがって #186 のスコープは以下に修正したいです。
    
    ## In Scope
    - 各終了コメントで `FOLLOW_UP_MATERIALIZATION_RESULT_V1` を参照・記録する
    - `follow_up_issues` と `note_only_observations` の意味を統一する
    - post-merge-cleanup は PR / impl-review-loop 由来の follow-up 回収・接続役として明記する
    - issue-refinement-loop は scope split / out-of-scope discovery / child materialization の出口として明記する
    - pr-review-judge は `follow_up_issue_requests` を出力するのみで、起票は main thread 側に残す
    
    ## Out of Scope
    - AI 自身のセッション反省を termination comment 内で完結させること
    - セッション横断・Issue 横断の振り返り分析
    - EntireCLI 類似の session recording / manifest / artifact 基盤の設計・実装
    
    ## Follow-up
    session recording 基盤側に、人間トリガーの retrospective analysis Issue を別途起票する。

    実装上は、#186 を閉じずにこの方向へ Issue 本文を修正するのがよいです。特に post-merge-cleanup は「新規発見」ではなく「PR/loop 由来の観察の回収・接続」、issue-refinement-loop は「scope 分割・新規 Issue 化の出口」、pr-review-judge は「観察の構造化出力のみ」と責務を明記すると、セッション反省と follow-up materialization の混線を避けられます。

  9. removed
    triage-required
    enhancement
    on May 28, 2026
  10. changed the title [-]運用: impl-review-loop 以外の skill 終了コメントにも note_only_observations / follow_up_issues フィールドを統一する[/-] [+]実装: impl-review-loop 以外の skill 終了コメントにも note_only_observations / follow_up_issues フィールドを統一する[/+] on May 28, 2026
  11. squne121 commented on May 28, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-28T15:10:03Z)

    • Outcome: docs/dev/agent-skill-boundaries.md に PR 経路と Issue refinement 経路の follow-up materialization sequence が記載され、各 skill の責務境界(terminal materializer / thin orchestrator / request producer)が明記されている状態
    • Acceptance Criteria: AC1〜AC8(AC1/AC4/AC5/AC6+/AC8 は既存コンテンツで充足済み。AC2/AC3/AC6 negative/AC7 が実装対象)
    • Verification Commands: docs/dev/agent-skill-boundaries.md と skill files への rg による static 確認
    • Allowed Paths:
      • docs/dev/agent-skill-boundaries.md
      • .claude/skills/post-merge-cleanup/SKILL.md
      • .claude/skills/issue-refinement-loop/references/follow-up-materialization.md
      • .claude/skills/issue-refinement-loop/references/termination-policy.md
      • .claude/skills/pr-review-judge/SKILL.md
    • Worktree: .claude/worktrees/issue-186-impl-review-loop-skill-note-only-observa
    • Branch: worktree-issue-186-impl-review-loop-skill-note-only-observa
    • VC preflight: baseline fail = 5, 想定外 pass = 0, 実行不可 = 0, skipped(pr_review_only) = 5, regression_gate pass = 4
    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: 2026-05-28T15:10:03Z
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/186
      checks:
        template_compliance: pass
        state_label: ok
        allowed_paths_present: pass
        vc_present: pass
        stop_conditions_complete: pass
        vc_preflight:
          passed: true
          vc_failed_as_expected: 5
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          vc_expected_pass: 4
          vc_skipped: 5
          classifications:
            - ac: AC1
              command: "rg -n FOLLOW_UP_MATERIALIZATION_RESULT_V1 docs/dev/agent-skill-boundaries.md"
              exit_code: null
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              confidence: high
              decision: go
              verification_owner: pr-review-judge
              deferred_reason: "already satisfied - content exists in docs"
              runtime_verification_required: false
            - ac: AC2
              command: "rg -n terminal materializer docs/dev/agent-skill-boundaries.md"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC3
              command: "rg -n thin orchestrator docs/dev/agent-skill-boundaries.md"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC4
              command: "rg -n FOLLOW_UP_ISSUE_REQUEST_V1 docs/dev/agent-skill-boundaries.md"
              exit_code: null
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              confidence: high
              decision: go
              verification_owner: pr-review-judge
              deferred_reason: "already satisfied - content exists in docs"
              runtime_verification_required: false
            - ac: AC5
              command: "rg -n follow_up_issue_requests docs/dev/agent-skill-boundaries.md"
              exit_code: null
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              confidence: high
              decision: go
              verification_owner: pr-review-judge
              deferred_reason: "already satisfied - content exists in docs"
              runtime_verification_required: false
            - ac: AC6_positive
              command: "rg -n follow_up_issue_requests .claude/skills/pr-review-judge/SKILL.md"
              exit_code: null
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              confidence: high
              decision: go
              verification_owner: pr-review-judge
              deferred_reason: "already satisfied - content exists"
              runtime_verification_required: false
            - ac: AC6_negative
              command: "rg -n follow_up_issues.*禁止 .claude/skills/pr-review-judge/SKILL.md"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC7_termination_policy
              command: "rg -n FOLLOW_UP_MATERIALIZATION_RESULT_V1 .claude/skills/issue-refinement-loop/references/termination-policy.md"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC7_follow_up_materialization
              command: "rg -n follow_up_issues: .claude/skills/issue-refinement-loop/references/follow-up-materialization.md"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC8
              command: "rg -n FOLLOW_UP_MATERIALIZATION_RESULT_V1 .claude/skills/post-merge-cleanup/SKILL.md"
              exit_code: null
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              confidence: high
              decision: go
              verification_owner: pr-review-judge
              deferred_reason: "already satisfied - content exists"
              runtime_verification_required: false
        ac_verifiability: pass
        product_spec_check:
          applicability: not_applicable
          decision: pass
          triggers:
            docs_product_allowed_paths: false
            tasks_md_mentioned: false
            specify_artifact_mentioned: false
            generated_task_mentioned: false
            product_spec_context_present: false
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings:
        - "AC1/AC4/AC5/AC6+/AC8 のコンテンツは既に docs に存在するため pr_review_only でスキップ。実装対象は AC2/AC3/AC6 negative rule/AC7 のみ。"
  12. squne121 commented on May 28, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-05-28T15:13:31Z)

  13. added 3 commits that reference this issue on May 28, 2026
  14. squne121 commented on May 28, 2026

    @squne121
    OwnerAuthor

    post-merge-cleanup: 完了 (2026-05-29T00:10:00Z)

    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: post-merge-cleanup
      follow_up_issues:
        - request_dedupe_key: "follow-up:squne121/loop-protocol:pr/449:schema-consumer-b4"
          status: reused_open
          issue:
            number: 450
            url: "https://github.com/squne121/loop-protocol/issues/450"
          reason: "impl-review-loop step-5 nested format 移行。PR #449 マージ前に起票済み"
    
      note_only_observations:
        - dedupe_key: "note:squne121/loop-protocol:pr/449:worktree-untracked"
          source_url: "https://github.com/squne121/loop-protocol/pull/449"
          source_note_id: "cleanup-1"
          summary: "temp-unsupported.txt は main にも存在する共通 test fixture のため、worktree 削除時に --force を使用した。データ損失なし。"
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

    phase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions