@friedbotstudio/create-baseline 0.1.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.
Files changed (197) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +222 -0
  3. package/bin/cli.js +247 -0
  4. package/obj/template/.claude/agents/swarm-worker.md +52 -0
  5. package/obj/template/.claude/bin/LICENSE +201 -0
  6. package/obj/template/.claude/bin/NOTICE +48 -0
  7. package/obj/template/.claude/commands/approve-spec.md +29 -0
  8. package/obj/template/.claude/commands/approve-swarm.md +27 -0
  9. package/obj/template/.claude/commands/grant-commit.md +19 -0
  10. package/obj/template/.claude/commands/init-project.md +191 -0
  11. package/obj/template/.claude/hooks/artifact_template_guard.sh +141 -0
  12. package/obj/template/.claude/hooks/consent_gate_grant.sh +89 -0
  13. package/obj/template/.claude/hooks/destructive_cmd_guard.sh +42 -0
  14. package/obj/template/.claude/hooks/env_guard.sh +36 -0
  15. package/obj/template/.claude/hooks/git_commit_guard.sh +93 -0
  16. package/obj/template/.claude/hooks/harness_continuation.sh +121 -0
  17. package/obj/template/.claude/hooks/lib/__pycache__/resume_writer.cpython-314.pyc +0 -0
  18. package/obj/template/.claude/hooks/lib/common.sh +328 -0
  19. package/obj/template/.claude/hooks/lib/resume_writer.py +341 -0
  20. package/obj/template/.claude/hooks/lint_runner.sh +55 -0
  21. package/obj/template/.claude/hooks/memory_pre_compact.sh +36 -0
  22. package/obj/template/.claude/hooks/memory_session_start.sh +244 -0
  23. package/obj/template/.claude/hooks/memory_stop.sh +173 -0
  24. package/obj/template/.claude/hooks/plantuml_syntax_guard.sh +161 -0
  25. package/obj/template/.claude/hooks/process_lifecycle_guard.sh +89 -0
  26. package/obj/template/.claude/hooks/setup_guard.sh +50 -0
  27. package/obj/template/.claude/hooks/spec_approval_guard.sh +81 -0
  28. package/obj/template/.claude/hooks/spec_design_calls_guard.sh +183 -0
  29. package/obj/template/.claude/hooks/spec_diagram_presence_guard.sh +141 -0
  30. package/obj/template/.claude/hooks/swarm_approval_guard.sh +39 -0
  31. package/obj/template/.claude/hooks/swarm_boundary_guard.sh +136 -0
  32. package/obj/template/.claude/hooks/tdd_order_guard.sh +176 -0
  33. package/obj/template/.claude/hooks/test_runner.sh +75 -0
  34. package/obj/template/.claude/hooks/tests/fixtures/ac008_byte_equal_reference.txt +12 -0
  35. package/obj/template/.claude/hooks/tests/memory_session_start_test.sh +285 -0
  36. package/obj/template/.claude/hooks/track_guard.sh +127 -0
  37. package/obj/template/.claude/hooks/verify_pass_guard.sh +88 -0
  38. package/obj/template/.claude/memory/README.md +108 -0
  39. package/obj/template/.claude/memory/_pending.md +15 -0
  40. package/obj/template/.claude/memory/_resume.md +12 -0
  41. package/obj/template/.claude/memory/conventions.md +26 -0
  42. package/obj/template/.claude/memory/decisions.md +29 -0
  43. package/obj/template/.claude/memory/landmarks.md +26 -0
  44. package/obj/template/.claude/memory/landmines.md +27 -0
  45. package/obj/template/.claude/memory/libraries.md +27 -0
  46. package/obj/template/.claude/memory/pending-questions.md +28 -0
  47. package/obj/template/.claude/project.json +221 -0
  48. package/obj/template/.claude/settings.json +110 -0
  49. package/obj/template/.claude/skills/archive/SKILL.md +48 -0
  50. package/obj/template/.claude/skills/archive/archive.sh +145 -0
  51. package/obj/template/.claude/skills/audit-baseline/SKILL.md +80 -0
  52. package/obj/template/.claude/skills/audit-baseline/audit.sh +919 -0
  53. package/obj/template/.claude/skills/brd/SKILL.md +44 -0
  54. package/obj/template/.claude/skills/brd/template.md +83 -0
  55. package/obj/template/.claude/skills/chore/SKILL.md +99 -0
  56. package/obj/template/.claude/skills/claude-automation-recommender/LICENSE +202 -0
  57. package/obj/template/.claude/skills/claude-automation-recommender/NOTICE +69 -0
  58. package/obj/template/.claude/skills/claude-automation-recommender/SKILL.md +358 -0
  59. package/obj/template/.claude/skills/claude-automation-recommender/references/hooks-patterns.md +226 -0
  60. package/obj/template/.claude/skills/claude-automation-recommender/references/mcp-servers.md +263 -0
  61. package/obj/template/.claude/skills/claude-automation-recommender/references/plugins-reference.md +98 -0
  62. package/obj/template/.claude/skills/claude-automation-recommender/references/skills-reference.md +408 -0
  63. package/obj/template/.claude/skills/claude-automation-recommender/references/subagent-templates.md +181 -0
  64. package/obj/template/.claude/skills/code-structure/SKILL.md +204 -0
  65. package/obj/template/.claude/skills/commit/SKILL.md +21 -0
  66. package/obj/template/.claude/skills/copywriting/SKILL.md +252 -0
  67. package/obj/template/.claude/skills/copywriting/evals/evals.json +111 -0
  68. package/obj/template/.claude/skills/copywriting/references/ai-writing-detection.md +200 -0
  69. package/obj/template/.claude/skills/copywriting/references/copy-frameworks.md +344 -0
  70. package/obj/template/.claude/skills/copywriting/references/natural-transitions.md +272 -0
  71. package/obj/template/.claude/skills/design-ui/SKILL.md +175 -0
  72. package/obj/template/.claude/skills/design-ui/references/design-vs-development.md +89 -0
  73. package/obj/template/.claude/skills/design-ui/references/intent-table.md +64 -0
  74. package/obj/template/.claude/skills/design-ui/references/orchestration.md +121 -0
  75. package/obj/template/.claude/skills/design-ui/references/state-machine.md +125 -0
  76. package/obj/template/.claude/skills/document/SKILL.md +66 -0
  77. package/obj/template/.claude/skills/documentation/SKILL.md +50 -0
  78. package/obj/template/.claude/skills/harness/SKILL.md +169 -0
  79. package/obj/template/.claude/skills/humanizer/SKILL.md +489 -0
  80. package/obj/template/.claude/skills/humanizer/references/ai-writing-detection.md +208 -0
  81. package/obj/template/.claude/skills/impeccable/PROJECT_NOTES.md +22 -0
  82. package/obj/template/.claude/skills/impeccable/SKILL.md +153 -0
  83. package/obj/template/.claude/skills/impeccable/agents/openai.yaml +4 -0
  84. package/obj/template/.claude/skills/impeccable/reference/adapt.md +190 -0
  85. package/obj/template/.claude/skills/impeccable/reference/animate.md +173 -0
  86. package/obj/template/.claude/skills/impeccable/reference/audit.md +134 -0
  87. package/obj/template/.claude/skills/impeccable/reference/bolder.md +113 -0
  88. package/obj/template/.claude/skills/impeccable/reference/brand.md +104 -0
  89. package/obj/template/.claude/skills/impeccable/reference/clarify.md +174 -0
  90. package/obj/template/.claude/skills/impeccable/reference/cognitive-load.md +106 -0
  91. package/obj/template/.claude/skills/impeccable/reference/color-and-contrast.md +105 -0
  92. package/obj/template/.claude/skills/impeccable/reference/colorize.md +154 -0
  93. package/obj/template/.claude/skills/impeccable/reference/craft.md +138 -0
  94. package/obj/template/.claude/skills/impeccable/reference/critique.md +213 -0
  95. package/obj/template/.claude/skills/impeccable/reference/delight.md +302 -0
  96. package/obj/template/.claude/skills/impeccable/reference/distill.md +111 -0
  97. package/obj/template/.claude/skills/impeccable/reference/document.md +427 -0
  98. package/obj/template/.claude/skills/impeccable/reference/extract.md +70 -0
  99. package/obj/template/.claude/skills/impeccable/reference/harden.md +347 -0
  100. package/obj/template/.claude/skills/impeccable/reference/heuristics-scoring.md +234 -0
  101. package/obj/template/.claude/skills/impeccable/reference/interaction-design.md +195 -0
  102. package/obj/template/.claude/skills/impeccable/reference/layout.md +141 -0
  103. package/obj/template/.claude/skills/impeccable/reference/live.md +513 -0
  104. package/obj/template/.claude/skills/impeccable/reference/motion-design.md +99 -0
  105. package/obj/template/.claude/skills/impeccable/reference/onboard.md +234 -0
  106. package/obj/template/.claude/skills/impeccable/reference/optimize.md +258 -0
  107. package/obj/template/.claude/skills/impeccable/reference/overdrive.md +130 -0
  108. package/obj/template/.claude/skills/impeccable/reference/personas.md +178 -0
  109. package/obj/template/.claude/skills/impeccable/reference/polish.md +232 -0
  110. package/obj/template/.claude/skills/impeccable/reference/product.md +62 -0
  111. package/obj/template/.claude/skills/impeccable/reference/quieter.md +99 -0
  112. package/obj/template/.claude/skills/impeccable/reference/responsive-design.md +114 -0
  113. package/obj/template/.claude/skills/impeccable/reference/shape.md +136 -0
  114. package/obj/template/.claude/skills/impeccable/reference/spatial-design.md +100 -0
  115. package/obj/template/.claude/skills/impeccable/reference/teach.md +137 -0
  116. package/obj/template/.claude/skills/impeccable/reference/typeset.md +124 -0
  117. package/obj/template/.claude/skills/impeccable/reference/typography.md +159 -0
  118. package/obj/template/.claude/skills/impeccable/reference/ux-writing.md +107 -0
  119. package/obj/template/.claude/skills/impeccable/scripts/cleanup-deprecated.mjs +284 -0
  120. package/obj/template/.claude/skills/impeccable/scripts/command-metadata.json +94 -0
  121. package/obj/template/.claude/skills/impeccable/scripts/design-parser.mjs +820 -0
  122. package/obj/template/.claude/skills/impeccable/scripts/detect-csp.mjs +198 -0
  123. package/obj/template/.claude/skills/impeccable/scripts/is-generated.mjs +69 -0
  124. package/obj/template/.claude/skills/impeccable/scripts/live-accept.mjs +465 -0
  125. package/obj/template/.claude/skills/impeccable/scripts/live-browser.js +4684 -0
  126. package/obj/template/.claude/skills/impeccable/scripts/live-inject.mjs +436 -0
  127. package/obj/template/.claude/skills/impeccable/scripts/live-poll.mjs +187 -0
  128. package/obj/template/.claude/skills/impeccable/scripts/live-server.mjs +679 -0
  129. package/obj/template/.claude/skills/impeccable/scripts/live-wrap.mjs +395 -0
  130. package/obj/template/.claude/skills/impeccable/scripts/live.mjs +247 -0
  131. package/obj/template/.claude/skills/impeccable/scripts/load-context.mjs +93 -0
  132. package/obj/template/.claude/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
  133. package/obj/template/.claude/skills/impeccable/scripts/pin.mjs +214 -0
  134. package/obj/template/.claude/skills/implement/SKILL.md +83 -0
  135. package/obj/template/.claude/skills/intake/SKILL.md +46 -0
  136. package/obj/template/.claude/skills/intake/template.md +61 -0
  137. package/obj/template/.claude/skills/integrate/SKILL.md +62 -0
  138. package/obj/template/.claude/skills/memory-flush/SKILL.md +172 -0
  139. package/obj/template/.claude/skills/memory-flush/sweep.py +286 -0
  140. package/obj/template/.claude/skills/memory-flush/tests/run.sh +327 -0
  141. package/obj/template/.claude/skills/prose/SKILL.md +119 -0
  142. package/obj/template/.claude/skills/rca/SKILL.md +42 -0
  143. package/obj/template/.claude/skills/rca/template.md +83 -0
  144. package/obj/template/.claude/skills/research/SKILL.md +75 -0
  145. package/obj/template/.claude/skills/scenario/SKILL.md +64 -0
  146. package/obj/template/.claude/skills/scout/SKILL.md +72 -0
  147. package/obj/template/.claude/skills/security/SKILL.md +75 -0
  148. package/obj/template/.claude/skills/simplify/SKILL.md +67 -0
  149. package/obj/template/.claude/skills/spec/SKILL.md +69 -0
  150. package/obj/template/.claude/skills/spec/template.md +274 -0
  151. package/obj/template/.claude/skills/spec-diagram-review/SKILL.md +81 -0
  152. package/obj/template/.claude/skills/spec-lint/SKILL.md +55 -0
  153. package/obj/template/.claude/skills/spec-lint/lint.sh +218 -0
  154. package/obj/template/.claude/skills/spec-render/SKILL.md +45 -0
  155. package/obj/template/.claude/skills/spec-render/render.sh +109 -0
  156. package/obj/template/.claude/skills/spec-traceability-review/SKILL.md +72 -0
  157. package/obj/template/.claude/skills/swarm-dispatch/SKILL.md +212 -0
  158. package/obj/template/.claude/skills/swarm-dispatch/swarm_merge.sh +154 -0
  159. package/obj/template/.claude/skills/swarm-plan/SKILL.md +90 -0
  160. package/obj/template/.claude/skills/swarm-plan/validate.sh +181 -0
  161. package/obj/template/.claude/skills/tdd/SKILL.md +100 -0
  162. package/obj/template/.claude/skills/technical-tutorials/SKILL.md +569 -0
  163. package/obj/template/.claude/skills/technical-tutorials/references/audience-context-README.md +53 -0
  164. package/obj/template/.claude/skills/technical-tutorials/references/audience-context.md +246 -0
  165. package/obj/template/.claude/skills/technical-tutorials/references/audience-example.md +175 -0
  166. package/obj/template/.claude/skills/technical-tutorials/references/audience-template.md +152 -0
  167. package/obj/template/.claude/skills/triage/SKILL.md +55 -0
  168. package/obj/template/.claude/skills/verify/SKILL.md +74 -0
  169. package/obj/template/.mcp.json +24 -0
  170. package/obj/template/CLAUDE.md +327 -0
  171. package/obj/template/docs/init/seed.md +585 -0
  172. package/obj/template/manifest.json +214 -0
  173. package/package.json +48 -0
  174. package/src/.mcp.template.json +24 -0
  175. package/src/.npmrc.template +2 -0
  176. package/src/CLAUDE.template.md +327 -0
  177. package/src/agents/swarm-worker.template.md +51 -0
  178. package/src/cli/conflict.js +31 -0
  179. package/src/cli/doctor.js +152 -0
  180. package/src/cli/install.js +93 -0
  181. package/src/cli/io.js +27 -0
  182. package/src/cli/manifest.js +38 -0
  183. package/src/cli/mcp.js +54 -0
  184. package/src/cli/merge.js +107 -0
  185. package/src/cli/plantuml.js +121 -0
  186. package/src/cli/util.js +10 -0
  187. package/src/memory/_pending.template.md +15 -0
  188. package/src/memory/_resume.template.md +12 -0
  189. package/src/memory/conventions.template.md +26 -0
  190. package/src/memory/decisions.template.md +29 -0
  191. package/src/memory/landmarks.template.md +26 -0
  192. package/src/memory/landmines.template.md +27 -0
  193. package/src/memory/libraries.template.md +27 -0
  194. package/src/memory/pending-questions.template.md +28 -0
  195. package/src/project.template.json +221 -0
  196. package/src/seed.template.md +585 -0
  197. package/src/settings.template.json +110 -0
@@ -0,0 +1,114 @@
1
+ # Responsive Design
2
+
3
+ ## Mobile-First: Write It Right
4
+
5
+ Start with base styles for mobile, use `min-width` queries to layer complexity. Desktop-first (`max-width`) means mobile loads unnecessary styles first.
6
+
7
+ ## Breakpoints: Content-Driven
8
+
9
+ Don't chase device sizes—let content tell you where to break. Start narrow, stretch until design breaks, add breakpoint there. Three breakpoints usually suffice (640, 768, 1024px). Use `clamp()` for fluid values without breakpoints.
10
+
11
+ ## Detect Input Method, Not Just Screen Size
12
+
13
+ **Screen size doesn't tell you input method.** A laptop with touchscreen, a tablet with keyboard—use pointer and hover queries:
14
+
15
+ ```css
16
+ /* Fine pointer (mouse, trackpad) */
17
+ @media (pointer: fine) {
18
+ .button { padding: 8px 16px; }
19
+ }
20
+
21
+ /* Coarse pointer (touch, stylus) */
22
+ @media (pointer: coarse) {
23
+ .button { padding: 12px 20px; } /* Larger touch target */
24
+ }
25
+
26
+ /* Device supports hover */
27
+ @media (hover: hover) {
28
+ .card:hover { transform: translateY(-2px); }
29
+ }
30
+
31
+ /* Device doesn't support hover (touch) */
32
+ @media (hover: none) {
33
+ .card { /* No hover state - use active instead */ }
34
+ }
35
+ ```
36
+
37
+ **Critical**: Don't rely on hover for functionality. Touch users can't hover.
38
+
39
+ ## Safe Areas: Handle the Notch
40
+
41
+ Modern phones have notches, rounded corners, and home indicators. Use `env()`:
42
+
43
+ ```css
44
+ body {
45
+ padding-top: env(safe-area-inset-top);
46
+ padding-bottom: env(safe-area-inset-bottom);
47
+ padding-left: env(safe-area-inset-left);
48
+ padding-right: env(safe-area-inset-right);
49
+ }
50
+
51
+ /* With fallback */
52
+ .footer {
53
+ padding-bottom: max(1rem, env(safe-area-inset-bottom));
54
+ }
55
+ ```
56
+
57
+ **Enable viewport-fit** in your meta tag:
58
+ ```html
59
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
60
+ ```
61
+
62
+ ## Responsive Images: Get It Right
63
+
64
+ ### srcset with Width Descriptors
65
+
66
+ ```html
67
+ <img
68
+ src="hero-800.jpg"
69
+ srcset="
70
+ hero-400.jpg 400w,
71
+ hero-800.jpg 800w,
72
+ hero-1200.jpg 1200w
73
+ "
74
+ sizes="(max-width: 768px) 100vw, 50vw"
75
+ alt="Hero image"
76
+ >
77
+ ```
78
+
79
+ **How it works**:
80
+ - `srcset` lists available images with their actual widths (`w` descriptors)
81
+ - `sizes` tells the browser how wide the image will display
82
+ - Browser picks the best file based on viewport width AND device pixel ratio
83
+
84
+ ### Picture Element for Art Direction
85
+
86
+ When you need different crops/compositions (not just resolutions):
87
+
88
+ ```html
89
+ <picture>
90
+ <source media="(min-width: 768px)" srcset="wide.jpg">
91
+ <source media="(max-width: 767px)" srcset="tall.jpg">
92
+ <img src="fallback.jpg" alt="...">
93
+ </picture>
94
+ ```
95
+
96
+ ## Layout Adaptation Patterns
97
+
98
+ **Navigation**: Three stages—hamburger + drawer on mobile, horizontal compact on tablet, full with labels on desktop. **Tables**: Transform to cards on mobile using `display: block` and `data-label` attributes. **Progressive disclosure**: Use `<details>/<summary>` for content that can collapse on mobile.
99
+
100
+ ## Testing: Don't Trust DevTools Alone
101
+
102
+ DevTools device emulation is useful for layout but misses:
103
+
104
+ - Actual touch interactions
105
+ - Real CPU/memory constraints
106
+ - Network latency patterns
107
+ - Font rendering differences
108
+ - Browser chrome/keyboard appearances
109
+
110
+ **Test on at least**: One real iPhone, one real Android, a tablet if relevant. Cheap Android phones reveal performance issues you'll never see on simulators.
111
+
112
+ ---
113
+
114
+ **Avoid**: Desktop-first design. Device detection instead of feature detection. Separate mobile/desktop codebases. Ignoring tablet and landscape. Assuming all mobile devices are powerful.
@@ -0,0 +1,136 @@
1
+ Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork.
2
+
3
+ **Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good.
4
+
5
+ **Output**: A design brief that can be handed off to $impeccable craft, or directly to $impeccable for freeform implementation. When visual direction probes are used, the images are supporting artifacts, not the primary output.
6
+
7
+ ## Philosophy
8
+
9
+ Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise.
10
+
11
+ ## Phase 1: Discovery Interview
12
+
13
+ **Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
14
+
15
+ Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
16
+
17
+ ### Purpose & Context
18
+ - What is this feature for? What problem does it solve?
19
+ - Who specifically will use it? (Not "users"; be specific: role, context, frequency)
20
+ - What does success look like? How will you know this feature is working?
21
+ - What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?)
22
+
23
+ ### Content & Data
24
+ - What content or data does this feature display or collect?
25
+ - What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items)
26
+ - What are the edge cases? (Empty state, error state, first-time use, power user)
27
+ - Is any content dynamic? What changes and how often?
28
+
29
+ ### Design Direction
30
+
31
+ Force a visual decision on three fronts. Skip anything PRODUCT.md or DESIGN.md already answers; ask only what's missing.
32
+
33
+ - **Color strategy for this surface.** Pick one: Restrained / Committed / Full palette / Drenched. Can override the project default if the surface earns it (e.g. a drenched hero inside an otherwise Restrained product).
34
+ - **Theme via scene sentence.** Write one sentence of physical context for this surface — who uses it, where, under what ambient light, in what mood. The sentence forces dark vs light. If it doesn't, add detail until it does.
35
+ - **Two or three named anchor references.** Specific products, brands, objects — not adjectives like "modern" or "clean."
36
+
37
+ ### Scope
38
+
39
+ Always ask. Sketch quality and shipped quality are different outputs; don't guess between them.
40
+
41
+ - **Fidelity.** Sketch / mid-fi / high-fi / production-ready?
42
+ - **Breadth.** One screen / a flow / a whole surface?
43
+ - **Interactivity.** Static visual / interactive prototype / shipped-quality component?
44
+ - **Time intent.** Quick exploration, or polish until it ships?
45
+
46
+ Scope answers are task-scoped. Don't write them to PRODUCT.md or DESIGN.md — carry them through the design brief only.
47
+
48
+ ### Constraints
49
+ - Are there technical constraints? (Framework, performance budget, browser support)
50
+ - Are there content constraints? (Localization, dynamic text length, user-generated content)
51
+ - Mobile/responsive requirements?
52
+ - Accessibility requirements beyond WCAG AA?
53
+
54
+ ### Anti-Goals
55
+ - What should this NOT be? What would be a wrong direction?
56
+ - What's the biggest risk of getting this wrong?
57
+
58
+ ## Phase 1.5: Visual Direction Probe (Capability-Gated)
59
+
60
+ After the discovery interview, generate a small set of visual direction probes **before** writing the final brief when all of these are true:
61
+
62
+ - The work is **net-new** or directionally ambiguous enough that visual exploration will clarify the brief.
63
+ - The requested fidelity is **mid-fi, high-fi, or production-ready**. Skip for sketch-only planning.
64
+ - The current harness has **built-in image generation capability** (for example, Codex with a native image tool). Do **not** ask the user to set up external APIs, shell scripts, or one-off tooling just to do this.
65
+
66
+ When those conditions are met, this step is the default. Use it to explore visual lanes, not to replace the brief.
67
+
68
+ ### What to generate
69
+
70
+ Generate **2 to 4** distinct direction probes based on the discovery answers, especially:
71
+
72
+ - Color strategy
73
+ - Theme scene sentence
74
+ - Named anchor references
75
+ - Scope and fidelity
76
+
77
+ The probes should differ in primary visual direction (hierarchy, topology, density, typographic voice, or color strategy), not just palette tweaks.
78
+
79
+ ### How to use the probes
80
+
81
+ - Treat them as **direction tests**, not final designs.
82
+ - Use them to pressure-test whether the brief is pointing at the right lane.
83
+ - Ask the user which direction feels closest, what feels off, and what should carry forward.
84
+ - If the probes reveal a mismatch, revise the brief inputs before finalizing the brief.
85
+
86
+ ### Important limits
87
+
88
+ - Do **not** skip discovery because image generation is available.
89
+ - Do **not** treat generated imagery as final UX specification, final copy, or final accessibility behavior.
90
+ - Do **not** use this step for minor refinements of existing work. It's for shaping a new surface or clarifying a big directional choice.
91
+
92
+ If image generation is unavailable, or the task doesn't benefit from it, skip this phase and proceed directly to the design brief.
93
+
94
+ ## Phase 2: Design Brief
95
+
96
+ After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete.
97
+
98
+ ### Brief Structure
99
+
100
+ **1. Feature Summary** (2-3 sentences)
101
+ What this is, who it's for, what it needs to accomplish.
102
+
103
+ **2. Primary User Action**
104
+ The single most important thing a user should do or understand here.
105
+
106
+ **3. Design Direction**
107
+ Color strategy (Restrained / Committed / Full palette / Drenched) + the theme scene sentence + 2–3 named anchor references. Reference PRODUCT.md and DESIGN.md where they already answer, and note any per-surface overrides.
108
+
109
+ If you ran the Visual Direction Probe step, name which probe direction won and what changed in the brief because of it.
110
+
111
+ **4. Scope**
112
+ Fidelity, breadth, interactivity, and time intent from the Scope section of the interview. Task-scoped — these don't persist beyond the brief.
113
+
114
+ **5. Layout Strategy**
115
+ High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS.
116
+
117
+ **6. Key States**
118
+ List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel.
119
+
120
+ **7. Interaction Model**
121
+ How users interact with this feature. What happens on click, hover, scroll? What feedback do they get? What's the flow from entry to completion?
122
+
123
+ **8. Content Requirements**
124
+ What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges.
125
+
126
+ **9. Recommended References**
127
+ Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., spatial-design.md for complex layouts, motion-design.md for animated features, interaction-design.md for form-heavy features).
128
+
129
+ **10. Open Questions**
130
+ Anything unresolved that the implementer should resolve during build.
131
+
132
+ ---
133
+
134
+ ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
135
+
136
+ Once confirmed, the brief is complete. The user can now hand it to $impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use $impeccable craft instead, which runs this command internally.)
@@ -0,0 +1,100 @@
1
+ # Spatial Design
2
+
3
+ ## Spacing Systems
4
+
5
+ ### Use 4pt Base, Not 8pt
6
+
7
+ 8pt systems are too coarse—you'll frequently need 12px (between 8 and 16). Use 4pt for granularity: 4, 8, 12, 16, 24, 32, 48, 64, 96px.
8
+
9
+ ### Name Tokens Semantically
10
+
11
+ Name by relationship (`--space-sm`, `--space-lg`), not value (`--spacing-8`). Use `gap` instead of margins for sibling spacing—it eliminates margin collapse and cleanup hacks.
12
+
13
+ ## Grid Systems
14
+
15
+ ### The Self-Adjusting Grid
16
+
17
+ Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. Columns are at least 280px, as many as fit per row, leftovers stretch. For complex layouts, use named grid areas (`grid-template-areas`) and redefine them at breakpoints.
18
+
19
+ ## Visual Hierarchy
20
+
21
+ ### The Squint Test
22
+
23
+ Blur your eyes (or screenshot and blur). Can you still identify:
24
+ - The most important element?
25
+ - The second most important?
26
+ - Clear groupings?
27
+
28
+ If everything looks the same weight blurred, you have a hierarchy problem.
29
+
30
+ ### Hierarchy Through Multiple Dimensions
31
+
32
+ Don't rely on size alone. Combine:
33
+
34
+ | Tool | Strong Hierarchy | Weak Hierarchy |
35
+ |------|------------------|----------------|
36
+ | **Size** | 3:1 ratio or more | <2:1 ratio |
37
+ | **Weight** | Bold vs Regular | Medium vs Regular |
38
+ | **Color** | High contrast | Similar tones |
39
+ | **Position** | Top/left (primary) | Bottom/right |
40
+ | **Space** | Surrounded by white space | Crowded |
41
+
42
+ **The best hierarchy uses 2-3 dimensions at once**: A heading that's larger, bolder, AND has more space above it.
43
+
44
+ ### Cards Are Not Required
45
+
46
+ Cards are overused. Spacing and alignment create visual grouping naturally. Use cards only when content is truly distinct and actionable, items need visual comparison in a grid, or content needs clear interaction boundaries. **Never nest cards inside cards**—use spacing, typography, and subtle dividers for hierarchy within a card.
47
+
48
+ ## Container Queries
49
+
50
+ Viewport queries are for page layouts. **Container queries are for components**:
51
+
52
+ ```css
53
+ .card-container {
54
+ container-type: inline-size;
55
+ }
56
+
57
+ .card {
58
+ display: grid;
59
+ gap: var(--space-md);
60
+ }
61
+
62
+ /* Card layout changes based on its container, not viewport */
63
+ @container (min-width: 400px) {
64
+ .card {
65
+ grid-template-columns: 120px 1fr;
66
+ }
67
+ }
68
+ ```
69
+
70
+ **Why this matters**: A card in a narrow sidebar stays compact, while the same card in a main content area expands—automatically, without viewport hacks.
71
+
72
+ ## Optical Adjustments
73
+
74
+ Text at `margin-left: 0` looks indented due to letterform whitespace—use negative margin (`-0.05em`) to optically align. Geometrically centered icons often look off-center; play icons need to shift right, arrows shift toward their direction.
75
+
76
+ ### Touch Targets vs Visual Size
77
+
78
+ Buttons can look small but need large touch targets (44px minimum). Use padding or pseudo-elements:
79
+
80
+ ```css
81
+ .icon-button {
82
+ width: 24px; /* Visual size */
83
+ height: 24px;
84
+ position: relative;
85
+ }
86
+
87
+ .icon-button::before {
88
+ content: '';
89
+ position: absolute;
90
+ inset: -10px; /* Expand tap target to 44px */
91
+ }
92
+ ```
93
+
94
+ ## Depth & Elevation
95
+
96
+ Create semantic z-index scales (dropdown → sticky → modal-backdrop → modal → toast → tooltip) instead of arbitrary numbers. For shadows, create a consistent elevation scale (sm → md → lg → xl). **Key insight**: Shadows should be subtle—if you can clearly see it, it's probably too strong.
97
+
98
+ ---
99
+
100
+ **Avoid**: Arbitrary spacing values outside your scale. Making all spacing equal (variety creates hierarchy). Creating hierarchy through size alone - combine size, weight, color, and space.
@@ -0,0 +1,137 @@
1
+ # Teach Flow
2
+
3
+ Gathers design context for a project and writes two complementary files at the project root:
4
+
5
+ - **PRODUCT.md** (strategic): register, target users, product purpose, brand personality, anti-references, strategic design principles. Answers "who/what/why".
6
+ - **DESIGN.md** (visual): visual theme, color palette, typography, components, layout. Follows the [Google Stitch DESIGN.md format](https://stitch.withgoogle.com/docs/design-md/format/). Answers "how it looks".
7
+
8
+ Every other impeccable command reads these files before doing any work.
9
+
10
+ ## Step 1: Load current state
11
+
12
+ Run the shared loader first so you know what already exists:
13
+
14
+ ```bash
15
+ node .claude/skills/impeccable/scripts/load-context.mjs
16
+ ```
17
+
18
+ The output tells you whether PRODUCT.md and/or DESIGN.md already exist. If `migrated: true`, legacy `.impeccable.md` was auto-renamed to `PRODUCT.md`. Mention this once to the user.
19
+
20
+ Decision tree:
21
+ - **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
22
+ - **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 — offer to run `$impeccable document` for DESIGN.md.
23
+ - **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
24
+ - **Both exist**: ask the user directly to clarify what you cannot infer. which to refresh. Skip the one the user doesn't want changed.
25
+ - **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
26
+
27
+ Never silently overwrite an existing file. Always confirm first.
28
+
29
+ ## Step 2: Explore the codebase
30
+
31
+ Before asking questions, thoroughly scan the project to discover what you can:
32
+
33
+ - **README and docs**: Project purpose, target audience, any stated goals
34
+ - **Package.json / config files**: Tech stack, dependencies, existing design libraries
35
+ - **Existing components**: Current design patterns, spacing, typography in use
36
+ - **Brand assets**: Logos, favicons, color values already defined
37
+ - **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales
38
+ - **Any style guides or brand documentation**
39
+
40
+ Also form a **register hypothesis** from what you find:
41
+
42
+ - Brand signals: `/`, `/about`, `/pricing`, `/blog/*`, `/docs/*`, hero sections, big typography, scroll-driven sections, landing-page-shaped content.
43
+ - Product signals: `/app/*`, `/dashboard`, `/settings`, `/(auth)`, forms, data tables, side/top nav, app-shell components.
44
+
45
+ Register is a hypothesis at this point, not a decision — Step 3 confirms it.
46
+
47
+ Note what you've learned and what remains unclear. This exploration feeds both PRODUCT.md and DESIGN.md.
48
+
49
+ ## Step 3: Ask strategic questions (for PRODUCT.md)
50
+
51
+ ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase.
52
+
53
+ ### Register (ask first — it shapes everything below)
54
+
55
+ Every design task is either **brand** (marketing, landing, campaign, long-form content, portfolio — design IS the product) or **product** (app UI, admin, dashboards, tools — design SERVES the product).
56
+
57
+ If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [brand / product] surface — does that match your intent, or should we treat it differently?"*
58
+
59
+ If the signal is genuinely split (e.g. a product with a big marketing landing), ask the user directly to clarify what you cannot infer. which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
60
+
61
+ ### Users & Purpose
62
+ - Who uses this? What's their context when using it?
63
+ - What job are they trying to get done?
64
+ - For brand: what emotions should the interface evoke? (confidence, delight, calm, urgency)
65
+ - For product: what workflow are they in? What's the primary task on any given screen?
66
+
67
+ ### Brand & Personality
68
+ - How would you describe the brand personality in 3 words?
69
+ - Reference sites or apps that capture the right feel? What specifically about them?
70
+ - For brand, push for real-world references in the right lane (tech-minimal, editorial-magazine, consumer-warm, brutalist-grid, etc.) — not generic "modern" adjectives.
71
+ - For product, push for category best-tool references (Linear, Figma, Notion, Raycast, Stripe).
72
+ - What should this explicitly NOT look like? Any anti-references?
73
+
74
+ ### Accessibility & Inclusion
75
+ - Specific accessibility requirements? (WCAG level, known user needs)
76
+ - Considerations for reduced motion, color blindness, or other accommodations?
77
+
78
+ Skip questions where the answer is already clear. **Do NOT ask about colors, fonts, radii, or visual styling here** — those belong in DESIGN.md, not PRODUCT.md.
79
+
80
+ ## Step 4: Write PRODUCT.md
81
+
82
+ Synthesize into a strategic document:
83
+
84
+ ```markdown
85
+ # Product
86
+
87
+ ## Register
88
+
89
+ product
90
+
91
+ ## Users
92
+ [Who they are, their context, the job to be done]
93
+
94
+ ## Product Purpose
95
+ [What this product does, why it exists, what success looks like]
96
+
97
+ ## Brand Personality
98
+ [Voice, tone, 3-word personality, emotional goals]
99
+
100
+ ## Anti-references
101
+ [What this should NOT look like. Specific bad-example sites or patterns to avoid.]
102
+
103
+ ## Design Principles
104
+ [3-5 strategic principles derived from the conversation. Principles like "practice what you preach", "show, don't tell", "expert confidence" — NOT visual rules like "use OKLCH" or "magenta accent".]
105
+
106
+ ## Accessibility & Inclusion
107
+ [WCAG level, known user needs, considerations]
108
+ ```
109
+
110
+ Register is either `brand` or `product` as a bare value. No prose, no commentary.
111
+
112
+ Write to `PROJECT_ROOT/PRODUCT.md`. If `.impeccable.md` existed, the loader already renamed it — merge into that content rather than starting from scratch.
113
+
114
+ ## Step 5: Decide on DESIGN.md
115
+
116
+ Offer `$impeccable document` either way. Two paths:
117
+
118
+ - **Code exists** (CSS tokens, components, a running site): "I can generate a DESIGN.md that captures your visual system (colors, typography, components) so variants stay on-brand. Want to do that now?"
119
+ - **Pre-implementation** (empty project): "I can seed a starter DESIGN.md from five quick questions about color strategy, type direction, motion energy, and references. You can re-run once there's code, to capture the real tokens. Want to do that now?"
120
+
121
+ If the user agrees, delegate to `$impeccable document` (it auto-detects scan vs seed). Load its reference and follow that flow.
122
+
123
+ If the user prefers to skip, mention they can run `$impeccable document` any time later.
124
+
125
+ ## Step 6: Confirm and wrap up
126
+
127
+ Summarize:
128
+ - Register captured (brand / product)
129
+ - What was written (PRODUCT.md, DESIGN.md, or both)
130
+ - The 3-5 strategic principles from PRODUCT.md that will guide future work
131
+ - If DESIGN.md is pending, remind the user how to generate it later
132
+
133
+ **Critical: re-run the loader to refresh session context.** After writing PRODUCT.md, run `node .claude/skills/impeccable/scripts/load-context.mjs` one final time and let its full JSON output land in conversation. This ensures subsequent commands in this session use the freshly-written PRODUCT.md, not a stale earlier version.
134
+
135
+ If teach was invoked as a blocker by another impeccable command (e.g. the user ran `$impeccable polish` with no PRODUCT.md), resume that original task now with the fresh context.
136
+
137
+ Optionally ask the user directly to clarify what you cannot infer. whether they'd like a brief summary of PRODUCT.md appended to AGENTS.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
@@ -0,0 +1,124 @@
1
+ Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type.
2
+
3
+ ---
4
+
5
+ ## Register
6
+
7
+ Brand: run the font selection procedure in [brand.md](brand.md). Pairing follows the brand's lane (display serif + sans body for editorial/luxury, one committed sans for tech, etc.). Fluid `clamp()` scale, ≥1.25 ratio between steps.
8
+
9
+ Product: system fonts and familiar sans stacks are legitimate here. One well-tuned family typically carries the whole UI. Fixed `rem` scale, 1.125–1.2 ratio between more closely-spaced steps.
10
+
11
+ ---
12
+
13
+ ## Assess Current Typography
14
+
15
+ Analyze what's weak or generic about the current type:
16
+
17
+ 1. **Font choices**:
18
+ - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults)
19
+ - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface)
20
+ - Are there too many font families? (More than 2-3 is almost always a mess)
21
+
22
+ 2. **Hierarchy**:
23
+ - Can you tell headings from body from captions at a glance?
24
+ - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy)
25
+ - Are weight contrasts strong enough? (Medium vs Regular is barely visible)
26
+
27
+ 3. **Sizing & scale**:
28
+ - Is there a consistent type scale, or are sizes arbitrary?
29
+ - Does body text meet minimum readability? (16px+)
30
+ - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings)
31
+
32
+ 4. **Readability**:
33
+ - Are line lengths comfortable? (45-75 characters ideal)
34
+ - Is line-height appropriate for the font and context?
35
+ - Is there enough contrast between text and background?
36
+
37
+ 5. **Consistency**:
38
+ - Are the same elements styled the same way throughout?
39
+ - Are font weights used consistently? (Not bold in one section, semibold in another for the same role)
40
+ - Is letter-spacing intentional or default everywhere?
41
+
42
+ **CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting.
43
+
44
+ ## Plan Typography Improvements
45
+
46
+ Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies.
47
+
48
+ Create a systematic plan:
49
+
50
+ - **Font selection**: Do fonts need replacing? What fits the brand/context?
51
+ - **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy
52
+ - **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits)
53
+ - **Spacing**: Line-heights, letter-spacing, and margins between typographic elements
54
+
55
+ ## Improve Typography Systematically
56
+
57
+ ### Font Selection
58
+
59
+ If fonts need replacing:
60
+ - Choose fonts that reflect the brand personality
61
+ - Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights
62
+ - Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks)
63
+
64
+ ### Establish Hierarchy
65
+
66
+ Build a clear type scale:
67
+ - **5 sizes cover most needs**: caption, secondary, body, subheading, heading
68
+ - **Use a consistent ratio** between levels (1.25, 1.333, or 1.5)
69
+ - **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone
70
+ - **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need
71
+ - **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed
72
+
73
+ ### Fix Readability
74
+
75
+ - Set `max-width` on text containers using `ch` units (`max-width: 65ch`)
76
+ - Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7)
77
+ - Increase line-height slightly for light-on-dark text
78
+ - Ensure body text is at least 16px / 1rem
79
+
80
+ ### Refine Details
81
+
82
+ - Use `tabular-nums` for data tables and numbers that should align
83
+ - Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text
84
+ - Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`)
85
+ - Set `font-kerning: normal` and consider OpenType features where appropriate
86
+
87
+ ### Weight Consistency
88
+
89
+ - Define clear roles for each weight and stick to them
90
+ - Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty)
91
+ - Load only the weights you actually use (each weight adds to page load)
92
+
93
+ **NEVER**:
94
+ - Use more than 2-3 font families
95
+ - Pick sizes arbitrarily — commit to a scale
96
+ - Set body text below 16px
97
+ - Use decorative/display fonts for body text
98
+ - Disable browser zoom (`user-scalable=no`)
99
+ - Use `px` for font sizes — use `rem` to respect user settings
100
+ - Default to Inter/Roboto/Open Sans when personality matters
101
+ - Pair fonts that are similar but not identical (two geometric sans-serifs)
102
+
103
+ ## Verify Typography Improvements
104
+
105
+ - **Hierarchy**: Can you identify heading vs body vs caption instantly?
106
+ - **Readability**: Is body text comfortable to read in long passages?
107
+ - **Consistency**: Are same-role elements styled identically throughout?
108
+ - **Personality**: Does the typography reflect the brand?
109
+ - **Performance**: Are web fonts loading efficiently without layout shift?
110
+ - **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%?
111
+
112
+ Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make.
113
+
114
+ ## Live-mode signature params
115
+
116
+ Each variant MUST declare a `scale` param controlling the hierarchy ratio. Express all font sizes in the variant's scoped CSS through `calc(var(--p-scale, 1) * <base>)` or, better, scale the type ramp via `clamp(min, calc(var(--p-scale, 1) * Npx), max)`. Users slide from subdued to commanding.
117
+
118
+ ```json
119
+ {"id":"scale","kind":"range","min":0.85,"max":1.3,"step":0.05,"default":1,"label":"Scale"}
120
+ ```
121
+
122
+ Where the variant riffs on a specific pairing, expose the pairing choice as a `steps` param (e.g. "serif display + sans body" vs. "mono display + sans body" vs. "all-sans"). Each branch routes through `:scope[data-p-pairing="X"]` selectors in scoped CSS.
123
+
124
+ See `reference/live.md` for the full params contract.