@hegemonart/get-design-done 1.19.0 → 1.19.5

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 (54) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +24 -0
  4. package/SKILL.md +10 -4
  5. package/agents/README.md +53 -0
  6. package/agents/a11y-mapper.md +10 -0
  7. package/agents/component-benchmark-harvester.md +11 -0
  8. package/agents/component-benchmark-synthesizer.md +11 -0
  9. package/agents/component-taxonomy-mapper.md +10 -0
  10. package/agents/design-advisor.md +10 -0
  11. package/agents/design-assumptions-analyzer.md +10 -0
  12. package/agents/design-auditor.md +10 -0
  13. package/agents/design-authority-watcher.md +10 -0
  14. package/agents/design-component-generator.md +10 -0
  15. package/agents/design-context-checker-gate.md +10 -0
  16. package/agents/design-context-checker.md +10 -0
  17. package/agents/design-discussant.md +10 -0
  18. package/agents/design-doc-writer.md +12 -0
  19. package/agents/design-executor.md +10 -0
  20. package/agents/design-figma-writer.md +10 -0
  21. package/agents/design-fixer.md +10 -0
  22. package/agents/design-integration-checker-gate.md +10 -0
  23. package/agents/design-integration-checker.md +10 -0
  24. package/agents/design-paper-writer.md +10 -0
  25. package/agents/design-pattern-mapper.md +10 -0
  26. package/agents/design-pencil-writer.md +10 -0
  27. package/agents/design-phase-researcher.md +10 -0
  28. package/agents/design-plan-checker.md +10 -0
  29. package/agents/design-planner.md +10 -0
  30. package/agents/design-reflector.md +10 -0
  31. package/agents/design-research-synthesizer.md +10 -0
  32. package/agents/design-start-writer.md +10 -0
  33. package/agents/design-update-checker.md +10 -0
  34. package/agents/design-verifier-gate.md +10 -0
  35. package/agents/design-verifier.md +11 -0
  36. package/agents/gdd-graphify-sync.md +10 -0
  37. package/agents/gdd-intel-updater.md +10 -0
  38. package/agents/gdd-learnings-extractor.md +10 -0
  39. package/agents/motion-mapper.md +10 -0
  40. package/agents/token-mapper.md +10 -0
  41. package/agents/visual-hierarchy-mapper.md +10 -0
  42. package/hooks/gdd-decision-injector.js +30 -8
  43. package/package.json +9 -2
  44. package/reference/registry.json +7 -0
  45. package/reference/schemas/insight-line.schema.json +37 -0
  46. package/scripts/lib/design-search.cjs +206 -0
  47. package/scripts/lib/probe-optional.cjs +29 -0
  48. package/scripts/lib/relevance-counter.cjs +121 -0
  49. package/skills/complete-cycle/SKILL.md +40 -2
  50. package/skills/continue/SKILL.md +23 -0
  51. package/skills/pause/SKILL.md +40 -14
  52. package/skills/recall/SKILL.md +74 -0
  53. package/skills/resume/SKILL.md +34 -16
  54. package/skills/timeline/SKILL.md +65 -0
@@ -22,8 +22,46 @@ Closes the current cycle: marks CYCLES.md entry complete, archives pipeline arti
22
22
  - `DESIGN-AUDIT.md`
23
23
  - `DESIGN-SUMMARY.md`
24
24
  Mark originals with a `<!-- archived to .design/archive/cycle-N/ -->` note at top (do not delete — next cycle will overwrite).
25
- 5. **Clear STATE.md**: Set `cycle:` to empty string, reset `<decisions>` to a fresh empty section, reset `stage:` to `brief`.
26
- 6. Print: "Cycle <N> archived. Run `/gdd:new-cycle` to start the next cycle."
25
+ 5. **Generate EXPERIENCE.md** (Haiku-tier writer step): Read cycle STATE decisions + `.design/DESIGN-VERIFICATION.md` (if present) + any `.design/reflections/*.md` from this cycle. Write `.design/archive/cycle-N/EXPERIENCE.md` using this structure (~100–200 lines, declarative-fact framing, prepend `reference/cycle-handoff-preamble.md` content):
26
+
27
+ ```markdown
28
+ <!-- archived cycle experience — reference, not current requests -->
29
+ # Cycle N — Experience
30
+
31
+ **Goal**: <one-line goal from STATE.md or CYCLES.md>
32
+ **Opened**: <start date>
33
+ **Ended**: <today>
34
+
35
+ ## Decisions Made
36
+
37
+ <list all D-XX decisions from STATE.md <decisions> block — one per line>
38
+
39
+ ## Learnings Graduated
40
+
41
+ <list all L-NN learnings surfaced or promoted this cycle>
42
+
43
+ ## What Died
44
+
45
+ <designs, approaches, or tasks that were started but abandoned — and why>
46
+
47
+ ## Surprises
48
+
49
+ <what was unexpected during this cycle>
50
+
51
+ ## Handoff to Next Cycle
52
+
53
+ <what the next cycle should know: active sketches, deferred tasks, unresolved questions>
54
+ ```
55
+
56
+ This file becomes the highest-priority source for the decision-injector hook in future sessions.
57
+
58
+ 6. **Trigger reindex**: if `.design/search.db` exists, rebuild the search index:
59
+ ```bash
60
+ node -e "require('./scripts/lib/design-search.cjs').reindex(process.cwd())" 2>/dev/null || true
61
+ ```
62
+
63
+ 7. **Clear STATE.md**: Set `cycle:` to empty string, reset `<decisions>` to a fresh empty section, reset `stage:` to `brief`.
64
+ 8. Print: "Cycle <N> archived. Run `/gdd:new-cycle` to start the next cycle."
27
65
 
28
66
  ## Do Not
29
67
 
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: gdd-continue
3
+ description: "Alias for /gdd:resume — restore session context from the most recent checkpoint."
4
+ argument-hint: "[<checkpoint-N>]"
5
+ tools: Read, Write, Bash, Glob
6
+ ---
7
+
8
+ @reference/retrieval-contract.md
9
+
10
+ # /gdd:continue
11
+
12
+ Alias for `/gdd:resume`. Delegates immediately to the resume skill with the same argument.
13
+
14
+ This alias exists for discoverability — users familiar with `git continue` or similar conventions find `/gdd:continue` more intuitive than `/gdd:resume` after a pause.
15
+
16
+ ## Steps
17
+
18
+ 1. Forward the argument (if any) to the `/gdd:resume` skill logic.
19
+ 2. Execute all `/gdd:resume` steps exactly as documented in `skills/resume/SKILL.md`.
20
+
21
+ The two commands are functionally identical. `/gdd:resume` is the canonical form; `/gdd:continue` is the convenience alias.
22
+
23
+ ## CONTINUE COMPLETE
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: gdd-pause
3
- description: "Write session handoff so work can resume in a new session without re-running completed stages."
3
+ description: "Write a numbered checkpoint so work can resume in a new session without re-running completed stages."
4
4
  argument-hint: "[context note]"
5
- tools: Read, Write, AskUserQuestion
5
+ tools: Read, Write, Bash, AskUserQuestion
6
6
  ---
7
7
 
8
8
  @reference/retrieval-contract.md
@@ -10,35 +10,61 @@ tools: Read, Write, AskUserQuestion
10
10
 
11
11
  # /gdd:pause
12
12
 
13
- Captures enough state that a killed or stopped session can resume cleanly via `/gdd:resume`.
13
+ Captures enough state that a killed or stopped session can resume cleanly via `/gdd:resume` or `/gdd:continue`.
14
+
15
+ Each invocation writes an **immutable numbered checkpoint** — it does not overwrite previous pauses. This enables branched cycles: you can pause, take a detour via `/gdd:sketch`, compare, and resume an older snapshot via `/gdd:resume N`.
14
16
 
15
17
  ## Steps
16
18
 
17
- 1. Read `.design/STATE.md`. Extract:
18
- - Current `stage:` and `cycle:`
19
+ 1. **Read `.design/STATE.md`**. Extract:
20
+ - `stage:` and `cycle:`
19
21
  - Last activity timestamp
20
22
  - Completed tasks in the current pipeline run
21
- - Open todos (from `.design/TODO.md` if present)
23
+ - Open todos (scan `.design/TODO.md` if present)
22
24
  - Active sketch/spike directories (scan `.design/sketches/` and `.design/spikes/` for in-progress markers)
23
- 2. If no context argument was passed, ask (AskUserQuestion): "What are you in the middle of? (optional context to capture)"
24
- 3. Write `.design/HANDOFF.md`:
25
+
26
+ 2. **Determine checkpoint number**: run
27
+ ```bash
28
+ ls .design/checkpoints/ 2>/dev/null | grep -E '^[0-9]+' | sort -n | tail -1
29
+ ```
30
+ Next checkpoint = last number + 1 (or `01` if none exist).
31
+
32
+ 3. **Collect context**: if no context argument was passed, ask (AskUserQuestion):
33
+ "What are you in the middle of? (optional context to capture)"
34
+
35
+ 4. **Write numbered checkpoint**: create `.design/checkpoints/` with `mkdir -p`, then write:
36
+ ```
37
+ .design/checkpoints/NN-<stage>-<ISO-date>.md
38
+ ```
39
+ e.g. `01-design-2026-04-24.md`
40
+
41
+ Content:
25
42
  ```markdown
26
- # Session Handoff
27
- **Paused**: <ISO timestamp>
43
+ # Checkpoint NN
44
+ **Saved**: <ISO timestamp>
28
45
  **Stage**: <stage>
29
- **Cycle**: <cycle-N>
46
+ **Cycle**: <cycle>
30
47
  **In progress**: <task description + wave/index>
31
48
  **Next**: <next step>
32
- **Context**: <user note>
49
+ **Context**: <user note or "none">
33
50
  **Active sketch**: <path or none>
34
51
  **Open todos**: <N items (see .design/TODO.md)>
35
52
  **Completed this session**: <list>
36
53
  ```
37
- 4. Print: "Session paused. Run `/gdd:resume` to pick back up."
54
+
55
+ 5. **Update HANDOFF.md pointer**: write `.design/HANDOFF.md` with:
56
+ ```markdown
57
+ # Session Handoff (pointer)
58
+ Latest checkpoint: `.design/checkpoints/NN-<stage>-<ISO-date>.md`
59
+ Run `/gdd:resume` to restore, or `/gdd:resume N` for a specific checkpoint.
60
+ ```
61
+
62
+ 6. Print: "Checkpoint NN saved. Run `/gdd:resume` or `/gdd:continue` to pick back up."
38
63
 
39
64
  ## Do Not
40
65
 
41
- - Do not modify STATE.md itself HANDOFF.md is the only write.
66
+ - Do not modify STATE.md — checkpoints are the only write.
42
67
  - Do not abort in-progress sketches; just record them.
68
+ - Do not delete previous checkpoint files.
43
69
 
44
70
  ## PAUSE COMPLETE
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: gdd-recall
3
+ description: "Search cross-cycle memory: decisions, learnings, experience archives. Returns ranked matches."
4
+ argument-hint: "<query> [--reindex]"
5
+ tools: Read, Write, Bash
6
+ ---
7
+
8
+ @reference/retrieval-contract.md
9
+
10
+ # /gdd:recall
11
+
12
+ Searches `.design/archive/`, `.design/learnings/LEARNINGS.md`, `.design/CYCLES.md`, and `STATE.md` decision blocks for the given query and returns ranked matches. Uses FTS5 when `better-sqlite3` is available, ripgrep next, Node fs scan as universal fallback.
13
+
14
+ ## Steps
15
+
16
+ 1. **Parse argument**: extract `<query>` and optional `--reindex` flag.
17
+ - If no query and no `--reindex`: print usage and exit.
18
+ - If `--reindex` only: rebuild the index (see step 3), then exit.
19
+
20
+ 2. **Check backend**: run
21
+ ```bash
22
+ node -e "const {backendName}=require('./scripts/lib/design-search.cjs');console.log(backendName())"
23
+ ```
24
+ Print a one-line notice: `Search backend: fts5 | ripgrep | node-grep`.
25
+
26
+ 3. **Reindex if requested**: run
27
+ ```bash
28
+ node -e "require('./scripts/lib/design-search.cjs').reindex(process.cwd())"
29
+ ```
30
+ Print: "Index rebuilt."
31
+
32
+ 4. **Search**: run
33
+ ```bash
34
+ node -e "
35
+ const s=require('./scripts/lib/design-search.cjs');
36
+ const r=s.search(process.argv[1], process.cwd(), {limit:20});
37
+ console.log(JSON.stringify(r));
38
+ " -- "<query>"
39
+ ```
40
+ Parse the JSON array of `{file, line, text}` objects.
41
+
42
+ 5. **Format results**: print in this shape:
43
+ ```
44
+ ## Recall: "<query>" (N matches, backend: fts5)
45
+
46
+ ### 1. .design/archive/cycle-2/EXPERIENCE.md:42
47
+ > Decided to skip dark-mode token layer in cycle 2 — cost–benefit did not clear threshold
48
+
49
+ ### 2. .design/learnings/LEARNINGS.md:18
50
+ > L-03 · color · cited:4 · Color contrast failures cluster around interactive states, not surfaces
51
+ ```
52
+ Group by file. Truncate text at 120 chars. Cap at 20 results.
53
+
54
+ 6. **Signal relevance**: for every result whose text contains an `L-NN` learning ID, record a `surfaced` signal:
55
+ ```bash
56
+ node -e "
57
+ const rc=require('./scripts/lib/relevance-counter.cjs');
58
+ rc.record('L-NN','surfaced','.design');
59
+ "
60
+ ```
61
+
62
+ 7. **Empty result**: if no matches, print:
63
+ ```
64
+ No matches for "<query>" in cross-cycle memory.
65
+ Tip: run /gdd:recall --reindex if the archive has been updated since last index build.
66
+ ```
67
+
68
+ ## Do Not
69
+
70
+ - Do not modify any source file.
71
+ - Do not run git commands.
72
+ - Do not write `.design/STATE.md`.
73
+
74
+ ## RECALL COMPLETE
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: gdd-resume
3
- description: "Restore session context from .design/HANDOFF.md and route to where work left off."
4
- argument-hint: ""
5
- tools: Read, Write, Bash, Glob
3
+ description: "Restore session context from a numbered checkpoint. Lists available checkpoints when no argument given."
4
+ argument-hint: "[<N>]"
5
+ tools: Read, Write, Bash, Glob, AskUserQuestion
6
6
  ---
7
7
 
8
8
  @reference/retrieval-contract.md
@@ -10,31 +10,49 @@ tools: Read, Write, Bash, Glob
10
10
 
11
11
  # /gdd:resume
12
12
 
13
- Inverse of `/gdd:pause`. Reads the handoff file, prints a clear "you were here" summary, and routes to the next command.
13
+ Inverse of `/gdd:pause`. Reads a checkpoint file, prints a clear "you were here" summary, and routes to the next command.
14
14
 
15
15
  ## Steps
16
16
 
17
- 1. Try to read `.design/HANDOFF.md`. If missing, read `.design/STATE.md` and infer position from the `stage:` and `cycle:` fields.
18
- 2. Print a summary in this exact shape:
17
+ 1. **Parse argument**:
18
+ - If argument is a number N restore checkpoint N.
19
+ - If no argument → list available checkpoints and ask which to restore (see step 2).
20
+
21
+ 2. **List mode** (no argument):
22
+ ```bash
23
+ ls .design/checkpoints/ 2>/dev/null | sort -n
24
+ ```
25
+ If empty, fall back to reading `.design/HANDOFF.md` (legacy single-slot format).
26
+ If checkpoints exist, present the list and ask (AskUserQuestion):
27
+ "Which checkpoint would you like to restore? (enter number, or press Enter for the latest)"
28
+ Use the answer (or latest if Enter pressed) as N.
29
+
30
+ 3. **Read checkpoint**: load `.design/checkpoints/NN-*.md`. If not found, try `.design/HANDOFF.md` as legacy fallback.
31
+
32
+ 4. **Print summary** in this exact shape:
19
33
  ```
20
- Last paused: <timestamp>
34
+ Checkpoint NN restored.
35
+ Saved: <timestamp>
21
36
  You were: <in-progress description>
22
37
  Next step: <next>
23
38
  Active sketch: <path or none>
24
39
  Open todos: <N>
25
40
  ```
26
- 3. **Staleness check** — compare mtime of `.design/` artifacts vs `src/` (via Glob + Bash `stat` when available). If `src/` has commits/changes newer than the last pipeline artifact, warn: "Source has changed since last pipeline run — consider re-running explore or verify."
27
- 4. **Route recommendation** based on stage:
28
- - `brief` "Run `@get-design-done brief`"
29
- - `explore` → "Run `@get-design-done explore`"
30
- - `plan` "Run `@get-design-done plan`"
31
- - `design` → "Run `@get-design-done design` to continue"
32
- - `verify` → "Run `@get-design-done verify`"
33
- 5. Do not auto-execute the next command — just recommend.
41
+
42
+ 5. **Staleness check**: compare mtime of `.design/` artifacts vs `src/` via Bash `stat` when available. If `src/` has commits newer than the checkpoint timestamp, warn:
43
+ "Source has changed since checkpoint NN — consider re-running explore or verify."
44
+
45
+ 6. **Route recommendation** based on checkpoint `Stage:` field:
46
+ - `brief` → "Run `/gdd:brief`"
47
+ - `explore` → "Run `/gdd:explore`"
48
+ - `plan` "Run `/gdd:plan`"
49
+ - `design` → "Run `/gdd:design` to continue"
50
+ - `verify` → "Run `/gdd:verify`"
34
51
 
35
52
  ## Do Not
36
53
 
37
- - Do not delete HANDOFF.md (leave it; next `/gdd:pause` overwrites it).
54
+ - Do not delete checkpoint files.
38
55
  - Do not modify STATE.md.
56
+ - Do not auto-execute the next command — just recommend.
39
57
 
40
58
  ## RESUME COMPLETE
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: gdd-timeline
3
+ description: "Narrative retrospective across cycles: reads EXPERIENCE.md files and git log to produce a timeline view."
4
+ argument-hint: "[<cycle-N> | <from>-<to> | all]"
5
+ tools: Read, Bash, Glob
6
+ ---
7
+
8
+ @reference/retrieval-contract.md
9
+ @reference/cycle-handoff-preamble.md
10
+
11
+ # /gdd:timeline
12
+
13
+ Generates a narrative retrospective across one or more completed cycles by reading `.design/archive/cycle-N/EXPERIENCE.md` files and correlating with `git log`.
14
+
15
+ ## Steps
16
+
17
+ 1. **Parse argument**: accepted forms:
18
+ - `cycle-N` or `N` — single cycle
19
+ - `N-M` — inclusive range
20
+ - `all` or no argument — all archived cycles
21
+
22
+ 2. **Discover archives**: glob `.design/archive/cycle-*/EXPERIENCE.md`. Sort by cycle number. Filter to requested range.
23
+
24
+ 3. **For each cycle archive**:
25
+ a. Read `EXPERIENCE.md` — extract sections: Goal, Decisions made, Learnings graduated, What died, Handoff to next cycle.
26
+ b. Read `DESIGN-SUMMARY.md` (if present) for shipped artifacts list.
27
+ c. Run:
28
+ ```bash
29
+ git log --oneline --after="<cycle start date>" --before="<cycle end date>" -- .design/ 2>/dev/null | head -10
30
+ ```
31
+ to correlate with commits. Use dates from `EXPERIENCE.md` Opened/Ended headers if present.
32
+
33
+ 4. **Print timeline** in this shape:
34
+
35
+ ```
36
+ ## Timeline: Cycle 1 → Cycle 3
37
+
38
+ ---
39
+
40
+ ### Cycle 1 — <goal headline>
41
+
42
+ **Opened with**: <first meaningful action>
43
+ **Key decisions**: <D-XX summary>, <D-XX summary>
44
+ **Surprises**: <what was unexpected>
45
+ **What we'd do differently**: <retrospective note>
46
+ **Shipped**: <artifact list or "see DESIGN-SUMMARY.md">
47
+
48
+ ---
49
+
50
+ ### Cycle 2 — <goal headline>
51
+ ...
52
+ ```
53
+
54
+ 5. **No archives found**: print
55
+ ```
56
+ No archived cycles found in .design/archive/.
57
+ Complete a cycle first with /gdd:complete-cycle.
58
+ ```
59
+
60
+ ## Do Not
61
+
62
+ - Do not modify any file.
63
+ - Do not run git commands that write or stage (only `git log` for read).
64
+
65
+ ## TIMELINE COMPLETE