@hegemonart/get-design-done 1.59.2 → 1.59.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +56 -0
- package/SKILL.md +2 -0
- package/agents/design-advisor.md +1 -1
- package/agents/design-context-checker-gate.md +0 -1
- package/agents/design-context-checker.md +0 -1
- package/agents/design-context-reviewer-gate.md +0 -1
- package/agents/design-context-reviewer.md +0 -1
- package/agents/design-integration-checker-gate.md +0 -1
- package/agents/design-integration-checker.md +0 -1
- package/agents/design-plan-checker.md +0 -1
- package/agents/design-verifier-gate.md +0 -1
- package/agents/design-verifier.md +0 -1
- package/agents/prototype-gate.md +0 -1
- package/agents/quality-gate-runner.md +0 -1
- package/figma-plugin/README.md +61 -0
- package/figma-plugin/code.ts +36 -0
- package/figma-plugin/manifest.json +12 -0
- package/figma-plugin/package-lock.json +35 -0
- package/figma-plugin/package.json +12 -0
- package/figma-plugin/src/export-variables.ts +144 -0
- package/figma-plugin/src/payload-schema.ts +250 -0
- package/figma-plugin/tsconfig.json +16 -0
- package/figma-plugin/ui.html +44 -0
- package/hooks/gdd-intel-trigger.js +3 -3
- package/package.json +6 -1
- package/reference/DEPRECATIONS.md +3 -3
- package/reference/live-mode-integration.md +1 -1
- package/reference/registry.json +1 -1
- package/reference/skill-metadata.md +4 -4
- package/reference/skill-placeholders.md +2 -2
- package/scripts/build-skills.cjs +146 -0
- package/scripts/generate-skill-frontmatter.cjs +243 -0
- package/scripts/lib/manifest/scaffolder.cjs +1 -1
- package/scripts/lib/manifest/schemas/skills.schema.json +1 -1
- package/scripts/lib/manifest/skills.json +1 -1
- package/scripts/lib/new-addendum.cjs +1 -1
- package/scripts/skill-templates/README.md +90 -0
- package/scripts/skill-templates/add-backlog/SKILL.md +48 -0
- package/scripts/skill-templates/analyze-dependencies/SKILL.md +95 -0
- package/scripts/skill-templates/apply-reflections/SKILL.md +109 -0
- package/scripts/skill-templates/apply-reflections/apply-reflections-procedure.md +170 -0
- package/scripts/skill-templates/audit/SKILL.md +79 -0
- package/scripts/skill-templates/bandit-reset/SKILL.md +91 -0
- package/scripts/skill-templates/bandit-status/SKILL.md +94 -0
- package/scripts/skill-templates/benchmark/SKILL.md +65 -0
- package/scripts/skill-templates/bootstrap-ds/SKILL.md +43 -0
- package/scripts/skill-templates/brief/SKILL.md +145 -0
- package/scripts/skill-templates/budget/SKILL.md +45 -0
- package/scripts/skill-templates/cache-manager/SKILL.md +66 -0
- package/scripts/skill-templates/cache-manager/cache-policy.md +126 -0
- package/scripts/skill-templates/check-update/SKILL.md +98 -0
- package/scripts/skill-templates/compare/SKILL.md +82 -0
- package/scripts/skill-templates/compare/compare-rubric.md +171 -0
- package/scripts/skill-templates/complete-cycle/SKILL.md +81 -0
- package/scripts/skill-templates/connections/SKILL.md +71 -0
- package/scripts/skill-templates/connections/connections-onboarding.md +608 -0
- package/scripts/skill-templates/context/SKILL.md +137 -0
- package/scripts/skill-templates/continue/SKILL.md +24 -0
- package/scripts/skill-templates/darkmode/SKILL.md +76 -0
- package/scripts/skill-templates/darkmode/darkmode-audit-procedure.md +258 -0
- package/scripts/skill-templates/debug/SKILL.md +41 -0
- package/scripts/skill-templates/debug/debug-feedback-loops.md +119 -0
- package/scripts/skill-templates/design/SKILL.md +118 -0
- package/scripts/skill-templates/design/design-procedure.md +304 -0
- package/scripts/skill-templates/discuss/SKILL.md +96 -0
- package/scripts/skill-templates/do/SKILL.md +45 -0
- package/scripts/skill-templates/explore/SKILL.md +118 -0
- package/scripts/skill-templates/explore/explore-procedure.md +267 -0
- package/scripts/skill-templates/export/SKILL.md +30 -0
- package/scripts/skill-templates/extract-learnings/SKILL.md +114 -0
- package/scripts/skill-templates/fast/SKILL.md +91 -0
- package/scripts/skill-templates/figma-extract/SKILL.md +64 -0
- package/scripts/skill-templates/figma-write/SKILL.md +50 -0
- package/scripts/skill-templates/graphify/SKILL.md +49 -0
- package/scripts/skill-templates/health/SKILL.md +99 -0
- package/scripts/skill-templates/health/health-mcp-detection.md +44 -0
- package/scripts/skill-templates/health/health-skill-length-report.md +69 -0
- package/scripts/skill-templates/help/SKILL.md +60 -0
- package/scripts/skill-templates/instinct/SKILL.md +111 -0
- package/scripts/skill-templates/list-assumptions/SKILL.md +61 -0
- package/scripts/skill-templates/list-pins/SKILL.md +27 -0
- package/scripts/skill-templates/live/SKILL.md +98 -0
- package/scripts/skill-templates/locale/SKILL.md +51 -0
- package/scripts/skill-templates/map/SKILL.md +89 -0
- package/scripts/skill-templates/migrate/SKILL.md +70 -0
- package/scripts/skill-templates/migrate-context/SKILL.md +123 -0
- package/scripts/skill-templates/new-addendum/SKILL.md +81 -0
- package/scripts/skill-templates/new-cycle/SKILL.md +37 -0
- package/scripts/skill-templates/new-project/SKILL.md +53 -0
- package/scripts/skill-templates/new-skill/SKILL.md +90 -0
- package/scripts/skill-templates/next/SKILL.md +68 -0
- package/scripts/skill-templates/note/SKILL.md +48 -0
- package/scripts/skill-templates/openrouter-status/SKILL.md +86 -0
- package/scripts/skill-templates/optimize/SKILL.md +97 -0
- package/scripts/skill-templates/override/SKILL.md +86 -0
- package/scripts/skill-templates/paper-write/SKILL.md +54 -0
- package/scripts/skill-templates/pause/SKILL.md +77 -0
- package/scripts/skill-templates/peer-cli-add/SKILL.md +88 -0
- package/scripts/skill-templates/peer-cli-add/peer-cli-protocol.md +161 -0
- package/scripts/skill-templates/peer-cli-customize/SKILL.md +89 -0
- package/scripts/skill-templates/peers/SKILL.md +96 -0
- package/scripts/skill-templates/pencil-write/SKILL.md +54 -0
- package/scripts/skill-templates/pin/SKILL.md +37 -0
- package/scripts/skill-templates/plan/SKILL.md +105 -0
- package/scripts/skill-templates/plan/plan-procedure.md +278 -0
- package/scripts/skill-templates/plant-seed/SKILL.md +48 -0
- package/scripts/skill-templates/pr-branch/SKILL.md +32 -0
- package/scripts/skill-templates/progress/SKILL.md +107 -0
- package/scripts/skill-templates/quality-gate/SKILL.md +90 -0
- package/scripts/skill-templates/quality-gate/threat-modeling.md +101 -0
- package/scripts/skill-templates/quick/SKILL.md +44 -0
- package/scripts/skill-templates/reapply-patches/SKILL.md +32 -0
- package/scripts/skill-templates/recall/SKILL.md +75 -0
- package/scripts/skill-templates/reflect/SKILL.md +85 -0
- package/scripts/skill-templates/reflect/procedures/capability-gap-scan.md +119 -0
- package/scripts/skill-templates/report-issue/SKILL.md +53 -0
- package/scripts/skill-templates/report-issue/report-issue-procedure.md +119 -0
- package/scripts/skill-templates/resume/SKILL.md +93 -0
- package/scripts/skill-templates/review-backlog/SKILL.md +46 -0
- package/scripts/skill-templates/review-decisions/SKILL.md +42 -0
- package/scripts/skill-templates/roi/SKILL.md +54 -0
- package/scripts/skill-templates/rollout-status/SKILL.md +35 -0
- package/scripts/skill-templates/router/SKILL.md +89 -0
- package/scripts/skill-templates/router/capability-gap-emitter.md +65 -0
- package/scripts/skill-templates/router/router-pick-emitter.md +78 -0
- package/scripts/skill-templates/router/router-rules.md +84 -0
- package/scripts/skill-templates/settings/SKILL.md +87 -0
- package/scripts/skill-templates/ship/SKILL.md +48 -0
- package/scripts/skill-templates/sketch/SKILL.md +78 -0
- package/scripts/skill-templates/sketch-wrap-up/SKILL.md +92 -0
- package/scripts/skill-templates/skill-manifest/SKILL.md +79 -0
- package/scripts/skill-templates/spike/SKILL.md +67 -0
- package/scripts/skill-templates/spike-wrap-up/SKILL.md +86 -0
- package/scripts/skill-templates/start/SKILL.md +67 -0
- package/scripts/skill-templates/start/start-procedure.md +115 -0
- package/scripts/skill-templates/state/SKILL.md +106 -0
- package/scripts/skill-templates/stats/SKILL.md +51 -0
- package/scripts/skill-templates/style/SKILL.md +71 -0
- package/scripts/skill-templates/style/style-doc-procedure.md +150 -0
- package/scripts/skill-templates/synthesize/SKILL.md +94 -0
- package/scripts/skill-templates/timeline/SKILL.md +66 -0
- package/scripts/skill-templates/todo/SKILL.md +64 -0
- package/scripts/skill-templates/turn-closeout/SKILL.md +95 -0
- package/scripts/skill-templates/undo/SKILL.md +31 -0
- package/scripts/skill-templates/unlock-decision/SKILL.md +54 -0
- package/scripts/skill-templates/unpin/SKILL.md +31 -0
- package/scripts/skill-templates/update/SKILL.md +56 -0
- package/scripts/skill-templates/using-gdd/SKILL.md +78 -0
- package/scripts/skill-templates/verify/SKILL.md +113 -0
- package/scripts/skill-templates/verify/verify-procedure.md +511 -0
- package/scripts/skill-templates/warm-cache/SKILL.md +81 -0
- package/scripts/skill-templates/watch-authorities/SKILL.md +82 -0
- package/scripts/skill-templates/zoom-out/SKILL.md +26 -0
- package/sdk/cli/commands/build.ts +2 -2
- package/sdk/cli/index.js +2 -2
- package/sdk/cli/index.ts +1 -1
- package/skills/README.md +22 -14
- package/skills/help/SKILL.md +28 -55
- package/skills/new-skill/SKILL.md +5 -5
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-figma-extract
|
|
3
|
+
description: "Off-context Figma design-system extraction into a compact local digest (DESIGN.md + tokens.json + components.json). Pulls the file via the Figma REST API and digests it without the raw JSON ever entering the model context."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# gdd-figma-extract
|
|
7
|
+
|
|
8
|
+
Pull a whole Figma design system into a compact, queryable local digest - **without** the raw JSON ever entering Claude context. The heavy lifting runs in tested `.cjs` tools; the model reads only the digest outputs.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
{{command_prefix}}figma-extract <file-key-or-url> # full design-system digest
|
|
14
|
+
{{command_prefix}}figma-extract <file-key-or-url> --component Button # ~500-token single-component slice
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`<file-key-or-url>` is a Figma file URL (`https://www.figma.com/file/<key>/…` or `/design/<key>/…`) or a bare file key.
|
|
18
|
+
|
|
19
|
+
## Behavior
|
|
20
|
+
|
|
21
|
+
1. **Preflight (D-10).** Confirm `FIGMA_TOKEN` is set in the environment:
|
|
22
|
+
```
|
|
23
|
+
node -e "process.exit(process.env.FIGMA_TOKEN||process.env.FIGMA_PERSONAL_ACCESS_TOKEN?0:1)"
|
|
24
|
+
```
|
|
25
|
+
If unset, tell the user to `export FIGMA_TOKEN=figd_…` (from https://www.figma.com/developers/api#access-tokens). The token comes from the environment **only** - never ask the user to paste it into a file or the chat, and never echo it back.
|
|
26
|
+
|
|
27
|
+
2. **Stage 1 - pull.** Pull the file's REST endpoints into the gitignored raw cache (D-09):
|
|
28
|
+
```
|
|
29
|
+
node scripts/lib/figma-extract/pull.cjs "<file-key-or-url>"
|
|
30
|
+
```
|
|
31
|
+
This caches to `.figma-extract-cache/raw/<file-key>/` and skips re-pulling when Figma's `version` is unchanged (D-11). Add `--force` to bypass the cache, `--out <dir>` to relocate the cache. The tool prints a JSON summary (endpoints, bytes, cached) on stdout - the raw bodies stay on disk.
|
|
32
|
+
|
|
33
|
+
3. **Stage 2 - plugin sync (OPTIONAL, Path C).** Only when the design tokens live in Figma Variables that the REST API cannot return (non-Enterprise plans → the pull summary shows `variables` skipped) and the user wants token coverage:
|
|
34
|
+
```
|
|
35
|
+
node scripts/lib/figma-extract/receiver.cjs --out .figma-extract-cache/raw/<file-key>
|
|
36
|
+
```
|
|
37
|
+
This binds `127.0.0.1:5179` (D-06). Tell the user to run the dev-installed **"GDD Sync"** plugin in Figma and click **"Export to GDD"** - see `figma-plugin/README.md` for the one-time dev-install. The receiver writes `variables.json` into the cache and exits on receipt or timeout. Skip this stage entirely for design systems whose tokens already come through the REST pull.
|
|
38
|
+
|
|
39
|
+
4. **Stage 3 - digest.** Transform the cache into the compact digest:
|
|
40
|
+
```
|
|
41
|
+
node scripts/lib/figma-extract/digest.cjs --raw .figma-extract-cache/raw/<file-key> --out .figma-extract-cache/digest
|
|
42
|
+
```
|
|
43
|
+
This writes `DESIGN.md`, `tokens.json`, and `components.json`. Add `--prefer-styles` to invert the token priority to styles-first (D-04). Add `--component <name>` (D-08) to emit a single-component slice instead of the full digest.
|
|
44
|
+
|
|
45
|
+
5. **Read the digest.** Open **only** `.figma-extract-cache/digest/DESIGN.md` (plus `tokens.json` / `components.json` when you need structured data). For a single component, pass `--component <name>` in Stage 3 and read the ~500-token slice instead of the full ~16K-token spec.
|
|
46
|
+
|
|
47
|
+
## Required Reading
|
|
48
|
+
|
|
49
|
+
- `.figma-extract-cache/digest/DESIGN.md` - the compact human/LLM-readable spec
|
|
50
|
+
- `.figma-extract-cache/digest/tokens.json` - resolved design tokens (when structured token data is needed)
|
|
51
|
+
- `.figma-extract-cache/digest/components.json` - components with variants/props/defaults (when structured component data is needed)
|
|
52
|
+
|
|
53
|
+
## Notes
|
|
54
|
+
|
|
55
|
+
- Two-stage pipeline (D-01): re-run Stage 3 against an existing cache without re-pulling. The digest does zero network calls.
|
|
56
|
+
- The spike proved **0 Claude tokens** during extraction (898× compression, 223 MB → 254 KB). That property holds only because this skill never surfaces the raw cache.
|
|
57
|
+
- Figma MCP remains the right tool for spot questions on a single live component; this skill is the cheaper path for whole-design-system workflows.
|
|
58
|
+
|
|
59
|
+
## Do Not
|
|
60
|
+
|
|
61
|
+
- **Do NOT read or `cat` the `raw/*.json` cache** (e.g. `.figma-extract-cache/raw/<file-key>/file.json`). It is tool-internal and often 100+ MB; loading it into context defeats the off-context guarantee (D-12). Read only the digest outputs above.
|
|
62
|
+
- **Do not persist, log, echo, or print `FIGMA_TOKEN`** (D-10). It belongs in the environment only - never write it to a file, a commit, or chat output.
|
|
63
|
+
|
|
64
|
+
## FIGMA-EXTRACT COMPLETE
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-figma-write
|
|
3
|
+
description: "Write design decisions from `.design/DESIGN-CONTEXT.md` back into the active Figma file by dispatching the `design-figma-writer` agent in one of three modes (annotate / tokenize / mappings). Use when the user has completed a design pipeline cycle and wants the decisions (layer comments, variable bindings, or Code Connect mappings) reflected in Figma. Operates proposal→confirm with `--dry-run` and `--confirm-shared` flags."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# gdd-figma-write
|
|
7
|
+
|
|
8
|
+
Dispatches the `design-figma-writer` agent to write design decisions back to the open Figma file. The shared probe pattern (ToolSearch → live call → STATE.md write) and connection handshake are documented at `../../reference/shared-preamble.md#connection-handshake-summary` and `../../connections/figma.md`.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/get-design-done figma-write <mode> [--dry-run] [--confirm-shared]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Modes:
|
|
17
|
+
- `annotate` - add design decision comments to Figma layers
|
|
18
|
+
- `tokenize` - bind hard-coded color/spacing/type values to Figma variables
|
|
19
|
+
- `mappings` - write Code Connect component↔code file mappings
|
|
20
|
+
|
|
21
|
+
Flags:
|
|
22
|
+
- `--dry-run` - emit the proposal without executing any Figma writes
|
|
23
|
+
- `--confirm-shared` - authorize writes to shared team library components
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
1. Remote Figma MCP registered (writes are remote-only). Preferred: `claude plugin install figma@claude-plugins-official`. Manual: `claude mcp add --transport http figma https://mcp.figma.com/mcp`.
|
|
28
|
+
2. `.design/DESIGN-CONTEXT.md` exists (run `discover` first)
|
|
29
|
+
3. `.design/STATE.md` `<connections>` shows `figma: available (…, writes=true)`. If `writes=false` (desktop-only variant), writes are not supported - the agent will STOP with an instruction to install the remote MCP.
|
|
30
|
+
|
|
31
|
+
## Required Reading
|
|
32
|
+
|
|
33
|
+
Read `.design/STATE.md` and `.design/DESIGN-CONTEXT.md` before dispatching the agent.
|
|
34
|
+
|
|
35
|
+
## Dispatch
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Task("design-figma-writer", """
|
|
39
|
+
mode: <annotate|tokenize|mappings>
|
|
40
|
+
dry_run: <true|false>
|
|
41
|
+
confirm_shared: <true|false>
|
|
42
|
+
required_reading:
|
|
43
|
+
- .design/STATE.md
|
|
44
|
+
- .design/DESIGN-CONTEXT.md
|
|
45
|
+
""")
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Pass `mode` from the first positional argument; `dry_run` from `--dry-run`;
|
|
49
|
+
`confirm_shared` from `--confirm-shared`. Wait for the agent's completion
|
|
50
|
+
marker before returning.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-graphify
|
|
3
|
+
description: "Manage the Graphify knowledge graph for the current project. Build, query, status, diff. When available, design-planner and design-integration-checker use the graph for pre-search consultation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# gdd-graphify
|
|
7
|
+
|
|
8
|
+
Thin command wrapper around the GSD graphify tools integration.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/get-design-done graphify build # Build or rebuild the knowledge graph
|
|
14
|
+
/get-design-done graphify query <term> # Query graph for a node and neighbors
|
|
15
|
+
/get-design-done graphify status # Check graph age, enabled, node count
|
|
16
|
+
/get-design-done graphify diff # Show topology changes since last build
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Behavior
|
|
20
|
+
|
|
21
|
+
1. Read `.design/STATE.md` to check `graphify` status in `<connections>`.
|
|
22
|
+
2. Check `graphify.enabled` in `.design/config.json` via a direct file read (per D-09 - no `config-get` CLI subcommand):
|
|
23
|
+
```
|
|
24
|
+
node -e "try{const c=JSON.parse(require('fs').readFileSync('.design/config.json','utf8'));process.stdout.write(String(c.graphify?.enabled===true))}catch{process.stdout.write('false')}"
|
|
25
|
+
```
|
|
26
|
+
3. If not enabled, print:
|
|
27
|
+
```
|
|
28
|
+
"Graphify is not enabled. Edit `.design/config.json` to set `graphify.enabled: true`."
|
|
29
|
+
"Then run {{command_prefix}}graphify build to generate the knowledge graph."
|
|
30
|
+
```
|
|
31
|
+
STOP.
|
|
32
|
+
4. Execute the requested subcommand via the native CLI:
|
|
33
|
+
- build: `node bin/gdd-graph build`
|
|
34
|
+
- query: `node bin/gdd-graph query "<term>" --budget 2000`
|
|
35
|
+
- status: `node bin/gdd-graph status`
|
|
36
|
+
- diff: `node bin/gdd-graph diff`
|
|
37
|
+
5. After `build` completes, update `.design/STATE.md` `<connections>`: `graphify: available`
|
|
38
|
+
|
|
39
|
+
## Required Reading
|
|
40
|
+
|
|
41
|
+
- `.design/STATE.md` - for graphify status in `<connections>`
|
|
42
|
+
- `.design/config.json` - for `graphify.enabled` flag
|
|
43
|
+
|
|
44
|
+
## Notes
|
|
45
|
+
|
|
46
|
+
- Graphify is optional. The native CLI ships in this repo at `bin/gdd-graph` (no external install - Node only).
|
|
47
|
+
- Graph is stored at `.design/graph/graph.json` (Ajv-validated against `scripts/lib/graph/schema.json`).
|
|
48
|
+
- Graph covers source code (`src/`, `components/`). It does NOT index `.design/` artifacts by default.
|
|
49
|
+
- Use `query` with node IDs from the graph schema: `component:<name>`, `token:color/<name>`, `decision:D-<nn>`, etc.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-health
|
|
3
|
+
description: "Reports .design/ artifact health - staleness, missing files, token drift, broken state transitions. Activates for requests involving checking .design artifact health, staleness, token drift, or broken state transitions."
|
|
4
|
+
tools: Read, Bash, Glob, Grep, mcp__gdd_state__get
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# {{command_prefix}}health
|
|
9
|
+
|
|
10
|
+
**Role:** Report the health of the `.design/` directory. Print a score and list the checks that failed.
|
|
11
|
+
|
|
12
|
+
## Checks
|
|
13
|
+
|
|
14
|
+
1. **Artifact inventory** - `ls -la .design/*.md` with size and mtime. Print a table.
|
|
15
|
+
2. **Missing expected artifacts** - by `stage` field from the `mcp__gdd_state__get` snapshot:
|
|
16
|
+
- `brief` expects BRIEF.md
|
|
17
|
+
- `explore` expects DESIGN.md, DESIGN-DEBT.md, DESIGN-CONTEXT.md
|
|
18
|
+
- `plan` expects DESIGN-PLAN.md
|
|
19
|
+
- `design` expects DESIGN-SUMMARY.md
|
|
20
|
+
- `verify` expects DESIGN-VERIFICATION.md
|
|
21
|
+
FAIL per missing.
|
|
22
|
+
3. **Token drift** - `wc -c .design/DESIGN.md .design/DESIGN-CONTEXT.md`; approx tokens = bytes/4. WARN if combined >40000.
|
|
23
|
+
4. **Aged DESIGN-DEBT** - items in `.design/DESIGN-DEBT.md` not touched in >14 days (file mtime). WARN.
|
|
24
|
+
5. **Broken state transitions** - `stage` field from the snapshot inconsistent with artifacts present (e.g. stage=`verify` but DESIGN-SUMMARY.md missing). FAIL.
|
|
25
|
+
6. **Pending sketch/spike wrap-ups** - any `.design/sketches/*` or `.design/spikes/*` directory lacking a SUMMARY.md. WARN.
|
|
26
|
+
7. **Seed germination** - scan `.design/SEEDS.md` (if present) for seeds whose trigger keywords match the snapshot or CYCLES.md content. List as "Seed ready: <text>".
|
|
27
|
+
|
|
28
|
+
## State snapshot
|
|
29
|
+
|
|
30
|
+
Call `mcp__gdd_state__get` once at the start to pull the snapshot used by checks 2, 5, and 7. Aggregate health math stays prose-level:
|
|
31
|
+
- Count available connections from `<connections>`.
|
|
32
|
+
- Count open blockers from `<blockers>` where `resolved` is absent.
|
|
33
|
+
- Count pending must-haves from `<must_haves>` where `status: "pending"`.
|
|
34
|
+
|
|
35
|
+
## Output
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
━━━ Design health ━━━
|
|
39
|
+
Artifacts:
|
|
40
|
+
BRIEF.md 2.1 KB 2026-04-14
|
|
41
|
+
DESIGN.md 18.4 KB 2026-04-17
|
|
42
|
+
DESIGN-CONTEXT.md 7.2 KB 2026-04-17
|
|
43
|
+
|
|
44
|
+
Checks:
|
|
45
|
+
[PASS] Missing artifacts
|
|
46
|
+
[WARN] Token drift (42,100)
|
|
47
|
+
[PASS] Aged DESIGN-DEBT
|
|
48
|
+
[PASS] State transitions
|
|
49
|
+
[PASS] Sketch/spike wrap-ups
|
|
50
|
+
[PASS] Seed germination
|
|
51
|
+
|
|
52
|
+
Health: 5 / 6 checks passing.
|
|
53
|
+
━━━━━━━━━━━━━━━━━━━━━
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Figma-extract readiness (figma_extract)
|
|
57
|
+
|
|
58
|
+
After the health table, the `gdd_health` MCP surface (`scripts/lib/health-mirror/index.cjs`) reports a `figma_extract` check so a user knows whether figma-extract is usable. The detail is one of three exact strings:
|
|
59
|
+
|
|
60
|
+
- `figma extract: ready (token set)` - `FIGMA_TOKEN` (or `FIGMA_PERSONAL_ACCESS_TOKEN`) is present (status `ok`).
|
|
61
|
+
- `figma extract: token missing` - no token env is set (status `warn`).
|
|
62
|
+
- `figma extract: plugin sync needed for variables (Free tier detected)` - token present but a prior pull recorded a 403/skip on the Variables REST path, so run the plugin-sync step (status `warn`).
|
|
63
|
+
|
|
64
|
+
Token PRESENCE only is detected (D-10) - the token value is never read, logged, or shown. The Free-tier signal is read from the local raw-pull cache only; no network call is made.
|
|
65
|
+
|
|
66
|
+
## Skill-discipline bootstrap (skill_discipline)
|
|
67
|
+
|
|
68
|
+
The `gdd_health` MCP surface also reports a `skill_discipline` check (Phase 32) confirming the using-gdd SessionStart bootstrap is live - detail is one of three exact strings:
|
|
69
|
+
- `skill-discipline: ready` - `skills/using-gdd/SKILL.md` exists AND `hooks/hooks.json` SessionStart wires `inject-using-gdd.sh` (status `ok`).
|
|
70
|
+
- `skill-discipline: missing using-gdd` (skill absent) or `skill-discipline: hook not wired` (skill present, no SessionStart inject) - both `warn`. The MCP surface also reports a `harness_freshness` check (Phase 44): per-harness `last_verified` age, status-aware (only `tested` harnesses warn at 60d / fail at 180d; others `n/a`). Full taxonomy in `HARNESSES.md`; refresh with `npm run verify:harness <id>`.
|
|
71
|
+
|
|
72
|
+
## Check MCP registration (gdd-mcp)
|
|
73
|
+
|
|
74
|
+
After the health table, inspect whether `gdd-mcp` (Phase 27.7+) is registered with any installed harness and render a one-line status row. Dismissable via `.design/config.json#mcp_nudge=false`. Non-blocking: failure paths render `MCP server: unknown` rather than crash. Full detection procedure (dismissal check, detection via `scripts/lib/install/mcp-register.cjs`, row rendering for claude/codex/both/neither, fallback) lives in `./health-mcp-detection.md`.
|
|
75
|
+
|
|
76
|
+
## Update notice (safe-window surface)
|
|
77
|
+
|
|
78
|
+
After the health table, emit the plugin-update banner if one is present:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
[ -f .design/update-available.md ] && cat .design/update-available.md
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Written by `hooks/update-check.sh`; suppressed mid-pipeline and when the latest release is dismissed.
|
|
85
|
+
|
|
86
|
+
## Skill-length report
|
|
87
|
+
|
|
88
|
+
After the health table, surface the Phase 28.5 skill-authoring contract drift signal by running `node scripts/validate-skill-length.cjs --quiet --json` and reading `summary` from stdout. Print two prose lines:
|
|
89
|
+
|
|
90
|
+
- `Skill-length: <total> total | <clean> clean | <warnings> warn (>=100) | <blockers> block (>=250)`
|
|
91
|
+
- If blockers > 0: list each blocker as a row `- <name> (<lines> lines)`. Else: print `All skills within contract.`
|
|
92
|
+
|
|
93
|
+
Thresholds: warn >=100, block >=250 (D-01). Strict description-format off by default (D-02). Then add two compact Phase 50 lines from `scripts/lib/manifest/skills.json`: `Skills: <n>/<total> in v3 description form` (descriptions matching `/Activates for requests involving/i`) and `Composition: <edges> edges | <cycles> cycles` (`composes_with`/`next_skills` fan-out; cycles via `scripts/validate-composition-graph.cjs` when present, else `0`). See `./health-skill-length-report.md` for the JSON shape and threshold rationale.
|
|
94
|
+
|
|
95
|
+
## Do Not
|
|
96
|
+
|
|
97
|
+
- Do not mutate STATE.md - this skill is read-only. Only `mcp__gdd_state__get` is permitted.
|
|
98
|
+
|
|
99
|
+
## HEALTH COMPLETE
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: health-mcp-detection
|
|
3
|
+
type: heuristic
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
phase: 28.5
|
|
6
|
+
tags: [health, mcp, detection, gdd-mcp, registration-nudge]
|
|
7
|
+
last_updated: 2026-05-18
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Health MCP-Registration Detection Procedure
|
|
11
|
+
|
|
12
|
+
Extracted from `skills/health/SKILL.md` per Phase 28.5 D-10 (extract-then-link, never delete content).
|
|
13
|
+
This file documents the canonical procedure for inspecting whether `gdd-mcp` (Phase 27.7+) is
|
|
14
|
+
registered with any installed harness and rendering a one-line status row after the health
|
|
15
|
+
table. The procedure is non-blocking by design: any failure path renders `unknown` rather
|
|
16
|
+
than crashing the skill.
|
|
17
|
+
|
|
18
|
+
## Dismissal check
|
|
19
|
+
|
|
20
|
+
1. Read `.design/config.json` (if present). Parse JSON inside a try/catch.
|
|
21
|
+
2. If `config.mcp_nudge === false`, SKIP this step entirely (render nothing).
|
|
22
|
+
3. On parse failure: default to `mcp_nudge=true` (show the row) - fail-safe per threat T-27.7-04-05.
|
|
23
|
+
|
|
24
|
+
## Detection
|
|
25
|
+
|
|
26
|
+
1. Read `.claude/settings.local.json` (or equivalent harness settings file) and inspect its `mcpServers` object - alternatively run `claude mcp list` / `codex mcp list` if a CLI is available (see fallback below).
|
|
27
|
+
2. Preferred invocation via the install-lib: call `detectMcpRegistration()` from `scripts/lib/install/mcp-register.cjs`. Returns `{harnesses: [{harness, present, registered}], summary}`.
|
|
28
|
+
|
|
29
|
+
## Row rendering
|
|
30
|
+
|
|
31
|
+
Based on the detection result, render exactly ONE of these row strings:
|
|
32
|
+
|
|
33
|
+
- When `claude` and `codex` both present + both registered:
|
|
34
|
+
`MCP server: registered with claude+codex`
|
|
35
|
+
- When only one harness is present and registered:
|
|
36
|
+
`MCP server: registered with claude` (or `MCP server: registered with codex`)
|
|
37
|
+
- When at least one harness is present but `gdd-mcp` is NOT in its registered list:
|
|
38
|
+
`MCP server: not registered (run: npx @hegemonart/get-design-done --register-mcp; dismiss: .design/config.json#mcp_nudge=false)`
|
|
39
|
+
- When neither harness CLI is found on PATH:
|
|
40
|
+
`MCP server: unknown (claude/codex CLI not found)`
|
|
41
|
+
|
|
42
|
+
## Fallback (if `mcp-register.cjs` not yet shipped)
|
|
43
|
+
|
|
44
|
+
Skip this step silently with status `MCP server: unknown`. This step is non-blocking - failures here MUST NOT crash the SKILL.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Health skill - skill-length report subsection
|
|
2
|
+
|
|
3
|
+
Phase 28.5-11 / D-11 reference. Read by `skills/health/SKILL.md` to render the
|
|
4
|
+
"Skill-length report" subsection after the standard health checks.
|
|
5
|
+
|
|
6
|
+
## JSON shape (from `validate-skill-length.cjs --quiet --json`)
|
|
7
|
+
|
|
8
|
+
```jsonc
|
|
9
|
+
{
|
|
10
|
+
"summary": {
|
|
11
|
+
"total": 70, // number of SKILL.md files under skills/
|
|
12
|
+
"clean": 70, // skills with 0 errors and 0 warnings
|
|
13
|
+
"warnings": 0, // skills with >=100 lines but <250 (D-01 warn band)
|
|
14
|
+
"blockers": 0 // skills with any block-level error (>=250 lines,
|
|
15
|
+
// missing frontmatter field, description out of
|
|
16
|
+
// range, disable-model-invocation non-whitelisted)
|
|
17
|
+
},
|
|
18
|
+
"skills": [
|
|
19
|
+
{
|
|
20
|
+
"name": "...", // skill folder name (matches skills/<name>/SKILL.md)
|
|
21
|
+
"path": "...", // absolute path to the file on disk
|
|
22
|
+
"lines": 0, // wc -l semantics
|
|
23
|
+
"descriptionLength": 0, // length of frontmatter.description string
|
|
24
|
+
"hasRequiredFields": true,
|
|
25
|
+
"level": "clean", // "clean" | "warn" | "block"
|
|
26
|
+
"errors": [{ "code": "...", "message": "..." }],
|
|
27
|
+
"warnings": [{ "code": "...", "message": "..." }],
|
|
28
|
+
"reasons": ["..."] // human-readable summary lines
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Render contract
|
|
35
|
+
|
|
36
|
+
The health skill prints two lines after the existing checks table:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
Skill-length: <total> total | <clean> clean | <warnings> warn (>=100) | <blockers> block (>=250)
|
|
40
|
+
All skills within contract.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If `summary.blockers > 0`, replace the second line with one indented row per
|
|
44
|
+
blocker entry (skills where `level === "block"`):
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Skill-length: 70 total | 67 clean | 2 warn (>=100) | 1 block (>=250)
|
|
48
|
+
- <name> (<lines> lines)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Thresholds (D-01)
|
|
52
|
+
|
|
53
|
+
- `warn >=100` - skill flagged as advisory; CI emits `::warning::` annotation
|
|
54
|
+
but does not fail the build.
|
|
55
|
+
- `block >=250` - skill flagged as blocker; CI emits `::error::` and fails
|
|
56
|
+
the build via exit code 2.
|
|
57
|
+
|
|
58
|
+
## Strict description-format (D-02)
|
|
59
|
+
|
|
60
|
+
`STRICT_DESCRIPTION=1` / `--strict-description` is OFF by default. Phase 33
|
|
61
|
+
will graduate the strict `<what>. Use when <triggers>.` regex from advisory
|
|
62
|
+
to hard-block based on A/B evidence at
|
|
63
|
+
`.design/research/description-format-ab.md`.
|
|
64
|
+
|
|
65
|
+
## Cross-link from health
|
|
66
|
+
|
|
67
|
+
- `skills/health/SKILL.md` - emits the report after the main checks table.
|
|
68
|
+
- `scripts/validate-skill-length.cjs` - provides the JSON.
|
|
69
|
+
- `tests/phase-28.5-baseline.test.cjs` - locks the post-rework distribution.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-help
|
|
3
|
+
description: "Lists all available get-design-done commands with one-line descriptions"
|
|
4
|
+
tools: Read
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Get Design Done - Help
|
|
9
|
+
|
|
10
|
+
**Role:** Print a complete, formatted reference of every `{{command_prefix}}` command with a one-line description. The list is built from the skill manifest at runtime so it can never drift from the installed skills.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Procedure
|
|
15
|
+
|
|
16
|
+
1. **Read the manifest.** Open `scripts/lib/manifest/skills.json`. Its `skills` array is the source of truth: one object per skill, each with a `name` (the command, used as `{{command_prefix}}<name>`) and a `description`. Some records also carry `user_invocable`, `disable_model_invocation`, `composes_with`, `next_skills`, and `registered_in_phase` - use those only to refine grouping, never to drop a skill.
|
|
17
|
+
|
|
18
|
+
2. **Cover every skill.** The output must include every object in `skills` exactly once. Do not hardcode a command list and do not print a fixed count - the only authority is the manifest you just read. If a skill is in the manifest, it appears in the help; if it is removed from the manifest, it disappears from the help automatically.
|
|
19
|
+
|
|
20
|
+
3. **One-line each.** For every skill, emit `{{command_prefix}}<name>` followed by a single condensed line drawn from its `description`. Trim each description to its first sentence (cut at the first sentence-ending period) so the table stays scannable. Strip any leading "Stage N of 5" boilerplate into a short `Stage N` tag where it helps. Never invent a description - if a record has only a terse `description`, use it verbatim (condensed).
|
|
21
|
+
|
|
22
|
+
4. **Group sensibly.** The manifest has no explicit category field, so derive groups from what each skill does and lead with the ones users reach for first. A good order:
|
|
23
|
+
- **Pipeline stages (run in order):** `brief`, `explore`, `plan`, `design`, `verify` - the five-stage spine, in that sequence.
|
|
24
|
+
- **Standalone analysis:** one-shot audits and deltas (for example `style`, `darkmode`, `compare`, `audit`, `start`).
|
|
25
|
+
- **Navigation and status:** `next`, `help`, `progress`, `health`, `stats`, `quick`, `fast`.
|
|
26
|
+
- **Exploration and ideation:** `discuss`, `list-assumptions`, `sketch`, `sketch-wrap-up`, `spike`, `spike-wrap-up`, `map`, `bootstrap-ds`.
|
|
27
|
+
- **Lifecycle and session:** `new-project`, `new-cycle`, `complete-cycle`, `pause`, `resume`, `continue`, `do`, `ship`, `pr-branch`, `undo`.
|
|
28
|
+
- **Everything else:** every remaining skill not yet listed, alphabetically. This catch-all is what guarantees completeness - sweep the manifest for any `name` you have not already printed and place it here.
|
|
29
|
+
|
|
30
|
+
Grouping is a presentation aid, not a filter. If you are ever unsure where a skill belongs, fall back to a single alphabetical list of all manifest skills - completeness beats tidy buckets.
|
|
31
|
+
|
|
32
|
+
5. **Render.** Use this header and shape (a fenced reference block):
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
=== Get Design Done - Command Reference ===
|
|
36
|
+
|
|
37
|
+
Pipeline stages (run in order):
|
|
38
|
+
brief <first sentence of brief.description>
|
|
39
|
+
explore <first sentence of explore.description>
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
Standalone analysis:
|
|
43
|
+
...
|
|
44
|
+
|
|
45
|
+
(continue for every group, ending with the alphabetical catch-all)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Pad command names to a consistent column so descriptions align. Keep the `{{command_prefix}}` convention: show the bare name in the table (it is already understood to be a `{{command_prefix}}` command), and use the full `{{command_prefix}}<name>` form in any surrounding prose.
|
|
49
|
+
|
|
50
|
+
## Update notice (safe-window surface)
|
|
51
|
+
|
|
52
|
+
After the command reference, emit the plugin-update banner if one is present:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
[ -f .design/update-available.md ] && cat .design/update-available.md
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Written by `hooks/update-check.sh`; suppressed mid-pipeline and when the latest release is dismissed.
|
|
59
|
+
|
|
60
|
+
## HELP COMPLETE
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-instinct
|
|
3
|
+
description: "Inspects and manages atomic instinct learning units - small, scoped, confidence-weighted patterns the pipeline accumulates across cycles. Lists the project and global instinct stores, searches them by keyword, and promotes a vetted project instinct to the global store once it has cleared the cross-project gate. Use when the user wants to see what instincts exist, find an instinct by topic, or promote one to global scope. Activates for requests involving instincts, learned patterns, instinct promotion, instinct search, or the instinct store."
|
|
4
|
+
argument-hint: "[list | query <keyword> | promote <id>] [--scope project|global] [--domain <d>]"
|
|
5
|
+
tools: Read, Bash
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# {{command_prefix}}instinct
|
|
10
|
+
|
|
11
|
+
**Role:** Front end for the atomic instinct store. An instinct is a single learned pattern with a trigger, a confidence between 0.3 and 0.9, a domain, and a scope. This skill lists, searches, and promotes instincts. It never edits stored units by hand and never invents new ones - the reflector and `{{command_prefix}}extract-learnings` author them.
|
|
12
|
+
|
|
13
|
+
The store engine ships at `scripts/lib/instinct-store.cjs` (authored elsewhere - this skill only calls it). Unit shape (YAML frontmatter plus a short body) is specified in `reference/instinct-format.md`. The project store lives at `.design/instincts/instincts.json`; the global store at `~/.claude/gdd/global-instincts.json`.
|
|
14
|
+
|
|
15
|
+
Invoke the engine with `node`, the same way other skills call a `scripts/lib` helper:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/lib/instinct-store.cjs" <subcommand> [args]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If the engine exposes only a module API rather than a CLI, drive it from a short `node -e` script:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
node -e "const s=require('${CLAUDE_PLUGIN_ROOT}/scripts/lib/instinct-store.cjs'); console.log(JSON.stringify(s.list({scope:process.env.SCOPE})))"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Invocation Modes
|
|
28
|
+
|
|
29
|
+
| Command | Behavior |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `{{command_prefix}}instinct list` | Compact table of stored instincts (default mode). |
|
|
32
|
+
| `{{command_prefix}}instinct query "<keyword>"` | Search instincts by keyword; show the top matches. |
|
|
33
|
+
| `{{command_prefix}}instinct promote <id>` | Promote one project instinct to the global store (gated). |
|
|
34
|
+
|
|
35
|
+
Flags apply across modes:
|
|
36
|
+
|
|
37
|
+
- `--scope project|global` selects which store to read. Default is `project`.
|
|
38
|
+
- `--domain <d>` filters to one domain (the domain enum is defined in `reference/instinct-format.md`).
|
|
39
|
+
|
|
40
|
+
## list
|
|
41
|
+
|
|
42
|
+
Read the requested store and print a compact table. Call `instinct-store.list({ scope, domain, baseDir })`:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
node -e "const s=require('${CLAUDE_PLUGIN_ROOT}/scripts/lib/instinct-store.cjs'); \
|
|
46
|
+
const rows=s.list({ scope: process.env.SCOPE || 'project', domain: process.env.DOMAIN || undefined }); \
|
|
47
|
+
console.log(JSON.stringify(rows));"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Render one row per instinct. Keep it scannable:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
ID DOMAIN CONF CYCLES TRIGGER
|
|
54
|
+
in-7f3a tokens 0.72 3 palette has no neutral ramp
|
|
55
|
+
in-91bc layout 0.55 2 cards overflow on the 320px breakpoint
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- `CONF` is the stored confidence (0.3 to 0.9).
|
|
59
|
+
- `CYCLES` is `cycles_seen`.
|
|
60
|
+
- Truncate `TRIGGER` to keep each line on one row.
|
|
61
|
+
|
|
62
|
+
If the store is empty, print: `No instincts in the <scope> store yet. Run {{command_prefix}}reflect or {{command_prefix}}extract-learnings to accumulate some.`
|
|
63
|
+
|
|
64
|
+
## query
|
|
65
|
+
|
|
66
|
+
Search by keyword and show the closest matches. Call `instinct-store.query(keyword, { scope, baseDir, limit })`. The engine uses an FTS5 index when one is present and falls back to a plain scan otherwise; either path returns the same row shape.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
node -e "const s=require('${CLAUDE_PLUGIN_ROOT}/scripts/lib/instinct-store.cjs'); \
|
|
70
|
+
const hits=s.query(process.env.KW, { scope: process.env.SCOPE || 'project', limit: 10 }); \
|
|
71
|
+
console.log(JSON.stringify(hits));"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Print the top matches in the same table shape as `list`, ordered by the engine's relevance ranking. If there are no matches, say so plainly and suggest a broader keyword. Quote multi-word keywords so the shell passes one argument.
|
|
75
|
+
|
|
76
|
+
## promote
|
|
77
|
+
|
|
78
|
+
Promote a single project instinct into the global store so it applies across every project. Promotion is **gated**: `instinct-store.promote(id, { baseDir })` only succeeds when the instinct has been seen across at least K cycles (K=2) spanning at least M distinct project ids (M=2). The engine enforces the gate; this skill surfaces the outcome and asks the user to confirm before the write.
|
|
79
|
+
|
|
80
|
+
Confirm first. Prefer `@clack/prompts`, and fall back to `AskUserQuestion` when it is absent (mirror the probe in `{{command_prefix}}new-skill`):
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
node -e "try { require.resolve('@clack/prompts'); console.log('clack'); } catch { console.log('fallback'); }"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
- `clack`: drive `clack.confirm({ message: 'Promote <id> to the global store?' })` from a short Node script.
|
|
87
|
+
- `fallback`: ask the same yes or no question with `AskUserQuestion`.
|
|
88
|
+
|
|
89
|
+
On a confirmed yes, run the promotion:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
node -e "const s=require('${CLAUDE_PLUGIN_ROOT}/scripts/lib/instinct-store.cjs'); \
|
|
93
|
+
console.log(JSON.stringify(s.promote(process.env.ID, {})));"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Branch on the engine result:
|
|
97
|
+
|
|
98
|
+
- Promotion succeeded: print `Promoted <id> to the global store.` and show the new global row.
|
|
99
|
+
- Gate not met: the engine reports how far the instinct is from the K=2 / M=2 bar. Print that plainly, for example `<id> needs 2 cycles across 2 projects; seen 1 cycle in 1 project so far. Not promoted.` Do not retry and do not force the write.
|
|
100
|
+
- Unknown id: print `No instinct <id> in the project store.` and suggest `{{command_prefix}}instinct list`.
|
|
101
|
+
|
|
102
|
+
If the user answers no at the confirm step, print `Promotion cancelled.` and exit without writing.
|
|
103
|
+
|
|
104
|
+
## Do Not
|
|
105
|
+
|
|
106
|
+
- Do not edit `.design/instincts/instincts.json` or the global store by hand. All writes go through `scripts/lib/instinct-store.cjs`.
|
|
107
|
+
- Do not author new instincts here. The reflector and `{{command_prefix}}extract-learnings` emit units; this skill reads and promotes them.
|
|
108
|
+
- Do not bypass the promotion gate. If the K=2 / M=2 bar is not met, report it and stop.
|
|
109
|
+
- Do not modify `reference/instinct-format.md` or the store engine.
|
|
110
|
+
|
|
111
|
+
## INSTINCT COMPLETE
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-list-assumptions
|
|
3
|
+
description: "Surfaces hidden design assumptions baked into the codebase before planning - pattern-based detection plus user-surfaced items."
|
|
4
|
+
argument-hint: "[--area typography|color|layout|motion|a11y]"
|
|
5
|
+
tools: Read, Grep, Glob
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# {{command_prefix}}list-assumptions
|
|
10
|
+
|
|
11
|
+
**Role:** Surface implicit design assumptions that were never explicitly decided. Output a numbered list tagging each as `[EXPLICIT]` (found in STATE.md/DESIGN-CONTEXT.md decisions) or `[IMPLICIT]` (inferred from code patterns).
|
|
12
|
+
|
|
13
|
+
## Step 1 - Read explicit decisions
|
|
14
|
+
|
|
15
|
+
Read `.design/STATE.md` `<decisions>` and `.design/DESIGN-CONTEXT.md` (if present). Collect every D-XX as `[EXPLICIT]` entries keyed by category.
|
|
16
|
+
|
|
17
|
+
## Step 2 - Scan codebase for implicit patterns
|
|
18
|
+
|
|
19
|
+
If `--area <name>` is given, restrict to that area. Otherwise scan all.
|
|
20
|
+
|
|
21
|
+
**Layout**
|
|
22
|
+
- Grep for `@media` queries → "Is mobile-first or desktop-first assumed?"
|
|
23
|
+
- Grep for `grid-template`, `flex-direction` → "Is F-pattern or Z-pattern layout assumed?"
|
|
24
|
+
|
|
25
|
+
**Typography**
|
|
26
|
+
- Grep for `font-family` declarations → "Does the chosen font stack assume brand acceptance?"
|
|
27
|
+
- Grep for `font-size: [0-9]+px` with varying values → "Is a modular scale assumed or ad-hoc sizing?"
|
|
28
|
+
|
|
29
|
+
**Color**
|
|
30
|
+
- Grep for hex literals `#[0-9a-fA-F]{3,8}` → "Is the palette assumed to be fixed without a token layer?"
|
|
31
|
+
|
|
32
|
+
**Motion**
|
|
33
|
+
- Grep for `@keyframes`, `transition`, `animate` → "Does the brand tolerate animation?"
|
|
34
|
+
- Grep for `prefers-reduced-motion` → "Is reduced-motion honored or assumed ignored?"
|
|
35
|
+
|
|
36
|
+
**A11y**
|
|
37
|
+
- Grep for `aria-`, `role=`, `alt=` coverage → "Is WCAG AA the target, or AAA?"
|
|
38
|
+
- Grep for `outline: none`, `outline: 0` → "Are focus rings intentionally removed?"
|
|
39
|
+
|
|
40
|
+
For each hit, emit `Detected assumption: [pattern] at [file:line]` and flag as `[IMPLICIT]`.
|
|
41
|
+
|
|
42
|
+
## Step 3 - Output
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
━━━ Design assumptions ━━━
|
|
46
|
+
|
|
47
|
+
Typography
|
|
48
|
+
01 [EXPLICIT] D-03: Font family Inter
|
|
49
|
+
02 [IMPLICIT] 18 px font-size values found — scale not explicit (src/Card.css:12, ...)
|
|
50
|
+
|
|
51
|
+
Color
|
|
52
|
+
03 [IMPLICIT] 47 hex literals — no token layer (see {{command_prefix}}discuss color)
|
|
53
|
+
|
|
54
|
+
...
|
|
55
|
+
|
|
56
|
+
N assumptions total — M implicit.
|
|
57
|
+
Next: {{command_prefix}}discuss --all to resolve implicit ones.
|
|
58
|
+
━━━━━━━━━━━━━━━━━━━━━━━━
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## LIST-ASSUMPTIONS COMPLETE
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-list-pins
|
|
3
|
+
description: "Lists pinned skill aliases per harness with their source skill and pin timestamp. Use when you want to see which gdd skills have been pinned as standalone shortcuts and where."
|
|
4
|
+
tools: Read, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# {{command_prefix}}list-pins
|
|
8
|
+
|
|
9
|
+
**Role:** Show every pinned skill alias across the installed harness `skills/` directories. For each one, report the harness it lives in, the on-disk alias directory name, the source skill it points at (from the `<!-- gdd-pinned-skill source=<skill> -->` marker), and when it was pinned (the file modification time).
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. **Run the list CLI.** Invoke the shipped script (it takes no arguments). The plugin root resolves via `CLAUDE_PLUGIN_ROOT` (falling back to the current directory when that variable is absent):
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
node "${CLAUDE_PLUGIN_ROOT:-$(pwd)}/scripts/lib/pin/cli.cjs" list
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The CLI scans each harness `skills/` directory under the current project, finds the stubs carrying the gdd pin marker, and prints one line per pinned alias in the form `[<config-dir>] <alias> -> source=<skill> (pinned <timestamp>)`.
|
|
20
|
+
|
|
21
|
+
2. **Report the result.** Relay the CLI output verbatim. Exit codes: 0 means one or more pinned aliases were found, 1 means none were found (nothing has been pinned yet), 2 means an error.
|
|
22
|
+
|
|
23
|
+
## Do Not
|
|
24
|
+
|
|
25
|
+
- Do not scan the harness directories by hand. The CLI already enforces the marker check, so only genuine gdd pins are listed.
|
|
26
|
+
|
|
27
|
+
## LIST-PINS COMPLETE
|