@hegemonart/get-design-done 1.59.3 → 1.59.4
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 +31 -0
- package/SKILL.md +2 -0
- package/figma-plugin/README.md +61 -0
- package/figma-plugin/code.ts +36 -0
- package/figma-plugin/manifest.json +12 -0
- package/figma-plugin/package-lock.json +35 -0
- package/figma-plugin/package.json +12 -0
- package/figma-plugin/src/export-variables.ts +144 -0
- package/figma-plugin/src/payload-schema.ts +250 -0
- package/figma-plugin/tsconfig.json +16 -0
- package/figma-plugin/ui.html +44 -0
- package/hooks/gdd-intel-trigger.js +3 -3
- package/package.json +6 -1
- package/reference/DEPRECATIONS.md +3 -3
- package/reference/live-mode-integration.md +1 -1
- package/reference/registry.json +1 -1
- package/reference/skill-metadata.md +4 -4
- package/reference/skill-placeholders.md +2 -2
- package/scripts/build-skills.cjs +146 -0
- package/scripts/generate-skill-frontmatter.cjs +243 -0
- package/scripts/lib/manifest/scaffolder.cjs +1 -1
- package/scripts/lib/manifest/schemas/skills.schema.json +1 -1
- package/scripts/lib/manifest/skills.json +1 -1
- package/scripts/lib/new-addendum.cjs +1 -1
- package/scripts/skill-templates/README.md +90 -0
- package/scripts/skill-templates/add-backlog/SKILL.md +48 -0
- package/scripts/skill-templates/analyze-dependencies/SKILL.md +95 -0
- package/scripts/skill-templates/apply-reflections/SKILL.md +109 -0
- package/scripts/skill-templates/apply-reflections/apply-reflections-procedure.md +170 -0
- package/scripts/skill-templates/audit/SKILL.md +79 -0
- package/scripts/skill-templates/bandit-reset/SKILL.md +91 -0
- package/scripts/skill-templates/bandit-status/SKILL.md +94 -0
- package/scripts/skill-templates/benchmark/SKILL.md +65 -0
- package/scripts/skill-templates/bootstrap-ds/SKILL.md +43 -0
- package/scripts/skill-templates/brief/SKILL.md +145 -0
- package/scripts/skill-templates/budget/SKILL.md +45 -0
- package/scripts/skill-templates/cache-manager/SKILL.md +66 -0
- package/scripts/skill-templates/cache-manager/cache-policy.md +126 -0
- package/scripts/skill-templates/check-update/SKILL.md +98 -0
- package/scripts/skill-templates/compare/SKILL.md +82 -0
- package/scripts/skill-templates/compare/compare-rubric.md +171 -0
- package/scripts/skill-templates/complete-cycle/SKILL.md +81 -0
- package/scripts/skill-templates/connections/SKILL.md +71 -0
- package/scripts/skill-templates/connections/connections-onboarding.md +608 -0
- package/scripts/skill-templates/context/SKILL.md +137 -0
- package/scripts/skill-templates/continue/SKILL.md +24 -0
- package/scripts/skill-templates/darkmode/SKILL.md +76 -0
- package/scripts/skill-templates/darkmode/darkmode-audit-procedure.md +258 -0
- package/scripts/skill-templates/debug/SKILL.md +41 -0
- package/scripts/skill-templates/debug/debug-feedback-loops.md +119 -0
- package/scripts/skill-templates/design/SKILL.md +118 -0
- package/scripts/skill-templates/design/design-procedure.md +304 -0
- package/scripts/skill-templates/discuss/SKILL.md +96 -0
- package/scripts/skill-templates/do/SKILL.md +45 -0
- package/scripts/skill-templates/explore/SKILL.md +118 -0
- package/scripts/skill-templates/explore/explore-procedure.md +267 -0
- package/scripts/skill-templates/export/SKILL.md +30 -0
- package/scripts/skill-templates/extract-learnings/SKILL.md +114 -0
- package/scripts/skill-templates/fast/SKILL.md +91 -0
- package/scripts/skill-templates/figma-extract/SKILL.md +64 -0
- package/scripts/skill-templates/figma-write/SKILL.md +50 -0
- package/scripts/skill-templates/graphify/SKILL.md +49 -0
- package/scripts/skill-templates/health/SKILL.md +99 -0
- package/scripts/skill-templates/health/health-mcp-detection.md +44 -0
- package/scripts/skill-templates/health/health-skill-length-report.md +69 -0
- package/scripts/skill-templates/help/SKILL.md +60 -0
- package/scripts/skill-templates/instinct/SKILL.md +111 -0
- package/scripts/skill-templates/list-assumptions/SKILL.md +61 -0
- package/scripts/skill-templates/list-pins/SKILL.md +27 -0
- package/scripts/skill-templates/live/SKILL.md +98 -0
- package/scripts/skill-templates/locale/SKILL.md +51 -0
- package/scripts/skill-templates/map/SKILL.md +89 -0
- package/scripts/skill-templates/migrate/SKILL.md +70 -0
- package/scripts/skill-templates/migrate-context/SKILL.md +123 -0
- package/scripts/skill-templates/new-addendum/SKILL.md +81 -0
- package/scripts/skill-templates/new-cycle/SKILL.md +37 -0
- package/scripts/skill-templates/new-project/SKILL.md +53 -0
- package/scripts/skill-templates/new-skill/SKILL.md +90 -0
- package/scripts/skill-templates/next/SKILL.md +68 -0
- package/scripts/skill-templates/note/SKILL.md +48 -0
- package/scripts/skill-templates/openrouter-status/SKILL.md +86 -0
- package/scripts/skill-templates/optimize/SKILL.md +97 -0
- package/scripts/skill-templates/override/SKILL.md +86 -0
- package/scripts/skill-templates/paper-write/SKILL.md +54 -0
- package/scripts/skill-templates/pause/SKILL.md +77 -0
- package/scripts/skill-templates/peer-cli-add/SKILL.md +88 -0
- package/scripts/skill-templates/peer-cli-add/peer-cli-protocol.md +161 -0
- package/scripts/skill-templates/peer-cli-customize/SKILL.md +89 -0
- package/scripts/skill-templates/peers/SKILL.md +96 -0
- package/scripts/skill-templates/pencil-write/SKILL.md +54 -0
- package/scripts/skill-templates/pin/SKILL.md +37 -0
- package/scripts/skill-templates/plan/SKILL.md +105 -0
- package/scripts/skill-templates/plan/plan-procedure.md +278 -0
- package/scripts/skill-templates/plant-seed/SKILL.md +48 -0
- package/scripts/skill-templates/pr-branch/SKILL.md +32 -0
- package/scripts/skill-templates/progress/SKILL.md +107 -0
- package/scripts/skill-templates/quality-gate/SKILL.md +90 -0
- package/scripts/skill-templates/quality-gate/threat-modeling.md +101 -0
- package/scripts/skill-templates/quick/SKILL.md +44 -0
- package/scripts/skill-templates/reapply-patches/SKILL.md +32 -0
- package/scripts/skill-templates/recall/SKILL.md +75 -0
- package/scripts/skill-templates/reflect/SKILL.md +85 -0
- package/scripts/skill-templates/reflect/procedures/capability-gap-scan.md +119 -0
- package/scripts/skill-templates/report-issue/SKILL.md +53 -0
- package/scripts/skill-templates/report-issue/report-issue-procedure.md +119 -0
- package/scripts/skill-templates/resume/SKILL.md +93 -0
- package/scripts/skill-templates/review-backlog/SKILL.md +46 -0
- package/scripts/skill-templates/review-decisions/SKILL.md +42 -0
- package/scripts/skill-templates/roi/SKILL.md +54 -0
- package/scripts/skill-templates/rollout-status/SKILL.md +35 -0
- package/scripts/skill-templates/router/SKILL.md +89 -0
- package/scripts/skill-templates/router/capability-gap-emitter.md +65 -0
- package/scripts/skill-templates/router/router-pick-emitter.md +78 -0
- package/scripts/skill-templates/router/router-rules.md +84 -0
- package/scripts/skill-templates/settings/SKILL.md +87 -0
- package/scripts/skill-templates/ship/SKILL.md +48 -0
- package/scripts/skill-templates/sketch/SKILL.md +78 -0
- package/scripts/skill-templates/sketch-wrap-up/SKILL.md +92 -0
- package/scripts/skill-templates/skill-manifest/SKILL.md +79 -0
- package/scripts/skill-templates/spike/SKILL.md +67 -0
- package/scripts/skill-templates/spike-wrap-up/SKILL.md +86 -0
- package/scripts/skill-templates/start/SKILL.md +67 -0
- package/scripts/skill-templates/start/start-procedure.md +115 -0
- package/scripts/skill-templates/state/SKILL.md +106 -0
- package/scripts/skill-templates/stats/SKILL.md +51 -0
- package/scripts/skill-templates/style/SKILL.md +71 -0
- package/scripts/skill-templates/style/style-doc-procedure.md +150 -0
- package/scripts/skill-templates/synthesize/SKILL.md +94 -0
- package/scripts/skill-templates/timeline/SKILL.md +66 -0
- package/scripts/skill-templates/todo/SKILL.md +64 -0
- package/scripts/skill-templates/turn-closeout/SKILL.md +95 -0
- package/scripts/skill-templates/undo/SKILL.md +31 -0
- package/scripts/skill-templates/unlock-decision/SKILL.md +54 -0
- package/scripts/skill-templates/unpin/SKILL.md +31 -0
- package/scripts/skill-templates/update/SKILL.md +56 -0
- package/scripts/skill-templates/using-gdd/SKILL.md +78 -0
- package/scripts/skill-templates/verify/SKILL.md +113 -0
- package/scripts/skill-templates/verify/verify-procedure.md +511 -0
- package/scripts/skill-templates/warm-cache/SKILL.md +81 -0
- package/scripts/skill-templates/watch-authorities/SKILL.md +82 -0
- package/scripts/skill-templates/zoom-out/SKILL.md +26 -0
- package/sdk/cli/commands/build.ts +2 -2
- package/sdk/cli/index.js +2 -2
- package/sdk/cli/index.ts +1 -1
- package/skills/README.md +22 -14
- package/skills/help/SKILL.md +28 -55
- package/skills/new-skill/SKILL.md +5 -5
|
@@ -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
|
+
- {{command_prefix}}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,89 @@
|
|
|
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: {{command_prefix}}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
|
+
|
|
83
|
+
## Record
|
|
84
|
+
|
|
85
|
+
After execution, append one JSONL line to `.design/skill-records.jsonl`:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{"skill": "peer-cli-customize", "ts": "<ISO timestamp>", "agents_rewired": ["design-verifier", "design-reflector"], "validator_passed": true}
|
|
89
|
+
```
|
|
@@ -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`.
|
|
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,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-pencil-write
|
|
3
|
+
description: "Update local `.pen` source files with design decisions from `.design/DESIGN-CONTEXT.md` by dispatching the `design-pencil-writer` agent in one of two modes (annotate / roundtrip). Use when the user has completed a design pipeline cycle and wants the decisions reflected in their `.pen` files. Operates proposal->confirm with `--dry-run`."
|
|
4
|
+
argument-hint: "<annotate|roundtrip> [--dry-run]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
tools: Read, Write, Bash, Grep, Glob
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# gdd-pencil-write
|
|
10
|
+
|
|
11
|
+
Dispatches the `design-pencil-writer` agent to write design decisions back to `.pen` spec files. Unlike Figma/paper.design, pencil.dev keeps `.pen` YAML specs as the project's git-tracked source of truth; no MCP is required and every write is committed atomically. The probe pattern (file-based, no ToolSearch) and integration contract are documented at `../../connections/pencil-dev.md`.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/get-design-done pencil-write <mode> [--dry-run]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Modes:
|
|
20
|
+
- `annotate` - append DESIGN-DEBT findings as comments to the relevant `.pen` files
|
|
21
|
+
- `roundtrip` - update `.pen` spec frontmatter (design-tokens, state) from verified implementation
|
|
22
|
+
|
|
23
|
+
There is no `tokenize` mode; `.pen` files are source-of-truth specs, not derived artifacts.
|
|
24
|
+
|
|
25
|
+
Flags:
|
|
26
|
+
- `--dry-run` - emit the proposal without writing or committing any `.pen` changes
|
|
27
|
+
|
|
28
|
+
## Prerequisites
|
|
29
|
+
|
|
30
|
+
1. pencil.dev workspace detected; one or more `.pen` files in `cwd` (no MCP install required):
|
|
31
|
+
```bash
|
|
32
|
+
find . -name "*.pen" -not -path "*/node_modules/*" | head -5
|
|
33
|
+
```
|
|
34
|
+
2. `.design/DESIGN-CONTEXT.md` exists (run `discover` first). For `annotate` mode, `.design/DESIGN-DEBT.md` is also required. For `roundtrip` mode, `.design/DESIGN-VERIFICATION.md` is also required.
|
|
35
|
+
3. `.design/STATE.md` `<connections>` shows `pencil-dev: available`. If `not_configured`, no `.pen` files were found at probe time; re-run `discover` or `connections` after adding `.pen` specs.
|
|
36
|
+
|
|
37
|
+
## Required Reading
|
|
38
|
+
|
|
39
|
+
Read `.design/STATE.md` and `.design/DESIGN-CONTEXT.md` before dispatching the agent.
|
|
40
|
+
|
|
41
|
+
## Dispatch
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Task("design-pencil-writer", """
|
|
45
|
+
mode: <annotate|roundtrip>
|
|
46
|
+
dry_run: <true|false>
|
|
47
|
+
required_reading:
|
|
48
|
+
- .design/STATE.md
|
|
49
|
+
- .design/DESIGN-CONTEXT.md
|
|
50
|
+
""")
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Pass `mode` from the first positional argument; `dry_run` from `--dry-run`.
|
|
54
|
+
Wait for the agent's completion marker before returning.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-pin
|
|
3
|
+
description: "Writes standalone shortcut aliases for a gdd skill across installed harness skill dirs. Use when you want a skill directly discoverable as its own command in every installed runtime."
|
|
4
|
+
argument-hint: "<skill-name>"
|
|
5
|
+
tools: Read, Bash
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# {{command_prefix}}pin
|
|
9
|
+
|
|
10
|
+
**Role:** Write a standalone shortcut alias (a small SKILL.md stub) for one gdd skill into every installed harness `skills/` directory, so that skill is directly discoverable as its own command in each runtime (Claude Code, Codex, Cursor, Gemini, and the rest).
|
|
11
|
+
|
|
12
|
+
Each pinned stub starts with the marker line `<!-- gdd-pinned-skill source=<skill> -->`, then carries frontmatter (name, description, argument-hint, tools) pulled from the manifest source of truth, then a one-line body pointing back at the canonical skill. Stubs are written atomically (temp file plus rename), so a failed write never leaves a half-written file.
|
|
13
|
+
|
|
14
|
+
## Steps
|
|
15
|
+
|
|
16
|
+
1. **Read the argument.** The skill name to pin comes from `$ARGUMENTS` (for example `darkmode`). If it is empty, ask the user which skill to pin and stop.
|
|
17
|
+
|
|
18
|
+
2. **Run the pin CLI.** Invoke the shipped script, passing the skill name. The plugin root resolves via `CLAUDE_PLUGIN_ROOT` (falling back to the current directory when that variable is absent):
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
node "${CLAUDE_PLUGIN_ROOT:-$(pwd)}/scripts/lib/pin/cli.cjs" pin "<skill-name>"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The CLI detects every harness `skills/` directory that exists under the current project (`.claude/skills`, `.cursor/skills`, and so on) and writes the stub into each. Pass `--user` to also create the harness directories that do not exist yet:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node "${CLAUDE_PLUGIN_ROOT:-$(pwd)}/scripts/lib/pin/cli.cjs" pin "<skill-name>" --user
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
3. **Report the result.** The CLI prints one line per harness it wrote to, plus any skips. Relay that summary verbatim. Exit codes: 0 means at least one stub was written, 1 means nothing was written (no harness dirs found, suggest `--user`), 2 means an error (for example an unknown skill name).
|
|
31
|
+
|
|
32
|
+
## Do Not
|
|
33
|
+
|
|
34
|
+
- Do not hand-write the stub files. Always go through the CLI so the marker, the manifest-sourced frontmatter, and the atomic write stay consistent.
|
|
35
|
+
- Do not pin a skill that is not in the manifest. The CLI rejects unknown skill names with exit code 2; surface that error rather than inventing a stub.
|
|
36
|
+
|
|
37
|
+
## PIN COMPLETE
|
|
@@ -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. Activates for requests involving breaking design work into steps, sequencing implementation, or planning a build."
|
|
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 `{{command_prefix}}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
|