@hegemonart/get-design-done 1.28.0 → 1.28.6
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 +134 -0
- package/SKILL.md +1 -1
- package/hooks/gdd-decision-injector.js +149 -3
- package/package.json +1 -1
- package/reference/adr-format.md +96 -0
- package/reference/architecture-vocabulary.md +102 -0
- package/reference/context-md-format.md +106 -0
- package/reference/heuristics.md +84 -0
- package/reference/registry.json +29 -1
- package/reference/registry.schema.json +1 -1
- package/reference/shared-preamble.md +78 -6
- package/reference/skill-authoring-contract.md +159 -0
- package/scripts/validate-skill-length.cjs +283 -0
- package/skills/add-backlog/SKILL.md +1 -0
- package/skills/analyze-dependencies/SKILL.md +33 -122
- package/skills/apply-reflections/SKILL.md +1 -40
- package/skills/apply-reflections/apply-reflections-procedure.md +68 -0
- package/skills/audit/SKILL.md +3 -1
- package/skills/bandit-status/SKILL.md +31 -66
- package/skills/benchmark/SKILL.md +15 -55
- package/skills/brief/SKILL.md +12 -1
- package/skills/cache-manager/SKILL.md +3 -57
- package/skills/cache-manager/cache-policy.md +126 -0
- package/skills/check-update/SKILL.md +38 -75
- package/skills/compare/SKILL.md +29 -269
- package/skills/compare/compare-rubric.md +171 -0
- package/skills/complete-cycle/SKILL.md +1 -1
- package/skills/connections/SKILL.md +21 -427
- package/skills/connections/connections-onboarding.md +417 -0
- package/skills/continue/SKILL.md +1 -0
- package/skills/darkmode/SKILL.md +32 -287
- package/skills/darkmode/darkmode-audit-procedure.md +258 -0
- package/skills/debug/SKILL.md +11 -8
- package/skills/debug/debug-feedback-loops.md +119 -0
- package/skills/design/SKILL.md +27 -245
- package/skills/design/design-procedure.md +304 -0
- package/skills/discover/SKILL.md +26 -133
- package/skills/discover/discover-procedure.md +204 -0
- package/skills/discuss/SKILL.md +18 -2
- package/skills/explore/SKILL.md +40 -205
- package/skills/explore/explore-procedure.md +267 -0
- package/skills/fast/SKILL.md +1 -0
- package/skills/figma-write/SKILL.md +2 -2
- package/skills/health/SKILL.md +11 -33
- package/skills/health/health-mcp-detection.md +44 -0
- package/skills/health/health-skill-length-report.md +69 -0
- package/skills/help/SKILL.md +1 -0
- package/skills/list-assumptions/SKILL.md +1 -0
- package/skills/map/SKILL.md +8 -31
- package/skills/new-cycle/SKILL.md +3 -1
- package/skills/new-cycle/milestone-completeness-rubric.md +87 -0
- package/skills/next/SKILL.md +1 -0
- package/skills/note/SKILL.md +1 -0
- package/skills/optimize/SKILL.md +21 -44
- package/skills/pause/SKILL.md +1 -0
- package/skills/peer-cli-add/SKILL.md +26 -108
- package/skills/peer-cli-add/peer-cli-protocol.md +161 -0
- package/skills/peer-cli-customize/SKILL.md +22 -42
- package/skills/peers/SKILL.md +33 -57
- package/skills/plan/SKILL.md +33 -220
- package/skills/plan/plan-procedure.md +278 -0
- package/skills/plant-seed/SKILL.md +1 -0
- package/skills/pr-branch/SKILL.md +1 -0
- package/skills/progress/SKILL.md +1 -7
- package/skills/quality-gate/SKILL.md +34 -166
- package/skills/quality-gate/threat-modeling.md +101 -0
- package/skills/quick/SKILL.md +1 -0
- package/skills/reapply-patches/SKILL.md +1 -0
- package/skills/recall/SKILL.md +1 -0
- package/skills/resume/SKILL.md +1 -0
- package/skills/review-backlog/SKILL.md +1 -0
- package/skills/router/SKILL.md +3 -59
- package/skills/router/router-rules.md +84 -0
- package/skills/scan/SKILL.md +36 -675
- package/skills/scan/scan-procedure.md +731 -0
- package/skills/settings/SKILL.md +1 -0
- package/skills/ship/SKILL.md +1 -0
- package/skills/sketch/SKILL.md +1 -1
- package/skills/sketch-wrap-up/SKILL.md +13 -54
- package/skills/spike/SKILL.md +1 -1
- package/skills/spike-wrap-up/SKILL.md +12 -46
- package/skills/start/SKILL.md +13 -112
- package/skills/start/start-procedure.md +115 -0
- package/skills/stats/SKILL.md +1 -0
- package/skills/style/SKILL.md +18 -140
- package/skills/style/style-doc-procedure.md +150 -0
- package/skills/synthesize/SKILL.md +1 -0
- package/skills/timeline/SKILL.md +1 -0
- package/skills/todo/SKILL.md +1 -0
- package/skills/turn-closeout/SKILL.md +36 -56
- package/skills/undo/SKILL.md +1 -0
- package/skills/update/SKILL.md +1 -0
- package/skills/verify/SKILL.md +42 -457
- package/skills/verify/verify-procedure.md +512 -0
- package/skills/warm-cache/SKILL.md +3 -35
- package/skills/zoom-out/SKILL.md +26 -0
package/skills/debug/SKILL.md
CHANGED
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gdd-debug
|
|
3
|
-
description: "Symptom-driven design
|
|
3
|
+
description: "Symptom-driven design debugger with persistent state. Phase 1 builds a feedback loop; Phase 2 hypothesizes. Writes findings to .design/DEBUG.md. Use when a symptom needs systematic, one-variable-at-a-time tracking."
|
|
4
4
|
argument-hint: "[<symptom description>]"
|
|
5
5
|
tools: Read, Write, Grep, Glob, AskUserQuestion, Task
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# /gdd:debug
|
|
9
9
|
|
|
10
|
-
Systematic, checkpoint-driven design debugger. Loads
|
|
10
|
+
Systematic, checkpoint-driven design debugger. Loads framing from `./../reference/debugger-philosophy.md` (five principles) and the feedback-loop construction catalog from `./debug-feedback-loops.md` (10 priority-ordered loop paths). Phase 1 builds the loop; Phase 2 generates hypotheses. Writes every step to `.design/DEBUG.md` so killed sessions can resume.
|
|
11
11
|
|
|
12
12
|
## Steps
|
|
13
13
|
|
|
14
|
-
1. **Load philosophy**: Read `reference/debugger-philosophy.md` and
|
|
14
|
+
1. **Load philosophy + feedback-loop catalog**: Read `reference/debugger-philosophy.md` (five principles) and `./debug-feedback-loops.md` (10 construction paths; iterate-on-loop discipline). Keep both in mind for the entire session.
|
|
15
15
|
2. **Symptom**: If no symptom argument was passed, ask (AskUserQuestion): "What design symptom are you investigating? (observable only — 'cards look crowded', not 'padding is wrong')"
|
|
16
16
|
3. **Resume check**: Read `.design/DEBUG.md` if it exists. If there is an open session with no `### Fix Proposal` block, ask: "Resume existing session '<symptom>' or start a new one?"
|
|
17
|
-
4. **Ground truth load**: Read `.design/DESIGN-PLAN.md` (goals), `.design/STATE.md` `<decisions>` block (D-XX items), and any
|
|
18
|
-
5. **
|
|
19
|
-
6. **
|
|
17
|
+
4. **Ground truth load**: Read `.design/DESIGN-PLAN.md` (goals), `.design/STATE.md` `<decisions>` block (D-XX items), and any source files pointed at by the symptom.
|
|
18
|
+
5. **Phase 1 — Build a feedback loop**: Before ANY hypothesizing, build a deterministic, fast, agent-runnable pass/fail signal that reproduces the symptom. See `./debug-feedback-loops.md` for the 10 construction paths in priority order (failing test > curl > CLI fixture > headless browser > trace replay > throwaway harness > fuzz > bisect > differential > HITL bash). Iterate on the loop itself (cache setup, narrow scope, pin time, seed RNG, isolate filesystem, freeze network) before iterating on the bug. For non-deterministic bugs: raise reproduction rate to at least 30%, not clean repro. **Do not proceed to Phase 2 (hypothesis generation) until you have a loop you believe in.**
|
|
19
|
+
6. **Optional rendered-output check**: Use ToolSearch to see if Playwright/Preview MCP tools are available. If yes, capture rendered state. If no, fall back to code-only analysis.
|
|
20
|
+
7. **Phase 2 — Investigation loop** (one hypothesis at a time) — for each step:
|
|
20
21
|
- Form one hypothesis (one variable).
|
|
21
|
-
- Investigate (read files, grep, measure).
|
|
22
|
+
- Investigate (read files, grep, measure). Re-run the Phase 1 feedback loop to confirm the hypothesis pinpoints the symptom.
|
|
22
23
|
- Append to `.design/DEBUG.md`:
|
|
24
|
+
|
|
23
25
|
```markdown
|
|
24
26
|
## <symptom> — <date>
|
|
25
27
|
### Hypothesis <N>
|
|
26
28
|
### Investigation
|
|
27
29
|
### Finding
|
|
28
30
|
```
|
|
31
|
+
|
|
29
32
|
- Ask (AskUserQuestion): "Continue investigating? (yes / found it / dead end)"
|
|
30
|
-
|
|
33
|
+
8. **When found**: Write `### Fix Proposal` block with a concrete patch description. Re-run the Phase 1 loop to confirm the fix flips it from fail to pass. Ask: "Create a todo with `/gdd:todo add`, or execute the fix now?"
|
|
31
34
|
|
|
32
35
|
## Do Not
|
|
33
36
|
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug-feedback-loops
|
|
3
|
+
type: heuristic
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
phase: 28.5
|
|
6
|
+
tags: [debug, feedback-loop, deterministic-signal, iterate-on-loop, mit-port, mattpocock]
|
|
7
|
+
last_updated: 2026-05-18
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Source: mattpocock/skills (MIT) — engineering/diagnose Phase 1 — adapted with permission. See `../NOTICE` for the full attribution block.
|
|
11
|
+
|
|
12
|
+
# Debug Feedback Loops
|
|
13
|
+
|
|
14
|
+
Build a feedback loop before any hypothesizing. A feedback loop is a deterministic, fast, agent-runnable pass/fail signal that tells you whether the bug is reproduced right now, every time, in well under a minute. Without it, debugging degenerates to speculation.
|
|
15
|
+
|
|
16
|
+
**Do not proceed to Phase 2 (hypothesis generation) until you have a loop you believe in.**
|
|
17
|
+
|
|
18
|
+
## The 10 construction paths
|
|
19
|
+
|
|
20
|
+
Listed in priority order — try the cheaper, faster paths first. Each entry: when to reach for it, the shape of the loop, and the verification snippet.
|
|
21
|
+
|
|
22
|
+
### 1. Failing test
|
|
23
|
+
|
|
24
|
+
The strongest signal. Write the failing test in the project's native test framework (pytest, jest, vitest, go test, cargo test, junit, rspec). Assert the buggy behavior; run with watch mode if available. When the test goes green, the bug is fixed. Best case: reproduces in under 2 seconds, runnable by a fresh agent with one command.
|
|
25
|
+
|
|
26
|
+
When to reach: the project already has a test runner the agent can invoke; the bug is in a unit/integration-testable code path; the symptom is expressible as a deterministic assertion.
|
|
27
|
+
|
|
28
|
+
### 2. `curl` against a running endpoint
|
|
29
|
+
|
|
30
|
+
For HTTP endpoints, a `curl` against the staging or local server with assertion on body/status. Pipe to `jq` for structured assertions. Cheap, reliable, framework-free. Wrap in a 3-line bash script so the loop is one command.
|
|
31
|
+
|
|
32
|
+
When to reach: the bug is in an HTTP endpoint; the server is already runnable locally; the symptom shows up in response body/status/headers.
|
|
33
|
+
|
|
34
|
+
### 3. CLI fixture
|
|
35
|
+
|
|
36
|
+
For CLI tools, a small shell script that invokes the binary with fixture inputs and `grep`s for the symptom in stdout/stderr. Bash one-liner is enough; no test framework. Capture exit code, stdout, and stderr separately.
|
|
37
|
+
|
|
38
|
+
When to reach: the bug is in a CLI tool; the symptom shows up in stdout/stderr/exit-code; the failure mode is reproducible from a fixed input.
|
|
39
|
+
|
|
40
|
+
### 4. Headless browser
|
|
41
|
+
|
|
42
|
+
For UI bugs, a Playwright or Puppeteer script that opens the page, performs the trigger action, and screenshots the symptom region. Compare against a known-good fixture or assert on a DOM selector's text/attribute. Use a deterministic seed for any randomness (animations, IDs, dates).
|
|
43
|
+
|
|
44
|
+
When to reach: the bug is visible only in a rendered browser context; DOM-level inspection isn't enough; the symptom involves layout, paint, or interaction timing.
|
|
45
|
+
|
|
46
|
+
### 5. Trace replay
|
|
47
|
+
|
|
48
|
+
For bugs reproducible from a captured execution trace, replay the trace deterministically. `rr` on Linux for native binaries, record-and-replay plugins for some browsers, Chrome DevTools recording for web, or a captured production trace for distributed systems. Replays are bit-for-bit reproducible — the gold standard for non-deterministic bugs that have been captured once.
|
|
49
|
+
|
|
50
|
+
When to reach: the bug is hard to reproduce live but you have a captured trace; the trace runtime is available; bit-identical replay is achievable.
|
|
51
|
+
|
|
52
|
+
### 6. Throwaway harness
|
|
53
|
+
|
|
54
|
+
Write a minimal `main()` that calls the buggy function with known inputs and prints the output. ~10 lines. Side-step framework startup costs entirely. Throw away when fixed. Useful when the test framework's setup is too heavy to iterate quickly.
|
|
55
|
+
|
|
56
|
+
When to reach: the bug is in a single function with a clear input/output contract; framework setup dominates iteration time; you'd rather iterate on a 10-line script than wait for the framework to boot.
|
|
57
|
+
|
|
58
|
+
### 7. Fuzz
|
|
59
|
+
|
|
60
|
+
When the bug surfaces unpredictably, use property-based testing (Hypothesis, fast-check, jqwik) or AFL/libfuzzer for native code. The fuzzer narrows on the failing input across runs. Combine with a "minimize" pass to shrink the failing input to its smallest form.
|
|
61
|
+
|
|
62
|
+
When to reach: the input space is exotic (parsers, serializers, network protocols); the bug isn't tied to a specific input you can name; you suspect a class of inputs but can't enumerate it.
|
|
63
|
+
|
|
64
|
+
### 8. Bisect
|
|
65
|
+
|
|
66
|
+
When you know "it worked on commit X, fails on commit Y," `git bisect` is the loop. Each iteration runs the test/curl/CLI from a higher path. Reproduces in O(log N) commits. Combine with `git bisect run <script>` to fully automate.
|
|
67
|
+
|
|
68
|
+
When to reach: the bug regressed between two known commits; you have a binary pass/fail script from one of the earlier paths; you don't yet know which commit introduced the regression.
|
|
69
|
+
|
|
70
|
+
### 9. Differential
|
|
71
|
+
|
|
72
|
+
When you have two systems and one's correct, write a differential harness: feed the same input to both, assert outputs match. Cheap for migration bugs (old → new implementation) and protocol bugs (your client vs reference client). The harness becomes the regression test once the bug is fixed.
|
|
73
|
+
|
|
74
|
+
When to reach: a known-good reference implementation exists; the buggy code is supposed to match the reference; input space is enumerable enough to drive both implementations side by side.
|
|
75
|
+
|
|
76
|
+
### 10. HITL bash (Human In The Loop)
|
|
77
|
+
|
|
78
|
+
Last resort. A documented sequence of bash commands a human runs that produces a pass/fail signal. Slower (human in the path), but better than no loop. The agent reads stdout/stderr; the human reads the screen and reports. Use only when no automatable signal is available — physical hardware, vendor portals, manual eyeball checks.
|
|
79
|
+
|
|
80
|
+
When to reach: every other path is blocked by an unautomatable surface; the human cost is acceptable for the duration of the investigation; the loop will be retired or upgraded the moment any earlier path becomes possible.
|
|
81
|
+
|
|
82
|
+
## Iterate on the loop itself
|
|
83
|
+
|
|
84
|
+
The loop is a first-class artifact. Iterate on it before iterating on hypotheses. A 5-minute loop run 20 times costs 100 minutes; a 5-second loop run 20 times costs 100 seconds. Spending 30 minutes tightening the loop pays back inside the same session.
|
|
85
|
+
|
|
86
|
+
- **Cache setup**: hoist expensive setup (DB seed, fixture load, container start) out of the loop body. Run the loop only on the fast inner part. Use `--no-rebuild`, persistent containers, or test-runner watch modes.
|
|
87
|
+
- **Narrow scope**: if the loop runs the full test suite to verify one bug, narrow to just the failing test/group. Fewer side-effects, faster iterations. `pytest -k`, `jest -t`, `vitest --testNamePattern`, `go test -run` are your friends.
|
|
88
|
+
- **Pin time**: when the bug is time-dependent, freeze the clock (`sinon.useFakeTimers`, `jest.useFakeTimers`, `freezegun`, `time-machine`). Removes wallclock as a variable.
|
|
89
|
+
- **Seed RNG**: every random source gets a fixed seed in the loop. `Math.random`, `crypto.randomBytes`, `random.seed(...)`, `rand::SeedableRng`. Determinism over coverage — the loop must be bit-identical given the same code state.
|
|
90
|
+
- **Isolate filesystem**: run in a `tmpdir`; reset between iterations. Avoids "fixed on my machine" via stale state. Bind-mount or copy fixtures into the tmpdir per iteration.
|
|
91
|
+
- **Freeze network**: mock or record/replay all outbound calls (`nock`, `vcr`, `polly.js`, `mitmproxy --replay`). Real-network loops are non-deterministic by definition.
|
|
92
|
+
|
|
93
|
+
The discipline: every iteration of the loop should be bit-identical given the same code state. If two iterations differ without a code change, the loop has a hidden input — find it and pin it before continuing.
|
|
94
|
+
|
|
95
|
+
## Non-deterministic bugs
|
|
96
|
+
|
|
97
|
+
Some bugs surface only sometimes. The goal is NOT a clean repro — the goal is to raise the reproduction rate to debuggable.
|
|
98
|
+
|
|
99
|
+
- **Measure baseline rate**: run the loop N=20 times. Note pass/fail count. Record the rate so you can tell whether later changes helped.
|
|
100
|
+
- **Raise stressors**: add concurrency, contention, memory pressure, network jitter (use `tc qdisc add dev lo root netem delay 100ms 50ms` on Linux, `Network Link Conditioner` on macOS). Re-measure.
|
|
101
|
+
- **Target the suspect axis**: if you suspect a race, add a deterministic sleep at the suspect point and measure. If reproduction jumps to 100% with sleep, the race is in that region. If it stays at baseline, the race is elsewhere.
|
|
102
|
+
- **A 30% reproduction rate is debuggable.** A 5% rate isn't — keep raising stressors until you cross 30%. At 30% you can iterate; at 5% you're guessing whether your fix helped or you got lucky.
|
|
103
|
+
|
|
104
|
+
## When the loop is good enough
|
|
105
|
+
|
|
106
|
+
The loop is good enough when:
|
|
107
|
+
|
|
108
|
+
- It runs in under a minute (preferably under 10 seconds).
|
|
109
|
+
- It's deterministic (or, for non-determinism, reproduces at least 30% of the time).
|
|
110
|
+
- It's automatable — no human in the inner loop except by explicit choice (Path 10).
|
|
111
|
+
- A fresh agent could pick up the loop and run it without context.
|
|
112
|
+
|
|
113
|
+
Only after the loop is good enough should you proceed to hypothesizing the fix. The hypothesis cycle is governed by `./debugger-philosophy.md` (one variable at a time, do not stop at first plausible cause, the bug is where you didn't look).
|
|
114
|
+
|
|
115
|
+
## Cross-references
|
|
116
|
+
|
|
117
|
+
- `./debugger-philosophy.md` — companion framing; the hypothesis-cycle discipline that runs in Phase 2 once the loop is in place.
|
|
118
|
+
- `../skills/debug/SKILL.md` — Phase 1 of the debug skill mandates this catalog before any hypothesis generation.
|
|
119
|
+
- `../NOTICE` — full mattpocock/skills MIT attribution.
|
package/skills/design/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design
|
|
3
|
-
description: "Stage 4 of 5
|
|
3
|
+
description: "Stage 4 of 5 orchestrator that reads DESIGN-PLAN.md, partitions tasks by wave + parallel-safe flag, and spawns design-executor agents with the appropriate isolation (worktree for parallel batches, in-place for sequential tail). Use when DESIGN-PLAN.md is approved and ready for implementation."
|
|
4
4
|
argument-hint: "[--auto] [--parallel]"
|
|
5
5
|
user-invocable: true
|
|
6
6
|
tools: Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__resolve_blocker, mcp__gdd_state__checkpoint
|
|
@@ -10,290 +10,72 @@ tools: Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get
|
|
|
10
10
|
|
|
11
11
|
**Stage 4 of 5** in the get-design-done pipeline. Thin orchestrator. All design execution intelligence lives in `agents/design-executor.md`.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## Stage entry
|
|
16
|
-
|
|
17
|
-
1. Call `mcp__gdd_state__transition_stage` with `to: "design"`.
|
|
18
|
-
- Gate failure surfaces `error.context.blockers` to the user; do not advance.
|
|
19
|
-
- If the transition succeeds and the prior stage was already `design` with `status: in_progress`, this is a RESUME — use `task_progress` numerator as source of truth and skip tasks that already have a corresponding `.design/tasks/task-NN.md` file.
|
|
20
|
-
2. Call `mcp__gdd_state__get` → snapshot `state`; read `state.position.wave` to decide execution plan.
|
|
21
|
-
|
|
22
|
-
Abort only if `.design/DESIGN-PLAN.md` is missing:
|
|
23
|
-
> "No plan found. Run `/get-design-done:plan` first."
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Flag Parsing
|
|
28
|
-
|
|
29
|
-
- `--auto` → `auto_mode=true` (no mid-stage prompts; architectural deviations still stop the individual task but continue with remaining tasks)
|
|
30
|
-
- `--parallel` → `parallel_mode=true` (use worktree isolation for `Parallel: true` tasks)
|
|
13
|
+
Full procedure detail: `./design-procedure.md`.
|
|
31
14
|
|
|
32
15
|
---
|
|
33
16
|
|
|
34
|
-
##
|
|
35
|
-
|
|
36
|
-
Scan DESIGN-PLAN.md for tasks marked as "directionally open" (exploration-appropriate — e.g., tasks whose acceptance criteria read "explore N directions" or "pick a visual approach"). If any are found, print:
|
|
37
|
-
|
|
38
|
-
> "Tasks [IDs] appear directionally open — consider running `/gdd:sketch` first to explore variants before implementation."
|
|
39
|
-
|
|
40
|
-
Skip if `auto_mode=true`.
|
|
17
|
+
## Stage entry
|
|
41
18
|
|
|
42
|
-
|
|
19
|
+
1. `mcp__gdd_state__transition_stage` with `to: "design"`. Gate failure surfaces `error.context.blockers`; do not advance. Resume case: prior stage `design` + `status: in_progress` -> skip tasks where `.design/tasks/task-NN.md` already exists.
|
|
20
|
+
2. `mcp__gdd_state__get` -> snapshot `state`; read `state.position.wave` for execution plan.
|
|
21
|
+
3. Abort only if `.design/DESIGN-PLAN.md` is missing: "No plan found. Run `/get-design-done:plan` first."
|
|
43
22
|
|
|
44
|
-
|
|
23
|
+
Detail: `./design-procedure.md` §Stage entry.
|
|
45
24
|
|
|
46
25
|
---
|
|
47
26
|
|
|
48
|
-
|
|
27
|
+
## Flags + pre-execution checks
|
|
49
28
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
→ Not found → skip .stories.tsx emission
|
|
56
|
-
|
|
57
|
-
Step 2 — When storybook_project: true, emit a CSF stub alongside the component:
|
|
58
|
-
File: `<same directory as component>/<ComponentName>.stories.tsx`
|
|
59
|
-
Content follows CSF format (see `connections/storybook.md` for full template):
|
|
60
|
-
- Import `Meta` and `StoryObj` from `@storybook/react`
|
|
61
|
-
- Import the new component
|
|
62
|
-
- `meta: Meta<typeof ComponentName>` with `title` and `parameters.a11y.test = 'error'`
|
|
63
|
-
- Export `Default`, `Primary`, `Disabled` story variants
|
|
64
|
-
Adjust `title` to match directory structure (e.g., `'Components/Button'` or `'Features/Auth/LoginForm'`)
|
|
65
|
-
|
|
66
|
-
Note: the `.stories.tsx` stub is emitted whenever `storybook_project: true` regardless of whether
|
|
67
|
-
the dev server is running. New components need stories even in offline/CI contexts.
|
|
29
|
+
- `--auto` -> `auto_mode=true` (no mid-stage prompts; architectural deviations stop the individual task but continue the rest).
|
|
30
|
+
- `--parallel` -> `parallel_mode=true` (use worktree isolation for `Parallel: true` tasks).
|
|
31
|
+
- **Directionally-open check** (skipped if `auto_mode`): scan DESIGN-PLAN.md for tasks whose criteria read "explore N directions" / "pick a visual approach" and suggest `/gdd:sketch` first.
|
|
32
|
+
- **Project-local conventions**: include any `./.claude/skills/design-*-conventions.md` and `~/.claude/gdd/global-skills/*.md` in every executor's `<required_reading>` — global conventions inform but do not override project-local D-XX decisions.
|
|
33
|
+
- **`.stories.tsx` stub**: after each new component file is created by the executor, emit a CSF stub alongside if `.storybook/` exists or `"storybook"` is in `package.json`, even with the dev server offline. Detail: `./design-procedure.md` §.stories.tsx Stub.
|
|
68
34
|
|
|
69
35
|
---
|
|
70
36
|
|
|
71
37
|
## Step 1 — Parse DESIGN-PLAN.md
|
|
72
38
|
|
|
73
|
-
Read `.design/DESIGN-PLAN.md`. Partition tasks by `## Wave N` heading. Within each wave, partition by `Parallel: true` vs `Parallel: false`. Compute `total_tasks` for `task_progress` denominator.
|
|
74
|
-
|
|
75
|
-
If resuming: skip tasks where `.design/tasks/task-NN.md` already exists.
|
|
39
|
+
Read `.design/DESIGN-PLAN.md`. Partition tasks by `## Wave N` heading. Within each wave, partition by `Parallel: true` vs `Parallel: false`. Compute `total_tasks` for the `task_progress` denominator. If resuming, skip tasks whose `.design/tasks/task-NN.md` already exists.
|
|
76
40
|
|
|
77
41
|
---
|
|
78
42
|
|
|
79
|
-
## Parallelism Decision (per wave, before spawning)
|
|
80
|
-
|
|
81
|
-
For each wave:
|
|
82
|
-
1. Read `.design/config.json` `parallelism` (or defaults from `reference/config-schema.md`).
|
|
83
|
-
2. Collect candidates in the wave; check `Touches:`, `writes:`, `parallel-safe`, and `typical-duration-seconds` fields.
|
|
84
|
-
3. Apply rules in order from `reference/parallelism-rules.md` (hard → soft). Overlapping Touches split into sequential sub-waves.
|
|
85
|
-
4. Record the parallelism decision for this wave via `mcp__gdd_state__update_progress` with `task_progress: "<completed>/<total>"` and `status: "design_wave_<N>_parallelism: <parallel|serial>, reason=<short-reason>"` — the status string is the canonical carrier (mirrors the plan-stage convention from Plan 20-09; a dedicated tool may be added in a follow-on plan).
|
|
86
|
-
5. If `parallel`: spawn all candidates via concurrent `Task()` calls in one response. If `serial`: spawn sequentially.
|
|
87
|
-
|
|
88
|
-
### Executor prompt template (applies to every spawned design-executor)
|
|
89
|
-
|
|
90
|
-
Every spawned executor receives the following STATE.md contract in its prompt:
|
|
91
|
-
|
|
92
|
-
> **STATE.md mutation protocol** — When you complete a task in your assigned batch, update STATE.md ONLY via the `gdd-state` MCP tools. Specifically:
|
|
93
|
-
> - Report task progress: `mcp__gdd_state__update_progress` with your new `task_progress` fraction.
|
|
94
|
-
> - Add blockers: `mcp__gdd_state__add_blocker` with `{ stage: "design", date: <today>, text: "..." }`.
|
|
95
|
-
> - Resolve your own blockers on fix: `mcp__gdd_state__resolve_blocker` with the blocker id.
|
|
96
|
-
>
|
|
97
|
-
> Do NOT `Read` + `Write` `.design/STATE.md` directly — the MCP tools enforce the lockfile and emit mutation events. Direct writes corrupt parallel state.
|
|
98
|
-
|
|
99
|
-
Inline this protocol block verbatim inside every design-executor prompt in both the parallel-batch and sequential-tail spawns below. Concurrent executors (Phase 10.1 parallel mode) each emit `update_progress` calls; the lockfile (Plan 20-01) and event stream (Plan 20-06) serialize them safely.
|
|
100
|
-
|
|
101
43
|
## Step 2 — Wave-by-Wave Execution
|
|
102
44
|
|
|
103
|
-
For each
|
|
104
|
-
|
|
105
|
-
### Parallel batch (if `parallel_mode=true` AND any `Parallel: true` tasks in wave)
|
|
106
|
-
|
|
107
|
-
Report the partition before spawning:
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
━━━ Wave [N] — parallel mode ━━━
|
|
111
|
-
Parallel batch ([N] tasks — spawning concurrently):
|
|
112
|
-
[01] [type]: [scope] — touches: [files]
|
|
113
|
-
[02] [type]: [scope] — touches: [files]
|
|
114
|
-
|
|
115
|
-
Sequential tail ([N] tasks):
|
|
116
|
-
[03] [type]: [scope] — touches: [files]
|
|
117
|
-
|
|
118
|
-
Spawning agents now...
|
|
119
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Spawn ALL `Parallel: true` tasks in this wave as concurrent `Task()` calls in ONE response. Each call uses `isolation: "worktree"`:
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
Task("design-executor", """
|
|
126
|
-
<required_reading>
|
|
127
|
-
@.design/STATE.md
|
|
128
|
-
@.design/DESIGN-PLAN.md
|
|
129
|
-
@.design/DESIGN-CONTEXT.md
|
|
130
|
-
@reference/[type-relevant].md
|
|
131
|
-
</required_reading>
|
|
132
|
-
|
|
133
|
-
You are the design-executor agent. Execute Task NN from DESIGN-PLAN.md.
|
|
134
|
-
|
|
135
|
-
Prompt context:
|
|
136
|
-
task_id: NN
|
|
137
|
-
task_type: [type]
|
|
138
|
-
task_scope: [scope]
|
|
139
|
-
task_acceptance_criteria:
|
|
140
|
-
- [criterion 1]
|
|
141
|
-
- [criterion 2]
|
|
142
|
-
wave: N
|
|
143
|
-
is_parallel: true
|
|
144
|
-
auto_mode: [true|false]
|
|
145
|
-
|
|
146
|
-
Write .design/tasks/task-NN.md and make an atomic commit `feat(design-NN): [type] — [scope]`.
|
|
147
|
-
|
|
148
|
-
Emit `## EXECUTION COMPLETE` when done.
|
|
149
|
-
""", subagent_type="design-executor", isolation="worktree")
|
|
150
|
-
```
|
|
45
|
+
For each wave in order:
|
|
151
46
|
|
|
152
|
-
|
|
47
|
+
1. **Parallelism decision (per wave)**: read `.design/config.json` `parallelism`, collect candidates, check `Touches:` / `writes:` / `parallel-safe` / `typical-duration-seconds`, apply `reference/parallelism-rules.md` hard->soft. Overlapping `Touches:` split into sequential sub-waves. Record verdict via `mcp__gdd_state__update_progress` with `status: "design_wave_<N>_parallelism: <parallel|serial>, reason=<short-reason>"`.
|
|
48
|
+
2. **Executor STATE.md protocol** (inlined verbatim into every `design-executor` prompt): executors update STATE.md ONLY via `gdd-state` MCP tools — `update_progress`, `add_blocker`, `resolve_blocker`. NEVER `Read`+`Write` `.design/STATE.md` directly. The MCP tools enforce the lockfile (Plan 20-01) and emit mutation events (Plan 20-06) so concurrent executors serialize safely.
|
|
49
|
+
3. **Parallel batch** (when `parallel_mode=true` AND any `Parallel: true` tasks in wave): announce the partition, spawn all `Parallel: true` tasks via concurrent `Task("design-executor", ..., isolation: "worktree")` calls in ONE response, wait for all `## EXECUTION COMPLETE` markers, merge worktrees (non-overlapping `Touches:` guarantees no conflicts; surface any conflict to the user before continuing), then `update_progress` + `checkpoint`.
|
|
50
|
+
4. **Sequential tail** (`Parallel: false` or `parallel_mode=false`): spawn one `design-executor` at a time (no worktree isolation), waiting for each `## EXECUTION COMPLETE` and emitting `update_progress` per task; `checkpoint` after the final task of the wave.
|
|
153
51
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
━━━ Parallel batch complete ━━━
|
|
158
|
-
[✓/⚠/✗] Task 01 — [type]
|
|
159
|
-
[✓/⚠/✗] Task 02 — [type]
|
|
160
|
-
|
|
161
|
-
Merging worktrees...
|
|
162
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
Merge each worktree branch back into the working directory. Each agent touched non-overlapping files (guaranteed by the conflict check on `Touches:` fields). If an unexpected merge conflict appears, flag it and ask the user to resolve before continuing.
|
|
166
|
-
|
|
167
|
-
After merge, roll up the batch's progress:
|
|
168
|
-
|
|
169
|
-
- Call `mcp__gdd_state__update_progress` with `task_progress: "<completed>/<total>"` and `status: "design_wave_<N>_parallel_batch_complete"`.
|
|
170
|
-
- Call `mcp__gdd_state__checkpoint` — records the wave boundary in `<timestamps>` and bumps `last_checkpoint`.
|
|
171
|
-
|
|
172
|
-
### Sequential tail (Parallel: false tasks, or all tasks if `parallel_mode=false`)
|
|
173
|
-
|
|
174
|
-
Announce each wave before starting:
|
|
175
|
-
|
|
176
|
-
```
|
|
177
|
-
━━━ Wave [N] — [N tasks] — sequential ━━━
|
|
178
|
-
Tasks:
|
|
179
|
-
[01] [type]: [scope]
|
|
180
|
-
[02] [type]: [scope]
|
|
181
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
Run one at a time. Same `Task("design-executor", ...)` pattern with `is_parallel: false` (no worktree isolation):
|
|
185
|
-
|
|
186
|
-
```
|
|
187
|
-
Task("design-executor", """
|
|
188
|
-
<required_reading>
|
|
189
|
-
@.design/STATE.md
|
|
190
|
-
@.design/DESIGN-PLAN.md
|
|
191
|
-
@.design/DESIGN-CONTEXT.md
|
|
192
|
-
@reference/[type-relevant].md
|
|
193
|
-
</required_reading>
|
|
194
|
-
|
|
195
|
-
You are the design-executor agent. Execute Task NN from DESIGN-PLAN.md.
|
|
196
|
-
|
|
197
|
-
Prompt context:
|
|
198
|
-
task_id: NN
|
|
199
|
-
task_type: [type]
|
|
200
|
-
task_scope: [scope]
|
|
201
|
-
task_acceptance_criteria:
|
|
202
|
-
- [criterion 1]
|
|
203
|
-
- [criterion 2]
|
|
204
|
-
wave: N
|
|
205
|
-
is_parallel: false
|
|
206
|
-
auto_mode: [true|false]
|
|
207
|
-
|
|
208
|
-
Write .design/tasks/task-NN.md and make an atomic commit `feat(design-NN): [type] — [scope]`.
|
|
209
|
-
|
|
210
|
-
Emit `## EXECUTION COMPLETE` when done.
|
|
211
|
-
""", subagent_type="design-executor")
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
After each task completes, call `mcp__gdd_state__update_progress` with the new `task_progress: "<completed>/<total>"` and `status: "design_wave_<N>_task_<NN>_complete"`.
|
|
215
|
-
|
|
216
|
-
After the final sequential task of the wave, call `mcp__gdd_state__checkpoint` — records the wave boundary in `<timestamps>` and bumps `last_checkpoint`.
|
|
52
|
+
Full executor prompts (parallel + sequential variants) and the merge-worktrees protocol: `./design-procedure.md` §Step 2.
|
|
217
53
|
|
|
218
54
|
---
|
|
219
55
|
|
|
220
56
|
## Step 3 — Wave Checkpoint
|
|
221
57
|
|
|
222
|
-
After each wave
|
|
223
|
-
|
|
224
|
-
```
|
|
225
|
-
━━━ Wave [N] complete ━━━
|
|
226
|
-
✓ [N] tasks complete
|
|
227
|
-
⚠ [N] deviations (see .design/tasks/ files)
|
|
228
|
-
|
|
229
|
-
Ready for Wave [N+1]? (yes / review first)
|
|
230
|
-
━━━━━━━━━━━━━━━━━━━━━━━
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
Skip checkpoint if `auto_mode=true`.
|
|
234
|
-
|
|
235
|
-
---
|
|
58
|
+
After each wave, unless `auto_mode=true`, prompt: "Ready for Wave [N+1]? (yes / review first)". Skip in `auto_mode`.
|
|
236
59
|
|
|
237
60
|
## Step 4 — Handle Deviations
|
|
238
61
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
- Call `mcp__gdd_state__get` → read `state.blockers`; present affected task IDs and their blocker descriptions from the returned snapshot.
|
|
242
|
-
- Offer: (a) stop stage, (b) continue remaining tasks
|
|
243
|
-
- In `auto_mode`: continue automatically, log all deviations
|
|
244
|
-
- When a blocker is addressed (fix committed by a follow-up task), call `mcp__gdd_state__resolve_blocker` with the blocker id to clear it from the live state.
|
|
62
|
+
Check task-NN.md files for `status: deviation`. If found: `mcp__gdd_state__get` -> read `state.blockers`, present affected task IDs + blocker descriptions, offer (a) stop, (b) continue. `auto_mode`: continue, log. When a blocker is later fixed by a follow-up task: `mcp__gdd_state__resolve_blocker`.
|
|
245
63
|
|
|
246
64
|
---
|
|
247
65
|
|
|
248
66
|
## State Update (exit)
|
|
249
67
|
|
|
250
|
-
1.
|
|
251
|
-
2.
|
|
252
|
-
|
|
253
|
-
---
|
|
68
|
+
1. `mcp__gdd_state__set_status` -> `"design_complete"` — marks the stage complete WITHOUT transitioning (verify owns its own `transition_stage` on entry).
|
|
69
|
+
2. `mcp__gdd_state__checkpoint` — stamps `last_checkpoint`, appends `design_completed_at` to `<timestamps>`.
|
|
254
70
|
|
|
255
71
|
## After Completion
|
|
256
72
|
|
|
257
|
-
Print summary:
|
|
258
|
-
|
|
259
|
-
```
|
|
260
|
-
━━━ Design stage complete ━━━
|
|
261
|
-
Tasks: [N] complete / [M] total
|
|
262
|
-
Deviations: [N]
|
|
263
|
-
Commits: [git log --oneline since stage start]
|
|
264
|
-
|
|
265
|
-
Next: /get-design-done:verify
|
|
266
|
-
→ Scores the result against baseline, checks must-haves,
|
|
267
|
-
runs NNG heuristic evaluation, and identifies gaps.
|
|
268
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
269
|
-
```
|
|
73
|
+
Print the `=== Design stage complete ===` summary (tasks complete/total, deviations, commits since stage start, next step `/get-design-done:verify`). Template: `./design-procedure.md` §After Completion.
|
|
270
74
|
|
|
271
75
|
---
|
|
272
76
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
After design-executor has finished and DESIGN-PLAN.md tasks are complete:
|
|
276
|
-
|
|
277
|
-
1. Read `figma:` status from `.design/STATE.md` `<connections>` (the unified remote MCP covers both reads and writes as of v1.0.7.1):
|
|
278
|
-
- If `figma: not_configured` or `figma: unavailable` or absent → skip this block entirely (no prompt, no output)
|
|
279
|
-
- If `figma: available` → proceed to step 2
|
|
280
|
-
|
|
281
|
-
2. Offer the user a prompt:
|
|
282
|
-
```
|
|
283
|
-
figma write-back is available — propagate design decisions back to Figma?
|
|
284
|
-
Modes: annotate (layer comments) | tokenize (variable bindings) | mappings (Code Connect)
|
|
285
|
-
Run figma-write? (y/N):
|
|
286
|
-
```
|
|
77
|
+
## Figma Write Dispatch
|
|
287
78
|
|
|
288
|
-
|
|
289
|
-
- Ask which mode: annotate / tokenize / mappings (or all)
|
|
290
|
-
- Spawn `design-figma-writer` agent with the selected mode
|
|
291
|
-
- Pass `--dry-run` flag if user requests preview first
|
|
292
|
-
|
|
293
|
-
4. If user answers "n", "N", or no response: skip silently.
|
|
294
|
-
|
|
295
|
-
Note: This dispatch is always opt-in. The design stage never auto-runs figma-writer without user confirmation.
|
|
296
|
-
|
|
297
|
-
---
|
|
79
|
+
After all tasks finish, if STATE.md `<connections>` has `figma: available`, offer the user the figma-write opt-in prompt (modes: annotate / tokenize / mappings, with optional `--dry-run`). Spawn `design-figma-writer` with the selected mode on "yes"; skip silently on "no". NEVER auto-run without confirmation. Full prompt + dispatch logic: `./design-procedure.md` §Figma Write Dispatch.
|
|
298
80
|
|
|
299
81
|
## DESIGN COMPLETE
|