@hegemonart/get-design-done 1.41.5 → 1.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +49 -0
  4. package/README.md +2 -0
  5. package/dist/claude-code/.claude/skills/add-backlog/SKILL.md +48 -0
  6. package/dist/claude-code/.claude/skills/analyze-dependencies/SKILL.md +95 -0
  7. package/dist/claude-code/.claude/skills/apply-reflections/SKILL.md +92 -0
  8. package/dist/claude-code/.claude/skills/apply-reflections/apply-reflections-procedure.md +170 -0
  9. package/dist/claude-code/.claude/skills/audit/SKILL.md +79 -0
  10. package/dist/claude-code/.claude/skills/bandit-status/SKILL.md +94 -0
  11. package/dist/claude-code/.claude/skills/benchmark/SKILL.md +65 -0
  12. package/dist/claude-code/.claude/skills/bootstrap-ds/SKILL.md +43 -0
  13. package/dist/claude-code/.claude/skills/brief/SKILL.md +128 -0
  14. package/dist/claude-code/.claude/skills/budget/SKILL.md +45 -0
  15. package/dist/claude-code/.claude/skills/cache-manager/SKILL.md +66 -0
  16. package/dist/claude-code/.claude/skills/cache-manager/cache-policy.md +126 -0
  17. package/dist/claude-code/.claude/skills/check-update/SKILL.md +98 -0
  18. package/dist/claude-code/.claude/skills/compare/SKILL.md +82 -0
  19. package/dist/claude-code/.claude/skills/compare/compare-rubric.md +171 -0
  20. package/dist/claude-code/.claude/skills/complete-cycle/SKILL.md +81 -0
  21. package/dist/claude-code/.claude/skills/connections/SKILL.md +71 -0
  22. package/dist/claude-code/.claude/skills/connections/connections-onboarding.md +608 -0
  23. package/dist/claude-code/.claude/skills/continue/SKILL.md +24 -0
  24. package/dist/claude-code/.claude/skills/darkmode/SKILL.md +76 -0
  25. package/dist/claude-code/.claude/skills/darkmode/darkmode-audit-procedure.md +258 -0
  26. package/dist/claude-code/.claude/skills/debug/SKILL.md +41 -0
  27. package/dist/claude-code/.claude/skills/debug/debug-feedback-loops.md +119 -0
  28. package/dist/claude-code/.claude/skills/design/SKILL.md +99 -0
  29. package/dist/claude-code/.claude/skills/design/design-procedure.md +304 -0
  30. package/dist/claude-code/.claude/skills/discover/SKILL.md +72 -0
  31. package/dist/claude-code/.claude/skills/discover/discover-procedure.md +222 -0
  32. package/dist/claude-code/.claude/skills/discuss/SKILL.md +96 -0
  33. package/dist/claude-code/.claude/skills/do/SKILL.md +45 -0
  34. package/dist/claude-code/.claude/skills/explore/SKILL.md +105 -0
  35. package/dist/claude-code/.claude/skills/explore/explore-procedure.md +267 -0
  36. package/dist/claude-code/.claude/skills/export/SKILL.md +30 -0
  37. package/dist/claude-code/.claude/skills/extract-learnings/SKILL.md +98 -0
  38. package/dist/claude-code/.claude/skills/fast/SKILL.md +91 -0
  39. package/dist/claude-code/.claude/skills/figma-extract/SKILL.md +64 -0
  40. package/dist/claude-code/.claude/skills/figma-write/SKILL.md +39 -0
  41. package/dist/claude-code/.claude/skills/graphify/SKILL.md +49 -0
  42. package/dist/claude-code/.claude/skills/health/SKILL.md +99 -0
  43. package/dist/claude-code/.claude/skills/health/health-mcp-detection.md +44 -0
  44. package/dist/claude-code/.claude/skills/health/health-skill-length-report.md +69 -0
  45. package/dist/claude-code/.claude/skills/help/SKILL.md +87 -0
  46. package/dist/claude-code/.claude/skills/list-assumptions/SKILL.md +61 -0
  47. package/dist/claude-code/.claude/skills/locale/SKILL.md +51 -0
  48. package/dist/claude-code/.claude/skills/map/SKILL.md +89 -0
  49. package/dist/claude-code/.claude/skills/migrate/SKILL.md +70 -0
  50. package/dist/claude-code/.claude/skills/new-cycle/SKILL.md +37 -0
  51. package/dist/claude-code/.claude/skills/new-cycle/milestone-completeness-rubric.md +87 -0
  52. package/dist/claude-code/.claude/skills/new-project/SKILL.md +53 -0
  53. package/dist/claude-code/.claude/skills/next/SKILL.md +68 -0
  54. package/dist/claude-code/.claude/skills/note/SKILL.md +48 -0
  55. package/dist/claude-code/.claude/skills/openrouter-status/SKILL.md +86 -0
  56. package/dist/claude-code/.claude/skills/optimize/SKILL.md +97 -0
  57. package/dist/claude-code/.claude/skills/pause/SKILL.md +77 -0
  58. package/dist/claude-code/.claude/skills/peer-cli-add/SKILL.md +88 -0
  59. package/dist/claude-code/.claude/skills/peer-cli-add/peer-cli-protocol.md +161 -0
  60. package/dist/claude-code/.claude/skills/peer-cli-customize/SKILL.md +90 -0
  61. package/dist/claude-code/.claude/skills/peers/SKILL.md +96 -0
  62. package/dist/claude-code/.claude/skills/plan/SKILL.md +105 -0
  63. package/dist/claude-code/.claude/skills/plan/plan-procedure.md +278 -0
  64. package/dist/claude-code/.claude/skills/plant-seed/SKILL.md +48 -0
  65. package/dist/claude-code/.claude/skills/pr-branch/SKILL.md +32 -0
  66. package/dist/claude-code/.claude/skills/progress/SKILL.md +95 -0
  67. package/dist/claude-code/.claude/skills/quality-gate/SKILL.md +90 -0
  68. package/dist/claude-code/.claude/skills/quality-gate/threat-modeling.md +101 -0
  69. package/dist/claude-code/.claude/skills/quick/SKILL.md +44 -0
  70. package/dist/claude-code/.claude/skills/reapply-patches/SKILL.md +32 -0
  71. package/dist/claude-code/.claude/skills/recall/SKILL.md +75 -0
  72. package/dist/claude-code/.claude/skills/reflect/SKILL.md +85 -0
  73. package/dist/claude-code/.claude/skills/reflect/procedures/capability-gap-scan.md +120 -0
  74. package/dist/claude-code/.claude/skills/report-issue/SKILL.md +53 -0
  75. package/dist/claude-code/.claude/skills/report-issue/report-issue-procedure.md +120 -0
  76. package/dist/claude-code/.claude/skills/resume/SKILL.md +93 -0
  77. package/dist/claude-code/.claude/skills/review-backlog/SKILL.md +46 -0
  78. package/dist/claude-code/.claude/skills/review-decisions/SKILL.md +42 -0
  79. package/dist/claude-code/.claude/skills/roi/SKILL.md +54 -0
  80. package/dist/claude-code/.claude/skills/rollout-status/SKILL.md +35 -0
  81. package/dist/claude-code/.claude/skills/router/SKILL.md +89 -0
  82. package/dist/claude-code/.claude/skills/router/capability-gap-emitter.md +65 -0
  83. package/dist/claude-code/.claude/skills/router/router-pick-emitter.md +78 -0
  84. package/dist/claude-code/.claude/skills/router/router-rules.md +84 -0
  85. package/dist/claude-code/.claude/skills/scan/SKILL.md +92 -0
  86. package/dist/claude-code/.claude/skills/scan/scan-procedure.md +732 -0
  87. package/dist/claude-code/.claude/skills/settings/SKILL.md +87 -0
  88. package/dist/claude-code/.claude/skills/ship/SKILL.md +48 -0
  89. package/dist/claude-code/.claude/skills/sketch/SKILL.md +78 -0
  90. package/dist/claude-code/.claude/skills/sketch-wrap-up/SKILL.md +92 -0
  91. package/dist/claude-code/.claude/skills/skill-manifest/SKILL.md +79 -0
  92. package/dist/claude-code/.claude/skills/spike/SKILL.md +67 -0
  93. package/dist/claude-code/.claude/skills/spike-wrap-up/SKILL.md +86 -0
  94. package/dist/claude-code/.claude/skills/start/SKILL.md +67 -0
  95. package/dist/claude-code/.claude/skills/start/start-procedure.md +115 -0
  96. package/dist/claude-code/.claude/skills/stats/SKILL.md +51 -0
  97. package/dist/claude-code/.claude/skills/style/SKILL.md +71 -0
  98. package/dist/claude-code/.claude/skills/style/style-doc-procedure.md +150 -0
  99. package/dist/claude-code/.claude/skills/synthesize/SKILL.md +94 -0
  100. package/dist/claude-code/.claude/skills/timeline/SKILL.md +66 -0
  101. package/dist/claude-code/.claude/skills/todo/SKILL.md +64 -0
  102. package/dist/claude-code/.claude/skills/turn-closeout/SKILL.md +95 -0
  103. package/dist/claude-code/.claude/skills/undo/SKILL.md +31 -0
  104. package/dist/claude-code/.claude/skills/unlock-decision/SKILL.md +54 -0
  105. package/dist/claude-code/.claude/skills/update/SKILL.md +56 -0
  106. package/dist/claude-code/.claude/skills/using-gdd/SKILL.md +78 -0
  107. package/dist/claude-code/.claude/skills/verify/SKILL.md +113 -0
  108. package/dist/claude-code/.claude/skills/verify/verify-procedure.md +512 -0
  109. package/dist/claude-code/.claude/skills/warm-cache/SKILL.md +81 -0
  110. package/dist/claude-code/.claude/skills/watch-authorities/SKILL.md +82 -0
  111. package/dist/claude-code/.claude/skills/zoom-out/SKILL.md +26 -0
  112. package/package.json +4 -1
  113. package/reference/DEPRECATIONS.md +14 -0
  114. package/reference/registry.json +7 -0
  115. package/reference/skill-placeholders.md +71 -0
  116. package/scripts/lib/build/factory.cjs +62 -0
  117. package/scripts/lib/build/harness-configs.cjs +64 -0
  118. package/sdk/cli/commands/build.ts +106 -0
  119. package/sdk/cli/index.js +84 -2
  120. package/sdk/cli/index.ts +7 -0
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: gdd-pause
3
+ description: "Write a numbered checkpoint so work can resume in a new session without re-running completed stages."
4
+ argument-hint: "[context note]"
5
+ tools: Read, Write, Bash, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ @reference/retrieval-contract.md
10
+ @reference/cycle-handoff-preamble.md
11
+
12
+ # /gdd:pause
13
+
14
+ Captures enough state that a killed or stopped session can resume cleanly via `/gdd:resume` or `/gdd:continue`.
15
+
16
+ Each invocation writes an **immutable numbered checkpoint** — it does not overwrite previous pauses. This enables branched cycles: you can pause, take a detour via `/gdd:sketch`, compare, and resume an older snapshot via `/gdd:resume N`.
17
+
18
+ ## Steps
19
+
20
+ 1. `mcp__gdd_state__get` → snapshot current pipeline state. Extract:
21
+ - Current `stage` and `cycle`
22
+ - `last_checkpoint` timestamp
23
+ - `task_progress` and `status` for the current run
24
+ - Open todos (from `.design/TODO.md` if present — this file is outside the MCP catalog, so `Read` is still used)
25
+ - Active sketch/spike directories (scan `.design/sketches/` and `.design/spikes/` for in-progress markers)
26
+
27
+ 2. **Determine checkpoint number**: run
28
+ ```bash
29
+ ls .design/checkpoints/ 2>/dev/null | grep -E '^[0-9]+' | sort -n | tail -1
30
+ ```
31
+ Next checkpoint = last number + 1 (or `01` if none exist).
32
+
33
+ 3. **Collect context**: if no context argument was passed, ask (AskUserQuestion):
34
+ "What are you in the middle of? (optional context to capture)"
35
+
36
+ 4. **Flip status via MCP** so `/gdd:resume` can detect the pause and recover the prior status:
37
+ 1. `mcp__gdd_state__set_status` with `status: "paused:<prior-status>"` — the `paused:` prefix preserves the prior status for resume parsing.
38
+ 2. If the user supplied a context/blocker message: `mcp__gdd_state__add_blocker` with `{ stage: <current>, date: <today>, text: <message> }`.
39
+ 3. `mcp__gdd_state__checkpoint` to stamp `last_checkpoint` via MCP.
40
+
41
+ 5. **Write numbered checkpoint**: create `.design/checkpoints/` with `mkdir -p`, then write:
42
+ ```
43
+ .design/checkpoints/NN-<stage>-<ISO-date>.md
44
+ ```
45
+ e.g. `01-design-2026-04-24.md`
46
+
47
+ Content:
48
+ ```markdown
49
+ # Checkpoint NN
50
+ **Saved**: <ISO timestamp>
51
+ **Stage**: <stage>
52
+ **Cycle**: <cycle>
53
+ **In progress**: <task description + wave/index>
54
+ **Next**: <next step>
55
+ **Context**: <user note or "none">
56
+ **Active sketch**: <path or none>
57
+ **Open todos**: <N items (see .design/TODO.md)>
58
+ **Completed this session**: <list>
59
+ ```
60
+
61
+ 6. **Update HANDOFF.md pointer**: write `.design/HANDOFF.md` with:
62
+ ```markdown
63
+ # Session Handoff (pointer)
64
+ Latest checkpoint: `.design/checkpoints/NN-<stage>-<ISO-date>.md`
65
+ Run `/gdd:resume` to restore, or `/gdd:resume N` for a specific checkpoint.
66
+ ```
67
+
68
+ 7. Print: "Checkpoint NN saved. Run `/gdd:resume` or `/gdd:continue` to pick back up."
69
+
70
+ ## Do Not
71
+
72
+ - Do not mutate STATE.md directly — all STATE.md writes go through the `gdd-state` MCP tools above. Checkpoint files + HANDOFF.md are sibling artifacts, written with `Write`.
73
+ - Do not abort in-progress sketches; just record them.
74
+ - Do not delete previous checkpoint files.
75
+ - Do not call `mcp__gdd_state__transition_stage` — pause is status-only, never a stage transition.
76
+
77
+ ## PAUSE COMPLETE
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: peer-cli-add
3
+ description: "Guided ladder for adding a brand-new peer (not in the v1.27 capability matrix) to gdd's peer-CLI delegation layer. Walks the verification ladder, scaffolds an adapter, updates the capability matrix, and handles Windows quirks. Run when you discover a new peer CLI you want gdd to delegate to."
4
+ argument-hint: "<new-peer-id> <peer-binary> <protocol: acp|asp>"
5
+ tools: Read, Edit, Write, Bash, Grep
6
+ ---
7
+
8
+ <!-- Procedural pattern adapted from greenpolo/cc-multi-cli's `multi-cli-anything` skill (Apache 2.0). See NOTICE for full attribution. -->
9
+
10
+ # peer-cli-add
11
+
12
+ ## Role
13
+
14
+ You add a brand-new peer-CLI to gdd's delegation layer. v1.27.0 ships 5 peers (codex, gemini, cursor, copilot, qwen). When the user wants a 6th — a peer that exists in the wild but isn't in our capability matrix — you walk them through the verification ladder and produce the 3-file footprint that integrates the peer cleanly. The procedural ladder, adapter scaffold shape, and verification gate live in `./peer-cli-protocol.md`.
15
+
16
+ ## Invocation Contract
17
+
18
+ - **Required input:** `<new-peer-id>` (lowercase, e.g. `aider`), `<peer-binary>` (executable, e.g. `aider` or `aider.cmd`), `<protocol>` (`acp` or `asp`).
19
+ - **Output:** a 3-file diff + a verification report.
20
+
21
+ ## Procedure
22
+
23
+ ### Step 1 — Verification ladder (no edits yet)
24
+
25
+ Walk the four-rung ladder in `./peer-cli-protocol.md` §"Verification ladder":
26
+
27
+ 1. Binary on PATH (`which` / `where`).
28
+ 2. Handshake test (`initialize` JSON-RPC over stdin; capture reply).
29
+ 3. Model-ID `-preview`-suffix trap (capture model list).
30
+ 4. Windows quirks (confirm `spawn-cmd.cjs` picks up `.cmd`).
31
+
32
+ Stop at the first failing rung. Do not proceed to scaffold a broken adapter.
33
+
34
+ ### Step 2 — Generate the adapter scaffold
35
+
36
+ Copy one of `scripts/lib/peer-cli/adapters/{codex,gemini,cursor,copilot,qwen}.cjs` as the template (pick by protocol — ASP for `<protocol>=asp`, else ACP). Replace `ROLES_CLAIMED`, `ROLE_PREFIX`, `name`, `protocol` with the user's values from Step 1. The full adapter scaffold shape — `claims`, `dispatch`, exports — lives in `./peer-cli-protocol.md` §"Adapter scaffold shape" so consumers (codex/gemini/cursor/copilot/qwen) stay byte-similar.
37
+
38
+ Write the result to `scripts/lib/peer-cli/adapters/<new-peer-id>.cjs`.
39
+
40
+ ### Step 3 — Three-file footprint
41
+
42
+ Per `./peer-cli-protocol.md` §"Three-file footprint":
43
+
44
+ 1. New adapter at `scripts/lib/peer-cli/adapters/<new-peer-id>.cjs` (Step 2).
45
+ 2. Edit `scripts/lib/install/runtimes.cjs` — add `peerBinary` field (platform-aware: `<peer-binary>.cmd` on Windows, plain on POSIX).
46
+ 3. Edit `reference/peer-cli-capabilities.md` — add matrix row + per-peer section citing the Step 1 verification evidence.
47
+ 4. Edit `scripts/lib/peer-cli/registry.cjs` — append to `CAPABILITY_MATRIX` (and `KNOWN_PEERS` if separate).
48
+
49
+ ### Step 4 — Verification gate
50
+
51
+ Run the four-check gate in `./peer-cli-protocol.md` §"Verification gate": `tsc --noEmit`, peer-cli tests, reference-registry round-trip, frontmatter validator. Any failure — surface error + offer revert.
52
+
53
+ ### Step 5 — Surface the summary
54
+
55
+ ```
56
+ ## peer-cli-add summary
57
+ Added peer: <new-peer-id> (protocol: <protocol>)
58
+ Roles claimed: <role-1>, <role-2>
59
+
60
+ Files modified:
61
+ ✓ scripts/lib/peer-cli/adapters/<new-peer-id>.cjs (new)
62
+ ✓ scripts/lib/install/runtimes.cjs (added peerBinary entry)
63
+ ✓ reference/peer-cli-capabilities.md (added matrix row + per-peer section)
64
+ ✓ scripts/lib/peer-cli/registry.cjs (added to CAPABILITY_MATRIX)
65
+
66
+ Verification:
67
+ ✓ tsc clean
68
+ ✓ existing peer-cli tests pass
69
+ ✓ reference-registry round-trip valid
70
+ ✓ frontmatter validator: 0 violations
71
+
72
+ Next steps:
73
+ - /gdd:peers to confirm the new peer appears in the matrix.
74
+ - skills/peer-cli-customize/SKILL.md to wire delegate_to: <new-peer-id>-<role> on agents.
75
+ - Phase 23.5 bandit needs ~5 cycles of data before a posterior recommendation surfaces.
76
+ ```
77
+
78
+ ## Edge cases
79
+
80
+ See `./peer-cli-protocol.md` §"Edge cases" for: peer speaks neither protocol, claims unknown role, claims all roles (generalist), peer-ID conflicts, and testing-only peers.
81
+
82
+ ## Record
83
+
84
+ Append one JSONL line to `.design/skill-records.jsonl`:
85
+
86
+ ```json
87
+ {"skill": "peer-cli-add", "ts": "<ISO timestamp>", "new_peer": "<new-peer-id>", "protocol": "<protocol>", "roles_claimed": ["<role-1>"], "verification_passed": true}
88
+ ```
@@ -0,0 +1,161 @@
1
+ ---
2
+ name: peer-cli-protocol
3
+ type: heuristic
4
+ version: 1.0.0
5
+ phase: 28.5
6
+ tags: [peer-cli, acp, asp, protocol, verification-ladder, add-peer, customize, cc-multi-cli]
7
+ last_updated: 2026-05-18
8
+ ---
9
+
10
+ <!-- Procedural patterns adapted from greenpolo/cc-multi-cli (Apache 2.0). See ../NOTICE for full attribution. -->
11
+
12
+ # Peer-CLI Protocol — Add + Customize Procedures
13
+
14
+ Procedural reference for the peer-CLI delegation layer. Centralizes the verification
15
+ ladder, adapter scaffolding shape, rewire-discipline, and Windows quirks so the three
16
+ peer-CLI skills (`peers`, `peer-cli-add`, `peer-cli-customize`) can cross-link rather
17
+ than each carry the full procedure inline. See `./peer-protocols.md` for the protocol
18
+ shape (JSON-RPC framing, initialize handshake, error envelope); this file is the
19
+ procedure layer that sits above it.
20
+
21
+ ## Verification ladder (run before any code edit when adding a peer)
22
+
23
+ When a user wants to add a brand-new peer to the capability matrix, walk these four
24
+ rungs in order. Stop at the first rung that fails — do not proceed to scaffold a broken
25
+ adapter.
26
+
27
+ ### Rung 1 — Binary on PATH
28
+
29
+ `which <peer-binary>` (POSIX) or `where <peer-binary>` (Windows). If exit non-zero, stop
30
+ and ask the user to install the peer first. Adapters cannot be tested without the binary.
31
+
32
+ ### Rung 2 — Handshake test
33
+
34
+ Spawn the peer with the protocol entry point:
35
+
36
+ - **ACP peers** — `<peer-binary> acp` (or whatever the peer documents — Gemini uses
37
+ `gemini acp`; some peers use a flag).
38
+ - **ASP peers** — `<peer-binary> app-server` (Codex convention; other ASP peers may
39
+ differ).
40
+
41
+ Send an `initialize` JSON-RPC message over stdin with `protocolVersion: '2025-06-18'`
42
+ (ACP) or `service_name: 'gdd_peer_delegation'` (ASP). Capture the reply on stdout. A
43
+ valid JSON-RPC response with `result.protocolVersion` (ACP) or `result.threadId` (ASP)
44
+ means the peer speaks the protocol. No valid reply within 5 seconds means either
45
+ wrong-protocol or non-standard entry point — stop and ask the user for the correct
46
+ invocation.
47
+
48
+ ### Rung 3 — Model-ID `-preview`-suffix trap
49
+
50
+ Many peers expose preview models with a `-preview` suffix (e.g., `gpt-5-preview` vs
51
+ `gpt-5`). The suffix drifts: today's preview is tomorrow's GA. Capture the peer's model
52
+ list (most peers expose `<peer-binary> models` or similar) and document parent names in
53
+ the new entry's `provider_model_id` field so the runtime-models entry survives the
54
+ suffix flipping.
55
+
56
+ ### Rung 4 — Windows quirks
57
+
58
+ If the peer-binary ends in `.cmd` and the user is on Windows, confirm
59
+ `scripts/lib/peer-cli/spawn-cmd.cjs` will pick it up. That module handles `.cmd`
60
+ detection per Plan 27-03 / D-04. Document any other Windows-specific quirks in the new
61
+ adapter's leading comment.
62
+
63
+ ## Adapter scaffold shape
64
+
65
+ Use the existing five adapters at `../scripts/lib/peer-cli/adapters/{codex,gemini,cursor,copilot,qwen}.cjs`
66
+ as templates. Pick the closest match by protocol (ASP if `<protocol> = asp`, otherwise
67
+ ACP). Each adapter exports:
68
+
69
+ - `claims(role)` — boolean predicate against `ROLES_CLAIMED`.
70
+ - `dispatch({command, args, cwd, env}, role, text, opts)` — async dispatch with optional
71
+ `opts.onNotification` callback.
72
+ - `ROLES_CLAIMED` — array of role identifiers the peer claims.
73
+ - `ROLE_PREFIX` — per-role prompt prefix object (empty string when no prefix needed).
74
+ - `name`, `protocol` — string identifiers.
75
+
76
+ Canonical skeleton (ACP variant; for ASP swap to `createAspClient` from `asp-client.cjs`):
77
+
78
+ ```js
79
+ 'use strict';
80
+ const { createAcpClient } = require('../acp-client.cjs');
81
+
82
+ const ROLES_CLAIMED = ['<role-1>', '<role-2>'];
83
+ const ROLE_PREFIX = { '<role-1>': '', '<role-2>': '' };
84
+
85
+ function claims(role) { return ROLES_CLAIMED.includes(role); }
86
+ async function dispatch({ command, args, cwd, env }, role, text, opts) {
87
+ if (!claims(role)) throw new Error(`<peer-id> does not claim role: ${role}`);
88
+ const client = createAcpClient({ command, args, cwd, env });
89
+ try {
90
+ await client.initialize({ protocolVersion: '2025-06-18' });
91
+ return await client.prompt((ROLE_PREFIX[role] || '') + text, { onNotification: opts?.onNotification });
92
+ } finally { await client.close(); }
93
+ }
94
+ module.exports = { claims, dispatch, ROLES_CLAIMED, ROLE_PREFIX, name: '<peer-id>', protocol: '<protocol>' };
95
+ ```
96
+
97
+ ## Three-file footprint (peer add)
98
+
99
+ A new peer integrates cleanly with a 3-file diff plus the capability-matrix doc:
100
+
101
+ 1. **`scripts/lib/peer-cli/adapters/<new-peer-id>.cjs`** — new adapter.
102
+ 2. **`scripts/lib/install/runtimes.cjs`** — add a `peerBinary` field (platform-aware:
103
+ `<binary>.cmd` on Windows, plain `<binary>` elsewhere).
104
+ 3. **`reference/peer-cli-capabilities.md`** — add a row to the capability matrix and a
105
+ per-peer section with the verification evidence from Rung 1–4 above.
106
+ 4. **`scripts/lib/peer-cli/registry.cjs`** — append to `CAPABILITY_MATRIX` (and
107
+ `KNOWN_PEERS` if separate).
108
+
109
+ ## Rewire discipline (customize)
110
+
111
+ When rewiring `delegate_to:` on a specific agent's frontmatter:
112
+
113
+ - Validate the new value against the capability matrix BEFORE editing the file. The
114
+ peer must exist; the role must be in the peer's `claims` list.
115
+ - Three frontmatter cases: field absent + add it, field present + change it, field
116
+ present + remove it (revert to default).
117
+ - Re-run `npm run validate:frontmatter` after every edit; offer to revert if it fails.
118
+ - The peer must also be in `.design/config.json#peer_cli.enabled_peers` for dispatch
119
+ to fire at runtime — but that's a runtime concern, not a frontmatter validation
120
+ concern.
121
+
122
+ ## Verification gate (after any peer-CLI change)
123
+
124
+ Run, in order, until each passes:
125
+
126
+ 1. `npx tsc --noEmit` — clean.
127
+ 2. `node --test tests/peer-cli-registry.test.cjs tests/peer-cli-adapters.test.cjs` —
128
+ no regression on existing tests.
129
+ 3. `node --test tests/reference-registry.test.cjs` — capability-matrix doc is in
130
+ `reference/registry.json`.
131
+ 4. `npm run validate:frontmatter` — no agent's `delegate_to:` field is broken.
132
+
133
+ Any failure: surface the error and offer to revert.
134
+
135
+ ## Edge cases
136
+
137
+ - **Peer speaks neither ACP nor ASP** — gdd v1.27 ships only those two protocols. Stop
138
+ and document the gap in `.design/RESEARCH.md` for a future phase.
139
+ - **Peer claims a role no existing peer claims** — fine, capability matrix is open. But
140
+ document the role in `peer-cli-capabilities.md` so future peers can compete on it.
141
+ - **Peer claims ALL roles** (generalist) — accept, but flag in the per-peer section.
142
+ Generalist peers are usually weaker than specialist peers; the bandit will sort it
143
+ out via measurement.
144
+ - **Peer-ID collides with an existing peer** — fail. Peer-IDs must be globally unique.
145
+ - **Rewire target peer not in capability matrix** — direct user to `peer-cli-add` first;
146
+ do not allow the frontmatter edit until the peer exists in the matrix.
147
+ - **Rewire target role peer does not claim** — refuse with a list of what the peer DOES
148
+ claim. Suggest a closer match when obvious.
149
+
150
+ ## Cross-references
151
+
152
+ - `./peer-protocols.md` — protocol-level reference (JSON-RPC framing, handshake shape).
153
+ - `./peer-cli-capabilities.md` — capability matrix doc (per-peer claimed roles).
154
+ - `../scripts/lib/peer-cli/registry.cjs` (Plan 27-05) — capability-matrix data source.
155
+ - `../scripts/lib/peer-cli/adapters/*.cjs` (Plan 27-04) — adapter template.
156
+ - `../scripts/lib/peer-cli/spawn-cmd.cjs` (Plan 27-03) — Windows `.cmd` handling.
157
+ - `../scripts/lib/install/runtimes.cjs` (Plan 27-11) — `peerBinary` field per runtime.
158
+ - `../skills/peers/SKILL.md` — discovery surface.
159
+ - `../skills/peer-cli-add/SKILL.md` — add-peer flow.
160
+ - `../skills/peer-cli-customize/SKILL.md` — rewire flow.
161
+ - `../NOTICE` — Apache 2.0 attribution to greenpolo/cc-multi-cli.
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: peer-cli-customize
3
+ description: "Rewire role->peer mappings on a per-agent basis. File-edit-driven (touches frontmatter delegate_to: per agent), no runtime config layer. Run when you want a specific agent to delegate to a different peer than the default capability-matrix mapping suggests."
4
+ argument-hint: "[<agent-name>] [<new-delegate-target>]"
5
+ tools: Read, Edit, Bash, Grep
6
+ ---
7
+
8
+ <!-- Procedural pattern adapted from greenpolo/cc-multi-cli's `customize` skill (Apache 2.0). See NOTICE for full attribution. -->
9
+
10
+ # peer-cli-customize
11
+
12
+ ## Role
13
+
14
+ You help the user rewire which peer-CLI delegate handles which agent's calls. The mechanism is direct file-edits to agent frontmatter (`delegate_to:` field added in Plan 27-06) — there is no runtime config layer. Your job is to make this safe and validatable. The rewire discipline (per-edit validation, three frontmatter cases, validator gate) lives in `./../peer-cli-add/peer-cli-protocol.md` §"Rewire discipline" so the procedure stays canonical across consumers.
15
+
16
+ ## Invocation Contract
17
+
18
+ - **Optional input**: agent-name + new delegate target. If absent, the skill runs in interactive discovery mode.
19
+ - **Output**: a diff summary listing each `agents/*.md` file modified, the old vs new `delegate_to:` value, and the validation result.
20
+
21
+ ## Procedure
22
+
23
+ ### Step 1 — Show current state
24
+
25
+ Read the capability matrix from `scripts/lib/peer-cli/registry.cjs#describeCapabilities()`. Surface the 5 peers and their claimed roles to the user. Then scan `agents/*.md` and grep for `delegate_to:` frontmatter values. Render a two-column table (`Agent | delegate_to (current)`) listing every agent's current setting (or `(unset)` for absent fields).
26
+
27
+ ### Step 2 — Confirm rewire intent
28
+
29
+ Accept the user's explicit `<agent-name> <new-delegate-target>` arguments OR ask: "Which agent do you want to rewire? What should `delegate_to:` become?"
30
+
31
+ Valid `<new-delegate-target>` values:
32
+
33
+ - `<peer>-<role>` from the capability matrix (e.g., `gemini-research`, `codex-execute`, `cursor-debug`, `cursor-plan`, `copilot-review`, `copilot-research`, `qwen-write`).
34
+ - `none` — explicit opt-out.
35
+ - Empty / `(unset)` — remove the field entirely; revert to default behavior.
36
+
37
+ ### Step 3 — Validate the proposed rewire
38
+
39
+ Cross-check against the capability matrix per `./../peer-cli-add/peer-cli-protocol.md` §"Rewire discipline":
40
+
41
+ 1. The peer must exist in the matrix.
42
+ 2. The role must be in the peer's `claims` list.
43
+ 3. Runtime allowlisting (`peer_cli.enabled_peers`) is a runtime concern, NOT a frontmatter validation concern.
44
+
45
+ If validation fails, surface the error and stop. Do not edit the file.
46
+
47
+ ### Step 4 — Apply the edit
48
+
49
+ Use the `Edit` tool. Three cases (per `./../peer-cli-add/peer-cli-protocol.md` §"Rewire discipline"):
50
+
51
+ - **Field absent, user wants to add:** insert `delegate_to: <new-target>` into frontmatter (between `default-tier:` and the next field, or at the end of frontmatter).
52
+ - **Field present, user wants to change:** replace the value; preserve indentation.
53
+ - **Field present, user wants to remove:** delete the entire `delegate_to:` line.
54
+
55
+ ### Step 5 — Re-validate
56
+
57
+ Run `npm run validate:frontmatter`. Confirm the modified agent passes. If validation fails, surface the error and offer to revert (re-run `Edit` with inverse old/new strings).
58
+
59
+ ### Step 6 — Surface a diff summary
60
+
61
+ ```
62
+ ## Rewire summary
63
+ ✓ design-verifier: delegate_to: gemini-research → cursor-debug
64
+ ✓ design-reflector: delegate_to (unset) → codex-execute
65
+
66
+ frontmatter validator: 0 violations (40 files checked)
67
+ Next time these agents are spawned, session-runner dispatches through the new peer.
68
+
69
+ Verify: /gdd:peers (shows updated allowlist + capability matrix).
70
+ ```
71
+
72
+ ## Edge cases
73
+
74
+ See `./../peer-cli-add/peer-cli-protocol.md` §"Edge cases" for: rewire-to-unmatrixed-peer (direct user to `peer-cli-add` first), rewire-to-unclaimed-role (refuse with helpful list), bulk-rewire (require explicit confirmation), validator-fails-post-edit (revert and surface).
75
+
76
+ ## Cross-references
77
+
78
+ - `./../peer-cli-add/peer-cli-protocol.md` — rewire discipline, three frontmatter cases, edge cases.
79
+ - `scripts/validate-frontmatter.ts` (Plan 27-06) — `delegate_to` validation.
80
+ - `scripts/lib/peer-cli/registry.cjs` (Plan 27-05) — capability matrix.
81
+ - `skills/peer-cli-add/SKILL.md` — for adding a NEW peer (this skill rewires among existing peers).
82
+ - `.planning/phases/27-peer-cli-delegation/CONTEXT.md` D-06 — decision lineage.
83
+
84
+ ## Record
85
+
86
+ After execution, append one JSONL line to `.design/skill-records.jsonl`:
87
+
88
+ ```json
89
+ {"skill": "peer-cli-customize", "ts": "<ISO timestamp>", "agents_rewired": ["design-verifier", "design-reflector"], "validator_passed": true}
90
+ ```
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: gdd-peers
3
+ description: "Discover peer-CLI capability matrix — which of {codex, gemini, cursor, copilot, qwen} are installed, allowlisted in .design/config.json, and (if Phase 23.5 has data) their cost/quality delta vs local. Single command, no flags. Read by users investigating delegation setup."
4
+ argument-hint: ""
5
+ tools: Read, Bash
6
+ ---
7
+
8
+ # gdd-peers
9
+
10
+ ## Role
11
+
12
+ You are a deterministic discovery skill. You do not spawn agents and do not delegate to peers. You read `scripts/lib/install/runtimes.cjs`, `scripts/lib/peer-cli/registry.cjs`, `.design/config.json`, and (optionally) `.design/telemetry/posterior.json` (canonical path declared by `bandit-router.cjs`'s `DEFAULT_POSTERIOR_PATH`), then emit a single Markdown table summarizing peer-CLI status. Protocol-level handshake details live in `./../peer-cli-add/peer-cli-protocol.md`.
13
+
14
+ ## Invocation Contract
15
+
16
+ - **Input**: none. The skill takes no arguments.
17
+ - **Output**: a Markdown capability-matrix table to stdout. The table is the entire output.
18
+
19
+ ## Procedure
20
+
21
+ ### 1. Load runtime + capability matrix
22
+
23
+ Read `scripts/lib/install/runtimes.cjs` (14 entries; 5 carry `peerBinary`) and `scripts/lib/peer-cli/registry.cjs#describeCapabilities()`. The canonical declared matrix:
24
+
25
+ | Peer | Roles claimed | Protocol |
26
+ |---------|--------------------------|----------|
27
+ | codex | execute | ASP |
28
+ | gemini | research, exploration | ACP |
29
+ | cursor | debug, plan | ACP |
30
+ | copilot | review, research | ACP |
31
+ | qwen | write | ACP |
32
+
33
+ ### 2. Detect installation
34
+
35
+ For each peer, run `which <peerBinary>` (POSIX) or `where <peerBinary>` (Windows). Exit 0 → installed; non-zero → not installed.
36
+
37
+ ### 3. Read allowlist
38
+
39
+ Read `.design/config.json#peer_cli.enabled_peers` (array of peer-IDs). Default `[]` (opt-in required). Missing file or path = empty.
40
+
41
+ ### 4. (Optional) Read posterior reward-delta
42
+
43
+ Once Phase 27.5 has fired across enough spawns, `.design/telemetry/posterior.json` carries per-`(agent, bin, delegate, tier)` arms with measured reward. For each peer-id:
44
+
45
+ 1. Filter `arms` array: `peerArms` where `delegate === <peer-id>`; `localArms` where `delegate === 'none'` OR `delegate === undefined` (Phase 23.5 legacy slice treated as local-call).
46
+ 2. Require `peerArms` and `localArms` both non-empty. Else `(no data yet)`.
47
+ 3. Compute pooled means: `mean = sum(alpha) / (sum(alpha) + sum(beta))` over each slice.
48
+ 4. `delta_pct = (peerMean - localMean) / localMean`.
49
+ 5. Require `sum(arm.count)` ≥ 3 in each slice. Else `(no data yet)`.
50
+ 6. Render: `+X% reward` (delta > 0.01), `-X% reward` (delta < -0.01), or `~equal` (`abs(delta) < 0.01`), where `X = round(abs(delta_pct) * 100)`.
51
+
52
+ Reward is the Phase 23.5 lexicographic (correctness first, cost tiebreaker — see `scripts/lib/bandit-router.cjs` `computeReward()`). Cost-only deltas live in `cost-arbitrage.cjs` (Phase 26-06).
53
+
54
+ ### 5. Render the table
55
+
56
+ ```
57
+ ## Peer-CLI Capability Matrix
58
+
59
+ | Peer | Installed | Allowlisted | Claimed roles | Posterior delta vs local |
60
+ |---------|-----------|-------------|--------------------------|--------------------------|
61
+ | codex | ✓ | ✓ | execute | -12% reward |
62
+ | gemini | ✓ | ✓ | research, exploration | -8% reward |
63
+ | cursor | ✗ | ✗ | debug, plan | (not installed) |
64
+ | copilot | ✓ | ✗ | review, research | (opt-in disabled) |
65
+ | qwen | ✓ | ✓ | write | (no data yet) |
66
+
67
+ > Tip: Enable peers via `.design/config.json#peer_cli.enabled_peers`.
68
+ > See `reference/peer-cli-capabilities.md` for the full capability matrix.
69
+ > See `skills/peer-cli-customize/SKILL.md` to rewire role->peer mappings per agent.
70
+ ```
71
+
72
+ **Third-column rules** (top-down precedence):
73
+
74
+ - `Installed = ✗` → `(not installed)`.
75
+ - `Allowlisted = ✗` → `(opt-in disabled)`.
76
+ - Posterior missing → `(no data yet)`.
77
+ - < 3 pulls per side → `(no data yet)`.
78
+ - Else compute the reward-delta per Step 4.
79
+
80
+ ### 6. Done
81
+
82
+ The table IS the output. No follow-up prose. Users act on it: `(opt-in disabled)` → enable in `.design/config.json`; `(not installed)` → install the peer CLI; concrete deltas → trust the bandit or override per-agent via `skills/peer-cli-customize`.
83
+
84
+ ## Cross-references
85
+
86
+ - `./../peer-cli-add/peer-cli-protocol.md` — ACP/ASP handshake + adapter scaffold (procedure ref shared with peer-cli-add/customize).
87
+ - `./reference/peer-cli-capabilities.md` (Plan 27-05) — full capability matrix doc.
88
+ - `scripts/lib/peer-cli/registry.cjs` (Plan 27-05), `scripts/lib/install/runtimes.cjs` (Plan 27-11), `skills/peer-cli-customize/SKILL.md`, `skills/peer-cli-add/SKILL.md`, `.planning/phases/27-peer-cli-delegation/CONTEXT.md` D-10.
89
+
90
+ ## Record
91
+
92
+ Append one JSONL line to `.design/skill-records.jsonl`:
93
+
94
+ ```json
95
+ {"skill": "gdd-peers", "ts": "<ISO timestamp>", "peers_detected": ["codex"], "peers_allowlisted": ["codex"], "had_posterior": false}
96
+ ```
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: plan
3
+ description: "Stage 3 of 5 orchestrator that reads DESIGN-CONTEXT.md, runs optional research (phase-researcher / pattern-mapper / assumptions-analyzer / synthesizer), spawns design-planner + design-plan-checker, and writes DESIGN-PLAN.md. Use when DESIGN-CONTEXT.md is locked and you need a wave-ordered execution plan."
4
+ argument-hint: "[--auto] [--parallel]"
5
+ user-invocable: true
6
+ tools: Read, Write, Bash, Glob, Task, AskUserQuestion, ToolSearch, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__add_decision, mcp__gdd_state__add_must_have, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint, mcp__gdd_state__probe_connections
7
+ ---
8
+
9
+ # Get Design Done — Plan
10
+
11
+ **Stage 3 of 5** in the get-design-done pipeline. Thin orchestrator. All planning intelligence lives in `agents/design-planner.md`.
12
+
13
+ Full procedure detail: `./plan-procedure.md`.
14
+
15
+ ---
16
+
17
+ ## Stage entry
18
+
19
+ 1. `mcp__gdd_state__transition_stage` with `to: "plan"`. Gate failure surfaces `error.context.blockers`; do not advance.
20
+ 2. `mcp__gdd_state__get` -> snapshot `state` for `<position>`, `<connections>`, `<must_haves>`, `<blockers>`, `<decisions>`. Do not re-read STATE.md directly.
21
+ 3. Abort only if `.design/DESIGN-CONTEXT.md` is missing — that is the true prerequisite, not STATE.md.
22
+
23
+ ---
24
+
25
+ ## Flags + parallelism
26
+
27
+ - `--auto` -> `auto_mode=true` (skip approvals, skip optional research).
28
+ - `--parallel` -> `parallel_mode=true` (planner fills `Touches:`/`Parallel:` fields).
29
+ - **Parallelism decision**: read `.design/config.json` + `reference/parallelism-rules.md`. Plan pipeline is inherently sequential (researcher -> pattern-mapper -> planner -> checker) so the expected verdict is **serial** (rule 1). Record via `mcp__gdd_state__update_progress` with `status: "plan_parallelism_decided: batch_size=<N>, reason=<short-reason>"`.
30
+
31
+ ## Probe Chromatic connection
32
+
33
+ Probe `chromatic` (CLI presence + `CHROMATIC_PROJECT_TOKEN` check; auto-`unavailable` if `storybook: not_configured`), then write status via `mcp__gdd_state__probe_connections` (single-entry array, never edit `<connections>` directly). Detail: `./plan-procedure.md` §Probe Chromatic connection.
34
+
35
+ When `chromatic: available`, run change-risk scoping before writing DESIGN-PLAN.md: identify token/component files in scope from DESIGN-CONTEXT.md, run `npx chromatic --trace-changed=expanded --dry-run`, count story files that depend on changed source files, and pass the story count to the design-planner spawn prompt. Detail: `./plan-procedure.md` §Chromatic Change-Risk Scoping.
36
+
37
+ ---
38
+
39
+ ## Step 1 — Optional Research (skip if `auto_mode`)
40
+
41
+ Complexity heuristic: DESIGN-CONTEXT.md `<domain>` spans 3+ scopes OR `<decisions>` count > 6 -> spawn `design-phase-researcher` -> `.design/DESIGN-RESEARCH.md` (~100 lines, ~2 min). Wait for `## RESEARCH COMPLETE`, then `update_progress` `task_progress: "1/3"`. Full prompt: `./plan-procedure.md` §Step 1.
42
+
43
+ ## Step 1.5 — Pattern Mapping (mandatory, brownfield protection)
44
+
45
+ Spawn `design-pattern-mapper` -> `.design/DESIGN-PATTERNS.md` (classify by design concern, not by code architecture — no controllers/services/middleware vocabulary). Wait for `## MAPPING COMPLETE`. Full prompt: `./plan-procedure.md` §Step 1.5.
46
+
47
+ ## Step 1.6 — Assumptions Analysis (skip if `auto_mode`)
48
+
49
+ If assumptions analysis is enabled: spawn `design-assumptions-analyzer` -> surfaces hidden design assumptions with confidence + evidence. Wait for `## ANALYSIS COMPLETE`. Full prompt: `./plan-procedure.md` §Step 1.6.
50
+
51
+ ## Step 1.7 — Synthesize pre-plan inputs (Plan 10.1-04, D-13/D-15)
52
+
53
+ If 2+ pre-plan agents ran (Step 1, 1.5, 1.6), invoke `Skill("synthesize", { outputs, directive, output_shape: "markdown" })` to merge their outputs into `.design/DESIGN-PREPLAN-BRIEF.md` (~150 lines, per-source headers preserved). Add the brief to the planner's `<required_reading>` in Step 2. If only one agent ran, skip. Full call signature + parallel-synthesizer note: `./plan-procedure.md` §Step 1.7.
54
+
55
+ **Research-synthesis persistence:** for each D-XX the synthesizer produces, `mcp__gdd_state__add_decision`; for each M-XX, `mcp__gdd_state__add_must_have`. Issue sequentially (lockfile-bound). Detail: `./plan-procedure.md` §Research-synthesis persistence.
56
+
57
+ ---
58
+
59
+ ## Step 2 — Plan
60
+
61
+ Spawn `design-planner` with `<required_reading>` covering STATE.md, DESIGN-CONTEXT.md, DESIGN-PATTERNS.md, plus (conditionally) DESIGN-RESEARCH.md, DESIGN-ASSUMPTIONS.md, DESIGN-PREPLAN-BRIEF.md (preferred when 1.7 ran), all `.design/sketches/*/WINNER.md`, all `.design/spikes/*/FINDINGS.md`, and all `./.claude/skills/design-*-conventions.md` + `~/.claude/gdd/global-skills/*.md` (project-local D-XX overrides globals). Wait for `## PLANNING COMPLETE`, then `update_progress` `task_progress: "2/3"`. Full prompt + conditional include syntax: `./plan-procedure.md` §Step 2.
62
+
63
+ ## Step 3 — Check
64
+
65
+ Spawn `design-plan-checker` to validate DESIGN-PLAN.md against DESIGN-CONTEXT.md across 5 dimensions: requirement coverage, task completeness, wave ordering, must-have derivation, auto-mode compliance. Wait for `## PLAN CHECK COMPLETE`, then `update_progress` `task_progress: "3/3"`. On `## PLAN CHECK RESULT: ISSUES FOUND` + BLOCKER: offer revise/accept/abort (`auto_mode`: auto-accept WARN, abort on BLOCKER). Full prompt + branching: `./plan-procedure.md` §Step 3.
66
+
67
+ ---
68
+
69
+ ## Stage exit
70
+
71
+ 1. `mcp__gdd_state__set_status` -> `"plan_complete"`.
72
+ 2. `mcp__gdd_state__checkpoint` — stamps `last_checkpoint` and finalizes the plan stage.
73
+
74
+ The next stage (design) calls `mcp__gdd_state__transition_stage` on entry — this skill does NOT issue the transition itself, preserving the stage-owned-transition discipline.
75
+
76
+ ## After Completion
77
+
78
+ Print: plan tasks (N waves, M total tasks), files written (`.design/DESIGN-PLAN.md`, plus `.design/DESIGN-RESEARCH.md` if research ran), next step `/get-design-done:design`.
79
+
80
+ ## Spec self-review (before transition)
81
+
82
+ Run this final spec-quality pass over `.design/DESIGN-PLAN.md` before the plan→design transition:
83
+ - Placeholder scan: no TBD / TODO / `<placeholder>` / lorem left in the artifact.
84
+ - Internal consistency: sections don't contradict each other.
85
+ - Scope check: nothing in the artifact exceeds (or silently drops) the agreed scope.
86
+ - Ambiguity check: every requirement/decision is specific enough to act on without a follow-up question.
87
+
88
+ <HARD-GATE>
89
+ Do NOT transition to design (or invoke `/gdd:design`) until `.design/DESIGN-PLAN.md` is committed AND the user has approved it. If this project uses a custom `.design` location, read the artifact path from `.design/STATE.md` rather than assuming the default.
90
+ </HARD-GATE>
91
+
92
+ ## Rationalizations — Thought to Reality
93
+
94
+ The reasons an agent gives to skip planning or rush DESIGN-PLAN.md, and what each one costs:
95
+
96
+ | Thought | Reality |
97
+ |---------|---------|
98
+ | "This change is small, I can design straight from DESIGN-CONTEXT.md." | Plan-skipped tasks blow scope per cycle telemetry; the plan gate is for the typical case, not the exception you think you're in. |
99
+ | "Pattern mapping is brownfield ceremony, I'll skip it." | Step 1.5 is mandatory because an unmapped brownfield is where the executor silently re-implements an existing pattern. |
100
+ | "The plan-checker will just rubber-stamp it, skip the spawn." | The checker's 5 dimensions (coverage, wave order, must-have derivation) catch the gaps you can't see in your own plan. |
101
+ | "I'll let the planner infer wave ordering at design time." | Unordered waves serialize work that could parallelize — or worse, run dependent tasks concurrently and corrupt the tree. |
102
+ | "Research is overkill for this scope." | The complexity heuristic exists precisely because agents under-estimate scope; skipping research on a 3+-scope domain guarantees a mid-design surprise. |
103
+ | "I can record decisions in DESIGN-PLAN.md prose instead of D-XX." | Prose decisions never reach STATE.md, so verify's integration-checker can't trace them and flags them orphaned. |
104
+
105
+ ## PLAN COMPLETE