@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.
Files changed (237) hide show
  1. package/.claude-plugin/marketplace.json +26 -41
  2. package/.claude-plugin/plugin.json +23 -48
  3. package/CHANGELOG.md +139 -0
  4. package/README.md +166 -511
  5. package/SKILL.md +4 -6
  6. package/agents/README.md +33 -36
  7. package/agents/a11y-mapper.md +3 -3
  8. package/agents/component-benchmark-harvester.md +6 -6
  9. package/agents/component-benchmark-synthesizer.md +3 -3
  10. package/agents/compose-executor.md +3 -3
  11. package/agents/cost-forecaster.md +2 -2
  12. package/agents/design-auditor.md +7 -7
  13. package/agents/design-authority-watcher.md +15 -15
  14. package/agents/design-context-builder.md +4 -4
  15. package/agents/design-context-checker-gate.md +1 -1
  16. package/agents/design-discussant.md +2 -2
  17. package/agents/design-doc-writer.md +1 -1
  18. package/agents/design-executor.md +2 -2
  19. package/agents/design-figma-writer.md +2 -2
  20. package/agents/design-fixer.md +7 -7
  21. package/agents/design-integration-checker-gate.md +1 -1
  22. package/agents/design-integration-checker.md +1 -1
  23. package/agents/design-paper-writer.md +3 -3
  24. package/agents/design-pencil-writer.md +1 -1
  25. package/agents/design-planner.md +21 -0
  26. package/agents/design-reflector.md +39 -39
  27. package/agents/design-research-synthesizer.md +1 -0
  28. package/agents/design-start-writer.md +1 -1
  29. package/agents/design-update-checker.md +5 -5
  30. package/agents/design-verifier-gate.md +1 -1
  31. package/agents/design-verifier.md +52 -48
  32. package/agents/ds-generator.md +2 -2
  33. package/agents/ds-migration-planner.md +4 -4
  34. package/agents/email-executor.md +9 -9
  35. package/agents/experiment-result-ingester.md +3 -3
  36. package/agents/flutter-executor.md +5 -5
  37. package/agents/gdd-graph-refresh.md +3 -3
  38. package/agents/gdd-intel-updater.md +2 -2
  39. package/agents/motion-mapper.md +2 -2
  40. package/agents/motion-verifier.md +4 -4
  41. package/agents/pdf-executor.md +8 -8
  42. package/agents/perf-analyzer.md +17 -17
  43. package/agents/pr-commenter.md +9 -9
  44. package/agents/prototype-gate.md +2 -2
  45. package/agents/quality-gate-runner.md +1 -1
  46. package/agents/rollout-coordinator.md +3 -3
  47. package/agents/swift-executor.md +4 -4
  48. package/agents/ticket-sync-agent.md +6 -6
  49. package/agents/user-research-synthesizer.md +2 -2
  50. package/connections/connections.md +44 -45
  51. package/connections/cursor.md +72 -0
  52. package/connections/preview.md +3 -3
  53. package/hooks/first-run-nudge.cjs +171 -0
  54. package/hooks/gdd-intel-trigger.js +243 -0
  55. package/hooks/gdd-mcp-circuit-breaker.js +62 -7
  56. package/hooks/gdd-precompact-snapshot.js +50 -29
  57. package/hooks/gdd-protected-paths.js +150 -18
  58. package/hooks/gdd-risk-gate.js +93 -1
  59. package/hooks/gdd-sessionstart-recap.js +59 -24
  60. package/hooks/hooks.json +13 -4
  61. package/hooks/inject-using-gdd.cjs +188 -0
  62. package/hooks/update-check.cjs +511 -0
  63. package/package.json +9 -3
  64. package/reference/STATE-TEMPLATE.md +10 -13
  65. package/reference/audit-scoring.md +1 -1
  66. package/reference/cache-tier-doctrine.md +46 -0
  67. package/reference/config-schema.md +9 -9
  68. package/reference/i18n.md +1 -1
  69. package/reference/intel-schema.md +37 -2
  70. package/reference/meta-rules.md +4 -4
  71. package/reference/model-tiers.md +2 -2
  72. package/reference/registry.json +101 -94
  73. package/reference/runtime-models.md +11 -1
  74. package/reference/shared-preamble.md +13 -14
  75. package/reference/skill-graph.md +22 -3
  76. package/scripts/bootstrap.cjs +373 -0
  77. package/scripts/injection-patterns.cjs +58 -0
  78. package/scripts/lib/apply-reflections/incubator-proposals.cjs +57 -26
  79. package/scripts/lib/install/converters/codex-plugin.cjs +5 -2
  80. package/scripts/lib/install/converters/cursor.cjs +20 -0
  81. package/scripts/lib/issue-reporter/report-flow.cjs +1 -1
  82. package/scripts/lib/manifest/skills.json +75 -28
  83. package/scripts/lib/state/query-surface.cjs +67 -9
  84. package/scripts/lib/state/state-store.cjs +68 -26
  85. package/scripts/lib/worktree-resolve.cjs +4 -16
  86. package/sdk/cli/commands/stage.ts +17 -0
  87. package/sdk/cli/index.js +14 -0
  88. package/skills/README.md +46 -0
  89. package/skills/bootstrap-ds/SKILL.md +1 -1
  90. package/skills/cache-manager/SKILL.md +3 -3
  91. package/skills/cache-manager/cache-policy.md +1 -1
  92. package/skills/compare/SKILL.md +1 -1
  93. package/skills/design/SKILL.md +19 -0
  94. package/skills/explore/SKILL.md +11 -0
  95. package/skills/figma-write/SKILL.md +13 -2
  96. package/skills/new-cycle/SKILL.md +1 -1
  97. package/skills/paper-write/SKILL.md +54 -0
  98. package/skills/peer-cli-customize/SKILL.md +0 -1
  99. package/skills/peers/SKILL.md +1 -1
  100. package/skills/pencil-write/SKILL.md +54 -0
  101. package/skills/reflect/procedures/capability-gap-scan.md +0 -1
  102. package/skills/report-issue/SKILL.md +2 -2
  103. package/skills/report-issue/report-issue-procedure.md +0 -1
  104. package/skills/router/SKILL.md +2 -2
  105. package/skills/synthesize/SKILL.md +1 -1
  106. package/skills/turn-closeout/SKILL.md +1 -1
  107. package/skills/verify/verify-procedure.md +10 -11
  108. package/skills/warm-cache/SKILL.md +1 -1
  109. package/dist/claude-code/.claude/skills/add-backlog/SKILL.md +0 -48
  110. package/dist/claude-code/.claude/skills/analyze-dependencies/SKILL.md +0 -95
  111. package/dist/claude-code/.claude/skills/apply-reflections/SKILL.md +0 -109
  112. package/dist/claude-code/.claude/skills/apply-reflections/apply-reflections-procedure.md +0 -170
  113. package/dist/claude-code/.claude/skills/audit/SKILL.md +0 -79
  114. package/dist/claude-code/.claude/skills/bandit-status/SKILL.md +0 -94
  115. package/dist/claude-code/.claude/skills/benchmark/SKILL.md +0 -65
  116. package/dist/claude-code/.claude/skills/bootstrap-ds/SKILL.md +0 -43
  117. package/dist/claude-code/.claude/skills/brief/SKILL.md +0 -145
  118. package/dist/claude-code/.claude/skills/budget/SKILL.md +0 -45
  119. package/dist/claude-code/.claude/skills/cache-manager/SKILL.md +0 -66
  120. package/dist/claude-code/.claude/skills/cache-manager/cache-policy.md +0 -126
  121. package/dist/claude-code/.claude/skills/check-update/SKILL.md +0 -98
  122. package/dist/claude-code/.claude/skills/compare/SKILL.md +0 -82
  123. package/dist/claude-code/.claude/skills/compare/compare-rubric.md +0 -171
  124. package/dist/claude-code/.claude/skills/complete-cycle/SKILL.md +0 -81
  125. package/dist/claude-code/.claude/skills/connections/SKILL.md +0 -71
  126. package/dist/claude-code/.claude/skills/connections/connections-onboarding.md +0 -608
  127. package/dist/claude-code/.claude/skills/context/SKILL.md +0 -137
  128. package/dist/claude-code/.claude/skills/continue/SKILL.md +0 -24
  129. package/dist/claude-code/.claude/skills/darkmode/SKILL.md +0 -76
  130. package/dist/claude-code/.claude/skills/darkmode/darkmode-audit-procedure.md +0 -258
  131. package/dist/claude-code/.claude/skills/debug/SKILL.md +0 -41
  132. package/dist/claude-code/.claude/skills/debug/debug-feedback-loops.md +0 -119
  133. package/dist/claude-code/.claude/skills/design/SKILL.md +0 -99
  134. package/dist/claude-code/.claude/skills/design/design-procedure.md +0 -304
  135. package/dist/claude-code/.claude/skills/discover/SKILL.md +0 -78
  136. package/dist/claude-code/.claude/skills/discover/discover-procedure.md +0 -222
  137. package/dist/claude-code/.claude/skills/discuss/SKILL.md +0 -96
  138. package/dist/claude-code/.claude/skills/do/SKILL.md +0 -45
  139. package/dist/claude-code/.claude/skills/explore/SKILL.md +0 -107
  140. package/dist/claude-code/.claude/skills/explore/explore-procedure.md +0 -267
  141. package/dist/claude-code/.claude/skills/export/SKILL.md +0 -30
  142. package/dist/claude-code/.claude/skills/extract-learnings/SKILL.md +0 -114
  143. package/dist/claude-code/.claude/skills/fast/SKILL.md +0 -91
  144. package/dist/claude-code/.claude/skills/figma-extract/SKILL.md +0 -64
  145. package/dist/claude-code/.claude/skills/figma-write/SKILL.md +0 -39
  146. package/dist/claude-code/.claude/skills/graphify/SKILL.md +0 -49
  147. package/dist/claude-code/.claude/skills/health/SKILL.md +0 -99
  148. package/dist/claude-code/.claude/skills/health/health-mcp-detection.md +0 -44
  149. package/dist/claude-code/.claude/skills/health/health-skill-length-report.md +0 -69
  150. package/dist/claude-code/.claude/skills/help/SKILL.md +0 -87
  151. package/dist/claude-code/.claude/skills/instinct/SKILL.md +0 -111
  152. package/dist/claude-code/.claude/skills/list-assumptions/SKILL.md +0 -61
  153. package/dist/claude-code/.claude/skills/list-pins/SKILL.md +0 -27
  154. package/dist/claude-code/.claude/skills/live/SKILL.md +0 -98
  155. package/dist/claude-code/.claude/skills/locale/SKILL.md +0 -51
  156. package/dist/claude-code/.claude/skills/map/SKILL.md +0 -89
  157. package/dist/claude-code/.claude/skills/migrate/SKILL.md +0 -70
  158. package/dist/claude-code/.claude/skills/migrate-context/SKILL.md +0 -123
  159. package/dist/claude-code/.claude/skills/new-addendum/SKILL.md +0 -81
  160. package/dist/claude-code/.claude/skills/new-cycle/SKILL.md +0 -37
  161. package/dist/claude-code/.claude/skills/new-cycle/milestone-completeness-rubric.md +0 -87
  162. package/dist/claude-code/.claude/skills/new-project/SKILL.md +0 -53
  163. package/dist/claude-code/.claude/skills/new-skill/SKILL.md +0 -90
  164. package/dist/claude-code/.claude/skills/next/SKILL.md +0 -68
  165. package/dist/claude-code/.claude/skills/note/SKILL.md +0 -48
  166. package/dist/claude-code/.claude/skills/openrouter-status/SKILL.md +0 -86
  167. package/dist/claude-code/.claude/skills/optimize/SKILL.md +0 -97
  168. package/dist/claude-code/.claude/skills/override/SKILL.md +0 -86
  169. package/dist/claude-code/.claude/skills/pause/SKILL.md +0 -77
  170. package/dist/claude-code/.claude/skills/peer-cli-add/SKILL.md +0 -88
  171. package/dist/claude-code/.claude/skills/peer-cli-add/peer-cli-protocol.md +0 -161
  172. package/dist/claude-code/.claude/skills/peer-cli-customize/SKILL.md +0 -90
  173. package/dist/claude-code/.claude/skills/peers/SKILL.md +0 -96
  174. package/dist/claude-code/.claude/skills/pin/SKILL.md +0 -37
  175. package/dist/claude-code/.claude/skills/plan/SKILL.md +0 -105
  176. package/dist/claude-code/.claude/skills/plan/plan-procedure.md +0 -278
  177. package/dist/claude-code/.claude/skills/plant-seed/SKILL.md +0 -48
  178. package/dist/claude-code/.claude/skills/pr-branch/SKILL.md +0 -32
  179. package/dist/claude-code/.claude/skills/progress/SKILL.md +0 -107
  180. package/dist/claude-code/.claude/skills/quality-gate/SKILL.md +0 -90
  181. package/dist/claude-code/.claude/skills/quality-gate/threat-modeling.md +0 -101
  182. package/dist/claude-code/.claude/skills/quick/SKILL.md +0 -44
  183. package/dist/claude-code/.claude/skills/reapply-patches/SKILL.md +0 -32
  184. package/dist/claude-code/.claude/skills/recall/SKILL.md +0 -75
  185. package/dist/claude-code/.claude/skills/reflect/SKILL.md +0 -85
  186. package/dist/claude-code/.claude/skills/reflect/procedures/capability-gap-scan.md +0 -120
  187. package/dist/claude-code/.claude/skills/report-issue/SKILL.md +0 -53
  188. package/dist/claude-code/.claude/skills/report-issue/report-issue-procedure.md +0 -120
  189. package/dist/claude-code/.claude/skills/resume/SKILL.md +0 -93
  190. package/dist/claude-code/.claude/skills/review-backlog/SKILL.md +0 -46
  191. package/dist/claude-code/.claude/skills/review-decisions/SKILL.md +0 -42
  192. package/dist/claude-code/.claude/skills/roi/SKILL.md +0 -54
  193. package/dist/claude-code/.claude/skills/rollout-status/SKILL.md +0 -35
  194. package/dist/claude-code/.claude/skills/router/SKILL.md +0 -89
  195. package/dist/claude-code/.claude/skills/router/capability-gap-emitter.md +0 -65
  196. package/dist/claude-code/.claude/skills/router/router-pick-emitter.md +0 -78
  197. package/dist/claude-code/.claude/skills/router/router-rules.md +0 -84
  198. package/dist/claude-code/.claude/skills/scan/SKILL.md +0 -92
  199. package/dist/claude-code/.claude/skills/scan/scan-procedure.md +0 -732
  200. package/dist/claude-code/.claude/skills/settings/SKILL.md +0 -87
  201. package/dist/claude-code/.claude/skills/ship/SKILL.md +0 -48
  202. package/dist/claude-code/.claude/skills/sketch/SKILL.md +0 -78
  203. package/dist/claude-code/.claude/skills/sketch-wrap-up/SKILL.md +0 -92
  204. package/dist/claude-code/.claude/skills/skill-manifest/SKILL.md +0 -79
  205. package/dist/claude-code/.claude/skills/spike/SKILL.md +0 -67
  206. package/dist/claude-code/.claude/skills/spike-wrap-up/SKILL.md +0 -86
  207. package/dist/claude-code/.claude/skills/start/SKILL.md +0 -67
  208. package/dist/claude-code/.claude/skills/start/start-procedure.md +0 -115
  209. package/dist/claude-code/.claude/skills/state/SKILL.md +0 -106
  210. package/dist/claude-code/.claude/skills/stats/SKILL.md +0 -51
  211. package/dist/claude-code/.claude/skills/style/SKILL.md +0 -71
  212. package/dist/claude-code/.claude/skills/style/style-doc-procedure.md +0 -150
  213. package/dist/claude-code/.claude/skills/synthesize/SKILL.md +0 -94
  214. package/dist/claude-code/.claude/skills/timeline/SKILL.md +0 -66
  215. package/dist/claude-code/.claude/skills/todo/SKILL.md +0 -64
  216. package/dist/claude-code/.claude/skills/turn-closeout/SKILL.md +0 -95
  217. package/dist/claude-code/.claude/skills/undo/SKILL.md +0 -31
  218. package/dist/claude-code/.claude/skills/unlock-decision/SKILL.md +0 -54
  219. package/dist/claude-code/.claude/skills/unpin/SKILL.md +0 -31
  220. package/dist/claude-code/.claude/skills/update/SKILL.md +0 -56
  221. package/dist/claude-code/.claude/skills/using-gdd/SKILL.md +0 -78
  222. package/dist/claude-code/.claude/skills/verify/SKILL.md +0 -113
  223. package/dist/claude-code/.claude/skills/verify/verify-procedure.md +0 -512
  224. package/dist/claude-code/.claude/skills/warm-cache/SKILL.md +0 -81
  225. package/dist/claude-code/.claude/skills/watch-authorities/SKILL.md +0 -82
  226. package/dist/claude-code/.claude/skills/zoom-out/SKILL.md +0 -26
  227. package/hooks/first-run-nudge.sh +0 -82
  228. package/hooks/inject-using-gdd.sh +0 -72
  229. package/hooks/run-hook.cmd +0 -35
  230. package/hooks/update-check.sh +0 -251
  231. package/scripts/lib/audit-aggregator/index.cjs +0 -219
  232. package/scripts/lib/hedge-ensemble.cjs +0 -217
  233. package/skills/discover/SKILL.md +0 -78
  234. package/skills/discover/discover-procedure.md +0 -222
  235. package/skills/new-cycle/milestone-completeness-rubric.md +0 -87
  236. package/skills/scan/SKILL.md +0 -92
  237. package/skills/scan/scan-procedure.md +0 -732
@@ -1,46 +0,0 @@
1
- ---
2
- name: gdd-review-backlog
3
- description: "Review parked backlog items and promote any to active cycle todo."
4
- tools: Read, Write, AskUserQuestion
5
- disable-model-invocation: true
6
- ---
7
-
8
- # /gdd:review-backlog
9
-
10
- **Role:** Walk through parked backlog items and for each ask: promote to this cycle, keep parked, or archive.
11
-
12
- ## Step 1 - Read backlog
13
-
14
- Read `.design/backlog/BACKLOG.md`. Parse each `## <title>` block with its metadata and body. If no parked items, print "No parked backlog items." and stop.
15
-
16
- ## Step 2 - Loop
17
-
18
- For each item with `**Status**: parked`:
19
-
20
- Use `AskUserQuestion`:
21
- ```
22
- Title: <title>
23
- Added: <date>
24
- <truncated body>
25
-
26
- Promote to this cycle | Keep parked | Archive
27
- ```
28
-
29
- ## Step 3 - Apply decision
30
-
31
- - **Promote**: append `- [ ] [YYYY-MM-DD] <title>` under `## P1 — High` in `.design/TODO.md` (create file from the TODO.md skeleton if missing). Update backlog item status to `**Status**: promoted` + `**Promoted**: YYYY-MM-DD`.
32
- - **Keep parked**: leave unchanged.
33
- - **Archive**: update status to `**Status**: archived` + `**Archived**: YYYY-MM-DD`.
34
-
35
- Rewrite `.design/backlog/BACKLOG.md` after each decision so crashes preserve progress.
36
-
37
- ## Output
38
-
39
- ```
40
- ━━━ Backlog review ━━━
41
- Reviewed: 5
42
- Promoted: 2 Kept parked: 2 Archived: 1
43
- ━━━━━━━━━━━━━━━━━━━━━━
44
- ```
45
-
46
- ## REVIEW-BACKLOG COMPLETE
@@ -1,42 +0,0 @@
1
- ---
2
- name: gdd-review-decisions
3
- description: "Surfaces the async decision-review queue for team mode. Reads .design/reviews/<decision-id>/ entries and reports each decision's state in the proposed → reviewing → approved → locked machine (via scripts/lib/collab/review-queue.cjs), so a team can see what's awaiting review, what's approved, and what's locked. --pending shows only decisions still needing action. Read-only - it reports the queue; it never advances a decision (that's a reviewer's explicit call). Use to run an async design-decision review without a meeting."
4
- argument-hint: "[<decision-id>] [--pending]"
5
- user-invocable: true
6
- tools: Read, Bash, Grep, Glob
7
- ---
8
-
9
- # /gdd:review-decisions
10
-
11
- Closes the async-review gap for team mode: design decisions move through an explicit review queue
12
- instead of being decided in a single operator's head. This skill reports where each decision is.
13
- **Read-only** - it surfaces state; advancing a decision is a reviewer's explicit action. Contract:
14
- `../../reference/multi-author-model.md`.
15
-
16
- ## Invocation
17
-
18
- | Command | Behavior |
19
- |---|---|
20
- | `/gdd:review-decisions` | Every decision in the queue, grouped by state. |
21
- | `/gdd:review-decisions <decision-id>` | One decision's state + audit trail. |
22
- | `/gdd:review-decisions --pending` | Only decisions not yet `locked` (awaiting action). |
23
-
24
- ## Steps
25
-
26
- 1. **Find the queue.** List `.design/reviews/*/` (each dir is a `<decision-id>`). No reviews dir →
27
- print `review-decisions: no review queue yet (team mode not in use).` and exit.
28
- 2. **Read each entry** (`.design/reviews/<id>/state.json` → `{ id, state, audit }`). Validate the
29
- state against `scripts/lib/collab/review-queue.cjs` `STATES`.
30
- 3. **Render** grouped by state: `proposed` / `reviewing` / `approved` / `locked`, each listing the
31
- decision id + a one-line summary. For `--pending`, use `review-queue.pending(entries)` to show only
32
- non-locked ones. For a single `<decision-id>`, also print its audit trail (transitions + approvers).
33
- 4. **Do not advance.** Reporting only - moving a decision forward (or `/gdd:unlock-decision`) is the
34
- reviewer's explicit call.
35
-
36
- ## Output
37
-
38
- End with:
39
-
40
- ```
41
- ## REVIEW-DECISIONS COMPLETE
42
- ```
@@ -1,54 +0,0 @@
1
- ---
2
- name: gdd-roi
3
- description: "Shows whether GDD spend actually shipped anything. Joins per-cycle cost (.design/telemetry/costs.jsonl) with what each cycle shipped - commits that SURVIVED in main vs commits that were reverted - and reports cost-per-shipped-commit + a stick rate per cycle. 'Shipped' = a commit surviving >= the window (default 14 days), which catches revert-after-bug-discovery. Markdown table, not a GUI. Read-only - it reads git log + cost telemetry and reports. Use to see which cycles were worth their spend."
4
- argument-hint: "[--since <date>] [--window-days 14]"
5
- user-invocable: true
6
- tools: Read, Bash, Grep, Glob
7
- ---
8
-
9
- # /gdd:roi
10
-
11
- Closes the loop on cost: `/gdd:budget` forecasts *spend*, this shows the *return*. It joins per-cycle
12
- cost with the commits that actually stuck, so you can see cost-per-shipped-commit and which cycles
13
- were worth it. **Read-only** - it reads `git log` + cost telemetry and prints a table. Contract +
14
- the "shipped" definition: `../../reference/cost-governance.md`.
15
-
16
- ## Invocation
17
-
18
- | Command | Behavior |
19
- |---|---|
20
- | `/gdd:roi` | ROI table across all cycles with cost telemetry (14-day stick window). |
21
- | `/gdd:roi --since <date>` | Only cycles since `<date>`. |
22
- | `/gdd:roi --window-days N` | "Shipped" = a commit surviving ≥ N days (default 14). |
23
-
24
- ## Steps
25
-
26
- 1. **Check telemetry exists.** No `.design/telemetry/costs.jsonl` (or zero rows) → print
27
- `roi: no cost telemetry yet — run a cycle first.` and exit.
28
- 2. **Per-cycle cost.** Group `est_cost_usd` in `costs.jsonl` by `cycle`.
29
- 3. **Per-cycle shipped / reverted.** For each cycle, use `git log` to count, in that cycle's date
30
- range: commits still present in `main` and older than the window = **shipped**; commits that a
31
- later `revert` removed (or that were reverted within the window) = **reverted**. (A commit younger
32
- than the window is "too new to score" - exclude it, don't count it as shipped.)
33
- 4. **Join + compute** via the pure helper - never hand-compute:
34
-
35
- ```bash
36
- node -e '
37
- const { computeRoi, roiTableMarkdown } = require("./scripts/lib/budget/roi.cjs");
38
- const cycles = JSON.parse(process.argv[1]); // [{cycle,costUsd,commitsShipped,commitsReverted},...]
39
- console.log(roiTableMarkdown(computeRoi(cycles)));
40
- ' "$CYCLES_JSON"
41
- ```
42
-
43
- 5. **Render** the markdown table (cycle · cost · shipped · reverted · $/shipped · stick rate) plus the
44
- TOTAL row. A high `$/shipped` with a low stick rate is the signal that a cycle burned budget
45
- without lasting output.
46
- 6. **Do not act.** Reporting only - never revert, re-run, or change budget.
47
-
48
- ## Output
49
-
50
- End with:
51
-
52
- ```
53
- ## ROI COMPLETE
54
- ```
@@ -1,35 +0,0 @@
1
- ---
2
- name: gdd-rollout-status
3
- description: "Shows where a finished design cycle actually is in production rollout - unrolled / staging-only / canary-N% / prod-100% - by reading the feature-flag service (LaunchDarkly/Statsig/GrowthBook) via the rollout-coordinator. Surfaces STUCK rollouts (a canary that hasn't advanced for N days) and the design_arms outcome weighting. Read-only - GDD never advances or rolls back; it reports and notifies. Use after /gdd:ship to track the post-merge journey."
4
- argument-hint: "[<cycle>] [--all] [--stuck]"
5
- user-invocable: true
6
- tools: Read, Bash, Grep, Glob, ToolSearch, Task
7
- ---
8
-
9
- # /gdd:rollout-status
10
-
11
- Closes the visibility gap after `/gdd:ship`: a PR merges, but staging → canary → 100% rollout happens outside GDD. This skill reports where each cycle's design actually is in production, by delegating to `agents/rollout-coordinator.md` (which reads the feature-flag service via the Phase 38 connections). **Read-only** - it reports + notifies; it never advances or rolls back a rollout. Contract + the `<rollout_status>` schema: `../../reference/rollout-coordination.md`.
12
-
13
- ## Invocation
14
-
15
- | Command | Behavior |
16
- |---|---|
17
- | `/gdd:rollout-status` | The current cycle's rollout state (from `.design/STATE.md <rollout_status>`, refreshed via the coordinator). |
18
- | `/gdd:rollout-status <cycle>` | A specific cycle's rollout state. |
19
- | `/gdd:rollout-status --all` | Every cycle with a `<rollout_status>` block - a rollout dashboard. |
20
- | `/gdd:rollout-status --stuck` | Only the **stuck** rollouts (partial rollouts that haven't advanced for ≥ the threshold). |
21
-
22
- ## Steps
23
-
24
- 1. **Probe the flag service.** Check a flag connection is `available` (`connections/launchdarkly.md` / `statsig.md` / `growthbook.md`). None → print `rollout-status: no flag service configured — connect one via /gdd:connections.` and exit.
25
- 2. **Delegate to `rollout-coordinator`** (via `Task`): it reads the service, classifies via `scripts/lib/rollout/rollout-status.cjs`, refreshes the `<rollout_status>` block, and reports state + deployed % + stuck.
26
- 3. **Render.** Show each cycle: `state` · `deployed_pct` · `last_changed` · `stuck?`. For `--stuck`, list only stuck cycles with the days-since-change and an advance-or-rollback suggestion.
27
- 4. **Do not act.** Never run a flag-service mutation, advance a canary, or roll back - GDD reports; the human + the flag service decide.
28
-
29
- ## Output
30
-
31
- End with:
32
-
33
- ```
34
- ## ROLLOUT-STATUS COMPLETE
35
- ```
@@ -1,89 +0,0 @@
1
- ---
2
- name: gdd-router
3
- description: "Routes a /gdd command to fast|quick|full path + S|M|L|XL complexity_class and returns {path, complexity_class, model_tier_overrides, resolved_models, estimated_cost_usd, cache_hits}. Deterministic - no model call. Invoked once at command entry before any Agent spawn. Read by hooks/budget-enforcer.js."
4
- argument-hint: "<intent-string> [<target-artifacts-csv>]"
5
- tools: Read, Bash, Grep
6
- ---
7
-
8
- # gdd-router
9
-
10
- ## Role
11
-
12
- You are a deterministic routing skill. You do not spawn agents. You read `.design/budget.json`, `reference/model-prices.md`, `.design/cache-manifest.json` (if present), and the agent frontmatter list, then emit a single JSON object describing the planned spawn graph. The budget-enforcer hook (`hooks/budget-enforcer.js`) consumes your output on every `Agent` tool call.
13
-
14
- ## Invocation Contract
15
-
16
- - **Input**: `intent-string` (e.g., `"run discover stage on greenfield project"`) + optional comma-separated list of target artifacts (files this command will touch).
17
- - **Output**: a single JSON object to stdout - nothing else on the line, no prose wrapper:
18
- ```json
19
- {
20
- "path": "fast",
21
- "complexity_class": "M",
22
- "model_tier_overrides": {"design-verifier": "haiku"},
23
- "resolved_models": {
24
- "design-reflector": "gpt-5",
25
- "design-context-checker": "gpt-5-nano",
26
- "design-verifier": "gpt-5-nano"
27
- },
28
- "estimated_cost_usd": 0.034,
29
- "cache_hits": ["design-context-builder:abc123"]
30
- }
31
- ```
32
- - `path` enum: `fast` (single Haiku + no checkers), `quick` (Sonnet mappers + Haiku verify), `full` (Opus planners + full quality gates). Stays unchanged for back-compat per D-05.
33
- - `complexity_class` enum: `S | M | L | XL` (Phase 25 / D-04, D-05). Additive to `path` - existing consumers reading only `path` keep working. Mapping is documented in the Path Selection Heuristic table below.
34
- - `model_tier_overrides` merges agent frontmatter `default-tier` with `.design/budget.json.tier_overrides` - budget.json wins per D-04. Enum stays `opus|sonnet|haiku` for back-compat across all 14 runtimes; consumers that need the **concrete** model name for the active runtime read `resolved_models` instead.
35
- - `resolved_models` is a per-agent map of concrete model IDs for the runtime in use (Phase 26 / D-07). Keys are agent names; values are runtime-specific model strings (e.g. `"gpt-5"` under codex, `"gemini-2.5-pro"` under gemini, `"claude-opus-4-7"` under claude) or `null` when the resolver can supply no model (missing tier-map row, missing tier on the row). Additive to `model_tier_overrides` - existing consumers reading the tier-name map keep working unchanged; new consumers (budget-enforcer cost computation, cost telemetry, bandit posterior store) read `resolved_models` for runtime-correct cost. See **Runtime-aware model resolution** below for the computation contract.
36
- - `estimated_cost_usd` is the sum of per-spawn estimates using the D-06 formula and `reference/model-prices.md`.
37
- - `cache_hits` is a list of `{agent}:{input-hash}` strings that exist in `.design/cache-manifest.json` and are within TTL; emitting a hit lets the hook short-circuit that spawn per D-05.
38
-
39
- ### Output schema versioning
40
-
41
- The router output contract is additive across phases. The current shape (Phase 26, v1.26.0) carries:
42
-
43
- | Field | Added in | Status |
44
- |-------|----------|--------|
45
- | `path` | v1.10.1 (10.1-01) | stable |
46
- | `model_tier_overrides` | v1.10.1 (10.1-01) | stable, enum unchanged |
47
- | `estimated_cost_usd` | v1.10.1 (10.1-01) | stable |
48
- | `cache_hits` | v1.10.1 (10.1-01) | stable |
49
- | `complexity_class` | v1.25.0 (25-02) | stable, additive |
50
- | `resolved_models` | v1.26.0 (26-04) | stable, additive |
51
-
52
- Existing consumers reading any subset of the older fields keep working unchanged across these bumps - the schema is a strict superset at every phase boundary. New fields are documented inline in this skill rather than in a separate JSON-schema file (the SKILL is the contract - same convention Phase 25 followed for `complexity_class`).
53
-
54
- ## Path Selection Heuristic
55
-
56
- The router emits `path` (3-tier: `fast|quick|full`, legacy enum, stable for back-compat) AND `complexity_class` (4-tier: `S|M|L|XL`, Phase 25 / D-04 additive). Full mapping table, bucket-assignment signal list, `--dry-run` downgrade rule, and the S-class short-circuit semantics live in `./router-rules.md#path-selection-heuristic`. The S-class short-circuit is essential: when `complexity_class` would be `S`, the router does not run; the deterministic skip list lives in the `/gdd:*` SKILL.md entry, and the budget-enforcer hook treats "no payload + matching command name" as the S signal.
57
-
58
- ## Cost Estimation Algorithm
59
-
60
- Standard cost-estimation pseudocode (sum over planned spawn graph; per-agent `(in_tok / 1e6) * in_rate + (out_tok / 1e6) * out_rate` using `./reference/model-prices.md`) lives in `./router-rules.md#cost-estimation-algorithm`.
61
-
62
- ## Runtime-aware model resolution
63
-
64
- Computation contract for `resolved_models`, implementation surfaces (`scripts/lib/runtime-detect.cjs` + `scripts/lib/tier-resolver.cjs`), per-agent emission rules (including the JSON-`null` contract), and the Claude-runtime back-compat assertion live in `./router-rules.md#runtime-aware-model-resolution`. Top-line: `model_tier_overrides` keeps its `opus|sonnet|haiku` enum for back-compat; `resolved_models` runs the per-runtime translation additively on top.
65
-
66
- ## Cache-Hit Detection
67
-
68
- Delegate to `skills/cache-manager/SKILL.md` (Plan 10.1-02). The router lists candidate `{agent}:{input-hash}` tuples; the cache-manager confirms freshness against TTL from `budget.json.cache_ttl_seconds`.
69
-
70
- ## Integration Point
71
-
72
- Every `/gdd:*` SKILL.md's first substantive step is: spawn the router via `Task` or inline invocation; receive the JSON blob; pass it to downstream agents as context so the budget-enforcer hook has the router decision available in tool_input metadata when the first Agent spawn fires.
73
-
74
- ## Failure Modes
75
-
76
- If `.design/budget.json` is missing, assume defaults from `reference/config-schema.md` per D-12. If `reference/model-prices.md` is missing, emit `estimated_cost_usd: null` and log a warning - do not block.
77
-
78
- ## Emitting capability_gap on unmatched intent
79
-
80
- When the router cannot resolve `intent-string` to a known agent (no `description` match, no `default-tier` rule, no path-selection fallback), emit ONE `capability_gap` event with `source: "router"` before returning the conservative-fallback JSON. Feeds Phase 29 Stage-0 telemetry - see `./capability-gap-emitter.md` for the synchronous Node snippet, semantic notes (suggested_kind = `"agent"`, MCP-probe exclusion per D-08, back-compat invariant on router output), and the opaque-extras payload routing through `appendChainEvent`.
81
-
82
- ## Emitting router_pick on a resolved pick
83
-
84
- When the router DID resolve a pick - it has the `path`/`complexity_class`/`resolved_models` decision and is about to return the decision JSON - emit ONE `router_pick` event (`source: "router"`) recording which skill/agent was auto-picked, as the last step before returning. Side-effect only; the output JSON contract is UNCHANGED. Feeds the D-02 under-reached-skill instrument (Phase 33 baselines per-skill pick rates) - see `./router-pick-emitter.md` for the synchronous Node snippet, the 7-field no-PII payload (context_hash only - never the raw prompt), and the opaque-extras routing through `appendChainEvent`.
85
-
86
- ## Non-Goals
87
-
88
- The router does not: (a) make a model call, (b) write files, (c) enforce budget caps (that's the hook's job), (d) learn from history (Phase 11 reflector territory per D-07).
89
- The router does not author capability-gap CLUSTERS - Stage-0 emit is single-event-per-failure. Aggregation across events is Plan 29-03's reflector pass.
@@ -1,65 +0,0 @@
1
- # gdd-router - capability_gap emitter (Phase 29 / D-02 / D-08)
2
-
3
- Co-located reference for `skills/router/SKILL.md` - split out per Phase 28.5
4
- contract (router SKILL ≤100 lines) and the Phase 28.6 co-location pattern.
5
-
6
- ## When to emit
7
-
8
- If the router cannot resolve `intent-string` to a known agent (no agent's
9
- `description` field matches, no `default-tier` rule applies, and the fallback
10
- path-selection table returns nothing meaningful), emit ONE `capability_gap`
11
- event before returning the conservative-fallback JSON output to the caller.
12
-
13
- This feeds Phase 29 Stage-0 telemetry - the reflector pattern-detection pass
14
- (Plan 29-02) and aggregation (Plan 29-03) read these events from the chain
15
- file (`.design/gep/events.jsonl`) to surface recurring router-unmatched
16
- intents as candidate agents in `/gdd:apply-reflections`.
17
-
18
- ## Synchronous emitter snippet
19
-
20
- Same shape as fast, with `source: "router"`:
21
-
22
- ```bash
23
- node -e '
24
- const { appendChainEvent } = require("./scripts/lib/event-chain.cjs");
25
- const { createHash, randomUUID } = require("node:crypto");
26
- const intent = process.env.GDD_INTENT || "";
27
- const payload = {
28
- event_id: randomUUID(),
29
- parent_event_id: null,
30
- source: "router",
31
- context_hash: createHash("sha256").update(intent).digest("hex"),
32
- intent_summary: intent.slice(0, 256),
33
- suggested_kind: "agent",
34
- evidence_refs: [],
35
- };
36
- appendChainEvent({
37
- agent: "router",
38
- outcome: "capability_gap",
39
- payload,
40
- type: "capability_gap",
41
- timestamp: new Date().toISOString(),
42
- sessionId: process.env.GDD_SESSION_ID || "router-cli",
43
- });
44
- '
45
- ```
46
-
47
- ## Notes
48
-
49
- - `suggested_kind` is `"agent"` because router unmatched intents typically
50
- describe multi-step workflows (the unit the router resolves).
51
- - Router-unmatched is NOT the same as MCP-probe failure (per D-08). If
52
- gdd-router returns a fallback because a peer-CLI connection is down, do
53
- NOT emit capability_gap - that's a Phase 22 connection-status concern.
54
- - The emitter is the LAST step before returning the fallback JSON. Router
55
- output is unchanged (back-compat per the existing `## Output schema
56
- versioning` table in `SKILL.md`); the event is a SIDE EFFECT, not a
57
- payload addition.
58
- - Router output JSON contract is UNCHANGED - back-compat preserved.
59
- - The 7-field payload flows through `appendChainEvent`'s opaque-extras
60
- pattern verbatim; the chain row carries `type`, `timestamp`, `sessionId`,
61
- `payload` as opaque extras and is projected back to the events-schema
62
- envelope by Plan 29-03 aggregation.
63
-
64
- MCP-probe failures (connection down, transport-layer errors) do NOT emit
65
- `capability_gap` - those are Phase 22 connection-status concerns (D-08).
@@ -1,78 +0,0 @@
1
- # gdd-router - router_pick emitter (Phase 32-08 / D-02)
2
-
3
- Co-located reference for `skills/router/SKILL.md` - split out per the Phase 28.5
4
- contract (router SKILL ≤100 lines) and the Phase 28.6 co-location pattern (same
5
- convention as the sibling `./capability-gap-emitter.md`).
6
-
7
- ## When to emit
8
-
9
- When the router resolves an intent to a concrete pick - i.e. it has selected the
10
- `path` / `complexity_class` / `resolved_models` decision and is about to return
11
- its decision JSON - emit ONE `router_pick` event recording WHICH skill/agent it
12
- auto-picked. Emit exactly once per resolved pick, as the LAST step before
13
- returning the decision JSON to the caller.
14
-
15
- This is the D-02 router_pick instrument: GDD routes by description-match but has
16
- no record of what the router actually reaches for, so there is no data on
17
- under-reached skills. Phase 33 reads these events from the chain file
18
- (`.design/gep/events.jsonl`) to baseline per-skill auto-pick rates (the
19
- "pick-rate regression" expansion in the ROADMAP).
20
-
21
- `router_pick` is NOT `capability_gap`: emit `router_pick` when the router DID
22
- resolve a pick; emit `capability_gap` (see `./capability-gap-emitter.md`) only
23
- when it could not resolve the intent at all. They are disjoint surfaces.
24
-
25
- ## Synchronous emitter snippet
26
-
27
- Builds the 7-field `RouterPickPayload` and writes it via `appendChainEvent`.
28
- The intent is hashed - the raw prompt is NEVER stored (no PII). `picked_skill`,
29
- `rank`, and `alternatives` come from the router's resolved decision:
30
-
31
- ```bash
32
- node -e '
33
- const { appendChainEvent } = require("./scripts/lib/event-chain.cjs");
34
- const { createHash, randomUUID } = require("node:crypto");
35
- const intent = process.env.GDD_INTENT || "";
36
- const payload = {
37
- event_id: randomUUID(),
38
- source: "router",
39
- picked_skill: process.env.GDD_PICKED_SKILL || "",
40
- context_hash: createHash("sha256").update(intent).digest("hex"),
41
- rank: Number(process.env.GDD_PICK_RANK || 0),
42
- alternatives: (process.env.GDD_ALTERNATIVES || "").split(",").filter(Boolean),
43
- ts: new Date().toISOString(),
44
- };
45
- appendChainEvent({
46
- agent: "router",
47
- outcome: "router_pick",
48
- payload,
49
- type: "router_pick",
50
- timestamp: new Date().toISOString(),
51
- sessionId: process.env.GDD_SESSION_ID || "router-cli",
52
- });
53
- '
54
- ```
55
-
56
- `GDD_PICKED_SKILL` is the resolved pick; `GDD_PICK_RANK` is its rank among
57
- candidates (0 = top pick); `GDD_ALTERNATIVES` is a comma-separated list of the
58
- OTHER candidate skill/agent names the router considered (names only - no scores,
59
- no prompt text). `GDD_INTENT` is hashed in-process and is never written to disk.
60
-
61
- ## Notes
62
-
63
- - **No PII**: only `context_hash` (sha256 of the intent) is stored - never the
64
- raw prompt or intent string. The `RouterPickPayload` is
65
- `additionalProperties: false`, so a stray `raw_prompt` field would be rejected
66
- by `events.schema.json` validation. This mirrors `capability_gap`'s hash
67
- discipline.
68
- - **Router output JSON contract is UNCHANGED** - `router_pick` is a SIDE EFFECT,
69
- not a new output field. Back-compat is preserved exactly as the existing
70
- `## Output schema versioning` table in `SKILL.md` guarantees; the emitter runs
71
- AFTER the decision is computed and does not alter the returned blob.
72
- - The 7-field payload flows through `appendChainEvent`'s opaque-extras pattern
73
- verbatim; the chain row carries `type`, `timestamp`, `sessionId`, `payload` as
74
- opaque extras and is projected back to the events-schema envelope by Phase 33
75
- aggregation (same projection the capability_gap aggregation uses).
76
- - Validated against the additive `RouterPickPayload` branch (allOf[2]) in
77
- `reference/schemas/events.schema.json` - see
78
- `test/suite/router-pick-event.test.cjs`.
@@ -1,84 +0,0 @@
1
- ---
2
- name: router-rules
3
- type: heuristic
4
- version: 1.0.0
5
- phase: 28.5
6
- tags: [router, path-selection, complexity-class, model-tier, runtime-resolution, cost-estimation]
7
- last_updated: 2026-05-18
8
- ---
9
-
10
- # Router Path-Selection + Runtime Resolution Rules
11
-
12
- Extracted from `skills/router/SKILL.md` per Phase 28.5 D-10 (extract-then-link, never delete
13
- content). The router SKILL keeps its invocation contract, output schema versioning table,
14
- integration point, and failure modes. The path-selection heuristic tables, the cost
15
- estimation algorithm, and the runtime-aware model resolution computation contract live
16
- here so the SKILL stays under the 100-line cap.
17
-
18
- ## Path Selection Heuristic
19
-
20
- The router emits both `path` (legacy 3-tier enum) and `complexity_class` (Phase 25 4-tier enum). The canonical mapping is:
21
-
22
- | complexity_class | path | Behavior |
23
- |------------------|------|----------|
24
- | `S` | `fast` (short-circuited) | Skip router itself, skip cache-manager, skip telemetry write. Deterministic no-op decision. |
25
- | `M` | `fast` | Single Haiku + no checkers. |
26
- | `L` | `quick` | Sonnet mappers + Haiku verify. |
27
- | `XL` | `full` | Opus planners + full quality gates. Recommends worktree-isolation default + mandatory inter-stage checkpoint + reflector auto-spawn. |
28
-
29
- Bucket assignment:
30
-
31
- | Signal | complexity_class | path |
32
- |--------|------------------|------|
33
- | Command is `/gdd:help`, `/gdd:stats`, `/gdd:note`, `/gdd:health`, single-Haiku skill | `S` | `fast` (short-circuited - see below) |
34
- | Command is `/gdd:scan`, `/gdd:brief`, `/gdd:sketch`, `/gdd:spike`, `/gdd:fast` | `M` | `fast` |
35
- | Command spawns exactly one agent (no orchestration), not in S list | `M` | `fast` |
36
- | Command is `/gdd:explore`, `/gdd:discover`, standalone `/gdd:verify`, standalone `/gdd:plan` | `L` | `quick` |
37
- | Command spawns parallel mappers but no planners/auditors (`/gdd:discover` in `--auto` mode) | `L` | `quick` |
38
- | Command is `/gdd:next`, `/gdd:do`, `/gdd:autonomous`, end-to-end Brief→Verify, anything spawning planners + auditors + verifiers in series | `XL` | `full` |
39
- | Command spawns planners, auditors, verifiers, or integration-checkers (`/gdd:plan`, `/gdd:verify`, `/gdd:audit`) and is not standalone | `XL` | `full` |
40
- | `--dry-run` flag present on any command | downgrade one tier (XL→L→M→S; `path` follows the mapping table) |
41
-
42
- ### S-class short-circuit
43
-
44
- When `complexity_class` would be `S`, the router itself **does not run** for that invocation - the deterministic skip list is encoded in the `/gdd:*` SKILL.md entry of the matching command. The budget-enforcer hook treats "no router decision payload + matching command name" as the S-class signal and skips enforcement entirely (no telemetry row, no cache lookup, no event emission). When the router *is* invoked explicitly (e.g., debugging) it still emits `complexity_class: "S"` in the JSON for observability, but the runtime path is the no-op.
45
-
46
- ## Cost Estimation Algorithm
47
-
48
- ```
49
- total = 0
50
- for each agent in planned spawn graph:
51
- tier = resolve_tier(agent) # budget.json tier_overrides > agent frontmatter default-tier
52
- (in_tok, out_tok) = token_range_from_size_budget(agent.size_budget) # from reference/model-prices.md
53
- (in_rate, out_rate) = price_from_tier(tier)
54
- total += (in_tok / 1e6) * in_rate + (out_tok / 1e6) * out_rate
55
- return total
56
- ```
57
-
58
- ## Runtime-aware model resolution
59
-
60
- The router emits `resolved_models` alongside `model_tier_overrides` so downstream consumers (budget-enforcer cost computation, Phase 22 cost telemetry, Phase 23.5 bandit posterior store) can read the **concrete model ID** for the active runtime without re-deriving it from the tier name. The resolution is per-agent and additive - `model_tier_overrides` keeps its `opus|sonnet|haiku` enum for back-compat across all 14 runtimes, and `resolved_models` runs the runtime-specific translation on top of it.
61
-
62
- Computation contract (per D-07):
63
-
64
- ```
65
- runtime = runtimeDetect.detect() ?? 'claude'
66
- for each agent in planned spawn graph:
67
- tier = resolve_tier(agent) # same merge as model_tier_overrides
68
- resolved_models[agent] = tierResolver.resolve(runtime, tier)
69
- # → concrete model string OR null
70
- ```
71
-
72
- Implementation surfaces (Phase 26 / Wave A):
73
-
74
- - `scripts/lib/runtime-detect.cjs` - `detect() → runtime-id | null`. Reads the same `*_CONFIG_DIR` / `*_HOME` env-vars Phase 24's installer uses (single source of truth in `scripts/lib/install/runtimes.cjs`). Returns `null` when no recognized runtime env-var is set; the router falls back to `'claude'` so the resolver always has a runtime ID to work with.
75
- - `scripts/lib/tier-resolver.cjs` - `resolve(runtime, tier, opts?) → model | null`. Translates `opus|sonnet|haiku` to the concrete model the runtime understands using the `./runtime-models.md` mapping (Phase 26 / Wave A). Fallback chain (D-04): runtime-specific entry → `claude` row default with `tier_resolution_fallback` event → `null` with `tier_resolution_failed` event. Never throws; `null` is a valid output the consumer must handle.
76
-
77
- Per-agent emission rules:
78
-
79
- - One key per agent in the planned spawn graph (same key set the cost-estimation loop iterates over). Keys MUST match agent names exactly so consumers can join `resolved_models` against `model_tier_overrides` and the spawn graph by name.
80
- - Value is the concrete model string returned by `tier-resolver.resolve(runtime, tier)`.
81
- - When the resolver returns `null` (missing tier-map row, missing tier, garbage input), the value is JSON `null` - NOT omitted, NOT the empty string. Consumers (budget-enforcer, telemetry) MUST handle `null`: typically by skipping the cost row for that spawn and emitting their own diagnostic event, never by crashing.
82
- - When `complexity_class` is `S` and the router itself short-circuits (see **S-class short-circuit** above), no payload is emitted at all and `resolved_models` does not exist for that invocation - the budget-enforcer's "no router decision payload" branch already handles this case.
83
-
84
- Back-compat assertion: a router invocation in a Claude runtime (or any environment where `runtime-detect.detect()` returns `null` and the router falls back to `'claude'`) produces `resolved_models` values that are the canonical Anthropic model IDs (`claude-opus-4-7`, `claude-sonnet-4-6`, `claude-haiku-4-5`) for the corresponding tiers. Pre-Phase-26 consumers that ignore `resolved_models` see the same `model_tier_overrides` they always saw (Plan 26-09 owns the runtime fixture diff that asserts this).
@@ -1,92 +0,0 @@
1
- ---
2
- name: scan
3
- description: "Pre-pipeline initializer that maps an existing repo's design system (colors, typography, spacing, components, tokens), runs the anti-pattern audit, scores the 7 weighted categories, and writes DESIGN.md + .design/DESIGN-DEBT.md. Use when starting work in any new or existing repo before /gdd:discover. Activates for requests involving a fast read-only anti-pattern sweep, a quick design lint, or spotting slop without a full audit."
4
- argument-hint: "[--quick] [--full]"
5
- user-invocable: true
6
- ---
7
-
8
- # Get Design Done - Scan
9
-
10
- **Pre-pipeline initializer.** Run once in any new or existing repo before starting the Discover -> Plan -> Design -> Verify pipeline.
11
-
12
- Full procedure detail: `./scan-procedure.md`.
13
-
14
- Produces:
15
- - `DESIGN.md` - snapshot of the existing design system as it actually is
16
- - `.design/DESIGN-DEBT.md` - prioritized debt roadmap
17
-
18
- `--quick`: Skip component inventory, focus on tokens + anti-patterns only (~2 min)
19
- `--full`: Include component-by-component analysis (slower, more thorough)
20
-
21
- Default: full scan of tokens, patterns, and anti-patterns. Component inventory is a summary count, not per-file.
22
-
23
- ---
24
-
25
- ## State Integration
26
-
27
- At scan entry, before running any step:
28
-
29
- 1. Read or create `.design/STATE.md` from `reference/STATE-TEMPLATE.md` (set `stage=scan`, `status=in_progress`, `task_progress=0/8`; preserve `started_at` on resume). See `./scan-procedure.md` §State Integration for the full read/create/resume decision tree.
30
- 2. Probe Figma + Refero connections (variant-agnostic ToolSearch + tiebreaker resolution). Detail: `./scan-procedure.md` §Probe connection availability.
31
- 3. Run the four Phase 8 probes (preview, storybook, chromatic, graphify) and batch-write results to STATE.md `<connections>`. Detail: `./scan-procedure.md` §Phase 8 Connection Probes.
32
- 4. Emit the first-run connection nudge if every probe returned `not_configured` AND `.design/config.json > connections_onboarding` is absent.
33
- 5. Update `last_checkpoint`; persist STATE.md before proceeding to Step 1.
34
-
35
- ---
36
-
37
- ## Workflow
38
-
39
- The scan executes eight steps in order. Each step's full grep commands, analysis prompts, and decision rules live in `./scan-procedure.md` - keep that file open while executing.
40
-
41
- ### Step 1 - Orient
42
-
43
- Detect framework, CSS approach, component count, style file count, token system. Detect source root by ordered fallback (`src/` -> `app/` -> `pages/` -> `lib/`) and substitute into subsequent grep commands. Log the detected source root in DESIGN.md frontmatter. Detail: `./scan-procedure.md` §Step 1.
44
-
45
- ### Step 2 - Extract Color System
46
-
47
- Grep hex / `oklch()` / `hsl()` / `rgb()` colors, CSS custom properties, and Tailwind color config. Analyze palette size, token discipline, AI-slop colors (#6366f1, #8b5cf6, #06b6d4), semantic naming, dark-mode purity. Produce a color inventory table. Detail: `./scan-procedure.md` §Step 2.
48
-
49
- ### Step 2A - Figma Token Augmentation
50
-
51
- If `figma: available` in STATE.md `<connections>`: call `{prefix}get_variable_defs`, translate variables by type/name pattern, merge with grep-derived tokens (never replace). Skip silently if `figma` is `not_configured` or `unavailable`. Detail: `./scan-procedure.md` §Step 2A.
52
-
53
- ### Step 3 - Extract Typography System
54
-
55
- Grep font families, sizes, weights, line-heights. Analyze family count, scale compliance, weight hierarchy, line-height on body, reflex-font signals. Read `${CLAUDE_PLUGIN_ROOT}/reference/typography.md` for comparison criteria. Detail: `./scan-procedure.md` §Step 3.
56
-
57
- ### Step 4 - Extract Spacing System
58
-
59
- Grep CSS spacing values, Tailwind spacing overrides, space tokens. Score grid compliance against the 4/8/12/16/24/32/48/64 series. Detail: `./scan-procedure.md` §Step 4.
60
-
61
- ### Step 5 - Anti-Pattern Audit
62
-
63
- Read `${CLAUDE_PLUGIN_ROOT}/reference/anti-patterns.md`. Run all BAN-XX and SLOP-XX grep commands, plus a11y checks (focus rings, reduced-motion, div onClick, small fonts). Detail: `./scan-procedure.md` §Step 5.
64
-
65
- ### Step 6 - Component Inventory
66
-
67
- If `--quick`, skip. Otherwise run the three-pass multi-signal filter (JSX-return + className + framework-import) to produce an authoritative component list, then enumerate primitives. In `--full` mode, emit one row per file. Detail: `./scan-procedure.md` §Step 6.
68
-
69
- ### Step 7 - Score All 7 Categories
70
-
71
- Read `${CLAUDE_PLUGIN_ROOT}/reference/audit-scoring.md`. Score each category 0–10 and apply the weighted formula `(A11Y * 0.25) + (Visual Hierarchy * 0.20) + (Typography * 0.15) + (Color * 0.15) + (Layout * 0.10) + (Anti-Patterns * 0.10) + (Motion * 0.05)`. Grade A=90+, B=75+, C=60+, D=45+, F<45.
72
-
73
- ### Step 8 - Generate Design Debt Roadmap
74
-
75
- Classify each finding P0/P1/P2/P3, estimate effort XS/S/M/L/XL, group by debt theme, compute `priority_score = (severity_weight * effort_weight) + (dependency_depth * 2)`. Mark P1+XS/S items as quick wins. Detail: `./scan-procedure.md` §Step 8.
76
-
77
- ---
78
-
79
- ## Outputs
80
-
81
- Write both artifacts using the templates in `./scan-procedure.md`:
82
-
83
- - **`DESIGN.md`** (project root) - design-system snapshot with score table, color/typography/spacing/component inventories, anti-pattern status, motion summary. Frontmatter records `score`, `framework`, `css_approach`, `token_layer`, and (if Figma ran) `figma_variables_used` + `figma_source`. Template: `./scan-procedure.md` §Output 1.
84
- - **`.design/DESIGN-DEBT.md`** - prioritized debt roadmap grouped P0/P1/P2/P3, with priority_score ordering, recommended fix order, and pipeline recommendation. Template: `./scan-procedure.md` §Output 2.
85
-
86
- ---
87
-
88
- ## After Writing
89
-
90
- Print the user-facing summary block from `./scan-procedure.md` §After Writing - project name, score, P0/P1 counts, quick-win count, artifact paths, and next-step options (start pipeline, fix quick wins first, or just reference the debt).
91
-
92
- ## SCAN COMPLETE