@hegemonart/get-design-done 1.28.0 → 1.28.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 +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +78 -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/apply-reflections-procedure.md +68 -0
- package/reference/architecture-vocabulary.md +102 -0
- package/reference/cache-policy.md +126 -0
- package/reference/compare-rubric.md +171 -0
- package/reference/connections-onboarding.md +417 -0
- package/reference/context-md-format.md +106 -0
- package/reference/darkmode-audit-procedure.md +258 -0
- package/reference/debug-feedback-loops.md +119 -0
- package/reference/design-procedure.md +304 -0
- package/reference/discover-procedure.md +204 -0
- package/reference/explore-procedure.md +267 -0
- package/reference/health-mcp-detection.md +44 -0
- package/reference/health-skill-length-report.md +69 -0
- package/reference/heuristics.md +84 -0
- package/reference/milestone-completeness-rubric.md +87 -0
- package/reference/peer-cli-protocol.md +161 -0
- package/reference/plan-procedure.md +278 -0
- package/reference/registry.json +169 -1
- package/reference/registry.schema.json +1 -1
- package/reference/router-rules.md +84 -0
- package/reference/scan-procedure.md +731 -0
- package/reference/shared-preamble.md +78 -6
- package/reference/skill-authoring-contract.md +128 -0
- package/reference/start-procedure.md +115 -0
- package/reference/style-doc-procedure.md +150 -0
- package/reference/threat-modeling.md +101 -0
- package/reference/verify-procedure.md +512 -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/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/check-update/SKILL.md +38 -75
- package/skills/compare/SKILL.md +29 -269
- package/skills/complete-cycle/SKILL.md +1 -1
- package/skills/connections/SKILL.md +21 -427
- package/skills/continue/SKILL.md +1 -0
- package/skills/darkmode/SKILL.md +32 -287
- package/skills/debug/SKILL.md +11 -8
- package/skills/design/SKILL.md +27 -245
- package/skills/discover/SKILL.md +26 -133
- package/skills/discuss/SKILL.md +18 -2
- package/skills/explore/SKILL.md +40 -205
- package/skills/fast/SKILL.md +1 -0
- package/skills/figma-write/SKILL.md +2 -2
- package/skills/health/SKILL.md +11 -33
- 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/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-customize/SKILL.md +22 -42
- package/skills/peers/SKILL.md +33 -57
- package/skills/plan/SKILL.md +33 -220
- 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/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/scan/SKILL.md +36 -675
- 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/stats/SKILL.md +1 -0
- package/skills/style/SKILL.md +18 -140
- 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/warm-cache/SKILL.md +3 -35
- package/skills/zoom-out/SKILL.md +26 -0
|
@@ -1,11 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shared-preamble
|
|
3
|
+
type: preamble
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
phase: 28.5
|
|
6
|
+
tags: [shared, preamble, principles, design-quality, agent-import, cache-prefix, extracted]
|
|
7
|
+
last_updated: 2026-05-18
|
|
8
|
+
---
|
|
9
|
+
|
|
1
10
|
# GSD Agent Shared Preamble
|
|
2
11
|
|
|
3
|
-
> **This file is imported via `@reference/shared-preamble.md` as the first line of every agent body in `agents/*.md`. Its placement is load-bearing for Anthropic's 5-minute prompt cache (see
|
|
12
|
+
> **This file is imported via `@reference/shared-preamble.md` as the first line of every agent body in `agents/*.md`. Its placement is load-bearing for Anthropic's 5-minute prompt cache (see `./model-tiers.md` and Phase 10.1 decision D-08 Layer A): because every agent opens with the identical preamble prefix, the second and subsequent agent spawns in a session pay `cached_input_per_1m` rates rather than full `input_per_1m` rates for these bytes. Do not inline this content into agent bodies — always import.**
|
|
13
|
+
>
|
|
14
|
+
> **As of Phase 14.5 this file is an aggregator.** The framework-invariant subsections (Required Reading Discipline, Writes Protocol, Deviation Handling, Completion Markers, Context-Exhaustion & Budget awareness) live in `./meta-rules.md` (tier L0) so the L2 heuristics/anti-patterns/checklists churn never invalidates the L0 prefix.
|
|
4
15
|
>
|
|
5
|
-
> **As of Phase
|
|
16
|
+
> **As of Phase 28.5 this file also serves the design-family skills.** Sections below the agent-preamble block (## Design Quality Pillars, ## Token-First Reasoning, ## Output Contract Reminders, ## Connection Handshake Summary) are the canonical home for principle-recitation that previously inlined across `skills/audit`, `skills/style`, `skills/darkmode`, `skills/compare`, `skills/figma-write`, `skills/connections`, `skills/benchmark`. Skills cross-link here instead of restating these lists.
|
|
6
17
|
|
|
7
18
|
@reference/meta-rules.md
|
|
8
19
|
|
|
20
|
+
## When to use this file
|
|
21
|
+
|
|
22
|
+
Two distinct consumers, one canonical home:
|
|
23
|
+
|
|
24
|
+
1. **Agents** (`agents/*.md`) import this file via `@reference/shared-preamble.md` to inherit the GSD framework identity + L0 invariants (cache-stable prefix). Agents do not "read" the design-family sections below; those are passive content the cache covers for free.
|
|
25
|
+
2. **Skills** (`skills/<name>/SKILL.md`) cross-link to specific sections (`./shared-preamble.md#design-quality-pillars`, etc.) instead of restating recurring principle lists inline. This is the D-10 extract-then-link discipline from Phase 28.5: principle text lives in one place; skills point at it.
|
|
26
|
+
|
|
9
27
|
## Framework Identity
|
|
10
28
|
|
|
11
29
|
You are a GSD agent operating under the `get-design-done` plugin contract (see `agents/README.md` for the full authoring contract). You are spawned by a pipeline stage (or by another agent) via the Claude Code `Task` tool with a fully self-contained prompt. You have **zero session memory** — everything you need is in the prompt string and the files listed inside its `<required_reading>` block.
|
|
@@ -30,12 +48,66 @@ The `/gdd:warm-cache` command (ships in Plan 10.1-02) pre-warms this identical p
|
|
|
30
48
|
|
|
31
49
|
The framework is anchored to three design philosophy references that agents may read during brief, audit, and verify stages:
|
|
32
50
|
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
51
|
+
- `./first-principles.md` — 3-invariant framework (body, attention, memory); reducibility test for every design element
|
|
52
|
+
- `./emotional-design.md` — Norman's visceral / behavioral / reflective cross-cutting scoring lens
|
|
53
|
+
- `./component-authoring.md` — Kowalski/Sonner 6-principle component quality standard (P-01 through P-06)
|
|
36
54
|
|
|
37
55
|
These references encode *why* the heuristics and anti-patterns exist — not rules to follow, but constraints derived from human biology and cognition. Agents that read these files apply them as lenses, not checklists.
|
|
38
56
|
|
|
39
57
|
---
|
|
40
58
|
|
|
41
|
-
|
|
59
|
+
## Design Quality Pillars
|
|
60
|
+
|
|
61
|
+
Seven pillars score every design audit (see `./audit-scoring.md` for the weighted-rubric detail; this section is the one-paragraph summary that the design-family skills cross-link). Used by `skills/audit`, `skills/style`, `skills/compare`.
|
|
62
|
+
|
|
63
|
+
1. **Accessibility** — WCAG 2.1 AA threshold compliance; keyboard navigation; non-color signalling. See also `./contrast-advanced.md` (APCA / WCAG 3 perceptual layer).
|
|
64
|
+
2. **Visual hierarchy** — F/Z scanning paths; primary action prominence; section pacing. See `./visual-hierarchy-layout.md`.
|
|
65
|
+
3. **Typography** — type scale ratio (1.125 → 1.5), font-pair count cap (≤2), reading rhythm (`./typography.md`).
|
|
66
|
+
4. **Color** — palette source-of-truth, contrast pair density, OKLCH discipline, semantic-token coverage (`./palette-catalog.md`, `./color-theory.md`).
|
|
67
|
+
5. **Spacing & rhythm** — 4 px or 8 px modular scale, vertical-rhythm consistency (`./composition.md`, `./proportion-systems.md`).
|
|
68
|
+
6. **Component coherence** — minimal API surface, animation as state, edge honesty (`./component-authoring.md`).
|
|
69
|
+
7. **Anti-patterns** — BAN-*, SLOP-* tags from `./anti-patterns.md`; emotional design conflict patterns from `./emotional-design.md`.
|
|
70
|
+
|
|
71
|
+
Score range per pillar: 0–10. Audit-overall = weighted average per `./audit-scoring.md` weights.
|
|
72
|
+
|
|
73
|
+
## Token-First Reasoning
|
|
74
|
+
|
|
75
|
+
Design tokens are the discipline that prevents the 60+ raw-hex `#5C5C5C` audit-failure pattern. The rule:
|
|
76
|
+
|
|
77
|
+
> **Every reachable color, spacing, type-scale value must be a token reference, not a raw literal.**
|
|
78
|
+
|
|
79
|
+
Three audit signals:
|
|
80
|
+
|
|
81
|
+
- **Raw-hex ratio** — `grep -rEo "#[0-9a-fA-F]{6}" src/` divided by total color uses. Healthy < 5 %.
|
|
82
|
+
- **Token coverage** — every semantic role (primary, surface, on-surface, etc.) has a defined token. Cross-check with `./palette-catalog.md` for naming convention.
|
|
83
|
+
- **Light/dark parity** — every light-mode color token has a dark-mode override (see `skills/darkmode` audit for the contrast-pair check, and `./color-theory.md` §OKLCH for the modern hue-rotation contract).
|
|
84
|
+
|
|
85
|
+
Used by: `skills/style`, `skills/darkmode`, `skills/figma-write`, `skills/audit`, `skills/compare`.
|
|
86
|
+
|
|
87
|
+
## Output Contract Reminders
|
|
88
|
+
|
|
89
|
+
Every design-family skill writes ONE artifact (D-06 / utility-skill discipline). Recurring constraints (cited by `skills/audit`, `skills/compare`, `skills/darkmode`, `skills/figma-write`, `skills/style`):
|
|
90
|
+
|
|
91
|
+
- **MUST NOT write** to pipeline-reserved paths: `DESIGN.md`, `DESIGN-CONTEXT.md`, `DESIGN-PLAN.md`, `DESIGN-SUMMARY.md`, `DESIGN-VERIFICATION.md`, `.design/STATE.md` (unless the skill IS a pipeline stage — design-family skills are NOT).
|
|
92
|
+
- **MUST write** the declared artifact name with a non-conflicting prefix (`DESIGN-STYLE-*`, `DARKMODE-AUDIT.md`, `COMPARE-REPORT.md`, etc.).
|
|
93
|
+
- **MUST emit** a completion marker line (e.g., `## STYLE COMPLETE`, `## DARKMODE AUDIT COMPLETE`, `## COMPARE COMPLETE`) so the orchestrator can detect skill exit.
|
|
94
|
+
- **MUST NOT invoke** the pipeline router (these are leaf skills, not pipeline stages).
|
|
95
|
+
- **MUST NOT mutate** source files (audit-only — fixes belong in the design pipeline's color/typography/etc. task types).
|
|
96
|
+
|
|
97
|
+
Reference paths used by completion-marker probes: see each skill's `## Completion` section for the literal artifact path.
|
|
98
|
+
|
|
99
|
+
## Connection Handshake Summary
|
|
100
|
+
|
|
101
|
+
The 12 external integrations (`figma`, `refero`, `preview`, `storybook`, `chromatic`, `graphify`, `pinterest`, `claude-design`, `paper-design`, `pencil-dev`, `21st-dev`, `magic-patterns`) share a probe pattern. The single-source spec lives in `connections/connections.md` (capability matrix + probe-pattern); per-connection setup lives in `connections/<name>.md`. The `skills/connections` skill orchestrates probes; the AI-native interface contract is `./ai-native-tool-interface.md`.
|
|
102
|
+
|
|
103
|
+
Probe pattern (used by `skills/darkmode`, `skills/compare`, `skills/figma-write`, `skills/connections`, `skills/benchmark`):
|
|
104
|
+
|
|
105
|
+
1. **ToolSearch first** — `ToolSearch({ query: "<server-name>", max_results: 5 })`. Empty result → `not_configured`. Non-empty → step 2.
|
|
106
|
+
2. **Live tool call** — invoke a metadata endpoint (e.g., `preview_list`, `get_metadata`). Success → `available`. Error → `unavailable`.
|
|
107
|
+
3. **Write to STATE.md `<connections>`** — three-value schema (`available | unavailable | not_configured`). Never add new values.
|
|
108
|
+
|
|
109
|
+
For full per-connection probe scripts (figma, refero, preview, etc.) see the individual `connections/<name>.md` files. For the onboarding wizard flow, see `./connections-onboarding.md` (Phase 28.5 extract).
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
*Imported by: every file under `agents/*.md` (except `agents/README.md`). Cross-linked by: design-family skills under `skills/{audit,style,darkmode,compare,figma-write,connections,benchmark}/SKILL.md`. Maintained as part of Phase 10.1 (OPT-07), Phase 14.5 (L0/L2 split), and Phase 28.5 (Bucket 2 design-family rework — D-10). Edits to this file affect every agent simultaneously — verify across the full agent suite before committing.*
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-authoring-contract
|
|
3
|
+
type: meta-rules
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
phase: 28.5
|
|
6
|
+
tags: [skill, authoring, contract, length-cap, description, frontmatter, progressive-disclosure]
|
|
7
|
+
last_updated: 2026-05-18
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Source: mattpocock/skills (MIT) — adapted with permission. See `../NOTICE` for the full attribution block.
|
|
11
|
+
|
|
12
|
+
# Skill Authoring Contract
|
|
13
|
+
|
|
14
|
+
This file codifies the structural discipline that every `skills/<name>/SKILL.md` in this repo
|
|
15
|
+
must obey. It exists because a 2026-05-02 audit found skill lengths ranging from 23 to 731
|
|
16
|
+
lines, descriptions oscillating between under-spec and over-cap, and no shared rule for when
|
|
17
|
+
to extract domain content out of a SKILL.md and into a centralized reference. The contract
|
|
18
|
+
pulls every skill into a predictable band so agent context stays small and first-token latency
|
|
19
|
+
stays low. Validator: `node scripts/validate-skill-length.cjs --quiet --json`. See
|
|
20
|
+
`./context-md-format.md` and `./adr-format.md` for the project-scoped artifact contracts that
|
|
21
|
+
ship in the same phase.
|
|
22
|
+
|
|
23
|
+
## Length cap
|
|
24
|
+
|
|
25
|
+
Two-tier threshold, enforced by the validator (D-01):
|
|
26
|
+
|
|
27
|
+
- **Warn at `≥100` lines.** Validator emits a warning. CI does NOT fail. Treat as a forcing
|
|
28
|
+
function: a 110-line skill is fine; a 180-line skill needs a hard look at what can be
|
|
29
|
+
extracted.
|
|
30
|
+
- **Block at `≥250` lines.** Validator emits an error. CI FAILS. No exceptions —
|
|
31
|
+
multi-stage orchestrator skills push extraction harder, they do not waive the cap.
|
|
32
|
+
|
|
33
|
+
When a skill exceeds the cap, use the extract-then-link discipline (D-10) — NEVER delete
|
|
34
|
+
content. Move it. Steps:
|
|
35
|
+
|
|
36
|
+
1. Identify load-bearing workflow + decision-tree content. Keep this in `SKILL.md`.
|
|
37
|
+
2. Identify domain content — heuristics, framework matrices, glossaries, extended examples.
|
|
38
|
+
Extract to an existing `reference/<topic>.md` if the topic matches; create a new
|
|
39
|
+
`reference/<topic>.md` if it does not.
|
|
40
|
+
3. Replace the extracted content with a single-sentence summary + cross-link.
|
|
41
|
+
|
|
42
|
+
Concrete callouts at the time of writing: `skills/scan/SKILL.md` (731 lines) is the
|
|
43
|
+
worst-offender and is scheduled for Bucket 1 rework in plan `28.5-04`. `skills/help/SKILL.md`
|
|
44
|
+
(86 lines) is an in-band example of a well-scoped utility shortcut.
|
|
45
|
+
|
|
46
|
+
## Description format
|
|
47
|
+
|
|
48
|
+
Two rules:
|
|
49
|
+
|
|
50
|
+
- **Length cap is STRICT.** `description ≤ 1024 chars` — no flag, no override. Under 20 chars
|
|
51
|
+
is also blocked as under-specification.
|
|
52
|
+
- **Recommended form is LAX by default.** `<what>. Use when <triggers>.` — third person,
|
|
53
|
+
first sentence what the skill does, second sentence the trigger conditions. Validator
|
|
54
|
+
enforces the form regex only under `--strict-description` or `STRICT_DESCRIPTION=1`. Default
|
|
55
|
+
is length-only.
|
|
56
|
+
|
|
57
|
+
Why lax-by-default (D-02): `obra/superpowers/skills/writing-skills/SKILL.md` documents a
|
|
58
|
+
shortcut-effect where an agent reads the description and skips the body — the more
|
|
59
|
+
load-bearing the description summary, the more often this happens. Phase 33 ships an A/B
|
|
60
|
+
study at `.design/research/description-format-ab.md`; until then the regex stays advisory.
|
|
61
|
+
|
|
62
|
+
Examples (both 20–1024 chars, both pass the length check):
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
# Strict-mode-compliant
|
|
66
|
+
Renders an OKLCH gamut comparison chart. Use when the user asks to see the visible difference between a target gamut and sRGB.
|
|
67
|
+
|
|
68
|
+
# Lax-mode-only acceptable
|
|
69
|
+
Compares OKLCH gamut coverage against sRGB and prints a visual diff chart.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Frontmatter
|
|
73
|
+
|
|
74
|
+
Required fields (validator blocks if absent):
|
|
75
|
+
|
|
76
|
+
- `name` — kebab-case skill identifier; matches `^[a-z0-9][a-z0-9-._]*$`.
|
|
77
|
+
- `description` — 20–1024 chars; see `## Description format` above.
|
|
78
|
+
|
|
79
|
+
Optional fields (recognized by the Claude Code agent loader):
|
|
80
|
+
|
|
81
|
+
- `argument-hint` — usage hint shown in the slash-command picker.
|
|
82
|
+
- `tools` — comma-separated allowed tool list (e.g. `Read, Grep`).
|
|
83
|
+
- `disable-model-invocation: true|false` — when `true`, the skill fires ONLY on explicit
|
|
84
|
+
user invocation and the router will not auto-trigger it. Allowed ONLY on the D-09
|
|
85
|
+
whitelist (pure shortcuts like `help`, `stats`, `note`, `health`, `zoom-out`). The
|
|
86
|
+
validator blocks if a non-whitelisted skill sets this field to `true`.
|
|
87
|
+
- `user-invocable: true|false` — whether the slash-command picker exposes the skill.
|
|
88
|
+
|
|
89
|
+
Concrete example:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
---
|
|
93
|
+
name: help
|
|
94
|
+
description: "Lists all available get-design-done commands with one-line descriptions. Use when the user asks for help, a command list, or wants to know what is available."
|
|
95
|
+
tools: Read
|
|
96
|
+
disable-model-invocation: true
|
|
97
|
+
---
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Progressive disclosure
|
|
101
|
+
|
|
102
|
+
References-one-level-deep is the rule (D-06):
|
|
103
|
+
|
|
104
|
+
- **One level deep.** `SKILL.md` may cross-link into `reference/<topic>.md`. A reference may
|
|
105
|
+
cross-link into another reference. `SKILL.md` does NOT instruct the agent to follow a
|
|
106
|
+
reference's references — load the first level only.
|
|
107
|
+
- **Centralized refs.** `reference/typography.md`, `reference/palette-catalog.md`,
|
|
108
|
+
`reference/audit-scoring.md` and friends are consumed by 15+ skills each. NEVER bundle
|
|
109
|
+
them per-skill. Per-skill folders are allowed ONLY for content that is truly
|
|
110
|
+
single-skill-private (rare; typically a fixture or schema only the owning skill reads).
|
|
111
|
+
- **When to add `scripts/`.** Per mattpocock's three criteria, add a script only when the
|
|
112
|
+
step is deterministic, repeated across runs, and the failure mode needs explicit error
|
|
113
|
+
handling. Anything ad-hoc or once-off stays inline as agent prose.
|
|
114
|
+
|
|
115
|
+
Concrete example: a skill that lists 10 framework matrices inline (~150 lines) extracts the
|
|
116
|
+
matrices to `reference/<framework>-matrices.md` and replaces them with a one-sentence
|
|
117
|
+
summary + cross-link. SKILL.md drops to ~80 lines, the matrices stay discoverable, no
|
|
118
|
+
institutional knowledge is lost.
|
|
119
|
+
|
|
120
|
+
## Validator usage
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
node scripts/validate-skill-length.cjs --quiet --json
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Exit codes: `0` clean, `1` warnings only, `2` blockers present. Flags: `--quiet` suppresses
|
|
127
|
+
per-skill output, `--strict-description` adds the form regex check, `--json` emits
|
|
128
|
+
machine-readable output. Env: `STRICT_DESCRIPTION=1` and `SKILLS_DIR=<path>` are honored.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: start-procedure
|
|
3
|
+
type: heuristic
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
phase: 28.5
|
|
6
|
+
tags: [start, first-run, proof-path, scan, writer-agent, handoff]
|
|
7
|
+
last_updated: 2026-05-18
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Start Skill — Full Procedure
|
|
11
|
+
|
|
12
|
+
Extracted from `skills/start/SKILL.md` per Phase 28.5 D-10 (extract-then-link, never delete
|
|
13
|
+
content). The skill keeps its arguments table, step headings, and non-goals; the per-step
|
|
14
|
+
operational detail (interview JSON shape, scan invocation, writer spawn payload, handoff
|
|
15
|
+
template) lives here so the SKILL stays under the 100-line cap.
|
|
16
|
+
|
|
17
|
+
The companion file `./start-interview.md` (Phase 27 ship) holds the 5-question copy,
|
|
18
|
+
defaults, and validation rules. This file documents what `/gdd:start` does WITH the answers.
|
|
19
|
+
|
|
20
|
+
## Step 0 — Dismiss-only shortcut
|
|
21
|
+
|
|
22
|
+
If invoked with `--dismiss-nudge`:
|
|
23
|
+
|
|
24
|
+
1. `touch ~/.claude/gdd-nudge-dismissed` (Windows: equivalent). Ignore errors silently.
|
|
25
|
+
2. Print exactly: `Nudge dismissed. Delete ~/.claude/gdd-nudge-dismissed to re-enable.`
|
|
26
|
+
3. Exit with `## START COMPLETE` marker.
|
|
27
|
+
|
|
28
|
+
Do not proceed to any other step.
|
|
29
|
+
|
|
30
|
+
## Step 1 — Detect UI root
|
|
31
|
+
|
|
32
|
+
Run the detector:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/lib/detect-ui-root.cjs" "$(pwd)"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Capture the JSON output. Branches:
|
|
39
|
+
|
|
40
|
+
- `kind: "backend-only"` → print the frontend-only diagnostic below, write nothing, exit with `## START COMPLETE`. The diagnostic copy is:
|
|
41
|
+
> `/gdd:start` is for frontend codebases. This repo looks backend-only (detected `<framework>`). The plugin can still help with design references and component libraries imported by your clients — but there is no UI surface here to scan. Exiting without creating `.design/`.
|
|
42
|
+
- `kind: null` (no package.json, no UI dir) → print a short "Nothing recognizable here — point me at a frontend repo and try again." and exit.
|
|
43
|
+
- Any other `kind` → proceed with `detected.path` as the scan root.
|
|
44
|
+
|
|
45
|
+
## Step 2 — Run the 5-question interview
|
|
46
|
+
|
|
47
|
+
Read `./start-interview.md` for the exact question copy, defaults, and validation rules.
|
|
48
|
+
|
|
49
|
+
If `--skip-interview`, skip this step and use the defaults documented in that file.
|
|
50
|
+
|
|
51
|
+
Otherwise, ask the five questions in order using `AskUserQuestion`:
|
|
52
|
+
|
|
53
|
+
1. Pain point (text, required, single-line cap 120 chars)
|
|
54
|
+
2. Target area confirmation (detected path)
|
|
55
|
+
3. Budget / latency preference (enum: fast / balanced / thorough)
|
|
56
|
+
4. Framework + design-system confirmation (from detection)
|
|
57
|
+
5. Figma / canvas workflow (enum: figma / canvas / neither / skip)
|
|
58
|
+
|
|
59
|
+
Any early exit at Q1 → abort with a one-line pointer to `/gdd:scan`.
|
|
60
|
+
|
|
61
|
+
Store the answers + detection result in `.design/.start-context.json`:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"schema_version": "1.0",
|
|
66
|
+
"detected": { "kind": "...", "path": "...", "framework": "...", "design_system": "...", "confidence": 0.85 },
|
|
67
|
+
"interview": { "pain": "...", "target_area": "...", "budget": "balanced", "framework_confirmed": true, "design_system_confirmed": true, "figma_workflow": "skip" },
|
|
68
|
+
"generated_at": "<ISO-8601>"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`.design/` is created here for the first time. `.design/STATE.md` is NOT written.
|
|
73
|
+
|
|
74
|
+
## Step 3 — Scan findings
|
|
75
|
+
|
|
76
|
+
Run the findings engine:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/lib/start-findings-engine.cjs" \
|
|
80
|
+
--root "<detected.path>" \
|
|
81
|
+
--budget "<budget>" \
|
|
82
|
+
--pain "<pain_point>"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Capture the JSON. The output carries at most three findings, each with stable IDs `F1`..`F3`, plus `bestFirstProofId` (may be null).
|
|
86
|
+
|
|
87
|
+
Append the engine output to `.design/.start-context.json` under a `scan` key.
|
|
88
|
+
|
|
89
|
+
## Step 4 — Spawn the writer
|
|
90
|
+
|
|
91
|
+
Dispatch `Task` with:
|
|
92
|
+
|
|
93
|
+
- `subagent_type: design-start-writer`
|
|
94
|
+
- `description: "Write .design/START-REPORT.md"`
|
|
95
|
+
- `prompt:` a short instruction pointing the agent at `.design/.start-context.json` and asking it to emit the report per its Output contract. Include a reminder that it must produce exactly 7 H2 sections plus the JSON block, and must not write `STATE.md`.
|
|
96
|
+
|
|
97
|
+
Wait for the agent to complete. The agent writes `.design/START-REPORT.md`.
|
|
98
|
+
|
|
99
|
+
## Step 5 — Print the handoff
|
|
100
|
+
|
|
101
|
+
Read the final line of `.design/START-REPORT.md` to capture the suggested command.
|
|
102
|
+
|
|
103
|
+
Print exactly (one line, no emoji):
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
Report written to .design/START-REPORT.md. Next: run <suggested_command> to see the first proof.
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
If `bestFirstProofId` was null, the suggested command is `/gdd:brief` (the default fallback).
|
|
110
|
+
|
|
111
|
+
Emit `## START COMPLETE` and exit.
|
|
112
|
+
|
|
113
|
+
## Failure handling
|
|
114
|
+
|
|
115
|
+
Every error path exits with `## START COMPLETE` and a one-line pointer. Do not half-write files: if the writer agent fails, keep `.design/.start-context.json` and tell the user they can rerun. Do not delete `.design/` unless it was empty before the run.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: style-doc-procedure
|
|
3
|
+
type: meta-rules
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
phase: 28.5
|
|
6
|
+
tags: [style, handoff, component-spec, doc-writer, procedure, extracted]
|
|
7
|
+
last_updated: 2026-05-18
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Source: extracted from `skills/style/SKILL.md` (Phase 28.5 rework — D-10 extract-then-link).
|
|
11
|
+
The skill's load-bearing routing + mode-detection stays in `../skills/style/SKILL.md`; this file
|
|
12
|
+
holds the agent-spawn payload, source-resolution paths, and the per-section spec the
|
|
13
|
+
`design-doc-writer` agent produces. See `./shared-preamble.md#output-contract-reminders` for
|
|
14
|
+
the cross-skill output discipline.
|
|
15
|
+
|
|
16
|
+
# Style Doc Procedure
|
|
17
|
+
|
|
18
|
+
Detailed procedure for the `get-design-done:style` standalone command — companion to
|
|
19
|
+
`../skills/style/SKILL.md`. Read this file when executing the agent-spawn step (Step 4 in the
|
|
20
|
+
skill) or when wiring the source-resolution fallback chain. The SKILL.md keeps the load-bearing
|
|
21
|
+
mode detection + decision tree; this file holds the deep methodology.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Mode Detection
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
If .design/DESIGN-SUMMARY.md exists:
|
|
29
|
+
mode = post-pipeline (STYL-03)
|
|
30
|
+
pipeline_complete = true
|
|
31
|
+
|
|
32
|
+
Elif .design/DESIGN.md exists:
|
|
33
|
+
mode = pre-pipeline (STYL-04)
|
|
34
|
+
pipeline_complete = false
|
|
35
|
+
|
|
36
|
+
Else:
|
|
37
|
+
Abort: "No .design/ artifacts found. Run /get-design-done scan first to initialize."
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The mode controls which files are supplied to the agent in `<required_reading>`.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Component Source Resolution
|
|
45
|
+
|
|
46
|
+
Search for a source file matching the provided ComponentName (case-insensitive):
|
|
47
|
+
|
|
48
|
+
1. `src/components/[ComponentName].tsx`
|
|
49
|
+
2. `src/components/[ComponentName].jsx`
|
|
50
|
+
3. `src/components/[ComponentName].vue`
|
|
51
|
+
4. `src/components/[ComponentName].svelte`
|
|
52
|
+
5. `src/**/[ComponentName]/index.tsx`
|
|
53
|
+
6. `src/**/[ComponentName]/index.jsx`
|
|
54
|
+
7. `components/[ComponentName].tsx`
|
|
55
|
+
8. `components/[ComponentName].jsx`
|
|
56
|
+
9. `components/[ComponentName].vue`
|
|
57
|
+
10. `components/[ComponentName].svelte`
|
|
58
|
+
|
|
59
|
+
**If multiple matches found:** Present the list to the user and prompt them to specify the exact path. Do not proceed until a single file is selected.
|
|
60
|
+
|
|
61
|
+
**If zero matches found:** Abort with: "Component [ComponentName] not found in expected paths. Verify the name matches a file in src/components/ or components/."
|
|
62
|
+
|
|
63
|
+
When `$ARGUMENTS` is empty, the skill enters **list mode** — glob the same source roots, also list task names from `.design/tasks/*.md` (if directory exists), display the list, and prompt the user to specify a ComponentName. Exit without generating any file.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Agent Spawn Payload
|
|
68
|
+
|
|
69
|
+
Once mode and source path are resolved, spawn the `design-doc-writer` agent:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
Task("design-doc-writer", """
|
|
73
|
+
<required_reading>
|
|
74
|
+
[If pipeline_complete=true:]
|
|
75
|
+
@.design/STATE.md
|
|
76
|
+
@.design/DESIGN-SUMMARY.md
|
|
77
|
+
@.design/DESIGN-CONTEXT.md
|
|
78
|
+
@<component_source_path>
|
|
79
|
+
[Else (pipeline_complete=false):]
|
|
80
|
+
@.design/DESIGN.md
|
|
81
|
+
@<component_source_path>
|
|
82
|
+
@reference/anti-patterns.md
|
|
83
|
+
@reference/audit-scoring.md
|
|
84
|
+
</required_reading>
|
|
85
|
+
|
|
86
|
+
Generate a handoff spec for component <ComponentName>.
|
|
87
|
+
|
|
88
|
+
Context:
|
|
89
|
+
component_name: <ComponentName>
|
|
90
|
+
component_source_path: <resolved absolute path>
|
|
91
|
+
pipeline_complete: <true|false>
|
|
92
|
+
output_path: .design/DESIGN-STYLE-<ComponentName>.md
|
|
93
|
+
|
|
94
|
+
Produce the doc per STYL-05 sections:
|
|
95
|
+
- Spacing Tokens (used by component)
|
|
96
|
+
- Color Tokens (used by component)
|
|
97
|
+
- Typography Scale (used by component)
|
|
98
|
+
- Component States (default, hover, focus, active, disabled, etc.)
|
|
99
|
+
- Token Semantic Health Score (raw-hex-ratio formula — see ./shared-preamble.md#token-first-reasoning)
|
|
100
|
+
- AI-Slop Detection (using ./anti-patterns.md BAN/SLOP patterns)
|
|
101
|
+
[If pipeline_complete=true:]
|
|
102
|
+
- Decisions Applied (D-XX from DESIGN-SUMMARY.md that mention this component)
|
|
103
|
+
|
|
104
|
+
Emit ## DOC COMPLETE when the output file is written.
|
|
105
|
+
""")
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
After the agent emits `## DOC COMPLETE`, confirm the file exists at `output_path` and report success to the user.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## STYL-05 Section Spec
|
|
113
|
+
|
|
114
|
+
Each generated `.design/DESIGN-STYLE-[ComponentName].md` SHOULD contain (in this order):
|
|
115
|
+
|
|
116
|
+
1. **Spacing Tokens** — every spacing token the component uses (paddings, gaps, margins). Cross-reference `./composition.md` for the 4 px / 8 px modular scale discipline.
|
|
117
|
+
2. **Color Tokens** — every color token the component uses (background, foreground, border, focus ring, state-overlays). Cross-reference `./palette-catalog.md` for naming convention and `./shared-preamble.md#token-first-reasoning` for the raw-hex audit threshold.
|
|
118
|
+
3. **Typography Scale** — type ramps the component reaches into (label, body, code, etc.) with size + line-height + weight. Cross-reference `./typography.md`.
|
|
119
|
+
4. **Component States** — default, hover, focus, active, disabled, loading, error. Each row: token diff vs default.
|
|
120
|
+
5. **Token Semantic Health Score** — raw-hex ratio = `raw_hex_count / total_color_uses`. Healthy < 5 %.
|
|
121
|
+
6. **AI-Slop Detection** — apply `./anti-patterns.md` `BAN-*` and `SLOP-*` patterns to the component source. List violations.
|
|
122
|
+
7. **Decisions Applied** (post-pipeline only) — D-XX entries from `DESIGN-SUMMARY.md` that name or describe this component.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Examples
|
|
127
|
+
|
|
128
|
+
**Example 1: Named component**
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
/get-design-done style Button
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
- Resolves component: `src/components/Button.tsx`
|
|
135
|
+
- Detects mode: DESIGN-SUMMARY.md exists → post-pipeline
|
|
136
|
+
- Spawns `design-doc-writer` with `pipeline_complete: true`
|
|
137
|
+
- Output: `.design/DESIGN-STYLE-Button.md`
|
|
138
|
+
|
|
139
|
+
**Example 2: No argument (list mode)**
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
/get-design-done style
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
- Globs component files from `src/components/`
|
|
146
|
+
- Displays available components and exits without generating any file.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
*Imported by: `../skills/style/SKILL.md`. Maintained as part of Phase 28.5 (Bucket 2 rework).*
|
|
@@ -0,0 +1,101 @@
|
|
|
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 load-bearing 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>`.
|