@hegemonart/get-design-done 1.57.1 → 1.57.3
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 +26 -41
- package/.claude-plugin/plugin.json +23 -48
- package/CHANGELOG.md +139 -0
- package/README.md +166 -511
- package/SKILL.md +4 -6
- package/agents/README.md +33 -36
- package/agents/a11y-mapper.md +3 -3
- package/agents/component-benchmark-harvester.md +6 -6
- package/agents/component-benchmark-synthesizer.md +3 -3
- package/agents/compose-executor.md +3 -3
- package/agents/cost-forecaster.md +2 -2
- package/agents/design-auditor.md +7 -7
- package/agents/design-authority-watcher.md +15 -15
- package/agents/design-context-builder.md +4 -4
- package/agents/design-context-checker-gate.md +1 -1
- package/agents/design-discussant.md +2 -2
- package/agents/design-doc-writer.md +1 -1
- package/agents/design-executor.md +2 -2
- package/agents/design-figma-writer.md +2 -2
- package/agents/design-fixer.md +7 -7
- package/agents/design-integration-checker-gate.md +1 -1
- package/agents/design-integration-checker.md +1 -1
- package/agents/design-paper-writer.md +3 -3
- package/agents/design-pencil-writer.md +1 -1
- package/agents/design-planner.md +21 -0
- package/agents/design-reflector.md +39 -39
- package/agents/design-research-synthesizer.md +1 -0
- package/agents/design-start-writer.md +1 -1
- package/agents/design-update-checker.md +5 -5
- package/agents/design-verifier-gate.md +1 -1
- package/agents/design-verifier.md +52 -48
- package/agents/ds-generator.md +2 -2
- package/agents/ds-migration-planner.md +4 -4
- package/agents/email-executor.md +9 -9
- package/agents/experiment-result-ingester.md +3 -3
- package/agents/flutter-executor.md +5 -5
- package/agents/gdd-graph-refresh.md +3 -3
- package/agents/gdd-intel-updater.md +2 -2
- package/agents/motion-mapper.md +2 -2
- package/agents/motion-verifier.md +4 -4
- package/agents/pdf-executor.md +8 -8
- package/agents/perf-analyzer.md +17 -17
- package/agents/pr-commenter.md +9 -9
- package/agents/prototype-gate.md +2 -2
- package/agents/quality-gate-runner.md +1 -1
- package/agents/rollout-coordinator.md +3 -3
- package/agents/swift-executor.md +4 -4
- package/agents/ticket-sync-agent.md +6 -6
- package/agents/user-research-synthesizer.md +2 -2
- package/connections/connections.md +44 -45
- package/connections/cursor.md +72 -0
- package/connections/preview.md +3 -3
- package/hooks/first-run-nudge.cjs +171 -0
- package/hooks/gdd-intel-trigger.js +243 -0
- package/hooks/gdd-mcp-circuit-breaker.js +62 -7
- package/hooks/gdd-precompact-snapshot.js +50 -29
- package/hooks/gdd-protected-paths.js +150 -18
- package/hooks/gdd-risk-gate.js +93 -1
- package/hooks/gdd-sessionstart-recap.js +59 -24
- package/hooks/hooks.json +13 -4
- package/hooks/inject-using-gdd.cjs +188 -0
- package/hooks/update-check.cjs +511 -0
- package/package.json +9 -3
- package/reference/STATE-TEMPLATE.md +10 -13
- package/reference/audit-scoring.md +1 -1
- package/reference/cache-tier-doctrine.md +46 -0
- package/reference/config-schema.md +9 -9
- package/reference/i18n.md +1 -1
- package/reference/intel-schema.md +37 -2
- package/reference/meta-rules.md +4 -4
- package/reference/model-tiers.md +2 -2
- package/reference/registry.json +101 -94
- package/reference/runtime-models.md +11 -1
- package/reference/shared-preamble.md +13 -14
- package/reference/skill-graph.md +22 -3
- package/scripts/bootstrap.cjs +373 -0
- package/scripts/injection-patterns.cjs +58 -0
- package/scripts/lib/apply-reflections/incubator-proposals.cjs +57 -26
- package/scripts/lib/install/converters/codex-plugin.cjs +5 -2
- package/scripts/lib/install/converters/cursor.cjs +20 -0
- package/scripts/lib/issue-reporter/report-flow.cjs +1 -1
- package/scripts/lib/manifest/skills.json +75 -28
- package/scripts/lib/state/query-surface.cjs +67 -9
- package/scripts/lib/state/state-store.cjs +68 -26
- package/scripts/lib/worktree-resolve.cjs +4 -16
- package/sdk/cli/commands/stage.ts +17 -0
- package/sdk/cli/index.js +14 -0
- package/skills/README.md +46 -0
- package/skills/bootstrap-ds/SKILL.md +1 -1
- package/skills/cache-manager/SKILL.md +3 -3
- package/skills/cache-manager/cache-policy.md +1 -1
- package/skills/compare/SKILL.md +1 -1
- package/skills/design/SKILL.md +19 -0
- package/skills/explore/SKILL.md +11 -0
- package/skills/figma-write/SKILL.md +13 -2
- package/skills/new-cycle/SKILL.md +1 -1
- package/skills/paper-write/SKILL.md +54 -0
- package/skills/peer-cli-customize/SKILL.md +0 -1
- package/skills/peers/SKILL.md +1 -1
- package/skills/pencil-write/SKILL.md +54 -0
- package/skills/reflect/procedures/capability-gap-scan.md +0 -1
- package/skills/report-issue/SKILL.md +2 -2
- package/skills/report-issue/report-issue-procedure.md +0 -1
- package/skills/router/SKILL.md +2 -2
- package/skills/synthesize/SKILL.md +1 -1
- package/skills/turn-closeout/SKILL.md +1 -1
- package/skills/verify/verify-procedure.md +10 -11
- package/skills/warm-cache/SKILL.md +1 -1
- package/dist/claude-code/.claude/skills/add-backlog/SKILL.md +0 -48
- package/dist/claude-code/.claude/skills/analyze-dependencies/SKILL.md +0 -95
- package/dist/claude-code/.claude/skills/apply-reflections/SKILL.md +0 -109
- package/dist/claude-code/.claude/skills/apply-reflections/apply-reflections-procedure.md +0 -170
- package/dist/claude-code/.claude/skills/audit/SKILL.md +0 -79
- package/dist/claude-code/.claude/skills/bandit-status/SKILL.md +0 -94
- package/dist/claude-code/.claude/skills/benchmark/SKILL.md +0 -65
- package/dist/claude-code/.claude/skills/bootstrap-ds/SKILL.md +0 -43
- package/dist/claude-code/.claude/skills/brief/SKILL.md +0 -145
- package/dist/claude-code/.claude/skills/budget/SKILL.md +0 -45
- package/dist/claude-code/.claude/skills/cache-manager/SKILL.md +0 -66
- package/dist/claude-code/.claude/skills/cache-manager/cache-policy.md +0 -126
- package/dist/claude-code/.claude/skills/check-update/SKILL.md +0 -98
- package/dist/claude-code/.claude/skills/compare/SKILL.md +0 -82
- package/dist/claude-code/.claude/skills/compare/compare-rubric.md +0 -171
- package/dist/claude-code/.claude/skills/complete-cycle/SKILL.md +0 -81
- package/dist/claude-code/.claude/skills/connections/SKILL.md +0 -71
- package/dist/claude-code/.claude/skills/connections/connections-onboarding.md +0 -608
- package/dist/claude-code/.claude/skills/context/SKILL.md +0 -137
- package/dist/claude-code/.claude/skills/continue/SKILL.md +0 -24
- package/dist/claude-code/.claude/skills/darkmode/SKILL.md +0 -76
- package/dist/claude-code/.claude/skills/darkmode/darkmode-audit-procedure.md +0 -258
- package/dist/claude-code/.claude/skills/debug/SKILL.md +0 -41
- package/dist/claude-code/.claude/skills/debug/debug-feedback-loops.md +0 -119
- package/dist/claude-code/.claude/skills/design/SKILL.md +0 -99
- package/dist/claude-code/.claude/skills/design/design-procedure.md +0 -304
- package/dist/claude-code/.claude/skills/discover/SKILL.md +0 -78
- package/dist/claude-code/.claude/skills/discover/discover-procedure.md +0 -222
- package/dist/claude-code/.claude/skills/discuss/SKILL.md +0 -96
- package/dist/claude-code/.claude/skills/do/SKILL.md +0 -45
- package/dist/claude-code/.claude/skills/explore/SKILL.md +0 -107
- package/dist/claude-code/.claude/skills/explore/explore-procedure.md +0 -267
- package/dist/claude-code/.claude/skills/export/SKILL.md +0 -30
- package/dist/claude-code/.claude/skills/extract-learnings/SKILL.md +0 -114
- package/dist/claude-code/.claude/skills/fast/SKILL.md +0 -91
- package/dist/claude-code/.claude/skills/figma-extract/SKILL.md +0 -64
- package/dist/claude-code/.claude/skills/figma-write/SKILL.md +0 -39
- package/dist/claude-code/.claude/skills/graphify/SKILL.md +0 -49
- package/dist/claude-code/.claude/skills/health/SKILL.md +0 -99
- package/dist/claude-code/.claude/skills/health/health-mcp-detection.md +0 -44
- package/dist/claude-code/.claude/skills/health/health-skill-length-report.md +0 -69
- package/dist/claude-code/.claude/skills/help/SKILL.md +0 -87
- package/dist/claude-code/.claude/skills/instinct/SKILL.md +0 -111
- package/dist/claude-code/.claude/skills/list-assumptions/SKILL.md +0 -61
- package/dist/claude-code/.claude/skills/list-pins/SKILL.md +0 -27
- package/dist/claude-code/.claude/skills/live/SKILL.md +0 -98
- package/dist/claude-code/.claude/skills/locale/SKILL.md +0 -51
- package/dist/claude-code/.claude/skills/map/SKILL.md +0 -89
- package/dist/claude-code/.claude/skills/migrate/SKILL.md +0 -70
- package/dist/claude-code/.claude/skills/migrate-context/SKILL.md +0 -123
- package/dist/claude-code/.claude/skills/new-addendum/SKILL.md +0 -81
- package/dist/claude-code/.claude/skills/new-cycle/SKILL.md +0 -37
- package/dist/claude-code/.claude/skills/new-cycle/milestone-completeness-rubric.md +0 -87
- package/dist/claude-code/.claude/skills/new-project/SKILL.md +0 -53
- package/dist/claude-code/.claude/skills/new-skill/SKILL.md +0 -90
- package/dist/claude-code/.claude/skills/next/SKILL.md +0 -68
- package/dist/claude-code/.claude/skills/note/SKILL.md +0 -48
- package/dist/claude-code/.claude/skills/openrouter-status/SKILL.md +0 -86
- package/dist/claude-code/.claude/skills/optimize/SKILL.md +0 -97
- package/dist/claude-code/.claude/skills/override/SKILL.md +0 -86
- package/dist/claude-code/.claude/skills/pause/SKILL.md +0 -77
- package/dist/claude-code/.claude/skills/peer-cli-add/SKILL.md +0 -88
- package/dist/claude-code/.claude/skills/peer-cli-add/peer-cli-protocol.md +0 -161
- package/dist/claude-code/.claude/skills/peer-cli-customize/SKILL.md +0 -90
- package/dist/claude-code/.claude/skills/peers/SKILL.md +0 -96
- package/dist/claude-code/.claude/skills/pin/SKILL.md +0 -37
- package/dist/claude-code/.claude/skills/plan/SKILL.md +0 -105
- package/dist/claude-code/.claude/skills/plan/plan-procedure.md +0 -278
- package/dist/claude-code/.claude/skills/plant-seed/SKILL.md +0 -48
- package/dist/claude-code/.claude/skills/pr-branch/SKILL.md +0 -32
- package/dist/claude-code/.claude/skills/progress/SKILL.md +0 -107
- package/dist/claude-code/.claude/skills/quality-gate/SKILL.md +0 -90
- package/dist/claude-code/.claude/skills/quality-gate/threat-modeling.md +0 -101
- package/dist/claude-code/.claude/skills/quick/SKILL.md +0 -44
- package/dist/claude-code/.claude/skills/reapply-patches/SKILL.md +0 -32
- package/dist/claude-code/.claude/skills/recall/SKILL.md +0 -75
- package/dist/claude-code/.claude/skills/reflect/SKILL.md +0 -85
- package/dist/claude-code/.claude/skills/reflect/procedures/capability-gap-scan.md +0 -120
- package/dist/claude-code/.claude/skills/report-issue/SKILL.md +0 -53
- package/dist/claude-code/.claude/skills/report-issue/report-issue-procedure.md +0 -120
- package/dist/claude-code/.claude/skills/resume/SKILL.md +0 -93
- package/dist/claude-code/.claude/skills/review-backlog/SKILL.md +0 -46
- package/dist/claude-code/.claude/skills/review-decisions/SKILL.md +0 -42
- package/dist/claude-code/.claude/skills/roi/SKILL.md +0 -54
- package/dist/claude-code/.claude/skills/rollout-status/SKILL.md +0 -35
- package/dist/claude-code/.claude/skills/router/SKILL.md +0 -89
- package/dist/claude-code/.claude/skills/router/capability-gap-emitter.md +0 -65
- package/dist/claude-code/.claude/skills/router/router-pick-emitter.md +0 -78
- package/dist/claude-code/.claude/skills/router/router-rules.md +0 -84
- package/dist/claude-code/.claude/skills/scan/SKILL.md +0 -92
- package/dist/claude-code/.claude/skills/scan/scan-procedure.md +0 -732
- package/dist/claude-code/.claude/skills/settings/SKILL.md +0 -87
- package/dist/claude-code/.claude/skills/ship/SKILL.md +0 -48
- package/dist/claude-code/.claude/skills/sketch/SKILL.md +0 -78
- package/dist/claude-code/.claude/skills/sketch-wrap-up/SKILL.md +0 -92
- package/dist/claude-code/.claude/skills/skill-manifest/SKILL.md +0 -79
- package/dist/claude-code/.claude/skills/spike/SKILL.md +0 -67
- package/dist/claude-code/.claude/skills/spike-wrap-up/SKILL.md +0 -86
- package/dist/claude-code/.claude/skills/start/SKILL.md +0 -67
- package/dist/claude-code/.claude/skills/start/start-procedure.md +0 -115
- package/dist/claude-code/.claude/skills/state/SKILL.md +0 -106
- package/dist/claude-code/.claude/skills/stats/SKILL.md +0 -51
- package/dist/claude-code/.claude/skills/style/SKILL.md +0 -71
- package/dist/claude-code/.claude/skills/style/style-doc-procedure.md +0 -150
- package/dist/claude-code/.claude/skills/synthesize/SKILL.md +0 -94
- package/dist/claude-code/.claude/skills/timeline/SKILL.md +0 -66
- package/dist/claude-code/.claude/skills/todo/SKILL.md +0 -64
- package/dist/claude-code/.claude/skills/turn-closeout/SKILL.md +0 -95
- package/dist/claude-code/.claude/skills/undo/SKILL.md +0 -31
- package/dist/claude-code/.claude/skills/unlock-decision/SKILL.md +0 -54
- package/dist/claude-code/.claude/skills/unpin/SKILL.md +0 -31
- package/dist/claude-code/.claude/skills/update/SKILL.md +0 -56
- package/dist/claude-code/.claude/skills/using-gdd/SKILL.md +0 -78
- package/dist/claude-code/.claude/skills/verify/SKILL.md +0 -113
- package/dist/claude-code/.claude/skills/verify/verify-procedure.md +0 -512
- package/dist/claude-code/.claude/skills/warm-cache/SKILL.md +0 -81
- package/dist/claude-code/.claude/skills/watch-authorities/SKILL.md +0 -82
- package/dist/claude-code/.claude/skills/zoom-out/SKILL.md +0 -26
- package/hooks/first-run-nudge.sh +0 -82
- package/hooks/inject-using-gdd.sh +0 -72
- package/hooks/run-hook.cmd +0 -35
- package/hooks/update-check.sh +0 -251
- package/scripts/lib/audit-aggregator/index.cjs +0 -219
- package/scripts/lib/hedge-ensemble.cjs +0 -217
- package/skills/discover/SKILL.md +0 -78
- package/skills/discover/discover-procedure.md +0 -222
- package/skills/new-cycle/milestone-completeness-rubric.md +0 -87
- package/skills/scan/SKILL.md +0 -92
- package/skills/scan/scan-procedure.md +0 -732
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gdd-next
|
|
3
|
-
description: "Routes to the next pipeline stage based on current STATE.md position"
|
|
4
|
-
tools: Read, Write, mcp__gdd_status, mcp__gdd_phase_current, mcp__gdd_plans_list
|
|
5
|
-
disable-model-invocation: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Get Design Done - Next
|
|
9
|
-
|
|
10
|
-
**Role:** Lightweight router. Read `.design/STATE.md` and recommend the next command.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Logic
|
|
15
|
-
|
|
16
|
-
Two paths - MCP preferred when available, file-read fallback otherwise.
|
|
17
|
-
|
|
18
|
-
### MCP path (preferred)
|
|
19
|
-
|
|
20
|
-
When `mcp__gdd_phase_current` is exposed (Phase 27.7+, registered via `npx @hegemonart/get-design-done --register-mcp`):
|
|
21
|
-
|
|
22
|
-
1. Call `mcp__gdd_status` (no args) → `{phase, branch, last_decisions, last_completed_plans, blocker_count}`. Gives cycle + branch context for the output block in one call.
|
|
23
|
-
2. Call `mcp__gdd_phase_current` (no args) → `{phase, stage, task_progress, status}`. Use `stage` to drive the routing table below.
|
|
24
|
-
3. (Optional) Call `mcp__gdd_plans_list` (no args) → current phase plans + status, to identify the next incomplete plan and refine the recommendation.
|
|
25
|
-
4. If `mcp__gdd_status` returns a "STATE.md missing" error, print: "No STATE.md found. Run `/gdd:new-project` to initialize, or `@get-design-done brief` to start the pipeline." and stop. Otherwise, skip to the routing table.
|
|
26
|
-
|
|
27
|
-
Two to three MCP calls = full routing decision (~3s, ~32k tokens - Storybloq benchmark).
|
|
28
|
-
|
|
29
|
-
### File-read path (fallback)
|
|
30
|
-
|
|
31
|
-
When MCP tools are not available, fall back to the legacy flow:
|
|
32
|
-
|
|
33
|
-
1. Check if `.design/STATE.md` exists.
|
|
34
|
-
- **No STATE.md** → Print: "No STATE.md found. Run `/gdd:new-project` to initialize, or `@get-design-done brief` to start the pipeline."
|
|
35
|
-
2. If STATE.md exists, parse frontmatter `stage:` field. Proceed to the routing table.
|
|
36
|
-
|
|
37
|
-
This path loads the same context in 1–2 file reads (~20s, ~46.5k tokens - file-reading baseline).
|
|
38
|
-
|
|
39
|
-
## Routing table
|
|
40
|
-
|
|
41
|
-
Map the `stage` (from either path above) to the next recommended command:
|
|
42
|
-
|
|
43
|
-
| Current `stage:` | Recommendation |
|
|
44
|
-
|---|---|
|
|
45
|
-
| `brief` | Run `@get-design-done explore` to scan and interview |
|
|
46
|
-
| `explore` | Run `@get-design-done plan` to create design plan |
|
|
47
|
-
| `plan` | Run `@get-design-done design` to execute design tasks |
|
|
48
|
-
| `design` | Run `@get-design-done verify` to audit and verify |
|
|
49
|
-
| `verify` | Pipeline complete. Run `/gdd:new-cycle` for next cycle or `/gdd:ship` to create PR |
|
|
50
|
-
|
|
51
|
-
## Output
|
|
52
|
-
|
|
53
|
-
Print the recommendation as a single formatted block:
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
━━━ Next step ━━━
|
|
57
|
-
Current stage: <stage>
|
|
58
|
-
Status: <status>
|
|
59
|
-
→ <recommendation>
|
|
60
|
-
━━━━━━━━━━━━━━━━━━
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Do Not
|
|
64
|
-
|
|
65
|
-
- Do not modify STATE.md.
|
|
66
|
-
- Do not invoke the next stage automatically - only recommend.
|
|
67
|
-
|
|
68
|
-
## NEXT COMPLETE
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gdd-note
|
|
3
|
-
description: "Zero-friction idea capture during any stage. Appends to .design/NOTES.md. Subcommands: add, list, promote."
|
|
4
|
-
argument-hint: "<add|list|promote> [text|line-number]"
|
|
5
|
-
tools: Read, Write
|
|
6
|
-
disable-model-invocation: true
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# /gdd:note
|
|
10
|
-
|
|
11
|
-
**Role:** Ephemeral design notes. Zero ceremony - no priority, no due date. Backing store: `.design/NOTES.md`.
|
|
12
|
-
|
|
13
|
-
## File format
|
|
14
|
-
|
|
15
|
-
```markdown
|
|
16
|
-
# Design Notes
|
|
17
|
-
|
|
18
|
-
- [2026-04-18 04:55] Consider revisiting the card border-radius after Phase 7 ships
|
|
19
|
-
- [2026-04-18 05:10] [promoted → todo] Try a glassmorphism treatment for the sidebar
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Subcommands
|
|
23
|
-
|
|
24
|
-
### add [text]
|
|
25
|
-
Create `.design/NOTES.md` with header if missing. Append one line:
|
|
26
|
-
```
|
|
27
|
-
- [YYYY-MM-DD HH:MM] <text>
|
|
28
|
-
```
|
|
29
|
-
If text omitted, append a blank timestamped entry for the user to fill later:
|
|
30
|
-
```
|
|
31
|
-
- [YYYY-MM-DD HH:MM]
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### list
|
|
35
|
-
Read `.design/NOTES.md`. Print each note line with its line number for use with `promote`.
|
|
36
|
-
|
|
37
|
-
### promote [line-number]
|
|
38
|
-
Read the note at that line. Delegate to `/gdd:todo add` by writing a new P2 entry into `.design/TODO.md` directly (format: `- [ ] [YYYY-MM-DD] <text>` under `## P2 — Normal`). Rewrite the original note line in NOTES.md with `[promoted → todo]` prefix before the text:
|
|
39
|
-
```
|
|
40
|
-
- [2026-04-18 05:10] [promoted → todo] <original text>
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Constraints
|
|
44
|
-
|
|
45
|
-
- Never overwrite prior notes on `add`.
|
|
46
|
-
- Preserve exact line order on `promote`.
|
|
47
|
-
|
|
48
|
-
## NOTE COMPLETE
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gdd-openrouter-status
|
|
3
|
-
description: "Read-only OpenRouter catalog + tier-mapping diagnostic - surfaces catalog freshness (fetched_at vs the 24h TTL), the last-fetch timestamp, the resolved opus/sonnet/haiku → model mappings (via the Phase-33.6 adapter), and a per-tier preview. Use when investigating which OpenRouter model a tier resolves to, or whether the catalog cache is fresh/stale. Phase 33.6 (v1.33.6) diagnostic - /gdd:openrouter-status."
|
|
4
|
-
argument-hint: "[--refresh]"
|
|
5
|
-
tools: Read, Bash
|
|
6
|
-
disable-model-invocation: true
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# gdd-openrouter-status
|
|
10
|
-
|
|
11
|
-
## Role
|
|
12
|
-
|
|
13
|
-
You are a deterministic, read-only diagnostic skill. You do **not** spawn agents and you do **not** modify the catalog cache. You read `.design/cache/openrouter-models.json` (the Phase-33.6-01 catalog cache) via `scripts/lib/openrouter/catalog-fetcher.cjs#readCatalog`, resolve the `opus`/`sonnet`/`haiku` tiers via `scripts/lib/tier-resolver-openrouter.cjs#resolve`, and emit a single Markdown status block. Read-only - to refresh the catalog you pass `--refresh` (a single opt-in fetch gated on `OPENROUTER_API_KEY`); there is no other mutation. See `connections/openrouter.md` for setup and `reference/openrouter-tier-mapping.md` for the resolution heuristic.
|
|
14
|
-
|
|
15
|
-
This is `disable-model-invocation: true` (mirroring `skills/cache-manager/SKILL.md`): the skill is user-invoked only - the model must not auto-spawn it. It never makes a model call.
|
|
16
|
-
|
|
17
|
-
## Invocation Contract
|
|
18
|
-
|
|
19
|
-
- **Input**: optional `--refresh`. When absent, the skill is purely read-only (cache + resolve). When `--refresh` is set AND `OPENROUTER_API_KEY` is present, it calls the Phase-33.6-01 fetcher once to refresh the cache before reading; when `--refresh` is set but no key is present, it prints the empty-state/no-key message and does NOT fetch.
|
|
20
|
-
- **Output**: a Markdown OpenRouter-status block to stdout. The block is the entire output.
|
|
21
|
-
|
|
22
|
-
## Procedure
|
|
23
|
-
|
|
24
|
-
### 1. (Optional) refresh
|
|
25
|
-
|
|
26
|
-
If `--refresh` is set and `OPENROUTER_API_KEY` is present, run a single fetch to refresh the cache:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
node -e "require('./scripts/lib/openrouter/catalog-fetcher.cjs').fetchCatalog().then(()=>{}).catch(()=>{})"
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
This is the ONLY mutation the skill performs, and only on explicit `--refresh`. The fetch never throws (D-08); a failure degrades to the existing cache.
|
|
33
|
-
|
|
34
|
-
### 2. Read the catalog cache
|
|
35
|
-
|
|
36
|
-
Read `.design/cache/openrouter-models.json` via `readCatalog`. Missing or empty → emit the empty-state message and stop:
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
## OpenRouter Status
|
|
40
|
-
|
|
41
|
-
No OpenRouter catalog yet — set OPENROUTER_API_KEY and run a cycle, or `/gdd:openrouter-status --refresh`.
|
|
42
|
-
|
|
43
|
-
Tier resolution is currently falling back to the native provider (graceful degrade — D-08).
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### 3. Compute freshness
|
|
47
|
-
|
|
48
|
-
Read `fetched_at` from the cache object and compare against the 24h TTL (D-02): `age = now - fetched_at`. `age < 24h` → **fresh**; otherwise → **stale** (a stale catalog still resolves - the adapter uses the last good cache).
|
|
49
|
-
|
|
50
|
-
### 4. Resolve the tiers
|
|
51
|
-
|
|
52
|
-
For each of `opus`, `sonnet`, `haiku`, resolve via the adapter (it reads `.design/config.json#openrouter_tier_overrides` and applies the heuristic over the cached catalog):
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
node -e "const r=require('./scripts/lib/tier-resolver-openrouter.cjs');for(const t of ['opus','sonnet','haiku'])console.log(t, '->', r.resolve(t) || '(null → native fallback)')"
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
A `null` for a tier means OpenRouter has no pick → the native provider resolves that tier (D-08). Note any tier that resolved from an explicit `openrouter_tier_overrides` pin vs the heuristic.
|
|
59
|
-
|
|
60
|
-
### 5. Print the status block
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
## OpenRouter Status
|
|
64
|
-
|
|
65
|
-
Catalog source: <source URL from cache>
|
|
66
|
-
Last fetched: <fetched_at> (<fresh | stale> — TTL 24h)
|
|
67
|
-
Models in catalog: <count>
|
|
68
|
-
|
|
69
|
-
| Tier | Resolved model id | Source |
|
|
70
|
-
|--------|----------------------------------|--------------------|
|
|
71
|
-
| opus | <id or (null → native fallback)> | <override | heuristic> |
|
|
72
|
-
| sonnet | <id or (null → native fallback)> | <override | heuristic> |
|
|
73
|
-
| haiku | <id or (null → native fallback)> | <override | heuristic> |
|
|
74
|
-
|
|
75
|
-
> Resolution: override (`.design/config.json#openrouter_tier_overrides`) wins, else the closed-vs-open + pricing heuristic over the catalog.
|
|
76
|
-
> A null resolution means tier resolution falls back to the native provider (D-08).
|
|
77
|
-
> Read-only — this skill never modifies the cache; use `--refresh` to re-fetch (needs OPENROUTER_API_KEY).
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Completion marker
|
|
81
|
-
|
|
82
|
-
End the output with:
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
## OPENROUTER-STATUS COMPLETE
|
|
86
|
-
```
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: optimize
|
|
3
|
-
description: "Reads .design/telemetry/costs.jsonl + .design/agent-metrics.json, runs rule-based analysis, writes .design/OPTIMIZE-RECOMMENDATIONS.md. Pure advisory - no auto-apply. User reviews + decides."
|
|
4
|
-
argument-hint: "[--refresh] [--min-spawns=N]"
|
|
5
|
-
user-invocable: true
|
|
6
|
-
tools: Read, Bash, Grep, Write
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# /gdd:optimize - Optimization Advisor
|
|
10
|
-
|
|
11
|
-
## Role
|
|
12
|
-
|
|
13
|
-
Read the telemetry ledger (`.design/telemetry/costs.jsonl`) and per-agent aggregate (`.design/agent-metrics.json`), apply a fixed set of rule-based heuristics, and emit recommendations to `.design/OPTIMIZE-RECOMMENDATIONS.md`. Never modify agent files, budget config, or cache state. Output is a markdown table of proposals the user reviews manually, mirroring Phase 11 `/gdd:apply-reflections`. **Advisory only**: never edits `agents/*.md`, `.design/budget.json`, `.design/cache-manifest.json`. Never makes model calls - every rule is deterministic. See `./reference/heuristics.md` §"Optimization rules" for the full rule catalog.
|
|
14
|
-
|
|
15
|
-
## Refresh Step
|
|
16
|
-
|
|
17
|
-
Before analysis, invoke the aggregator:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
node --experimental-strip-types scripts/aggregate-agent-metrics.ts
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Idempotent. If `--refresh` absent and `.design/agent-metrics.json` generated within 60s, skip.
|
|
24
|
-
|
|
25
|
-
## Inputs
|
|
26
|
-
|
|
27
|
-
- `.design/telemetry/costs.jsonl` - append-only; tolerant of malformed lines.
|
|
28
|
-
- `.design/agent-metrics.json` - per-agent aggregate; source of truth for `cache_hit_rate`, `lazy_skip_rate`, `total_cost_usd`, `total_spawns`.
|
|
29
|
-
- `agents/*.md` - frontmatter cross-reference for tier override churn + typical-duration drift.
|
|
30
|
-
- `.design/budget.json` - `tier_overrides` table (optional).
|
|
31
|
-
|
|
32
|
-
## Optional Arguments
|
|
33
|
-
|
|
34
|
-
- `--refresh` - force aggregator refresh even if metrics file is fresh.
|
|
35
|
-
- `--min-spawns=N` - only emit recommendations for agents with ≥ N spawns (default 5).
|
|
36
|
-
|
|
37
|
-
## Rules
|
|
38
|
-
|
|
39
|
-
Rule-based analysis. Full thresholds + emission templates in `./reference/heuristics.md` §"Optimization rules"; here, the short rule catalog:
|
|
40
|
-
|
|
41
|
-
- **R1 - Low cache hit rate.** IF `total_spawns >= --min-spawns` AND `cache_hit_rate < 0.20` → propose batching + investigate shared-preamble ordering.
|
|
42
|
-
- **R2 - Expensive + rarely lazy-skipped.** IF `total_cost_usd > 0.50` AND `lazy_skip_rate < 0.10` → propose adding a lazy gate at `agents/{agent}-gate.md` (Plan 10.1-04 pattern).
|
|
43
|
-
- **R3 - Tier override churn.** IF measured `tier` differs from frontmatter `default-tier` for multiple rows → propose updating frontmatter or removing budget.json override.
|
|
44
|
-
- **R4 - Typical duration drift.** IF measured `typical_duration_seconds` differs from frontmatter by > 50% → propose frontmatter update. (v1 only computes wall-clock duration if both spawn + complete rows have matching correlation IDs; otherwise flag "insufficient data".)
|
|
45
|
-
|
|
46
|
-
## Output Format
|
|
47
|
-
|
|
48
|
-
Write `.design/OPTIMIZE-RECOMMENDATIONS.md`:
|
|
49
|
-
|
|
50
|
-
```markdown
|
|
51
|
-
# Optimization Recommendations
|
|
52
|
-
|
|
53
|
-
**Generated:** {ISO-8601 timestamp}
|
|
54
|
-
**Telemetry rows analyzed:** {N}
|
|
55
|
-
**Agents analyzed:** {M}
|
|
56
|
-
**Min spawns threshold:** {--min-spawns value}
|
|
57
|
-
|
|
58
|
-
> Advisory only. No changes have been applied. Review each proposal and apply manually via the suggested action.
|
|
59
|
-
|
|
60
|
-
## Proposals
|
|
61
|
-
|
|
62
|
-
| Rule | Agent | Current | Proposed | Rationale |
|
|
63
|
-
|------|-------|---------|----------|-----------|
|
|
64
|
-
| R1 | ... | ... | ... | ... |
|
|
65
|
-
|
|
66
|
-
## Summary
|
|
67
|
-
|
|
68
|
-
- R1 matches: {count}
|
|
69
|
-
- R2 matches: {count}
|
|
70
|
-
- R3 matches: {count}
|
|
71
|
-
- R4 matches: {count}
|
|
72
|
-
|
|
73
|
-
## OPTIMIZE COMPLETE
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
The `## OPTIMIZE COMPLETE` marker is the completion sentinel.
|
|
77
|
-
|
|
78
|
-
## No Auto-Apply
|
|
79
|
-
|
|
80
|
-
This skill **never modifies** `agents/*.md`, `.design/budget.json`, `.design/cache-manifest.json`, or any other configuration. **Never auto-applies** proposals. If the user wants to act, they do so manually. Discipline mirrors `/gdd:apply-reflections` from Phase 11.
|
|
81
|
-
|
|
82
|
-
## Integration with Phase 11 Reflector
|
|
83
|
-
|
|
84
|
-
The Phase 11 reflector (`agents/design-reflector.md`) reads both `costs.jsonl` and `agent-metrics.json` on its own cadence. `/gdd:optimize` is user-facing; the reflector is automation-facing. Outputs land in different files (`.design/OPTIMIZE-RECOMMENDATIONS.md` vs `.design/reflections/*.md`) and never collide.
|
|
85
|
-
|
|
86
|
-
## Non-Goals
|
|
87
|
-
|
|
88
|
-
- Does not make model calls (rule-based, deterministic).
|
|
89
|
-
- Does not modify config.
|
|
90
|
-
- Does not propose changes outside the four rules - future rules added by future phases.
|
|
91
|
-
- Does not learn from history - Phase 11 reflector territory.
|
|
92
|
-
|
|
93
|
-
## Failure Modes
|
|
94
|
-
|
|
95
|
-
- Missing `.design/telemetry/costs.jsonl` → emit `No telemetry data yet — run /gdd:* commands to accumulate data, then retry.` + `## OPTIMIZE COMPLETE`.
|
|
96
|
-
- Missing `.design/agent-metrics.json` after refresh → emit `Aggregator failed — check node --experimental-strip-types scripts/aggregate-agent-metrics.ts output manually.`
|
|
97
|
-
- Zero rules matched → write `No recommendations — all agents within healthy thresholds.` + `## OPTIMIZE COMPLETE`.
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gdd-override
|
|
3
|
-
description: "Escalation surface for a risk-blocked action or a fact-force gate. Use when the Phase 56 risk gate blocked a writer action (suggested_action=block) and a reviewer has signed off, or when the first-write fact-force gate is holding a file you have legitimately reviewed. Activates for requests involving overriding a blocked edit, approving a high-risk change, or clearing a fact-force hold on a path."
|
|
4
|
-
argument-hint: "<finding-id | factforce <path>> [--approver <who>] [--reason <text>]"
|
|
5
|
-
user-invocable: true
|
|
6
|
-
tools: Read, Write, Bash, Grep, Glob
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# /gdd:override
|
|
10
|
-
|
|
11
|
-
A risk-blocked action is hard: the Phase 56 risk gate routes `suggested_action=block`
|
|
12
|
-
to `override` (see `scripts/lib/risk/route.cjs`), and the fact-force gate holds the
|
|
13
|
-
first write to a file until its facts are read. This skill is the audited way past
|
|
14
|
-
either hold. It mirrors `/gdd:unlock-decision`: a named approver plus a
|
|
15
|
-
reason, recorded before anything is let through. Override is never silent.
|
|
16
|
-
|
|
17
|
-
## Invocation
|
|
18
|
-
|
|
19
|
-
| Command | Behavior |
|
|
20
|
-
|---|---|
|
|
21
|
-
| `/gdd:override <finding-id> --approver <who> --reason <text>` | Record a `D-XX` `override`-tagged decision in STATE.md `<decisions>` and let the risk-blocked action through. |
|
|
22
|
-
| `/gdd:override factforce <path> --approver <who> --reason <text>` | Set `checked[path]` in the session fact-force state so the fact-force gate stops holding that path. |
|
|
23
|
-
|
|
24
|
-
Both modes ask for a rationale: the audit trail is the reason override exists.
|
|
25
|
-
|
|
26
|
-
## Steps
|
|
27
|
-
|
|
28
|
-
1. **Parse args.** Mode is `factforce` when the first token is the literal `factforce`
|
|
29
|
-
(the next token is the `<path>`); otherwise the first token is a `<finding-id>`.
|
|
30
|
-
`--approver` is required (a non-empty name). Missing `--approver` prints the usage
|
|
31
|
-
and changes nothing. If `--reason` is absent, ASK for one (AskUserQuestion or a
|
|
32
|
-
prompt) before continuing: an override with no rationale is rejected.
|
|
33
|
-
|
|
34
|
-
2. **Preview.** Show what will be written and stop for confirmation:
|
|
35
|
-
- finding mode: the decision entry from `overrideDecisionEntry(<id>, {approver, reason})`
|
|
36
|
-
(its `text`, `status: locked`, and `override` tag) plus the action it unblocks.
|
|
37
|
-
- factforce mode: the `<path>` that will gain `checked[path] = true` and the
|
|
38
|
-
session-state file it lands in.
|
|
39
|
-
|
|
40
|
-
3. **Apply (finding mode).** Record the audited decision via the STATE writer
|
|
41
|
-
`mcp__gdd_state__add_decision` (it auto-assigns the next `D-N`). Pass the `text`
|
|
42
|
-
from the pure builder so the `override` tag is embedded and greppable:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
node -e '
|
|
46
|
-
const o = require("./scripts/lib/risk/override.cjs");
|
|
47
|
-
const [id, who, reason] = process.argv.slice(1);
|
|
48
|
-
const entry = o.overrideDecisionEntry(id, { approver: who, reason });
|
|
49
|
-
console.log(JSON.stringify(entry));
|
|
50
|
-
' "<finding-id>" "<who>" "<reason>"
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Then call `mcp__gdd_state__add_decision` with `{ text: <entry.text>, status: "locked" }`.
|
|
54
|
-
The blocked action is now approved on the audit record; proceed with it.
|
|
55
|
-
|
|
56
|
-
4. **Apply (factforce mode).** Set `checked[path]` in the session state file at
|
|
57
|
-
`<cwd>/.design/locks/factforce-<session_id>.json` (atomic tmp then rename), using
|
|
58
|
-
the pure helper so the shape matches what the fact-force gate reads:
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
node -e '
|
|
62
|
-
const fs = require("fs"); const path = require("path");
|
|
63
|
-
const o = require("./scripts/lib/risk/override.cjs");
|
|
64
|
-
const [file, p] = process.argv.slice(1);
|
|
65
|
-
let state = {}; try { state = JSON.parse(fs.readFileSync(file, "utf8")); } catch {}
|
|
66
|
-
const next = o.setFactForceChecked(state, p);
|
|
67
|
-
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
68
|
-
const tmp = file + ".tmp";
|
|
69
|
-
fs.writeFileSync(tmp, JSON.stringify(next, null, 2) + "\n");
|
|
70
|
-
fs.renameSync(tmp, file);
|
|
71
|
-
console.log(JSON.stringify(next.checked));
|
|
72
|
-
' "<cwd>/.design/locks/factforce-<session_id>.json" "<path>"
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
The fact-force gate stops holding `<path>` for the rest of the session.
|
|
76
|
-
|
|
77
|
-
5. **Report** the recorded approver, the reason, and either the new `D-XX` id (finding
|
|
78
|
-
mode) or the unblocked path (factforce mode).
|
|
79
|
-
|
|
80
|
-
## Do Not
|
|
81
|
-
|
|
82
|
-
- Do not skip the rationale: every override is audited.
|
|
83
|
-
- Do not override a finding that the risk gate did not actually block.
|
|
84
|
-
- Do not edit `scripts/lib/risk/route.cjs` or `compute-risk.cjs`: this skill consumes them.
|
|
85
|
-
|
|
86
|
-
## OVERRIDE COMPLETE
|
|
@@ -1,77 +0,0 @@
|
|
|
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
|
|
@@ -1,88 +0,0 @@
|
|
|
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
|
-
```
|