Skip to content

feature: /idd-all chain-solve mode — 自動接續解 spawned issues + 單 review PR #44

@kiki830621

Description

@kiki830621

Errata (2026-05-10, post-discuss/propose/apply):
此 issue 的 ## Expected 段所述 /idd-all #N --chain flag + chain_policy: off/auto/ask config schema 在 /spectra:discuss 階段被 reject(過 default-dilemma checklist 全 yes;詳見 docs/design-patterns/default-dilemma.md)。
最終實作為獨立 /idd-all-chain skill + --in-chain flag(/idd-all 加 4th mode tuple (direct-commit, unattended))。請以 openspec/changes/add-idd-all-chain-skill/proposal.md + design.md 為準。
Spectra change 進度:25/32 tasks done(spawn manifest infra ✓ / 4 sub-skill conformance ✓ / idd-all --in-chain flag ✓ / idd-all-chain/SKILL.md ✓ / plugin metadata ✓);6.3 e2e validation deferred 到 first-real-use,7.x 本 comment 即是其中一項。


Problem

Original text (user chat, /idd-issue, 2026-05-08):
「我現在在想 /idd-all 這個技能,他是不是可以有一個做法是自動繼續把衍生的 issue 都一併解完,然後最後用整個 PR 來 review」

當前 /idd-all #N 跑單 issue lifecycle (issue → diagnose → implement → verify),verify / sister sweep / mid-plan tangential 觸發到的 follow-up issue 會被 file 為新 issue 但 idd-all 不會繼續解。使用者必須手動再跑 /idd-all #M 處理每個衍生 issue,且各自開獨立 PR。

User 提議:chain-solve mode — 跑 /idd-all #N 衍生出 #M / #K 時,自動接著解,全部 commit 到同一 feature branch + 同一 PR,最後 user 對整顆改動樹做 1 次 review/merge/close。

跟現有 mechanism 比較:

機制 觸發 Issue 範圍 PR 跨 issue
既有 /idd-all #N 單 issue 1 issue lifecycle 1 PR 衍生 → 新 issue,user 手動接
Cluster-PR (/idd-implement #N #M --pr) User 預先指定多 issue N pre-known issues 1 PR User 預先決定 cluster
#37 bulk-solve (parked) 無 args 從 backlog 掃所有 open 所有 open issues N PRs (per issue) Cold-start,無依賴推導
本 issue: chain-solve 跑 #N 過程中 spawn 出來的 #M hot-chain (1 → N+) 1 PR for 全鏈 Auto-emergent,跟 spawning 同步

Type

feature (orchestrator extension) — /idd-all 新模式

Expected

新增 /idd-all #N --chain flag(or default-on if chain_policy: auto in config):

Behavior

  1. Phase 1-4 跟現有相同:跑 #N 完整 lifecycle 到 verified
  2. Phase 4.5 NEW — chain detection:
    • 掃本 invocation 衍生的 follow-up issues:
      • idd-implement Step 5.7 sister bug sweep filed
      • idd-verify Phase 4 P3 follow-up findings filed
      • idd-plan Step 2.5 tangential observations filed
      • idd-diagnose Step 3.6 sister concerns filed
    • 排除 issue:已在另一個 branch / 已 closed / out-of-repo
  3. Phase 4.6 NEW — recursive chain-solve loop:
    • 對每個 spawned issue:
      • 同一 feature branch 上跑 mini-pipeline (diagnose → implement → verify)
      • Commit 用 Refs #M (cluster-PR commit convention)
      • Verify findings 若再 spawn → continue chain (depth limit 預設 2,可 config)
    • 每個 chained issue 各自 idd-update phase → verified
  4. Phase 5 NEW — single review PR:
    • PR body 列出 root #N + chained #M, #K, ... 全部
    • Title prefix chain: (跟 cluster: 區別)
    • 每個 issue 各自 verify report (inline links to PR comments)
  5. Phase 6 — stop at verified, user reviews 整顆 PR:
    • User merge 後跑 /idd-close #N #M #K 一次關全部(各自 closing summary,每個 issue 一份)

Config schema (proposed)

{
  "chain_policy": "off" | "auto" | "ask",
  "chain_max_depth": 2,
  "chain_max_issues": 5
}
  • off (default for v1) — 跟現有行為一致,不 chain
  • auto — 衍生 follow-up 自動 chain solve
  • ask — 衍生時用 AskUserQuestion 問是否 chain

Actual

Impact

  • Review fragmentation:相關改動分散多 PR,reviewer 失去 holistic view
  • Atomicity loss:multi-issue refactor 應該 atomic,split 成 N PR 增加 partial-merge 風險
  • Manual orchestration burden:user 要記得追蹤所有 spawned issue,handover 期間易遺漏
  • Audit trail dilution:close summary 各自寫,無法看「整個改動樹解了什麼問題」

Design considerations / open questions

  1. Depth limit:衍生 → 又衍生 → 雪崩風險。Default chain_max_depth=2 合理嗎?
  2. Verify discipline preserved:每個 chained issue 仍跑 idd-verify (or 共用 PR 末端 verify)?後者省 cost 但失 per-issue verify rigor
  3. PR body 結構:N issues 的 PR body 怎麼組織才不會變成超長 wall of text?
  4. Failure mode:中途某 chained issue verify FAIL,整顆 chain abort 還是 partial commit?per-issue verify 模式下,FAIL 應只 abort 該 issue 不影響其他
  5. Close orchestration:/idd-close #N #M #K 已支援 cluster-PR mode,chain mode 會直接 reuse 這個還是新 mode?
  6. Edge case — chain 跨 branch 不可:衍生 issue 若觸及完全不相關 file (e.g. feature+docs: idd-verify --loop / idd-all unattended 隱性依賴 ralph-loop — 應宣告 + auto-detect + 內建探索 #28 衍生 refactor: 抽出 generic plugin-presence detector helper (tangential from #28 plan) #34 doc + docs: plugin-presence detect 應 explicit document trust model (DA R3.a from #28 verify) #41 trust docs vs. 另一個 feat(idd-all-chain): Phase 0 diagnosis-readiness gate (Step 0.4) #50 unrelated bug fix),user 心中可能不想 cluster — 需要 heuristic 或 prompt
  7. Cross-cutting refactor 才適合 chain:同一 helper / 同一 module 的多 issue → chain;independent fixes → 分 PR 還是對的

#37 (parked bulk-solve) 的差異

特性 #37 bulk-solve This (chain-solve)
Trigger /idd-all 無 args (cold start) /idd-all #N 衍生時 (hot chain)
Issue source 既存 backlog This invocation spawned
Sequencing AI 自動排序所有 backlog 自然 emergence (DFS)
PR N PRs per cluster 1 PR for 整鏈
Use case "Inbox zero session" "解決 1 root issue 連帶 ripple"

兩者 orthogonal,可獨立或組合(chain-solve mode 嵌入 bulk-solve 的每個 cluster 內)。

Real example from this session

Related

Priority: P2 (DX 大改善,但需要謹慎設計避免 chain 雪崩 / verify discipline regression)

Current Status

Phase: closed
Last updated: 2026-05-10 by idd-close (Spectra change archived + retroactive Implementation Complete + Closing Summary posted)

Key Decisions

  • Complexity = Spectra (Layer 2 + Layer 3 全 3 個都命中)
    • Layer 2: 跨 sub-skill implicit contract(spawn manifest schema)
    • Layer 3a: 修 5 個既有 spec(idd-all + 4 sub-skills)
    • Layer 3b: 跨 reference doc cross-spec impact
    • Layer 3c: Architectural shift(single-issue → emergent multi-issue lifecycle)
  • Implementation 路線:--chain flag 路線 reject;改成獨立 /idd-all-chain skill + --in-chain flag(過 default-dilemma checklist)
  • Strategy: 7 phases — spawn manifest infra → 4 sub-skill conformance → idd-all --in-chain flag → /idd-all-chain skill → plugin metadata → verification → GitHub alignment
  • Vagueness Pre-check: V1=2, V4=3 (not triggered)

Scope Changes

Tasks (Spectra change add-idd-all-chain-skill)

  • 1.x Spawn manifest infra (3/3)
  • 2.x Sub-skill manifest write conformance (5/5)
  • 3.x idd-all --in-chain flag (5/5)
  • 4.x /idd-all-chain skill creation (8/8 — 含 chain-flow.md reference)
  • 5.x Plugin metadata (4/4 — CLAUDE.md / plugin.json / marketplace.json / usecase-routing.md)
  • 6.1, 6.2, 6.4 verification 通過(structural + smoke);6.3 e2e deferred to first-real-use
  • 7.x GitHub Issue feature: /idd-all chain-solve mode — 自動接續解 spawned issues + 單 review PR #44 alignment(本 update + errata + link comment)

Blocking

  • (none — closed via /idd-close 2026-05-10 with retroactive Implementation Complete supersession)

Sister Concerns

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions