quiver-cli 0.8.0 → 1.0.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 (200) hide show
  1. package/README.md +110 -45
  2. package/bin/quiver-cli.mjs +3 -1
  3. package/dist/cli.js +546 -458
  4. package/package.json +2 -2
  5. package/template/.agents/AGENTS.md +4 -3
  6. package/template/.agents/config.json +7 -0
  7. package/template/.agents/plugins/opencode/rtk.ts +34 -0
  8. package/template/.agents/skills/agent-browser/SKILL.md +1 -0
  9. package/template/.agents/skills/apps/skybridge/SKILL.md +4 -0
  10. package/template/.agents/skills/design/impeccable/SKILL.md +36 -118
  11. package/template/.agents/skills/design/impeccable/reference/adapt.md +1 -0
  12. package/template/.agents/skills/design/impeccable/reference/adapt.native.md +58 -0
  13. package/template/.agents/skills/design/impeccable/reference/android.md +40 -0
  14. package/template/.agents/skills/design/impeccable/reference/animate.md +73 -188
  15. package/template/.agents/skills/design/impeccable/reference/audit.md +12 -9
  16. package/template/.agents/skills/design/impeccable/reference/audit.native.md +139 -0
  17. package/template/.agents/skills/design/impeccable/reference/bolder.md +19 -101
  18. package/template/.agents/skills/design/impeccable/reference/clarify.md +59 -253
  19. package/template/.agents/skills/design/impeccable/reference/colorize.md +51 -222
  20. package/template/.agents/skills/design/impeccable/reference/craft-floor.md +42 -0
  21. package/template/.agents/skills/design/impeccable/reference/craft.md +3 -121
  22. package/template/.agents/skills/design/impeccable/reference/critique.md +44 -23
  23. package/template/.agents/skills/design/impeccable/reference/degraded/asset-producer.md +90 -0
  24. package/template/.agents/skills/design/impeccable/reference/degraded/documenter.md +24 -0
  25. package/template/.agents/skills/design/impeccable/reference/degraded/finish-reviewer.md +37 -0
  26. package/template/.agents/skills/design/impeccable/reference/degraded/manual-edit-applier.md +92 -0
  27. package/template/.agents/skills/design/impeccable/reference/delight.md +47 -279
  28. package/template/.agents/skills/design/impeccable/reference/distill.md +2 -2
  29. package/template/.agents/skills/design/impeccable/reference/doctor.md +53 -0
  30. package/template/.agents/skills/design/impeccable/reference/document.md +60 -73
  31. package/template/.agents/skills/design/impeccable/reference/harden.md +1 -12
  32. package/template/.agents/skills/design/impeccable/reference/hooks.md +20 -5
  33. package/template/.agents/skills/design/impeccable/reference/init.md +72 -119
  34. package/template/.agents/skills/design/impeccable/reference/ios.md +45 -0
  35. package/template/.agents/skills/design/impeccable/reference/layout.md +54 -131
  36. package/template/.agents/skills/design/impeccable/reference/live-setup.md +102 -0
  37. package/template/.agents/skills/design/impeccable/reference/live.md +116 -511
  38. package/template/.agents/skills/design/impeccable/reference/new-work.md +105 -0
  39. package/template/.agents/skills/design/impeccable/reference/{product.md → operate.md} +6 -5
  40. package/template/.agents/skills/design/impeccable/reference/optimize.md +4 -4
  41. package/template/.agents/skills/design/impeccable/reference/overdrive.md +1 -4
  42. package/template/.agents/skills/design/impeccable/reference/polish.md +68 -212
  43. package/template/.agents/skills/design/impeccable/reference/quieter.md +3 -3
  44. package/template/.agents/skills/design/impeccable/reference/routing.md +18 -0
  45. package/template/.agents/skills/design/impeccable/reference/shape.md +38 -144
  46. package/template/.agents/skills/design/impeccable/reference/typeset.md +51 -250
  47. package/template/.agents/skills/design/impeccable/reference/visualize.md +47 -0
  48. package/template/.agents/skills/design/impeccable/scripts/command-metadata.json +1 -1
  49. package/template/.agents/skills/design/impeccable/scripts/concept-seed.mjs +558 -0
  50. package/template/.agents/skills/design/impeccable/scripts/context-signals.mjs +119 -10
  51. package/template/.agents/skills/design/impeccable/scripts/context.mjs +534 -45
  52. package/template/.agents/skills/design/impeccable/scripts/critique-storage.mjs +18 -47
  53. package/template/.agents/skills/design/impeccable/scripts/detector/browser/injected/index.mjs +96 -10
  54. package/template/.agents/skills/design/impeccable/scripts/detector/cli/main.mjs +174 -26
  55. package/template/.agents/skills/design/impeccable/scripts/detector/design-system.mjs +233 -0
  56. package/template/.agents/skills/design/impeccable/scripts/detector/detect-antipatterns-browser.js +3348 -203
  57. package/template/.agents/skills/design/impeccable/scripts/detector/engines/browser/detect-url.mjs +102 -7
  58. package/template/.agents/skills/design/impeccable/scripts/detector/engines/regex/detect-text.mjs +297 -97
  59. package/template/.agents/skills/design/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +187 -16
  60. package/template/.agents/skills/design/impeccable/scripts/detector/engines/static-html/detect-html.mjs +41 -11
  61. package/template/.agents/skills/design/impeccable/scripts/detector/findings.mjs +7 -1
  62. package/template/.agents/skills/design/impeccable/scripts/detector/node/file-system.mjs +16 -2
  63. package/template/.agents/skills/design/impeccable/scripts/detector/registry/antipatterns.mjs +207 -38
  64. package/template/.agents/skills/design/impeccable/scripts/detector/rules/checks.mjs +3082 -173
  65. package/template/.agents/skills/design/impeccable/scripts/detector/shared/constants.mjs +11 -0
  66. package/template/.agents/skills/design/impeccable/scripts/detector/shared/fonts.mjs +30 -0
  67. package/template/.agents/skills/design/impeccable/scripts/doctor.mjs +336 -0
  68. package/template/.agents/skills/design/impeccable/scripts/embed-prompt.mjs +133 -0
  69. package/template/.agents/skills/design/impeccable/scripts/generate-image.mjs +240 -0
  70. package/template/.agents/skills/design/impeccable/scripts/hook-admin.mjs +98 -18
  71. package/template/.agents/skills/design/impeccable/scripts/hook-before-edit.mjs +46 -6
  72. package/template/.agents/skills/design/impeccable/scripts/hook-lib.mjs +518 -50
  73. package/template/.agents/skills/design/impeccable/scripts/hook.mjs +25 -8
  74. package/template/.agents/skills/design/impeccable/scripts/lib/artifact-schema.mjs +93 -0
  75. package/template/.agents/skills/design/impeccable/scripts/lib/composition-catalog.mjs +200 -0
  76. package/template/.agents/skills/design/impeccable/scripts/lib/concept-catalog.mjs +357 -0
  77. package/template/.agents/skills/design/impeccable/scripts/lib/impeccable-config.mjs +27 -7
  78. package/template/.agents/skills/design/impeccable/scripts/lib/impeccable-paths.mjs +17 -8
  79. package/template/.agents/skills/design/impeccable/scripts/lib/provider.mjs +5 -0
  80. package/template/.agents/skills/design/impeccable/scripts/lib/roll-selection.mjs +362 -0
  81. package/template/.agents/skills/design/impeccable/scripts/lib/staleness-deep.mjs +457 -0
  82. package/template/.agents/skills/design/impeccable/scripts/lib/staleness-notice.mjs +169 -0
  83. package/template/.agents/skills/design/impeccable/scripts/lib/staleness.mjs +457 -0
  84. package/template/.agents/skills/design/impeccable/scripts/lib/surface-briefs.mjs +151 -0
  85. package/template/.agents/skills/design/impeccable/scripts/lib/target-slug.mjs +33 -0
  86. package/template/.agents/skills/design/impeccable/scripts/lib/template-extensions.mjs +146 -0
  87. package/template/.agents/skills/design/impeccable/scripts/live/accept-css.mjs +617 -0
  88. package/template/.agents/skills/design/impeccable/scripts/live/accept-verify.mjs +60 -0
  89. package/template/.agents/skills/design/impeccable/scripts/live/browser-script-parts.mjs +7 -1
  90. package/template/.agents/skills/design/impeccable/scripts/live/completion.mjs +10 -1
  91. package/template/.agents/skills/design/impeccable/scripts/live/event-validation.mjs +67 -5
  92. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/astro.mjs +47 -0
  93. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/detect-utils.mjs +73 -0
  94. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/index.mjs +143 -0
  95. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/journal.mjs +197 -0
  96. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/nextjs.mjs +49 -0
  97. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/nuxt.mjs +161 -0
  98. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/script-src.mjs +17 -0
  99. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/static-html.mjs +26 -0
  100. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/sveltekit.mjs +71 -0
  101. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/tag-strategy.mjs +247 -0
  102. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/tanstack-start.mjs +70 -0
  103. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/vite-generic.mjs +42 -0
  104. package/template/.agents/skills/design/impeccable/scripts/live/generation-preflight.mjs +149 -0
  105. package/template/.agents/skills/design/impeccable/scripts/live/instructions.mjs +142 -0
  106. package/template/.agents/skills/design/impeccable/scripts/live/poll-lanes.mjs +14 -0
  107. package/template/.agents/skills/design/impeccable/scripts/live/roots.mjs +508 -0
  108. package/template/.agents/skills/design/impeccable/scripts/live/session-store.mjs +324 -50
  109. package/template/.agents/skills/design/impeccable/scripts/live/source-lock.mjs +105 -0
  110. package/template/.agents/skills/design/impeccable/scripts/live/source-search.mjs +105 -0
  111. package/template/.agents/skills/design/impeccable/scripts/live/svelte-ast.mjs +961 -0
  112. package/template/.agents/skills/design/impeccable/scripts/live/svelte-component.mjs +588 -72
  113. package/template/.agents/skills/design/impeccable/scripts/live/sveltekit-adapter.mjs +59 -17
  114. package/template/.agents/skills/design/impeccable/scripts/live/tanstack-adapter.mjs +280 -0
  115. package/template/.agents/skills/design/impeccable/scripts/live/vocabulary.mjs +135 -0
  116. package/template/.agents/skills/design/impeccable/scripts/live-accept.mjs +210 -68
  117. package/template/.agents/skills/design/impeccable/scripts/live-browser.js +1562 -223
  118. package/template/.agents/skills/design/impeccable/scripts/live-commit-manual-edits.mjs +3 -0
  119. package/template/.agents/skills/design/impeccable/scripts/live-complete.mjs +33 -1
  120. package/template/.agents/skills/design/impeccable/scripts/live-inject.mjs +175 -255
  121. package/template/.agents/skills/design/impeccable/scripts/live-insert.mjs +26 -6
  122. package/template/.agents/skills/design/impeccable/scripts/live-manual-edit-evidence.mjs +6 -1
  123. package/template/.agents/skills/design/impeccable/scripts/live-poll.mjs +61 -16
  124. package/template/.agents/skills/design/impeccable/scripts/live-resume.mjs +39 -10
  125. package/template/.agents/skills/design/impeccable/scripts/live-server.mjs +573 -47
  126. package/template/.agents/skills/design/impeccable/scripts/live-status.mjs +17 -7
  127. package/template/.agents/skills/design/impeccable/scripts/live-wrap.mjs +124 -91
  128. package/template/.agents/skills/design/impeccable/scripts/live.mjs +88 -26
  129. package/template/.agents/skills/design/impeccable/scripts/palette.mjs +76 -81
  130. package/template/.agents/skills/design/impeccable/scripts/pin.mjs +18 -11
  131. package/template/.agents/skills/design/impeccable/scripts/serve-question.mjs +932 -0
  132. package/template/.agents/skills/design/impeccable/scripts/surface-brief.mjs +74 -0
  133. package/template/.agents/skills/design/shadcn/SKILL.md +46 -11
  134. package/template/.agents/skills/design/shadcn/cli.md +49 -16
  135. package/template/.agents/skills/design/shadcn/customization.md +14 -7
  136. package/template/.agents/skills/design/shadcn/evals/evals.json +30 -0
  137. package/template/.agents/skills/design/shadcn/mcp.md +27 -16
  138. package/template/.agents/skills/design/shadcn/registry.md +277 -0
  139. package/template/.agents/skills/design/shadcn/rules/chat.md +224 -0
  140. package/template/.agents/skills/design/shadcn/rules/composition.md +20 -2
  141. package/template/.agents/skills/design/shadcn/rules/styling.md +23 -0
  142. package/template/.agents/skills/find-skills/SKILL.md +2 -3
  143. package/template/.agents/skills/hono/SKILL.md +579 -0
  144. package/template/.agents/skills/integrations/langfuse/SKILL.md +10 -6
  145. package/template/.agents/skills/integrations/langfuse/references/ci-cd.md +41 -0
  146. package/template/.agents/skills/integrations/langfuse/references/cli.md +8 -0
  147. package/template/.agents/skills/integrations/langfuse/references/error-analysis.md +15 -27
  148. package/template/.agents/skills/integrations/langfuse/references/instrumentation.md +39 -52
  149. package/template/.agents/skills/integrations/langfuse/references/judge-calibration.md +5 -2
  150. package/template/.agents/skills/integrations/langfuse/references/prompt-engineering.md +35 -0
  151. package/template/.agents/skills/integrations/langfuse/references/prompt-migration.md +41 -196
  152. package/template/.agents/skills/integrations/langfuse/references/skill-feedback.md +3 -0
  153. package/template/.agents/skills/integrations/langfuse/references/trace-evaluator-upgrade.md +76 -0
  154. package/template/.agents/skills/integrations/langfuse/references/user-feedback.md +4 -0
  155. package/template/.agents/skills/integrations/langfuse/references/v4-project-migration.md +73 -0
  156. package/template/.agents/skills/supabase/CHANGELOG.md +71 -0
  157. package/template/.agents/skills/supabase/SKILL.md +145 -0
  158. package/template/.agents/skills/supabase/assets/feedback-issue-template.md +17 -0
  159. package/template/.agents/skills/supabase/references/skill-feedback.md +17 -0
  160. package/template/.agents/skills/supabase-postgres-best-practices/CHANGELOG.md +73 -0
  161. package/template/.agents/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  162. package/template/.agents/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
  163. package/template/.agents/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
  164. package/template/.agents/skills/supabase-postgres-best-practices/references/_template.md +34 -0
  165. package/template/.agents/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
  166. package/template/.agents/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
  167. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
  168. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
  169. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
  170. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
  171. package/template/.agents/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
  172. package/template/.agents/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
  173. package/template/.agents/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
  174. package/template/.agents/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
  175. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
  176. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
  177. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
  178. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
  179. package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
  180. package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
  181. package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
  182. package/template/.agents/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
  183. package/template/.agents/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
  184. package/template/.agents/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
  185. package/template/.agents/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
  186. package/template/.agents/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
  187. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
  188. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
  189. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
  190. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
  191. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
  192. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
  193. package/template/.agents/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
  194. package/template/.agents/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
  195. package/template/.agents/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
  196. package/template/.agents/upstreams.json +34 -12
  197. package/template/.agents/skills/design/impeccable/reference/brand.md +0 -108
  198. package/template/.agents/skills/design/impeccable/reference/codex.md +0 -105
  199. package/template/.agents/skills/design/impeccable/reference/interaction-design.md +0 -189
  200. package/template/.agents/skills/integrations/langfuse/references/sdk-upgrade.md +0 -175
@@ -1,165 +1,59 @@
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.
1
+ # Shape
2
2
 
3
- **Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good.
3
+ Discover what should be made and how it should work, then return a confirmed design brief without code.
4
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.
5
+ ## Phase 1: Discovery interview
6
6
 
7
- ## Philosophy
7
+ Do not write code or choose visual direction yet.
8
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.
9
+ ### Cadence
10
10
 
11
- ## Phase 1: Discovery Interview
11
+ - Use the structured question tool when available; otherwise ask and stop.
12
+ - Ask two or three related questions per round, then wait. One round is the default; add a second only when the answers expose a material gap.
13
+ - Do not dump a questionnaire, repeat settled facts, or turn obvious facts into menus. Assert the likely reading and invite correction.
14
+ - A sparse prompt requires at least one answer round. A precise prompt may need only a compact confirmation.
12
15
 
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.
16
+ ### Round 1: purpose, people, and outcome
14
17
 
15
- This is a required interaction, not optional guidance. 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.
18
+ Choose the two or three questions that most change the result:
16
19
 
17
- ### Interview cadence
20
+ - What is this surface or feature for, and what problem must it solve?
21
+ - Who specifically reaches it, in what situation and state of mind?
22
+ - What is the primary thing they must understand or do? What would success look like?
23
+ - What is uniquely true here that a neighboring product or generic template could not claim?
18
24
 
19
- Discovery includes at least one user-answer round unless PRODUCT.md, DESIGN.md, or an already-confirmed brief directly answers the needed inputs. With a sparse prompt, do **not** synthesize a complete brief for confirmation on the first response.
25
+ ### Round 2: material, behavior, and boundaries
20
26
 
21
- - Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
22
- - Ask **2-3 questions per round**, then wait for answers.
23
- - Treat PRODUCT.md and DESIGN.md as anchors; they reduce repeated questions but do **not** replace shape for craft. Shape is task-specific.
24
- - One round is the default. Add a second only if the first answers leave material gaps. Don't run a second round just to feel thorough.
25
- - Round 1 should clarify purpose, audience/context, content/scope, and (for brand) visual direction.
26
- - Round 2, when needed, fills in whatever's still genuinely missing.
27
+ Run only for material unresolved decisions:
27
28
 
28
- **Assert-then-confirm, not menu-with-escape.** When PRODUCT.md and the user's prompt make one option obvious, name it and ask the user to confirm or override. Don't enumerate "Restrained / Committed / Or something else?" as a real choice; "This reads as Restrained, confirm?" beats a four-option menu when the answer is already clear.
29
+ - What real content, evidence, data, and assets must the experience carry? What are realistic minimum, typical, and maximum ranges?
30
+ - Which states and transitions matter: first-run, empty, loading, error, success, permissions, overflow, or expert use?
31
+ - What is the intended fidelity, breadth, and interactivity: exploration, production-ready screen, full flow, or broader surface?
32
+ - What must remain untouched? What would make the result feel wrong even if it looked polished?
33
+ - Which platform, framework, performance, accessibility, localization, or delivery constraints are binding?
29
34
 
30
- ### Purpose & Context
31
- - What is this feature for? What problem does it solve?
32
- - Who specifically will use it? (Not "users"; be specific: role, context, frequency)
33
- - What does success look like? How will you know this feature is working?
34
- - What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?)
35
+ Never ask for CSS values or canned aesthetic lanes. New-work owns visual-world and concept choices.
35
36
 
36
- ### Content & Data
37
- - What content or data does this feature display or collect?
38
- - What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items)
39
- - What are the edge cases? (Empty state, error state, first-time use, power user)
40
- - Is any content dynamic? What changes and how often?
41
- - What visual assets are real content here? Note required images, product shots, illustrations, maps, textures, diagrams, generated objects, or existing project assets.
37
+ ## Phase 2: Resolve the design direction
42
38
 
43
- ### Design Direction
39
+ For new surfaces, brand expansion, or replacement, follow [new-work.md](new-work.md) through visual authority, any world workshop, and concept choice. Reuse discovery, then return before its contract, persistence, or implementation. Inside an established world, use its concept process only when composition or interaction remains materially open.
44
40
 
45
- Force a visual decision on three fronts. Skip anything PRODUCT.md or DESIGN.md already answers; ask only what's missing.
41
+ ## Phase 3: Write the brief
46
42
 
47
- - **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).
48
- - **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.
49
- - **Two or three named anchor references.** Specific products, brands, objects. Not adjectives like "modern" or "clean."
43
+ Write the smallest useful brief:
50
44
 
51
- ### Scope
45
+ 1. **Job and audience:** who arrives, their context, need, and visitor mode.
46
+ 2. **Outcome and proof:** primary task/action, success, real evidence, and product-specific truth.
47
+ 3. **Selected direction:** visual authority, structural/interaction thesis, sequence, focal moment, and implementation consequence.
48
+ 4. **Scope and boundaries:** fidelity, breadth, interactivity, named target, what remains untouched, and explicit anti-goals.
49
+ 5. **States and ranges:** realistic content/data ranges and material states.
50
+ 6. **Interaction and layout:** hierarchy, topology, responsiveness, affordances, feedback, and transitions; intent, not CSS.
51
+ 7. **Constraints and open decisions:** platform, delivery, accessibility, localization, reusable components, and choices a builder must not invent.
52
52
 
53
- Always ask. Sketch quality and shipped quality are different outputs; don't guess between them.
53
+ Use three to five bullets when the task is settled; use the full structure only for ambiguous, multi-screen, or standalone planning. Do not restate the conversation.
54
54
 
55
- - **Fidelity.** Sketch / mid-fi / high-fi / production-ready?
56
- - **Breadth.** One screen / a flow / a whole surface?
57
- - **Interactivity.** Static visual / interactive prototype / shipped-quality component?
58
- - **Time intent.** Quick exploration, or polish until it ships?
55
+ ## Confirm and stop
59
56
 
60
- Scope answers are task-scoped. Don't write them to PRODUCT.md or DESIGN.md; carry them through the design brief only.
57
+ Present the brief for explicit confirmation or one correction round, then stop: shape never writes code or a direction contract.
61
58
 
62
- ### Constraints
63
- - Are there technical constraints? (Framework, performance budget, browser support)
64
- - Are there content constraints? (Localization, dynamic text length, user-generated content)
65
- - Mobile/responsive requirements?
66
- - Accessibility requirements beyond WCAG AA?
67
-
68
- ### Anti-Goals
69
- - What should this NOT be? What would be a wrong direction?
70
- - What's the biggest risk of getting this wrong?
71
-
72
- ## Phase 1.5: Visual Direction Probe (Capability-Gated)
73
-
74
- After the discovery interview, generate a small set of visual direction probes **before** writing the final brief when all of these are true:
75
-
76
- - The work is **net-new** or directionally ambiguous enough that visual exploration will clarify the brief.
77
- - The requested fidelity is **mid-fi, high-fi, or production-ready**. Skip for sketch-only planning.
78
- - The current harness gives you native image generation (Codex's `image_gen`, an equivalent MCP tool, or similar). Don't ask the user to install APIs or tooling.
79
-
80
- When those conditions are met, this step is mandatory. If image generation isn't natively available, do not ask the user to install APIs or tooling. State in one line that the image step is skipped because the harness lacks native image generation, then proceed. The one-line announcement is required, not optional; it forces a conscious decision instead of letting the step quietly evaporate.
81
-
82
- Use probes to explore visual lanes, not to replace the brief.
83
-
84
- Do not skip probes because the final UI will be semantic, editable, code-native, responsive, or accessible. Those are implementation requirements, not reasons to avoid visual exploration.
85
-
86
- ### What to generate
87
-
88
- Generate **2 to 4** distinct direction probes based on the discovery answers, especially:
89
-
90
- - Color strategy
91
- - Theme scene sentence
92
- - Named anchor references
93
- - Scope and fidelity
94
-
95
- The probes should differ in primary visual direction (hierarchy, topology, density, typographic voice, or color strategy), not just palette tweaks.
96
-
97
- ### How to use the probes
98
-
99
- - Treat them as **direction tests**, not final designs.
100
- - Use them to pressure-test whether the brief is pointing at the right lane.
101
- - Ask the user which direction feels closest, what feels off, and what should carry forward.
102
- - If the probes reveal a mismatch, revise the brief inputs before finalizing the brief.
103
-
104
- ### Important limits
105
-
106
- - Do **not** skip discovery because image generation is available.
107
- - Do **not** treat generated imagery as final UX specification, final copy, or final accessibility behavior.
108
- - Do **not** use this step for minor refinements of existing work. It's for shaping a new surface or clarifying a big directional choice.
109
-
110
- If image generation isn't natively available, announce the skip in one line and proceed to the design brief.
111
-
112
- ## Phase 2: Design Brief
113
-
114
- After the interview and any required probes, present a brief and **end your response**. The user must confirm before any implementation runs. Do not present a brief and then continue to code in the same response, even if the brief feels obvious to you. The user's confirmation is the gate.
115
-
116
- **Choose the brief shape based on how clear the answers are:**
117
-
118
- - **Compact form (3-5 bullets)** when discovery was crisp and the original prompt + PRODUCT.md already pinned scope, content, and direction. State what you're building, the visual lane, and end with one or two specific questions or a clear "confirm or override?" prompt. This is the default for typical craft requests with a clear prompt.
119
- - **Full structured form (sections below)** when the task is genuinely ambiguous, multi-screen, or when the user asked for shape as a standalone step. Use this when the discipline of structure earns its weight.
120
-
121
- Don't pad a clear brief into a long one to look thorough. A 70-line brief restating answers the user just gave is noise, not rigor. Equally, don't skip the confirmation pause to look efficient: the pause is the point.
122
-
123
- Present the brief, then **stop and wait for explicit confirmation**. You are not the judge of whether the user already approved. Even when the brief feels obviously right, ask once and wait. The pause is what separates shape from premature implementation.
124
-
125
- ### Brief Structure
126
-
127
- **1. Feature Summary** (2-3 sentences)
128
- What this is, who it's for, what it needs to accomplish.
129
-
130
- **2. Primary User Action**
131
- The single most important thing a user should do or understand here.
132
-
133
- **3. Design Direction**
134
- 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.
135
-
136
- If you ran the Visual Direction Probe step, name which probe direction won and what changed in the brief because of it.
137
-
138
- **4. Scope**
139
- Fidelity, breadth, interactivity, and time intent from the Scope section of the interview. Task-scoped; these don't persist beyond the brief.
140
-
141
- **5. Layout Strategy**
142
- High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS.
143
-
144
- **6. Key States**
145
- List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel.
146
-
147
- **7. Interaction Model**
148
- 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?
149
-
150
- **8. Content Requirements**
151
- What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges. For image-led surfaces, also list the required image/media roles and their likely source (project asset, generated raster, semantic SVG/CSS, canvas/WebGL, icon library, or accepted omission).
152
-
153
- **9. Recommended References**
154
- Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., layout.md for complex layouts, animate.md for animated features, interaction-design.md for form-heavy features, typeset.md for typography-driven pages, colorize.md for color-led brands).
155
-
156
- **10. Open Questions**
157
- Anything genuinely unresolved. Don't list "open questions" you've already recommended a default for; assert the default and move on. If you'd write `Recommend: X` next to a question, just decide X.
158
-
159
- ---
160
-
161
- ask the user directly to clarify what you cannot infer. Ask for explicit confirmation of the brief before finishing.
162
-
163
- If the user disagrees with any part, revisit the relevant discovery questions. A shape run is incomplete until the user confirms direction.
164
-
165
- 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.)
59
+ When no human or structured answer mechanism exists, mark assumptions plainly, return the brief, and stop.
@@ -1,279 +1,80 @@
1
- Typography carries most of the information on the page. Replace generic defaults (Inter, Roboto, system fallback at flat scale) with type that reflects the brand and scales with intentional contrast.
1
+ Typography carries information, hierarchy, and voice. Improve it inside the established visual world; do not replace the identity unless the user asked to.
2
2
 
3
3
  ---
4
4
 
5
- ## Register
5
+ ## Visitor mode
6
6
 
7
- Brand: run the font selection procedure in [brand.md](brand.md). Fluid `clamp()` scale, ≥1.25 ratio between steps.
7
+ - **Persuade + Experience:** display type may carry the voice. Use decisive contrast and responsive scale when the composition benefits.
8
+ - **Operate + Read:** stability, scanability, and measure come first. A single well-tuned family and fixed role scale are often right.
9
+ - **Native:** follow [ios.md](ios.md) or [android.md](android.md), including platform scaling and accessibility behavior.
8
10
 
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.
11
+ If typography replacement would create a new identity, route through [new-work.md](new-work.md) and update DESIGN.md. Otherwise preserve confirmed families and improve their use.
10
12
 
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
13
+ ## Two isolated assessments
45
14
 
46
- Consult the [Reference Material](#reference-material) section below for detailed guidance on scales, pairing, and loading strategies.
15
+ When a sub-agent tool is available and permitted, run these independently; otherwise run them yourself in this order. Do not let detector findings anchor the design assessment.
47
16
 
48
- Create a systematic plan:
17
+ 1. **Typographic assessment:** inspect representative pages and styles. Answer every question below with a file, selector, or computed value:
18
+ - **Authority and fit:** Which faces, weights, and roles are established? Do they fit the product and selected world, or are they unexamined defaults? Is every family necessary?
19
+ - **Hierarchy:** Can heading, body, label, metadata, and data roles be distinguished at a glance? Are adjacent sizes or weights too close to carry different jobs?
20
+ - **Scale and consistency:** Is there a deliberate role scale, or a collection of arbitrary values? Do repeated roles stay identical across screens and states?
21
+ - **Reading:** Does body copy stay within a comfortable 45–75 character measure? Are line height, paragraph rhythm, contrast, and tracking tuned to the actual face, width, language, and surface?
22
+ - **Stress:** What happens with long headings, localization expansion, zoom, narrow containers, missing weights, and font fallback?
23
+ - **Delivery:** Are only used assets loaded? Do fallback metrics, loading strategy, and variable-font settings avoid invisible text and disruptive reflow?
24
+ 2. **Mechanical scan:** run:
49
25
 
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)
26
+ ```bash
27
+ node .pi/skills/impeccable/scripts/detect.mjs --json --scope type [target files or dirs]
28
+ ```
63
29
 
64
- ### Establish Hierarchy
30
+ Also inspect dynamic or arbitrary font values the detector cannot interpret. Synthesize both assessments before editing, noting what each caught alone. A clean scan is a floor, not proof of good typography.
65
31
 
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
32
+ ## Set the system
72
33
 
73
- ### Fix Readability
34
+ Before editing, state:
74
35
 
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
36
+ - the roles the interface needs;
37
+ - the intended contrast between those roles;
38
+ - the reading measure and density;
39
+ - which existing faces and weights are authoritative;
40
+ - any performance, localization, or accessibility constraints.
79
41
 
80
- ### Refine Details
42
+ Use the fewest roles and families that make the hierarchy unmistakable. Combine size, weight, space, and tone deliberately instead of asking size alone to do all the work. Role names and tokens should describe purpose rather than values.
81
43
 
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
44
+ ## Apply
86
45
 
87
- ### Weight Consistency
46
+ - Keep body copy comfortably readable and zoomable. Use 1rem / 16px as the ordinary web body floor unless a dense role, platform convention, or user setting justifies otherwise.
47
+ - Keep prose in the 45–75ch range. Tune line height inversely with measure: wider lines generally need more leading.
48
+ - Compensate light text on dark surfaces on all three perceptual axes: slightly more line height, a touch more tracking, and one step more weight when the face needs it.
49
+ - Tune line height to the face, width, language, and contrast, not a universal ratio.
50
+ - Keep repeated roles consistent across screens and states.
51
+ - Use numeric, tabular, code, and label features when their content benefits.
52
+ - Load only used font assets and weights. Provide metric-compatible fallbacks and avoid blocking text.
53
+ - Let marketing display type respond to available space when useful; keep dense product and reading surfaces spatially predictable.
54
+ - Preserve browser zoom, user font settings, Dynamic Type, and platform text scaling.
55
+ - Use paragraph spacing or first-line indentation as the primary paragraph rhythm; combining both usually double-marks the boundary.
88
56
 
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)
57
+ Do not make type decorative at the expense of comprehension, or introduce a second family without a clear role it alone can perform.
92
58
 
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)
59
+ ## Verify
102
60
 
103
- ## Verify Typography Improvements
61
+ - Primary, secondary, body, and metadata roles are recognizable without reading the copy.
62
+ - Long text remains comfortable across relevant widths and languages.
63
+ - The typography belongs to the product and its established world.
64
+ - Loading does not create disruptive reflow or invisible text.
65
+ - Zoom, text scaling, focus, contrast, and reduced viewport paths remain usable.
66
+ - The final mechanical scan has no unexplained findings.
104
67
 
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%?
68
+ Answer each item with rendered or source evidence, then rerun the scan. Do not substitute a bare “yes” for verification.
111
69
 
112
- When the type carries the hierarchy on its own, hand off to `/impeccable polish` for the final pass.
70
+ When the hierarchy holds, hand off to `/impeccable polish`.
113
71
 
114
72
  ## Live-mode signature params
115
73
 
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.
74
+ Every variant declares a coarse `scale` parameter and authors its type ramp against `var(--p-scale, 1)`.
117
75
 
118
76
  ```json
119
77
  {"id":"scale","kind":"range","min":0.85,"max":1.3,"step":0.05,"default":1,"label":"Scale"}
120
78
  ```
121
79
 
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.
125
-
126
- ---
127
-
128
- ## Reference Material
129
-
130
- The sections below were previously `typography.md` and live inline now so the typeset flow has its deep typography reference in one place. `bolder.md` also references this section.
131
-
132
- ### Typography
133
-
134
- #### Classic Typography Principles
135
-
136
- ##### Vertical Rhythm
137
-
138
- Your line-height should be the base unit for ALL vertical spacing. If body text has `line-height: 1.5` on `16px` type (= 24px), spacing values should be multiples of 24px. This creates subconscious harmony; text and space share a mathematical foundation.
139
-
140
- ##### Modular Scale & Hierarchy
141
-
142
- The common mistake: too many font sizes that are too close together (14px, 15px, 16px, 18px...). This creates muddy hierarchy.
143
-
144
- **Use fewer sizes with more contrast.** A 5-size system covers most needs:
145
-
146
- | Role | Typical Ratio | Use Case |
147
- |------|---------------|----------|
148
- | xs | 0.75rem | Captions, legal |
149
- | sm | 0.875rem | Secondary UI, metadata |
150
- | base | 1rem | Body text |
151
- | lg | 1.25-1.5rem | Subheadings, lead text |
152
- | xl+ | 2-4rem | Headlines, hero text |
153
-
154
- Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Pick one and commit.
155
-
156
- ##### Readability & Measure
157
-
158
- Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length: narrow columns need tighter leading, wide columns need more.
159
-
160
- **Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three.
161
-
162
- **Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only.
163
-
164
- #### Font Selection & Pairing
165
-
166
- The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules.
167
-
168
- ##### Anti-reflexes worth defending against
169
-
170
- - A technical/utilitarian brief does NOT need a serif "for warmth." Most tech tools should look like tech tools.
171
- - An editorial/premium brief does NOT need the same expressive serif everyone is using right now. Premium can be Swiss-modern, can be neo-grotesque, can be a literal monospace, can be a quiet humanist sans.
172
- - A children's product does NOT need a rounded display font. Kids' books use real type.
173
- - A "modern" brief does NOT need a geometric sans. The most modern thing you can do is not use the font everyone else is using.
174
-
175
- **System fonts are underrated**: `-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui` looks native, loads instantly, and is highly readable. Consider this for apps where performance > personality.
176
-
177
- ##### Pairing Principles
178
-
179
- **The non-obvious truth**: You often don't need a second font. One well-chosen font family in multiple weights creates cleaner hierarchy than two competing typefaces. Only add a second font when you need genuine contrast (e.g., display headlines + body serif).
180
-
181
- When pairing, contrast on multiple axes:
182
- - Serif + Sans (structure contrast)
183
- - Geometric + Humanist (personality contrast)
184
- - Condensed display + Wide body (proportion contrast)
185
-
186
- ##### Web Font Loading
187
-
188
- The layout shift problem: fonts load late, text reflows, and users see content jump. Here's the fix:
189
-
190
- ```css
191
- /* 1. Use font-display: swap for visibility */
192
- @font-face {
193
- font-family: 'CustomFont';
194
- src: url('font.woff2') format('woff2');
195
- font-display: swap;
196
- }
197
-
198
- /* 2. Match fallback metrics to minimize shift */
199
- @font-face {
200
- font-family: 'CustomFont-Fallback';
201
- src: local('Arial');
202
- size-adjust: 105%; /* Scale to match x-height */
203
- ascent-override: 90%; /* Match ascender height */
204
- descent-override: 20%; /* Match descender depth */
205
- line-gap-override: 10%; /* Match line spacing */
206
- }
207
-
208
- body {
209
- font-family: 'CustomFont', 'CustomFont-Fallback', sans-serif;
210
- }
211
- ```
212
-
213
- Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically.
214
-
215
- **`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks.
216
-
217
- **Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves.
218
-
219
- **Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine.
220
-
221
- #### Modern Web Typography
222
-
223
- ##### Fluid Type
224
-
225
- Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the viewport. The middle value (e.g., `5vw + 1rem`) controls scaling rate (higher vw = faster scaling). Add a rem offset so it doesn't collapse to 0 on small screens.
226
-
227
- **Use fluid type for**: Headings and display text on marketing/content pages where text dominates the layout and needs to breathe across viewport sizes.
228
-
229
- **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI; fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it.
230
-
231
- **Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting.
232
-
233
- **Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end.
234
-
235
- ##### OpenType Features
236
-
237
- Most developers don't know these exist. Use them for polish:
238
-
239
- ```css
240
- /* Proper fractions */
241
- .recipe-amount { font-variant-numeric: diagonal-fractions; }
242
-
243
- /* Small caps for abbreviations */
244
- abbr { font-variant-caps: all-small-caps; }
245
-
246
- /* Disable ligatures in code */
247
- code { font-variant-ligatures: none; }
248
-
249
- /* Enable kerning (usually on by default, but be explicit) */
250
- body { font-kerning: normal; }
251
- ```
252
-
253
- Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/).
254
-
255
- ##### Rendering polish
256
-
257
- ```css
258
- /* Variable fonts: pick the right optical-size master automatically */
259
- body { font-optical-sizing: auto; }
260
- ```
261
-
262
- **ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler.
263
-
264
- #### Typography System Architecture
265
-
266
- Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system.
267
-
268
- #### Accessibility Considerations
269
-
270
- Beyond contrast ratios (which are well-documented), consider:
271
-
272
- - **Never disable zoom**: `user-scalable=no` breaks accessibility. If your layout breaks at 200% zoom, fix the layout.
273
- - **Use rem/em for font sizes**: This respects user browser settings. Never `px` for body text.
274
- - **Minimum 16px body text**: Smaller than this strains eyes and fails WCAG on mobile.
275
- - **Adequate touch targets**: Text links need padding or line-height that creates 44px+ tap targets.
276
-
277
- ---
278
-
279
- **Avoid**: More than 2-3 font families per project. Skipping fallback font definitions. Ignoring font loading performance (FOUT/FOIT). Using decorative fonts for body text.
80
+ Add at most one pairing or weight parameter when it represents a real system choice. Follow [live.md](live.md)'s parameter contract.
@@ -0,0 +1,47 @@
1
+ # Visualize: Direction Comps & Asset Production
2
+
3
+ Load this from [new-work.md](new-work.md) whenever any image generation is available, a harness-native tool or the API fallback context.mjs reports. PRODUCT.md and DESIGN.md are preconditions. New-work has already resolved the visual world; this file must not reopen it.
4
+
5
+ The purpose of a probe is to test composition, narrative, hierarchy, density, focal moment, signature use, and image requirements. It is not a second identity workshop. Keep DESIGN.md's palette, typography direction, material language, component character, imagery stance, and motion grammar fixed.
6
+
7
+ ## Generate three compositional options
8
+
9
+ Render three distinct high-fidelity north-star comps of the requested surface, with whatever generation capability exists, saved under `.impeccable/mocks/` so they survive the session. Comp at the surface's own viewport: portrait at device size for a native app or mobile-first surface, desktop landscape otherwise; a phone screen comped landscape misstates the composition before anything gets built against it. Comps are the build thread's own work, never delegated: the thread that writes the comp prompts holds the direction's full context, and it has already seen every comp when the build starts. Open every image you produce or reference by its workspace-relative path, never an absolute one: sandboxed viewers reject absolute paths, and everything under the project root has a relative path. Base them on the real content and the surface concepts already developed with the user. Three is the number: one comp invites rubber-stamping, and the spread between three is what surfaces the composition worth building. A decision-page sketch is not a probe: it chose the direction at deliberately unfinished fidelity, so the three comps render regardless, and the chosen card's sketch seeds at most one of them.
10
+
11
+ - A comp is a designed surface, not a picture of the subject. Lead the generation prompt with the surface's own structure, whatever regions this design actually has, named in order with their scale relationships; a page with no navigation states that instead of inventing one, and an unconventional surface states its unconventional skeleton. A prompt that leads with the world's atmosphere gets a vignette back: the model paints the fish market instead of the fish market's website. Self-check every render: if it could hang as a poster, or reads as a photograph or scene with some text on it, it is not a comp; regenerate with the layout scaffold stated more literally.
12
+ - When the user shortlisted multiple concepts, spread the three across them.
13
+ - When one direction is committed, vary the structural uncertainty an image can resolve: topology, sequence, density, hierarchy, focal composition, or interaction framing.
14
+ - Show enough beyond the opening moment to prove the concept can govern the whole requested surface.
15
+ - Do not generate a palette artifact, ask new atmosphere questions, introduce a different type voice, or invent a new motif. If the committed world cannot support the concept, return to the concept shortlist rather than changing the world.
16
+
17
+ Treat each comp as a direction test, not a screenshot specification. Core UI text, responsive behavior, accessibility, semantics, and interaction states remain implementation responsibilities.
18
+
19
+ ## One approval point
20
+
21
+ Show the three together: in the harness when it can display images, otherwise on the decision page (`serve-question.mjs`, one option per comp with the comp as its hero). Ask what should carry forward, what feels false to the world, and whether the selected surface concept should be approved, combined, revised, or rejected. Then stop and wait. A structured simulated user counts as attended and receives the same question.
22
+
23
+ Do not begin code until the user approves a direction or explicitly delegates the choice. If they delegate, choose using the task brief, PRODUCT.md, and DESIGN.md, and state the evidence. Approval refines the task concept; it does not modify DESIGN.md.
24
+
25
+ This approval point has no substitute and no skip condition. When the structured question tool errors, fall back to the decision page; only after both fail may you treat the choice as delegated, and a delegated pick is still recorded exactly as an approval is and disclosed in your first reply, not your last. The finish reviewer treats a build with generated comps and no recorded approval as carrying a material finding.
26
+
27
+ After approval, record the choice where tools can find it: the approved comp's path goes in the surface brief, and the approved comp's `.json` prompt sidecar gains `"approved": true` (every comp generated through `generate-image.mjs` has one; create it if a native tool didn't). The sidecar travels with the mocks folder, so the approval survives sessions and machines that never see the brief. Then summarize the composition and the parts of the comp that must not be literalized, return to new-work.md, record the direction contract from the approved surface concept, and build.
28
+
29
+ ## Inventory implementation fidelity
30
+
31
+ Before building, inventory the approved comp's major visible ingredients in writing (a short table in the surface brief or working notes; the finish reviewer audits shipped assets against it) and choose an implementation medium for each: semantic HTML/CSS/SVG, existing project asset, generated raster, sourced raster, icon library, canvas/WebGL, or accepted omission. The same written inventory names the comp's compositional commitments: navigation items and icons, headline levels and their scale relationship, signature geometry such as seams, masks, and overlaps, and each section's arrangement and density. An element never written down is the element the build silently drops, and the direction contract's 150 words cannot carry this list, so this inventory is where it lives.
32
+
33
+ The medium column is where an approved design most often dies, so it obeys a gate: the medium is decided by what the comp region shows, never by what feels buildable in the current stack. A human figure, a product object, machinery, or any material with lighting and depth is raster whatever the stack; writing "silhouette" for a photographic figure, or "CSS" for a sculpted panel's finish, is not a medium choice, it is the quiet deletion of the approved design, and it is how a comp full of physical material becomes a flat page with the same section order. Style does not move this boundary: a comp region with perspective, shading, figure drawing, or dense mechanical detail is illustration however line-drawn it looks, and no build session can author illustration as vectors, so it regenerates as raster like any photograph. Authored SVG covers what a session can specify exactly, diagrams with countable elements, controls, flat shape systems, and it ends where drawing skill begins; an instruction-manual world does not convert its illustrations into diagrams, it makes them line-art illustrations. Produce such regions by regenerating them cleanly, with the approved comp and its embedded prompt as the reference for a fresh render at asset resolution; never crop pixels out of the comp itself, whose effective resolution sits far below asset grade. Dropping an image-native region instead of producing it is a scope decision the user makes at the approval point, never a silent flattening after it. Generated imagery is a material, not a claim: evidence rules bind assertions, specs, testimonials, and photographs presented as real, never render fidelity, so "no photography on hand" forbids fake proof, not an illustrated hero.
34
+
35
+ The gate runs both ways: precise geometry, hard-edged shape systems, diagrams, expressive motion, shaders, and anything interactive are vector and GPU territory (SVG, canvas, WebGL), where a raster flattens what should move, scale, and respond, and code executed safely and professionally remains first-class there. Raster is for what the world paints; code is for what the world draws, animates, or reacts with, and choosing code there is ambition, not economy. Every `produce` entry is produced before the build ships, through the asset producer or in the current thread; an inventory with unproduced entries is an unfinished build, and this gate is where imagery-free pages come from when it is skipped.
36
+
37
+ Pay special attention to the dominant composition, signature use, image-native content, second-fold system, and any interaction the still image only implies.
38
+
39
+ Treat the comp as a north star, not something to trace, and know what that allows: translation into semantic, responsive, accessible code, never recomposition. Keeping the palette and mood while redrawing the topology is a second art direction, not an adaptation. Do not rasterize core UI text or controls. Do not substitute a different visual driver after approval without asking.
40
+
41
+ ## Produce only the assets the build needs
42
+
43
+ Generation context is part of the asset: a build composed by a thread that never saw the prompts places assets it does not understand. So prefer generating build-critical imagery in the build thread when the budget allows, and when a subagent produces assets instead, every asset must carry its prompt, and the builder reads those prompts before composing a single one of them. The carrier is uniform across harnesses: after generating any image with any tool, native or `generate-image.mjs` (which does it automatically), run `node .pi/skills/impeccable/scripts/embed-prompt.mjs <image> --prompt "<the prompt used>"` so the intent lives inside the file itself and survives copies between machines and harnesses; `--read` recovers it from any impeccable-generated image.
44
+
45
+ When clean raster ingredients are required and the harness runs subagents, use the shipped asset producer, `impeccable-asset-producer` (`impeccable_asset_producer` in codex; `/impeccable-asset-producer` in Cursor; on GitHub Copilot say "Use the impeccable-asset-producer agent"): give it the approved comp, output paths, required dimensions and formats, transparency needs, crop notes, and what must remain semantic code. Otherwise produce the minimum required assets in the current thread by the book: load [degraded/asset-producer.md](degraded/asset-producer.md) and follow it inline, with whatever generation exists, the native tool or generate-image.mjs.
46
+
47
+ Return to [new-work.md](new-work.md) for the direction contract, implementation, and the finishing pass.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "craft": {
3
- "description": "Full confirmed-brief-then-build flow. Runs multi-round shape discovery first, resolves visual probe and north-star mock gates when available, then builds and visually iterates. Use when building a new feature end-to-end.",
3
+ "description": "Deprecated compatibility alias for an ordinary Impeccable new-work request. It adds no behavior; natural build and redesign requests use the same flow.",
4
4
  "argumentHint": "[feature description]"
5
5
  },
6
6
  "init": {