@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
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-md-format
|
|
3
|
+
type: meta-rules
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
phase: 28.5
|
|
6
|
+
tags: [context-md, glossary, ubiquitous-language, ddd, project-scoped]
|
|
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
|
+
# CONTEXT.md Format
|
|
13
|
+
|
|
14
|
+
`CONTEXT.md` is a project-scoped ubiquitous-language glossary kept at the repository root.
|
|
15
|
+
It captures domain terms the user and the agent have agreed upon so the next session does
|
|
16
|
+
not re-litigate naming. `STATE.md` is cycle-scoped and rotates per pipeline run; `CONTEXT.md`
|
|
17
|
+
outlives the cycle and compounds across runs. The `discuss` and `brief` skills write to it
|
|
18
|
+
inline during interviews (no batching) — see Phase 28.5 plan `28.5-08` for the writer
|
|
19
|
+
behavior. See `./adr-format.md` for the heavier project-scoped artifact (decisions that meet
|
|
20
|
+
the 3-criteria gate).
|
|
21
|
+
|
|
22
|
+
## Term entry
|
|
23
|
+
|
|
24
|
+
Each entry is a `##` heading whose text is the term, followed by a body paragraph that
|
|
25
|
+
defines it. The required surface is the heading and the definition; everything else is
|
|
26
|
+
optional GDD adaptation.
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
## <Term Name>
|
|
30
|
+
|
|
31
|
+
<Definition — 1-3 sentences in plain language. Use existing CONTEXT.md vocabulary where
|
|
32
|
+
possible (compounding effect — terms defined earlier in the file are reused in later
|
|
33
|
+
definitions).>
|
|
34
|
+
|
|
35
|
+
**First seen:** <cycle-id-or-NN> *(optional, GDD addition for traceability)*
|
|
36
|
+
**Aliases:** [<term1>, <term2>] *(optional, GDD addition for term-merging — see §Aliases)*
|
|
37
|
+
**Examples:** *(optional)*
|
|
38
|
+
|
|
39
|
+
- <Concrete usage 1>
|
|
40
|
+
- <Concrete usage 2>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- **Required fields.** The heading (term name) and the definition paragraph.
|
|
44
|
+
- **Optional fields.** `**First seen:**`, `**Aliases:**`, `**Examples:**` — added by
|
|
45
|
+
`discuss` / `brief` skills as ergonomic. `first-seen` ties the term to an originating
|
|
46
|
+
cycle's `STATE.md`; `aliases` enables term-merging; examples concretize usage.
|
|
47
|
+
|
|
48
|
+
## Lazy creation
|
|
49
|
+
|
|
50
|
+
`CONTEXT.md` is created on the FIRST term resolution and never batched. The writing skill
|
|
51
|
+
just appends — no precondition prompts, no "should we create CONTEXT.md?" question (D-04).
|
|
52
|
+
|
|
53
|
+
- **Trigger.** A fuzzy phrase becomes a sharpened term (e.g., "thingy" → "materialization
|
|
54
|
+
cascade"), a new noun gets named, or two phrases collapse to one.
|
|
55
|
+
- **Location.** Project root: `./CONTEXT.md`. Repos that span multiple bounded contexts use
|
|
56
|
+
`CONTEXT-MAP.md` plus per-area `<area>/CONTEXT.md` — see `## Multi-context`.
|
|
57
|
+
- **No batching.** Do NOT wait to gather "enough" terms. Each resolved term lands
|
|
58
|
+
immediately so the file reflects the conversation at every checkpoint.
|
|
59
|
+
|
|
60
|
+
## Aliases
|
|
61
|
+
|
|
62
|
+
When two terms collapse to one canonical name, the loser becomes an entry in the winner's
|
|
63
|
+
`**Aliases:**` line. The agent never silently drops a term — the alias preserves the prior
|
|
64
|
+
vocabulary for grep, for the `decision-injector` hook, and for the user's mental model.
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
## Materialization cascade
|
|
68
|
+
|
|
69
|
+
The chain of steps that turns a sketch into a real, deployable artifact. Triggered by the
|
|
70
|
+
prototype gate; spans sketch → spike → real-thing.
|
|
71
|
+
|
|
72
|
+
**First seen:** v1.28.5
|
|
73
|
+
**Aliases:** [making-things-real, materialize, "real-ification"]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- `decision-injector` (extended in plan `28.5-08`) searches `aliases` against task
|
|
77
|
+
descriptions so the canonical term surfaces even when the user types the old phrase.
|
|
78
|
+
- Aliases are kebab-case OR quoted; mix freely.
|
|
79
|
+
|
|
80
|
+
## Multi-context
|
|
81
|
+
|
|
82
|
+
When the repo spans multiple bounded contexts (a monorepo with `apps/web` and `apps/api`,
|
|
83
|
+
say), each context gets its own `<area>/CONTEXT.md` and the top-level `CONTEXT-MAP.md` lists
|
|
84
|
+
them. Same entry format inside each file; `CONTEXT-MAP.md` is just an index.
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
# Context Map
|
|
88
|
+
|
|
89
|
+
## Web App
|
|
90
|
+
`apps/web/CONTEXT.md`
|
|
91
|
+
|
|
92
|
+
## API
|
|
93
|
+
`apps/api/CONTEXT.md`
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`discuss` / `brief` resolve which `CONTEXT.md` to write to by matching the active file
|
|
97
|
+
paths in the conversation against the map. When no map exists, the single-file default
|
|
98
|
+
(`./CONTEXT.md`) applies.
|
|
99
|
+
|
|
100
|
+
## Cross-references
|
|
101
|
+
|
|
102
|
+
- Decisions that outlive the cycle AND meet the 3-criteria gate (hard-to-reverse AND
|
|
103
|
+
surprising-without-context AND real-tradeoff) become ADRs — see `./adr-format.md`.
|
|
104
|
+
- Cycle-scoped decisions stay in `STATE.md` — see `./STATE-TEMPLATE.md`.
|
|
105
|
+
- Skill structural rules (length cap, frontmatter, progressive disclosure) — see
|
|
106
|
+
`./skill-authoring-contract.md`.
|
package/reference/heuristics.md
CHANGED
|
@@ -269,3 +269,87 @@ For each NNG heuristic (H-01 through H-10), rate 0–4:
|
|
|
269
269
|
- 75–89: Good, minor issues
|
|
270
270
|
- 60–74: Acceptable, improvement needed
|
|
271
271
|
- <60: Significant UX problems, redesign required
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Dependency-cycle detection
|
|
276
|
+
|
|
277
|
+
Algorithm consumed by `skills/analyze-dependencies/SKILL.md` Analysis 4. Detects cycles
|
|
278
|
+
in the `@`-reference graph (File A → File B → File A) by DFS with path-tracking.
|
|
279
|
+
|
|
280
|
+
**Input:** adjacency map `{from: [to, ...]}` built from `.design/intel/graph.json#edges`.
|
|
281
|
+
|
|
282
|
+
**Algorithm:**
|
|
283
|
+
|
|
284
|
+
```text
|
|
285
|
+
visited = {}; path = []; cycles = []
|
|
286
|
+
function dfs(node):
|
|
287
|
+
if node in path:
|
|
288
|
+
cycle_start = path.index(node)
|
|
289
|
+
cycles.append(path[cycle_start:] + [node])
|
|
290
|
+
return
|
|
291
|
+
if node in visited: return
|
|
292
|
+
visited.add(node); path.append(node)
|
|
293
|
+
for neighbor in adjacency[node]: dfs(neighbor)
|
|
294
|
+
path.pop()
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
**Bias notes:** the DFS visits each node at most once per traversal, so duplicate cycles
|
|
298
|
+
across multiple entry points are deduped by the `visited` guard. The `path.index(node)`
|
|
299
|
+
slice captures only the cycle suffix; nodes before the entry point are not part of the
|
|
300
|
+
cycle. Pre-existing acyclic chains stay invisible — only back-edges surface.
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Version-cadence
|
|
305
|
+
|
|
306
|
+
Reference for `skills/check-update/SKILL.md` and `skills/complete-cycle/SKILL.md` when
|
|
307
|
+
comparing versions across releases.
|
|
308
|
+
|
|
309
|
+
**Delta classification** (consumer of `.design/update-cache.json#delta`):
|
|
310
|
+
|
|
311
|
+
| Delta | Meaning | When |
|
|
312
|
+
|-------|---------|------|
|
|
313
|
+
| `major` | Breaking change | `current.major < latest.major` |
|
|
314
|
+
| `minor` | New features | Major same; `current.minor < latest.minor` |
|
|
315
|
+
| `patch` | Bug fixes only | Major + minor same; `current.patch < latest.patch` |
|
|
316
|
+
| `off-cadence` | Insertion-style version (`.5`, `.6`, `.7`) | Listed in `OFF_CADENCE_VERSIONS` in `tests/semver-compare.test.cjs` |
|
|
317
|
+
| `none` | Same version | All segments equal |
|
|
318
|
+
|
|
319
|
+
**Off-cadence handling:** versions like `v1.14.5`, `v1.27.5`, `v1.28.5` slot between regular
|
|
320
|
+
minor bumps. They register via `OFF_CADENCE_VERSIONS.add('<version>')` in
|
|
321
|
+
`tests/semver-compare.test.cjs`. The semver-compare test treats them as if they had a
|
|
322
|
+
canonical predecessor (`v1.28.5` after `v1.28.0`, not `v1.28.4`).
|
|
323
|
+
|
|
324
|
+
**Preview-suffix trap:** model IDs with `-preview` (`gpt-5-preview` vs `gpt-5`) drift — today's
|
|
325
|
+
preview is tomorrow's GA. Tooling MUST store the parent name in `provider_model_id` and treat
|
|
326
|
+
the suffix as decorative. See `./peer-cli-protocol.md` for the peer-CLI-side context.
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Optimization rules
|
|
331
|
+
|
|
332
|
+
Reference catalog for `skills/optimize/SKILL.md`. Four deterministic rules; rule-based
|
|
333
|
+
analysis applied in order. Each rule inspects per-agent aggregates from
|
|
334
|
+
`.design/agent-metrics.json` and emits zero or more rows to the recommendations table.
|
|
335
|
+
|
|
336
|
+
**R1 — Low cache hit rate.**
|
|
337
|
+
- *Condition:* `total_spawns >= --min-spawns` AND `cache_hit_rate < 0.20`.
|
|
338
|
+
- *Emit:* `"Consider batching tasks for agent {agent} — cache hit rate is {rate*100}%. Investigate cache-aligned ordering (see reference/shared-preamble.md) and whether input paths can be normalized."`
|
|
339
|
+
- *Proposed action:* Batch similar tasks; confirm shared-preamble import ordering.
|
|
340
|
+
|
|
341
|
+
**R2 — Expensive and rarely lazy-skipped.**
|
|
342
|
+
- *Condition:* `total_cost_usd > 0.50` AND `lazy_skip_rate < 0.10`.
|
|
343
|
+
- *Emit:* `"Agent {agent} is expensive (${cost}) and rarely skipped ({rate*100}% lazy-skip). Consider adding a lazy gate heuristic at agents/{agent}-gate.md (see plan 10.1-04 pattern)."`
|
|
344
|
+
- *Proposed action:* Add lazy-gate agent.
|
|
345
|
+
|
|
346
|
+
**R3 — Tier override churn.**
|
|
347
|
+
- *Condition:* Multiple telemetry rows show recorded `tier` differing from frontmatter `default-tier` (e.g., frontmatter `opus` but measured rows consistently `haiku` from budget.json override or soft-threshold downgrade).
|
|
348
|
+
- *Emit:* `"Tier override churn detected for {agent}: frontmatter says {frontmatter-tier} but measured tier is {measured-tier} in {N} of last {M} rows. Consider updating frontmatter default-tier or removing the budget.json override."`
|
|
349
|
+
- *Proposed action:* Update frontmatter default-tier OR prune budget.json `tier_overrides` entry.
|
|
350
|
+
|
|
351
|
+
**R4 — Typical duration drift.**
|
|
352
|
+
- *Condition:* Measured `typical_duration_seconds` (computed as avg wall-clock between paired spawn/complete rows; fall back to frontmatter when pairing unavailable) differs from frontmatter `typical-duration-seconds` by more than 50%.
|
|
353
|
+
- *Emit:* `"Typical duration for {agent} has drifted: frontmatter {old}s vs measured {new}s ({delta_pct}% drift). Update frontmatter typical-duration-seconds: {new}."`
|
|
354
|
+
- *Proposed action:* Edit `agents/{agent}.md` frontmatter.
|
|
355
|
+
- *Note:* v1 only computes wall-clock duration when telemetry ledger carries both spawn AND complete rows with matching correlation IDs. If unavailable, R4 flags "insufficient data" rather than emitting a false proposal. Phase 11 reflector can add a PostToolUse writer.
|
package/reference/registry.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./schemas/registry.schema.json",
|
|
3
3
|
"version": 1,
|
|
4
|
-
"generated_at": "2026-
|
|
4
|
+
"generated_at": "2026-05-18T12:47:59.666Z",
|
|
5
5
|
"entries": [
|
|
6
6
|
{
|
|
7
7
|
"name": "codex-tools",
|
|
@@ -811,6 +811,34 @@
|
|
|
811
811
|
"path": "reference/visual-hierarchy-layout.md",
|
|
812
812
|
"type": "heuristic",
|
|
813
813
|
"description": "Z-order, whitespace, grids, F/Z patterns, 24 landing archetypes"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"name": "adr-format",
|
|
817
|
+
"path": "reference/adr-format.md",
|
|
818
|
+
"type": "meta-rules",
|
|
819
|
+
"phase": 28.5,
|
|
820
|
+
"description": "ADR (Architecture Decision Record) format — adapted from mattpocock/skills (MIT). 3-criteria offer gate (hard-to-reverse AND surprising-without-context AND real-tradeoff), 4-state status lifecycle. GDD addition: optional cycle-id + phase-id cross-refs to STATE.md."
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"name": "architecture-vocabulary",
|
|
824
|
+
"path": "reference/architecture-vocabulary.md",
|
|
825
|
+
"type": "principles",
|
|
826
|
+
"phase": 28.5,
|
|
827
|
+
"description": "Ousterhout glossary (A Philosophy of Software Design) ported via mattpocock/skills LANGUAGE.md (MIT). 8 core terms (Module / Interface / Implementation / Depth / Seam / Adapter / Leverage / Locality) + 3 principles (deletion test, interface-is-test-surface, two-adapters-rule)."
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"name": "context-md-format",
|
|
831
|
+
"path": "reference/context-md-format.md",
|
|
832
|
+
"type": "meta-rules",
|
|
833
|
+
"phase": 28.5,
|
|
834
|
+
"description": "CONTEXT.md format — adapted from mattpocock/skills (MIT) CONTEXT-FORMAT.md. DDD-style ubiquitous-language glossary schema, inline-write trigger, multi-context CONTEXT-MAP.md pattern. GDD additions: optional first-seen + aliases on term entries."
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"name": "skill-authoring-contract",
|
|
838
|
+
"path": "reference/skill-authoring-contract.md",
|
|
839
|
+
"type": "meta-rules",
|
|
840
|
+
"phase": 28.5,
|
|
841
|
+
"description": "Phase 28.5 skill-authoring contract — adapted from mattpocock/skills (MIT). SKILL.md <=100-line cap (warn >=100, block >=250 in CI), 1024-char description cap, <what>. Use when <triggers>. form (lax-mode default per Phase 33 A/B pending), frontmatter required fields, progressive-disclosure one-level-deep rule. Validator at scripts/validate-skill-length.cjs."
|
|
814
842
|
}
|
|
815
843
|
]
|
|
816
844
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"tier": { "enum": ["L0", "L1", "L2"] },
|
|
48
|
-
"phase": { "type": "
|
|
48
|
+
"phase": { "type": "number", "description": "Phase that introduced this entry. Numbers are allowed (e.g., 19.6, 27.5, 27.6, 27.7, 28.5) — decimal phases are valid per the long-standing precedent established by Phases 19.6 / 27.5 / 27.6 / 27.7 / 28.5." },
|
|
49
49
|
"description": { "type": "string" },
|
|
50
50
|
"registered_at": { "type": "string", "format": "date-time" }
|
|
51
51
|
},
|
|
@@ -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,159 @@
|
|
|
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 a reference. 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
|
+
- **When to add `scripts/`.** Per mattpocock's three criteria, add a script only when the
|
|
108
|
+
step is deterministic, repeated across runs, and the failure mode needs explicit error
|
|
109
|
+
handling. Anything ad-hoc or once-off stays inline as agent prose.
|
|
110
|
+
|
|
111
|
+
### Reference placement classes
|
|
112
|
+
|
|
113
|
+
Three placement classes by cross-domain consumer count (D-06, refreshed by Phase 28.6 D-04):
|
|
114
|
+
|
|
115
|
+
- **1-consumer (skill-private procedure refs).** Live in `skills/<owner>/<topic>.md` next
|
|
116
|
+
to the SKILL.md they describe. Cross-link from SKILL.md as `./<topic>.md`. Matches
|
|
117
|
+
mattpocock's per-skill folder pattern. Examples: `skills/scan/scan-procedure.md`,
|
|
118
|
+
`skills/debug/debug-feedback-loops.md`.
|
|
119
|
+
- **2-consumer (same-domain pair).** Live in the primary owner's skill folder. Secondary
|
|
120
|
+
consumer cross-links via `../<primary>/<topic>.md`. Examples:
|
|
121
|
+
`skills/cache-manager/cache-policy.md` (skills/warm-cache cross-links in);
|
|
122
|
+
`skills/peer-cli-add/peer-cli-protocol.md` (skills/peer-cli-customize + skills/peers
|
|
123
|
+
cross-link in).
|
|
124
|
+
- **Multi-consumer (3+ cross-domain).** Live in `reference/<topic>.md`. Used by 3+ skills
|
|
125
|
+
across different domains. Examples: `reference/typography.md`,
|
|
126
|
+
`reference/palette-catalog.md`, `reference/audit-scoring.md` (each consumed by 15+
|
|
127
|
+
skills).
|
|
128
|
+
|
|
129
|
+
### Migration policy
|
|
130
|
+
|
|
131
|
+
When a reference grows from 1-consumer to 3+ cross-domain consumers, migrate from
|
|
132
|
+
`skills/<owner>/` to `reference/` and update cross-links accordingly. When a centralized
|
|
133
|
+
ref shrinks to 1–2 consumers (or its consumers turn out to be same-domain), migrate the
|
|
134
|
+
other direction. Document the migration in the relevant phase's SUMMARY.md.
|
|
135
|
+
|
|
136
|
+
### Phase 28.6 retrospective
|
|
137
|
+
|
|
138
|
+
Phase 28.5 D-06 over-generalized by centralizing all extracted refs in `reference/`,
|
|
139
|
+
including procedure refs read by exactly one skill. Phase 28.6 corrected this by migrating
|
|
140
|
+
20 skill-private procedure refs back into their owning skill folders (D-01) and refreshing
|
|
141
|
+
this section to endorse per-skill folders as the canonical placement for 1-consumer
|
|
142
|
+
content (D-04). See
|
|
143
|
+
`.planning/phases/28.6-skill-reference-co-location/CONTEXT.md` for the full discipline.
|
|
144
|
+
|
|
145
|
+
Concrete example: a skill that lists 10 framework matrices inline (~150 lines) extracts
|
|
146
|
+
the matrices to `reference/<framework>-matrices.md` (if 3+ skills will consume them) or
|
|
147
|
+
`skills/<owner>/<framework>-matrices.md` (if only the owning skill reads them), then
|
|
148
|
+
replaces the inline content with a one-sentence summary + cross-link. SKILL.md drops to
|
|
149
|
+
~80 lines, the matrices stay discoverable, no institutional knowledge is lost.
|
|
150
|
+
|
|
151
|
+
## Validator usage
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
node scripts/validate-skill-length.cjs --quiet --json
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Exit codes: `0` clean, `1` warnings only, `2` blockers present. Flags: `--quiet` suppresses
|
|
158
|
+
per-skill output, `--strict-description` adds the form regex check, `--json` emits
|
|
159
|
+
machine-readable output. Env: `STRICT_DESCRIPTION=1` and `SKILLS_DIR=<path>` are honored.
|