Skip to content
2 changes: 1 addition & 1 deletion openspec/specs/idd-all-chain/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ After the chain queue is processed (full success, per-root partial failure, or a
2. `Refs #<root_1> #<root_2> ... #<chained_1> #<chained_2> ...` listing all chained issue numbers (all roots first, then their spawns)
3. A `## Cluster overview` section with a table summarizing each issue (issue number, `root_id` it belongs to, spawn source, phase, head commit)
4. A `## Per-issue details` section using collapsed `<details>` HTML elements per issue
5. A `## Pending review` checklist where the final box reads `Pending: human review of cluster PR + /idd-close <issue list> after merge`
5. A `## Review status` checklist where the final box reads `- [x] **Verify-gated**: per-issue verify PASS — cluster ready to merge → /idd-close #<root> #<chained_1> ... per issue after merge` (default), or with `--review` opt-in `awaiting human acceptance (re-opened confirmation loop per --review)` (per #108 NSQL doctrine; section heading swapped from `## Pending review` in v2.66.0)

The PR body SHALL NOT contain `Closes #N` / `Fixes #N` / `Resolves #N` trailers (per existing IDD discipline against auto-close).

Expand Down
2 changes: 1 addition & 1 deletion plugins/issue-driven-dev/.claude-plugin/plugin.json

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions plugins/issue-driven-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.66.0] - 2026-05-20

### Added

- **`idd-close` Step 3.6 — Residue Acknowledgement** ([#105](https://github.com/PsychQuant/issue-driven-development/issues/105)): closes the `### Residue` write-only loop from #103. v2.64.0 added `### Residue` to the Diagnosis template (NSQL §4.6 — non-operationalizable intent) but no downstream skill consumed it. Per #103 PR #104 Devil's Advocate finding D2: "latent capacity for the section to drift into ritual filler with no consumer pressure to keep it honest." Step 3.6 gives Residue its first consumer at close time. Reads latest `## Diagnosis` comment's `### Residue` section (mirrors Step 0 supersession). Silent skip when section missing, content is `(none)`, or pre-v2.64.0 format. When non-empty, AskUserQuestion 3-option (`still residue — acknowledge` / `file as follow-up issue(s)` / `skip — audit trail only`). Audit trail PATCH appends `### Residue Acknowledgement` to the in-memory closing summary draft before publish. Filed follow-ups get spawn manifest entries when chain context active. SHOULD-tier (non-blocking) per closure-tier IC_R011 eligibility. Step 0.5 Bootstrap adds `residue_acknowledgement` task. Placement mirrors Step 3.5's drafted-summary-scan pattern; must run before Step 4 publish so audit PATCH operates on same draft.

- **`idd-issue` Step 5 — CI/loop hard-parse warning** ([#107](https://github.com/PsychQuant/issue-driven-development/issues/107)): #103 PR #104 expanded `idd-issue` Step 5 from metadata-only to also echo AI-rendered `## Type` / `## Expected` / `## Actual` + plain-language interpretation. Strictly better for human readers (misparse catchable from terminal) but a silent surface change for CI / `/loop` scripts that hard-parse Step 5 stdout. Adds one ⚠ paragraph mirroring the v2.55.0 `--no-multi-finding` CI warning precedent. Wording is near-verbatim from the issue body's `## Expected`, with two skill-internal additions: the `#107` self-reference suffix on the `v2.64.0+` marker, and a parenthetical pointer to the parallel precedent (no line number — paths rot). No behavior change — purely defensive documentation.

### Changed

- **PR-body checklist wording aligned across the IDD documentation family** ([#108](https://github.com/PsychQuant/issue-driven-development/issues/108)): #102 shipped the NSQL doctrine that `verify-gated PASS` is the terminal default disposition but only updated `idd-all-chain` Phase 5; the parallel templates were intentionally deferred. #108 closes the 5-template + 3-satellite consistency family.
- **4 PR-body templates** (`skills/idd-implement/SKILL.md:503` + `skills/idd-all/SKILL.md:755` + `references/pr-flow.md:135` + `references/chain-flow.md:254`) drop legacy `Pending: human review of this PR + /idd-close after merge` framing; default wording becomes `- [x] **Verify-gated**: PR verify PASS — ready to merge → /idd-close #${NUMBER} after merge` (or cluster variant for `chain-flow.md`). Per Option A from #108 diagnosis: `idd-implement` does NOT accept `--review` flag (remains `idd-all` + `idd-all-chain` only); direct `idd-implement` invocations get the default wording without conditional.
- **F3 satellite** — `idd-all-chain` Phase 4 final stdout report dispatches on `$REVIEW_FLAG`: default emits `Verify: verify-gated PASS across cluster — cluster ready to merge` + `Next: Merge → /idd-close`; with `--review` emits `awaiting human acceptance (re-opened confirmation loop per --review)` + `Next: Review PR → Merge after acceptance → /idd-close`. Built via explicit `if/else` before the heredoc to avoid the `${VAR:-word}` mutex pitfall hardcoded into the doctrine after PR #109 F1.
- **Trace 1 example refresh** — `idd-all/SKILL.md` Trace 1 example block (lines 893-901) shows the v2.65.0+ wording: default `Verify: verify-gated PASS` + `Next: merge`, with a parallel `--review` variant block showing `awaiting human acceptance` + `merge after acceptance`. Aligns documentation with actual Phase 6 output.
- **DA3 wording precision** — `--review` flag is now described as **orchestrator-scope messaging-only** (was just `messaging-only`) in 3 sites (`idd-all` Phase 0 args parsing comment, `idd-all-chain` Phase 0 args parsing comment, `MANIFESTO.md` Human-in-the-loop `--review` paragraph). The qualifier prevents the misreading: the flag is messaging-only AT THE ORCHESTRATOR (doesn't change skill behavior, doesn't make orchestrator wait), but humans + CI parsers downstream can react to the changed text differently — so the flag is not messaging-only end-to-end.

### Notes

- Plugin v2.66.0 is a **minor** bump (over v2.65.0): new `idd-close` step (additive behavior at close time) + 4 default PR-body wording strings change (user-visible diff in every PR opened by IDD orchestrators) + new conditional in `idd-all-chain` Phase 4 stdout. Patch would have under-claimed.
- Marketplace.json sync deferred to `/idd-close` Step 6.5 chain (per repo precedent, same path used by #103 / #102).

## [2.65.0] - 2026-05-20

### Added
Expand Down
2 changes: 1 addition & 1 deletion plugins/issue-driven-dev/MANIFESTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ IDD 的 human-in-the-loop 不是隨意散落在 pipeline 各處的 ad-hoc 確認

罕見情境裡,user 想對自己 issue 起疑("我可能 issue 寫錯了"),可以用 `--review` flag 重開 confirmation loop。Phase 6 報告會從 `verify-gated PASS, ready to merge` 切成 `verify-gated PASS — awaiting human acceptance (re-opened confirmation loop per --review)`。

`--review` **不是 quality gate** —— 它是 opt-in 重開 confirmation loop。Verify 的 falsifiability 不受影響;改變的只是「user 還想自己再過一次」的 explicit 表態。`--review` 是 per-invocation flag,**不是** standing config field —— 一個 exception 不該升格成 standing policy。
`--review` **不是 quality gate** —— 它是 **orchestrator-scope** opt-in 重開 confirmation loop (per #108 DA3)。Verify 的 falsifiability 不受影響;改變的只是「user 還想自己再過一次」的 explicit 表態。`--review` 是 per-invocation flag,**不是** standing config field —— 一個 exception 不該升格成 standing policy。

### auto-merge 的合法性與限制

Expand Down
4 changes: 2 additions & 2 deletions plugins/issue-driven-dev/references/chain-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,12 @@ Refs #<root_1> #<root_2> ... #<chained_1> #<chained_2> ... (roots first, then

...

## Pending review
## Review status

- [x] Diagnose ✓ for all <N> issues
- [x] Implement ✓
- [x] Verify ✓ (per-issue 6-AI ensemble)
- [ ] **Pending: human review of cluster PR + /idd-close #<root> #<chained_1> ... after merge**
- [x] **Verify-gated**: per-issue verify PASS — cluster ready to merge → /idd-close #<root> #<chained_1> ... per issue after merge
```

PR title MUST begin with `chain:` (distinguishes from `cluster:` prefix used by pre-known cluster-PR mode in `idd-implement`/`idd-verify`/`idd-close`).
Expand Down
2 changes: 1 addition & 1 deletion plugins/issue-driven-dev/references/pr-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Refs #${N}
- [x] Diagnose
- [x] Implement (${COMMIT_COUNT} commits)
- [x] Verify
- [ ] **Pending: human review of this PR + /idd-close after merge**
- [x] **Verify-gated**: verify PASS — ready to merge → /idd-close #${NUMBER} after merge

## Related
{follow-up issues, if any}
Expand Down
30 changes: 25 additions & 5 deletions plugins/issue-driven-dev/skills/idd-all-chain/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ for ((i=0; i<${#ARGS[@]}; i++)); do
# v2.65+ #102 — opt-in re-open NSQL confirmation loop.
# Propagated to each chained /idd-all #M --in-chain in Phase 2 so per-issue
# Phase 6 reports also reflect; Phase 4 chain final report also dispatches.
# Messaging-only effect — does NOT make chain wait. Per MANIFESTO
# Orchestrator-scope messaging-only effect (per #108 DA3) — does NOT make chain wait. Per MANIFESTO
# "Human-in-the-loop: IDD 即 NSQL Confirmation Protocol" doctrine.
REVIEW_FLAG="--review" ;;
--cwd=*) CWD_FLAG="${arg#--cwd=}" ;;
Expand Down Expand Up @@ -704,15 +704,35 @@ $FILED_ONLY
EOF
fi

# Verify-gated terminal disposition (v2.65.0+ #102) — dispatch on $REVIEW_FLAG
# Build "Next" steps before the heredoc to avoid the ${VAR:-word} mutex pitfall
# that PR #109 verify (F1) caught and that #108 doctrine now governs.
if [ -n "$REVIEW_FLAG" ]; then
VERIFY_LINE="Verify: verify-gated PASS across cluster — awaiting human acceptance (re-opened confirmation loop per --review)"
NEXT_STEPS=$(cat <<NEXT
Next:
1. Review PR $PR_URL (per --review opt-in)
2. Merge after acceptance (squash recommended — single review surface)
3. /idd-close $REFS_LIST (per-issue closing summary required, no shortcut)
NEXT
)
else
VERIFY_LINE="Verify: verify-gated PASS across cluster — cluster ready to merge"
NEXT_STEPS=$(cat <<NEXT
Next:
1. Merge $PR_URL (squash recommended — single review surface)
2. /idd-close $REFS_LIST (per-issue closing summary required, no shortcut)
NEXT
)
fi

cat <<EOF
Cluster branch: $CLUSTER_BRANCH
Refs: $REFS_LIST
PR: $PR_URL
$VERIFY_LINE

Next:
1. Review PR $PR_URL
2. Merge (squash recommended — single review surface)
3. /idd-close $REFS_LIST (per-issue closing summary required, no shortcut)
$NEXT_STEPS
EOF
```

Expand Down
26 changes: 20 additions & 6 deletions plugins/issue-driven-dev/skills/idd-all/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ for ((i=0; i<${#ARGS[@]}; i++)); do
IN_CHAIN="1" ;;
--review)
# v2.65+ #102 — opt-in re-open NSQL confirmation loop at terminal report.
# Orthogonal to --pr/--no-pr/--in-chain (no mutex). Messaging-only effect:
# Orthogonal to --pr/--no-pr/--in-chain (no mutex). Orchestrator-scope messaging-only effect (per #108 DA3 — humans/CI downstream may react to the changed text, so the flag is messaging-only at orchestrator scope, not necessarily end-to-end):
# Phase 6 report swaps to "awaiting human acceptance" wording. Does NOT
# change idd-all behavior, does NOT make idd-all wait. Per MANIFESTO
# "Human-in-the-loop: IDD 即 NSQL Confirmation Protocol" doctrine.
Expand Down Expand Up @@ -752,7 +752,7 @@ Refs #${N}
- [x] Diagnose ✓
- [x] Implement(${COMMIT_COUNT} commits)
- [x] Verify ✓
- [ ] **Pending: human review of this PR + /idd-close after merge**
- [x] **Verify-gated**: verify PASS — ready to merge → /idd-close #${NUMBER} after merge

## Related
{若有 follow-up issues,列出 #N #M ...}
Expand Down Expand Up @@ -840,7 +840,7 @@ With `--review` (`REVIEW_FLAG="--review"`):
Next: review last ${COMMIT_COUNT} commits (git log -${COMMIT_COUNT}), then run /idd-close #${N}
```

**STOP**。不 auto-merge(PR mode)、不 auto-close(both modes)。Per MANIFESTO doctrine,verify-gated PASS 是 terminal default disposition;auto-merge mechanic 屬 **#37** bulk-solve autopilot 範疇,**不**是 idd-all default。`--review` 是 messaging-only opt-in,不會讓 idd-all 等候 — 它只表態 "user 還想自己再過一次" 並切換 Phase 6 wording。
**STOP**。不 auto-merge(PR mode)、不 auto-close(both modes)。Per MANIFESTO doctrine,verify-gated PASS 是 terminal default disposition;auto-merge mechanic 屬 **#37** bulk-solve autopilot 範疇,**不**是 idd-all default。`--review` 是 **orchestrator-scope messaging-only** opt-in,不會讓 idd-all 等候 — 它只表態 "user 還想自己再過一次" 並切換 Phase 6 wording。(per #108 DA3: orchestrator-scope qualifier matters — humans/CI downstream may react to the changed text differently, so the flag is messaging-only **at orchestrator scope**, not necessarily end-to-end.)

---

Expand Down Expand Up @@ -895,13 +895,27 @@ Phase 0.5 印 `→ Path: PR (unattended) — flag=--pr`,sub-skill args 全帶 `U
Branch: idd/42-bug-login-button-stops-after-3-faile
Commits: 3 (implementation + 0 verify-fix rounds)
PR: https://github.com/owner/repo/pull/87
Verify: PASS
Verify: verify-gated PASS
Follow-ups: (none)

Next: merge https://github.com/owner/repo/pull/87, then run /idd-close #42
```

With `--review` opt-in:

```
✓ idd-all complete (PR mode, --review)
Issue: #42 — bug: login button stops after 3 failed attempts
Branch: idd/42-bug-login-button-stops-after-3-faile
Commits: 3 (implementation + 0 verify-fix rounds)
PR: https://github.com/owner/repo/pull/87
Verify: verify-gated PASS — awaiting human acceptance (re-opened confirmation loop per --review)
Follow-ups: (none)

Next: review PR https://github.com/owner/repo/pull/87, merge, then run /idd-close #42
Next: review PR https://github.com/owner/repo/pull/87, merge after acceptance, then run /idd-close #42
```

`/loop` 自動化 caller 觀察行為與 v2.40.0 完全一致 — feature branch、push、PR 帶 `Refs #42`、無 `Closes`、停在 verified。
`/loop` 自動化 caller 觀察行為與 v2.40.0 完全一致 — feature branch、push、PR 帶 `Refs #42`、無 `Closes`、停在 verified。Per MANIFESTO `Human-in-the-loop` doctrine: `verify-gated PASS, ready to merge` is a state declaration, NOT a `gh pr merge` authorization — autopilot remains #37 territory.

### Trace 2: `(direct-commit, attended)` — HITL 場景

Expand Down
Loading