Skip to content

導入: OPEN Issue 重複・依存順・実装優先順位判定を issue-refinement-loop に一元化する #1674

Closed as not planned
7 of 7 issues completed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: parent
goal_ref: "OPEN Issue間のsemantic relation(重複・依存順・実装優先順位)判定をissue-refinement-loopの唯一のauthorityに一元化し、downstream skill(impl-review-loop・issue-contract-review・implement-issue・open-pr)はsemantic reclassificationを行わず、handoff artifactのfreshnessとGit/PRの実観測(commit生成後のpairwise merge競合、target PRのGitHub mergeability)だけを検証する設計へ揃える"
change_kind: workflow
parent_mode: "delivery-rollup"
closure_mode: "child-complete"

Summary

現状、OPEN Issue間の「重複」「依存順」「実装優先順位」の判定責務が issue-refinement-loop(scope rollup preflight)・impl-review-loop(preparation Step 2.5 の scope-rollup-runner 再実行)・implement-issue(check_implementation_overlap.py による OPEN Issue全件再検査)・issue-contract-review(#387 の重複分類)に分散している。この結果、人間が impl-review-loopで対象Issueの実装を明示指示した後になって、downstream側が「他のIssueと実装領域が被っている」「どちらを先に実行すべきか」を改めて言い出す構造になっており、人間から見て指示した実装が始まらない・後退する体験になっている。本Issueは、この判定責務の再集約を行う delivery-rollup parent trackerである。

初版(2026-07-23 起票)は OWNER レビュー(anchor comment、2026-07-23、REQUEST_CHANGES)により、「意味的な計画判断の一元化」「判断結果のfreshness再検証」「Git/PR上の実競合観測」の3つを混同していると指摘された。本改訂はその指摘(P0-1〜P0-5、P1-1〜P1-4、P2-1〜P2-3)を反映する。

Goal

  • issue-refinement-loopを、OPEN Issue間のsemantic relation(重複・吸収候補・依存順・実装優先順位)判定の唯一のauthority(planning SSOT)にする。impl-review-loop開始前にこの判定は完了している前提とする
  • downstreamはsemantic relationを再分類しない。ただし、downstreamは各実行地点で以下をfreshに検証する責務を持つ:
    • handoff artifactのfreshness(body hash・updated_at・base SHA・policy version・source completeness・digest)
    • commit生成後のpairwise Git merge競合(git merge-tree 相当の3-way merge simulation。changed-file名の重複ではない)
    • target PRのGitHub mergeability(mergeable/mergeStateStatus を正しく区別)
  • drift・stale・not_evaluable・unknown を検知した場合、downstreamは独自判断でcontinueせず、issue-refinement-loopへrerouteする
  • one decision authority(issue-refinement-loop), multiple freshness/safety observers(downstream各skill) という責務分離を確立する

Desired Destination

  • ISSUE_EXECUTION_DECISION_V1(下記 schema 参照)が、Issue relationをversioned graphとして表現し、issue-refinement-loopのplannerからLOOP_STATE・handoff・termination reportまで同一digestで到達している状態
  • docs/dev/scope-rollup-policy.md または同等のSSOT docsと docs/dev/workflow.md が、「semantic relation判定はissue-refinement-loopが唯一のauthority」「downstreamはfreshness/実観測のみ検証」という方針を明記した状態
  • issue-contract-review が fresh structural gate(テンプレート・Allowed Paths・VC・dependency・worktree・branch命名衝突・artifact freshness確認)に縮小され、実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387 のsemantic分類ロジックが supersede されているか issue-refinement-loop側 producer へ rehome されている状態
  • impl-review-loop の Step 2.5(scope-rollup-runner経由の重複再判定)が撤去され、issue-refinement-loopのhandoff判定をconsumeするだけになっている状態(PR feat(codex): scope-rollup-runner native agentを追加 (#1671) #1685 の Codex scope-rollup-runner dispatch 機能の扱いが明示決定されている前提)
  • implement-issue の check_implementation_overlap.py によるOPEN Issue全件再検査が撤去され、target-issue executorへ縮小されている状態(実装: overlap preflight の共有スキーマ誤検知を防止する #1652 のprovenance/classifier改善が新producerへ移植されているか、#1652自体がsupersedeされている前提)
  • open-pr の hard gate(overlap evidence必須・digest検証・オンライン再実行・fail-closed)が、旧evidenceから新 ISSUE_EXECUTION_DECISION_V1 へ dual-write → dual-read → cutover → cleanup の順で移行され、移行期間中もPR publicationが意図せず停止・bypassされない状態
  • 対象branch/head が未作成の contract-review 時点では declared_path_overlap(advisory)、commit/PR時点の実Git競合は pairwise_merge_conflict(blocking)として明確に二層化されている状態

Current Validated Scope

対象スキルとその該当箇所は repo 内に実在することを確認済み:

  • .claude/skills/issue-refinement-loop/scripts/plan_issue_scope_rollup.py(ISSUE_SCOPE_ROLLUP_DECISION_V2を記録するscope rollup preflight)
  • .claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py(target Issue snapshot・planner input・refinement resultのみ永続化。scope-rollup artifactの明示フィールドを持たない)
  • .claude/skills/issue-refinement-loop/scripts/build_loop_state.py・schemas/loop_state.schema.json(additionalProperties: false、現行4種のdecisionのみ投影)
  • .claude/skills/impl-review-loop/steps/preparation.md(Step 2.5のscope-rollup-runner経由preflight再実行)
  • .claude/skills/implement-issue/(check_implementation_overlap.pyによるOPEN Issue全件検査)
  • .claude/skills/issue-contract-review/(template・Allowed Paths・VC・dependency・worktree・branch collisionチェック。#387のsemantic分類ロジックを含む)
  • .claude/skills/open-pr/scripts/open_pr.py 相当(linked Issueがphase/implementationならoverlap evidence必須・digest検証・check_implementation_overlap.pyオンライン再実行・fail-closed のproduction hard gate)

本parent Issue自体は実装変更を行わない。実装・docs変更はすべて子Issueで行う。

Decisions Fixed

Quality Decision Record

  • Status: N/A
  • Decision Date: 未記録
  • Does this prove the parent goal complete?: N/A
  • Reason: delivery-rollup parentのためchild issue rollup完了で判定する(quality-gateではない)
  • Evidence: N/A
  • Next Action: 子Issue(Child Issuesセクション参照)のPhase A〜E順での改訂・起票・実装・マージ

Parent Closure Rule

  • delivery-rollup: Child Issuesセクションに列挙するすべての子Issueがクローズ(実装Issueはマージ済みPRでクローズ)され、かつ Acceptance Criteria の end-to-end AC(AC5〜AC9)がmain上でPASSした時点で本parent Issueをクローズする
  • quality-gate: N/A(本parentはquality-gateではない)
  • routing-map: N/A(本parentはrouting-mapではない)
  • decision-log: N/A(本parentはdecision-logではない)
  • quality-gate parentではないためQuality Decision Recordはクローズ判定の必須材料にしない

Child Issues

Phase A — 契約固定(着手済み子Issue全件の再改訂が前提)

Phase B — producerとhandoff

  • 実装: issue-refinement-loop planner に execution_priority と relation_summary を追加する #1677 issue-refinement-loopのplannerに ISSUE_EXECUTION_DECISION_V1(relationをversioned graph化。単数の relation_summary/selected_predecessor から変更)を追加し、run_refinement_preflight.py・build_loop_state.py・loop_state.schema.json・LOOP_HANDOFF_RESULT_V1・termination report producer/parser・downstream consumer inventoryをAllowed Pathsに含めるよう改訂が必要(1に依存。P0-3対応)

Phase C — consumer migration

Phase D — 実競合detector(新規子Issueが必要。起票は Phase A〜C の契約確定後)

  • (未起票)target head生成後のpairwise merge simulation・head/base SHA binding・rename/delete/file-directory conflict fixture・mergeable/mergeStateStatusのfail-closed retry routing を実装する子Issueを、Phase A〜C の契約確定後に起票する

Phase E — cleanup(新規子Issueが必要。Phase D完了後)

  • (未起票)legacy OPEN Issue enumerationの削除・old evidence schemaの廃止・docsの最終authority切替・end-to-end regressionを実施する子Issueを、Phase D完了後に起票する

Remaining Parent Gaps

Phase Handoff Contract

  • Desired Destination: 本IssueのDesired Destinationをそのまま各子IssueのBackgroundに転記する
  • Current Validated Scope: 各子Issueが対象とするskill・docsパスのみをindividual child issueのIn Scopeにnarrowする(Phase B以降はAllowed Pathsを downstream配線ファイル群まで拡張する)
  • Remaining Parent Gaps: 本IssueのRemaining Parent Gapsを参照し、子Issue完了後も残るgapを明記する
  • Current Objective: 子IssueごとのOutcomeに記載
  • Bounded Current Context: 本IssueのSummary・Goal・Decisions Fixedを子IssueのBackgroundに要約引用
  • Normative References: docs/dev/scope-rollup-policy.mdまたは実在パス・docs/dev/workflow.md・.claude/skills/issue-refinement-loop/SKILL.md・.claude/skills/impl-review-loop/steps/preparation.md・.claude/skills/issue-contract-review/SKILL.md・.claude/skills/implement-issue/・.claude/skills/open-pr/
  • Allowed Paths: 各子Issueが対象とするskill・docsの完全パスに限定
  • Required Skills: 子Issue起票時に該当ドメイン知識スキルのみ記載(ワークフローskillは記載しない)
  • Validation Commands: 子Issueごとにrg・pytest等の単一コマンドで記載
  • Stop Conditions: implementation.ymlの6定型項目を子Issueごとに具体化
  • Open Questions: 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387/実装: overlap preflight の共有スキーマ誤検知を防止する #1652/PR #1685の処置は各該当子Issueで確定するまでOpen(Notes for Reviewer参照)
  • Next Action: 各子Issueの改訂・起票・実装・マージ(Phase A〜E順)
  • Artifact Refs: 本parent Issue URL
  • Handoff Prompt Draft: 子Issue起票時にimpl-review-loopを人間が発火する想定を明記
  • Linked PR: 各実装子Issueのマージ済みPR

Allowed Paths

本 parent issue は Allowed Paths を持たない。実装・docs 変更はすべて子Issue(Child Issues 参照)側の Allowed Paths に従う。

Acceptance Criteria

  • AC1: Child Issuesセクション(Phase A〜C の既起票5件)が、本改訂の反映要求(P0-1〜P0-5対応)を含む形で改訂され、本Issue本文からIssue番号でリンクされている
  • AC2: 本Issue本文のDecisions Fixedに「semantic relationの再分類禁止」と「handoff artifact freshness / pairwise Git merge競合 / GitHub mergeability(mergeableとmergeStateStatusを区別)の各observer責務」が明記されている
  • AC3: 各子Issueが本Issueへのdepends on関係で本Issueと相互リンクされている(子Issue本文側で確認)
  • AC4: 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387・実装: overlap preflight の共有スキーマ誤検知を防止する #1652・PR feat(codex): scope-rollup-runner native agentを追加 (#1671) #1685 の処置(supersede/rehome/migration先)が該当子Issue本文に機械可読な形で記録されている
  • AC5: ISSUE_EXECUTION_DECISION_V1 artifactが、refinement producerからLOOP_STATE・handoff・impl-review-loop・implement-issue・open-prまで同一digestで到達することがproduction testで確認されている(Phase B〜C完了後)
  • AC6: downstreamがOPEN Issue一覧を取得してrelationを再分類しないことがproduction testで確認されている(Phase C完了後)
  • AC7: Issue body更新・新規dependency・新規OPEN Issue/PR・PR force-push・base SHA更新の各ケースでartifactがstaleになりrefinementへrerouteされることが確認されている(Phase C完了後)
  • AC8: 同一ファイルの別hunkを変更するPRがchanged-file overlapだけでhard blockされないこと、rename/delete/binary/file-directory conflictがmerge simulationで正しくblockされることがfixtureで確認されている(Phase D完了後)
  • AC9: legacy期間中もPR publicationが意図せず停止・bypassされないことがopen-pr側のdual-write/dual-read移行テストで確認されている(Phase C〜E)
  • AC10: Phase D・E の子Issueが起票され、本Issue Child Issuesセクションに追記されている
  • AC11: 5件(Phase A〜C)+Phase D・E の全子Issueがクローズ(実装Issueはマージ済みPRでクローズ)され、AC5〜AC9のend-to-end scenarioがmain上でPASSした時点で本parent Issueがクローズ可能な状態になっている

Verification Commands

parent tracker のため各 VC は field 出力を human/reviewer が目視確認する placeholder とする。

# AC1
# baseline-expect: pass
# preflight-scope: pr_review_only
$ gh issue view 1674 --repo squne121/loop-protocol --json body --jq '.body'
# AC2
# baseline-expect: pass
# preflight-scope: pr_review_only
$ gh issue view 1674 --repo squne121/loop-protocol --json body --jq '.body'
# AC3
# baseline-expect: pass
# preflight-scope: pr_review_only
$ gh issue view 1675 --repo squne121/loop-protocol --json body --jq '.body'
# AC4
# baseline-expect: fail
# preflight-scope: pr_review_only
$ gh issue view 1680 --repo squne121/loop-protocol --json body --jq '.body'
# AC10
# baseline-expect: fail
# preflight-scope: pr_review_only
$ gh issue view 1674 --repo squne121/loop-protocol --json body --jq '.body'
# AC11
# baseline-expect: fail
# preflight-scope: pr_review_only
$ gh issue view 1674 --repo squne121/loop-protocol --json state --jq '.state'

Notes

停止条件(本Issue自体は実装を行わないため子Issue起票・改訂時の停止条件を記録する):

  • 子Issueのスコープ分割が技術的に成立しない(1つのスキルへの変更が他スキルの契約を同時に壊すため分離不能)と判明した場合は、統合案を人間に提示してから起票する
  • 子Issue改訂・起票中に既存OPEN Issueとの重複が検出された場合は、重複統合の3択(追記・統合しクローズ・scopeが異なるため新規起票)を人間に提示してから進める
  • 子Issueの実装がSSOTの他docs(docs/dev/workflow.md等)の既存契約と矛盾する場合は、矛盾解消の方針を人間に確認してから実装を進める
  • 子IssueのAC・VCが曖昧化し検証不能になる場合は起票を中止し、具体化案を提示する
  • 5件(Phase A〜C)のうち1件でもhuman_judgment・needs_fixのcontract review結果が反復して解消しない場合は、人間に判断を仰ぐ
  • 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387・実装: overlap preflight の共有スキーマ誤検知を防止する #1652・PR feat(codex): scope-rollup-runner native agentを追加 (#1671) #1685 の処置方針が該当子Issueで確定しないまま Phase D・E の子Issueを起票しない

Notes for Reviewer:

Sub-issues

Sub-issues

7 of 7 Issues completed
Loading 7 sub-issues

Activity

  1. added
    tracking
    state/in-progress
    on Jul 22, 2026
  2. squne121 commented on Jul 23, 2026

    @squne121
    OwnerAuthor

    判定

    REQUEST_CHANGES — 方向性は妥当ですが、現行契約のままでは実装開始不可です。

    「OPEN Issue間の意味的な重複・依存順・優先順位を一度だけ決める」という設計は正しいです。しかし #1674 は、次の三つを混同しています。

    1. 意味的な計画判断を一元化すること
    2. 判断結果のfreshnessを後続工程で再検証すること
    3. Git/PR上の実競合を観測すること

    結果として、既存のfail-closed gateを先に撤去し、代替artifactが後続skillへ届かない設計になっています。さらに「実編集競合」の検出方法が実際にはchanged-file名の重複であり、Gitのmerge conflict判定ではありません。親Issue自体にはコメントがなく、この設計上の未決事項に対するOWNER判断も記録されていません。


    重大な指摘

    P0-1: #1680 の「実編集競合」は、実際にはファイル名の重複判定です

    #1680 は、対象IssueのAllowed PathsとOPEN PRのchanged filesが重なれば parallel_change_conflict として停止する設計です。しかし、想定されている gh pr diff --name-only はdiffから変更ファイル名を列挙するだけです。GitHub CLIの実装も、raw diffの diff --git headerを正規表現で抽出しているだけで、3-way merge、hunk競合、rename/delete競合などは評価しません。

    この判定には、少なくとも次の誤りがあります。

    • 同一ファイルの別hunkを編集する二つのPRを、実競合として誤停止する
    • 異なるファイル間のAPI/schema不整合や生成物競合を見逃す
    • rename/delete、file/directory、binary、submodule conflictを正しく扱えない
    • 対象Issueのbranch/headがまだ存在しないcontract-review時点では、そもそも二つのcommit treeをmerge simulationできない

    Gitの実競合を判定するなら、対象branchにcommitが存在した後、合意したbase/head SHAを固定して git merge-tree --write-tree 相当の3-way mergeを実行する必要があります。このコマンドは実際のmergeと同様にcontent merge、rename detection、file/directory conflict、複数merge-base処理を行い、clean/conflictingをexit statusで区別します。

    したがって #1680 は、次の二層に分割すべきです。

    • Issue/contract時点: declared_path_overlap。planning evidenceであり、単独ではblockingにしない
    • commit/PR時点: pairwise_merge_conflict。対象head・相手head・merge baseを固定したGit merge simulation

    現在の #1680 のAC3は、「実編集競合」という名称に反してchanged-path overlapしか証明しません。


    P0-2: CONFLICTING と DIRTY は同一フィールドの値ではありません

    #1674、#1675、#1676は「PRのmergeable状態がCONFLICTINGまたはDIRTY」と記述しています。しかしGitHubのデータモデルでは別フィールドです。

    • mergeable: MERGEABLE | CONFLICTING | UNKNOWN
    • mergeStateStatus: CLEAN | DIRTY | BEHIND | BLOCKED | DRAFT | HAS_HOOKS | UNSTABLE | UNKNOWN

    リポジトリ内の LOOP_VERDICT_V2 schema自体はこの区別を正しく持っています。ところがStep 5の表とproduction routerは、CONFLICTING を merge_state_status の値としても受け入れており、既にsplit-brainが存在します。

    GitHub公式のenumも両者を明確に分離しています。さらにREST APIの mergeable は計算中に null を返し、その場合は再取得が必要です。 ([GitHub Docs]1)

    正しい契約は次です。

    target_pr.mergeable == CONFLICTING
    OR
    target_pr.merge_state_status == DIRTY
    

    加えて、UNKNOWN / RESTの null はcleanとして扱わず、bounded retry後に indeterminate またはhuman escalationへ倒す必要があります。

    より重要なのは、あるOPEN PRが自身のbase branchに対して CONFLICTING / DIRTY であることは、そのPRと未来の対象branchが互いに競合する証明ではないことです。GitHubのmergeabilityは各PRとそのbaseのtest mergeを評価するものであり、任意の二つのOPEN PR間のpairwise conflictではありません。 ([GitHub Docs]2)


    P0-3: #1677 の出力は downstream handoff まで到達しません

    #1677 は plan_refinement_loop.py に以下を追加するとしています。

    • relation_summary
    • execution_priority
    • selected_predecessor
    • defer_reason
    • impl_execution_policy

    しかし現行の実行経路には、scope-rollup出力をrefinement plannerへ自動的に結合するproducer/joinがありません。run_refinement_preflight.py が永続化するのは、target Issue snapshot、planner input、refinement resultだけです。fixture input schemaもIssue、comments、任意の known_context までで、完全取得したOPEN Issue/PR inventoryやscope-rollup artifactの明示フィールドを持ちません。

    その後の経路も未対応です。

    • build_loop_state.py は現行4種のdecisionだけを必須化・投影する
    • LOOP_STATE_V1 は additionalProperties: false
    • LOOP_HANDOFF_RESULT_V1 もstrict schema
    • termination rendererはhandoff schemaをacceptance boundaryとして検証する

    したがってplanner JSONにフィールドを足すだけでは、後続skillが読むartifactには入りません。

    #1677 のAllowed Pathsには、少なくとも次が不足しています。

    • run_refinement_preflight.py
    • build_loop_state.py
    • loop_state.schema.json の明示的変更
    • loop_handoff_result_v1.json
    • termination report producer/parser
    • downstream consumer inventoryとcompatibility tests

    また、relation_summary と selected_predecessor が単数なのも不十分です。一つのIssueは複数Issueに対して異なるrelationを持ち、複数predecessor、cycle、coordination edgeを持ち得ます。必要なのは単数のsummaryではなく、versioned relation graphです。

    ISSUE_EXECUTION_DECISION_V1:
      repository: squne121/loop-protocol
      policy_version: scope-rollup/v3
      target:
        issue_number: 1674
        body_sha256: "sha256:..."
        updated_at: "..."
      source:
        generated_at: "..."
        base_sha: "..."
        open_issue_collection_complete: true
        open_issue_snapshot_sha256: "sha256:..."
      relations:
        - issue_number: 1652
          relation: depends_on
          evidence: [...]
        - issue_number: 1680
          relation: coordination_required
          evidence: [...]
      execution:
        state: selected | deferred | blocked | duplicate
        predecessors: []
        defer_reason: null
      downstream_policy:
        semantic_reclassification: forbidden
        freshness_validation: required
        stale_action: rerun_issue_refinement

    P0-4: #1679 は open-pr のhard gateを破壊します

    #1679 は check_implementation_overlap.py の呼び出しを削除またはno-op化しますが、open-pr skillとの契約修正を明示的にOut of Scopeにしています。

    一方、現行 open_pr.py は次を強制しています。

    • linked Issueが phase/implementation ならoverlap evidenceを省略不可
    • stored evidenceのdigestを検証
    • check_implementation_overlap.py をオンラインで再実行
    • fresh decision_inputs_sha256 とstored valueを比較
    • unsafe route、source incomplete、driftをfail-closed

    これは単なる文書上のconsumerではなく、PR作成直前のproduction hard gateです。

    したがって #1679 だけを実装すると、二択になります。

    • scriptを削除してPR作成が常時失敗する
    • no-op producerで既存hard gateを形骸化させる

    どちらも受け入れ不能です。#1679には open-pr migrationを含める必要があります。少なくとも移行期間は次の順序が必要です。

    1. 新しい ISSUE_EXECUTION_DECISION_V1 をupstreamでdual-write
    2. open-pr を旧evidence/new artifactのdual-readにする
    3. new artifactのfreshness/readbackをproductionで検証
    4. authorityを新artifactへ切り替える
    5. 最後に check_implementation_overlap.py の全件列挙を削除

    P0-5: #387 を残すと、issue-contract-reviewが第二のplanning authorityになります

    #387 は、issue-contract-review内でOPEN implementation Issueを列挙し、Allowed Paths overlap、dependency relation、C0/C2a/C2b等を分類し、その結果を CONTRACT_REVIEW_RESULT_V1 とstatus判定に組み込む設計です。過去の敵対的レビューでも、「standalone helperではなくpreflight gateへmaterializeすべき」と明示されています。

    #1680 は、#387とはデータソースが異なるため統合せず、#387のマージ状況を確認して直列化するとしています。これは #1674 の「relation/priority判定はissue-refinement-loopだけ」というGoalと両立しません。

    #387は次のどちらかにすべきです。

    • supersede: #1674に吸収してcloseする
    • rehome: classifierとprovenance logicをissue-refinement-loop側producerへ移し、issue-contract-reviewは生成済みartifactのfreshnessだけを検証する

    #387をそのままマージしてから #1680 で「OPEN Issue重複は見ない」と変更するのは、短期間に同じskillへ相反するauthorityを導入・撤去する無駄な系列です。


    追加のrelease blocker

    P1-1: 「再判定禁止」と「freshness検証禁止」を混同しています

    semantic relationの再分類をdownstreamで禁止するのは妥当です。しかし、upstream artifactが現在も有効かどうかはdownstreamで検証しなければなりません。

    既存の open-pr hard gateは、Issue body、label、候補Issue、dependencyがevidence収集後に変化するTOCTOUを受けて追加されています。#1458は、これをatomic保証ではなく「mutation直前のbounded freshness gate」と明確に位置づけています。PR #1467もcallerによる省略を許さないhard gateとして実装しました。

    正しい責務分離は次です。

    • issue-refinement-loop: semantic classificationを行う唯一のauthority
    • downstream: semantic classificationを再実行しない
    • downstream: repository、Issue番号、body hash、updated_at、base SHA、policy version、source completeness、artifact digestを検証する
    • drift時: 独自判断でcontinueせず、issue-refinement-loopへrerouteする

    つまり、one decision authority, multiple freshness/safety observers が必要です。


    P1-2: 現在OPENのPR #1685が、#1676の停止基準の反例になっています

    OPEN Draft PR #1685は、#1676が削除対象とする preparation.md のStep 2.5に、Codex custom named agent dispatchを追加しています。PRは現在open、draft、mergeableです。

    #1676はそのStep 2.5全体を削除・consume-only化します。

    これは重要な反例です。

    • #1685は現在 mergeable: true
    • それでも #1685が追加する機能を#1676が削除する
    • merge順やrebase後のpatch形状によっては、Git conflictなしで機能が消える可能性もある
    • つまり CONFLICTING / DIRTY だけではsemantic/destructive coordination conflictを検出できない

    #1676には、少なくとも #1671 / PR #1685とのmachine-readable dependencyとmigration decisionが必要です。

    • #1685を先にマージするのか
    • Codex runnerを別stepへ移すのか
    • #1685をsupersedeするのか
    • Step 2.5削除後もrunner capabilityを保持するのか

    現在の #1676 にはこの判断がありません。


    P1-3: #1652を完成させた後にcheckerを削除する計画は、作業を無駄にします

    #1652は check_implementation_overlap.py のschema token provenance、false-positive抑制、true-positive recall、固定fixtureを改善するIssueです。詳細レビューではconsumer inventoryとadditive evidence fieldsまで要求されています。

    一方、#1679は「#1652を先にマージした後、同checkerによる全件再検査を撤去する」としています。

    妥当な選択肢は二つだけです。

    • #1652のprovenance/classifier部分を新しいupstream planning producerに移植する
    • #1652を#1674でsupersedeし、不要な実装を開始しない

    「精度を上げてから削除」は避けるべきです。


    P1-4: 子Issueの分割順序では一時的なsplit-brainが必ず発生します

    現在の順序は概ね次です。

    1. 実装: scope-rollup-policy を停止系SSOTから実行優先順位を選ぶplanning SSOTへ再定義する #1675 docsでauthorityを変更
    2. 実装: issue-refinement-loop planner に execution_priority と relation_summary を追加する #1677 planner fieldを追加
    3. 実装: issue-contract-review を fresh structural gate に縮小し、OPEN PR の実編集競合のときだけ停止させる #1680 contract-reviewを変更
    4. 実装: impl-review-loop preparation から scope rollup preflight(Step 2.5)を除去し、issue-refinement-loop の判定を再実行しない #1676 downstream再実行を削除
    5. 実装: implement-issue / open-pr の production path から peer OPEN Issue overlap preflight を撤去する #1679 checkerを削除

    しかし、各PRを単独でmerge可能にするcompatibility contractがありません。

    • #1675はdocs-onlyで、production behaviorは変わらない
    • #1677はhandoffに届かない
    • #1680は新checkを追加するがproducer/consumer契約が不完全
    • #1676は既存のscope-rollup runtimeを先に消し得る
    • #1679はopen-prのproduction dependencyを残したままcheckerを消す

    #1677自身も、#1675への依存を「望ましいが並行可能」としており、親Issueの順序契約と一致しません。さらに、24件のOPEN IssueとのAllowed Paths overlapを「関心事が別」とだけ判断し、実際のOPEN PR/head/patchとの照合を行っていません。

    docs-firstではなく、schema・dual-write・dual-read・cutover・cleanup の順に変更すべきです。


    品質・運用上の不足

    P2-1: OPEN PR inventoryの完全性契約がありません

    #1680は gh pr list 相当を想定していますが、取得件数、base filter、pagination、draft、fork、current/target PRの除外、totalCount照合をACに持ちません。

    gh pr list の既定limitは30件です。--limit を明示しない実装は、31件目以降のOPEN PRを黙って見落とします。 ([GitHub CLI]3)

    exact executorには最低限、次が必要です。

    • --state open
    • 対象base branchの明示
    • draftを候補に含めるかのpolicy
    • target Issue自身に紐づくPRの識別
    • fork PRのhead repository/head SHA
    • paginationまたは明示limitとtotalCount cross-check
    • complete: true|false
    • inventory digest
    • 各PRのhead/base SHA
    • force-push後のinvalidation
    • partial/timeout/auth/rate-limit時のfail-closed

    P2-2: Acceptance Criteriaがintegrationを証明していません

    親Issueのclosureは、5子Issueがcloseされたことしか要求しません。したがって、各PRが個別にmergeされてもartifactが一度もend-to-endでconsumedされていない状態で親をcloseできます。

    個別にも不足があります。

    • #1675はgrepによる文言存在確認だけ

    • #1680は「テストで確認」としつつVerification Commandsはほぼ rg

    • #1680は CONTRACT_REVIEW_RESULT_V1.checks へのfield追加をIn Scopeにしながら、schema/key変更が必要ならStop Conditionという自己矛盾を持つ

    • #1676は文言不在確認中心で、既存artifact consumerが壊れないことを検証しない

    • #1679はopen-pr pathがAllowed Paths外


    P2-3: workflow metadataが既にdriftしています

    #1680の作成transactionでは phase/contract-review labelが存在せず、label適用がpartial failureになっています。現在のIssueは triage-required を持ったままです。phase labelやIssue kindをcandidate selectionに使う設計である以上、このtaxonomy driftは先に解消すべきです。


    推奨する再設計

    1. planning decisionとruntime observationを分離する

    Planning artifact

    • Issue relation graph
    • execution selection
    • predecessor/defer decision
    • duplicate/absorb/supersede decision
    • policy version
    • source completeness
    • target Issue body hash
    • collection digest

    Runtime observations

    • handoff artifact freshness
    • local main/worktree dirty state
    • target branch/head SHA
    • pairwise git merge-tree result
    • target PRの mergeable / mergeStateStatus
    • CI/schema/runtime compatibility

    Issue relationはupstreamだけが決めますが、runtime observationsは各実行地点でfreshに取得します。


    2. 子Issueを次の順序に変更する

    Phase A — 契約固定

    Phase B — producerとhandoff

    • scope-rollup inventoryをrefinement planner inputへ結合
    • plannerからLOOP_STATE、handoff、termination reportまで投影
    • dual-writeで旧/new artifactを併存

    Phase C — consumer migration

    • issue-contract-review: structural check + artifact freshnessのみ
    • impl-review-loop: new handoffをconsume
    • implement-issue: target-only化
    • open-pr: new artifactをdual-readし、freshness hard gateを維持

    Phase D — 実競合detector

    • target head生成後にpairwise merge simulation
    • head/base SHA binding
    • rename/delete/file-directory conflict fixtures
    • Git/ghのminimum versionまたはfeature probe
    • unknown/partial/errorのfail-closed routing

    Phase E — cleanup

    • legacy OPEN Issue enumerationを削除
    • old evidence schemaを廃止
    • docsを最終authorityへ切り替え
    • end-to-end regressionを通して親Issueをclose

    #1675のdocs authority切替はPhase Aの「将来契約記載」か、Phase Eのproduction cutover時に移すべきです。


    親Issueに追加すべき必須AC

    少なくとも以下を親closure gateに追加すべきです。

    1. Artifact propagation: refinement producerが出したexecution decisionが、LOOP_STATE、handoff、impl-review-loop、implement-issue、open-prまで同一digestで到達する。

    2. No semantic reclassification: downstreamがOPEN Issue一覧を取得してrelationを再分類しないことをproduction testで確認する。

    3. Freshness: Issue body更新、新規dependency、新規OPEN Issue、新規OPEN PR、PR force-push、base SHA更新の各ケースでartifactがstaleになり、refinementへrerouteされる。

    4. Same-file non-conflict: 同一ファイルの別hunkを変更するPRはchanged-file overlapだけでhard blockしない。

    5. Real Git conflicts: rename/delete、binary、file/directory conflictがmerge simulationでblockされる。

    6. Not evaluable: 対象branch/head未作成時は clean ではなく not_evaluable とし、declared overlapをadvisoryに限定する。

    7. GitHub mergeability: mergeable=UNKNOWN、REST mergeable=null、mergeStateStatus=UNKNOWN がretry後にfail-closedとなる。

    8. Inventory completeness: 31件以上のOPEN PR fixtureでも完全取得を証明する。

    9. Open-pr compatibility: legacy gateが存在する期間、新旧いずれの経路でもPR publicationが意図せず停止・bypassされない。

    10. feat(codex): scope-rollup-runner native agentを追加 (#1671) #1685 migration: Codex scope-rollup-runner capabilityを削除するのか移設するのかが明示され、対応するfixture/E2E testがある。

    11. Parent closure: 子Issueのcloseだけでなく、上記end-to-end scenarioがmain上でPASSしたことを必須化する。


    最終結論

    #1674の中心思想は採用できます。

    OPEN Issue間のsemantic relationとexecution priorityはissue-refinement-loopだけが決める。

    ただし、停止条件は次のように修正すべきです。

    downstreamはsemantic relationを再判定しない。一方で、handoff artifactのfreshness、local/worktree safety、commit生成後のpairwise Git conflict、target PRのGitHub mergeabilityは各工程でfreshに検証する。artifactがstaleまたは検証不能なら、独自にcontinueせずissue-refinement-loopへrerouteする。

    現状のままでは、#1680がfalse-positive detectorになり、#1677のdecisionがhandoffに届かず、#1679がopen-pr hard gateを破壊し、#387が第二のplanning authorityとして残ります。

    #1675のdocs変更や#1679のchecker撤去には着手せず、まず親Issue、#1677、#1680、#1679の契約を改訂し、#387・#1652・PR #1685の処置をmachine-readableに確定するべきです。

  3. squne121 commented on Jul 30, 2026

    @squne121
    OwnerAuthor

    #1860 の owner decision(2026-07-30)により、semantic planning・overlap・contract artifactを通常作業のblocking authorityから撤去する方針が確定しました。本Issueの「semantic relationをissue-refinement-loopの唯一のauthorityにする」方向はこの方針と逆行するため、実装child #1869(Part of #1860)の完了後に close/supersede を判断します。

    Part of #1860 / see also #1869

  4. squne121 commented on Jul 30, 2026

    @squne121
    OwnerAuthor

    実装child #1869 の PR #1871 が merge-ready になりました(CI全green、独立レビューAPPROVE)。本Issueの close/supersede 判断は #1871 マージ後に行います。

    Part of #1860 / see #1871

  5. squne121 commented on Jul 30, 2026

    @squne121
    OwnerAuthor

    実装child #1869 のPR #1871(Closes #1869)の状態を更新します。

    現状(2026-07-30 時点): head fa1fe901f405520c92331e2dce65b8b8624b7f7c、CI 16/16 pass、mergeable: MERGEABLE、mergeStateStatus: CLEAN、独立レビュー APPROVE・merge_ready: true(Draft のまま、人間マージ待ち)。

    過去のコメントで参照していた head cc756328 は初回実装時点のものです。その後、人間レビューで REQUEST_CHANGES(production router の mergeable/merge_state_status 分離不足等)を受けて fix_delta を適用し、途中で main 進行による実 Git conflict(route_loop_verdict_v2.py、Issue #1856 由来)を通常のマージで解消した上で、現在の head に至ります。

    本 Issue の scope 判定は PR #1871 の「Related / superseded Issues」節を正とします(詳細は #1871 参照)。PR merge 後、残存 scope の有無を再確認した上で close 可否を判断してください。

  6. squne121 commented on Jul 31, 2026

    @squne121
    OwnerAuthor

    実装child #1869(PR #1871, MERGED, merge commit c3cbc0dd, 2026-07-31T10:56:41Z)により、本Issueが要求していた「OPEN Issue間のsemantic relation判定をissue-refinement-loopの唯一のauthorityへ一元化する」方向は、#1860 owner decision(意味判断・計画順序を新たな閉じた状態機械へ変換しない)と逆行するため、その通りには実装されませんでした。代わりにPR #1871は、semantic planning/scope-rollup/overlap判定の blocking authority を全面的に撤去し、実Git conflict・target PR mergeability(mergeable==CONFLICTING または merge_state_status==DIRTY)のみをhard stopとして残す方向で確定しています。

    native sub-issueの処理状況:

    全descendantのdispositionが確定したため、本Issue自体を「semantic planning authorityの一元化」という元の目的がowner decisionと逆行することを理由にsuperseded closeします。#1679の残存scopeは本Issueのclose後も独立Issueとして引き続き追跡されます。#1860 Closure Matrix参照。

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

    state/in-progresstracking

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions