Repository navigation
Closed
Labels
agent/implementerAI implementer agentarea/ai-opsAI operations and agent tooling areaenhancementNew feature or requestphase/implementationImplementation phaseworkflowWorkflow / skill automation changes
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "title keyword search だけに依存しない duplicate / overlap preflight を標準化する"
change_kind: workflowParent Issue
none
Parent Goal Ref
- Goal: issue 起票前に title / goal / allowed paths / labels / parent refs を見て duplicate / overlap / human escalation を機械判定できるようにする。
- Desired Destination: create-issue flow が Allowed Paths overlap と parent child collision を deterministic に分類できる。
Current Validated Scope
- overlap preflight script を追加する。
- create-issue skill からこの preflight を参照する。
- tests と workflow docs を追加する。
Remaining Parent Gaps
なし
Outcome
title / goal / allowed paths / labels / parent issue refs を使って duplicate, overlap_requires_comment, safe_new_issue, ambiguous_requires_human を返す overlap preflight helper と tests / docs が 1 PR で追加され、delivery-rollup child 起票でも child 同士の Allowed Paths overlap を起票前に検査できる状態。
In Scope
- overlap preflight script の追加(
ISSUE_OVERLAP_PREFLIGHT_RESULT_V1を返す)。 - title / goal_ref / Allowed Paths / labels / parent issue refs / dependency refs を実際の判定に使う。
- GitHub full-text search false positive の本文 read-back 除外。
- GitHub source(search / read-back)失敗・partial・saturation の fail-closed(
ambiguous_requires_human)。 decisionの closed enum を workflow.md の Scope Collision Classification(C0/C1/C2a/C2b/C3)へ mapping。- child 同士の Allowed Paths overlap 検査(fixture-only)。
- create-issue skill と docs への導線追加(実行手順・停止条件・証跡保存先・advisory 境界を含む)。
Out of Scope
- create_issue_txn body normalizer。
create_issue_txn.pyの mutation hard gate 配線(follow-up issue で扱う。本 PR は advisory)。- 実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387
scope_collision_checkとの正規化関数共有(実装: issue-contract-review に scope_collision_check を JSON / script-first で追加する #387 は OPEN。マージ後に follow-up で寄せる)。 - 実装: delivery-rollup child materialization を create_issue_txn 正規フローへ統合する #946
CHILD_MATERIALIZATION_PLAN_V2の完全 consume(child overlap は fixture-only に限定)。 - worklog summarize。
- hook / rtk boundary enforcement。
Acceptance Criteria
- AC1: title / goal / allowed paths / labels / parent issue refs を使って overlap verdict を返せる。
- AC2: verdict は
duplicate,overlap_requires_comment,safe_new_issue,ambiguous_requires_humanの closed enum を返す。 - AC3: GitHub full-text search の false positive を issue body read-back で除外できる。
- AC4: delivery-rollup parent の child 起票では child 同士の Allowed Paths overlap も検査できる。
- AC5: create-issue skill と workflow docs から preflight が参照される。
- AC6: GitHub source(search / read-back)の失敗・partial・saturation を fail-closed (
ambiguous_requires_human)にし、source_statusを出力する。safe_new_issueは source 成功かつ overlap 0 のときだけ返す。 - AC7: path normalization が numbered list / 連続 slash / trailing slash directory /
**glob / segment 境界 / duplicate collapse を扱う。 - AC8: 出力は
ISSUE_OVERLAP_PREFLIGHT_RESULT_V1(schema_version/reason_code/policy_class/source_status/candidates[].matched_fields/comment_template)で、policy_classは C0/C1/C2a/C2b/C3 へ mapping し、CLI の検索 query 生成は決定的(PYTHONHASHSEED 非依存)。goal_ref/labels/parent_refs/ dependency を実判定に使う。 - AC9: child overlap は fixture-only で、lookup 不完全 / ambiguous child / child_plan source 失敗を fail-closed(
ambiguous_requires_human)にする。
Verification Commands
# AC1
uv run python3 -m pytest tests/create-issue/test_issue_overlap_cli.py -q
# AC2
uv run python3 -m pytest tests/create-issue/test_issue_overlap_verdicts.py -q
# AC3
uv run python3 -m pytest tests/create-issue/test_issue_overlap_false_positive.py -q
# AC4
uv run python3 -m pytest tests/create-issue/test_issue_overlap_delivery_rollup.py -q
# AC5
rg -n "check_issue_overlap" .claude/skills/create-issue/SKILL.md docs/dev/workflow.md
# AC6
uv run python3 -m pytest tests/create-issue/test_issue_overlap_source_status.py -q
# AC7
uv run python3 -m pytest tests/create-issue/test_issue_overlap_paths.py -q
# AC8
uv run python3 -m pytest tests/create-issue/test_issue_overlap_semantics.py tests/create-issue/test_issue_overlap_cli_determinism.py -q
# AC9
uv run python3 -m pytest tests/create-issue/test_issue_overlap_child_plan.py -qAllowed Paths
.claude/skills/create-issue/scripts/check_issue_overlap.py.claude/skills/create-issue/SKILL.mdtests/create-issue/test_issue_overlap_cli.pytests/create-issue/test_issue_overlap_verdicts.pytests/create-issue/test_issue_overlap_false_positive.pytests/create-issue/test_issue_overlap_delivery_rollup.pytests/create-issue/test_issue_overlap_source_status.pytests/create-issue/test_issue_overlap_paths.pytests/create-issue/test_issue_overlap_semantics.pytests/create-issue/test_issue_overlap_cli_determinism.pytests/create-issue/test_issue_overlap_child_plan.pytests/fixtures/create-issue/allowed-paths.txtdocs/dev/workflow.md
Runtime Verification Applicability
decision: not_applicable
reason: "preflight helper / tests / docs 更新であり、interactive runtime の証跡を成功条件に含まない"Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- overlap verdict を deterministic な closed enum に落とせないことが判明した場合
Required Skills
なし
Scope Delta(任意)
N/A
Delivery Rule
1 Issue = 1 PRで完了する。- Draft PR を既定とする。
- verdict の closed enum と false-positive 除外 read-back を同じ helper に閉じる。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentarea/ai-opsAI operations and agent tooling areaenhancementNew feature or requestphase/implementationImplementation phaseworkflowWorkflow / skill automation changes
Activity
squne121 commentedon Jun 17, 2026
結論
Verdict: REQUEST_CHANGES。
#948 は方向性としては必要です。ただし現状の Issue 契約のまま実装すると、
create-issue側にもう 1 つの scope-collision 判定器を作り、#387 のissue-contract-review側scope_collision_checkと二重化します。さらに #946 の delivery-rollup child materialization と同じcreate-issue領域・tests/create-issue/**を触るため、明示的な依存順なしでは C2 ordered overlap です。#948 自体にはコメントがなく、未解決の設計判断が本文だけに残っています。#948 は「起票前 preflight」として残すべきですが、実装前に #384/#385/#387/#946 との責務境界・出力 schema・fail-closed 条件・child plan 入力経路 を本文へ追加してください。
関連 Issue / PR / コメントの関係
#384 は
docs/dev/workflow.mdに Scope Collision Classification を固定した policy SSOT です。C0/C1/C2/C3 を定義し、Allowed Paths overlap 単独では hard stop ではない、C2 は依存順が必要、C3 は human escalation としています。 現行 workflow でも同じ方針が残っており、C1 は証跡付きで着手可、C2b は predecessor close まで wait、C3 は duplicate / superseded / absorb / split の人間判断です。PR #386 は #384 を閉じた docs-only PR で、policy-only 例外として HOW 層の未反映リスクと mandatory follow-up #385 を記録しています。PR コメントでは一度「docs/dev/workflow.md だけを変えると SSOT 自己矛盾になる」という敵対的レビューが出ており、最終的に policy-only 例外と follow-up 明示で吸収されています。
#385 は
impl-review-loop/ssot-discovery側の HOW-layer consumer です。Scope Collision を自前判断せず、ssot-discoveryの section-limited retrieval とissue-contract-review系の structured evidence を consume する、と明確に切っています。#387 は deterministic evidence producer です。
scope_collision_check.py、fixture、reference schema、issue-contract-review/SKILL.md最小 wiring を追加し、collision_candidates/candidate_class/required_action/decisionを caller が使えるようにする設計です。 #387 のレビューコメントでも、standalone helper で止めず SKILL.md wiring、candidate source、path normalization、enum、fail-closed rule を固定すべきだと指摘されています。#946 は delivery-rollup child materialization を
create_issue_txn正規フローへ統合する Issue で、child plan から canonical issue body を生成・検証・起票・parent checklist 更新まで扱います。ただし overlap 判定 helper は Out of Scope です。#948 の AC4 はこの穴を埋める位置づけですが、#946 との順序・接続点が未定義です。Blockers
1. #387 と #948 の責務境界が曖昧
#948 は
duplicate,overlap_requires_comment,safe_new_issue,ambiguous_requires_humanを返す preflight helper を追加するとしています。一方、#387 はissue-contract-review側で OPEN implementation issue の Allowed Paths overlap を JSON evidence 化し、candidate_class/required_action/decisionを出す設計です。このままだと、#948 が path normalization、implementation issue 判定、dependency relation、source failure、C2a/C2b 判定を再実装します。これは #384 の「script-first」方針には沿いますが、script が 2 つに割れて enum と意味論が drift する 可能性が高いです。
修正案: #948 本文に以下を明記してください。
2. Verdict enum が粗すぎる
AC2 の closed enum はよいですが、4 値だけでは routing に足りません。特に
overlap_requires_commentは C1 benign overlap、C2 ordered overlap、parent-child sibling collision、単なる comment 追記で済む overlap を全部潰します。ambiguous_requires_humanも search failure、readback failure、malformed contract、semantic duplicate 疑い、dependency ambiguity を区別できません。decision enum は AC2 のまま維持し、補助 enum を追加するのが安全です。
3. GitHub full-text search false positive 除外が未定義
#948 の AC3 は「GitHub full-text search false positive を issue body read-back で除外」と書いていますが、どの query で候補を集め、どの read-back fields で除外するかがありません。現行 create-issue skill は 2〜3 語の keyword で
gh issue list --searchを実行し、false positive は title/body の目視確認で除外する運用です。既存
create_issue_txn.pyはさらに厳しく、in:title "<escaped title>"で候補を取り、GitHub search の tokenization を前提に client-side exact title match と saturation guard を実装しています。GitHub CLI は
gh issue list --searchと--jsonを提供し、JSON fields にはbody,labels,number,parent,subIssues,blockedBy,blocking,title,urlなどがあります。gh issue viewも--jsonと--commentsを持ち、issue body / comments / labels / parent / subIssues / dependencies などの read-back に使えます。([GitHub CLI]1) (GitHub CLI)修正案: #948 に candidate discovery/read-back contract を追加してください。
GitHub search 自体は
type:/is:、repo:、in:title/in:body/in:commentsなどで絞り込めますが、これは candidate discovery であって verdict の根拠ではありません。([GitHub]3)4. #946 との C2 ordered overlap が未処理
#946 は child plan から canonical issue body を materialize しますが、overlap helper は Out of Scope です。#948 は delivery-rollup child 起票で child 同士の Allowed Paths overlap を検査するとしており、同じ create-issue 領域を触ります。
この関係は C1 ではなく C2 に近いです。理由は、同一 workflow、同一 SKILL.md、同一 tests、同一 child materialization flow に対して、#946 が「生成・起票」、#948 が「起票前停止/分類」を追加するためです。順序が逆だと #948 は存在しない
materialize_child_issues.py/plan_child_materialization.pyの contract を仮定してしまいます。修正案は二択です。
現状の #948 はこのどちらでもありません。実装前にどちらかへ固定すべきです。
5. Allowed Paths overlap の意味論がない
#948 は「Allowed Paths overlap」を中心に置いていますが、path normalization の contract がありません。#387 ではこの問題に対して、Markdown backtick / list marker 除去、連続 slash 正規化、trailing slash directory を prefix overlap として扱う、
**glob を prefix overlap として扱う、file path は exact match または directory/glob 配下のみ overlap、deleted/renamed file は本文表記のまま、という contract を固定する設計です。#948 も少なくとも同等の normalization を共有しないと、起票前は
safe_new_issue、着手前の #387 ではhuman_classification_requiredになるような drift が起きます。追加すべき tests:
6.
create_issue_txn.pyとの enforcement gapcreate_issue_txn.pyは transaction helper として dedupe search、issue create、labels、sub-issue、dependencies、read-back、partial-failure audit comment まで持つ実行経路です。 #948 の Allowed Paths にはcreate_issue_txn.pyが含まれていません。つまり、#948 の helper はSKILL.mdから呼ばれる advisory preflight であり、transaction helper の hard gate にはなりません。これは必ず本文に明記してください。
これを書かないと、PR は「preflight 標準化」と言いながら、実際の mutation path では bypass 可能な手順追記になります。
7.
docs/dev/workflow.mdを触るなら policy を再定義してはいけないworkflow.md は SSOT です。現行ルールでは、SSOT を編集した場合は対応する prompt/guardrail 層を原則同 PR で更新し、policy-only 例外なら follow-up と未反映リスクを記録する必要があります。
#948 は
docs/dev/workflow.mdと.claude/skills/create-issue/SKILL.mdの両方を Allowed Paths に含むため、この点は一応満たせます。ただし workflow.md に #948 独自 enum を policy として書くのは不可です。workflow.md は C0/C1/C2/C3 を正本として保持し、#948 は create-issue preflight の mapping だけを記載するべきです。推奨 mapping:
8. Verification Commands と Allowed Paths が矛盾している
#948 の Verification Commands は
tests/create-issue/test_issue_overlap_verdicts.pyなどを参照しています。一方、Allowed Paths はtests/create-issue/overlap*.test.pyです。これはそのまま実装すると、実装者がどちらのファイル名を作っても片方の契約に違反します。単純ですが blocking です。どちらかに統一してください。Python repo なので、既存 pytest 命名に合わせるなら Allowed Paths を以下へ変更するのが自然です。
Major issues
labels / parent refs の意味論が operationalized されていない
AC1 は labels と parent issue refs を使うと書いていますが、どう使うかがありません。最低限、以下を固定してください。
GitHub issue dependencies are now a first-class GitHub concept, and REST endpoints expose dependency and sub-issue relationships. That makes native parent/dependency read-back preferable when available, with body fallback only as compatibility handling.([GitHub Docs]4) ([GitHub Docs]5)
overlap_requires_commentの comment body がないworkflow.md の C1 は
related_issue/overlapping_paths/edit_intent/non_conflict_reasonを証跡として残すことを要求しています。 #948 はoverlap_requires_commentを返すだけで、コメント本文の machine-readable shape がありません。追加すべきです。
GitHub / gh failure の fail-closed が必要
GitHub CLI と REST API は pagination、permission、secondary rate limits、JSON parse failure、network failure を起こします。GitHub sub-issues REST docs も、短時間に content を作りすぎると secondary rate limiting になり得るとしています。#948 は read-only preflight ですが、GitHub source の完全性に依存する以上、source failure を
safe_new_issueにしてはいけません。([GitHub Docs]6)source_status.issue_search != okまたは read-back failure があれば、ambiguous_requires_humanに倒すべきです。GitHub CLI バージョン依存を隠してはいけない
2026-06-10 の GitHub CLI changelog では、
gh issueが issue types、parent/sub-issue relationships、dependencies を直接扱えるようになったとされています。([The GitHub Blog]7) ただし repo の既存 skill はまだ raw API / GraphQL を併用しています。#948 は
gh issue list/view --json parent,blockedBy,blocking,subIssuesが使える場合はそれを利用し、未対応 CLI ではsource_statusを degraded/failed にするか、既存 repo helper 経由へ fallback する方針を持つべきです。黙って最新 gh 前提にすると CI / agent runtime で壊れます。具体的な #948 修正文案
本文に以下を追加するのが最小修正です。
Verification Commands も以下へ寄せるべきです。
最終判定
#948 は 必要だが、このまま実装不可 です。実装前に修正すべき最重要点は 5 つです。
reason_code/source_status/candidatesを足す。tests/create-issue/overlap*.test.pyとtest_issue_overlap_*.pyの Allowed Paths 矛盾を直す。この修正が入れば、#948 は #384 の policy、#385 の consume-only、#387 の structured evidence producer、#946 の child materialization を壊さず、create-issue 起票前の実用的な preflight として成立します。
squne121 commentedon Jun 17, 2026
Contract Review Result
squne121 commentedon Jun 17, 2026
Contract Review Result
impl(#948): overlap preflight を fail-closed + structured evidence へ強化する
impl(#948): Issue 重複・Allowed Paths overlap preflight を標準化する
impl(#948): overlap preflight を fail-closed + structured evidence へ強化する
impl(#948): Issue 重複・Allowed Paths overlap preflight を標準化する (#967)
impl(#946): delivery-rollup child materialization を create_issue_txn …