@hegemonart/get-design-done 1.28.0 → 1.28.6
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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +134 -0
- package/SKILL.md +1 -1
- package/hooks/gdd-decision-injector.js +149 -3
- package/package.json +1 -1
- package/reference/adr-format.md +96 -0
- package/reference/architecture-vocabulary.md +102 -0
- package/reference/context-md-format.md +106 -0
- package/reference/heuristics.md +84 -0
- package/reference/registry.json +29 -1
- package/reference/registry.schema.json +1 -1
- package/reference/shared-preamble.md +78 -6
- package/reference/skill-authoring-contract.md +159 -0
- package/scripts/validate-skill-length.cjs +283 -0
- package/skills/add-backlog/SKILL.md +1 -0
- package/skills/analyze-dependencies/SKILL.md +33 -122
- package/skills/apply-reflections/SKILL.md +1 -40
- package/skills/apply-reflections/apply-reflections-procedure.md +68 -0
- package/skills/audit/SKILL.md +3 -1
- package/skills/bandit-status/SKILL.md +31 -66
- package/skills/benchmark/SKILL.md +15 -55
- package/skills/brief/SKILL.md +12 -1
- package/skills/cache-manager/SKILL.md +3 -57
- package/skills/cache-manager/cache-policy.md +126 -0
- package/skills/check-update/SKILL.md +38 -75
- package/skills/compare/SKILL.md +29 -269
- package/skills/compare/compare-rubric.md +171 -0
- package/skills/complete-cycle/SKILL.md +1 -1
- package/skills/connections/SKILL.md +21 -427
- package/skills/connections/connections-onboarding.md +417 -0
- package/skills/continue/SKILL.md +1 -0
- package/skills/darkmode/SKILL.md +32 -287
- package/skills/darkmode/darkmode-audit-procedure.md +258 -0
- package/skills/debug/SKILL.md +11 -8
- package/skills/debug/debug-feedback-loops.md +119 -0
- package/skills/design/SKILL.md +27 -245
- package/skills/design/design-procedure.md +304 -0
- package/skills/discover/SKILL.md +26 -133
- package/skills/discover/discover-procedure.md +204 -0
- package/skills/discuss/SKILL.md +18 -2
- package/skills/explore/SKILL.md +40 -205
- package/skills/explore/explore-procedure.md +267 -0
- package/skills/fast/SKILL.md +1 -0
- package/skills/figma-write/SKILL.md +2 -2
- package/skills/health/SKILL.md +11 -33
- package/skills/health/health-mcp-detection.md +44 -0
- package/skills/health/health-skill-length-report.md +69 -0
- package/skills/help/SKILL.md +1 -0
- package/skills/list-assumptions/SKILL.md +1 -0
- package/skills/map/SKILL.md +8 -31
- package/skills/new-cycle/SKILL.md +3 -1
- package/skills/new-cycle/milestone-completeness-rubric.md +87 -0
- package/skills/next/SKILL.md +1 -0
- package/skills/note/SKILL.md +1 -0
- package/skills/optimize/SKILL.md +21 -44
- package/skills/pause/SKILL.md +1 -0
- package/skills/peer-cli-add/SKILL.md +26 -108
- package/skills/peer-cli-add/peer-cli-protocol.md +161 -0
- package/skills/peer-cli-customize/SKILL.md +22 -42
- package/skills/peers/SKILL.md +33 -57
- package/skills/plan/SKILL.md +33 -220
- package/skills/plan/plan-procedure.md +278 -0
- package/skills/plant-seed/SKILL.md +1 -0
- package/skills/pr-branch/SKILL.md +1 -0
- package/skills/progress/SKILL.md +1 -7
- package/skills/quality-gate/SKILL.md +34 -166
- package/skills/quality-gate/threat-modeling.md +101 -0
- package/skills/quick/SKILL.md +1 -0
- package/skills/reapply-patches/SKILL.md +1 -0
- package/skills/recall/SKILL.md +1 -0
- package/skills/resume/SKILL.md +1 -0
- package/skills/review-backlog/SKILL.md +1 -0
- package/skills/router/SKILL.md +3 -59
- package/skills/router/router-rules.md +84 -0
- package/skills/scan/SKILL.md +36 -675
- package/skills/scan/scan-procedure.md +731 -0
- package/skills/settings/SKILL.md +1 -0
- package/skills/ship/SKILL.md +1 -0
- package/skills/sketch/SKILL.md +1 -1
- package/skills/sketch-wrap-up/SKILL.md +13 -54
- package/skills/spike/SKILL.md +1 -1
- package/skills/spike-wrap-up/SKILL.md +12 -46
- package/skills/start/SKILL.md +13 -112
- package/skills/start/start-procedure.md +115 -0
- package/skills/stats/SKILL.md +1 -0
- package/skills/style/SKILL.md +18 -140
- package/skills/style/style-doc-procedure.md +150 -0
- package/skills/synthesize/SKILL.md +1 -0
- package/skills/timeline/SKILL.md +1 -0
- package/skills/todo/SKILL.md +1 -0
- package/skills/turn-closeout/SKILL.md +36 -56
- package/skills/undo/SKILL.md +1 -0
- package/skills/update/SKILL.md +1 -0
- package/skills/verify/SKILL.md +42 -457
- package/skills/verify/verify-procedure.md +512 -0
- package/skills/warm-cache/SKILL.md +3 -35
- package/skills/zoom-out/SKILL.md +26 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peer-cli-customize
|
|
3
|
-
description: "Rewire role
|
|
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
4
|
argument-hint: "[<agent-name>] [<new-delegate-target>]"
|
|
5
5
|
tools: Read, Edit, Bash, Grep
|
|
6
6
|
---
|
|
@@ -11,7 +11,7 @@ tools: Read, Edit, Bash, Grep
|
|
|
11
11
|
|
|
12
12
|
## Role
|
|
13
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.
|
|
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
15
|
|
|
16
16
|
## Invocation Contract
|
|
17
17
|
|
|
@@ -22,83 +22,63 @@ You help the user rewire which peer-CLI delegate handles which agent's calls. Th
|
|
|
22
22
|
|
|
23
23
|
### Step 1 — Show current state
|
|
24
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.
|
|
26
|
-
|
|
27
|
-
Then scan `agents/*.md` and grep for `delegate_to:` frontmatter values. Render a table:
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
| Agent | delegate_to (current) |
|
|
31
|
-
|----------------------------|------------------------|
|
|
32
|
-
| design-reflector | none |
|
|
33
|
-
| design-context-checker | (unset) |
|
|
34
|
-
| design-verifier | gemini-research |
|
|
35
|
-
| ... | ... |
|
|
36
|
-
```
|
|
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).
|
|
37
26
|
|
|
38
27
|
### Step 2 — Confirm rewire intent
|
|
39
28
|
|
|
40
|
-
|
|
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?"
|
|
41
30
|
|
|
42
31
|
Valid `<new-delegate-target>` values:
|
|
32
|
+
|
|
43
33
|
- `<peer>-<role>` from the capability matrix (e.g., `gemini-research`, `codex-execute`, `cursor-debug`, `cursor-plan`, `copilot-review`, `copilot-research`, `qwen-write`).
|
|
44
|
-
- `none`
|
|
45
|
-
- Empty / `(unset)`
|
|
34
|
+
- `none` — explicit opt-out.
|
|
35
|
+
- Empty / `(unset)` — remove the field entirely; revert to default behavior.
|
|
46
36
|
|
|
47
37
|
### Step 3 — Validate the proposed rewire
|
|
48
38
|
|
|
49
|
-
Cross-check the
|
|
39
|
+
Cross-check against the capability matrix per `./../peer-cli-add/peer-cli-protocol.md` §"Rewire discipline":
|
|
40
|
+
|
|
50
41
|
1. The peer must exist in the matrix.
|
|
51
42
|
2. The role must be in the peer's `claims` list.
|
|
52
|
-
3.
|
|
43
|
+
3. Runtime allowlisting (`peer_cli.enabled_peers`) is a runtime concern, NOT a frontmatter validation concern.
|
|
53
44
|
|
|
54
45
|
If validation fails, surface the error and stop. Do not edit the file.
|
|
55
46
|
|
|
56
47
|
### Step 4 — Apply the edit
|
|
57
48
|
|
|
58
|
-
Use the `Edit` tool
|
|
59
|
-
|
|
60
|
-
**Case A: Field is absent, user wants to add it.**
|
|
61
|
-
Insert `delegate_to: <new-target>` into the frontmatter block (between the existing `default-tier:` and the next field, or at the end of frontmatter). Preserve YAML formatting.
|
|
62
|
-
|
|
63
|
-
**Case B: Field is present, user wants to change the value.**
|
|
64
|
-
Replace the existing value. If the existing value is `none` and the new value is `<peer>-<role>`, just swap. Mirror the existing indentation.
|
|
49
|
+
Use the `Edit` tool. Three cases (per `./../peer-cli-add/peer-cli-protocol.md` §"Rewire discipline"):
|
|
65
50
|
|
|
66
|
-
**
|
|
67
|
-
|
|
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.
|
|
68
54
|
|
|
69
|
-
### Step 5 — Re-validate
|
|
55
|
+
### Step 5 — Re-validate
|
|
70
56
|
|
|
71
|
-
Run `npm run validate:frontmatter
|
|
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).
|
|
72
58
|
|
|
73
59
|
### Step 6 — Surface a diff summary
|
|
74
60
|
|
|
75
|
-
Report back:
|
|
76
|
-
|
|
77
61
|
```
|
|
78
62
|
## Rewire summary
|
|
79
|
-
|
|
80
63
|
✓ design-verifier: delegate_to: gemini-research → cursor-debug
|
|
81
64
|
✓ design-reflector: delegate_to (unset) → codex-execute
|
|
82
65
|
|
|
83
66
|
frontmatter validator: 0 violations (40 files checked)
|
|
84
|
-
|
|
67
|
+
Next time these agents are spawned, session-runner dispatches through the new peer.
|
|
85
68
|
|
|
86
|
-
|
|
69
|
+
Verify: /gdd:peers (shows updated allowlist + capability matrix).
|
|
87
70
|
```
|
|
88
71
|
|
|
89
72
|
## Edge cases
|
|
90
73
|
|
|
91
|
-
-
|
|
92
|
-
- **User asks to rewire to a role the peer doesn't claim** (e.g., `codex-debug` — codex only claims `execute`): refuse with a helpful message listing what the peer DOES claim. Suggest a closer match if obvious.
|
|
93
|
-
- **User asks to rewire ALL agents to a peer at once** (bulk operation): support but require explicit confirmation. Show the diff of all proposed edits before applying.
|
|
94
|
-
- **Validator fails after edit**: revert the edit (re-run `Edit` with the inverse old/new strings). Surface the original error.
|
|
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).
|
|
95
75
|
|
|
96
76
|
## Cross-references
|
|
97
77
|
|
|
98
|
-
-
|
|
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.
|
|
99
80
|
- `scripts/lib/peer-cli/registry.cjs` (Plan 27-05) — capability matrix.
|
|
100
|
-
- `
|
|
101
|
-
- `skills/peer-cli-add/SKILL.md` — for adding a NEW peer (this skill is for rewiring among existing peers).
|
|
81
|
+
- `skills/peer-cli-add/SKILL.md` — for adding a NEW peer (this skill rewires among existing peers).
|
|
102
82
|
- `.planning/phases/27-peer-cli-delegation/CONTEXT.md` D-06 — decision lineage.
|
|
103
83
|
|
|
104
84
|
## Record
|
package/skills/peers/SKILL.md
CHANGED
|
@@ -9,24 +9,18 @@ tools: Read, Bash
|
|
|
9
9
|
|
|
10
10
|
## Role
|
|
11
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` (
|
|
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
13
|
|
|
14
14
|
## Invocation Contract
|
|
15
15
|
|
|
16
16
|
- **Input**: none. The skill takes no arguments.
|
|
17
|
-
- **Output**: a Markdown capability-matrix table to stdout.
|
|
17
|
+
- **Output**: a Markdown capability-matrix table to stdout. The table is the entire output.
|
|
18
18
|
|
|
19
19
|
## Procedure
|
|
20
20
|
|
|
21
|
-
### 1. Load runtime matrix
|
|
21
|
+
### 1. Load runtime + capability matrix
|
|
22
22
|
|
|
23
|
-
Read `scripts/lib/install/runtimes.cjs`
|
|
24
|
-
|
|
25
|
-
### 2. Load capability matrix
|
|
26
|
-
|
|
27
|
-
Read `scripts/lib/peer-cli/registry.cjs`. The exported `describeCapabilities()` returns the per-peer claimed-roles map. The capability matrix is the source of truth for which roles each peer can take.
|
|
28
|
-
|
|
29
|
-
Use the canonical declared matrix:
|
|
23
|
+
Read `scripts/lib/install/runtimes.cjs` (14 entries; 5 carry `peerBinary`) and `scripts/lib/peer-cli/registry.cjs#describeCapabilities()`. The canonical declared matrix:
|
|
30
24
|
|
|
31
25
|
| Peer | Roles claimed | Protocol |
|
|
32
26
|
|---------|--------------------------|----------|
|
|
@@ -36,41 +30,28 @@ Use the canonical declared matrix:
|
|
|
36
30
|
| copilot | review, research | ACP |
|
|
37
31
|
| qwen | write | ACP |
|
|
38
32
|
|
|
39
|
-
###
|
|
40
|
-
|
|
41
|
-
For each peer, run `which <peerBinary>` (POSIX) or `where <peerBinary>` (Windows). If exit 0 → installed. If exit non-zero → not installed.
|
|
33
|
+
### 2. Detect installation
|
|
42
34
|
|
|
43
|
-
|
|
35
|
+
For each peer, run `which <peerBinary>` (POSIX) or `where <peerBinary>` (Windows). Exit 0 → installed; non-zero → not installed.
|
|
44
36
|
|
|
45
|
-
|
|
37
|
+
### 3. Read allowlist
|
|
46
38
|
|
|
47
|
-
|
|
39
|
+
Read `.design/config.json#peer_cli.enabled_peers` (array of peer-IDs). Default `[]` (opt-in required). Missing file or path = empty.
|
|
48
40
|
|
|
49
|
-
|
|
41
|
+
### 4. (Optional) Read posterior reward-delta
|
|
50
42
|
|
|
51
|
-
|
|
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:
|
|
52
44
|
|
|
53
|
-
1.
|
|
54
|
-
2.
|
|
55
|
-
3.
|
|
56
|
-
4.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
5. Compute `delta_pct = (peerMean - localMean) / localMean`.
|
|
60
|
-
6. Require minimum sample evidence: `sum(arm.count)` for `peerArms` AND for `localArms` must each be `>= 3`. Else "(no data yet)".
|
|
61
|
-
7. Render delta as:
|
|
62
|
-
- `+X% reward` when `delta_pct > 0.01`
|
|
63
|
-
- `-X% reward` when `delta_pct < -0.01`
|
|
64
|
-
- `~equal` when `abs(delta_pct) < 0.01`
|
|
65
|
-
Where X = `Math.round(abs(delta_pct) * 100)`.
|
|
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)`.
|
|
66
51
|
|
|
67
|
-
|
|
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).
|
|
68
53
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### 6. Render the table
|
|
72
|
-
|
|
73
|
-
Emit the table in this exact shape:
|
|
54
|
+
### 5. Render the table
|
|
74
55
|
|
|
75
56
|
```
|
|
76
57
|
## Peer-CLI Capability Matrix
|
|
@@ -85,36 +66,31 @@ Emit the table in this exact shape:
|
|
|
85
66
|
|
|
86
67
|
> Tip: Enable peers via `.design/config.json#peer_cli.enabled_peers`.
|
|
87
68
|
> See `reference/peer-cli-capabilities.md` for the full capability matrix.
|
|
88
|
-
> See `skills/peer-cli-customize/SKILL.md` to rewire role
|
|
69
|
+
> See `skills/peer-cli-customize/SKILL.md` to rewire role->peer mappings per agent.
|
|
89
70
|
```
|
|
90
71
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
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.
|
|
97
79
|
|
|
98
|
-
###
|
|
80
|
+
### 6. Done
|
|
99
81
|
|
|
100
|
-
The table IS the output. No follow-up prose. Users
|
|
101
|
-
- See "(opt-in disabled)" → enable in `.design/config.json`.
|
|
102
|
-
- See "(not installed)" → install the peer CLI.
|
|
103
|
-
- See concrete deltas → trust the bandit's recommendation, or override per-agent via `skills/peer-cli-customize`.
|
|
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`.
|
|
104
83
|
|
|
105
84
|
## Cross-references
|
|
106
85
|
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
- `
|
|
110
|
-
- `skills/peer-cli-customize/SKILL.md` (Plan 27-10) — rewire role→peer mappings.
|
|
111
|
-
- `skills/peer-cli-add/SKILL.md` (Plan 27-10) — add a brand-new peer.
|
|
112
|
-
- `.planning/phases/27-peer-cli-delegation/CONTEXT.md` D-10 — decision lineage.
|
|
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.
|
|
113
89
|
|
|
114
90
|
## Record
|
|
115
91
|
|
|
116
|
-
|
|
92
|
+
Append one JSONL line to `.design/skill-records.jsonl`:
|
|
117
93
|
|
|
118
94
|
```json
|
|
119
|
-
{"skill": "gdd-peers", "ts": "<ISO timestamp>", "peers_detected": ["codex"
|
|
95
|
+
{"skill": "gdd-peers", "ts": "<ISO timestamp>", "peers_detected": ["codex"], "peers_allowlisted": ["codex"], "had_posterior": false}
|
|
120
96
|
```
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -1,267 +1,80 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan
|
|
3
|
-
description: "Stage 3 of 5
|
|
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
4
|
argument-hint: "[--auto] [--parallel]"
|
|
5
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
|
|
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
7
|
---
|
|
8
8
|
|
|
9
9
|
# Get Design Done — Plan
|
|
10
10
|
|
|
11
|
-
**Stage 3 of 5** in the get-design-done pipeline. Thin orchestrator. All planning intelligence lives in agents/design-planner.md
|
|
11
|
+
**Stage 3 of 5** in the get-design-done pipeline. Thin orchestrator. All planning intelligence lives in `agents/design-planner.md`.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
1. `mcp__gdd_state__transition_stage` with `to: "plan"`.
|
|
16
|
-
- Gate failure surfaces `error.context.blockers` to the user; do not advance.
|
|
17
|
-
2. `mcp__gdd_state__get` → snapshot `state`. Use this snapshot for `<position>`, `<connections>`, `<must_haves>`, `<blockers>`, `<decisions>` in the current stage; do not re-read STATE.md directly.
|
|
18
|
-
|
|
19
|
-
Abort with a clear error only if the user is trying to plan without DESIGN-CONTEXT.md — that is the true prerequisite, not STATE.md.
|
|
13
|
+
Full procedure detail: `./plan-procedure.md`.
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
---
|
|
22
16
|
|
|
23
|
-
|
|
24
|
-
- `--auto` → auto_mode=true (skip approvals, skip optional research)
|
|
25
|
-
- `--parallel` → parallel_mode=true (planner fills Touches:/Parallel: fields)
|
|
17
|
+
## Stage entry
|
|
26
18
|
|
|
27
|
-
|
|
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.
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
- Apply rules from `reference/parallelism-rules.md`.
|
|
31
|
-
- Plan's pipeline is inherently sequential (researcher → pattern-mapper → planner → checker). Expected verdict: **serial** (rule 1).
|
|
23
|
+
---
|
|
32
24
|
|
|
33
|
-
|
|
25
|
+
## Flags + parallelism
|
|
34
26
|
|
|
35
|
-
|
|
36
|
-
-
|
|
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>"`.
|
|
37
30
|
|
|
38
31
|
## Probe Chromatic connection
|
|
39
32
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Step C1 — CLI presence:
|
|
43
|
-
Bash: command -v chromatic 2>/dev/null || npx chromatic --version 2>/dev/null
|
|
44
|
-
→ found → proceed to Step C2
|
|
45
|
-
→ not found → chromatic: not_configured (skip all Chromatic steps)
|
|
46
|
-
|
|
47
|
-
Step C2 — Token check:
|
|
48
|
-
Bash: test -n "${CHROMATIC_PROJECT_TOKEN}"
|
|
49
|
-
→ true → chromatic: available
|
|
50
|
-
→ false → chromatic: unavailable
|
|
51
|
-
|
|
52
|
-
Also check: if storybook: not_configured → chromatic effectively unavailable (emit note, do not run).
|
|
53
|
-
|
|
54
|
-
Write chromatic status to STATE.md `<connections>` via `mcp__gdd_state__probe_connections` — pass the single-entry probe result (`[{ name: "chromatic", status: "<verdict>" }]`). Do not edit `<connections>` directly.
|
|
55
|
-
|
|
56
|
-
## Chromatic Change-Risk Scoping (when chromatic: available)
|
|
57
|
-
|
|
58
|
-
Before writing DESIGN-PLAN.md, if chromatic: available:
|
|
59
|
-
1. Identify token/component files to be changed (from DESIGN-CONTEXT.md scope)
|
|
60
|
-
2. Run: Bash: npx chromatic --project-token $CHROMATIC_PROJECT_TOKEN --trace-changed=expanded --dry-run 2>&1
|
|
61
|
-
3. Parse output — count story files that depend on changed source files
|
|
62
|
-
4. Pass story count to design-planner.md (see design-planner.md Chromatic Change-Risk section)
|
|
63
|
-
If unavailable: design-planner proceeds without story-count annotation.
|
|
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.
|
|
64
34
|
|
|
65
|
-
|
|
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.
|
|
66
36
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
If spawning:
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
Task("design-phase-researcher", """
|
|
73
|
-
<required_reading>
|
|
74
|
-
@.design/STATE.md
|
|
75
|
-
@.design/DESIGN-CONTEXT.md
|
|
76
|
-
</required_reading>
|
|
77
|
-
|
|
78
|
-
You are the design-phase-researcher agent. Identify the project type from DESIGN-CONTEXT.md
|
|
79
|
-
and research relevant design patterns, pitfalls, and stack-specific conventions.
|
|
80
|
-
|
|
81
|
-
Output file: .design/DESIGN-RESEARCH.md
|
|
82
|
-
Target: ~100 lines, ~2 min budget.
|
|
37
|
+
---
|
|
83
38
|
|
|
84
|
-
|
|
85
|
-
""")
|
|
86
|
-
```
|
|
39
|
+
## Step 1 — Optional Research (skip if `auto_mode`)
|
|
87
40
|
|
|
88
|
-
Wait for `## RESEARCH COMPLETE
|
|
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.
|
|
89
42
|
|
|
90
43
|
## Step 1.5 — Pattern Mapping (mandatory, brownfield protection)
|
|
91
44
|
|
|
92
|
-
|
|
93
|
-
Task("design-pattern-mapper", """
|
|
94
|
-
<required_reading>
|
|
95
|
-
@.design/STATE.md
|
|
96
|
-
@.design/DESIGN-CONTEXT.md
|
|
97
|
-
@reference/audit-scoring.md
|
|
98
|
-
</required_reading>
|
|
99
|
-
|
|
100
|
-
You are design-pattern-mapper. Grep the codebase for existing design patterns
|
|
101
|
-
(color tokens, spacing scale, typography conventions, component styling) and
|
|
102
|
-
write .design/DESIGN-PATTERNS.md. Classify by design concern — NOT by code
|
|
103
|
-
architecture (no controllers, services, middleware vocabulary).
|
|
104
|
-
|
|
105
|
-
Output file: .design/DESIGN-PATTERNS.md
|
|
106
|
-
Emit `## MAPPING COMPLETE` when done.
|
|
107
|
-
""")
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Wait for `## MAPPING COMPLETE`. Call `mcp__gdd_state__update_progress` with `task_progress: "1/3"` and a short `status` summary.
|
|
111
|
-
|
|
112
|
-
## Step 1.6 — Assumptions Analysis (optional, same flag as research)
|
|
113
|
-
|
|
114
|
-
If assumptions analysis enabled (skip if auto_mode):
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
Task("design-assumptions-analyzer", """
|
|
118
|
-
<required_reading>
|
|
119
|
-
@.design/STATE.md
|
|
120
|
-
@.design/DESIGN-CONTEXT.md
|
|
121
|
-
@.design/DESIGN-PATTERNS.md
|
|
122
|
-
</required_reading>
|
|
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.
|
|
123
46
|
|
|
124
|
-
|
|
125
|
-
confidence levels and evidence citations.
|
|
47
|
+
## Step 1.6 — Assumptions Analysis (skip if `auto_mode`)
|
|
126
48
|
|
|
127
|
-
|
|
128
|
-
""")
|
|
129
|
-
```
|
|
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.
|
|
130
50
|
|
|
131
|
-
|
|
51
|
+
## Step 1.7 — Synthesize pre-plan inputs (Plan 10.1-04, D-13/D-15)
|
|
132
52
|
|
|
133
|
-
|
|
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.
|
|
134
54
|
|
|
135
|
-
|
|
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.
|
|
136
56
|
|
|
137
|
-
|
|
138
|
-
outputs: [
|
|
139
|
-
(if Step 1 ran) "=== from design-phase-researcher ===\n" + <read .design/DESIGN-RESEARCH.md>,
|
|
140
|
-
(if Step 1.5 ran) "=== from design-pattern-mapper ===\n" + <read .design/DESIGN-PATTERNS.md>,
|
|
141
|
-
(if Step 1.6 ran) "=== from design-assumptions-analyzer ===\n" + <read .design/DESIGN-ASSUMPTIONS.md>
|
|
142
|
-
],
|
|
143
|
-
directive: "Merge into a single compact pre-plan brief. Preserve per-source section headers so the planner can trace provenance. Consolidate duplicate recommendations with source tags. Target ~150 lines.",
|
|
144
|
-
output_shape: "markdown"
|
|
145
|
-
})
|
|
146
|
-
|
|
147
|
-
Wait for `## SYNTHESIS COMPLETE`. Write to `.design/DESIGN-PREPLAN-BRIEF.md` (overwrite if present). Add `@.design/DESIGN-PREPLAN-BRIEF.md` to the planner's `<required_reading>` in Step 2 — individual files remain on disk for drill-down.
|
|
148
|
-
|
|
149
|
-
**Parallel synthesizer note (future):** if a future plan variant spawns N parallel phase-researchers (e.g., one per project-type family), wire synthesize the same way as `skills/map/` Step 3.5.
|
|
150
|
-
|
|
151
|
-
## Research-synthesis persistence (decisions + must-haves)
|
|
152
|
-
|
|
153
|
-
When the synthesizer (design-phase-researcher / design-pattern-mapper / design-assumptions-analyzer) produces D-XX decisions and M-XX must-haves, persist each one through MCP instead of editing STATE.md directly.
|
|
154
|
-
|
|
155
|
-
For each D-XX decision the synthesizer produces:
|
|
156
|
-
- Call `mcp__gdd_state__add_decision` with `{ id: "D-XX", text: "...", status: "locked"|"tentative" }`.
|
|
157
|
-
|
|
158
|
-
For each M-XX must-have the synthesizer produces:
|
|
159
|
-
- Call `mcp__gdd_state__add_must_have` with `{ id: "M-XX", text: "...", status: "pending" }`.
|
|
160
|
-
|
|
161
|
-
Issue these sequentially. Each call is event-emitting and lockfile-safe. Parallel issuance would serialize on the STATE.md lockfile with no throughput gain.
|
|
57
|
+
---
|
|
162
58
|
|
|
163
59
|
## Step 2 — Plan
|
|
164
60
|
|
|
165
|
-
|
|
166
|
-
Task("design-planner", """
|
|
167
|
-
<required_reading>
|
|
168
|
-
@.design/STATE.md
|
|
169
|
-
@.design/DESIGN-CONTEXT.md
|
|
170
|
-
@reference/audit-scoring.md
|
|
171
|
-
@.design/DESIGN-PATTERNS.md
|
|
172
|
-
[@.design/DESIGN-RESEARCH.md — only include if research step ran]
|
|
173
|
-
[@.design/DESIGN-ASSUMPTIONS.md — only include if assumptions analysis ran]
|
|
174
|
-
[@.design/DESIGN-PREPLAN-BRIEF.md — include if Step 1.7 synthesize ran; planner prefers this compact brief over the individual files above]
|
|
175
|
-
[@.design/sketches/*/WINNER.md — include all completed sketch winners if present]
|
|
176
|
-
[@.design/spikes/*/FINDINGS.md — include all completed spike findings if present]
|
|
177
|
-
[@./.claude/skills/design-*-conventions.md — include all project-local design conventions if present]
|
|
178
|
-
[@~/.claude/gdd/global-skills/*.md — include all global skills if directory exists; global conventions inform but do not override project-local D-XX decisions]
|
|
179
|
-
</required_reading>
|
|
180
|
-
|
|
181
|
-
You are the design-planner agent. Read DESIGN-CONTEXT.md and produce .design/DESIGN-PLAN.md
|
|
182
|
-
with wave-ordered tasks, acceptance criteria, and (if parallel mode) Touches:/Parallel: fields.
|
|
183
|
-
|
|
184
|
-
Context:
|
|
185
|
-
- Pipeline stage: plan
|
|
186
|
-
- auto_mode: <true|false>
|
|
187
|
-
- parallel_mode: <true|false>
|
|
188
|
-
|
|
189
|
-
Output file: .design/DESIGN-PLAN.md
|
|
190
|
-
Format: per agents/design-planner.md Output Format section.
|
|
191
|
-
|
|
192
|
-
Emit `## PLANNING COMPLETE` when done.
|
|
193
|
-
""")
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Wait for `## PLANNING COMPLETE`. Call `mcp__gdd_state__update_progress` with `task_progress: "2/3"` and a short `status` summary.
|
|
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.
|
|
197
62
|
|
|
198
63
|
## Step 3 — Check
|
|
199
64
|
|
|
200
|
-
|
|
201
|
-
Task("design-plan-checker", """
|
|
202
|
-
<required_reading>
|
|
203
|
-
@.design/STATE.md
|
|
204
|
-
@.design/DESIGN-PLAN.md
|
|
205
|
-
@.design/DESIGN-CONTEXT.md
|
|
206
|
-
</required_reading>
|
|
207
|
-
|
|
208
|
-
You are the design-plan-checker agent. Validate DESIGN-PLAN.md will achieve DESIGN-CONTEXT.md
|
|
209
|
-
brief goals across 5 dimensions: requirement coverage, task completeness, wave ordering,
|
|
210
|
-
must-have derivation, auto mode compliance.
|
|
211
|
-
|
|
212
|
-
Context:
|
|
213
|
-
- auto_mode: <true|false>
|
|
214
|
-
|
|
215
|
-
Output: structured result as response text (no file). Start with `## PLAN CHECK RESULT: PASS`
|
|
216
|
-
or `## PLAN CHECK RESULT: ISSUES FOUND`.
|
|
217
|
-
|
|
218
|
-
Emit `## PLAN CHECK COMPLETE` when done.
|
|
219
|
-
""")
|
|
220
|
-
```
|
|
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.
|
|
221
66
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
If `## PLAN CHECK RESULT: ISSUES FOUND` and any BLOCKER issues:
|
|
225
|
-
- Present issues to user and offer: (a) revise plan now — re-spawn design-planner with issue list, (b) accept and proceed, (c) abort.
|
|
226
|
-
- If auto_mode: auto-accept WARNING issues, abort on BLOCKER issues.
|
|
67
|
+
---
|
|
227
68
|
|
|
228
69
|
## Stage exit
|
|
229
70
|
|
|
230
|
-
1.
|
|
231
|
-
2.
|
|
71
|
+
1. `mcp__gdd_state__set_status` -> `"plan_complete"`.
|
|
72
|
+
2. `mcp__gdd_state__checkpoint` — stamps `last_checkpoint` and finalizes the plan stage.
|
|
232
73
|
|
|
233
|
-
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
|
|
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.
|
|
234
75
|
|
|
235
76
|
## After Completion
|
|
236
77
|
|
|
237
|
-
Print
|
|
238
|
-
- Plan tasks: N waves, M total tasks
|
|
239
|
-
- Files: .design/DESIGN-PLAN.md (and .design/DESIGN-RESEARCH.md if research ran)
|
|
240
|
-
- Next: `/get-design-done:design` to execute the plan
|
|
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`.
|
|
241
79
|
|
|
242
80
|
## PLAN COMPLETE
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
246
|
-
## Exploration artifacts & project-local conventions
|
|
247
|
-
|
|
248
|
-
When building the planner spawn prompt, also glob for:
|
|
249
|
-
- `.design/sketches/*/WINNER.md` — winning sketch rationale (informs directional tasks)
|
|
250
|
-
- `.design/spikes/*/FINDINGS.md` — spike verdicts (inform task feasibility)
|
|
251
|
-
- `./.claude/skills/design-*-conventions.md` — project-local design conventions
|
|
252
|
-
|
|
253
|
-
Include each matching file in `<files_to_read>` / `<required_reading>` so the planner sees them when creating tasks. Spike findings from `.design/spikes/` inform task feasibility; sketch winners inform directional choice; project-local conventions override defaults.
|
|
254
|
-
|
|
255
|
-
## --research mode (removed)
|
|
256
|
-
|
|
257
|
-
V2-04 deferred the `--research` flag. Rationale: complexity of an additional
|
|
258
|
-
agent spawn + Context7 integration outweighs the benefit of discover-stage
|
|
259
|
-
auto-detect for most projects. Use /discover's Auto Mode for research-assisted
|
|
260
|
-
discovery instead.
|
|
261
|
-
|
|
262
|
-
The optional research step that already exists (Step 1, triggered by complexity
|
|
263
|
-
heuristic: 3+ domain scopes OR 6+ decisions) covers the core use case without
|
|
264
|
-
a separate CLI flag.
|
|
265
|
-
|
|
266
|
-
If --research is reintroduced in a future version, define its scope in
|
|
267
|
-
ROADMAP.md V2+ and update this section.
|