@hegemonart/get-design-done 1.53.0 → 1.55.0
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 +88 -0
- package/README.md +4 -0
- package/SKILL.md +2 -1
- package/agents/component-taxonomy-mapper.md +3 -0
- package/agents/motion-mapper.md +1 -0
- package/agents/token-mapper.md +3 -0
- package/bin/gdd-dashboard +91 -0
- package/dist/claude-code/.claude/skills/new-addendum/SKILL.md +81 -0
- package/package.json +2 -1
- package/reference/frameworks/astro.md +43 -0
- package/reference/frameworks/nextjs.md +44 -0
- package/reference/frameworks/remix.md +44 -0
- package/reference/frameworks/storybook.md +44 -0
- package/reference/frameworks/sveltekit.md +43 -0
- package/reference/frameworks/vite-react.md +43 -0
- package/reference/interaction.md +1 -0
- package/reference/motion/framer-motion.md +45 -0
- package/reference/motion/gsap.md +45 -0
- package/reference/motion/motion-one.md +44 -0
- package/reference/motion/react-spring.md +44 -0
- package/reference/motion.md +1 -0
- package/reference/registry.json +163 -1
- package/reference/registry.schema.json +18 -1
- package/reference/skill-graph.md +2 -1
- package/reference/systems/chakra.md +44 -0
- package/reference/systems/css-modules.md +44 -0
- package/reference/systems/mui.md +44 -0
- package/reference/systems/radix-themes.md +43 -0
- package/reference/systems/shadcn.md +45 -0
- package/reference/systems/styled-components.md +44 -0
- package/reference/systems/tailwind.md +44 -0
- package/reference/systems/vanilla-extract.md +44 -0
- package/scripts/lib/dashboard/graph-html.cjs +0 -0
- package/scripts/lib/detect/stack.cjs +455 -0
- package/scripts/lib/detect/stack.d.cts +44 -0
- package/scripts/lib/explore-parallel-runner/index.ts +138 -1
- package/scripts/lib/explore-parallel-runner/types.ts +27 -0
- package/scripts/lib/health-mirror/index.cjs +218 -1
- package/scripts/lib/manifest/skills.json +8 -0
- package/scripts/lib/mapper-spawn.cjs +257 -0
- package/scripts/lib/mapper-spawn.d.cts +60 -0
- package/scripts/lib/new-addendum.cjs +204 -0
- package/sdk/cli/commands/dashboard.ts +419 -0
- package/sdk/cli/index.js +1388 -3
- package/sdk/cli/index.ts +7 -0
- package/sdk/dashboard/data/_pkg-root.cjs +92 -0
- package/sdk/dashboard/data/cost-aggregator.cjs +187 -0
- package/sdk/dashboard/data/discovery.cjs +297 -0
- package/sdk/dashboard/data/risk-surface.cjs +136 -0
- package/sdk/dashboard/data/source.cjs +576 -0
- package/sdk/dashboard/tui/ansi.cjs +355 -0
- package/sdk/dashboard/tui/index.cjs +778 -0
- package/sdk/mcp/gdd-mcp/server.js +1117 -0
- package/skills/new-addendum/SKILL.md +81 -0
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
},
|
|
6
6
|
"metadata": {
|
|
7
7
|
"description": "Get Design Done — 5-stage agent-orchestrated design pipeline with 9 connections, handoff-first workflow, bidirectional Figma write-back, 22+ specialized agents, queryable knowledge layer (intel store, dependency analysis, learnings extraction), and a self-improvement loop (reflector, frontmatter + budget feedback, global-skills layer). v1.20.0 ships the SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream, and resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) for rate-limit + 429 + context-overflow recovery. Full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation (auto-tag + GitHub Release + release-time smoke test).",
|
|
8
|
-
"version": "1.
|
|
8
|
+
"version": "1.55.0"
|
|
9
9
|
},
|
|
10
10
|
"plugins": [
|
|
11
11
|
{
|
|
12
12
|
"name": "get-design-done",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 22+ specialized agents, 9 connections (Figma, Refero, Preview, Storybook, Chromatic, Figma Writer, Graphify, Pinterest, Claude Design), Claude Design handoff, bidirectional Figma write-back, and a queryable intel store (.design/intel/) for dependency and learnings queries. Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation. Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain.",
|
|
15
|
-
"version": "1.
|
|
15
|
+
"version": "1.55.0",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "hegemonart"
|
|
18
18
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "get-design-done",
|
|
3
3
|
"short_name": "gdd",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.55.0",
|
|
5
5
|
"description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 59 specialized agents, 88 skills, 41 connection integrations (Figma, Refero, Preview, Storybook, Chromatic, Graphify, Slack, Linear, Jira, Notion, and more), handoff-first workflow via Claude Design bundles, bidirectional Figma write-back (annotations, Code Connect), queryable intel store (`.design/intel/`) for O(1) design surface lookups, and self-improvement loop (reflector agent, frontmatter + budget feedback, global-skills layer at `~/.claude/gdd/global-skills/`). Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings, reflect, apply-reflections. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows, lint + schema + frontmatter + stale-ref + shellcheck + gitleaks + injection-scan + blocking size-budget) and release automation (auto-tag + GitHub Release + release-time smoke test). Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain. v1.27.7 ships gdd-mcp (Phase 27.7): 12 read-only MCP tools for sub-3s priming. v1.28.0 (Phase 28): Foundational References Tier 2 — 5 new reference files (color-theory, composition, proportion-systems, i18n, contrast-advanced), 2 verifier i18n probes + 1 explore i18n-readiness probe, 12 additive cross-link insertions across 10 existing references, 2 orthogonal audit-scoring lens-tags (composition_alignment + i18n_readiness).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "hegemonart",
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,94 @@ All notable changes to get-design-done are documented here. Versions follow [sem
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [1.55.0] - 2026-06-03
|
|
8
|
+
|
|
9
|
+
### Phase 55 - GDD Dashboard (Multi-Harness Control Plane + Graph Visualization + Session Surface)
|
|
10
|
+
|
|
11
|
+
GDD ships to 14 runtimes and users run multi-harness sessions in parallel; a control plane is the natural way to surface
|
|
12
|
+
that. Phase 55 ships a READ-ONLY dashboard: a terminal TUI (`bin/gdd-dashboard`) and an opt-in browser graph view
|
|
13
|
+
(`gdd dashboard --web`) that visualizes the Phase 52 DesignContext graph. **Built fully dep-free** (maintainer Rule-4
|
|
14
|
+
decision): no Ink, no React / Vite / React Flow. The ROADMAP had named those stacks (~100 packages / ~84 MB + a CI build
|
|
15
|
+
gate); a footprint study plus the read-only / single-machine / opt-in scale made a hand-rolled ANSI TUI + a
|
|
16
|
+
self-contained-HTML graph (extending the Phase 35.5 `build-html.cjs` precedent) the better fit, and it keeps the
|
|
17
|
+
zero-new-dependency streak intact. The web layer is kept swappable, so a React Flow migration later needs no data rewrite.
|
|
18
|
+
Planned and executed via the GSD pipeline (3 + 3 parallel executors).
|
|
19
|
+
|
|
20
|
+
### Breaking changes
|
|
21
|
+
|
|
22
|
+
- **New `bin/gdd-dashboard` + `gdd dashboard [--web]`.** A new bin (the TUI) and a new SDK CLI subcommand. Read-only by
|
|
23
|
+
design: the dashboard never mutates state (the action surface is "open this file / copy this command / run the
|
|
24
|
+
slash-skill"). The `--web` server is an ephemeral LOCAL loopback (127.0.0.1, OS-assigned port) serving a single
|
|
25
|
+
self-contained HTML file to your own browser, then exits.
|
|
26
|
+
- **`gsd-health` gains a 10th check** (`dashboard_reachable`); the health check count moves 9 -> 10.
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- **Data plane** `sdk/dashboard/data/` - `source.cjs` (`loadDashboardModel` reads state / events / graph / health via the
|
|
31
|
+
shared libs in-process, with a `.design/*` file-scrape fallback; never throws), `cost-aggregator.cjs` (per-runtime +
|
|
32
|
+
cumulative + per-cycle), `discovery.cjs` (14-runtime detection, worktree enumeration via `git worktree list`,
|
|
33
|
+
best-effort session manifests).
|
|
34
|
+
- **TUI** `bin/gdd-dashboard` + `sdk/dashboard/tui/` - a hand-rolled ANSI render core (`ansi.cjs`: box/column layout,
|
|
35
|
+
width-aware truncation incl. CJK, line-diff repaint) + 5 panes (Sessions / Cycle / Cost / Findings /
|
|
36
|
+
DesignContext-tree), keyboard navigation, alt-screen, event-tail live refresh. Plain `.cjs` (no bundle, no flags).
|
|
37
|
+
- **Web graph** `scripts/lib/dashboard/graph-html.cjs` (`buildGraphHtml`) - one self-contained HTML doc (inline SVG +
|
|
38
|
+
vanilla JS): layered Atomic / Molecular / Organism / Template layout with barycenter crossing-reduction, viewBox
|
|
39
|
+
pan/zoom, click-to-inspect, type/tag filters, find-consumers highlight, unreachable outline, PNG export, minimap.
|
|
40
|
+
Deterministic (hermetic byte-equal test). Launched by `gdd dashboard --web` (`node:http` loopback + browser-open;
|
|
41
|
+
headless prints the URL; `--once` writes `.design/dashboard.html`).
|
|
42
|
+
- **Risk surfacing** `sdk/dashboard/data/risk-surface.cjs` - reads `risk_score`/`confidence` when present (Phase 56),
|
|
43
|
+
color-routes Allow/Review/RequireConfirmation/Block; a blank placeholder pre-56.
|
|
44
|
+
|
|
45
|
+
### Notes
|
|
46
|
+
|
|
47
|
+
- 6-manifest lockstep at **v1.55.0** + `OFF_CADENCE_VERSIONS.add('1.55.0')` + 37 `manifests-version.txt` baselines.
|
|
48
|
+
No new skill (the dashboard is a bin + CLI subcommand) -> skill-list / build:skills / skills.json unchanged. No new
|
|
49
|
+
agent. The dashboard's local `node:http` server is allowlisted in `scripts/security/outbound-allowlist.json` (an
|
|
50
|
+
inbound loopback read-only server, not outbound egress). Tarball golden 969 -> 979. **No new runtime dependency.**
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## [1.54.0] - 2026-06-03
|
|
55
|
+
|
|
56
|
+
### Phase 54 - Composable Reference Addendums (Per-DS + Per-Framework + Per-Motion-Lib)
|
|
57
|
+
|
|
58
|
+
One general mapper prompt could not be stack-aware: it missed Tailwind's `@theme` tokens, shadcn's `cn()` convention,
|
|
59
|
+
vanilla-extract's `style({})` shape. Phase 54 adds 18 composable prompt addendums (one per design system, framework, and
|
|
60
|
+
motion library) that the explore mappers compose into their prompt at spawn time based on the detected stack. Adapted
|
|
61
|
+
from Understand-Anything's per-language/per-framework addendum pattern. Maintainer-authored and vendor-cross-checked;
|
|
62
|
+
no LLM-generated content. Planned and executed via the GSD pipeline (5 parallel executors + 1 integration executor).
|
|
63
|
+
|
|
64
|
+
### Breaking changes
|
|
65
|
+
|
|
66
|
+
- **Mappers are now stack-aware.** `scripts/lib/detect/stack.cjs` detects `{ds, framework, motion_libs[]}` from
|
|
67
|
+
package.json deps + config files + import signatures; `scripts/lib/mapper-spawn.cjs` composes the matching addendums
|
|
68
|
+
(capped at 3: one DS, one framework, one motion) into each mapper's prompt before dispatch (additive and
|
|
69
|
+
backward-compatible: no detected stack or no addendum leaves the base prompt unchanged).
|
|
70
|
+
- **Registry gains a `stack-addendum` type.** `reference/registry.schema.json` adds `"stack-addendum"` to the entry
|
|
71
|
+
type enum and an optional `composes_into` field; the 18 addendums register against it with their target mappers.
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
|
|
75
|
+
- **Design-system addendums** (`reference/systems/`): tailwind, shadcn, radix-themes, mui, chakra, vanilla-extract,
|
|
76
|
+
styled-components, css-modules. **Framework addendums** (`reference/frameworks/`): nextjs, remix, vite-react, astro,
|
|
77
|
+
sveltekit, storybook. **Motion-lib addendums** (`reference/motion/`): framer-motion, gsap, motion-one, react-spring.
|
|
78
|
+
Each is at most 50 lines with four sections (Conventions, File patterns, Gotchas, and an Example output fragment in
|
|
79
|
+
the Phase 52 DesignContext schema).
|
|
80
|
+
- **`/gdd:new-addendum <kind> <name>`** skill + `scripts/lib/new-addendum.cjs` scaffolder (mirrors `/gdd:new-skill`;
|
|
81
|
+
validates the kind and slug, defaults `composes_into` by kind, writes the 4-section skeleton).
|
|
82
|
+
- **Fallback + coverage**: an unmatched stack falls back to the base prompt and flags the gap; `gsd-health` reports a
|
|
83
|
+
"N/M detected stacks have addendums" coverage row.
|
|
84
|
+
|
|
85
|
+
### Notes
|
|
86
|
+
|
|
87
|
+
- 6-manifest lockstep at **v1.54.0** + `OFF_CADENCE_VERSIONS.add('1.54.0')` + 37 `manifests-version.txt` baselines.
|
|
88
|
+
Re-locked: skill-list (91 -> 92, +new-addendum) + the phase-28.5 distribution (new-addendum at 81 lines, clean; warn
|
|
89
|
+
count unchanged at 10) + skill-graph + the registry-diff baseline (+18 stack-addendum entries) + resilience-primitives
|
|
90
|
+
(+mapper-spawn.cjs +new-addendum.cjs) + the phase-42 compile count (115 -> 116) + the gsd-health check count (8 -> 9).
|
|
91
|
+
Tarball golden 944 -> 969 (+25). **No new runtime dependency.**
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
7
95
|
## [1.53.0] - 2026-06-03
|
|
8
96
|
|
|
9
97
|
### Phase 53 - Semantic Mapper Engine (Louvain Batching + neighborMap + Fingerprint Incremental)
|
package/README.md
CHANGED
|
@@ -267,6 +267,10 @@ All 14 runtimes receive their native artifact layout (`skills/`, `command/`, `ag
|
|
|
267
267
|
|
|
268
268
|
**Semantic mapper engine (v1.53.0).** Mappers get smart about scale and re-runs on top of the Phase 52 graph. Louvain community batching (`scripts/lib/mappers/compute-batches.mjs`, dep-free, deterministic) groups files that import each other so each parallel mapper sees a coherent slice; a neighborMap sidecar (`neighbor-map.mjs`) hands each batch its 1-hop external symbols so cross-batch edges emit without rereading other batches. SHA-256 fingerprinting (`sdk/fingerprint/`) classifies each re-run as SKIP / PARTIAL / ARCHITECTURE / FULL, so `/gdd:discover` (now incremental by default, `--full` to override) only re-discovers what actually changed. A graph-context-reviewer agent runs nine checks on the assembled graph (hard-reject on schema or referential breakage, soft-warn otherwise). Node builtins only, no `graphology`, no embeddings. **No new runtime dependency.**
|
|
269
269
|
|
|
270
|
+
**Composable reference addendums (v1.54.0).** One general mapper prompt cannot know Tailwind's `@theme` tokens from shadcn's `cn()` from vanilla-extract's `style({})`. Phase 54 adds 18 stack-specific addendums (8 design systems, 6 frameworks, 4 motion libraries) under `reference/{systems,frameworks,motion}/`, each at most 50 lines with Conventions / File patterns / Gotchas / Example-output sections. `scripts/lib/detect/stack.cjs` detects the project stack from dependencies plus config files and import signatures; `scripts/lib/mapper-spawn.cjs` composes the matching addendums (capped at one DS + one framework + one motion) into each explore mapper's prompt at spawn time, additively, so a project on an unknown stack just keeps the base prompt and `gsd-health` reports the coverage gap. A `/gdd:new-addendum` scaffolder adds more. Maintainer-authored, vendor-cross-checked, no LLM-generated content. **No new runtime dependency.**
|
|
271
|
+
|
|
272
|
+
**GDD dashboard (v1.55.0).** A read-only multi-harness control plane. `gdd-dashboard` opens a terminal TUI with five panes (sessions per runtime, current cycle, cost telemetry, findings, a DesignContext tree); `gdd dashboard --web` opens an interactive browser view of the Phase 52 graph (layered Atomic/Molecular/Organism/Template layout, pan/zoom, click-to-inspect, type/tag filters, find-consumers highlight, PNG export, minimap). It is **built fully dep-free** (a maintainer decision over the roadmap's Ink + React Flow + Vite stack, which would have added ~100 packages): the TUI is a hand-rolled ANSI renderer, the graph view is a self-contained HTML file (inline SVG + vanilla JS, extending the export builder), and the data plane reads GDD state through the existing shared libraries in-process. Read-only by design (the action surface is open-file / copy-command / run-skill); the `--web` server is a local loopback that serves to your own browser and exits. **No new runtime dependency.**
|
|
273
|
+
|
|
270
274
|
Verify with:
|
|
271
275
|
|
|
272
276
|
```
|
package/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: get-design-done
|
|
3
3
|
short_name: gdd
|
|
4
4
|
description: "Master design pipeline for Claude Code. 5-stage workflow: Brief → Explore → Plan → Design → Verify. Run 'brief' first in any new project to capture the design problem, then 'explore' to inventory the codebase and interview for context. Invoke without arguments for status and auto-routing."
|
|
5
|
-
argument-hint: "[brief|explore|plan|design|verify|handoff|map|next|help|status|style|darkmode|live|compare|figma-write|graphify|discuss|list-assumptions|progress|health|todo|stats|note|plant-seed|add-backlog|review-backlog|scan|discover|settings|update|reapply-patches|audit|pause|resume|new-cycle|debug|quick|new-project|complete-cycle|fast|do|ship|undo|pr-branch|sketch|sketch-wrap-up|spike|spike-wrap-up|reflect|apply-reflections|analyze-dependencies|extract-learnings|skill-manifest|pin|unpin|list-pins|new-skill|instinct|warm-cache|optimize|cache-manager|watch-authorities|check-update|benchmark|recall|timeline|continue|zoom-out]"
|
|
5
|
+
argument-hint: "[brief|explore|plan|design|verify|handoff|map|next|help|status|style|darkmode|live|compare|figma-write|graphify|discuss|list-assumptions|progress|health|todo|stats|note|plant-seed|add-backlog|review-backlog|scan|discover|settings|update|reapply-patches|audit|pause|resume|new-cycle|debug|quick|new-project|complete-cycle|fast|do|ship|undo|pr-branch|sketch|sketch-wrap-up|spike|spike-wrap-up|reflect|apply-reflections|analyze-dependencies|extract-learnings|skill-manifest|pin|unpin|list-pins|new-skill|new-addendum|instinct|warm-cache|optimize|cache-manager|watch-authorities|check-update|benchmark|recall|timeline|continue|zoom-out]"
|
|
6
6
|
user-invocable: true
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -94,6 +94,7 @@ Each stage produces artifacts in `.design/` inside the current project.
|
|
|
94
94
|
| `unpin <skill>` | `get-design-done:gdd-unpin` | Phase 46 - remove pinned aliases for a skill (only files carrying the gdd-pinned-skill marker) |
|
|
95
95
|
| `list-pins` | `get-design-done:gdd-list-pins` | Phase 46 - show pinned aliases per harness with their source skill and last-pinned timestamp |
|
|
96
96
|
| `new-skill <name>` | `get-design-done:gdd-new-skill` | Phase 50 - interactive scaffolder for a new Phase 28.5 + v3-compliant skill (multi-paragraph description, lifecycle stage, optional composes_with); writes source/skills/<name>/SKILL.md |
|
|
97
|
+
| `new-addendum <kind> <name>` | `get-design-done:gdd-new-addendum` | Phase 54 - scaffold a composable reference addendum (kind = system\|framework\|motion); validates the slug, defaults composes_into by kind, writes a 4-section skeleton at reference/{systems\|frameworks\|motion}/<name>.md that an explore mapper composes at spawn time |
|
|
97
98
|
| `instinct [list\|query <kw>\|promote <id>]` | `get-design-done:gdd-instinct` | Phase 51 - inspect and manage atomic instinct learning units (project + global stores); list, search by keyword, or promote a vetted project instinct to global once it clears the cross-project gate |
|
|
98
99
|
| `quality-gate` | `get-design-done:quality-gate` | Phase 25 - parallel lint/type/test/visual command runner; classifies failures via quality-gate-runner agent |
|
|
99
100
|
| `turn-closeout` | `get-design-done:turn-closeout` | Phase 25 - Stop-hook mirror skill; finalizes per-turn STATE blocks and emits closeout events |
|
|
@@ -18,6 +18,9 @@ writes:
|
|
|
18
18
|
|
|
19
19
|
# component-taxonomy-mapper
|
|
20
20
|
|
|
21
|
+
<!-- {{addendum_block}} -->
|
|
22
|
+
Stack-specific guidance (a `## Stack-specific guidance` block for the detected DS / framework / motion library) is appended here at spawn time by `scripts/lib/mapper-spawn.cjs`. When present, follow it as an extension of the rules below.
|
|
23
|
+
|
|
21
24
|
## Role
|
|
22
25
|
|
|
23
26
|
You inventory the component taxonomy of the codebase. Zero session memory. You do not modify source code or spawn other agents.
|
package/agents/motion-mapper.md
CHANGED
|
@@ -18,6 +18,7 @@ writes:
|
|
|
18
18
|
|
|
19
19
|
# motion-mapper
|
|
20
20
|
|
|
21
|
+
<!-- {{addendum_block}}: a `## Stack-specific guidance` block for the detected DS / framework / motion library is appended here at spawn time by scripts/lib/mapper-spawn.cjs. When present, follow it as an extension of the rules below. -->
|
|
21
22
|
## Role
|
|
22
23
|
|
|
23
24
|
You inventory motion and animation patterns. Zero session memory. You do not modify source code and do not spawn other agents.
|
package/agents/token-mapper.md
CHANGED
|
@@ -18,6 +18,9 @@ writes:
|
|
|
18
18
|
|
|
19
19
|
# token-mapper
|
|
20
20
|
|
|
21
|
+
<!-- {{addendum_block}} -->
|
|
22
|
+
Stack-specific guidance (a `## Stack-specific guidance` block for the detected DS / framework / motion library) is appended here at spawn time by `scripts/lib/mapper-spawn.cjs`. When present, follow it as an extension of the rules below.
|
|
23
|
+
|
|
21
24
|
## Role
|
|
22
25
|
|
|
23
26
|
You map design tokens from the codebase. Zero session memory - everything you need is in the prompt and `<required_reading>`. You do not modify source code or spawn other agents.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// bin/gdd-dashboard — Phase 55 (GDD Dashboard, DEP-FREE), TUI-01 (executor D).
|
|
3
|
+
//
|
|
4
|
+
// CJS trampoline that launches the terminal dashboard
|
|
5
|
+
// (sdk/dashboard/tui/index.cjs) under `node`, forwarding argv + the child's
|
|
6
|
+
// exit code / signal. Windows-safe.
|
|
7
|
+
//
|
|
8
|
+
// SIMPLER than bin/gdd-sdk (R8): the TUI is plain `.cjs` (Node builtins only),
|
|
9
|
+
// so there is NO esbuild bundle and NO `--experimental-strip-types` flag — we
|
|
10
|
+
// just `node <entry>`. The only reason this is a spawning trampoline (rather
|
|
11
|
+
// than a direct require) is the same one gdd-sdk documents: npm's
|
|
12
|
+
// auto-generated Windows `.cmd` shim invokes `node bin/gdd-dashboard` and we
|
|
13
|
+
// want a single, platform-uniform launch path that cleanly forwards the exit
|
|
14
|
+
// code and re-raises a terminating signal (so Ctrl-C tears down correctly).
|
|
15
|
+
//
|
|
16
|
+
// Sibling resolution uses a PACKAGE-ROOT WALK-UP (the Phase 53/54 lesson, D7),
|
|
17
|
+
// never a fixed `__dirname`-relative cross-tree jump: we climb from this file's
|
|
18
|
+
// directory to the GDD package root (package.json with name
|
|
19
|
+
// "get-design-done") and resolve `sdk/dashboard/tui/index.cjs` from there. This
|
|
20
|
+
// keeps the bin correct even if it is copied/relocated within the tree.
|
|
21
|
+
|
|
22
|
+
'use strict';
|
|
23
|
+
|
|
24
|
+
const { spawn } = require('node:child_process');
|
|
25
|
+
const fs = require('node:fs');
|
|
26
|
+
const path = require('node:path');
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Walk up from `startDir` to the GDD package root: the first ancestor whose
|
|
30
|
+
* package.json declares `name === "get-design-done"`. Falls back to the first
|
|
31
|
+
* ancestor that has any package.json, then to `startDir`. Bounded climb.
|
|
32
|
+
* @param {string} startDir
|
|
33
|
+
* @returns {string} absolute package-root directory
|
|
34
|
+
*/
|
|
35
|
+
function findPackageRoot(startDir) {
|
|
36
|
+
let dir = path.resolve(startDir);
|
|
37
|
+
let firstWithPkg = null;
|
|
38
|
+
for (let i = 0; i < 12; i++) {
|
|
39
|
+
const pkgPath = path.join(dir, 'package.json');
|
|
40
|
+
let pkg = null;
|
|
41
|
+
try {
|
|
42
|
+
pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
43
|
+
} catch {
|
|
44
|
+
pkg = null;
|
|
45
|
+
}
|
|
46
|
+
if (pkg) {
|
|
47
|
+
if (firstWithPkg === null) firstWithPkg = dir;
|
|
48
|
+
if (pkg.name === 'get-design-done') return dir;
|
|
49
|
+
}
|
|
50
|
+
const parent = path.dirname(dir);
|
|
51
|
+
if (parent === dir) break;
|
|
52
|
+
dir = parent;
|
|
53
|
+
}
|
|
54
|
+
return firstWithPkg || path.resolve(startDir);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const root = findPackageRoot(__dirname);
|
|
58
|
+
const entry = path.join(root, 'sdk', 'dashboard', 'tui', 'index.cjs');
|
|
59
|
+
|
|
60
|
+
if (!fs.existsSync(entry)) {
|
|
61
|
+
// eslint-disable-next-line no-console
|
|
62
|
+
console.error(`gdd-dashboard: TUI entry not found at ${entry}`);
|
|
63
|
+
process.exit(3);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const child = spawn(process.execPath, [entry, ...process.argv.slice(2)], {
|
|
67
|
+
stdio: 'inherit',
|
|
68
|
+
shell: false,
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
child.on('exit', (code, signal) => {
|
|
72
|
+
if (signal) {
|
|
73
|
+
// Re-raise the signal so the parent shell sees the same termination mode
|
|
74
|
+
// (e.g. Ctrl+C propagates as SIGINT). Falls back to a non-zero exit if the
|
|
75
|
+
// self-signal cannot be delivered.
|
|
76
|
+
try {
|
|
77
|
+
process.kill(process.pid, signal);
|
|
78
|
+
} catch {
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
process.exit(typeof code === 'number' ? code : 0);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
child.on('error', (err) => {
|
|
87
|
+
// Failure to spawn node itself — extremely rare; surface to stderr.
|
|
88
|
+
// eslint-disable-next-line no-console
|
|
89
|
+
console.error('gdd-dashboard: failed to launch the TUI:', err.message);
|
|
90
|
+
process.exit(3);
|
|
91
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-new-addendum
|
|
3
|
+
description: "Scaffolds a new Phase-54 composable reference addendum for a design-system, framework, or motion library: validates the kind and the slug, defaults composes_into by kind, and writes a 4-section skeleton at reference/{systems|frameworks|motion}/<name>.md from the pure generator. Use when adding stack-specific guidance that an explore mapper should compose at spawn time and you want the frontmatter, the composes_into wiring, and the mandatory sections correct from the first commit. Activates for requests involving authoring a reference addendum, adding stack-specific mapper guidance, scaffolding a systems or frameworks or motion doc, or registering a new design-system."
|
|
4
|
+
argument-hint: "<kind> <name>"
|
|
5
|
+
tools: Read, Write, Bash, AskUserQuestion
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /gdd:new-addendum
|
|
10
|
+
|
|
11
|
+
**Role:** Scaffold a contract-compliant stack addendum. Validate the kind and the name, then write `reference/{systems|frameworks|motion}/<name>.md` from the pure generator at `scripts/lib/new-addendum.cjs`. This skill writes ONE reference file. It does NOT touch `reference/registry.json` and does NOT run any build; it prints the exact follow-up steps instead.
|
|
12
|
+
|
|
13
|
+
An addendum is a registry entry, not a skill. Read `reference/registry.json` for the `type:"stack-addendum"` entry shape and `scripts/lib/mapper-spawn.cjs` for how `composes_into` selects an addendum at spawn time. Read one shipped example first, for instance `reference/systems/tailwind.md`, to match the house style.
|
|
14
|
+
|
|
15
|
+
## Step 1 - Gather the fields
|
|
16
|
+
|
|
17
|
+
1. **kind**: the first token of `$ARGUMENTS` if present, else ask. Must be one of `system`, `framework`, or `motion`. This picks the target subdir and the default `composes_into`.
|
|
18
|
+
2. **name**: the second token of `$ARGUMENTS` if present, else ask. Must match `^[a-z0-9][a-z0-9-._]*$`. The basename is also the matcher key in `mapper-spawn.cjs`, so it must equal the value `detectStack` reports for this stack (for example `tailwind`, `nextjs`, `framer-motion`). Reject a `reference/{dir}/<name>.md` collision.
|
|
19
|
+
3. **composes_into** (optional): accept the kind default, or override with a comma list of mapper names. Defaults: `system` to `token-mapper, component-taxonomy-mapper`; `framework` to `component-taxonomy-mapper, visual-hierarchy-mapper`; `motion` to `motion-mapper`.
|
|
20
|
+
|
|
21
|
+
Resolve the target path and check for a collision:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
node -e "
|
|
25
|
+
const a = require('./scripts/lib/new-addendum.cjs');
|
|
26
|
+
console.log(a.targetPathFor(process.argv[1], process.argv[2]));
|
|
27
|
+
" "<kind>" "<name>"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If that path already exists, stop and tell the user to edit the existing file instead.
|
|
31
|
+
|
|
32
|
+
## Step 2 - Write the file
|
|
33
|
+
|
|
34
|
+
Build the record and render the skeleton with the pure generator, then write it with the Write tool (not shell redirection):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
node -e "
|
|
38
|
+
const a = require('./scripts/lib/new-addendum.cjs');
|
|
39
|
+
const rec = a.buildAddendumRecord({
|
|
40
|
+
kind: process.env.AD_KIND,
|
|
41
|
+
name: process.env.AD_NAME,
|
|
42
|
+
composesInto: process.env.AD_COMPOSES || undefined,
|
|
43
|
+
});
|
|
44
|
+
process.stdout.write(a.renderAddendumMd(rec));
|
|
45
|
+
"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`buildAddendumRecord` throws on an invalid kind, an invalid name, or a malformed composes_into list. Surface the thrown message to the user and re-prompt the offending field. Capture stdout and write it verbatim to the path from Step 1 via the Write tool.
|
|
49
|
+
|
|
50
|
+
## Step 3 - Fill the four sections
|
|
51
|
+
|
|
52
|
+
The skeleton ships four mandatory sections with TODO placeholders: Conventions, File patterns, Gotchas, Example output. Replace every TODO with terse vendor-checked bullets (keep the file at or under about 50 lines). Rules:
|
|
53
|
+
|
|
54
|
+
- Lead with the real vendor docs URL in the attribution comment.
|
|
55
|
+
- The Example output block uses ONLY the Phase 52 DesignContext schema (node types token / component / variant / state / motion-fragment / screen / layer; edge types uses-token / composes / extends / transitions-to / mirrors).
|
|
56
|
+
- Tags must come from `reference/design-context-tag-vocab.md`; drop any tag not in that vocabulary.
|
|
57
|
+
- For a motion addendum, reuse the `reference/motion-transition-taxonomy.md` duration classes (instant / quick / standard / slow / narrative) and call out the seconds-vs-ms-vs-no-duration unit trap.
|
|
58
|
+
- No em dashes anywhere (the `lint:prose` gate scans `reference/`).
|
|
59
|
+
|
|
60
|
+
## Step 4 - Tell the user the follow-up
|
|
61
|
+
|
|
62
|
+
The skill stops here by contract. Print the next steps for the maintainer to run:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
1. Add a registry entry for "<name>" to reference/registry.json
|
|
66
|
+
(name addendum-<kind>-<name>, path, type "stack-addendum", phase 54, kind, composes_into, description).
|
|
67
|
+
2. node -e "require('./scripts/lib/reference-registry.cjs').validateRegistry({cwd:process.cwd()})"
|
|
68
|
+
must report ok:true (the round-trip scan picks up the new subdir file).
|
|
69
|
+
3. npm test (the reference-registry + phase-54 suites must stay green).
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The registry round-trip test stays red until the registry entry exists; that is expected and is the maintainer's step.
|
|
73
|
+
|
|
74
|
+
## Do Not
|
|
75
|
+
|
|
76
|
+
- Do not edit `reference/registry.json`, `package.json`, or `scripts/lib/manifest/skills.json`.
|
|
77
|
+
- Do not run a build or the registry generator for the user; print the steps.
|
|
78
|
+
- Do not write the file with shell redirection; use the Write tool so the content is exact.
|
|
79
|
+
- Do not invent vendor facts; the addendum content must be vendor-checked.
|
|
80
|
+
|
|
81
|
+
## NEW-ADDENDUM COMPLETE
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hegemonart/get-design-done",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.55.0",
|
|
4
4
|
"description": "A design-quality pipeline for AI coding agents: brief, plan, implement, and verify UI work against your design system.",
|
|
5
5
|
"author": "Hegemon",
|
|
6
6
|
"homepage": "https://github.com/hegemonart/get-design-done",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"NOTICE"
|
|
35
35
|
],
|
|
36
36
|
"bin": {
|
|
37
|
+
"gdd-dashboard": "./bin/gdd-dashboard",
|
|
37
38
|
"gdd-detect": "./bin/gdd-detect",
|
|
38
39
|
"gdd-events": "./scripts/cli/gdd-events.mjs",
|
|
39
40
|
"gdd-graph": "./bin/gdd-graph",
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: astro
|
|
3
|
+
kind: framework
|
|
4
|
+
composes_into: [component-taxonomy-mapper, visual-hierarchy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://docs.astro.build. -->
|
|
8
|
+
|
|
9
|
+
# Astro
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- An `.astro` file is a script fence (the `---` code fence runs at build or on the server) plus an HTML template; props arrive via `Astro.props`.
|
|
14
|
+
- File routing lives in `src/pages/` (`.astro` and `.md`). Framework components are static by default; `client:load`, `client:idle`, `client:visible`, and `client:only` directives mark hydration, which is the interactivity signal.
|
|
15
|
+
- `<style>` is scoped by default; `is:global` or `:global()` escapes the scope. Content collections are typed Markdown or MDX in `src/content/`, configured by `content.config.ts` with Zod.
|
|
16
|
+
|
|
17
|
+
## File patterns
|
|
18
|
+
|
|
19
|
+
- `src/pages/**/*.astro`, `src/layouts/*.astro`, `src/components/*.astro`, `content.config.ts`, `astro.config.mjs`.
|
|
20
|
+
- Identify via: astro in deps plus a `src/pages/` directory.
|
|
21
|
+
|
|
22
|
+
## Gotchas
|
|
23
|
+
|
|
24
|
+
- Most `.astro` files ship zero js; only `client:*`-directed islands are interactive, so motion attaches only to hydrated islands.
|
|
25
|
+
- Scoped `<style>` rewrites class names locally; treat those names as component-local, not global tokens.
|
|
26
|
+
- `src/pages/*.astro` files are screens; layouts wrap them via a `<slot/>` (emit a composes edge).
|
|
27
|
+
- Global tokens enter via an `is:global` block or a stylesheet imported in a layout.
|
|
28
|
+
|
|
29
|
+
## Example output
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"schema_version": "52.0",
|
|
34
|
+
"nodes": [
|
|
35
|
+
{ "id": "scr.index", "type": "screen", "name": "/", "summary": "Home page from src/pages/index.astro.", "complexity": "simple", "tags": ["navigation"] },
|
|
36
|
+
{ "id": "lay.base", "type": "layer", "subtype": "Template", "name": "BaseLayout", "summary": "Layout wrapping pages via slot, holds global styles.", "complexity": "moderate", "tags": ["template", "layout"] },
|
|
37
|
+
{ "id": "cmp.counter", "type": "component", "name": "Counter", "summary": "Hydrated island marked client:visible, interactive.", "complexity": "moderate", "tags": ["interactive"] }
|
|
38
|
+
],
|
|
39
|
+
"edges": [
|
|
40
|
+
{ "source": "lay.base", "target": "scr.index", "type": "composes", "direction": "forward", "weight": 0.9 }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nextjs
|
|
3
|
+
kind: framework
|
|
4
|
+
composes_into: [component-taxonomy-mapper, visual-hierarchy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://nextjs.org/docs/app. -->
|
|
8
|
+
|
|
9
|
+
# Next.js
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- Two routers. App Router (`app/`): folder names are URL segments; `page.tsx` is the routable surface (a screen node). `layout.tsx` wraps and nests its segment; the root layout owns `<html>`/`<body>` and imports `globals.css`.
|
|
14
|
+
- Special files: `loading`, `error`, `template`, `route`. Server Components are the default; `'use client'` marks the client boundary, and only client components are interactive.
|
|
15
|
+
- Pages Router (legacy `pages/`): one file is one route; `_app`/`_document` are shells; data via `getServerSideProps`/`getStaticProps`.
|
|
16
|
+
|
|
17
|
+
## File patterns
|
|
18
|
+
|
|
19
|
+
- App Router: `app/**/page.tsx`, `app/**/layout.tsx`, `app/globals.css`.
|
|
20
|
+
- Pages Router: `pages/**`, `pages/_app.tsx`, `pages/_document.tsx`.
|
|
21
|
+
- Identify via: next in deps plus an `app/` or `pages/` directory.
|
|
22
|
+
|
|
23
|
+
## Gotchas
|
|
24
|
+
|
|
25
|
+
- Screen nodes are `page.tsx` files; set the node path to the route, not the file path.
|
|
26
|
+
- A `layout.tsx` plus `page.tsx` in one folder is one screen and its layout; emit a composes edge layout to page.
|
|
27
|
+
- Without `'use client'`, a component is not a motion or hover candidate; the boundary gates interactivity.
|
|
28
|
+
- Global tokens enter at the root-layout `globals.css`.
|
|
29
|
+
|
|
30
|
+
## Example output
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"schema_version": "52.0",
|
|
35
|
+
"nodes": [
|
|
36
|
+
{ "id": "scr.dashboard", "type": "screen", "name": "/dashboard", "summary": "Routable dashboard page from app/dashboard/page.tsx.", "complexity": "moderate", "tags": ["navigation", "layout"] },
|
|
37
|
+
{ "id": "lay.root", "type": "layer", "subtype": "Template", "name": "RootLayout", "summary": "Root layout owning html and body, imports global tokens.", "complexity": "moderate", "tags": ["template", "layout"] },
|
|
38
|
+
{ "id": "cmp.chart", "type": "component", "name": "Chart", "summary": "Client component marked use client, interactive.", "complexity": "complex", "tags": ["interactive", "data-display"] }
|
|
39
|
+
],
|
|
40
|
+
"edges": [
|
|
41
|
+
{ "source": "lay.root", "target": "scr.dashboard", "type": "composes", "direction": "forward", "weight": 0.9 }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remix
|
|
3
|
+
kind: framework
|
|
4
|
+
composes_into: [component-taxonomy-mapper, visual-hierarchy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://remix.run/docs/en/main/file-conventions/routes (Remix v2 / React Router v7 framework mode). -->
|
|
8
|
+
|
|
9
|
+
# Remix
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- `app/routes/` uses file conventions; `app/root.tsx` is the root layout and renders an `Outlet`.
|
|
14
|
+
- Flat-routes v2: dot-delimited filenames nest, so `concerts.$city.tsx` is a child of `concerts.tsx` and renders inside its `Outlet`. A trailing `_` opts a segment out of layout nesting; a leading `_` marks a pathless layout.
|
|
15
|
+
- Each route module co-locates a `loader` (server read), an `action` (server mutation), and a default-export component (the screen).
|
|
16
|
+
- Global styles ship via an exported `links` array or a CSS import in `root.tsx`.
|
|
17
|
+
|
|
18
|
+
## File patterns
|
|
19
|
+
|
|
20
|
+
- `app/root.tsx`, `app/routes/*.tsx` (dot-segment names).
|
|
21
|
+
- Identify via: @remix-run/* or react-router in deps plus an `app/routes/` directory.
|
|
22
|
+
|
|
23
|
+
## Gotchas
|
|
24
|
+
|
|
25
|
+
- A route file is a screen; parse the dot-naming to recover the layout tree and emit composes edges parent to child.
|
|
26
|
+
- `loader` and `action` are server data functions, not components; do not map them as nodes.
|
|
27
|
+
- A trailing `_` breaks visual nesting even when the dot path looks nested; respect it when building edges.
|
|
28
|
+
- Tokens enter via the `root.tsx` global stylesheet.
|
|
29
|
+
|
|
30
|
+
## Example output
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"schema_version": "52.0",
|
|
35
|
+
"nodes": [
|
|
36
|
+
{ "id": "lay.root", "type": "layer", "subtype": "Template", "name": "Root", "summary": "Root layout with Outlet and global links.", "complexity": "moderate", "tags": ["template", "layout"] },
|
|
37
|
+
{ "id": "scr.concerts", "type": "screen", "name": "concerts", "summary": "Parent route screen rendering nested city Outlet.", "complexity": "moderate", "tags": ["navigation"] },
|
|
38
|
+
{ "id": "scr.concerts.city", "type": "screen", "name": "concerts.$city", "summary": "Child route screen nested in concerts via dot naming.", "complexity": "simple", "tags": ["navigation"] }
|
|
39
|
+
],
|
|
40
|
+
"edges": [
|
|
41
|
+
{ "source": "scr.concerts", "target": "scr.concerts.city", "type": "composes", "direction": "forward", "weight": 0.8 }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: storybook
|
|
3
|
+
kind: framework
|
|
4
|
+
composes_into: [component-taxonomy-mapper, visual-hierarchy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://storybook.js.org/docs/writing-stories. -->
|
|
8
|
+
|
|
9
|
+
# Storybook
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- The richest source of variant and state nodes. A `*.stories.tsx` file in CSF3 has a default export (the meta, typed `Meta<typeof X>`, with `component`, `title`, `args`, `argTypes`) and named exports (the stories, typed `StoryObj`, mostly `args`).
|
|
14
|
+
- Each named story is a concrete variant or state of one component (Primary, Disabled, Loading, Small).
|
|
15
|
+
- `argTypes` declares the controllable prop space; its enumerated `options` describe the full variant axis. `decorators` wrap a story; `play` scripts an interaction.
|
|
16
|
+
|
|
17
|
+
## File patterns
|
|
18
|
+
|
|
19
|
+
- `*.stories.@(tsx|jsx|ts|mdx)`, `.storybook/main.ts`, `.storybook/preview.ts` or `preview.tsx`.
|
|
20
|
+
- Identify via: @storybook/* in deps plus any `*.stories.*` file.
|
|
21
|
+
|
|
22
|
+
## Gotchas
|
|
23
|
+
|
|
24
|
+
- Map each named story to a variant node, or a state node when the name or args set hover, focus, disabled, active, or loading; link it back to `meta.component` via composes or extends.
|
|
25
|
+
- `argTypes.options` enumerates the full variant space and is richer than a source scan; prefer it.
|
|
26
|
+
- The meta default export is metadata, not a component; decorators are wrappers, not nodes.
|
|
27
|
+
- Handle CSF2 (a `template.bind({})` story) the same as CSF3.
|
|
28
|
+
|
|
29
|
+
## Example output
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"schema_version": "52.0",
|
|
34
|
+
"nodes": [
|
|
35
|
+
{ "id": "cmp.button", "type": "component", "name": "Button", "summary": "Component referenced by the stories meta.", "complexity": "moderate", "tags": ["interactive", "atom"] },
|
|
36
|
+
{ "id": "var.button.primary", "type": "variant", "name": "Primary", "summary": "Primary variant story of Button.", "complexity": "simple", "tags": ["interactive"] },
|
|
37
|
+
{ "id": "st.button.disabled", "type": "state", "name": "Disabled", "summary": "Disabled state story of Button.", "complexity": "simple", "tags": ["disabled", "state"] }
|
|
38
|
+
],
|
|
39
|
+
"edges": [
|
|
40
|
+
{ "source": "var.button.primary", "target": "cmp.button", "type": "extends", "direction": "forward", "weight": 0.9 },
|
|
41
|
+
{ "source": "st.button.disabled", "target": "cmp.button", "type": "extends", "direction": "forward", "weight": 0.9 }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sveltekit
|
|
3
|
+
kind: framework
|
|
4
|
+
composes_into: [component-taxonomy-mapper, visual-hierarchy-mapper]
|
|
5
|
+
phase: 54
|
|
6
|
+
---
|
|
7
|
+
<!-- Vendor docs: https://svelte.dev/docs/kit/routing. -->
|
|
8
|
+
|
|
9
|
+
# SvelteKit
|
|
10
|
+
|
|
11
|
+
## Conventions
|
|
12
|
+
|
|
13
|
+
- `src/routes/` uses file routing: `+page.svelte` is a screen, `+layout.svelte` is a wrapper (hierarchical, via `<slot/>` or `{@render children()}`), `+page.ts`/`+page.server.ts` hold `load`, and `+server.ts` is an endpoint.
|
|
14
|
+
- `<style>` in a `.svelte` file is auto-scoped; `:global()` escapes the scope.
|
|
15
|
+
- Shared code lives in `src/lib/` behind the `$lib` alias. Global CSS (`app.css`) is imported once in the root `+layout.svelte`. `src/app.html` is the document shell.
|
|
16
|
+
|
|
17
|
+
## File patterns
|
|
18
|
+
|
|
19
|
+
- `src/routes/**/+page.svelte`, `+layout.svelte`, `src/lib/`, `src/app.css`, `svelte.config.js`.
|
|
20
|
+
- Identify via: @sveltejs/kit in deps plus a `src/routes/` directory.
|
|
21
|
+
|
|
22
|
+
## Gotchas
|
|
23
|
+
|
|
24
|
+
- Only `+page`-prefixed and `+layout`-prefixed files are routes; a sibling `+page.server.ts` is data, not a screen.
|
|
25
|
+
- Layout nesting follows directory depth; emit one composes edge per level from layout to page.
|
|
26
|
+
- Scoped styles are component-local; do not promote those class names to global tokens.
|
|
27
|
+
- Tokens live in `app.css` under `:root` or a `$lib` theme module; a `$lib` import is a depends-on edge.
|
|
28
|
+
|
|
29
|
+
## Example output
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"schema_version": "52.0",
|
|
34
|
+
"nodes": [
|
|
35
|
+
{ "id": "scr.home", "type": "screen", "name": "/", "summary": "Home screen from src/routes/+page.svelte.", "complexity": "simple", "tags": ["navigation"] },
|
|
36
|
+
{ "id": "lay.root", "type": "layer", "subtype": "Template", "name": "RootLayout", "summary": "Root +layout.svelte wrapping pages, imports app.css.", "complexity": "moderate", "tags": ["template", "layout"] },
|
|
37
|
+
{ "id": "tok.color.bg", "type": "token", "subtype": "color", "name": "--bg", "summary": "Surface color token declared in app.css :root.", "complexity": "simple", "tags": ["color", "surface"] }
|
|
38
|
+
],
|
|
39
|
+
"edges": [
|
|
40
|
+
{ "source": "lay.root", "target": "scr.home", "type": "composes", "direction": "forward", "weight": 0.9 }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
```
|