Skip to content

idd-all: 增加 HITL(attended)模式 — direct-commit + 允許 sub-skill AskUserQuestion #1

Description

@kiki830621

Problem

Original request (使用者於 thesis project session 中提出,2026-05-03):
「idd-all 我想要有一種是直接 commit 的方案,因為 PR 不一定很方便,我其實是在旁邊,這樣的 all 中間還是可以問我問題,總之 all 可以分成 human-in-the-loop 跟不是的情況」

當前 idd-all v2.40.0 強制走 PR path 且強制 unattended(所有 sub-skill 的 AskUserQuestion 都被 suppress)。這個設計對「fire-and-forget orchestration」很合適,但對「使用者就在旁邊、想監控進度也想被諮詢」的常見場景反而是 friction:

  1. PR 對小型 / 個人 repo 是 overhead — 沒有 review 流程的 solo project,每個 issue 開 feature branch + PR 是純 ceremony
  2. Sub-skill 的 attended 預設被一律 override — 像 spectra-discuss 的多輪對話、spectra-propose 的 Park/Apply 抉擇、idd-implement 的 plan-tier approval gate,全被靜默跳過。當使用者就在旁邊時,這些 checkpoint 反而是它們存在的意義

Type

feature / enhancement

Proposed design (待 diagnose 細化)

兩種模式

Mode Path Sub-skill questions Stop point Use case
Unattended (current v2.40.0) PR (forced) All suppressed Verify → stop Background automation, scheduled cron, /loop
Attended (HITL) (NEW) Direct-commit (current branch) Allowed at natural points TBD: verify-stop or full-cycle? 使用者就在旁邊、想被諮詢

Open design questions (留給 diagnose)

  1. Flag 設計--hitl / --attended / --no-pr?要不要乾脆把預設改成 attended(因為直接從 CLI 喊的用例多半是現場互動),unattended 變成 opt-in via --unattended
  2. Branch 策略 — Attended 模式還要不要強制 feature branch?還是允許在當前 branch 直接 commit?若使用者已經在 feature branch(例如自己手動切過去),維持當前 branch 是合理的;若在 main,仍然應該建 feature branch(保險)?
  3. Verify 之後 — Attended 模式既然使用者就在旁邊,要不要直接連 idd-close 也跑?還是維持「verify 後停下、由人決定 close」?
  4. Spectra path interaction — Attended 模式的 sub-skill suppress hint 整個拿掉?還是仍然保留某些 checkpoint suppress(例如 spectra-propose Step 10 Park/Apply)?「都讓 sub-skill 自己決定」是最乾淨的,但要 audit 每個 sub-skill 的 attended 預設是否合理。
  5. 混用情境 — Attended 模式中途使用者可能離開 keyboard,sub-skill 卡在 AskUserQuestion 等不到回應 — 是否需要 timeout fallback?或者明確記錄 attended 模式假設「使用者全程在線」?
  6. Backward compat — 現有 idd-all #N --pr 的 caller(包含 /loop 自動化)期望 unattended 行為。若預設改成 attended,需要 deprecation 期 + warning。
  7. idd-implement --no-pr 的關係idd-implement 已經透過 pr_policy config 支援 PR / direct-commit / ask 三選一。Attended idd-all 是不是直接用 pr_policy 而不是新增 flag?這樣 config 介面比較一致。

Impact

  • 新使用者第一次跑 idd-all 會比較直覺(不用先理解「為什麼一定要開 PR」)
  • 解放 sub-skill 的 attended 設計(spectra-discuss 多輪對話、Plan tier EnterPlanMode 等)— 讓 unattended override 變成 opt-in 而不是 default
  • 對 solo repo / personal project 的 friction 大幅降低

Acceptance criteria(draft,待 diagnose 確認)

  • idd-all --no-pr #N 走 direct-commit + 允許 sub-skill AskUserQuestion — naming chosen as --no-pr (reuse idd-implement vocab); SKILL.md Step 0.2/Phase 0.5; smoke test Case B
  • 既有 idd-all #N --pr 行為不變(unattended PR path)— smoke test Cases A + H + F (absent config /loop default); regression reviewer round-1 confirmed byte-equivalent v2.40.0 behavior
  • Documentation 清楚說明兩種模式的契約差異 + 何時用哪個 — SKILL.md frontmatter + 核心原則 + 2 example traces; pr-flow.md "idd-all path resolution" section; usecase-routing.md row 11+11b; CLAUDE.md skill summary
  • Sub-skill args 的 unattended hint 機制改成 opt-in(不是 always-on)— Phase 3a/3b/4 conditional if [ "$INTERACTION" = "unattended" ] guards; spectra-apply attended branch SHALL NOT inject any directive (round-2 fix)
  • 新增 / 修改的測試或 dry-run trace 證明兩種模式都按設計走 — openspec/changes/idd-all-hitl-mode/smoke-test.sh (28/28 assertions PASS); smoke-test-trace.txt captured
  • 至少一個 sample run 在每個模式各跑通一個 issue — smoke test Cases A/H (PR mode) + Case B (direct-commit mode) executes resolution + sub-skill arg construction end-to-end with deterministic assertions

Related

  • 當前 idd-all skill: plugins/issue-driven-dev/skills/idd-all/SKILL.md (v2.40.0)
  • Sub-skill 的 attended 預設文件: plugins/issue-driven-dev/references/pr-flow.md
  • v2.40.0 release notes: cross-repo --cwd 支援(先前 milestone)

Current Status

Phase: closed
Last updated: 2026-05-04 by idd-close

Key Decisions

  • Closing summary posted: idd-all: 增加 HITL(attended)模式 — direct-commit + 允許 sub-skill AskUserQuestion #1 (comment)
  • Round-1 verify FAIL → fix → Round-2 verify PASS → smoke test 28/28 PASS — full audit chain
  • 設計重構為兩軸正交化(path × interaction 從 pr_policy + --pr/--no-pr 同源推導),不引入新 --hitl flag
  • pr_policy 缺省 → idd-all 默認 (PR, unattended) (v2.40.0 backward compat); 顯式 pr_policy: ask 才走 AskUserQuestion — idd-implement vs idd-all 在缺省時刻意 diverge (intentional, documented in pr-flow.md)
  • 自動 close — idd-all 兩 mode 都停在 verified;closing summary 由人寫(本 closing comment 即實踐)
  • HITL mode 不加 silent timeout;明示「attended assumes user in session」
  • Backward compat: /loop 等顯式 --pr caller 零受影響;新缺省規則保護無 config 的 caller 不 hang

Scope Changes

Blocking

Commits

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions