@hegemonart/get-design-done 1.18.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.
- package/.claude-plugin/marketplace.json +11 -5
- package/.claude-plugin/plugin.json +10 -4
- package/CHANGELOG.md +51 -0
- package/README.md +7 -0
- package/SKILL.md +10 -4
- package/agents/README.md +53 -0
- package/agents/a11y-mapper.md +10 -0
- package/agents/component-benchmark-harvester.md +11 -0
- package/agents/component-benchmark-synthesizer.md +11 -0
- package/agents/component-taxonomy-mapper.md +10 -0
- package/agents/design-advisor.md +10 -0
- package/agents/design-assumptions-analyzer.md +10 -0
- package/agents/design-auditor.md +15 -0
- package/agents/design-authority-watcher.md +10 -0
- package/agents/design-component-generator.md +10 -0
- package/agents/design-context-builder.md +6 -1
- package/agents/design-context-checker-gate.md +10 -0
- package/agents/design-context-checker.md +10 -0
- package/agents/design-discussant.md +10 -0
- package/agents/design-doc-writer.md +12 -0
- package/agents/design-executor.md +11 -1
- package/agents/design-figma-writer.md +10 -0
- package/agents/design-fixer.md +10 -0
- package/agents/design-integration-checker-gate.md +10 -0
- package/agents/design-integration-checker.md +10 -0
- package/agents/design-paper-writer.md +10 -0
- package/agents/design-pattern-mapper.md +11 -0
- package/agents/design-pencil-writer.md +10 -0
- package/agents/design-phase-researcher.md +11 -1
- package/agents/design-plan-checker.md +10 -0
- package/agents/design-planner.md +10 -0
- package/agents/design-reflector.md +10 -0
- package/agents/design-research-synthesizer.md +10 -0
- package/agents/design-start-writer.md +10 -0
- package/agents/design-update-checker.md +10 -0
- package/agents/design-verifier-gate.md +10 -0
- package/agents/design-verifier.md +11 -0
- package/agents/gdd-graphify-sync.md +10 -0
- package/agents/gdd-intel-updater.md +10 -0
- package/agents/gdd-learnings-extractor.md +10 -0
- package/agents/motion-mapper.md +10 -0
- package/agents/token-mapper.md +10 -0
- package/agents/visual-hierarchy-mapper.md +10 -0
- package/hooks/gdd-decision-injector.js +30 -8
- package/package.json +16 -3
- package/reference/data-visualization.md +333 -0
- package/reference/form-patterns.md +245 -0
- package/reference/information-architecture.md +255 -0
- package/reference/onboarding-progressive-disclosure.md +250 -0
- package/reference/platforms.md +346 -0
- package/reference/registry.json +409 -360
- package/reference/rtl-cjk-cultural.md +353 -0
- package/reference/schemas/insight-line.schema.json +37 -0
- package/reference/user-research.md +360 -0
- package/scripts/lib/design-search.cjs +206 -0
- package/scripts/lib/probe-optional.cjs +29 -0
- package/scripts/lib/relevance-counter.cjs +121 -0
- package/skills/complete-cycle/SKILL.md +40 -2
- package/skills/continue/SKILL.md +23 -0
- package/skills/pause/SKILL.md +40 -14
- package/skills/recall/SKILL.md +74 -0
- package/skills/resume/SKILL.md +34 -16
- package/skills/timeline/SKILL.md +65 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* relevance-counter.cjs — tracks per-learning signal counts.
|
|
4
|
+
*
|
|
5
|
+
* Signals: 'cited' | 'surfaced' | 'dismissed'
|
|
6
|
+
*
|
|
7
|
+
* Writes to `.design/learnings/.relevance.json` under an atomic-write
|
|
8
|
+
* pattern (write tmp → rename) guarded by a `.relevance.lock` file so
|
|
9
|
+
* concurrent agents don't clobber each other.
|
|
10
|
+
*
|
|
11
|
+
* Public API:
|
|
12
|
+
* record(id, signal, designDir) → void
|
|
13
|
+
* load(designDir) → { [id]: { cited, surfaced, dismissed, last_used } }
|
|
14
|
+
* shouldPromote(id, designDir) → boolean (cited >= 8)
|
|
15
|
+
* shouldPrune(id, age, designDir) → boolean (cited === 0 and age >= 4 cycles)
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const fs = require('fs');
|
|
19
|
+
const path = require('path');
|
|
20
|
+
const os = require('os');
|
|
21
|
+
|
|
22
|
+
const SIGNALS = new Set(['cited', 'surfaced', 'dismissed']);
|
|
23
|
+
const PROMOTE_THRESHOLD = 8;
|
|
24
|
+
|
|
25
|
+
function _counterPath(designDir) {
|
|
26
|
+
return path.join(designDir, 'learnings', '.relevance.json');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function _lockPath(designDir) {
|
|
30
|
+
return path.join(designDir, 'learnings', '.relevance.lock');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function _acquireLock(lockPath, timeout = 5000) {
|
|
34
|
+
const deadline = Date.now() + timeout;
|
|
35
|
+
while (Date.now() < deadline) {
|
|
36
|
+
try {
|
|
37
|
+
fs.writeFileSync(lockPath, String(process.pid), { flag: 'wx' });
|
|
38
|
+
return true;
|
|
39
|
+
} catch (e) {
|
|
40
|
+
if (e.code !== 'EEXIST') throw e;
|
|
41
|
+
// Check for stale lock (> 30s old)
|
|
42
|
+
try {
|
|
43
|
+
const stat = fs.statSync(lockPath);
|
|
44
|
+
if (Date.now() - stat.mtimeMs > 30000) {
|
|
45
|
+
fs.unlinkSync(lockPath);
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
} catch { /* lock was removed between our check and unlink */ }
|
|
49
|
+
// Brief spin
|
|
50
|
+
const end = Date.now() + 50;
|
|
51
|
+
while (Date.now() < end) { /* spin */ }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function _releaseLock(lockPath) {
|
|
58
|
+
try { fs.unlinkSync(lockPath); } catch { /* already gone */ }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function load(designDir) {
|
|
62
|
+
const p = _counterPath(designDir);
|
|
63
|
+
try {
|
|
64
|
+
return JSON.parse(fs.readFileSync(p, 'utf8'));
|
|
65
|
+
} catch {
|
|
66
|
+
return {};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Record a signal for a learning entry id.
|
|
72
|
+
* @param {string} id Learning ID (e.g. "L-01")
|
|
73
|
+
* @param {'cited'|'surfaced'|'dismissed'} signal
|
|
74
|
+
* @param {string} designDir Path to the .design/ directory
|
|
75
|
+
*/
|
|
76
|
+
function record(id, signal, designDir) {
|
|
77
|
+
if (!SIGNALS.has(signal)) throw new Error(`Unknown signal: ${signal}`);
|
|
78
|
+
fs.mkdirSync(path.join(designDir, 'learnings'), { recursive: true });
|
|
79
|
+
|
|
80
|
+
const lockPath = _lockPath(designDir);
|
|
81
|
+
if (!_acquireLock(lockPath)) {
|
|
82
|
+
// Non-fatal — skip the update rather than corrupting the store
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
try {
|
|
87
|
+
const data = load(designDir);
|
|
88
|
+
if (!data[id]) {
|
|
89
|
+
data[id] = { cited: 0, surfaced: 0, dismissed: 0, last_used: null };
|
|
90
|
+
}
|
|
91
|
+
data[id][signal]++;
|
|
92
|
+
data[id].last_used = new Date().toISOString();
|
|
93
|
+
|
|
94
|
+
// Atomic write: tmp → rename
|
|
95
|
+
const counterPath = _counterPath(designDir);
|
|
96
|
+
const tmp = counterPath + '.tmp.' + process.pid;
|
|
97
|
+
fs.writeFileSync(tmp, JSON.stringify(data, null, 2) + '\n', 'utf8');
|
|
98
|
+
fs.renameSync(tmp, counterPath);
|
|
99
|
+
} finally {
|
|
100
|
+
_releaseLock(lockPath);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function shouldPromote(id, designDir) {
|
|
105
|
+
const data = load(designDir);
|
|
106
|
+
return (data[id]?.cited ?? 0) >= PROMOTE_THRESHOLD;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @param {string} id
|
|
111
|
+
* @param {number} ageCycles number of cycles since last_used (or since created)
|
|
112
|
+
* @param {string} designDir
|
|
113
|
+
*/
|
|
114
|
+
function shouldPrune(id, ageCycles, designDir) {
|
|
115
|
+
const data = load(designDir);
|
|
116
|
+
const entry = data[id];
|
|
117
|
+
if (!entry) return false;
|
|
118
|
+
return entry.cited === 0 && ageCycles >= 4;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
module.exports = { record, load, shouldPromote, shouldPrune };
|
|
@@ -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. **
|
|
26
|
-
|
|
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
|
package/skills/pause/SKILL.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gdd-pause
|
|
3
|
-
description: "Write
|
|
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
|
|
18
|
-
-
|
|
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 (
|
|
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
|
-
|
|
24
|
-
|
|
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
|
-
#
|
|
27
|
-
**
|
|
43
|
+
# Checkpoint NN
|
|
44
|
+
**Saved**: <ISO timestamp>
|
|
28
45
|
**Stage**: <stage>
|
|
29
|
-
**Cycle**: <cycle
|
|
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
|
-
|
|
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
|
|
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
|
package/skills/resume/SKILL.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gdd-resume
|
|
3
|
-
description: "Restore session context from .
|
|
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
|
|
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.
|
|
18
|
-
|
|
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
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- `
|
|
32
|
-
- `
|
|
33
|
-
|
|
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
|
|
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
|