@hegemonart/get-design-done 1.0.7

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.
Files changed (144) hide show
  1. package/.claude-plugin/marketplace.json +63 -0
  2. package/.claude-plugin/plugin.json +54 -0
  3. package/CHANGELOG.md +221 -0
  4. package/LICENSE +21 -0
  5. package/README.md +724 -0
  6. package/SKILL.md +232 -0
  7. package/agents/README.md +226 -0
  8. package/agents/a11y-mapper.md +118 -0
  9. package/agents/component-taxonomy-mapper.md +88 -0
  10. package/agents/design-advisor.md +139 -0
  11. package/agents/design-assumptions-analyzer.md +171 -0
  12. package/agents/design-auditor.md +383 -0
  13. package/agents/design-context-builder.md +544 -0
  14. package/agents/design-context-checker-gate.md +90 -0
  15. package/agents/design-context-checker.md +260 -0
  16. package/agents/design-discussant.md +98 -0
  17. package/agents/design-doc-writer.md +229 -0
  18. package/agents/design-executor.md +452 -0
  19. package/agents/design-figma-writer.md +302 -0
  20. package/agents/design-fixer.md +180 -0
  21. package/agents/design-integration-checker-gate.md +93 -0
  22. package/agents/design-integration-checker.md +326 -0
  23. package/agents/design-pattern-mapper.md +206 -0
  24. package/agents/design-phase-researcher.md +229 -0
  25. package/agents/design-plan-checker.md +164 -0
  26. package/agents/design-planner.md +352 -0
  27. package/agents/design-reflector.md +175 -0
  28. package/agents/design-research-synthesizer.md +127 -0
  29. package/agents/design-verifier-gate.md +97 -0
  30. package/agents/design-verifier.md +605 -0
  31. package/agents/gdd-graphify-sync.md +100 -0
  32. package/agents/gdd-intel-updater.md +88 -0
  33. package/agents/gdd-learnings-extractor.md +85 -0
  34. package/agents/motion-mapper.md +103 -0
  35. package/agents/token-mapper.md +103 -0
  36. package/agents/visual-hierarchy-mapper.md +95 -0
  37. package/connections/chromatic.md +247 -0
  38. package/connections/claude-design.md +190 -0
  39. package/connections/connections.md +218 -0
  40. package/connections/figma-writer.md +139 -0
  41. package/connections/figma.md +146 -0
  42. package/connections/graphify.md +197 -0
  43. package/connections/pinterest.md +153 -0
  44. package/connections/preview.md +173 -0
  45. package/connections/refero.md +189 -0
  46. package/connections/storybook.md +280 -0
  47. package/hooks/budget-enforcer.js +318 -0
  48. package/hooks/context-exhaustion.js +127 -0
  49. package/hooks/gdd-read-injection-scanner.js +44 -0
  50. package/hooks/hooks.json +44 -0
  51. package/package.json +60 -0
  52. package/reference/BRANCH-PROTECTION.md +65 -0
  53. package/reference/DEPRECATIONS.md +41 -0
  54. package/reference/STATE-TEMPLATE.md +200 -0
  55. package/reference/accessibility.md +190 -0
  56. package/reference/anti-patterns.md +336 -0
  57. package/reference/audit-scoring.md +205 -0
  58. package/reference/checklists.md +137 -0
  59. package/reference/config-schema.md +319 -0
  60. package/reference/debugger-philosophy.md +32 -0
  61. package/reference/heuristics.md +201 -0
  62. package/reference/intel-schema.md +266 -0
  63. package/reference/model-prices.md +37 -0
  64. package/reference/model-tiers.md +118 -0
  65. package/reference/motion.md +285 -0
  66. package/reference/parallelism-rules.md +108 -0
  67. package/reference/priority-matrix.md +31 -0
  68. package/reference/project-skills-guide.md +42 -0
  69. package/reference/review-format.md +107 -0
  70. package/reference/schemas/config.schema.json +41 -0
  71. package/reference/schemas/hooks.schema.json +55 -0
  72. package/reference/schemas/intel.schema.json +191 -0
  73. package/reference/schemas/marketplace.schema.json +72 -0
  74. package/reference/schemas/plugin.schema.json +59 -0
  75. package/reference/shared-preamble.md +82 -0
  76. package/reference/typography.md +229 -0
  77. package/scripts/aggregate-agent-metrics.js +144 -0
  78. package/scripts/apply-branch-protection.sh +75 -0
  79. package/scripts/bootstrap-manifest.txt +3 -0
  80. package/scripts/bootstrap.sh +80 -0
  81. package/scripts/build-intel.cjs +458 -0
  82. package/scripts/detect-stale-refs.cjs +101 -0
  83. package/scripts/extract-changelog-section.cjs +57 -0
  84. package/scripts/release-smoke-test.cjs +169 -0
  85. package/scripts/rollback-release.sh +42 -0
  86. package/scripts/run-injection-scanner-ci.cjs +92 -0
  87. package/scripts/validate-frontmatter.cjs +68 -0
  88. package/scripts/validate-schemas.cjs +225 -0
  89. package/scripts/verify-version-sync.cjs +30 -0
  90. package/skills/add-backlog/SKILL.md +47 -0
  91. package/skills/analyze-dependencies/SKILL.md +184 -0
  92. package/skills/apply-reflections/SKILL.md +112 -0
  93. package/skills/audit/SKILL.md +54 -0
  94. package/skills/brief/SKILL.md +75 -0
  95. package/skills/cache-manager/SKILL.md +120 -0
  96. package/skills/compare/SKILL.md +322 -0
  97. package/skills/complete-cycle/SKILL.md +33 -0
  98. package/skills/darkmode/SKILL.md +331 -0
  99. package/skills/debug/SKILL.md +38 -0
  100. package/skills/design/SKILL.md +281 -0
  101. package/skills/discover/SKILL.md +172 -0
  102. package/skills/discuss/SKILL.md +67 -0
  103. package/skills/do/SKILL.md +45 -0
  104. package/skills/explore/SKILL.md +109 -0
  105. package/skills/extract-learnings/SKILL.md +98 -0
  106. package/skills/fast/SKILL.md +44 -0
  107. package/skills/figma-write/SKILL.md +40 -0
  108. package/skills/graphify/SKILL.md +48 -0
  109. package/skills/health/SKILL.md +48 -0
  110. package/skills/help/SKILL.md +76 -0
  111. package/skills/list-assumptions/SKILL.md +60 -0
  112. package/skills/map/SKILL.md +112 -0
  113. package/skills/new-cycle/SKILL.md +35 -0
  114. package/skills/new-project/SKILL.md +53 -0
  115. package/skills/next/SKILL.md +42 -0
  116. package/skills/note/SKILL.md +47 -0
  117. package/skills/optimize/SKILL.md +120 -0
  118. package/skills/pause/SKILL.md +41 -0
  119. package/skills/plan/SKILL.md +251 -0
  120. package/skills/plant-seed/SKILL.md +47 -0
  121. package/skills/pr-branch/SKILL.md +31 -0
  122. package/skills/progress/SKILL.md +60 -0
  123. package/skills/quick/SKILL.md +43 -0
  124. package/skills/reapply-patches/SKILL.md +31 -0
  125. package/skills/reflect/SKILL.md +73 -0
  126. package/skills/resume/SKILL.md +37 -0
  127. package/skills/review-backlog/SKILL.md +45 -0
  128. package/skills/router/SKILL.md +67 -0
  129. package/skills/scan/SKILL.md +721 -0
  130. package/skills/settings/SKILL.md +78 -0
  131. package/skills/ship/SKILL.md +31 -0
  132. package/skills/sketch/SKILL.md +78 -0
  133. package/skills/sketch-wrap-up/SKILL.md +88 -0
  134. package/skills/skill-manifest/SKILL.md +79 -0
  135. package/skills/spike/SKILL.md +67 -0
  136. package/skills/spike-wrap-up/SKILL.md +81 -0
  137. package/skills/stats/SKILL.md +50 -0
  138. package/skills/style/SKILL.md +193 -0
  139. package/skills/synthesize/SKILL.md +93 -0
  140. package/skills/todo/SKILL.md +54 -0
  141. package/skills/undo/SKILL.md +30 -0
  142. package/skills/update/SKILL.md +36 -0
  143. package/skills/verify/SKILL.md +452 -0
  144. package/skills/warm-cache/SKILL.md +113 -0
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: gdd-graphify-sync
3
+ description: "Feeds the Graphify knowledge graph from .design/intel/ slices. Converts intel store graph.json nodes and edges into Graphify-compatible format and upserts them. Run after gdd-intel-updater to keep the semantic graph current."
4
+ tools: Bash, Read, Write
5
+ color: green
6
+ default-tier: haiku
7
+ tier-rationale: "Sync operation is deterministic JSON → graph DB — cheap Haiku is enough"
8
+ parallel-safe: false
9
+ typical-duration-seconds: 20
10
+ reads-only: false
11
+ writes:
12
+ - .design/intel/graph.json
13
+ ---
14
+
15
+ @reference/shared-preamble.md
16
+
17
+ # gdd-graphify-sync
18
+
19
+ **Role:** Bridge between the flat intel store and the Graphify semantic knowledge graph. Reads `graph.json` from the intel store and upserts nodes/edges into Graphify using the `gsd-tools.cjs graphify` CLI.
20
+
21
+ ## When to invoke
22
+
23
+ - After `gdd-intel-updater` completes (intel store updated)
24
+ - After a phase plan that adds new skill/agent/reference files
25
+ - When semantic graph queries return stale results
26
+
27
+ ## Protocol
28
+
29
+ ### Step 1 — Check intel store graph slice
30
+
31
+ ```bash
32
+ ls .design/intel/graph.json 2>/dev/null && echo "ready" || echo "missing"
33
+ ```
34
+
35
+ If missing: print "Intel store graph.json not found — run node scripts/build-intel.cjs --force first." and stop.
36
+
37
+ ### Step 2 — Check Graphify availability
38
+
39
+ ```bash
40
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" graphify status 2>/dev/null | head -5
41
+ ```
42
+
43
+ If Graphify is unavailable or returns an error: print "Graphify unavailable — skipping sync. Intel store remains the primary lookup source." and stop gracefully (exit 0, do not fail).
44
+
45
+ ### Step 3 — Read graph.json
46
+
47
+ Read `.design/intel/graph.json`. Extract `nodes` and `edges` arrays.
48
+
49
+ ### Step 4 — Upsert nodes
50
+
51
+ For each node in `nodes`:
52
+
53
+ ```bash
54
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" graphify upsert-node \
55
+ --id "<node.id>" \
56
+ --type "<node.type>" \
57
+ --label "<node.name>" \
58
+ --source "gdd-intel-store"
59
+ ```
60
+
61
+ Batch in groups of 20 to avoid CLI argument limits. Report total nodes upserted.
62
+
63
+ ### Step 5 — Upsert edges
64
+
65
+ For each edge in `edges`:
66
+
67
+ ```bash
68
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" graphify upsert-edge \
69
+ --from "<edge.from>" \
70
+ --to "<edge.to>" \
71
+ --kind "<edge.kind>" \
72
+ --source "gdd-intel-store"
73
+ ```
74
+
75
+ Batch in groups of 20. Report total edges upserted.
76
+
77
+ ### Step 6 — Verify sync
78
+
79
+ ```bash
80
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" graphify status
81
+ ```
82
+
83
+ Print the status response. Report node/edge counts in Graphify vs intel store.
84
+
85
+ ### Step 7 — Summary
86
+
87
+ ```
88
+ ━━━ Graphify sync complete ━━━
89
+ Nodes upserted: <N>
90
+ Edges upserted: <M>
91
+ Graphify status: <status line>
92
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
93
+ ```
94
+
95
+ ## Required reading (conditional)
96
+
97
+ @.design/intel/graph.json (if present)
98
+ @.design/intel/files.json (if present)
99
+
100
+ ## GRAPHIFY-SYNC COMPLETE
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: gdd-intel-updater
3
+ description: "Incremental intel store updater. Runs build-intel.cjs for changed files, then re-derives only the affected slices. Call after any skill/agent/reference edit to keep .design/intel/ current."
4
+ tools: Bash, Read, Write, Glob
5
+ color: purple
6
+ default-tier: sonnet
7
+ tier-rationale: "Incremental intel updater re-derives slices from changed files — Sonnet handles structured JSON munging"
8
+ parallel-safe: false
9
+ typical-duration-seconds: 15
10
+ reads-only: false
11
+ writes:
12
+ - .design/intel/files.json
13
+ - .design/intel/exports.json
14
+ - .design/intel/symbols.json
15
+ - .design/intel/tokens.json
16
+ - .design/intel/components.json
17
+ - .design/intel/patterns.json
18
+ - .design/intel/dependencies.json
19
+ - .design/intel/decisions.json
20
+ - .design/intel/debt.json
21
+ - .design/intel/graph.json
22
+ ---
23
+
24
+ @reference/shared-preamble.md
25
+
26
+ # gdd-intel-updater
27
+
28
+ **Role:** Keep the `.design/intel/` store in sync with the design surface after any file changes.
29
+
30
+ ## When to invoke
31
+
32
+ - After completing any phase plan that edits skill/agent/reference/connection files
33
+ - When `/gdd:health` reports intel store staleness
34
+ - Manually via `/gdd:update intel` (future command)
35
+
36
+ ## Protocol
37
+
38
+ ### Step 1 — Check intel store exists
39
+
40
+ ```bash
41
+ ls .design/intel/files.json 2>/dev/null && echo "exists" || echo "missing"
42
+ ```
43
+
44
+ If missing: run full build (Step 2 with `--force`). If exists: proceed to Step 2 without `--force`.
45
+
46
+ ### Step 2 — Run incremental build
47
+
48
+ ```bash
49
+ node scripts/build-intel.cjs
50
+ ```
51
+
52
+ Capture output. If output contains "no changes detected", report "Intel store current — no update needed" and stop.
53
+
54
+ ### Step 3 — Verify slices written
55
+
56
+ Confirm all ten slices present:
57
+
58
+ ```bash
59
+ ls .design/intel/*.json
60
+ ```
61
+
62
+ Expected: `components.json decisions.json debt.json dependencies.json exports.json files.json graph.json patterns.json symbols.json tokens.json`
63
+
64
+ Report any missing slices as warnings.
65
+
66
+ ### Step 4 — Report summary
67
+
68
+ Print a concise update summary:
69
+
70
+ ```
71
+ ━━━ Intel store updated ━━━
72
+ Files indexed: <N>
73
+ Changed files: <N>
74
+ Slices written: 10
75
+ Generated: <timestamp>
76
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━
77
+ ```
78
+
79
+ ## Required reading (conditional)
80
+
81
+ @.design/intel/files.json (if present)
82
+
83
+ ## Slice staleness detection
84
+
85
+ A slice is stale if its `generated` timestamp is older than the newest `mtime` in `files.json`.
86
+ The updater does not need to check this manually — `build-intel.cjs` handles mtime comparison.
87
+
88
+ ## INTEL UPDATE COMPLETE
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: gdd-learnings-extractor
3
+ description: "Extracts structured learning entries from .design/ artifacts (DESIGN-CONTEXT.md, DESIGN-VERIFICATION.md, DESIGN-DEBT.md, DESIGN-SUMMARY.md, CYCLES.md). Writes .design/learnings/LEARNINGS.md and proposes reference/ additions. Called by /gdd:extract-learnings."
4
+ tools: Read, Write, Bash, Glob, Grep
5
+ color: blue
6
+ default-tier: sonnet
7
+ tier-rationale: "Learnings extraction mines structured signals from artifacts — Sonnet is the right fit for pattern recognition"
8
+ parallel-safe: false
9
+ typical-duration-seconds: 45
10
+ reads-only: false
11
+ writes:
12
+ - .design/learnings/LEARNINGS.md
13
+ ---
14
+
15
+ @reference/shared-preamble.md
16
+
17
+ # gdd-learnings-extractor
18
+
19
+ **Role:** Extract structured learning entries from the current cycle's `.design/` artifacts. Called by `/gdd:extract-learnings` — do not invoke directly.
20
+
21
+ ## Extraction targets
22
+
23
+ Extract learnings from these signal types:
24
+
25
+ | Signal | Source artifact | Pattern type |
26
+ |--------|----------------|--------------|
27
+ | Decisions locked in DESIGN-CONTEXT.md | DESIGN-CONTEXT.md | decision |
28
+ | Verification failures repeated >1 cycle | DESIGN-VERIFICATION.md | anti-pattern |
29
+ | Debt items marked "recurring" | DESIGN-DEBT.md | anti-pattern |
30
+ | Approaches that passed verify cleanly | DESIGN-VERIFICATION.md | validated-approach |
31
+ | Token naming agreed upon | DESIGN-CONTEXT.md | token-convention |
32
+ | Component structure agreed upon | DESIGN-CONTEXT.md | component-convention |
33
+
34
+ ## Confidence assignment
35
+
36
+ - **high:** Same pattern appears in 2+ source artifacts or 2+ cycles
37
+ - **medium:** Appears in 1 source artifact, clearly stated
38
+ - **low:** Inferred from context, not explicitly stated
39
+
40
+ ## Output format
41
+
42
+ Append to `.design/learnings/LEARNINGS.md` (create if missing):
43
+
44
+ ```markdown
45
+ # Project Learnings
46
+
47
+ <!-- Auto-generated by gdd-learnings-extractor. Edit entries manually if needed. -->
48
+
49
+ ## <category> — <YYYY-MM-DD>
50
+
51
+ ### L-<NN>: <title>
52
+
53
+ **Source:** <artifact>:<section or line range>
54
+ **Pattern type:** <decision|anti-pattern|validated-approach|token-convention|component-convention>
55
+ **Confidence:** <high|medium|low>
56
+ **Summary:** <1–2 sentences describing the learning>
57
+ **Evidence:** "<quoted or paraphrased text from source>"
58
+ **Proposed reference update:** <yes — reference/anti-patterns.md § Anti-patterns | no>
59
+
60
+ ---
61
+ ```
62
+
63
+ Number learnings sequentially from L-01, incrementing from the last existing L-XX in the file if it already exists.
64
+
65
+ ## Reference proposal generation
66
+
67
+ For each learning with `Proposed reference update: yes`:
68
+
69
+ 1. Identify the correct `reference/` file:
70
+ - anti-pattern → `reference/anti-patterns.md`
71
+ - validated-approach, decision → `reference/heuristics.md`
72
+ - token-convention → `reference/accessibility.md` or a new `reference/token-conventions.md`
73
+ - component-convention → `reference/checklists.md`
74
+
75
+ 2. Draft the proposed section text in markdown format matching the reference file's existing heading style
76
+
77
+ 3. Return the proposals as a list to `/gdd:extract-learnings` for the user review flow
78
+
79
+ ## Required reading (conditional)
80
+
81
+ @.design/intel/decisions.json (if present)
82
+ @.design/intel/patterns.json (if present)
83
+ @.design/learnings/LEARNINGS.md (if present)
84
+
85
+ ## LEARNINGS EXTRACTION COMPLETE
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: motion-mapper
3
+ description: "Maps motion and animation patterns — CSS transitions, framer-motion, GSAP, prefers-reduced-motion — to .design/map/motion.md."
4
+ tools: Read, Write, Bash, Grep, Glob
5
+ color: cyan
6
+ model: inherit
7
+ default-tier: sonnet
8
+ tier-rationale: "Inventories motion patterns; open-ended visual reasoning across files"
9
+ parallel-safe: auto
10
+ typical-duration-seconds: 30
11
+ reads-only: false
12
+ writes:
13
+ - ".design/map/motion.md"
14
+ ---
15
+
16
+ @reference/shared-preamble.md
17
+
18
+ # motion-mapper
19
+
20
+ ## Role
21
+
22
+ You inventory motion and animation patterns. Zero session memory. You do not modify source code and do not spawn other agents.
23
+
24
+ ## Required Reading
25
+
26
+ - `.design/STATE.md`
27
+ - `reference/motion.md` (if present)
28
+ - Any files supplied by the orchestrator
29
+
30
+ ## Scan Strategy
31
+
32
+ ### CSS transitions and keyframes
33
+
34
+ ```bash
35
+ grep -rEn "transition\s*:|@keyframes\s|animation\s*:" src/ --include="*.css" --include="*.scss" | head -150
36
+ ```
37
+
38
+ ### Tailwind motion utilities
39
+
40
+ ```bash
41
+ grep -rEn "animate-|duration-|ease-|transition-" src/ --include="*.tsx" --include="*.jsx" --include="*.html" | head -100
42
+ ```
43
+
44
+ ### JS libraries
45
+
46
+ ```bash
47
+ grep -rEn "framer-motion|motion\.(div|span|button)|useAnimation|useSpring|useTransform" src/ --include="*.tsx" --include="*.jsx" | head -80
48
+ grep -rEn "\bgsap\b|TweenMax|gsap\.(to|from|timeline)" src/ | head -40
49
+ ```
50
+
51
+ ### Reduced-motion compliance
52
+
53
+ ```bash
54
+ grep -rEn "prefers-reduced-motion" src/ | head -40
55
+ ```
56
+
57
+ ### Duration classification
58
+
59
+ From the collected values, bucket by:
60
+ - Fast: <200ms
61
+ - Normal: 200–400ms
62
+ - Slow: >400ms
63
+
64
+ ## Output Format — `.design/map/motion.md`
65
+
66
+ ```markdown
67
+ ---
68
+ generated: [ISO 8601]
69
+ ---
70
+
71
+ # Motion Map
72
+
73
+ ## CSS transitions
74
+ | File | Property | Duration | Easing |
75
+ |------|----------|----------|--------|
76
+
77
+ ## Library usage
78
+ | Library | Files | Notes |
79
+ |---------|-------|-------|
80
+
81
+ ## Duration distribution
82
+ - Fast (<200ms): [N]
83
+ - Normal (200–400ms): [N]
84
+ - Slow (>400ms): [N]
85
+
86
+ ## Easing functions
87
+ | Easing | Count |
88
+ |--------|-------|
89
+
90
+ ## Reduced-motion compliance
91
+ - `prefers-reduced-motion` queries present: [N]
92
+ - Animated components lacking a reduced-motion branch: [list]
93
+
94
+ ## Score
95
+ Reduced-motion compliance: [Full | Partial | None]
96
+ Motion consistency: [Consistent | Mixed | Chaotic]
97
+ ```
98
+
99
+ ## Constraints
100
+
101
+ No modifications outside `.design/map/`. No git. No agent spawning.
102
+
103
+ ## MOTION MAP COMPLETE
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: token-mapper
3
+ description: "Maps design tokens — colors, spacing, typography, shadows — from codebase to .design/map/tokens.md. Reads CSS variables, Tailwind config, and Figma variables if available."
4
+ tools: Read, Write, Bash, Grep, Glob
5
+ color: cyan
6
+ model: inherit
7
+ default-tier: sonnet
8
+ tier-rationale: "Extracts design tokens from source; pattern recognition across files"
9
+ parallel-safe: auto
10
+ typical-duration-seconds: 45
11
+ reads-only: false
12
+ writes:
13
+ - ".design/map/tokens.md"
14
+ ---
15
+
16
+ @reference/shared-preamble.md
17
+
18
+ # token-mapper
19
+
20
+ ## Role
21
+
22
+ 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.
23
+
24
+ ## Required Reading
25
+
26
+ - `.design/STATE.md` — pipeline position, source roots, `<connections>` (Figma availability)
27
+ - `reference/audit-scoring.md` — category vocabulary
28
+ - Any files supplied by the orchestrator
29
+
30
+ Read every file in `<required_reading>` before scanning.
31
+
32
+ ## Scan Strategy
33
+
34
+ Run the following in order. Adapt paths to `<source_roots>` from STATE.md.
35
+
36
+ ### Colors
37
+
38
+ ```bash
39
+ grep -rEn "(--[a-z][a-z0-9-]*|oklch\(|hsl\(|rgb\(|#[0-9a-fA-F]{3,8})" src/ --include="*.css" --include="*.scss" --include="*.tsx" --include="*.jsx" | head -200
40
+ ```
41
+
42
+ Also check `tailwind.config.*` and any `tokens.json` / `design-tokens.json`.
43
+
44
+ ### Spacing
45
+
46
+ ```bash
47
+ grep -rEn "(padding|margin|gap|top|right|bottom|left):\s*[0-9]+(\.[0-9]+)?(px|rem|em)" src/ --include="*.css" --include="*.scss" | head -100
48
+ grep -rEn "(--space|--gap|p-[0-9]|m-[0-9]|gap-[0-9])" src/ --include="*.css" --include="*.tsx" --include="*.jsx" | head -80
49
+ ```
50
+
51
+ ### Typography
52
+
53
+ ```bash
54
+ grep -rEn "font-(size|weight|family)\s*:" src/ --include="*.css" --include="*.scss" | head -80
55
+ grep -rEn "(fontSize|fontWeight|fontFamily)" src/ --include="*.tsx" --include="*.jsx" | head -60
56
+ ```
57
+
58
+ ### Shadows
59
+
60
+ ```bash
61
+ grep -rEn "box-shadow\s*:|shadow-(sm|md|lg|xl|2xl)" src/ --include="*.css" --include="*.tsx" | head -60
62
+ ```
63
+
64
+ ### Figma augmentation
65
+
66
+ If STATE.md `<connections>` has `figma: available`, call `mcp__figma-desktop__get_variable_defs` to augment with named Figma variables.
67
+
68
+ ## Output Format — `.design/map/tokens.md`
69
+
70
+ ```markdown
71
+ ---
72
+ generated: [ISO 8601]
73
+ source_roots: [dirs scanned]
74
+ figma_augmented: [true|false]
75
+ ---
76
+
77
+ # Token Map
78
+
79
+ ## Colors
80
+ | Token | Value | Usage Count | Semantic Role |
81
+ |-------|-------|-------------|---------------|
82
+
83
+ ## Spacing
84
+ | Token | Value | Usage Count | 8pt-grid Aligned |
85
+ |-------|-------|-------------|------------------|
86
+
87
+ ## Typography
88
+ | Token | Value | Usage Count | Role |
89
+ |-------|-------|-------------|------|
90
+
91
+ ## Shadows
92
+ | Token | Value | Usage Count |
93
+ |-------|-------|-------------|
94
+
95
+ ## Observations
96
+ - [Dominant color space, typography scale coherence, grid adherence]
97
+ ```
98
+
99
+ ## Constraints
100
+
101
+ You MUST NOT modify anything outside `.design/map/`. Do not run git commands or spawn agents.
102
+
103
+ ## TOKEN MAP COMPLETE
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: visual-hierarchy-mapper
3
+ description: "Maps visual hierarchy signals — heading structure, type scale relationships, focal weight, layout patterns — to .design/map/visual-hierarchy.md."
4
+ tools: Read, Write, Bash, Grep, Glob
5
+ color: cyan
6
+ model: inherit
7
+ default-tier: sonnet
8
+ tier-rationale: "Maps visual hierarchy signals; breadth across many files"
9
+ parallel-safe: auto
10
+ typical-duration-seconds: 45
11
+ reads-only: false
12
+ writes:
13
+ - ".design/map/visual-hierarchy.md"
14
+ ---
15
+
16
+ @reference/shared-preamble.md
17
+
18
+ # visual-hierarchy-mapper
19
+
20
+ ## Role
21
+
22
+ You extract visual hierarchy indicators from the codebase. Zero session memory. Read-focused scanning; you never modify source code.
23
+
24
+ ## Required Reading
25
+
26
+ - `.design/STATE.md`
27
+ - Any files supplied by the orchestrator
28
+
29
+ ## Scan Strategy
30
+
31
+ ### Heading-level structure
32
+
33
+ ```bash
34
+ grep -rEn "<h[1-6][^>]*>" src/ --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" | head -200
35
+ ```
36
+
37
+ Count uses of each heading level; flag pages with no `<h1>` or with heading level skips.
38
+
39
+ ### Type-scale relationships
40
+
41
+ ```bash
42
+ grep -rEn "text-(xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl)" src/ | head -150
43
+ grep -rEn "font-size\s*:\s*[0-9.]+(px|rem|em)" src/ --include="*.css" | head -100
44
+ ```
45
+
46
+ Determine the ratio between adjacent scale steps (healthy: 1.125–1.333).
47
+
48
+ ### Focal weight signals
49
+
50
+ Grep for hero-class prominence: `hero`, `headline`, `display-`, large font-sizes paired with high weight (700+).
51
+
52
+ ### Layout-pattern indicators
53
+
54
+ ```bash
55
+ grep -rEn "(justify-content|align-items|grid-template|flex-direction)" src/ --include="*.css" --include="*.tsx" | head -100
56
+ ```
57
+
58
+ Look for F-pattern (left-aligned start), Z-pattern (hero then CTA), and centered-column patterns.
59
+
60
+ ## Output Format — `.design/map/visual-hierarchy.md`
61
+
62
+ ```markdown
63
+ ---
64
+ generated: [ISO 8601]
65
+ ---
66
+
67
+ # Visual Hierarchy Map
68
+
69
+ ## Heading structure
70
+ | Page / Route | h1 count | h2 count | h3 count | Health |
71
+ |--------------|----------|----------|----------|--------|
72
+
73
+ ## Type scale
74
+ | Step | Value | Ratio-to-previous |
75
+ |------|-------|-------------------|
76
+
77
+ Scale coherence: [Well-defined | Flat | Inverted | Chaotic]
78
+
79
+ ## Focal weight patterns
80
+ - [Hero elements and their emphasis treatments]
81
+
82
+ ## Layout patterns detected
83
+ - F-pattern: [count]
84
+ - Z-pattern: [count]
85
+ - Centered column: [count]
86
+
87
+ ## Score
88
+ Overall hierarchy health: [Well-defined | Flat | Inverted]
89
+ ```
90
+
91
+ ## Constraints
92
+
93
+ No modifications outside `.design/map/`. No git. No agent spawning.
94
+
95
+ ## VISUAL HIERARCHY MAP COMPLETE