Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1860"
goal_ref: "OPEN Issue inventory・semantic planning・scope-rollup・contract snapshot・body SHA・overlap evidenceを通常作業のblocking authorityから外し、実Git conflict・target PR mergeabilityだけを当該領域のhard stopとして残す"
change_kind: workflowSummary
#1860(LOOP_PROTOCOL の AI エージェント control-plane 縮退 parent)の owner decision(2026-07-30、#1860 コメント参照)に基づき、以下の production 経路から blocking authority を撤去する。
- OPEN Issue 全件収集を前提にした overlap preflight(
implement-issue/create-issue) - scope-rollup の automatic dispatch(
impl-review-looppreparation Step 2.5、issue-refinement-loop) - contract snapshot・body SHA・fingerprint mismatch を理由にした自動停止(
issue-contract-review、impl-review-loop) - overlap evidence を required input として扱う経路(
open-pr)
既存 OPEN Issue #1674・#1676・#1679・#1652・#1792・#1793・#1853 は、本 Issue の owner decision と整合する部分(#1676・#1679・#1652・#1853 の一部)を本 Issue に統合・吸収する。#1674 は semantic planning authority を issue-refinement-loop へ「一元化」する方向であり本方針と逆行するため supersede 対象、#1792・#1793 は新規 PAIRWISE_MERGE_OBSERVATION_V1 schema 追加を提案しており「新しい代替 authority artifact を追加しない」という owner decision に反するため、実 Git conflict / mergeability 判定は本 Issue 側で 新規 schema を追加せず 直接実装する。
Outcome
以下が同時に成立する状態にする。
- issue 作成・refinement・contract review・implement・impl-review-loop・open-pr の各 production path が、semantic planning/artifact 異常(missing・stale・invalid・ambiguous・unknown・runtime_error・incomplete・saturated)だけでは停止しない。
- OPEN Issue 全件収集を通常実装開始の必須前提にしない。
- scope-rollup は任意の manual advisory diagnostic として残せる(automatic dispatch はしない)。
- contract snapshot・body SHA・fingerprint・overlap evidence は optional(warning-only)。
- downstream が別名の新しい artifact authority を要求しない。
- current-head の実 Git conflict(3-way merge 不能)は停止する。
- target PR の GitHub
mergeable == CONFLICTINGまたはmerge_state_status == DIRTYは停止する。 UNKNOWN/null/BLOCKED/BEHIND/UNSTABLE/DRAFT/HAS_HOOKSは Git conflict として扱わない(UNKNOWN/null は bounded retry 後 warning、最終 merge-ready 判定のみ保留)。- canonical repository、protected paths、secret 保護、実テスト、CI、独立レビュー、branch protection 等の既存安全境界は維持される。
In Scope
.claude/skills/implement-issue/scripts/check_implementation_overlap.pyと関連 tests: OPEN Issue 全件収集失敗・不完全・pagination・ambiguous 判定を warning 化し、実装開始を止めない。.claude/skills/create-issue/scripts/check_issue_overlap.pyと関連 tests: exact-title dedupe は維持しつつ、saturation/検索失敗を hard stop から warning へ。.claude/skills/impl-review-loop/steps/preparation.md、scripts/parse_scope_rollup_run_result.py、scripts/verify_scope_rollup_result.py: Step 2.5 scope-rollup preflight の automatic dispatch を除去し、manual advisory 実行のみへ縮小。.claude/skills/issue-refinement-loop/scripts/plan_issue_scope_rollup.py、scripts/validate_issue_execution_decision.py、schemas/issue_execution_decision_v1.schema.json関連 production routing:ISSUE_EXECUTION_DECISIONmissing/stale を hard stop にしない。.claude/skills/issue-contract-review/scripts/contract_readiness_check.py、run_contract_review_once.py、declared_path_overlap.py: contract snapshot・body SHA・fingerprint mismatch を warning 化。.claude/skills/open-pr/scripts/validate_pr_body.py他 overlap gate 関連 scripts/tests: overlap evidence を required input から外し、missing/stale/digest mismatch で publication を止めない。.claude/skills/impl-review-loop/scripts/ensure_contract_snapshot.py、scripts/triage_contract_blockers.py:latest_blocked構造化 artifact の自動 human escalation 直結を解消。.claude/skills/impl-review-loop/steps/step-5-mergeability-handling.mdおよび関連 production router:mergeable/merge_state_statusの truth table(CONFLICTING/DIRTY のみ hard stop、UNKNOWN/BLOCKED/BEHIND/UNSTABLE/DRAFT/HAS_HOOKS は非 conflict)を実装・明文化する。実 Git 3-way conflict 判定は既存 git 操作の観測結果を直接用い、新規 schema・digest を追加しない。- 上記に直接結合する docs(
docs/dev/workflow.md、docs/dev/agent-skill-boundaries.md)の記述整合。 - 上記に対応する既存 tests の期待値更新、および warning-only 挙動を確認する新規 behavior test(文字列 grep ではなく production 関数実行によるもの)。
Out of Scope
- replay/envelope/custom publisher 全体の整理(別 child issue、導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860 Child Issues 節参照)。
TEST_VERDICTlane 全体(実装: 通常レビューの evidence authority を TEST_VERDICT 非依存の CI/merge_state_status 正本へ切替える(Phase 1: authority cutover) #1856 が対応)。- Multi-Agent V2・session ledger・manifest全体(別 child issue)。
- unrelated product code(game/product 機能)。
- branch protection そのものの弱体化。
- secret・protected path・destructive Git guard の弱体化。
- 新しい planning schema/authority artifact の導入(
PAIRWISE_MERGE_OBSERVATION_V1を含む)。
Acceptance Criteria
- AC1: OPEN Issue inventory が missing/incomplete/saturated/runtime_error でも
implement-issueが実装フェーズへ進む(check_implementation_overlap.pyの該当ケースが exit non-blocking / warning ステータスを返すことをテストで確認する)。 - AC2: semantic overlap が duplicate/ambiguous/unknown でも自動停止せず warning になる。
- AC3: scope-rollup missing/stale/invalid/runner failure が warning になり、
impl-review-looppreparation が継続する。 - AC4: contract snapshot missing/stale/invalid/
latest_blockedartifact が、それだけでは停止理由にならない。 - AC5: Issue body SHA/fingerprint mismatch が refetch/retry または warning になり、通常作業を停止しない。
- AC6: overlap evidence が欠落・stale・digest mismatch でも
open-prの PR publication が可能。 - AC7:
check_implementation_overlap.py等の OPEN Issue 全件収集が production 必須経路から外れる(advisory 呼び出しとしてのみ残る)。 - AC8: 別名の replacement authority artifact が追加されていない(新規 JSON/YAML schema・digest・receipt・publisher・reason-code enum の grep 差分がゼロ)。
- AC9: 実際の 3-way Git conflict は停止する(fixture: 同一行を編集した competing commit で merge を試行し失敗することを確認)。
- AC10: target PR の
mergeable == CONFLICTINGまたはmerge_state_status == DIRTYは停止する。 - AC11:
UNKNOWN/null/BLOCKED/BEHIND/UNSTABLE/DRAFT/HAS_HOOKSを Git conflict と誤判定しない(truth table のネガティブテストで確認)。 - AC12: canonical repository mismatch、protected path、test failure、CI failure、review request-changes は従来どおり処理される(既存ネガティブテストが green のまま)。
- AC13: docs(
docs/dev/workflow.md、docs/dev/agent-skill-boundaries.md)、skill SKILL.md/steps、production script、tests の記述が一致する。
Verification Commands
uv run pytest .claude/skills/implement-issue/tests/ -q
uv run pytest .claude/skills/create-issue/tests/ .claude/skills/create-issue/scripts/tests/ -q
uv run pytest .claude/skills/impl-review-loop/tests/ .claude/skills/impl-review-loop/scripts/tests/ -q
uv run pytest .claude/skills/issue-refinement-loop/tests/ .claude/skills/issue-refinement-loop/scripts/tests/ -q
uv run pytest .claude/skills/issue-contract-review/tests/ .claude/skills/issue-contract-review/scripts/tests/ -q
uv run pytest .claude/skills/open-pr/scripts/tests/ .claude/skills/open-pr/tests/ -q
uv run pytest tests/agent_ops/test_implement_issue_overlap_policy.py -q
uv run ruff check .claude/skills scripts
git diff --checkVerification Commands は実装着手時に current main の実 test file 構成へ合わせて再確定してよい(存在しない path を仮定しない)。
Allowed Paths
.claude/skills/implement-issue/SKILL.md
.claude/skills/implement-issue/scripts/check_implementation_overlap.py
.claude/skills/implement-issue/tests/
.claude/skills/create-issue/SKILL.md
.claude/skills/create-issue/scripts/check_issue_overlap.py
.claude/skills/create-issue/tests/
.claude/skills/create-issue/scripts/tests/
.claude/skills/impl-review-loop/SKILL.md
.claude/skills/impl-review-loop/steps/preparation.md
.claude/skills/impl-review-loop/steps/step-5-mergeability-handling.md
.claude/skills/impl-review-loop/scripts/parse_scope_rollup_run_result.py
.claude/skills/impl-review-loop/scripts/verify_scope_rollup_result.py
.claude/skills/impl-review-loop/scripts/ensure_contract_snapshot.py
.claude/skills/impl-review-loop/scripts/triage_contract_blockers.py
.claude/skills/impl-review-loop/tests/
.claude/skills/impl-review-loop/scripts/tests/
.claude/skills/issue-refinement-loop/SKILL.md
.claude/skills/issue-refinement-loop/scripts/plan_issue_scope_rollup.py
.claude/skills/issue-refinement-loop/scripts/validate_issue_execution_decision.py
.claude/skills/issue-refinement-loop/schemas/issue_execution_decision_v1.schema.json
.claude/skills/issue-refinement-loop/tests/
.claude/skills/issue-refinement-loop/scripts/tests/
.claude/skills/issue-contract-review/SKILL.md
.claude/skills/issue-contract-review/scripts/contract_readiness_check.py
.claude/skills/issue-contract-review/scripts/run_contract_review_once.py
.claude/skills/issue-contract-review/scripts/declared_path_overlap.py
.claude/skills/issue-contract-review/tests/
.claude/skills/issue-contract-review/scripts/tests/
.claude/skills/open-pr/SKILL.md
.claude/skills/open-pr/scripts/validate_pr_body.py
.claude/skills/open-pr/scripts/tests/
.claude/skills/open-pr/tests/
tests/agent_ops/test_implement_issue_overlap_policy.py
docs/dev/workflow.md
docs/dev/agent-skill-boundaries.md
実装中に直接結合する追加 path が判明した場合は、child Issue 本文を先に更新・readback してから編集する。body SHA mismatch や overlap 判定を理由に scope update を停止しない。
Scope Delta(2026-07-30, 実装着手時点で追加): 各 skill の scripts/*.py を調査した結果、多くの production スクリプト自体は既に route/exit code レベルで advisory に近く(例: check_implementation_overlap.py は分類成功時に route を問わず exit 0)、実際の blocking authority は各 skill の SKILL.md(呼び出し側 prose の「人間判断へ停止」「fail-closed」指示)に存在することが判明した。この instruction 層を変更しない限り Outcome は達成できないため、implement-issue/SKILL.md、create-issue/SKILL.md、impl-review-loop/SKILL.md、issue-refinement-loop/SKILL.md、issue-contract-review/SKILL.md、open-pr/SKILL.md を Allowed Paths へ追加する。
Scope Delta(2026-07-31, PR #1871 レビュー fix_delta で追加): 人間レビュアーの REQUEST_CHANGES(production router の mergeable/merge_state_status 分離、required_auto_actions 契約統一、advisory 化の shell exit code 実効性、contract snapshot/intake capsule の fatal/warning 分離、scope-rollup manual-only 化)に対応するため、以下を Allowed Paths へ追加する:
.claude/skills/impl-review-loop/scripts/route_loop_verdict_v2.py
.claude/skills/impl-review-loop/scripts/build_intake_capsule.py
.claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md
.claude/skills/impl-review-loop/steps/conflicting-pr-escalation-runbook.md
.claude/agents/implementation-worker.md
.claude/agents/scope-rollup-runner.md
.codex/agents/scope-rollup-runner.toml
scripts/check_impl_review_loop_codex_dispatch.py
tests/codex/test_scope_rollup_runner_agent_config.py
tests/test_codex_agent_bridge_contract.py
Stop Conditions
- secret、credential、protected/manual asset への意図しない変更が必要になった場合
- destructive Git 操作が必要になった場合
- repository または GitHub 権限が不足する場合
- current owner の明示的な停止指示がある場合
- 実 Git conflict を安全に解消できない場合
- target PR が current head で明示的に
CONFLICTING/DIRTYの場合 - 実テスト、CI、独立レビューの blocker を修正できない場合
semantic planning、OPEN Issue inventory、scope-rollup、contract snapshot、body SHA、overlap evidence を Stop Conditions に含めない。
Related Issues
- Part of 導入: AIエージェント運用をminimal harnessへ縮退し、過剰なcontrol-planeを廃止する #1860
- Supersedes / absorbs: 実装: impl-review-loop preparation から scope rollup preflight(Step 2.5)を除去し、issue-refinement-loop の判定を再実行しない #1676, 実装: implement-issue / open-pr の production path から peer OPEN Issue overlap preflight を撤去する #1679, 実装: overlap preflight の共有スキーマ誤検知を防止する #1652, 実装: impl-review-loop production routerで mergeable と merge_state_status を分離し、conflict・unknown routingを正規化する #1853(該当スコープを本 Issue に統合、対応する scope が完全に吸収された後に close)
- Conflicts with owner decision(新規 schema 追加のため要精査、本 Issue の実装完了後に close/supersede を判断): 導入: OPEN Issue 重複・依存順・実装優先順位判定を issue-refinement-loop に一元化する #1674, 実装: commit/PR 作成後の target head に対し pairwise_merge_conflict を SHA-bound で観測する PAIRWISE_MERGE_OBSERVATION_V1 producer を追加する #1792, 実装: ensure_contract_snapshot.py・open-pr・impl-review-loop に PAIRWISE_MERGE_OBSERVATION_V1 の再利用禁止 consumer 契約を配線する #1793
Activity
Resolve PR #1875 conflicts without regressing #1856/#1869
実装: review/refinementのreplay・envelope・custom publisherをbounded loopへ置…