Skip to content

改善: delivery-rollup parent の child materialization を全 skill 横断で機械的に保証する plan_child_materialization.py を導入する #299

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#254"
goal_ref: "delivery-rollup parent の child materialization を、plan_child_materialization.py を中核に全 skill 横断で機械的に保証する handoff 動線を整備する"
change_kind: docs

Parent Issue

#254

Parent Goal Ref

  • Goal: 親: SDD 駆動運用方針の確定と不足 product SSOT の child 起票 #254 の closure_mode: child-complete 下で、ADR child マージ後に残り child が (未起票) のまま放置されないよう、自動提案 handoff 動線をワークフロー skill に明示する
  • Desired Destination: delivery-rollup parent の child materialization が、plan_child_materialization.py の read-only plan を中核として、create-issue / edit-issue / issue-refinement-loop / impl-review-loop / open-pr / post-merge-cleanup の全 skill で structured に伝搬される状態

Current Validated Scope

  • CHILD_MATERIALIZATION_PLAN_V1 schema を docs/dev/agent-skill-boundaries.md に定義する
  • plan_child_materialization.py を .claude/skills/create-issue/scripts/ に新規作成する(delivery-rollup parent body から (未起票) child / 既存 child / stale child を検出する read-only plan 生成スクリプト)
  • .claude/skills/create-issue/SKILL.md に plan の create_issue action を create_issue_txn.py 経由で materialize する手順を追記する
  • .claude/skills/edit-issue/SKILL.md に delivery-rollup parent body の placeholder 置換手順を追記する
  • .claude/skills/issue-refinement-loop/SKILL.md に delivery-rollup parent の approve 前 child materialization gate を追加する
  • .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md の APPROVE 後 follow-up セクションに delivery-rollup parent の残り child 起票を mandatory_follow_up として扱う注記を追記する
  • .claude/skills/open-pr/SKILL.md に Parent Child Materialization セクションを追加する
  • .claude/skills/post-merge-cleanup/SKILL.md の Section 6 に delivery-rollup parent の (未起票) child 検出・follow_up_issue_requests 追加手順を追記する
  • docs/dev/workflow.md に delivery-rollup parent handoff 手順セクションを追加し、stale な ssot-catalog.md 参照を修正する

Remaining Parent Gaps

Outcome

.claude/skills/create-issue/scripts/plan_child_materialization.py が新規作成され、CHILD_MATERIALIZATION_PLAN_V1 schema が docs/dev/agent-skill-boundaries.md に定義され、create-issue / edit-issue / issue-refinement-loop / impl-review-loop / open-pr / post-merge-cleanup の各 SKILL.md が delivery-rollup child materialization フローを参照する状態で PR がマージされており、LLM が全 child issue body を都度読まなくてもスクリプトの plan 出力から materialization 判断できる状態

In Scope

  • docs/dev/agent-skill-boundaries.md に CHILD_MATERIALIZATION_PLAN_V1 schema を定義する(parent_issue, parent_mode, children[].status: missing | existing | stale_body_only | ambiguous, action, dedupe_key を持つ)
  • .claude/skills/create-issue/scripts/plan_child_materialization.py を新規作成する(read-only plan 生成スクリプト。mutation を行わず CHILD_MATERIALIZATION_PLAN_V1 を stdout 出力する)
  • .claude/skills/create-issue/tests/test_plan_child_materialization.py を新規作成する(親: SDD 駆動運用方針の確定と不足 product SSOT の child 起票 #254 相当の fixture で missing / existing / stale_body_only 分類を検証するテスト)
  • .claude/skills/create-issue/SKILL.md に CHILD_MATERIALIZATION_PLAN_V1 の action=create_issue を create_issue_txn.py 経由で materialize する手順を追記する
  • .claude/skills/edit-issue/SKILL.md に delivery-rollup-parent-update mode(plan の parent body update を backup / guard / rollback 付きで適用する手順)を追記する
  • .claude/skills/issue-refinement-loop/SKILL.md に、delivery-rollup parent の approve 前に plan_child_materialization.py --dry-run 相当を実行して未 materialize child がある場合は mandatory_follow_up に追加するゲートを追記する
  • .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md の APPROVE 後 follow-up セクションに、delivery-rollup parent の残り child 起票を mandatory_follow_up として扱う注記を追記する
  • .claude/skills/open-pr/SKILL.md に ## Parent Child Materialization セクションを追加する(parent_issue, parent_mode, child_materialization_plan, unresolved_children を PR 本文に記載する手順)
  • .claude/skills/post-merge-cleanup/SKILL.md の Section 6 に、merged PR が delivery-rollup parent の child であり親本文に (未起票) placeholder が残っている場合に親本文更新と残り child 起票を follow_up_issue_requests に追加する手順を追記する
  • docs/dev/workflow.md に delivery-rollup / parent-mode handoff 手順 セクションを追加し、ssot-catalog.md への stale 参照を修正する

Out of Scope

  • アプリケーション実装コード変更
  • closure_mode: child-complete 以外の parent_mode への適用拡張
  • plan_child_materialization.py によるミューテーション(read-only plan 生成のみ。mutation は create_issue_txn.py / edit-issue skill に委ねる)
  • speckit-taskstoissues との統合(別 Issue で扱う)
  • post-merge-cleanup-worker SubAgent のロジック変更(SKILL.md 記述のみ)
  • 親: SDD 駆動運用方針の確定と不足 product SSOT の child 起票 #254 の実際の child 起票(本 Issue はフロー整備のみ)

Acceptance Criteria

  • AC1: CHILD_MATERIALIZATION_PLAN_V1 の schema が docs/dev/agent-skill-boundaries.md に定義されている
  • AC2: delivery-rollup parent body から (未起票) child / 既存 child / stale child を検出する read-only script が .claude/skills/create-issue/scripts/plan_child_materialization.py として存在する
  • AC3: plan_child_materialization.py は 親: SDD 駆動運用方針の確定と不足 product SSOT の child 起票 #254 相当の fixture で C254 child の missing / existing / stale_body_only を分類できる(test により検証)
  • AC4: create-issue SKILL.md は plan の create_issue action を create_issue_txn.py 経由で materialize する手順を持つ
  • AC5: edit-issue SKILL.md は plan の parent body update を backup / guard / rollback 付きで適用する手順を持つ
  • AC6: issue-refinement-loop SKILL.md は delivery-rollup parent approve 前に child materialization plan を確認するゲートを持つ
  • AC7: impl-review-loop / open-pr / post-merge-cleanup は parent handoff 状態を structured に伝搬する手順を SKILL.md に持つ
  • AC8: Allowed Paths 外への変更がない

Verification Commands

# AC1: agent-skill-boundaries.md に CHILD_MATERIALIZATION_PLAN_V1 schema が定義されている
$ rg -n "CHILD_MATERIALIZATION_PLAN_V1" docs/dev/agent-skill-boundaries.md

# AC2: plan_child_materialization.py が存在する
$ test -f .claude/skills/create-issue/scripts/plan_child_materialization.py && echo "PASS: script exists" || echo "FAIL: script not found"

# AC3: スクリプトが missing / existing / stale_body_only を出力に含む(静的検査)
$ rg -n "missing|existing|stale_body_only" .claude/skills/create-issue/scripts/plan_child_materialization.py && rg -n "missing|existing|stale_body_only" .claude/skills/create-issue/tests/test_plan_child_materialization.py

# AC4: create-issue SKILL.md に create_issue_txn.py 経由の materialize 手順が存在する
$ rg -n "CHILD_MATERIALIZATION_PLAN_V1\|plan_child_materialization\|create_issue_txn" .claude/skills/create-issue/SKILL.md

# AC5: edit-issue SKILL.md に delivery-rollup-parent-update mode または placeholder 置換手順が存在する
$ rg -n "delivery-rollup\|placeholder\|parent.*update" .claude/skills/edit-issue/SKILL.md

# AC6: issue-refinement-loop SKILL.md に delivery-rollup parent の child materialization gate が存在する
$ rg -n "delivery-rollup\|child.*materialization\|materialization.*gate" .claude/skills/issue-refinement-loop/SKILL.md

# AC7: impl-review-loop step-5、open-pr、post-merge-cleanup に delivery-rollup handoff 記述が存在する
$ rg -n "delivery-rollup" .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md .claude/skills/open-pr/SKILL.md .claude/skills/post-merge-cleanup/SKILL.md

# AC8: Allowed Paths 外への変更がないことを確認
$ git diff --name-only HEAD | grep -v -E "^(.claude/skills/create-issue/SKILL\.md|.claude/skills/create-issue/scripts/plan_child_materialization\.py|.claude/skills/create-issue/tests/test_plan_child_materialization\.py|.claude/skills/edit-issue/SKILL\.md|.claude/skills/issue-refinement-loop/SKILL\.md|.claude/skills/impl-review-loop/steps/step-5-feedback-and-termination\.md|.claude/skills/open-pr/SKILL\.md|.claude/skills/post-merge-cleanup/SKILL\.md|docs/dev/workflow\.md|docs/dev/agent-skill-boundaries\.md)$" && echo "FAIL: Allowed Paths 外の変更あり" || echo "PASS: Allowed Paths 外の変更なし"

Allowed Paths

  • .claude/skills/create-issue/SKILL.md
  • .claude/skills/create-issue/scripts/plan_child_materialization.py
  • .claude/skills/create-issue/tests/test_plan_child_materialization.py
  • .claude/skills/edit-issue/SKILL.md
  • .claude/skills/issue-refinement-loop/SKILL.md
  • .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md
  • .claude/skills/open-pr/SKILL.md
  • .claude/skills/post-merge-cleanup/SKILL.md
  • docs/dev/workflow.md
  • docs/dev/agent-skill-boundaries.md

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

なし

Scope Delta

N/A

Runtime Verification Applicability

  • decision: not_applicable
  • reason: docs+script 変更だが、AC1-AC8 はすべて静的テキスト存在確認(rg / test -f / uv run pytest)のみで決定論的に検証可能。動作検証(コード実行・AI ループ起動)は不要

Background

問題の背景

#254 の refinement loop 中の調査で、post-merge-cleanup と impl-review-loop には汎用の follow-up Issue 起票動線が存在するが、delivery-rollup parent 向けの「ADR child マージ後に残り child を自動提案する」delivery-rollup specific な検出ロジックが実装されていないことが判明した。

(調査結果: post-merge-cleanup Section 6 と impl-review-loop step-5 には general follow-up フローが既に実装されているが、parent body の (未起票) placeholder を機械的にスキャンして child 起票を提案する delivery-rollup 特化処理はない。)

#257(ADR: SDD ツール採否)が CLOSED になった後も #254 本文の child が (未起票) のまま放置されたのはこの delivery-rollup specific 動線の不在が原因の一つである。

修正方針

中核: plan_child_materialization.py が CHILD_MATERIALIZATION_PLAN_V1 を stdout 出力する。LLM が都度 parent body を全文読む必要がなくなり、トークン削減・コンテキスト最小化・作業品質向上を達成する。

mutation は既存の create_issue_txn.py / edit-issue skill に委ね、script は read-only plan 生成に徹する。

全 skill 横断: create-issue / edit-issue / issue-refinement-loop / impl-review-loop / open-pr / post-merge-cleanup の各 skill が plan を消費・伝搬する手順を SKILL.md に明記する。

関連情報

Source

source: issue-refinement-loop (issue #254)
dedupe_key: delivery-rollup-child-materialization-handoff
anchor: https://github.com/squne121/loop-protocol/issues/254#issuecomment-4525044020
related_issues: "#254, #257"

Activity

  1. added
    enhancement
    phase/implementation
    triage-required
    agent/implementer
    on May 23, 2026
  2. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    人間からの指摘です。
    「post-merge-cleanup と impl-review-loop」を対象としているが issue-refinement-loop ひいては .claude\skills\create-issue .claude\skills\edit-issue .claude\skills\open-pr もおや GitHub Issue 作成時に作成していない子供 GitHub Issue の後続作業中における作成について、動線を確保する目的で検討してほしいです。
    Out of Scope に「新しい自動化スクリプトの作成」の記載がありますが、可能な限りスクリプティングによる解決を検討してほしいです。それは、AIエージェント利用におけるトークンを削減するため、およびコンテクストウィンドウの最小化によって作業品質を上げたいためです。

  3. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    判定: REQUEST CHANGES

    Issue #299 は、そのまま実装に流すべきではありません。理由は単純で、現行スコープが **「post-merge-cleanup / impl-review-loop に prose を追記する docs-only 修正」**に閉じすぎています。一方、人間指摘の本質は delivery-rollup parent の child materialization を、Issue 作成・編集・PR・refinement・post-merge の全導線で機械的に保証することです。Issue #299 の AC4 は「3ファイル以外の変更なし」を要求しており、さらに Out of Scope で「新しい自動化スクリプトの作成」を除外しています。これは、今回の「スクリプティングでトークン削減・コンテキスト最小化したい」という要求と正面衝突します。

    重大な問題

    1. docs-only 追記では再発防止にならない

    現行の post-merge-cleanup は既に follow_up_issue_requests を main thread が issue-author / create-issue 経由で起票するフローを持っています。しかし Section 6 の抽出元は merged PR 本文・コメント内の follow-up 記述であり、delivery-rollup parent の本文を読み、(未起票) child を検出して materialize する決定論的処理はありません。

    impl-review-loop も同様です。APPROVE 時の LOOP_VERDICT.follow_up_issue_requests を起票する手順はありますが、これは review verdict が既に request を出している前提です。parent body / sub-issues / placeholder の機械的 scan は定義されていません。

    つまり #299 の現行方針は「誰かが気づけば起票できる」状態を「気づくべきと書く」だけです。人間が求めているのは、気づきそのものをスクリプト化することです。

    2. 対象 skill が狭すぎる

    人間指摘の通り、対象は post-merge-cleanup と impl-review-loop だけでは足りません。issue-refinement-loop は Issue 本文を改善して approve する導線であり、delivery-rollup parent を approve した時点で child plan の未 materialize を検出すべきです。現行 issue-refinement-loop には、代替 Issue 作成や anchor comment による本文更新フローはありますが、delivery-rollup parent の child materialization gate はありません。

    また create-issue には sub-issue 登録と parent 抽出の規則が既にありますが、delivery-rollup の child plan をまとめて読み、未起票 child を作るモードはありません。

    edit-issue は body-file 経由・backup・guard・rollback を持つので、parent body の (未起票) を #N に置換する役割を担わせるべきです。現行 #299 はこの導線を見落としています。

    open-pr も PR 本文に linked issue の state を反映する責務を既に持っているため、delivery-rollup parent に属する child PR では Parent Child Materialization セクションを持たせるのが自然です。現行 open-pr は Closes / Refs の自動判定や safety-sensitive guard を持ちますが、parent handoff 情報は扱っていません。

    3. #254 周辺は「未起票」だけでなく body drift 問題に変化している

    #254 は parent_mode: delivery-rollup / closure_mode: child-complete の親 Issue で、child issue をすべて close してから親を close する設計です。本文上では #257, #283, #281, #282, #287, #285, #284, #286 が child として列挙されています。

    一方、#283 の Remaining Parent Gaps には C254-3〜C254-8 がまだ「未起票」として残っています。つまり、現在の問題は単に「child が未起票」ではなく、parent / child / follow-up issue 間で child 状態の記述が同期されない body drift です。

    したがって #299 の Outcome は「ADR child マージ後に残り child を自動提案」だけでは不十分です。最低限、次の2系統を扱う必要があります。

    1. parent body から未 materialize child を検出して作成する
    2. 既に作成済み child がある場合、parent / child body の stale (未起票) 表記を修正する

    4. 既存の script 基盤を使わないのは逆に品質低下

    create_issue_txn.py は、起票、label 付与、parent 抽出、sub-issue 登録、dependency 登録、read-back、partial failure audit を既に持っています。parent body の parent_issue / ## Parent Issue / parent: から親を抽出し、CLI 引数との矛盾を fail-closed する実装もあります。

    さらに sub-issue 登録は REST API の 422 を idempotent に扱い、read-back で親一致を確認する実装になっています。

    GitHub 公式 REST API でも sub-issue の追加は sub_issue_id を body parameter として受け、Issues write 権限が必要です。また同 endpoint は secondary rate limiting の対象になり得ます。よって、LLM が都度 gh api を組み立てるより、既存 transaction helper に寄せるほうが安全です。([GitHub Docs]1)

    推奨する高品質化方針

    #299 は「3ファイル docs-only Issue」から、以下のような child materialization control-plane 改修 Issue に変更すべきです。

    中核: CHILD_MATERIALIZATION_PLAN_V1 を作る

    新規または拡張 script として、まず read-only plan を生成します。

    候補パス:

    .claude/skills/create-issue/scripts/plan_child_materialization.py
    

    出力例:

    CHILD_MATERIALIZATION_PLAN_V1:
      parent_issue: 254
      parent_mode: delivery-rollup
      closure_mode: child-complete
      source:
        kind: parent_body | merged_pr | issue_refinement | speckit_tasks
        ref: "https://github.com/squne121/loop-protocol/issues/254"
      children:
        - child_id: C254-3
          title: "docs: docs/product/game-thesis.md を追加"
          status: existing_issue_found | missing | stale_body_only | ambiguous
          existing_issue_number: 281
          action: reuse_and_update_parent | create_issue | no_op | human_escalation
          dedupe_key: "delivery-rollup:254:C254-3"
      parent_body_updates:
        - replace: "C254-3 ...(未起票)"
          with: "C254-3 ... #281"
      required_issue_creations: []
      required_issue_edits:
        - issue: 254
          reason: "replace stale child placeholder"
      warnings: []

    この plan は mutation しない。mutation は既存の create_issue_txn.py と edit-issue に委ねる。これにより、LLM が巨大な parent body を毎回読んで推論する必要が減ります。

    create-issue に追加すべき責務

    create-issue は child issue 作成の script 正本を既に持っているので、追加するのは「delivery-rollup child plan を受け取る入口」です。

    追加すべき内容:

    - CHILD_MATERIALIZATION_PLAN_V1 の action=create_issue だけを受け取る
    - 各 child に parent_issue を必ず入れる
    - Source セクションに dedupe_key / parent_issue / child_id を入れる
    - create_issue_txn.py で parent read-back / sub-issue read-back まで確認する
    - 既存 issue がある場合は新規作成せず reuse 結果を返す
    

    gh issue create 自体も --body-file を公式にサポートしているため、本文は必ず file 経由にすべきです。既存スキルの body-file 方針とも整合します。([GitHub CLI]2)

    edit-issue に追加すべき責務

    edit-issue は backup / guard / rollback を持っているため、parent body の placeholder 置換に使うべきです。

    追加すべき mode:

    delivery-rollup-parent-update:
      input: CHILD_MATERIALIZATION_PLAN_V1
      allowed mutations:
        - `(未起票)` を `#N` に置換
        - child list status を existing issue に同期
        - stale Remaining Parent Gaps を更新
      forbidden:
        - Outcome / In Scope / AC の意味変更
        - unrelated prose rewrite
    

    この変更により、「起票はされたが本文が未起票のまま」という今回の drift を潰せます。

    issue-refinement-loop に追加すべき責務

    issue-refinement-loop は approve 直前に、対象 Issue が parent_mode: delivery-rollup / closure_mode: child-complete なら plan_child_materialization.py --dry-run 相当を実行すべきです。

    判定:

    if issue_kind == parent
    and parent_mode == delivery-rollup
    and closure_mode == child-complete:
      run CHILD_MATERIALIZATION_PLAN_V1
      if missing children exist:
        either materialize or mark mandatory_follow_up
    

    これを入れないと、Issue 本文をどれだけ refinement しても「child を作る導線」が post-merge まで遅延します。

    impl-review-loop / open-pr / post-merge-cleanup の役割

    impl-review-loop は、child PR の APPROVE 時点で親に未 materialize child が残る場合、mandatory_follow_up として plan を起票・反映する。現行の mandatory_follow_up 前提と合います。

    open-pr は PR 本文に以下を入れる。

    ## Parent Child Materialization
    
    - parent_issue: #254
    - parent_mode: delivery-rollup
    - child_materialization_plan: pass | pending | n/a
    - unresolved_children: C254-3, C254-4

    post-merge-cleanup は merge 後の最終 gate として、linked issue の parent を辿り、parent が delivery-rollup なら child plan を再確認する。ここでは新規発見の follow-up を follow_up_issue_requests に流せます。現行設計と相性があります。

    #299 の修正案

    現行の Allowed Paths は破棄または分割が必要です。私なら #299 を次のように改訂します。

    Allowed Paths:
    - .claude/skills/create-issue/SKILL.md
    - .claude/skills/create-issue/scripts/plan_child_materialization.py
    - .claude/skills/create-issue/tests/test_plan_child_materialization.py
    - .claude/skills/edit-issue/SKILL.md
    - .claude/skills/issue-refinement-loop/SKILL.md
    - .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md
    - .claude/skills/open-pr/SKILL.md
    - .claude/skills/post-merge-cleanup/SKILL.md
    - docs/dev/workflow.md
    - docs/dev/agent-skill-boundaries.md
    

    AC も次に差し替えるべきです。

    - [ ] AC1: `CHILD_MATERIALIZATION_PLAN_V1` の schema が docs/dev/agent-skill-boundaries.md に定義されている
    - [ ] AC2: delivery-rollup parent body から `(未起票)` child / 既存 child / stale child を検出する read-only script が存在する
    - [ ] AC3: script は #254 相当の fixture で C254 child の missing / existing / stale_body_only を分類できる
    - [ ] AC4: create-issue は plan の `create_issue` action を `create_issue_txn.py` 経由で materialize する手順を持つ
    - [ ] AC5: edit-issue は plan の parent body update を backup / guard / rollback 付きで適用する手順を持つ
    - [ ] AC6: issue-refinement-loop は delivery-rollup parent approve 前に child materialization plan を確認する
    - [ ] AC7: impl-review-loop / open-pr / post-merge-cleanup は parent handoff 状態を structured に伝搬する
    - [ ] AC8: LLM が全 child issue body を読む必要がないことを Verification Commands で確認できる

    追加で注意すべき点

    PR #302 により ssot-catalog.md は削除され、docs/dev/ssot-registry.md が唯一の正本になっています。ところが現行 docs/dev/workflow.md にはまだ ssot-catalog.md 更新要求が残っています。#299 で docs/dev/workflow.md を触るなら、この stale 参照を温存してはいけません。

    また #303 で Spec Kit CLI / speckit-* skill が導入され、tasks.md は staging artifact、GitHub Issue materialize 後は archived に降格する方針が明記されています。child materialization の設計は、今後の speckit-taskstoissues 系導線とも同じ plan schema に寄せるべきです。

    Claude Code の subagent は、別コンテキストで作業して要約だけ返すことで main conversation の context を圧迫しない用途に向いています。今回の要件では、subagent に巨大な判断を毎回させるより、script が plan を小さく返し、subagent は mutation の境界だけ担当する設計が合っています。([Claude API Docs]3)

    最終提案

    #299 は現行のままなら 不採択。最低限、Out of Scope の「新しい自動化スクリプトの作成」を削除し、issue-refinement-loop / create-issue / edit-issue / open-pr を In Scope に入れるべきです。

    実装方針は、「各 skill に説明を足す」ではなく、次の1本を中心にしてください。

    plan_child_materialization.py
      → CHILD_MATERIALIZATION_PLAN_V1
      → create_issue_txn.py / edit-issue / open-pr / post-merge-cleanup が消費
    

    これが、トークン削減・コンテキスト最小化・作業品質向上の観点で最も堅いです。

  4. changed the title [-]改善: delivery-rollup parent の ADR child 完了後に残り child を自動提案する handoff 動線を post-merge-cleanup / impl-review-loop に追記する[/-] [+]改善: delivery-rollup parent の child materialization を全 skill 横断で機械的に保証する plan_child_materialization.py を導入する[/+] on May 23, 2026
  5. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    edit-issue: 本文更新 (issue-refinement-loop iteration 1)

  6. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    edit-issue: C4 修正 (issue-refinement-loop iteration 1)

    • 変更: ## Verification Commands の bash ブロック内の全実行コマンド行(AC1〜AC8)に $ prefix を追加
    • 理由: review-issue C4 check(^[\-\$] 始まり行が 1 件以上)への対応
    • 対象行数: 8 行
  7. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop: 完了 (2026-05-23T14:57:33Z)

    • iteration: 2
    • verdict: approve
    • termination_reason: approved

    改善履歴

    iteration 0 (reframe_in_place):

    • anchor_comment (OWNER REQUEST CHANGES): 3ファイルdocs-onlyスコープ → script-first + 全skill横断スコープへ転換
    • title 更新: post-merge-cleanup / impl-review-loop に追記する → plan_child_materialization.py を導入する
    • Allowed Paths: 3 → 10 パスに拡張
    • AC: 4 → 8 項目(CHILD_MATERIALIZATION_PLAN_V1 schema + script + 6 skill)
    • Out of Scope: 「新しい自動化スクリプトの作成」を削除
    • Background: 調査結果(general follow-up は既存、delivery-rollup specific 検出なし)を追記

    iteration 1 (C4 fix):

    • VC コマンド行に $ prefix を追加(review-issue C4 check 対応)

    次アクション

    issue-contract-review を実行して実装着手の preflight を行ってください。

    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      follow_up_issues: []
      note_only_observations: []
  8. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-24T00:00:00Z)

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-05-24T00:00:00Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/299
      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: 6
          vc_passed_unexpectedly: 0
          vc_unrunnable: 1
          classifications:
            - ac: AC1
              command: "rg -n \"CHILD_MATERIALIZATION_PLAN_V1\" docs/dev/agent-skill-boundaries.md"
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC2
              command: "test -f .claude/skills/create-issue/scripts/plan_child_materialization.py && echo \"PASS\" || echo \"FAIL\""
              exit_code: 0
              category: file_not_found_expected
              confidence: high
              evidence:
                stdout_excerpt: "FAIL: script not found"
                stderr_excerpt: ""
              decision: go
            - ac: AC3
              command: "rg -n \"missing|existing|stale_body_only\" .claude/skills/create-issue/scripts/plan_child_materialization.py"
              exit_code: 2
              category: file_not_found_expected
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: "rg: .claude/skills/create-issue/scripts/plan_child_materialization.py: No such file or directory"
              decision: go
            - ac: AC4
              command: "rg -n \"CHILD_MATERIALIZATION_PLAN_V1\\|plan_child_materialization\\|create_issue_txn\" .claude/skills/create-issue/SKILL.md"
              exit_code: 0
              category: expected_baseline_fail
              confidence: medium
              evidence:
                stdout_excerpt: "line 3: ...create_issue_txn.py... (既存機能の参照のみ、CHILD_MATERIALIZATION_PLAN_V1 未存在)"
                stderr_excerpt: ""
              decision: go
            - ac: AC5
              command: "rg -n \"delivery-rollup|placeholder|parent.*update\" .claude/skills/edit-issue/SKILL.md"
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC6
              command: "rg -n \"delivery-rollup|child.*materialization|materialization.*gate\" .claude/skills/issue-refinement-loop/SKILL.md"
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC7
              command: "rg -n \"delivery-rollup\" .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md ..."
              exit_code: 1
              category: expected_baseline_fail
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC8
              command: "git diff --name-only HEAD | grep -v -E ..."
              exit_code: 0
              category: expected_baseline_fail
              confidence: high
              evidence:
                stdout_excerpt: "PASS: Allowed Paths 外の変更なし"
                stderr_excerpt: ""
              decision: go
        ac_verifiability: pass
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings:
        - "AC4 VC は create_issue_txn が既存参照にマッチするため baseline で一部 pass する(VC が緩い)。CHILD_MATERIALIZATION_PLAN_V1 / plan_child_materialization は未存在のため実装は必要"
        - "AC3 VC は対象ファイルが存在しないため rg exit 2(file_not_found)。新規ファイル作成で解消予定"
    • Outcome: plan_child_materialization.py を中核に全 skill 横断で delivery-rollup parent child materialization を機械的に保証する
    • Acceptance Criteria: AC1〜AC8(CHILD_MATERIALIZATION_PLAN_V1 schema 定義、read-only script 作成、テスト、各 SKILL.md 更新、workflow.md 更新)
    • Allowed Paths: .claude/skills/create-issue/SKILL.md, scripts/plan_child_materialization.py, tests/test_plan_child_materialization.py, .claude/skills/edit-issue/SKILL.md, .claude/skills/issue-refinement-loop/SKILL.md, .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md, .claude/skills/open-pr/SKILL.md, .claude/skills/post-merge-cleanup/SKILL.md, docs/dev/workflow.md, docs/dev/agent-skill-boundaries.md
    • Worktree: .claude/worktrees/issue-299-delivery-rollup-parent-child-materializa
    • Branch: worktree-issue-299-delivery-rollup-parent-child-materializa
    • VC preflight: baseline fail = 6, 想定外 pass = 0, 実行不可 = 1(新規ファイル対象のみ、AC3)
  9. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-05-23T15:16:53Z)

  10. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-05-24T00:35:00Z)

    LOOP_STATE:
      issue_number: 299
      contract_snapshot_url: https://github.com/squne121/loop-protocol/issues/299#issuecomment-4525748207
      iteration: 0
      max_iterations: 5
      worktree: .claude/worktrees/issue-299-delivery-rollup-parent-child-materializa
      branch: worktree-issue-299-delivery-rollup-parent-child-materializa
      last_step: judgment
      last_loop_verdict: APPROVE
      blockers_history: []
      external_research_skip_basis: "LOOP_PROTOCOL internal-only変更(docs + script追加のみ、外部API不使用)"
      termination_reason: approved
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      follow_up_issues: []
      note_only_observations: []

    成果物

    ファイル 変更種別
    .claude/skills/create-issue/scripts/plan_child_materialization.py 新規作成
    .claude/skills/create-issue/tests/test_plan_child_materialization.py 新規作成
    docs/dev/agent-skill-boundaries.md CHILD_MATERIALIZATION_PLAN_V1 schema 追加
    .claude/skills/create-issue/SKILL.md child materialization 手順追記
    .claude/skills/edit-issue/SKILL.md delivery-rollup-parent-update mode 追加
    .claude/skills/issue-refinement-loop/SKILL.md approve 前 materialization gate 追加
    .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md mandatory_follow_up 注記追加
    .claude/skills/open-pr/SKILL.md Parent Child Materialization セクション追加
    .claude/skills/post-merge-cleanup/SKILL.md follow_up 自動検出手順追記
    docs/dev/workflow.md delivery-rollup handoff 手順セクション追加
  11. added a commit that references this issue on May 23, 2026
  12. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    implement-issue: fix_delta iteration 1 完了 (2026-05-24T00:42:00Z)

    PR #315 blockers (REQUEST CHANGES) を全て修正しました。

    修正内容

    Blocker 対応
    B1: closed child → ambiguous gh issue view <N> で個別確認、closed → existing_closed
    B2: silent fallback 個別失敗は warning + ambiguous、plan の complete には影響しない
    B3: section scoping なし ## Child Issues ヘッダー境界内のみをパース
    B4: unknown parent_mode のデフォルト仮定 'unknown' を返し、human_escalation に
    B5: schema フィールド欠落 V2 schema 追加: closure_mode, repo, source, issue_lookup.complete 等
    B6: dedupe 検索なし gh issue list --state all --search "<dedupe_key>" で候補取得
    B7: 安全でない string replace line-oriented patch 形式(section, line_number, expected_match_count)
    B8: --body-file で全 ref が ambiguous dry_run 時は existing_unverified に分類
    B9: テスト不足 61 テスト(27 → 61)、regression ケース全網羅

    検証結果

    • pnpm typecheck / pnpm lint / pnpm test / pnpm build: 全 PASS
    • uv run pytest test_plan_child_materialization.py -v: 61/61 PASS
    • AC VC (rg): PASS

    後続: PR レビュー(pr-review-judge)

  13. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-05-24T01:30:00Z)

    LOOP_STATE:
      issue_number: 299
      contract_snapshot_url: https://github.com/squne121/loop-protocol/issues/299#issuecomment-4525748207
      iteration: 2
      max_iterations: 5
      worktree: .claude/worktrees/issue-299-delivery-rollup-parent-child-materializa
      branch: worktree-issue-299-delivery-rollup-parent-child-materializa
      last_step: judgment
      last_loop_verdict: APPROVE
      termination_reason: approved
      blockers_history:
        - iteration: 0
          source: human_review
          blockers:
            - "closed child を ambiguous に誤分類(gh issue view 個別確認に移行)"
            - "silent fallback on lookup failure → fail-closed"
            - "child parser が ## Child Issues 外もスキャン"
            - "parent_mode 欠落時に delivery-rollup を default assumption"
            - "schema V1 が closure_mode 等の必須フィールドを欠く"
            - "dedupe 検索なし"
            - "parent_body_updates が unsafe string replace"
            - "--body-file が issue ref を ambiguous にする"
            - "テストが positive fixture に寄りすぎ"
        - iteration: 1
          source: pr_reviewer
          blockers:
            - "PR 本文に ## Schema Change Applicability 欠落"
            - "PR 本文に ## Safety Claim Matrix 欠落"
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      follow_up_issues: []
      note_only_observations: []

    成果物サマリ

    ファイル 変更種別
    .claude/skills/create-issue/scripts/plan_child_materialization.py 新規作成(V2、61 pytest PASS)
    .claude/skills/create-issue/tests/test_plan_child_materialization.py 新規作成(adversarial tests 含む)
    docs/dev/agent-skill-boundaries.md CHILD_MATERIALIZATION_PLAN_V2 schema 正本
    .claude/skills/create-issue/SKILL.md V2 materialize 手順追記
    .claude/skills/edit-issue/SKILL.md line-oriented patch mode 追加(V2)
    .claude/skills/issue-refinement-loop/SKILL.md approve 前 gate 追加(V2)
    .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md mandatory_follow_up 注記(V2)
    .claude/skills/open-pr/SKILL.md Parent Child Materialization セクション(V2)
    .claude/skills/post-merge-cleanup/SKILL.md follow_up 自動検出手順(V2)
    docs/dev/workflow.md delivery-rollup handoff 手順(V2)
  14. added a commit that references this issue on May 23, 2026
  15. squne121 commented on May 23, 2026

    @squne121
    OwnerAuthor

    post-merge-cleanup: 完了 (2026-05-24T02:00:00Z)

    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      follow_up_issues: []
      note_only_observations: []

    実行済みアクション

    アクション 結果
    git pull origin main PASS(c0ec6c4 に fast-forward)
    git worktree remove .claude/worktrees/issue-299-* 既に削除済み
    git branch -d worktree-issue-299-* 削除完了(83dd520)
    parent #254 クローズ判定 keep_open(open child: #281/#282/#283/#284/#285/#286/#287 が残存)
    superseded PR なし
    follow_up_issue_requests なし
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/implementerenhancementphase/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions