@hegemonart/get-design-done 1.57.2 → 1.57.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +4 -4
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +48 -0
- package/README.md +1 -1
- package/SKILL.md +2 -6
- package/connections/cursor.md +0 -1
- package/package.json +1 -2
- package/reference/skill-graph.md +1 -5
- package/scripts/lib/manifest/skills.json +3 -23
- package/scripts/lib/worktree-resolve.cjs +4 -16
- package/skills/README.md +46 -0
- package/skills/bootstrap-ds/SKILL.md +1 -1
- package/skills/compare/SKILL.md +1 -1
- package/skills/new-cycle/SKILL.md +1 -1
- package/skills/peer-cli-customize/SKILL.md +0 -1
- package/skills/peers/SKILL.md +1 -1
- package/skills/reflect/procedures/capability-gap-scan.md +0 -1
- package/skills/report-issue/report-issue-procedure.md +0 -1
- package/skills/synthesize/SKILL.md +1 -1
- package/skills/turn-closeout/SKILL.md +1 -1
- package/dist/claude-code/.claude/skills/add-backlog/SKILL.md +0 -48
- package/dist/claude-code/.claude/skills/analyze-dependencies/SKILL.md +0 -95
- package/dist/claude-code/.claude/skills/apply-reflections/SKILL.md +0 -109
- package/dist/claude-code/.claude/skills/apply-reflections/apply-reflections-procedure.md +0 -170
- package/dist/claude-code/.claude/skills/audit/SKILL.md +0 -79
- package/dist/claude-code/.claude/skills/bandit-status/SKILL.md +0 -94
- package/dist/claude-code/.claude/skills/benchmark/SKILL.md +0 -65
- package/dist/claude-code/.claude/skills/bootstrap-ds/SKILL.md +0 -43
- package/dist/claude-code/.claude/skills/brief/SKILL.md +0 -145
- package/dist/claude-code/.claude/skills/budget/SKILL.md +0 -45
- package/dist/claude-code/.claude/skills/cache-manager/SKILL.md +0 -66
- package/dist/claude-code/.claude/skills/cache-manager/cache-policy.md +0 -126
- package/dist/claude-code/.claude/skills/check-update/SKILL.md +0 -98
- package/dist/claude-code/.claude/skills/compare/SKILL.md +0 -82
- package/dist/claude-code/.claude/skills/compare/compare-rubric.md +0 -171
- package/dist/claude-code/.claude/skills/complete-cycle/SKILL.md +0 -81
- package/dist/claude-code/.claude/skills/connections/SKILL.md +0 -71
- package/dist/claude-code/.claude/skills/connections/connections-onboarding.md +0 -608
- package/dist/claude-code/.claude/skills/context/SKILL.md +0 -137
- package/dist/claude-code/.claude/skills/continue/SKILL.md +0 -24
- package/dist/claude-code/.claude/skills/darkmode/SKILL.md +0 -76
- package/dist/claude-code/.claude/skills/darkmode/darkmode-audit-procedure.md +0 -258
- package/dist/claude-code/.claude/skills/debug/SKILL.md +0 -41
- package/dist/claude-code/.claude/skills/debug/debug-feedback-loops.md +0 -119
- package/dist/claude-code/.claude/skills/design/SKILL.md +0 -118
- package/dist/claude-code/.claude/skills/design/design-procedure.md +0 -304
- package/dist/claude-code/.claude/skills/discover/SKILL.md +0 -78
- package/dist/claude-code/.claude/skills/discover/discover-procedure.md +0 -222
- package/dist/claude-code/.claude/skills/discuss/SKILL.md +0 -96
- package/dist/claude-code/.claude/skills/do/SKILL.md +0 -45
- package/dist/claude-code/.claude/skills/explore/SKILL.md +0 -118
- package/dist/claude-code/.claude/skills/explore/explore-procedure.md +0 -267
- package/dist/claude-code/.claude/skills/export/SKILL.md +0 -30
- package/dist/claude-code/.claude/skills/extract-learnings/SKILL.md +0 -114
- package/dist/claude-code/.claude/skills/fast/SKILL.md +0 -91
- package/dist/claude-code/.claude/skills/figma-extract/SKILL.md +0 -64
- package/dist/claude-code/.claude/skills/figma-write/SKILL.md +0 -50
- package/dist/claude-code/.claude/skills/graphify/SKILL.md +0 -49
- package/dist/claude-code/.claude/skills/health/SKILL.md +0 -99
- package/dist/claude-code/.claude/skills/health/health-mcp-detection.md +0 -44
- package/dist/claude-code/.claude/skills/health/health-skill-length-report.md +0 -69
- package/dist/claude-code/.claude/skills/help/SKILL.md +0 -87
- package/dist/claude-code/.claude/skills/instinct/SKILL.md +0 -111
- package/dist/claude-code/.claude/skills/list-assumptions/SKILL.md +0 -61
- package/dist/claude-code/.claude/skills/list-pins/SKILL.md +0 -27
- package/dist/claude-code/.claude/skills/live/SKILL.md +0 -98
- package/dist/claude-code/.claude/skills/locale/SKILL.md +0 -51
- package/dist/claude-code/.claude/skills/map/SKILL.md +0 -89
- package/dist/claude-code/.claude/skills/migrate/SKILL.md +0 -70
- package/dist/claude-code/.claude/skills/migrate-context/SKILL.md +0 -123
- package/dist/claude-code/.claude/skills/new-addendum/SKILL.md +0 -81
- package/dist/claude-code/.claude/skills/new-cycle/SKILL.md +0 -37
- package/dist/claude-code/.claude/skills/new-cycle/milestone-completeness-rubric.md +0 -87
- package/dist/claude-code/.claude/skills/new-project/SKILL.md +0 -53
- package/dist/claude-code/.claude/skills/new-skill/SKILL.md +0 -90
- package/dist/claude-code/.claude/skills/next/SKILL.md +0 -68
- package/dist/claude-code/.claude/skills/note/SKILL.md +0 -48
- package/dist/claude-code/.claude/skills/openrouter-status/SKILL.md +0 -86
- package/dist/claude-code/.claude/skills/optimize/SKILL.md +0 -97
- package/dist/claude-code/.claude/skills/override/SKILL.md +0 -86
- package/dist/claude-code/.claude/skills/paper-write/SKILL.md +0 -54
- package/dist/claude-code/.claude/skills/pause/SKILL.md +0 -77
- package/dist/claude-code/.claude/skills/peer-cli-add/SKILL.md +0 -88
- package/dist/claude-code/.claude/skills/peer-cli-add/peer-cli-protocol.md +0 -161
- package/dist/claude-code/.claude/skills/peer-cli-customize/SKILL.md +0 -90
- package/dist/claude-code/.claude/skills/peers/SKILL.md +0 -96
- package/dist/claude-code/.claude/skills/pencil-write/SKILL.md +0 -54
- package/dist/claude-code/.claude/skills/pin/SKILL.md +0 -37
- package/dist/claude-code/.claude/skills/plan/SKILL.md +0 -105
- package/dist/claude-code/.claude/skills/plan/plan-procedure.md +0 -278
- package/dist/claude-code/.claude/skills/plant-seed/SKILL.md +0 -48
- package/dist/claude-code/.claude/skills/pr-branch/SKILL.md +0 -32
- package/dist/claude-code/.claude/skills/progress/SKILL.md +0 -107
- package/dist/claude-code/.claude/skills/quality-gate/SKILL.md +0 -90
- package/dist/claude-code/.claude/skills/quality-gate/threat-modeling.md +0 -101
- package/dist/claude-code/.claude/skills/quick/SKILL.md +0 -44
- package/dist/claude-code/.claude/skills/reapply-patches/SKILL.md +0 -32
- package/dist/claude-code/.claude/skills/recall/SKILL.md +0 -75
- package/dist/claude-code/.claude/skills/reflect/SKILL.md +0 -85
- package/dist/claude-code/.claude/skills/reflect/procedures/capability-gap-scan.md +0 -120
- package/dist/claude-code/.claude/skills/report-issue/SKILL.md +0 -53
- package/dist/claude-code/.claude/skills/report-issue/report-issue-procedure.md +0 -120
- package/dist/claude-code/.claude/skills/resume/SKILL.md +0 -93
- package/dist/claude-code/.claude/skills/review-backlog/SKILL.md +0 -46
- package/dist/claude-code/.claude/skills/review-decisions/SKILL.md +0 -42
- package/dist/claude-code/.claude/skills/roi/SKILL.md +0 -54
- package/dist/claude-code/.claude/skills/rollout-status/SKILL.md +0 -35
- package/dist/claude-code/.claude/skills/router/SKILL.md +0 -89
- package/dist/claude-code/.claude/skills/router/capability-gap-emitter.md +0 -65
- package/dist/claude-code/.claude/skills/router/router-pick-emitter.md +0 -78
- package/dist/claude-code/.claude/skills/router/router-rules.md +0 -84
- package/dist/claude-code/.claude/skills/scan/SKILL.md +0 -92
- package/dist/claude-code/.claude/skills/scan/scan-procedure.md +0 -732
- package/dist/claude-code/.claude/skills/settings/SKILL.md +0 -87
- package/dist/claude-code/.claude/skills/ship/SKILL.md +0 -48
- package/dist/claude-code/.claude/skills/sketch/SKILL.md +0 -78
- package/dist/claude-code/.claude/skills/sketch-wrap-up/SKILL.md +0 -92
- package/dist/claude-code/.claude/skills/skill-manifest/SKILL.md +0 -79
- package/dist/claude-code/.claude/skills/spike/SKILL.md +0 -67
- package/dist/claude-code/.claude/skills/spike-wrap-up/SKILL.md +0 -86
- package/dist/claude-code/.claude/skills/start/SKILL.md +0 -67
- package/dist/claude-code/.claude/skills/start/start-procedure.md +0 -115
- package/dist/claude-code/.claude/skills/state/SKILL.md +0 -106
- package/dist/claude-code/.claude/skills/stats/SKILL.md +0 -51
- package/dist/claude-code/.claude/skills/style/SKILL.md +0 -71
- package/dist/claude-code/.claude/skills/style/style-doc-procedure.md +0 -150
- package/dist/claude-code/.claude/skills/synthesize/SKILL.md +0 -94
- package/dist/claude-code/.claude/skills/timeline/SKILL.md +0 -66
- package/dist/claude-code/.claude/skills/todo/SKILL.md +0 -64
- package/dist/claude-code/.claude/skills/turn-closeout/SKILL.md +0 -95
- package/dist/claude-code/.claude/skills/undo/SKILL.md +0 -31
- package/dist/claude-code/.claude/skills/unlock-decision/SKILL.md +0 -54
- package/dist/claude-code/.claude/skills/unpin/SKILL.md +0 -31
- package/dist/claude-code/.claude/skills/update/SKILL.md +0 -56
- package/dist/claude-code/.claude/skills/using-gdd/SKILL.md +0 -78
- package/dist/claude-code/.claude/skills/verify/SKILL.md +0 -113
- package/dist/claude-code/.claude/skills/verify/verify-procedure.md +0 -511
- package/dist/claude-code/.claude/skills/warm-cache/SKILL.md +0 -81
- package/dist/claude-code/.claude/skills/watch-authorities/SKILL.md +0 -82
- package/dist/claude-code/.claude/skills/zoom-out/SKILL.md +0 -26
- package/hooks/run-hook.cmd +0 -35
- package/skills/discover/SKILL.md +0 -78
- package/skills/discover/discover-procedure.md +0 -222
- package/skills/new-cycle/milestone-completeness-rubric.md +0 -87
- package/skills/scan/SKILL.md +0 -92
- package/skills/scan/scan-procedure.md +0 -732
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: plan-procedure
|
|
3
|
-
type: meta-rules
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
phase: 28.5
|
|
6
|
-
tags: [plan, procedure, extracted, pipeline-stage, research, planner, checker]
|
|
7
|
-
last_updated: 2026-05-18
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Source: extracted from `skills/plan/SKILL.md` (Phase 28.5 rework - D-10 extract-then-link).
|
|
11
|
-
The skill's essential workflow stays in `../skills/plan/SKILL.md`; this file holds the
|
|
12
|
-
detail the agent reaches for when executing a specific step (agent spawn prompts, chromatic
|
|
13
|
-
scoping, synthesizer wiring, research-synthesis persistence, exploration artifact globbing).
|
|
14
|
-
|
|
15
|
-
# Plan Procedure
|
|
16
|
-
|
|
17
|
-
Detailed procedure for the get-design-done `plan` Stage 3 orchestrator. Companion to
|
|
18
|
-
`../skills/plan/SKILL.md`. Read this file when executing a specific plan step; the
|
|
19
|
-
SKILL.md keeps the essential workflow + decision tree, this file holds the deep
|
|
20
|
-
agent prompts and pre-plan research wiring.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Stage entry
|
|
25
|
-
|
|
26
|
-
1. `mcp__gdd_state__transition_stage` with `to: "plan"`.
|
|
27
|
-
- Gate failure surfaces `error.context.blockers` to the user; do not advance.
|
|
28
|
-
2. `mcp__gdd_state__get` -> snapshot `state`. Use this snapshot for `<position>`, `<connections>`, `<must_haves>`, `<blockers>`, `<decisions>` in the current stage; do not re-read STATE.md directly.
|
|
29
|
-
|
|
30
|
-
Abort with a clear error only if the user is trying to plan without DESIGN-CONTEXT.md - that is the true prerequisite, not STATE.md.
|
|
31
|
-
|
|
32
|
-
## Flag Parsing
|
|
33
|
-
|
|
34
|
-
Parse $ARGUMENTS:
|
|
35
|
-
- `--auto` -> auto_mode=true (skip approvals, skip optional research)
|
|
36
|
-
- `--parallel` -> parallel_mode=true (planner fills Touches:/Parallel: fields)
|
|
37
|
-
|
|
38
|
-
## Parallelism Decision (before any multi-agent spawn)
|
|
39
|
-
|
|
40
|
-
- Read `.design/config.json` `parallelism` (or defaults from `reference/config-schema.md`).
|
|
41
|
-
- Apply rules from `reference/parallelism-rules.md`.
|
|
42
|
-
- Plan's pipeline is inherently sequential (researcher -> pattern-mapper -> planner -> checker). Expected verdict: **serial** (rule 1).
|
|
43
|
-
|
|
44
|
-
<!-- Parallelism decision is currently carried as the status string of an update_progress call. A dedicated tool may be added in a follow-on plan; until then, the status string is the canonical carrier. -->
|
|
45
|
-
|
|
46
|
-
After the parallelism decision is made:
|
|
47
|
-
- Call `mcp__gdd_state__update_progress` with `task_progress: "<current>/<total>"` and `status: "plan_parallelism_decided: batch_size=<N>, reason=<short-reason>"`.
|
|
48
|
-
|
|
49
|
-
## Probe Chromatic connection
|
|
50
|
-
|
|
51
|
-
Run at stage entry, after reading STATE.md:
|
|
52
|
-
|
|
53
|
-
Step C1 - CLI presence:
|
|
54
|
-
Bash: command -v chromatic 2>/dev/null || npx chromatic `--version` 2>/dev/null
|
|
55
|
-
-> found -> proceed to Step C2
|
|
56
|
-
-> not found -> chromatic: not_configured (skip all Chromatic steps)
|
|
57
|
-
|
|
58
|
-
Step C2 - Token check:
|
|
59
|
-
Bash: test -n "${CHROMATIC_PROJECT_TOKEN}"
|
|
60
|
-
-> true -> chromatic: available
|
|
61
|
-
-> false -> chromatic: unavailable
|
|
62
|
-
|
|
63
|
-
Also check: if storybook: not_configured -> chromatic effectively unavailable (emit note, do not run).
|
|
64
|
-
|
|
65
|
-
Write chromatic status to STATE.md `<connections>` via `mcp__gdd_state__probe_connections` - pass the single-entry probe result (`[{ name: "chromatic", status: "<verdict>" }]`). Do not edit `<connections>` directly.
|
|
66
|
-
|
|
67
|
-
## Chromatic Change-Risk Scoping (when chromatic: available)
|
|
68
|
-
|
|
69
|
-
Before writing DESIGN-PLAN.md, if chromatic: available:
|
|
70
|
-
1. Identify token/component files to be changed (from DESIGN-CONTEXT.md scope)
|
|
71
|
-
2. Run: Bash: npx chromatic `--project-token` $CHROMATIC_PROJECT_TOKEN `--trace-changed=expanded` `--dry-run` 2>&1
|
|
72
|
-
3. Parse output - count story files that depend on changed source files
|
|
73
|
-
4. Pass story count to design-planner.md (see design-planner.md Chromatic Change-Risk section)
|
|
74
|
-
If unavailable: design-planner proceeds without story-count annotation.
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## Step 1 - Optional Research (skip if auto_mode)
|
|
79
|
-
|
|
80
|
-
Complexity heuristic: if DESIGN-CONTEXT.md `<domain>` spans 3+ scopes OR `<decisions>` count > 6 -> spawn design-phase-researcher. Otherwise skip.
|
|
81
|
-
|
|
82
|
-
If spawning:
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
Task("design-phase-researcher", """
|
|
86
|
-
<required_reading>
|
|
87
|
-
@.design/STATE.md
|
|
88
|
-
@.design/DESIGN-CONTEXT.md
|
|
89
|
-
</required_reading>
|
|
90
|
-
|
|
91
|
-
You are the design-phase-researcher agent. Identify the project type from DESIGN-CONTEXT.md
|
|
92
|
-
and research relevant design patterns, pitfalls, and stack-specific conventions.
|
|
93
|
-
|
|
94
|
-
Output file: .design/DESIGN-RESEARCH.md
|
|
95
|
-
Target: ~100 lines, ~2 min budget.
|
|
96
|
-
|
|
97
|
-
Emit `## RESEARCH COMPLETE` when done.
|
|
98
|
-
""")
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Wait for `## RESEARCH COMPLETE`. Call `mcp__gdd_state__update_progress` with `task_progress: "1/3"` and a short `status` summary.
|
|
102
|
-
|
|
103
|
-
## Step 1.5 - Pattern Mapping (mandatory, brownfield protection)
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
Task("design-pattern-mapper", """
|
|
107
|
-
<required_reading>
|
|
108
|
-
@.design/STATE.md
|
|
109
|
-
@.design/DESIGN-CONTEXT.md
|
|
110
|
-
@reference/audit-scoring.md
|
|
111
|
-
</required_reading>
|
|
112
|
-
|
|
113
|
-
You are design-pattern-mapper. Grep the codebase for existing design patterns
|
|
114
|
-
(color tokens, spacing scale, typography conventions, component styling) and
|
|
115
|
-
write .design/DESIGN-PATTERNS.md. Classify by design concern — NOT by code
|
|
116
|
-
architecture (no controllers, services, middleware vocabulary).
|
|
117
|
-
|
|
118
|
-
Output file: .design/DESIGN-PATTERNS.md
|
|
119
|
-
Emit `## MAPPING COMPLETE` when done.
|
|
120
|
-
""")
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Wait for `## MAPPING COMPLETE`. Call `mcp__gdd_state__update_progress` with `task_progress: "1/3"` and a short `status` summary.
|
|
124
|
-
|
|
125
|
-
## Step 1.6 - Assumptions Analysis (optional, same flag as research)
|
|
126
|
-
|
|
127
|
-
If assumptions analysis enabled (skip if auto_mode):
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
Task("design-assumptions-analyzer", """
|
|
131
|
-
<required_reading>
|
|
132
|
-
@.design/STATE.md
|
|
133
|
-
@.design/DESIGN-CONTEXT.md
|
|
134
|
-
@.design/DESIGN-PATTERNS.md
|
|
135
|
-
</required_reading>
|
|
136
|
-
|
|
137
|
-
You are design-assumptions-analyzer. Surface hidden design assumptions with
|
|
138
|
-
confidence levels and evidence citations.
|
|
139
|
-
|
|
140
|
-
Emit `## ANALYSIS COMPLETE` when done.
|
|
141
|
-
""")
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
Wait for `## ANALYSIS COMPLETE`.
|
|
145
|
-
|
|
146
|
-
## Step 1.7 - Synthesize pre-plan research inputs (Plan 10.1-04, D-13/D-15)
|
|
147
|
-
|
|
148
|
-
If 2+ of the pre-plan research agents ran (`design-phase-researcher` Step 1, `design-pattern-mapper` Step 1.5, `design-assumptions-analyzer` Step 1.6), invoke synthesize to merge their outputs into a single compact brief. If only one ran, skip this step.
|
|
149
|
-
|
|
150
|
-
Skill("synthesize", {
|
|
151
|
-
outputs: [
|
|
152
|
-
(if Step 1 ran) "=== from design-phase-researcher ===\n" + <read .design/DESIGN-RESEARCH.md>,
|
|
153
|
-
(if Step 1.5 ran) "=== from design-pattern-mapper ===\n" + <read .design/DESIGN-PATTERNS.md>,
|
|
154
|
-
(if Step 1.6 ran) "=== from design-assumptions-analyzer ===\n" + <read .design/DESIGN-ASSUMPTIONS.md>
|
|
155
|
-
],
|
|
156
|
-
directive: "Merge into a single compact pre-plan brief. Preserve per-source section headers so the planner can trace provenance. Consolidate duplicate recommendations with source tags. Target ~150 lines.",
|
|
157
|
-
output_shape: "markdown"
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
Wait for `## SYNTHESIS COMPLETE`. Write to `.design/DESIGN-PREPLAN-BRIEF.md` (overwrite if present). Add `@.design/DESIGN-PREPLAN-BRIEF.md` to the planner's `<required_reading>` in Step 2 - individual files remain on disk for drill-down.
|
|
161
|
-
|
|
162
|
-
**Parallel synthesizer note (future):** if a future plan variant spawns N parallel phase-researchers (e.g., one per project-type family), wire synthesize the same way as `skills/map/` Step 3.5.
|
|
163
|
-
|
|
164
|
-
## Research-synthesis persistence (decisions + must-haves)
|
|
165
|
-
|
|
166
|
-
When the synthesizer (design-phase-researcher / design-pattern-mapper / design-assumptions-analyzer) produces D-XX decisions and M-XX must-haves, persist each one through MCP instead of editing STATE.md directly.
|
|
167
|
-
|
|
168
|
-
For each D-XX decision the synthesizer produces:
|
|
169
|
-
- Call `mcp__gdd_state__add_decision` with `{ id: "D-XX", text: "...", status: "locked"|"tentative" }`.
|
|
170
|
-
|
|
171
|
-
For each M-XX must-have the synthesizer produces:
|
|
172
|
-
- Call `mcp__gdd_state__add_must_have` with `{ id: "M-XX", text: "...", status: "pending" }`.
|
|
173
|
-
|
|
174
|
-
Issue these sequentially. Each call is event-emitting and lockfile-safe. Parallel issuance would serialize on the STATE.md lockfile with no throughput gain.
|
|
175
|
-
|
|
176
|
-
## Step 2 - Plan
|
|
177
|
-
|
|
178
|
-
```
|
|
179
|
-
Task("design-planner", """
|
|
180
|
-
<required_reading>
|
|
181
|
-
@.design/STATE.md
|
|
182
|
-
@.design/DESIGN-CONTEXT.md
|
|
183
|
-
@reference/audit-scoring.md
|
|
184
|
-
@.design/DESIGN-PATTERNS.md
|
|
185
|
-
[@.design/DESIGN-RESEARCH.md — only include if research step ran]
|
|
186
|
-
[@.design/DESIGN-ASSUMPTIONS.md — only include if assumptions analysis ran]
|
|
187
|
-
[@.design/DESIGN-PREPLAN-BRIEF.md — include if Step 1.7 synthesize ran; planner prefers this compact brief over the individual files above]
|
|
188
|
-
[@.design/sketches/*/WINNER.md — include all completed sketch winners if present]
|
|
189
|
-
[@.design/spikes/*/FINDINGS.md — include all completed spike findings if present]
|
|
190
|
-
[@./.claude/skills/design-*-conventions.md — include all project-local design conventions if present]
|
|
191
|
-
[@~/.claude/gdd/global-skills/*.md — include all global skills if directory exists; global conventions inform but do not override project-local D-XX decisions]
|
|
192
|
-
</required_reading>
|
|
193
|
-
|
|
194
|
-
You are the design-planner agent. Read DESIGN-CONTEXT.md and produce .design/DESIGN-PLAN.md
|
|
195
|
-
with wave-ordered tasks, acceptance criteria, and (if parallel mode) Touches:/Parallel: fields.
|
|
196
|
-
|
|
197
|
-
Context:
|
|
198
|
-
- Pipeline stage: plan
|
|
199
|
-
- auto_mode: <true|false>
|
|
200
|
-
- parallel_mode: <true|false>
|
|
201
|
-
|
|
202
|
-
Output file: .design/DESIGN-PLAN.md
|
|
203
|
-
Format: per agents/design-planner.md Output Format section.
|
|
204
|
-
|
|
205
|
-
Emit `## PLANNING COMPLETE` when done.
|
|
206
|
-
""")
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
Wait for `## PLANNING COMPLETE`. Call `mcp__gdd_state__update_progress` with `task_progress: "2/3"` and a short `status` summary.
|
|
210
|
-
|
|
211
|
-
## Step 3 - Check
|
|
212
|
-
|
|
213
|
-
```
|
|
214
|
-
Task("design-plan-checker", """
|
|
215
|
-
<required_reading>
|
|
216
|
-
@.design/STATE.md
|
|
217
|
-
@.design/DESIGN-PLAN.md
|
|
218
|
-
@.design/DESIGN-CONTEXT.md
|
|
219
|
-
</required_reading>
|
|
220
|
-
|
|
221
|
-
You are the design-plan-checker agent. Validate DESIGN-PLAN.md will achieve DESIGN-CONTEXT.md
|
|
222
|
-
brief goals across 5 dimensions: requirement coverage, task completeness, wave ordering,
|
|
223
|
-
must-have derivation, auto mode compliance.
|
|
224
|
-
|
|
225
|
-
Context:
|
|
226
|
-
- auto_mode: <true|false>
|
|
227
|
-
|
|
228
|
-
Output: structured result as response text (no file). Start with `## PLAN CHECK RESULT: PASS`
|
|
229
|
-
or `## PLAN CHECK RESULT: ISSUES FOUND`.
|
|
230
|
-
|
|
231
|
-
Emit `## PLAN CHECK COMPLETE` when done.
|
|
232
|
-
""")
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
Wait for `## PLAN CHECK COMPLETE`. Call `mcp__gdd_state__update_progress` with `task_progress: "3/3"` and a short `status` summary.
|
|
236
|
-
|
|
237
|
-
If `## PLAN CHECK RESULT: ISSUES FOUND` and any BLOCKER issues:
|
|
238
|
-
- Present issues to user and offer: (a) revise plan now - re-spawn design-planner with issue list, (b) accept and proceed, (c) abort.
|
|
239
|
-
- If auto_mode: auto-accept WARNING issues, abort on BLOCKER issues.
|
|
240
|
-
|
|
241
|
-
## Stage exit
|
|
242
|
-
|
|
243
|
-
1. Call `mcp__gdd_state__set_status` with `status: "plan_complete"`.
|
|
244
|
-
2. Call `mcp__gdd_state__checkpoint` to stamp `last_checkpoint` and finalize the plan stage.
|
|
245
|
-
|
|
246
|
-
The next stage (design) calls `mcp__gdd_state__transition_stage` on entry - this skill does NOT issue the transition itself, preserving the stage-owned-transition discipline established by brief->explore and explore->plan.
|
|
247
|
-
|
|
248
|
-
## After Completion
|
|
249
|
-
|
|
250
|
-
Print user-facing summary:
|
|
251
|
-
- Plan tasks: N waves, M total tasks
|
|
252
|
-
- Files: .design/DESIGN-PLAN.md (and .design/DESIGN-RESEARCH.md if research ran)
|
|
253
|
-
- Next: `/get-design-done:design` to execute the plan
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## Exploration artifacts & project-local conventions
|
|
258
|
-
|
|
259
|
-
When building the planner spawn prompt, also glob for:
|
|
260
|
-
- `.design/sketches/*/WINNER.md` - winning sketch rationale (informs directional tasks)
|
|
261
|
-
- `.design/spikes/*/FINDINGS.md` - spike verdicts (inform task feasibility)
|
|
262
|
-
- `./.claude/skills/design-*-conventions.md` - project-local design conventions
|
|
263
|
-
|
|
264
|
-
Include each matching file in `<files_to_read>` / `<required_reading>` so the planner sees them when creating tasks. Spike findings from `.design/spikes/` inform task feasibility; sketch winners inform directional choice; project-local conventions override defaults.
|
|
265
|
-
|
|
266
|
-
## `--research` mode (removed)
|
|
267
|
-
|
|
268
|
-
V2-04 deferred the `--research` flag. Rationale: complexity of an additional
|
|
269
|
-
agent spawn + Context7 integration outweighs the benefit of discover-stage
|
|
270
|
-
auto-detect for most projects. Use /discover's Auto Mode for research-assisted
|
|
271
|
-
discovery instead.
|
|
272
|
-
|
|
273
|
-
The optional research step that already exists (Step 1, triggered by complexity
|
|
274
|
-
heuristic: 3+ domain scopes OR 6+ decisions) covers the core use case without
|
|
275
|
-
a separate CLI flag.
|
|
276
|
-
|
|
277
|
-
If `--research` is reintroduced in a future version, define its scope in
|
|
278
|
-
ROADMAP.md V2+ and update this section.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gdd-plant-seed
|
|
3
|
-
description: "Forward-looking design idea with a trigger condition. Seeds surface automatically when trigger is met. Writes to .design/SEEDS.md."
|
|
4
|
-
argument-hint: "[--trigger <condition>] [text]"
|
|
5
|
-
tools: Read, Write, AskUserQuestion
|
|
6
|
-
disable-model-invocation: true
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# /gdd:plant-seed
|
|
10
|
-
|
|
11
|
-
**Role:** Capture an idea that is too early to act on now but should surface when a future condition is met. Backing store: `.design/SEEDS.md`.
|
|
12
|
-
|
|
13
|
-
## Step 1 - Gather inputs
|
|
14
|
-
|
|
15
|
-
- `<text>`: free-text idea. If empty, ask the user: "What's the seed idea?"
|
|
16
|
-
- `--trigger <condition>`: the surfacing condition. If missing, ask: "What trigger condition should surface this idea? (e.g., 'when we add dark mode', 'when the nav component is redesigned', 'at next cycle start')"
|
|
17
|
-
|
|
18
|
-
## Step 2 - Append to .design/SEEDS.md
|
|
19
|
-
|
|
20
|
-
Create the file with `# Design Seeds` header if missing. Append:
|
|
21
|
-
|
|
22
|
-
```markdown
|
|
23
|
-
## Seed: <first 60 chars of text>
|
|
24
|
-
**Trigger**: <condition>
|
|
25
|
-
**Planted**: YYYY-MM-DD
|
|
26
|
-
**Status**: dormant
|
|
27
|
-
|
|
28
|
-
<full text>
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Step 3 - Surfacing contract
|
|
34
|
-
|
|
35
|
-
Seeds are surfaced automatically by `/gdd:progress` and `/gdd:health`. Those commands do a keyword match of each seed's trigger text against current STATE.md + `.design/CYCLES.md` content and print any matches as `Seed ready to germinate: <text>`.
|
|
36
|
-
|
|
37
|
-
This skill does NOT surface seeds itself - it only plants them.
|
|
38
|
-
|
|
39
|
-
## Output
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
━━━ Seed planted ━━━
|
|
43
|
-
Trigger: when we add dark mode
|
|
44
|
-
Status: dormant
|
|
45
|
-
━━━━━━━━━━━━━━━━━━━━
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## PLANT-SEED COMPLETE
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gdd-pr-branch
|
|
3
|
-
description: "Create a clean PR branch by filtering out .design/ and .planning/ commits. Code-review-ready branch for the design implementation work."
|
|
4
|
-
argument-hint: "[<base-branch>]"
|
|
5
|
-
tools: Read, Write, Bash
|
|
6
|
-
disable-model-invocation: true
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# /gdd:pr-branch
|
|
10
|
-
|
|
11
|
-
Produces a branch that contains only code changes (under `src/`) so reviewers are not forced to read through `.design/` planning churn.
|
|
12
|
-
|
|
13
|
-
## Steps
|
|
14
|
-
|
|
15
|
-
1. **Determine base**: Use the argument if provided; otherwise read the current branch's merge base with `main` via `git merge-base HEAD main`.
|
|
16
|
-
2. **List commits**: `git log --oneline <base>..HEAD` via Bash.
|
|
17
|
-
3. **Classify each commit**: For each SHA, run `git show --name-only <sha>` and inspect the changed paths:
|
|
18
|
-
- **code-only**: all paths under `src/` (or other code dirs, not `.design/` / `.planning/`) → include
|
|
19
|
-
- **design-only**: all paths under `.design/` or `.planning/` → skip
|
|
20
|
-
- **mixed**: both kinds → include and log a note
|
|
21
|
-
4. **Get cycle name**: Read `.design/STATE.md` for the current `cycle:` ID (default `cycle-1`).
|
|
22
|
-
5. **Create branch**: `git checkout -b pr/<cycle>-clean <base>`.
|
|
23
|
-
6. **Cherry-pick**: For every included SHA (in original order), run `git cherry-pick <sha>`. On conflict, abort the whole operation with a clear message and reset to the pre-op branch.
|
|
24
|
-
7. **Print summary**: "PR branch `pr/<cycle>-clean` created with <N> commits. `.design/` and `.planning/` commits excluded. Mixed commits flagged: <list>."
|
|
25
|
-
|
|
26
|
-
## Do Not
|
|
27
|
-
|
|
28
|
-
- Do not rewrite history on the original branch.
|
|
29
|
-
- Do not include `.design/` or `.planning/` paths - if a mixed commit contains them, the cherry-pick carries them through, but reviewers are warned.
|
|
30
|
-
- Do not push the branch automatically - let `/gdd:ship` or the user push.
|
|
31
|
-
|
|
32
|
-
## PR-BRANCH COMPLETE
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gdd-progress
|
|
3
|
-
description: "Shows current pipeline position and routes to next action. --forensic runs 6-check integrity audit. Activates for requests involving showing current project state, routing to the next action, or a status check."
|
|
4
|
-
argument-hint: "[--forensic]"
|
|
5
|
-
tools: Read, Bash, Grep, Glob, mcp__gdd_state__get, mcp__gdd_status, mcp__gdd_phase_current
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
@reference/retrieval-contract.md
|
|
9
|
-
|
|
10
|
-
# /gdd:progress
|
|
11
|
-
|
|
12
|
-
**Role:** Show current position in the pipeline and recommend the next action. With `--forensic`, run a 6-check integrity audit.
|
|
13
|
-
|
|
14
|
-
## Step 1 - Read state
|
|
15
|
-
|
|
16
|
-
Two paths - MCP preferred when available, file-read fallback otherwise.
|
|
17
|
-
|
|
18
|
-
### MCP path (preferred)
|
|
19
|
-
|
|
20
|
-
When the harness exposes `mcp__gdd_status` (Phase 27.7+, registered via `npx @hegemonart/get-design-done --register-mcp`):
|
|
21
|
-
|
|
22
|
-
1. Call `mcp__gdd_status` (no args). Returns `{phase, branch, last_decisions, last_completed_plans, blocker_count}` in one call.
|
|
23
|
-
2. If you need `stage` / `task_progress` for the output line, call `mcp__gdd_phase_current` (no args). Returns `{phase, stage, task_progress, status}`.
|
|
24
|
-
3. Skip to Step 2.
|
|
25
|
-
|
|
26
|
-
This path loads the full priming context in 1–2 MCP calls (~3s, ~32k tokens - Storybloq benchmark).
|
|
27
|
-
|
|
28
|
-
### File-read path (fallback)
|
|
29
|
-
|
|
30
|
-
When MCP tools are not available, fall back to the legacy flow:
|
|
31
|
-
|
|
32
|
-
1. Call `mcp__gdd_state__get` if exposed (Phase 20 STATE.md mutator MCP) → parsed state object. Otherwise, `Read .design/STATE.md` and parse the frontmatter + `<position>`, `<decisions>`, `<plans>` sections.
|
|
33
|
-
2. Extract: `stage`, `cycle`, `last_checkpoint`, `task_progress`, `status`, `decisions.length`, open todos from `.design/TODO.md` (count unchecked `- [ ]` - outside the MCP catalog, so `Read` is still used).
|
|
34
|
-
3. If STATE.md is missing, print: "No pipeline state. Run `/gdd:brief` first." and stop.
|
|
35
|
-
|
|
36
|
-
This path loads the same context in 5–10 file reads (~100s, ~46.5k tokens - file-reading baseline).
|
|
37
|
-
|
|
38
|
-
## Step 2 - Default output
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
━━━ Pipeline state ━━━
|
|
42
|
-
Stage: <stage> Cycle: <cycle or "default"> Wave: <wave>
|
|
43
|
-
Last checkpoint: <timestamp>
|
|
44
|
-
Decisions: <N> Open todos: <N>
|
|
45
|
-
Next: /gdd:<next-stage>
|
|
46
|
-
━━━━━━━━━━━━━━━━━━━━━━
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Recommend next stage via the same logic as `/gdd:next` (route by which artifacts exist).
|
|
50
|
-
|
|
51
|
-
### First-run connection nudge
|
|
52
|
-
|
|
53
|
-
After the pipeline state block, if every `<connections>` entry from the snapshot is `not_configured` AND `.design/config.json > connections_onboarding` is absent, append once per session (transient marker `.design/.connections-nudge-shown`): `Tip: run /gdd:connections to see what integrations can plug in (Figma, Storybook, Chromatic, etc.).`
|
|
54
|
-
|
|
55
|
-
## Step 3 - Forensic audit (only if `--forensic`)
|
|
56
|
-
|
|
57
|
-
Run these six checks and print PASS/WARN/FAIL per check:
|
|
58
|
-
|
|
59
|
-
1. **Stale artifacts** - compare mtime of `.design/DESIGN.md` against most recent file under `src/` via `ls -lt`. WARN if DESIGN.md is older by >7 days.
|
|
60
|
-
2. **Missing transitions** - `stage` from the `mcp__gdd_state__get` snapshot vs artifacts present. e.g. stage=`plan` requires DESIGN-CONTEXT.md. FAIL if expected artifact missing.
|
|
61
|
-
3. **Token drift** - `wc -c .design/DESIGN.md .design/DESIGN-CONTEXT.md`; tokens ≈ bytes/4. WARN if combined >50000 tokens.
|
|
62
|
-
4. **Aged DESIGN-DEBT** - read `.design/DESIGN-DEBT.md`; any item whose line predates HEAD by >14 days (check `git blame` or file mtime fallback) → WARN.
|
|
63
|
-
5. **Cycle alignment** - if `cycle` from the snapshot is set but `.design/CYCLES.md` has no matching heading → FAIL.
|
|
64
|
-
6. **Connection status** - re-probe figma/refero via ToolSearch; compare to the `<connections>` field in the snapshot. WARN on mismatch.
|
|
65
|
-
|
|
66
|
-
Also scan `.design/SEEDS.md` (if present) for seeds whose trigger keywords match the snapshot or CYCLES.md content; list them as "Seed ready to germinate: <text>".
|
|
67
|
-
|
|
68
|
-
Print:
|
|
69
|
-
```
|
|
70
|
-
━━━ Forensic audit ━━━
|
|
71
|
-
[PASS] Stale artifacts
|
|
72
|
-
[WARN] Token drift — 53,400 tokens combined
|
|
73
|
-
[PASS] Missing transitions
|
|
74
|
-
[PASS] Aged DESIGN-DEBT
|
|
75
|
-
[PASS] Cycle alignment
|
|
76
|
-
[WARN] Connection status — figma now unavailable
|
|
77
|
-
Seeds ready: 0
|
|
78
|
-
━━━━━━━━━━━━━━━━━━━━━━
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Step 3.5 - Composition-graph readiness
|
|
82
|
-
|
|
83
|
-
After the pipeline state (and forensic audit if run), surface a one-line composition-graph hint from `scripts/lib/manifest/skills.json`. Count skill records declaring `composes_with` or `next_skills`, then probe for structural problems (cycles in the directed graph, or edges pointing at a skill name that has no record). Print one line:
|
|
84
|
-
|
|
85
|
-
- `Composition graph: <edges> edges, <skills-with-edges> skills wired | cycles: <n> | dangling: <n>`
|
|
86
|
-
|
|
87
|
-
Run `scripts/validate-composition-graph.cjs` for the authoritative cycle and dangling-edge counts when that validator is present; until then report `0` and note the graph is not yet wired. This is a readiness hint, not a gate.
|
|
88
|
-
|
|
89
|
-
## Step 3.6 - DesignContext graph coverage
|
|
90
|
-
|
|
91
|
-
When `.design/context-graph.json` exists, surface one line for the typed DesignContext graph using the `coverage` helper in `scripts/lib/design-context-query.cjs` (`node scripts/lib/design-context-query.cjs coverage`), then point at the Atomic-Design map: `DesignContext graph: <pct>% node-type coverage | map: .design/INTEGRATION-MAP.md`. Skip this line entirely when the graph is absent (a pre-Phase-52 project); offer `/gdd:migrate-context` as the next step instead. Readiness hint, not a gate.
|
|
92
|
-
|
|
93
|
-
## Step 4 - Update notice (safe-window surface)
|
|
94
|
-
|
|
95
|
-
After printing the pipeline state, emit the plugin-update banner if one is present. This file is written by `hooks/update-check.sh` subject to the state-machine guard (mid-pipeline stages suppress it) and per-version dismissal.
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
[ -f .design/update-available.md ] && cat .design/update-available.md
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
No-op when: no new release exists, state-machine guard is active (stage in plan|design|verify), or the latest tag has been dismissed via `/gdd:check-update --dismiss`.
|
|
102
|
-
|
|
103
|
-
## Do Not
|
|
104
|
-
|
|
105
|
-
- Do not mutate STATE.md - this skill is read-only. Only `mcp__gdd_state__get` is permitted.
|
|
106
|
-
|
|
107
|
-
## PROGRESS COMPLETE
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: quality-gate
|
|
3
|
-
description: "Stage 4.5 of the pipeline. Detects, runs, and classifies project quality commands (lint / typecheck / test / visual-regression) between /gdd:design and /gdd:verify; writes the most recent run to STATE.md <quality_gate>. Non-blocking on timeout (warn + proceed); failures spawn design-fixer until the loop converges or max_iters is reached."
|
|
4
|
-
tools: Read, Write, Edit, Bash, Grep, Glob, Task
|
|
5
|
-
color: amber
|
|
6
|
-
model: inherit
|
|
7
|
-
default-tier: haiku
|
|
8
|
-
size_budget: M
|
|
9
|
-
parallel-safe: conditional-on-touches
|
|
10
|
-
typical-duration-seconds: 180
|
|
11
|
-
reads-only: false
|
|
12
|
-
writes:
|
|
13
|
-
- ".design/STATE.md"
|
|
14
|
-
- ".design/events.jsonl"
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
@reference/shared-preamble.md
|
|
18
|
-
|
|
19
|
-
# quality-gate
|
|
20
|
-
|
|
21
|
-
## Role
|
|
22
|
-
|
|
23
|
-
You are the Stage 4.5 gate that runs between `/gdd:design` and `/gdd:verify`. You answer one question: *does this project's own quality tooling pass against the current working tree?* You are NOT a design checker, an a11y checker, or a verifier - you are a thin façade over the project's `lint` / `typecheck` / `test` / visual-regression scripts. Verify refuses entry when those scripts fail.
|
|
24
|
-
|
|
25
|
-
You write exactly two artifacts: the `<quality_gate>` block in `.design/STATE.md`, and lifecycle events to `.design/events.jsonl`. You never block on timeout. You never block on a "skipped" result. You only mark `status="fail"` when the fix loop reaches `max_iters` - even then YOU exit successfully (verify is the consumer that refuses entry).
|
|
26
|
-
|
|
27
|
-
## Configuration
|
|
28
|
-
|
|
29
|
-
Read once at start from `.design/config.json` (all optional; defaults in parens):
|
|
30
|
-
|
|
31
|
-
| Key | Default | Purpose |
|
|
32
|
-
|-----|---------|---------|
|
|
33
|
-
| `quality_gate.commands` | `null` | Authoritative command list. When provided, skips auto-detection. |
|
|
34
|
-
| `quality_gate.timeout_seconds` | `600` | Total wall-clock budget for Step 2. On timeout: warn + proceed (D-07). |
|
|
35
|
-
| `quality_gate.max_iters` | `3` | Hard cap on Step 4 fix-loop iterations. |
|
|
36
|
-
|
|
37
|
-
## Step 1 - Detection chain (D-06 3-tier fallback)
|
|
38
|
-
|
|
39
|
-
Stop at the first tier that produces ≥ 1 command:
|
|
40
|
-
|
|
41
|
-
1. **Authoritative config.** If `.design/config.json` has `quality_gate.commands` non-empty, use verbatim.
|
|
42
|
-
2. **Auto-detect from `package.json#scripts`** - match against allowlist: `lint`, `typecheck`, `tsc` (only if `typecheck` absent), `test`, `chromatic`, `test:visual`, `lint:design` (Phase 41 - the `gdd-detect` deterministic anti-pattern gate), and the accessibility scripts `axe`, `pa11y`, `lighthouse`, `eslint-plugin-jsx-a11y` (or a script named `jsx-a11y`) which classify into the `a11y` bucket. Exclude by name: `test:e2e`, `test:integration` (if separate `test`), anything starting `dev:`, `build:`, `start:`. Run via `npm run <name>` unless `quality_gate.package_manager` overrides.
|
|
43
|
-
3. **Skip with notice.** Emit `quality_gate_skipped` (Step 6) and write a `<run/>` with `status="skipped"`. Verify treats skipped as non-blocking.
|
|
44
|
-
|
|
45
|
-
## Step 2 - Parallel run
|
|
46
|
-
|
|
47
|
-
Emit `quality_gate_started`. Spawn each command in a separate `Bash`; collect `{command, exit_code, stdout, stderr}`. Wall-clock budget is `timeout_seconds` (default 600). On timeout: emit `quality_gate_timeout`, mark `status="timeout"`, skip Steps 3–4, proceed to Step 5. Exit successfully - verify treats timeout as a warn.
|
|
48
|
-
|
|
49
|
-
## Step 3 - Classification
|
|
50
|
-
|
|
51
|
-
Spawn `quality-gate-runner` agent via `Task` with payload `{outputs: [{command, exit_code, stderr}, ...]}`. Agent returns `{status: "pass"|"fail", classified_failures: {lint, type, test, visual, a11y}}`. The `a11y` bucket groups accessibility failures from axe / pa11y / lighthouse / jsx-a11y. `pass` → Step 5. `fail` → Step 4.
|
|
52
|
-
|
|
53
|
-
## Step 4 - Fix loop (D-08)
|
|
54
|
-
|
|
55
|
-
If `iteration >= max_iters`: emit `quality_gate_fail`, mark `status="fail"`, Step 5, exit successfully. Verify-entry refuses on `fail`; YOU do not throw.
|
|
56
|
-
|
|
57
|
-
Else: increment `iteration`, emit `quality_gate_iteration`, spawn `design-fixer` via `Task` with classified failures + original outputs. After fixer returns, restart from Step 2 (re-run all commands - fixes can introduce regressions).
|
|
58
|
-
|
|
59
|
-
## Step 5 - STATE write
|
|
60
|
-
|
|
61
|
-
Mutate `state.quality_gate.run` to `{started_at, completed_at, status, iteration, commands_run, extra_attrs:{}}`. Persist via `mcp__gdd_state__set_quality_gate` or `apply()` mutator from `sdk/state/mutator.ts` - identical on-disk shape.
|
|
62
|
-
|
|
63
|
-
## Step 6 - Event emission (D-09)
|
|
64
|
-
|
|
65
|
-
Use `appendEvent` from `sdk/event-stream/index.ts` - persist-first / broadcast-second; never throws on persist path. `ts` / `cycle` / `stage` are stamped by the writer. Six event types (one per lifecycle position):
|
|
66
|
-
|
|
67
|
-
| Event | When | Payload |
|
|
68
|
-
|-------|------|---------|
|
|
69
|
-
| `quality_gate_started` | Step 2 entry, once | `commands`, `timeout_seconds`, `max_iters` |
|
|
70
|
-
| `quality_gate_iteration` | Step 4 retry (iter ≥ 2) | `iteration` |
|
|
71
|
-
| `quality_gate_pass` | Step 3 returned pass - terminal | `iteration`, `commands_run` |
|
|
72
|
-
| `quality_gate_fail` | Step 4 hit `max_iters` - terminal | `iteration`, `classified_failures` |
|
|
73
|
-
| `quality_gate_timeout` | Step 2 budget elapsed - terminal warn | `unfinished_commands` |
|
|
74
|
-
| `quality_gate_skipped` | Step 1 tier 3 - terminal no-op | `reason` |
|
|
75
|
-
|
|
76
|
-
`appendEvent` swallows persist failures - events are observability, not correctness. STATE.md (Step 5) is the durable record.
|
|
77
|
-
|
|
78
|
-
## Output
|
|
79
|
-
|
|
80
|
-
Emit one JSON object on stdout: `{status, iteration, commands_run, started_at, completed_at}`. Shell exit code `0` on every terminal status - `fail` included. Verify-entry is the sole consumer that acts on `fail`.
|
|
81
|
-
|
|
82
|
-
## Constraints
|
|
83
|
-
|
|
84
|
-
- Do not prune the command list across iterations - re-run everything in Step 2.
|
|
85
|
-
- Do not spawn `quality-gate-runner` more than once per iteration.
|
|
86
|
-
- Do not read/write any STATE block other than `<quality_gate>` (and `<position>.last_checkpoint`).
|
|
87
|
-
- Do not invoke verify or design - Stage 4.5 sits strictly between.
|
|
88
|
-
- Exit-code convention: `0` clean; non-zero classified as failure. Do not interpret stderr for pass/fail.
|
|
89
|
-
|
|
90
|
-
For verify-side severity classification (when this gate's `status="fail"` reaches the verify entry gate), see `./threat-modeling.md` - STRIDE dispositions are the audit-side framework that informs whether a failed quality gate blocks ship.
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: threat-modeling
|
|
3
|
-
type: heuristic
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
phase: 28.5
|
|
6
|
-
tags: [threat-modeling, stride, audit, security, trust-boundary, disposition]
|
|
7
|
-
last_updated: 2026-05-18
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Threat Modeling
|
|
11
|
-
|
|
12
|
-
Audit-side STRIDE / threat-modeling reference. Centralizes the categories, trust-boundary
|
|
13
|
-
identification heuristics, and disposition framework (mitigate / accept / transfer) so
|
|
14
|
-
consumer skills can cross-link rather than inline. Extracted as part of Phase 28.5 from
|
|
15
|
-
inline content in `skills/quality-gate/SKILL.md` (the four-tier classification) and the
|
|
16
|
-
shared verifier / audit family. See `./audit-scoring.md` for the design-side scoring
|
|
17
|
-
framework, which uses STRIDE as one of its lenses.
|
|
18
|
-
|
|
19
|
-
## When to use
|
|
20
|
-
|
|
21
|
-
Apply STRIDE during:
|
|
22
|
-
|
|
23
|
-
- **Verify entry** (Stage 5) when the changeset touches a trust boundary (auth, ingress,
|
|
24
|
-
deserialization, subprocess spawn).
|
|
25
|
-
- **Audit pillar runs** when a heuristic flags potential security surface.
|
|
26
|
-
- **Plan-phase risk-register population** when the plan touches user input, network
|
|
27
|
-
endpoints, file IO from user paths, or persisted state.
|
|
28
|
-
- **Threat register on plans that ship new endpoints** - assign one of {mitigate, accept,
|
|
29
|
-
transfer} to every identified threat before the plan ships.
|
|
30
|
-
|
|
31
|
-
## STRIDE categories
|
|
32
|
-
|
|
33
|
-
| Letter | Threat | Audit lens |
|
|
34
|
-
|--------|-------------------------|----------------------------------------------------|
|
|
35
|
-
| S | Spoofing | Auth surfaces - login, session, token issuance |
|
|
36
|
-
| T | Tampering | Data integrity - write paths, persisted state |
|
|
37
|
-
| R | Repudiation | Audit trails / logging - proof of action |
|
|
38
|
-
| I | Information Disclosure | PII / secret leakage - logs, errors, side channels |
|
|
39
|
-
| D | Denial of Service | Resource exhaustion - unbounded loops, large reads |
|
|
40
|
-
| E | Elevation of Privilege | AuthZ bypass - role checks, capability tokens |
|
|
41
|
-
|
|
42
|
-
## Trust boundaries
|
|
43
|
-
|
|
44
|
-
A trust boundary is a point where untrusted input crosses into trusted code. Identify
|
|
45
|
-
trust boundaries before applying STRIDE - each boundary is one analysis sweep.
|
|
46
|
-
|
|
47
|
-
Identification heuristics:
|
|
48
|
-
|
|
49
|
-
- **Network ingress** - HTTP, gRPC, WebSocket, MCP transport, any TCP/UDP listen socket.
|
|
50
|
-
- **File reads from user-writable paths** - uploads, `$HOME` configs, user-supplied paths
|
|
51
|
-
from CLI args, drag-drop.
|
|
52
|
-
- **Subprocess spawns with user-supplied args** - `exec`/`spawn` where any argv element
|
|
53
|
-
is reachable from user input (URL params, env vars, config keys).
|
|
54
|
-
- **Deserialization of persisted format** - JSON, YAML, MsgPack, Protobuf, custom
|
|
55
|
-
formats. The deserializer is the boundary, regardless of where the bytes came from.
|
|
56
|
-
- **Third-party SDK callouts** - when gdd hands data to a peer-CLI, the data leaves the
|
|
57
|
-
trust boundary; treat the return path as untrusted on re-entry.
|
|
58
|
-
|
|
59
|
-
## Disposition framework
|
|
60
|
-
|
|
61
|
-
Every identified threat MUST carry a disposition before the plan ships. Three values:
|
|
62
|
-
|
|
63
|
-
| Disposition | When to use |
|
|
64
|
-
|-------------|------------------------------------------------------------------------------|
|
|
65
|
-
| Mitigate | Threat has both impact and likelihood; ASVS L1 requires the control. Build |
|
|
66
|
-
| | the control as part of the plan; cite the test that proves it. |
|
|
67
|
-
| Accept | Low impact AND low likelihood. Documented rationale in the threat register; |
|
|
68
|
-
| | no code change required. Re-visit if the threat-surface scope grows. |
|
|
69
|
-
| Transfer | Third-party owns the control surface (e.g., the OS, the runtime, a peer's |
|
|
70
|
-
| | sandbox). Document the boundary; do not re-implement the control. |
|
|
71
|
-
|
|
72
|
-
Mitigations on Plan tasks are correctness requirements - the executor applies Rule 2
|
|
73
|
-
(missing critical functionality) if a mitigation disposition is present but the
|
|
74
|
-
implementation lacks the control.
|
|
75
|
-
|
|
76
|
-
## Threat register schema
|
|
77
|
-
|
|
78
|
-
When a plan carries a `<threat_model>` block in its frontmatter, each entry follows:
|
|
79
|
-
|
|
80
|
-
```yaml
|
|
81
|
-
- id: T-01
|
|
82
|
-
category: spoofing # S, T, R, I, D, or E
|
|
83
|
-
surface: auth/login # path or component the threat hits
|
|
84
|
-
description: "<one-line description>"
|
|
85
|
-
disposition: mitigate # mitigate, accept, or transfer
|
|
86
|
-
control: "rate-limit + ASVS V2.2.1 password policy" # required when mitigate
|
|
87
|
-
rationale: "<why accept/transfer>" # required when accept/transfer
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Multiple threats per plan are normal. The disposition column is the essential field -
|
|
91
|
-
the executor scans it; the verifier scans it.
|
|
92
|
-
|
|
93
|
-
## Cross-references
|
|
94
|
-
|
|
95
|
-
- `./audit-scoring.md` - design-side audit-scoring rubric; STRIDE is one of its lenses.
|
|
96
|
-
- `./anti-patterns.md` - concrete anti-patterns mapped to STRIDE categories where
|
|
97
|
-
applicable (e.g., `eval`-on-user-input → Tampering + EoP).
|
|
98
|
-
- `./accessibility.md` - accessibility is the orthogonal lens; threat-modeling does not
|
|
99
|
-
cover it.
|
|
100
|
-
- ASVS (OWASP Application Security Verification Standard) - external authority for the
|
|
101
|
-
control catalog. Cited in plan threat-registers as `ASVS V<chapter>.<section>`.
|