Skip to content

実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406

Closed as not planned

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: >-
  Consume Issue #387's scope_collision_check/v1 evidence in the
  issue-refinement-loop so path overlap alone is not converted into an
  implementation stop, while confirmed semantic conflict, hard predecessor,
  and actual Git conflict retain their distinct routes.
change_kind: workflow-routing

Parent Issue

none (standalone workflow correction)

Depends On

Parent Goal Ref

Current Validated Scope

Remaining Parent Gaps

Background

Outcome

The issue-refinement-loop consumes #387 evidence so a path-only overlap proceeds with recorded coordination, semantic non-conflict records edit_intent and non_conflict_reason then proceeds, and only confirmed contradiction, hard predecessor, or actual Git conflict receives its distinct safe route.

Runtime Verification Applicability

  • decision: not_applicable
  • reason: This consumer change is verified by deterministic fixture-driven routing tests and controlled GitHub dependency transaction tests; it does not require a live runtime canary.

In Scope

  • Add a narrow 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387 evidence-consumer route in issue-refinement-loop planning/routing code and fixture tests.
  • Preserve scope_collision_check/v1 fields as opaque producer input.
  • For C1/path-only overlap and established semantic non-conflict, retain related_issue, overlapping_paths, edit_intent, and non_conflict_reason in the issue/work record and continue.
  • For a confirmed semantic contradiction, route to OWNER judgment without inferring or mutating a dependency.
  • For a confirmed hard predecessor, first reframe the current Issue with the counterpart and concrete ordering evidence, then use the existing controlled native_relationships / issue_relationship.update route to set blockedBy, read back both body and native dependency, and stop before implementation.
  • For an actual Git conflict or PR mergeable: CONFLICTING / merge_state_status: DIRTY, preserve owner-coordinated resolution without converting it into a semantic dependency.

Out of Scope

  • Implementing, changing, or duplicating 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387's scope_collision_check/v1 producer/schema.
  • Path-overlap-only hard stops or automatic semantic C1/C3 classification.
  • Bulk edits to existing Issue dependencies.
  • Changes to implementation templates, PR templates, command registry, structural repair consumer, or authorization infrastructure.
  • Live runtime mutation canaries, credential changes, or permission broadening.

Acceptance Criteria

  • AC1: A path/Allowed-Paths overlap alone is routed as proceed/coordinate evidence and never unconditionally blocks implementation.
  • AC2: A semantic non-conflict records edit_intent and non_conflict_reason with the related Issue/PR and proceeds.
  • AC3: A confirmed semantic contradiction routes to OWNER judgment without automatic native dependency mutation.
  • AC4: A confirmed hard predecessor first updates the current Issue body through a controlled transaction, then sets and reads back the native blockedBy relation through the existing controlled executor, and stops before code implementation.
  • AC5: An actual Git conflict routes to owner-coordinated resolution without being reclassified as a semantic dependency.
  • AC6: The implementation consumes 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387 evidence without changing its producer/schema and adds no ledger, persistent state, generic broker, or unconditional shared-file stop.
  • AC7: Fixture tests cover C1 proceed, semantic non-conflict proceed, semantic contradiction OWNER route, hard-predecessor body/native-dependency route, and actual-Git-conflict owner route.

Verification Commands

# AC1
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/ -k "scope_collision_path_only" -v
# AC2
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/ -k "scope_collision_non_conflict" -v
# AC3
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/ -k "scope_collision_semantic_contradiction" -v
# AC4
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/ -k "scope_collision_hard_predecessor" -v
# AC5
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/ -k "scope_collision_actual_git_conflict" -v
# AC6
$ rg -n "scope_collision_check/v1" .claude/skills/issue-refinement-loop/SKILL.md
# AC7
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/ -k "scope_collision" -v

Allowed Paths

  • .claude/skills/issue-refinement-loop/SKILL.md
  • .claude/skills/issue-refinement-loop/scripts/plan_refinement_loop.py
  • .claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py
  • .claude/skills/issue-refinement-loop/scripts/decide_next_loop_action.py
  • .claude/skills/issue-refinement-loop/tests/

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387's producer schema, enum, or evidence semantics must change.
  • A new generic ledger, persistent state, command broker, authorization infrastructure, or automatic semantic classifier is required.
  • A semantic contradiction cannot be represented as OWNER judgment, or a hard predecessor cannot use the existing controlled body/native-dependency transaction.
  • Actual Git conflict resolution requires discarding another work item, secret/credential changes, or permission escalation.

Required Skills

  • Python
  • pytest fixture design

Required Design References

Scope Delta(任意)

N/A

Delivery Rule

1 Issue = 1 PR. Do not start implementation until #387 is merged and the current Issue has been revalidated against its produced evidence. Any confirmed hard predecessor must be materialized through the controlled Issue body plus native blockedBy transaction before stopping; path overlap alone is not a stop condition.

Activity

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

    @squne121
    OwnerAuthor

    結論

    Verdict: CLOSE / NOT_PLANNED (superseded / absorbed) を推奨します。
    REQUEST_CHANGES して #2406 を実装可能な形へ直すより、#2406 自体を実装しない方が current main と現在の owner policy に整合しています。

    最大の理由は単純です。#2406 は「#387 が生成する scope_collision_check/v1 を consume する」ことを中心契約にし、#387 merge 後まで実装開始禁止としています。ところが #387 は 2026-09-02 に not_planned で close されました。#2406 は現在も OPEN のままです。

    しかも単なる依存先消滅ではありません。#1680 は既に machine-readable に issue_387.decision: supersede を記録し、PR #1794 は declared_path_overlap を advisory-only として実装済みです。さらに後発の #1860 → #1869 → merged PR #1871 は、semantic planning / overlap / contract artifact を通常作業の blocking authority から外し、実 Git conflict と target PR の mergeability を主要な実競合 hard stop にする minimal-harness 方針まで進めています。

    敵対的レビュー

    優先度 | Finding | 評価 -- | -- | -- P0 | 存在しない producer を必須依存にしている | #2406 は scope_collision_check/v1 の opaque consumer を要求しますが、#387 は not-planned。current main の scope_collision_check 検索も実装ではなく stale な docs/comment しか返しません。これは実装前提が崩壊しています。 P0 | 現在の minimal-harness 方針を逆行する | #2406 は path overlap → semantic classification → routing の専用 consumer を production path に新設します。しかし #1869/PR #1871 はこの種の overlap/planning artifact を blocking authority から撤去済みです。新 consumer は、削った control-plane を別名で戻す危険があります。 P0 | AC4 は後発の一般解でほぼ吸収済み | #2406 の hard-predecessor → body/native blockedBy materialization は、#2435 / merged PR #2447 が 全 production refinement lane 共通の Step 5 choke point として実装済みです。#2406 専用経路を追加する設計よりこちらが明らかに優れます。 P1 | AC1/AC2 も専用 consumer を必要としない | current workflow はすでに C1 を着手可として、related_issue / overlapping_paths / edit_intent / non_conflict_reason の記録を定義しています。既存 create-issue helper も同じ情報を advisory evidence として扱っています。 P1 | AC5 はより正確な実観測へ既に移行している | ファイル名 overlap と Git conflict は別物です。現在の repository policy も SHA-bound Git conflict / GitHub merge readiness を別 observer としています。#2406 の scope-collision fixture に実 Git conflict を同居させる責務分割は悪いです。 P1 | #2457 まで stale dependency cascade を作っている | OPEN #2457 は「#2406 が merge された後に #2406 専用 hard-predecessor lane を choke point に接続する」Issueです。#2406 を維持すると、存在しない lane のためにさらに Issue を blocked 状態で保持します。 P2 | Verification が dead harness を生む | pytest -k scope_collision_* や rg scope_collision_check/v1 を達成するには、obsolete な語彙と fixture suite を新設する必要があります。製品品質ではなく「古い Issue を green にするためのテスト」になります。#2406 の AC/VC 自体が sunk-cost 化しています。 P2 | repo に stale reference が残っている | workflow.md と check_issue_overlap.py に「#387 merge 後に共有」という記述がまだ残ります。これは #387 復活の根拠ではなく、削除すべき migration debt です。

    特に時系列が問題です。PR #1871 は 2026-07-31 に merge されているのに、#2406 は 2026-08-29 に作成されています。つまり #2406 は単に古い Issue が放置されたのではなく、すでに minimal-harness 化された main に対して古い設計モデルを再導入してしまった Issue です。

    Web調査から見ても、専用 machinery は不要

    GitHub CLI は現在 gh issue view --json blockedBy,blocking を正式に提供し、gh issue edit には --add-blocked-by / --remove-blocked-by / --add-blocking が存在します。GitHub REST API にも issue dependency の read/add endpoint が正式にあります。つまり dependency materialization のために本文 grep や新規 broker/schema を増やす理由はさらに減っています。(GitHub CLI)

    逆に inventory を使うなら注意点があります。gh issue list の --limit は default 30 です。したがって「OPEN Issue 全件から collision を分類する」producer を再導入すると、明示 pagination/completeness を入れない限り 31 件目以降を静かに落とします。これは元 #387 の設計が持っていた false-green リスクでもあり、そもそも全件 inventory を production prerequisite にしない現在の方針の方が個人開発には適しています。(GitHub CLI)

    実競合については git merge-tree --write-tree が適切です。これは index/worktree を変更せず実際の three-way merge、rename detection、file/directory conflict 等を評価し、通常モードでは clean=exit 0、conflict=exit 1 です。単なる changed-file overlap より圧倒的に意味のある観測です。(Git)

    GitHub 側も mergeable と mergeStateStatus は別フィールドです。mergeable=CONFLICTING は merge conflict、mergeStateStatus=DIRTY は clean merge commit を作れない状態です。一方 BEHIND、BLOCKED、DRAFT、UNKNOWN などはそれ自体を Git conflict と扱うべきではありません。PR #1871 の実装方針は GitHub の正式なモデルと一致しています。(GitHub Docs)

    推奨アクション

    1. 実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 は not planned / superseded で close。scope_collision_check/v1 consumer、専用 schema adapter、専用 scope_collision_* fixture は作らない。close 根拠は #1680 / PR #1794 → #1860 / #1869 / PR #1871 と、hard-dependency 部分を吸収した #2435 / PR #2447 が妥当です。

    2. 実装: issue-refinement-loop の #2406 confirmed-hard-predecessor 経路を dependency-materialization choke point に配線する #2457 も再 refinement。その Outcome は「実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 専用 lane が共通 choke point を使うこと」なので、実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 が消えれば前提が消えます。現在の Step 5 共通 gate で目的が満たされているなら not planned が妥当です。

    3. 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387 stale references だけを掃除。docs/dev/workflow.md と check_issue_overlap.py の「実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387 merge 後に…」を current architecture に合わせて削除/修正する程度で十分です。これを新しい大規模 Issue にする必要もありません。

    4. ISSUE_EXECUTION_DECISION_V1 を新たな必須 downstream gate にしない。既存 schema/validator は残してよいですが、実装: semantic planning・overlap・contract artifactのblocking authorityを撤去する #1869/PR 実装: semantic planning・overlap・contract artifactのblocking authorityを撤去する #1871 の minimal-harness 方針に従い、通常実装を止める新しい required consumer に昇格させない方がよいです。semantic coordination の記録が必要なら既存 coordinates 等を advisory/record として利用するだけで足ります。current main には既に relation schema と validator が存在します。

    5. hard stop は 実 Git conflict、target PR の明示的 conflict、実 test/CI/review failure、protected path・credential・destructive Git 等の既存実安全境界に寄せる。これは「セキュリティをなくす」のではなく、推測的 harness と実際の故障/安全境界を分離する設計です。導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 の個人趣味開発向け minimal-harness 方針とも一致します。

    要するに、#2406 を高品質化する方法は、#2406 をうまく実装することではありません。#2406 が想定していた責務を current main の既存経路へ帰属させ、obsolete な consumer を消すことです。 今の状態なら、追加コードより Issue graph と stale reference の整理の方が品質・有用性ともに高いです。

    ## 結論

    Verdict: CLOSE / NOT_PLANNED (superseded / absorbed) を推奨します。
    REQUEST_CHANGES して #2406 を実装可能な形へ直すより、#2406 自体を実装しない方が current main と現在の owner policy に整合しています。

    最大の理由は単純です。#2406 は「#387 が生成する scope_collision_check/v1 を consume する」ことを中心契約にし、#387 merge 後まで実装開始禁止としています。ところが #387 は 2026-09-02 に not_planned で close されました。#2406 は現在も OPEN のままです。

    しかも単なる依存先消滅ではありません。#1680 は既に machine-readable に issue_387.decision: supersede を記録し、PR #1794 は declared_path_overlap を advisory-only として実装済みです。さらに後発の #1860 → #1869 → merged PR #1871 は、semantic planning / overlap / contract artifact を通常作業の blocking authority から外し、実 Git conflict と target PR の mergeability を主要な実競合 hard stop にする minimal-harness 方針まで進めています。

    敵対的レビュー

    優先度 Finding 評価
    P0 存在しない producer を必須依存にしている #2406 は scope_collision_check/v1 の opaque consumer を要求しますが、#387 は not-planned。current main の scope_collision_check 検索も実装ではなく stale な docs/comment しか返しません。これは実装前提が崩壊しています。
    P0 現在の minimal-harness 方針を逆行する #2406 は path overlap → semantic classification → routing の専用 consumer を production path に新設します。しかし #1869/PR #1871 はこの種の overlap/planning artifact を blocking authority から撤去済みです。新 consumer は、削った control-plane を別名で戻す危険があります。
    P0 AC4 は後発の一般解でほぼ吸収済み #2406 の hard-predecessor → body/native blockedBy materialization は、#2435 / merged PR #2447 が 全 production refinement lane 共通の Step 5 choke point として実装済みです。#2406 専用経路を追加する設計よりこちらが明らかに優れます。
    P1 AC1/AC2 も専用 consumer を必要としない current workflow はすでに C1 を着手可として、related_issue / overlapping_paths / edit_intent / non_conflict_reason の記録を定義しています。既存 create-issue helper も同じ情報を advisory evidence として扱っています。
    P1 AC5 はより正確な実観測へ既に移行している ファイル名 overlap と Git conflict は別物です。現在の repository policy も SHA-bound Git conflict / GitHub merge readiness を別 observer としています。#2406 の scope-collision fixture に実 Git conflict を同居させる責務分割は悪いです。
    P1 #2457 まで stale dependency cascade を作っている OPEN #2457 は「#2406 が merge された後に #2406 専用 hard-predecessor lane を choke point に接続する」Issueです。#2406 を維持すると、存在しない lane のためにさらに Issue を blocked 状態で保持します。
    P2 Verification が dead harness を生む pytest -k scope_collision_* や rg scope_collision_check/v1 を達成するには、obsolete な語彙と fixture suite を新設する必要があります。製品品質ではなく「古い Issue を green にするためのテスト」になります。#2406 の AC/VC 自体が sunk-cost 化しています。
    P2 repo に stale reference が残っている workflow.md と check_issue_overlap.py に「#387 merge 後に共有」という記述がまだ残ります。これは #387 復活の根拠ではなく、削除すべき migration debt です。

    特に時系列が問題です。PR #1871 は 2026-07-31 に merge されているのに、#2406 は 2026-08-29 に作成されています。つまり #2406 は単に古い Issue が放置されたのではなく、すでに minimal-harness 化された main に対して古い設計モデルを再導入してしまった Issue です。

    Web調査から見ても、専用 machinery は不要

    GitHub CLI は現在 gh issue view --json blockedBy,blocking を正式に提供し、gh issue edit には --add-blocked-by / --remove-blocked-by / --add-blocking が存在します。GitHub REST API にも issue dependency の read/add endpoint が正式にあります。つまり dependency materialization のために本文 grep や新規 broker/schema を増やす理由はさらに減っています。([GitHub CLI]1)

    逆に inventory を使うなら注意点があります。gh issue list の --limit は default 30 です。したがって「OPEN Issue 全件から collision を分類する」producer を再導入すると、明示 pagination/completeness を入れない限り 31 件目以降を静かに落とします。これは元 #387 の設計が持っていた false-green リスクでもあり、そもそも全件 inventory を production prerequisite にしない現在の方針の方が個人開発には適しています。([GitHub CLI]2)

    実競合については git merge-tree --write-tree が適切です。これは index/worktree を変更せず実際の three-way merge、rename detection、file/directory conflict 等を評価し、通常モードでは clean=exit 0、conflict=exit 1 です。単なる changed-file overlap より圧倒的に意味のある観測です。(Git)

    GitHub 側も mergeable と mergeStateStatus は別フィールドです。mergeable=CONFLICTING は merge conflict、mergeStateStatus=DIRTY は clean merge commit を作れない状態です。一方 BEHIND、BLOCKED、DRAFT、UNKNOWN などはそれ自体を Git conflict と扱うべきではありません。PR #1871 の実装方針は GitHub の正式なモデルと一致しています。([GitHub Docs]4)

    推奨アクション

    1. 実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 は not planned / superseded で close。scope_collision_check/v1 consumer、専用 schema adapter、専用 scope_collision_* fixture は作らない。close 根拠は #1680 / PR #1794 → #1860 / #1869 / PR #1871 と、hard-dependency 部分を吸収した #2435 / PR #2447 が妥当です。
    2. 実装: issue-refinement-loop の #2406 confirmed-hard-predecessor 経路を dependency-materialization choke point に配線する #2457 も再 refinement。その Outcome は「実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 専用 lane が共通 choke point を使うこと」なので、実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 が消えれば前提が消えます。現在の Step 5 共通 gate で目的が満たされているなら not planned が妥当です。
    3. 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387 stale references だけを掃除。docs/dev/workflow.md と check_issue_overlap.py の「実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387 merge 後に…」を current architecture に合わせて削除/修正する程度で十分です。これを新しい大規模 Issue にする必要もありません。
    4. ISSUE_EXECUTION_DECISION_V1 を新たな必須 downstream gate にしない。既存 schema/validator は残してよいですが、実装: semantic planning・overlap・contract artifactのblocking authorityを撤去する #1869/PR 実装: semantic planning・overlap・contract artifactのblocking authorityを撤去する #1871 の minimal-harness 方針に従い、通常実装を止める新しい required consumer に昇格させない方がよいです。semantic coordination の記録が必要なら既存 coordinates 等を advisory/record として利用するだけで足ります。current main には既に relation schema と validator が存在します。
    5. hard stop は 実 Git conflict、target PR の明示的 conflict、実 test/CI/review failure、protected path・credential・destructive Git 等の既存実安全境界に寄せる。これは「セキュリティをなくす」のではなく、推測的 harness と実際の故障/安全境界を分離する設計です。導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 の個人趣味開発向け minimal-harness 方針とも一致します。

    要するに、#2406 を高品質化する方法は、#2406 をうまく実装することではありません。#2406 が想定していた責務を current main の既存経路へ帰属させ、obsolete な consumer を消すことです。 今の状態なら、追加コードより Issue graph と stale reference の整理の方が品質・有用性ともに高いです。

  3. squne121 commented on Sep 2, 2026

    @squne121
    OwnerAuthor

    推奨は、#2406 を実装可能な形へ修正するのではなく、superseded_by_decision として not_planned close まで issue-refinement-loop で完了させることです。#2406 の中心前提は #387 の scope_collision_check/v1 producer ですが、#387 は実際に not_planned で close 済みです。 また、現行 loop は OWNER の anchor comment が close / replace / 前提不採用を明示したケースを superseded_by_decision として扱う正規ルートを持っています。

    さらに PR #2447 は merged 済みで、hard dependency materialization の共通 Step 5 choke point を既に実装しています。 一方 #2457 は現在も OPEN で、明示的に「#2406 マージ後」を前提にしているため、#2406 の loop 内へ無理に取り込まず、#2406 close 後に別の refinement 対象とするのが適切です。

    Claude Code へは以下をそのまま渡すのを推奨します。

    対象:
    #2406 (comment)

    この OWNER comment を operator_asserted_human_context として扱い、Issue #2406 に対して issue-refinement-loop を実行してください。

    目的

    この作業では、Issue #2406 を無理に implementation-ready にすることを目的としません。

    anchor comment が提示している

    という判断を current main / GitHub live state に対して fact-check し、妥当なら canonical superseded_by_decision 経路で #2406 を not_planned close するところまで完了してください。

    scope_collision_check/v1 consumer、専用 adapter、専用 scope_collision_* fixture を「Issue 本文の AC を満たすためだけ」に新設してはいけません。

    承認方針

    この依頼を、issue-refinement-loop の通常作業を最後まで継続するための事前承認として扱ってください。

    • iteration ごとの人間承認は要求しない。
    • GitHub / repository の read、必要な controlled Issue mutation、comment 投稿、state 更新など、この refinement を完了するために通常必要な操作について「実行してよいですか」と再確認しない。
    • OWNER anchor comment 自体が今回の human decision/context である。同じ判断を再度 OWNER に尋ねない。
    • routine / retryable な失敗を human approval request に変換しない。bounded retry や既存 deterministic repair route があるなら自動で使う。
    • ただし Claude Code 自体の permission mode を変更することとは別問題である。--dangerously-skip-permissions 等をこの作業のためだけに勝手に導入せず、repository の canonical executor / configured permissions を使う。
    • genuine に anchor comment・repo evidence・既存 policy のいずれからも決定できない新しい semantic decision が発生した場合だけ human escalation を許容する。単なる「確認したい」は停止理由にしない。

    canonical entry

    まず issue-refinement-loop skill をロードし、root checkout / current default branch を確認してください。

    anchor URL は unlabeled / agent-report lane ではなく、必ず human-context lane として投入してください。

    canonical preflight は repository の command registry / skill 記載を優先し、現在の main が以下の profile を保持している場合はこれを使用してください。

    uv run --locked python3 scripts/agent-guards/skill_runtime_exec.py \
      --command-id preflight.run.with_human_context \
      --issue-number 2406 \
      --repo squne121/loop-protocol \
      --anchor-comment-url https://github.com/squne121/loop-protocol/issues/2406#issuecomment-5508750406

    main が更新されて command registry が変化している場合は、古い argv を強制せず current issue-refinement-loop / ISSUE_REFINEMENT_COMMAND_REGISTRY_V1 を SSOT としてください。

    SubAgent 必須

    Step 1 では codebase-investigator SubAgent を必ず使用してください。

    最低限、次を read-only で検証させてください。

    1. 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387 の現在の state / state_reason と、実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 の producer dependency が成立しているか。
    2. 実装: issue-contract-review を fresh structural gate に縮小し、OPEN PR の実編集競合のときだけ停止させる #1680 / PR 実装: issue-contract-review を fresh structural gate に縮小し declared_path_overlap(advisory)を追加する #1794 が declared_path_overlap を advisory-only とした現在の実装・契約。
    3. 導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 / 実装: semantic planning・overlap・contract artifactのblocking authorityを撤去する #1869 / merged PR 実装: semantic planning・overlap・contract artifactのblocking authorityを撤去する #1871 が semantic planning / path-overlap machinery を通常実装の blocking authority から外した、という anchor comment の主張。
    4. 実装: issue-refinement-loop の hard dependency を GitHub native blockedBy に materialize / readback する #2435 / merged PR feat: issue-refinement-loop に native dependency の producer/materializer choke point を追加する #2447 が hard dependency の native blockedBy materialization/readback を共通 Step 5 choke point として実装済みか。
    5. 実装: issue-refinement-loop の #2406 confirmed-hard-predecessor 経路を dependency-materialization choke point に配線する #2457 が 実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 の実装・merge を前提としており、実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 supersede 時に前提を失うか。
    6. docs/dev/workflow.md および関連 overlap helper に 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387 前提の stale reference が本当に残っているか。
    7. current main に scope_collision_check/v1 production consumer / producer が実在するのか、それとも stale reference のみなのか。
    8. 実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 の Outcome を in-place rewrite してなお独立した有用な implementation Issue として維持する理由が残っているか。

    SubAgent に mutation はさせないでください。

    SubAgent 完了待ち

    SubAgent を background で起動した場合も、起動しただけで次の phase へ進んではいけません。

    • 明示的に join / wait する。
    • completion notification を受け取る。
    • SubAgent の最終結果を取得する。
    • evidence / unresolved risks / recommended classification を main thread が consume する。

    その後にだけ final classification へ進んでください。

    「バックグラウンドタスクの完了通知を待ちます」と表示してそのターンを終了することは禁止します。
    started SubAgent が存在する限り、その完了を現在のセッション内で待ってください。

    SubAgent 自身に nested SubAgent delegation はさせないでください。

    planner が web_research_policy を required とした場合は web-researcher SubAgent も起動し、同様に完了まで必ず wait/join してください。required でなければ今回の anchor に書かれた外部調査を形式的に再実行する必要はありません。

    refinement routing

    SubAgent の fact-check と canonical planner/reviewer の結果を使用し、prose で独自 routing を再実装しないでください。

    今回期待している primary route は:

    OWNER human-context anchor
      → fact-check
      → final_classification: superseded_by_decision
      → close / replacement flow
      → Issue #2406 state=closed, state_reason=not_planned
      → termination_reason: superseded_by_decision
    

    です。

    ただし current live evidence が anchor comment の dispositive claim を否定した場合は、差分を具体的 evidence とともに扱ってください。古い anchor の結論を機械的に強制してはいけません。

    #2406 を supersede できる場合

    fact-check が anchor comment を支持した場合:

    1. 実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 に scope_collision_check/v1 consumer を実装しない。
    2. Issue 本文を「実装可能にするため」に大規模 rewrite しない。
    3. obsolete AC/VC を green にするための fixture / adapter / broker / schema を作らない。
    4. repository の canonical controlled Issue mutation 経路を使って 実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 を close する。
    5. GitHub が state reason をサポートする経路では not_planned を使用する。
    6. mutation 後に fresh readback を行い、少なくとも以下を確認する。
    Issue: #2406
    state: closed
    state_reason: not_planned
    
    1. canonical termination publisher が必要なら concise な termination summary を投稿する。既存 anchor comment の長文を重複転載しない。
    2. termination_reason は canonical policy に従い superseded_by_decision とする。

    #2457 の扱い

    #2457 は重要ですが、#2406 の issue-refinement-loop の実装スコープへ混ぜないでください。

    #2406 の close が完了した後、

    を read-only で確認し、termination summary の recommended next action として

    #2457 を別の issue-refinement-loop で再 refinement し、前提消滅が確認できれば not_planned/superseded を検討

    と明示してください。

    #2406 の loop から勝手に #2457 の body/state を mutation しないでください。
    別 Issue の mutation が必要なら別 canonical refinement run として扱います。

    stale reference の扱い

    docs/dev/workflow.md や check_issue_overlap.py 等に #387 の stale reference が確認できても、今回の #2406 refinement の名目で production code/docs を直接編集しないでください。

    それらは migration debt / cleanup candidate として具体的な path と内容を termination summary に残してください。

    既存 Issue/PR がその cleanup をすでに所有している場合はそれを示してください。
    所有先がなくても、この run で新規 Issue を無条件に作る必要はありません。

    禁止事項

    完了条件

    最終回答を返す前に、起動した全 SubAgent が完了していることを確認してください。

    最終報告には最低限以下を含めてください。

    Result:
    Issue #2406:
    Final classification:
    Termination reason:
    GitHub state:
    GitHub state reason:
    Anchor fact-check:
    SubAgents:
    - codebase-investigator: completed / result
    - web-researcher: completed|not-required / result
    
    Implementation created for #2406: yes/no
    Issue body rewritten: yes/no
    PR created: yes/no
    
    #2457 current status:
    Recommended next action for #2457:
    
    Stale references found:
    - <path>: <summary>
    
    Unresolved blockers:
    

    superseded_by_decision が確定し #2406 が closed / not_planned になった時点で、この refinement は成功です。
    implementation-ready 化や PR 作成は成功条件ではありません。

    この形なら、「承認なし」= review iteration のたびにユーザーへ戻さないことを明示しつつ、Claude Code の permission bypass と混同しません。現行 issue-refinement-loop 自体も iteration approval は既定で不要と定義しています。

    また、#2457 まで同一 loop で変更させないのがポイントです。まず #2406 の graph 上の意味を確定・close し、その結果を入力として #2457 を別 refinement する方が、1 Issue = 1 responsibility を維持できます。

  4. squne121 commented on Sep 2, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop: superseded_by_decision

    Stale reference(migration debt、cleanup 候補・所有先なし)

    Recommended next action for #2457

    Issue #2457(現在 OPEN、#2406 を confirmed-hard-predecessor として前提化)は、本 Issue の close により前提を失う可能性がある。#2406 の scope へは混ぜず、別の issue-refinement-loop 実行で #2457 を再 refinement し、前提消滅が確認できれば not_planned/superseded を検討することを推奨する。PR #2447 の共通 Step 5 gate で目的が既に吸収されている可能性がある。

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/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions