@phuc1403/musketeer 0.9.0 → 0.10.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 (163) hide show
  1. package/INSTALLATION.md +52 -52
  2. package/bin/musketeer.js +168 -168
  3. package/package.json +48 -48
  4. package/src/dotnet-scaffold-copier.js +79 -79
  5. package/src/provisioner/detect.js +93 -93
  6. package/src/self-update.js +77 -77
  7. package/template/.claude/agents/git-manager.md +18 -18
  8. package/template/.claude/agents/hallmark-auditor.md +78 -78
  9. package/template/.claude/agents/researcher.md +33 -33
  10. package/template/.claude/hooks/block-unsafe-adr-title.cjs +85 -85
  11. package/template/.claude/hooks/init-adr-dir.cjs +173 -173
  12. package/template/.claude/hooks/inject-adr-flags.cjs +94 -94
  13. package/template/.claude/hooks/lib/adr/command-scan.cjs +115 -115
  14. package/template/.claude/hooks/lib/characteristics/checker.cjs +357 -357
  15. package/template/.claude/hooks/lib/git-info-cache.cjs +191 -191
  16. package/template/.claude/hooks/sync-adr-toc.cjs +146 -146
  17. package/template/.claude/hooks/usage-quota-cache-refresh.cjs +166 -166
  18. package/template/.claude/hooks/validate-characteristics-hook.cjs +66 -66
  19. package/template/.claude/hooks/validate-cml-hook.js +145 -145
  20. package/template/.claude/skills/adr-writer/SKILL.md +48 -48
  21. package/template/.claude/skills/adr-writer/references/adr-example.md +35 -35
  22. package/template/.claude/skills/architecture-characteristic-writer/SKILL.md +215 -215
  23. package/template/.claude/skills/architecture-characteristic-writer/assets/worksheet-template.md +29 -29
  24. package/template/.claude/skills/architecture-characteristic-writer/references/characteristics-catalog.md +40 -40
  25. package/template/.claude/skills/architecture-characteristic-writer/scripts/ranking-table.cjs +171 -171
  26. package/template/.claude/skills/context-map/SKILL.md +80 -80
  27. package/template/.claude/skills/context-map/example.cml +106 -106
  28. package/template/.claude/skills/context-map/reference/Bounded Context/Bounded Context.md +40 -40
  29. package/template/.claude/skills/context-map/reference/Bounded Context/businessModel.md +5 -5
  30. package/template/.claude/skills/context-map/reference/Bounded Context/domainVisionStatement.md +2 -2
  31. package/template/.claude/skills/context-map/reference/Bounded Context/evolution.md +5 -5
  32. package/template/.claude/skills/context-map/reference/Bounded Context/implementationTechnology.md +1 -1
  33. package/template/.claude/skills/context-map/reference/Bounded Context/implements.md +1 -1
  34. package/template/.claude/skills/context-map/reference/Bounded Context/knowledgeLevel.md +4 -4
  35. package/template/.claude/skills/context-map/reference/Bounded Context/realizes.md +9 -9
  36. package/template/.claude/skills/context-map/reference/Bounded Context/refines.md +10 -10
  37. package/template/.claude/skills/context-map/reference/Bounded Context/responsibilities.md +26 -26
  38. package/template/.claude/skills/context-map/reference/Bounded Context/type.md +23 -23
  39. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Anticorruption Layer.md +5 -5
  40. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Bounded Context Relationship.md +12 -12
  41. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Conformist.md +5 -5
  42. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Customer-Supplier (C-S).md +22 -22
  43. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Open Host Service.md +4 -4
  44. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Partnership (P).md +13 -13
  45. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Published Language.md +4 -4
  46. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Shared Kernel (SK).md +12 -12
  47. package/template/.claude/skills/context-map/reference/Context Map.md +62 -62
  48. package/template/.claude/skills/context-map/reference/Domain/Domain.md +30 -30
  49. package/template/.claude/skills/context-map/reference/Domain/supports.md +33 -33
  50. package/template/.claude/skills/context-map/reference/Domain/type.md +3 -3
  51. package/template/.claude/skills/context-map/reference/Semantic Rules.md +32 -32
  52. package/template/.claude/skills/hallmark/SKILL.md +552 -552
  53. package/template/.claude/skills/hallmark/references/anti-patterns.md +412 -412
  54. package/template/.claude/skills/hallmark/references/assets.md +406 -406
  55. package/template/.claude/skills/hallmark/references/color.md +95 -95
  56. package/template/.claude/skills/hallmark/references/component-cookbook.md +256 -256
  57. package/template/.claude/skills/hallmark/references/components/c1-outlined-chip.md +12 -12
  58. package/template/.claude/skills/hallmark/references/components/c2-inline-form-as-cta.md +16 -16
  59. package/template/.claude/skills/hallmark/references/components/c3-typographic-link.md +8 -8
  60. package/template/.claude/skills/hallmark/references/components/c4-sticky-bottom-bar.md +16 -16
  61. package/template/.claude/skills/hallmark/references/components/f1-bento-grid.md +20 -20
  62. package/template/.claude/skills/hallmark/references/components/f2-sticky-scroll-stack.md +20 -20
  63. package/template/.claude/skills/hallmark/references/components/f3-tabular-spec-sheet.md +11 -11
  64. package/template/.claude/skills/hallmark/references/components/f4-step-sequence.md +11 -11
  65. package/template/.claude/skills/hallmark/references/components/f5-annotated-screenshot.md +11 -11
  66. package/template/.claude/skills/hallmark/references/components/f6-product-card-grid.md +41 -41
  67. package/template/.claude/skills/hallmark/references/components/ft1-mast-headed.md +13 -13
  68. package/template/.claude/skills/hallmark/references/components/ft2-inline-rule-single-line.md +10 -10
  69. package/template/.claude/skills/hallmark/references/components/ft3-index-style-category-list.md +12 -12
  70. package/template/.claude/skills/hallmark/references/components/ft4-dense-typographic.md +10 -10
  71. package/template/.claude/skills/hallmark/references/components/ft5-statement.md +21 -21
  72. package/template/.claude/skills/hallmark/references/components/ft6-letter-close.md +19 -19
  73. package/template/.claude/skills/hallmark/references/components/ft7-newsletter-first.md +27 -27
  74. package/template/.claude/skills/hallmark/references/components/ft8-marquee-scroll.md +25 -25
  75. package/template/.claude/skills/hallmark/references/components/h1-marquee.md +15 -15
  76. package/template/.claude/skills/hallmark/references/components/h2-split-diptych.md +15 -15
  77. package/template/.claude/skills/hallmark/references/components/h3-quote-led.md +11 -11
  78. package/template/.claude/skills/hallmark/references/components/h4-stat-led.md +14 -14
  79. package/template/.claude/skills/hallmark/references/components/h5-letter-hero.md +11 -11
  80. package/template/.claude/skills/hallmark/references/components/h6-photographic-fold.md +16 -16
  81. package/template/.claude/skills/hallmark/references/components/h7-demo-video-clipped-by-viewport-edge.md +27 -27
  82. package/template/.claude/skills/hallmark/references/components/h8-mockup-split-browser-framed.md +23 -23
  83. package/template/.claude/skills/hallmark/references/components/h9-custom-illustration-centerpiece.md +27 -27
  84. package/template/.claude/skills/hallmark/references/components/n1-wordmark-2-links.md +12 -12
  85. package/template/.claude/skills/hallmark/references/components/n10-floating-on-scroll-morph.md +19 -19
  86. package/template/.claude/skills/hallmark/references/components/n2-floating-chip.md +14 -14
  87. package/template/.claude/skills/hallmark/references/components/n3-side-rail.md +14 -14
  88. package/template/.claude/skills/hallmark/references/components/n4-hidden-behind-k.md +9 -9
  89. package/template/.claude/skills/hallmark/references/components/n5-floating-pill.md +28 -28
  90. package/template/.claude/skills/hallmark/references/components/n6-newspaper-masthead.md +24 -24
  91. package/template/.claude/skills/hallmark/references/components/n7-brutal-slab.md +22 -22
  92. package/template/.claude/skills/hallmark/references/components/n8-terminal-command.md +21 -21
  93. package/template/.claude/skills/hallmark/references/components/n9-edge-aligned-minimal.md +17 -17
  94. package/template/.claude/skills/hallmark/references/components/s1-left-margin-numbered.md +15 -15
  95. package/template/.claude/skills/hallmark/references/components/s2-hanging.md +13 -13
  96. package/template/.claude/skills/hallmark/references/components/s3-sticky-pinned.md +19 -19
  97. package/template/.claude/skills/hallmark/references/components/s4-inline-no-break.md +11 -11
  98. package/template/.claude/skills/hallmark/references/components/s5-bottom-anchored.md +13 -13
  99. package/template/.claude/skills/hallmark/references/components/t1-pull-quote-with-marginalia.md +12 -12
  100. package/template/.claude/skills/hallmark/references/components/t2-logo-wall-hairline.md +19 -19
  101. package/template/.claude/skills/hallmark/references/components/t3-single-huge-quote.md +11 -11
  102. package/template/.claude/skills/hallmark/references/components/t4-numbered-stat-strip.md +14 -14
  103. package/template/.claude/skills/hallmark/references/contract.md +24 -24
  104. package/template/.claude/skills/hallmark/references/copy.md +182 -182
  105. package/template/.claude/skills/hallmark/references/custom-craft.md +626 -626
  106. package/template/.claude/skills/hallmark/references/custom-theme.md +329 -329
  107. package/template/.claude/skills/hallmark/references/design-md.md +116 -116
  108. package/template/.claude/skills/hallmark/references/export-formats.md +328 -328
  109. package/template/.claude/skills/hallmark/references/floating-nav.md +89 -89
  110. package/template/.claude/skills/hallmark/references/genres/atmospheric.md +65 -65
  111. package/template/.claude/skills/hallmark/references/genres/editorial.md +70 -70
  112. package/template/.claude/skills/hallmark/references/genres/modern-minimal.md +67 -67
  113. package/template/.claude/skills/hallmark/references/genres/playful.md +65 -65
  114. package/template/.claude/skills/hallmark/references/hero-enrichment.md +474 -474
  115. package/template/.claude/skills/hallmark/references/imagery-kit.md +170 -170
  116. package/template/.claude/skills/hallmark/references/interaction-and-states.md +207 -207
  117. package/template/.claude/skills/hallmark/references/layout-and-space.md +111 -111
  118. package/template/.claude/skills/hallmark/references/macrostructures/01-bento-grid.md +35 -35
  119. package/template/.claude/skills/hallmark/references/macrostructures/02-long-document.md +34 -34
  120. package/template/.claude/skills/hallmark/references/macrostructures/03-marquee-hero.md +31 -31
  121. package/template/.claude/skills/hallmark/references/macrostructures/04-stat-led.md +32 -32
  122. package/template/.claude/skills/hallmark/references/macrostructures/05-workbench.md +32 -32
  123. package/template/.claude/skills/hallmark/references/macrostructures/06-conversational-faq.md +33 -33
  124. package/template/.claude/skills/hallmark/references/macrostructures/07-manifesto.md +32 -32
  125. package/template/.claude/skills/hallmark/references/macrostructures/08-photographic.md +34 -34
  126. package/template/.claude/skills/hallmark/references/macrostructures/09-quote-led.md +32 -32
  127. package/template/.claude/skills/hallmark/references/macrostructures/10-specimen.md +32 -32
  128. package/template/.claude/skills/hallmark/references/macrostructures/11-catalogue.md +23 -23
  129. package/template/.claude/skills/hallmark/references/macrostructures/12-letter.md +23 -23
  130. package/template/.claude/skills/hallmark/references/macrostructures/13-index-first.md +23 -23
  131. package/template/.claude/skills/hallmark/references/macrostructures/14-narrative-workflow.md +23 -23
  132. package/template/.claude/skills/hallmark/references/macrostructures/15-split-studio.md +23 -23
  133. package/template/.claude/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -23
  134. package/template/.claude/skills/hallmark/references/macrostructures/17-type-specimen.md +23 -23
  135. package/template/.claude/skills/hallmark/references/macrostructures/18-portfolio-grid.md +23 -23
  136. package/template/.claude/skills/hallmark/references/macrostructures/19-map-diagram.md +23 -23
  137. package/template/.claude/skills/hallmark/references/macrostructures/20-ecosystem-index.md +23 -23
  138. package/template/.claude/skills/hallmark/references/macrostructures/21-component-playground.md +23 -23
  139. package/template/.claude/skills/hallmark/references/macrostructures.md +89 -89
  140. package/template/.claude/skills/hallmark/references/microinteractions.md +260 -260
  141. package/template/.claude/skills/hallmark/references/motion.md +109 -109
  142. package/template/.claude/skills/hallmark/references/preview-examples.md +49 -49
  143. package/template/.claude/skills/hallmark/references/responsive.md +138 -138
  144. package/template/.claude/skills/hallmark/references/slop-test.md +205 -205
  145. package/template/.claude/skills/hallmark/references/structure.md +164 -164
  146. package/template/.claude/skills/hallmark/references/study.md +511 -511
  147. package/template/.claude/skills/hallmark/references/typography.md +243 -243
  148. package/template/.claude/skills/hallmark/references/verbs/audit.md +25 -25
  149. package/template/.claude/skills/hallmark/references/verbs/redesign.md +269 -269
  150. package/template/.claude/skills/hallmark-loop/SKILL.md +105 -105
  151. package/template/.claude/skills/hallmark-loop/references/auditor-call.md +60 -60
  152. package/template/.claude/skills/hallmark-loop/references/capture.md +78 -78
  153. package/template/.claude/skills/hallmark-loop/references/loop-control.md +79 -79
  154. package/template/.claude/skills/handoff/SKILL.md +15 -15
  155. package/template/.claude/skills/knowledge-crunching/SKILL.md +94 -94
  156. package/template/.claude/skills/research/SKILL.md +69 -69
  157. package/template/.claude/skills/tdd/SKILL.md +142 -142
  158. package/template/.claude/skills/tdd/deep-modules.md +15 -15
  159. package/template/.claude/skills/tdd/interface-design.md +31 -31
  160. package/template/.claude/skills/tdd/mocking.md +59 -59
  161. package/template/.claude/skills/tdd/refactoring.md +10 -10
  162. package/template/.claude/skills/tdd/tests.md +61 -61
  163. package/template/.claude/statusline.cjs +100 -37
@@ -1,269 +1,269 @@
1
- # `hallmark redesign`
2
-
3
- The user wants a different page from the same content. They are not happy with the current visual structure — typically because it reads as templated, generic, or AI-shaped. Your job is to redesign the page's structure, rhythm, and component voice while respecting the existing implementation boundaries unless the user explicitly confirms a full rebuild.
4
-
5
- ## Non-destructive implementation rule
6
-
7
- Hallmark redesigns visual and interaction layers. It does not delete production files by default.
8
-
9
- - Never delete existing route files, component directories, page trees, or the old website unless the user explicitly asks for deletion or approves a file-level plan that lists the deletions.
10
- - Default to in-place edits of the named page/component files, or additive new components/tokens wired through the existing route.
11
- - If the redesign would require removing multiple components, replacing a route tree, or collapsing the app into a single new page, stop and ask for confirmation first.
12
- - Treat PDFs, README files, `.md` briefs, docs, transcripts, and pitch decks as source material for understanding the product. They are not page copy by default. Summarize and adapt them unless the user explicitly says to use their wording verbatim.
13
- - Before editing, state the files you expect to modify, create, and delete. Any deletion needs explicit confirmation.
14
-
15
- ## Step 0 · Detect scope first
16
-
17
- Before anything else, decide whether the redesign is **single-page** or **multi-page**. The behaviour diverges hard.
18
-
19
- **Multi-page signals (any one fires):**
20
- - The target is a directory (e.g. `./app/`, `./pages/`, `./src/routes/`).
21
- - The target is a glob (`**/*.tsx`, `app/*/page.tsx`).
22
- - The user names more than one file in the brief (`./hero.tsx and ./pricing.tsx`).
23
- - The user says "the whole site", "every page", "the app", "all the pages", "the marketing site".
24
- - The codebase has multiple route files (`app/page.tsx`, `app/about/page.tsx`, `app/pricing/page.tsx`, etc.) and the user pointed at the project root.
25
-
26
- If any of those fires → **multi-page redesign**. Go to § Multi-page flow.
27
- If none fires → **single-page redesign**. Go to § Single-page flow.
28
-
29
- ---
30
-
31
- ## § Multi-page flow — design.md first, then redesign
32
-
33
- A web app needs a *design system*, not seventeen unrelated theme pickings. Hallmark's diversification rule is wrong here: across pages of the same product, **consistency is the goal, not variety**. If you redesign every page with a different macrostructure / theme / accent, you've shipped a slop split-personality app, even if each individual page is fine.
34
-
35
- The flow is:
36
-
37
- ### 1. Read the project, then pause
38
-
39
- Before redesigning a single file:
40
-
41
- - Walk the target directory. List every page-level file you found, with a one-line description of what it does. (Hero / pricing / docs / dashboard / etc.)
42
- - Note any existing design assets: a `tokens.css`, a tailwind config with brand values, a logo, brand colours mentioned in `README`, a marketing screenshot.
43
- - Check for an existing `.hallmark/log.json` — if it has prior runs, read the most recent stamp; if all those entries are different macrostructures / themes, it confirms the user's complaint.
44
-
45
- ### 2. Produce `design.md` at the project root
46
-
47
- Write a single file at the project root: `design.md` (or `DESIGN.md` — match the project's existing case convention). This file is the **one source of truth** every subsequent page redesign reads. Format:
48
-
49
- ````markdown
50
- # Design — <Project name>
51
-
52
- A locked design system for this app. Every page redesign reads this file before
53
- emitting code. Do not regenerate per page — extend or amend this file when the
54
- system needs to grow.
55
-
56
- ## Genre
57
- <editorial · modern-minimal · atmospheric · playful>
58
-
59
- ## Macrostructure family
60
- Pick one base macrostructure for marketing pages, one for app pages, one for
61
- content pages (if applicable). Pages within a family share the family's shape;
62
- they vary only in component archetypes.
63
-
64
- - Marketing pages: <macrostructure name + the 1–2 archetypes that vary>
65
- - App pages: <macrostructure name + variation knobs>
66
- - Content pages: <macrostructure name + variation knobs>
67
-
68
- ## Theme
69
- - `--color-paper` oklch(<L> <C> <H>)
70
- - `--color-paper-2` oklch(<L> <C> <H>)
71
- - `--color-ink` oklch(<L> <C> <H>)
72
- - `--color-ink-2` oklch(<L> <C> <H>)
73
- - `--color-rule` oklch(<L> <C> <H>)
74
- - `--color-accent` oklch(<L> <C> <H>)
75
- - `--color-focus` oklch(<L> <C> <H>)
76
-
77
- ## Typography
78
- - Display: <face>, weight <N>, style <normal/italic>
79
- - Body: <face>, weight <N>
80
- - Mono: <face>, weight <N>
81
- - Display tracking: <em>
82
- - Type scale anchor: <text-display> = clamp(...)
83
-
84
- ## Spacing
85
- 4-point named scale. The values are in `tokens.css`. Pages must use named
86
- tokens (`var(--space-md)`), never raw values.
87
-
88
- ## Motion
89
- - Easings: cubic-bezier(<x>, <y>, <z>, <w>) named `--ease-out`, etc.
90
- - Reveal pattern: <fade only / fade + slide / none>
91
- - Reduced-motion fallback: opacity-only, ≤ 150 ms.
92
-
93
- ## Microinteractions stance
94
- - <silent success / celebratory toasts: never>
95
- - <hover delay 800 ms · focus delay 0 ms>
96
- - <other named choices>
97
-
98
- ## CTA voice
99
- - Primary CTA: <fill style, shape, copy pattern>
100
- - Secondary CTA: <outline style, shape, copy pattern>
101
-
102
- ## Per-page allowances
103
- - Marketing pages MAY use enrichment (Tier-A CSS art, Tier-B SVG, etc.).
104
- - App pages MUST NOT use enrichment — function carries the page.
105
- - Content pages: typography only.
106
-
107
- ## What pages MUST share
108
- - The wordmark / logotype.
109
- - The accent colour and its placement (≤ 5 % per viewport).
110
- - The display + body fonts.
111
- - The CTA voice (button shape, border-radius, padding rhythm).
112
- - Section heading rhythm (numeral + label + display heading pattern).
113
-
114
- ## What pages MAY differ on
115
- - Macrostructure within the page-type family (a marketing page can be Marquee
116
- Hero on one route and Long Document on another — both still use the system's
117
- type, colour, and CTA voice).
118
- - Hero archetype (within the family's allowance).
119
- - Enrichment — only on marketing pages, only Tier-A or Tier-B.
120
-
121
- ## Exports
122
-
123
- Drop-in formats for re-using this design system in other projects.
124
- See [`export-formats.md`](../export-formats.md) for the canonical mapping.
125
-
126
- ### tokens.css
127
- ```css
128
- :root {
129
- --color-paper: oklch(<L> <C> <H>);
130
- --color-paper-2: oklch(<L> <C> <H>);
131
- --color-ink: oklch(<L> <C> <H>);
132
- --color-ink-2: oklch(<L> <C> <H>);
133
- --color-rule: oklch(<L> <C> <H>);
134
- --color-accent: oklch(<L> <C> <H>);
135
- --color-accent-ink: oklch(<L> <C> <H>);
136
- --color-focus: oklch(<L> <C> <H>);
137
-
138
- --font-display: "<face>", ...;
139
- --font-body: "<face>", ...;
140
- --font-outlier: "<face>", ...;
141
-
142
- --space-3xs: 0.25rem; --space-2xs: 0.5rem; --space-xs: 0.75rem;
143
- --space-sm: 1rem; --space-md: 1.5rem; --space-lg: 2rem;
144
- --space-xl: 3rem; --space-2xl: 4.5rem; --space-3xl: 7rem;
145
-
146
- --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1.125rem;
147
- --text-lg: 1.375rem; --text-xl: 1.75rem; --text-2xl: 2.25rem;
148
-
149
- --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
150
- --dur-short: 220ms;
151
- --radius-card: <px>; --radius-pill: <px>; --radius-input: <px>;
152
- }
153
- ```
154
-
155
- ### Tailwind v4 `@theme`
156
- ```css
157
- @theme {
158
- --color-paper: oklch(<L> <C> <H>);
159
- --color-ink: oklch(<L> <C> <H>);
160
- --color-accent: oklch(<L> <C> <H>);
161
- --font-display: "<face>", sans-serif;
162
- --font-body: "<face>", sans-serif;
163
- --spacing-md: 1.5rem;
164
- --text-md: 1.125rem;
165
- --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
166
- /* mirror the rest of tokens.css with `--spacing-*` for Tailwind's spacing utilities */
167
- }
168
- ```
169
-
170
- ### DTCG `tokens.json`
171
- ```json
172
- {
173
- "color": {
174
- "paper": { "$value": "oklch(<L> <C> <H>)", "$type": "color" },
175
- "ink": { "$value": "oklch(<L> <C> <H>)", "$type": "color" },
176
- "accent": { "$value": "oklch(<L> <C> <H>)", "$type": "color" }
177
- },
178
- "font": {
179
- "display": { "$value": "<face>", "$type": "fontFamily" },
180
- "body": { "$value": "<face>", "$type": "fontFamily" }
181
- },
182
- "space": {
183
- "md": { "$value": "1.5rem", "$type": "dimension" }
184
- }
185
- }
186
- ```
187
-
188
- ### shadcn/ui CSS variables
189
- ```css
190
- :root {
191
- --background: <L> <C> <H>; /* paper */
192
- --foreground: <L> <C> <H>; /* ink */
193
- --primary: <L> <C> <H>; /* accent */
194
- --primary-foreground: <L> <C> <H>; /* accent-ink */
195
- --muted: <L> <C> <H>; /* rule */
196
- --muted-foreground: <L> <C> <H>; /* muted */
197
- --border: <L> <C> <H>; /* rule */
198
- --input: <L> <C> <H>; /* rule */
199
- --ring: <L> <C> <H>; /* focus */
200
- --radius: <px>;
201
- }
202
- ```
203
- ````
204
-
205
- State the picks aloud in plain text BEFORE writing the file. *"Genre: modern-minimal. Theme: a custom OKLCH palette anchored on your brand teal. Display: Geist 600. Body: Geist 400. Three macrostructure families: Marquee Hero (marketing), Workbench (app), Long Document (content)."* Then ask: *"Want me to proceed with this system across every page, or amend any of it first?"*
206
-
207
- Wait for confirmation. Only after the user confirms (or says "go ahead") do you write `design.md` and start redesigning pages.
208
-
209
- ### 3. Redesign each page reading from `design.md`
210
-
211
- For each target page:
212
-
213
- - **Read `design.md` first.** It is now the rule of the project; the per-build references in [`references/`](../) defer to it. Where `design.md` and the references conflict, `design.md` wins.
214
- - Pick the macrostructure from the family declared in `design.md` for this page's type (marketing / app / content). Within the family, you may vary archetypes — but only those `design.md` allows.
215
- - Apply the locked theme. Do **not** swap to a different theme to "add variety". The variety lives in macrostructure / archetype choice, not theme.
216
- - Apply the locked typography, spacing, motion, microinteractions stance.
217
- - Stamp every page's CSS with: `/* Hallmark · genre: <genre> · macrostructure: <name> · design-system: design.md · designed-as-app */`. The `designed-as-app` flag tells future Hallmark runs to read `design.md`, not invent a new system.
218
- - Write a single combined `.hallmark/log.json` entry for the multi-page redesign, with `"scope": "app"` instead of one entry per page.
219
-
220
- ### 4. Diversification rule — INVERTED for multi-page
221
-
222
- Across pages of the same app, the diversification rule is *inverted*: consecutive pages MUST share theme, accent, type pairing. They may differ on macrostructure within the family. The 55 slop-test gates that check "differs from previous Hallmark run" are skipped for `designed-as-app` outputs — the system overrides the catalog rotation here.
223
-
224
- Pages that drift from `design.md` are slop. The audit verb flags `design.md` drift as a critical structural finding (`stamp-vs-design.md disagreement`).
225
-
226
- ### 5. When to amend `design.md` instead of overriding
227
-
228
- If a page genuinely needs something `design.md` doesn't allow (e.g. a marketing landing for a new sub-product wants a different theme), the rule is **amend `design.md` first**, not override locally. Add an explicit per-page allowance or a `## Variants` section. The file evolves; per-page overrides do not.
229
-
230
- ---
231
-
232
- ## § Single-page flow
233
-
234
- (The classic redesign behaviour — unchanged.)
235
-
236
- **What to preserve:**
237
- - The copy intent, factual claims, product names, and primary message. Preserve exact wording only when it already lives in the target UI or the user explicitly asks for verbatim copy.
238
- - The information architecture (which sections exist, in roughly what order)
239
- - The brand (colours and fonts they've named, if any)
240
- - The primary action
241
- - The existing route/component ownership boundaries, unless the user has approved a full rebuild
242
-
243
- **What to replace:**
244
- - The structural fingerprint — pick a **different** combination from [`structure.md`](../structure.md) than the source had.
245
- - The component voice — different button style, different divider language, different image treatment.
246
- - The reveal pattern — if the original faded everything in on scroll, the new one might have no reveals at all.
247
- - The visual rhythm — different sections having different padding, different alignments, deliberate breaks.
248
-
249
- **What not to replace without confirmation:**
250
- - Route trees, production component directories, or the old website's file structure.
251
- - Working app logic, data fetching, auth, forms, analytics, or integration code.
252
- - Existing copy with pasted text from PDFs, docs, or markdown files unless the user requested verbatim copy.
253
-
254
- **Optional `--mood <name>` argument:**
255
-
256
- If the user specifies a mood (`hallmark redesign ./hero.tsx --mood luxury`), pick a tone aligned to that mood and let it drive the structural fingerprint. Mood names map to tones from [`typography.md`](../typography.md) and [`structure.md`](../structure.md). If no mood is given, ask the user what *feeling* they want — one word — and proceed.
257
-
258
- **Genre escape hatch.** If the user explicitly asks for a *kind* of design that the current genre doesn't fit (e.g. "redesign this editorial page as a modern SaaS hero"), switch genre too. Load [`genres/<new-genre>.md`](../genres/) and apply its rule overlay. Stamp the new genre into the output so future runs respect it.
259
-
260
- **Project-level check.** Before treating this as a true single-page redesign, look for `design.md` at the project root. If it exists, the project is being designed as an app and **the single-page rules don't apply** — read `design.md` and follow it instead. The diversification rule reverses (consistency wins). If you actually want to break from the locked system, *update `design.md` first*, then redesign.
261
-
262
- **Output:**
263
-
264
- Return the redesigned code, plus a short note explaining:
265
-
266
- - The structural fingerprint you picked, axis by axis.
267
- - Why this combination fits the brief better than the original.
268
- - One thing you removed and why.
269
- - (If genre changed) why the new genre fits the user's stated kind of design.
1
+ # `hallmark redesign`
2
+
3
+ The user wants a different page from the same content. They are not happy with the current visual structure — typically because it reads as templated, generic, or AI-shaped. Your job is to redesign the page's structure, rhythm, and component voice while respecting the existing implementation boundaries unless the user explicitly confirms a full rebuild.
4
+
5
+ ## Non-destructive implementation rule
6
+
7
+ Hallmark redesigns visual and interaction layers. It does not delete production files by default.
8
+
9
+ - Never delete existing route files, component directories, page trees, or the old website unless the user explicitly asks for deletion or approves a file-level plan that lists the deletions.
10
+ - Default to in-place edits of the named page/component files, or additive new components/tokens wired through the existing route.
11
+ - If the redesign would require removing multiple components, replacing a route tree, or collapsing the app into a single new page, stop and ask for confirmation first.
12
+ - Treat PDFs, README files, `.md` briefs, docs, transcripts, and pitch decks as source material for understanding the product. They are not page copy by default. Summarize and adapt them unless the user explicitly says to use their wording verbatim.
13
+ - Before editing, state the files you expect to modify, create, and delete. Any deletion needs explicit confirmation.
14
+
15
+ ## Step 0 · Detect scope first
16
+
17
+ Before anything else, decide whether the redesign is **single-page** or **multi-page**. The behaviour diverges hard.
18
+
19
+ **Multi-page signals (any one fires):**
20
+ - The target is a directory (e.g. `./app/`, `./pages/`, `./src/routes/`).
21
+ - The target is a glob (`**/*.tsx`, `app/*/page.tsx`).
22
+ - The user names more than one file in the brief (`./hero.tsx and ./pricing.tsx`).
23
+ - The user says "the whole site", "every page", "the app", "all the pages", "the marketing site".
24
+ - The codebase has multiple route files (`app/page.tsx`, `app/about/page.tsx`, `app/pricing/page.tsx`, etc.) and the user pointed at the project root.
25
+
26
+ If any of those fires → **multi-page redesign**. Go to § Multi-page flow.
27
+ If none fires → **single-page redesign**. Go to § Single-page flow.
28
+
29
+ ---
30
+
31
+ ## § Multi-page flow — design.md first, then redesign
32
+
33
+ A web app needs a *design system*, not seventeen unrelated theme pickings. Hallmark's diversification rule is wrong here: across pages of the same product, **consistency is the goal, not variety**. If you redesign every page with a different macrostructure / theme / accent, you've shipped a slop split-personality app, even if each individual page is fine.
34
+
35
+ The flow is:
36
+
37
+ ### 1. Read the project, then pause
38
+
39
+ Before redesigning a single file:
40
+
41
+ - Walk the target directory. List every page-level file you found, with a one-line description of what it does. (Hero / pricing / docs / dashboard / etc.)
42
+ - Note any existing design assets: a `tokens.css`, a tailwind config with brand values, a logo, brand colours mentioned in `README`, a marketing screenshot.
43
+ - Check for an existing `.hallmark/log.json` — if it has prior runs, read the most recent stamp; if all those entries are different macrostructures / themes, it confirms the user's complaint.
44
+
45
+ ### 2. Produce `design.md` at the project root
46
+
47
+ Write a single file at the project root: `design.md` (or `DESIGN.md` — match the project's existing case convention). This file is the **one source of truth** every subsequent page redesign reads. Format:
48
+
49
+ ````markdown
50
+ # Design — <Project name>
51
+
52
+ A locked design system for this app. Every page redesign reads this file before
53
+ emitting code. Do not regenerate per page — extend or amend this file when the
54
+ system needs to grow.
55
+
56
+ ## Genre
57
+ <editorial · modern-minimal · atmospheric · playful>
58
+
59
+ ## Macrostructure family
60
+ Pick one base macrostructure for marketing pages, one for app pages, one for
61
+ content pages (if applicable). Pages within a family share the family's shape;
62
+ they vary only in component archetypes.
63
+
64
+ - Marketing pages: <macrostructure name + the 1–2 archetypes that vary>
65
+ - App pages: <macrostructure name + variation knobs>
66
+ - Content pages: <macrostructure name + variation knobs>
67
+
68
+ ## Theme
69
+ - `--color-paper` oklch(<L> <C> <H>)
70
+ - `--color-paper-2` oklch(<L> <C> <H>)
71
+ - `--color-ink` oklch(<L> <C> <H>)
72
+ - `--color-ink-2` oklch(<L> <C> <H>)
73
+ - `--color-rule` oklch(<L> <C> <H>)
74
+ - `--color-accent` oklch(<L> <C> <H>)
75
+ - `--color-focus` oklch(<L> <C> <H>)
76
+
77
+ ## Typography
78
+ - Display: <face>, weight <N>, style <normal/italic>
79
+ - Body: <face>, weight <N>
80
+ - Mono: <face>, weight <N>
81
+ - Display tracking: <em>
82
+ - Type scale anchor: <text-display> = clamp(...)
83
+
84
+ ## Spacing
85
+ 4-point named scale. The values are in `tokens.css`. Pages must use named
86
+ tokens (`var(--space-md)`), never raw values.
87
+
88
+ ## Motion
89
+ - Easings: cubic-bezier(<x>, <y>, <z>, <w>) named `--ease-out`, etc.
90
+ - Reveal pattern: <fade only / fade + slide / none>
91
+ - Reduced-motion fallback: opacity-only, ≤ 150 ms.
92
+
93
+ ## Microinteractions stance
94
+ - <silent success / celebratory toasts: never>
95
+ - <hover delay 800 ms · focus delay 0 ms>
96
+ - <other named choices>
97
+
98
+ ## CTA voice
99
+ - Primary CTA: <fill style, shape, copy pattern>
100
+ - Secondary CTA: <outline style, shape, copy pattern>
101
+
102
+ ## Per-page allowances
103
+ - Marketing pages MAY use enrichment (Tier-A CSS art, Tier-B SVG, etc.).
104
+ - App pages MUST NOT use enrichment — function carries the page.
105
+ - Content pages: typography only.
106
+
107
+ ## What pages MUST share
108
+ - The wordmark / logotype.
109
+ - The accent colour and its placement (≤ 5 % per viewport).
110
+ - The display + body fonts.
111
+ - The CTA voice (button shape, border-radius, padding rhythm).
112
+ - Section heading rhythm (numeral + label + display heading pattern).
113
+
114
+ ## What pages MAY differ on
115
+ - Macrostructure within the page-type family (a marketing page can be Marquee
116
+ Hero on one route and Long Document on another — both still use the system's
117
+ type, colour, and CTA voice).
118
+ - Hero archetype (within the family's allowance).
119
+ - Enrichment — only on marketing pages, only Tier-A or Tier-B.
120
+
121
+ ## Exports
122
+
123
+ Drop-in formats for re-using this design system in other projects.
124
+ See [`export-formats.md`](../export-formats.md) for the canonical mapping.
125
+
126
+ ### tokens.css
127
+ ```css
128
+ :root {
129
+ --color-paper: oklch(<L> <C> <H>);
130
+ --color-paper-2: oklch(<L> <C> <H>);
131
+ --color-ink: oklch(<L> <C> <H>);
132
+ --color-ink-2: oklch(<L> <C> <H>);
133
+ --color-rule: oklch(<L> <C> <H>);
134
+ --color-accent: oklch(<L> <C> <H>);
135
+ --color-accent-ink: oklch(<L> <C> <H>);
136
+ --color-focus: oklch(<L> <C> <H>);
137
+
138
+ --font-display: "<face>", ...;
139
+ --font-body: "<face>", ...;
140
+ --font-outlier: "<face>", ...;
141
+
142
+ --space-3xs: 0.25rem; --space-2xs: 0.5rem; --space-xs: 0.75rem;
143
+ --space-sm: 1rem; --space-md: 1.5rem; --space-lg: 2rem;
144
+ --space-xl: 3rem; --space-2xl: 4.5rem; --space-3xl: 7rem;
145
+
146
+ --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1.125rem;
147
+ --text-lg: 1.375rem; --text-xl: 1.75rem; --text-2xl: 2.25rem;
148
+
149
+ --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
150
+ --dur-short: 220ms;
151
+ --radius-card: <px>; --radius-pill: <px>; --radius-input: <px>;
152
+ }
153
+ ```
154
+
155
+ ### Tailwind v4 `@theme`
156
+ ```css
157
+ @theme {
158
+ --color-paper: oklch(<L> <C> <H>);
159
+ --color-ink: oklch(<L> <C> <H>);
160
+ --color-accent: oklch(<L> <C> <H>);
161
+ --font-display: "<face>", sans-serif;
162
+ --font-body: "<face>", sans-serif;
163
+ --spacing-md: 1.5rem;
164
+ --text-md: 1.125rem;
165
+ --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
166
+ /* mirror the rest of tokens.css with `--spacing-*` for Tailwind's spacing utilities */
167
+ }
168
+ ```
169
+
170
+ ### DTCG `tokens.json`
171
+ ```json
172
+ {
173
+ "color": {
174
+ "paper": { "$value": "oklch(<L> <C> <H>)", "$type": "color" },
175
+ "ink": { "$value": "oklch(<L> <C> <H>)", "$type": "color" },
176
+ "accent": { "$value": "oklch(<L> <C> <H>)", "$type": "color" }
177
+ },
178
+ "font": {
179
+ "display": { "$value": "<face>", "$type": "fontFamily" },
180
+ "body": { "$value": "<face>", "$type": "fontFamily" }
181
+ },
182
+ "space": {
183
+ "md": { "$value": "1.5rem", "$type": "dimension" }
184
+ }
185
+ }
186
+ ```
187
+
188
+ ### shadcn/ui CSS variables
189
+ ```css
190
+ :root {
191
+ --background: <L> <C> <H>; /* paper */
192
+ --foreground: <L> <C> <H>; /* ink */
193
+ --primary: <L> <C> <H>; /* accent */
194
+ --primary-foreground: <L> <C> <H>; /* accent-ink */
195
+ --muted: <L> <C> <H>; /* rule */
196
+ --muted-foreground: <L> <C> <H>; /* muted */
197
+ --border: <L> <C> <H>; /* rule */
198
+ --input: <L> <C> <H>; /* rule */
199
+ --ring: <L> <C> <H>; /* focus */
200
+ --radius: <px>;
201
+ }
202
+ ```
203
+ ````
204
+
205
+ State the picks aloud in plain text BEFORE writing the file. *"Genre: modern-minimal. Theme: a custom OKLCH palette anchored on your brand teal. Display: Geist 600. Body: Geist 400. Three macrostructure families: Marquee Hero (marketing), Workbench (app), Long Document (content)."* Then ask: *"Want me to proceed with this system across every page, or amend any of it first?"*
206
+
207
+ Wait for confirmation. Only after the user confirms (or says "go ahead") do you write `design.md` and start redesigning pages.
208
+
209
+ ### 3. Redesign each page reading from `design.md`
210
+
211
+ For each target page:
212
+
213
+ - **Read `design.md` first.** It is now the rule of the project; the per-build references in [`references/`](../) defer to it. Where `design.md` and the references conflict, `design.md` wins.
214
+ - Pick the macrostructure from the family declared in `design.md` for this page's type (marketing / app / content). Within the family, you may vary archetypes — but only those `design.md` allows.
215
+ - Apply the locked theme. Do **not** swap to a different theme to "add variety". The variety lives in macrostructure / archetype choice, not theme.
216
+ - Apply the locked typography, spacing, motion, microinteractions stance.
217
+ - Stamp every page's CSS with: `/* Hallmark · genre: <genre> · macrostructure: <name> · design-system: design.md · designed-as-app */`. The `designed-as-app` flag tells future Hallmark runs to read `design.md`, not invent a new system.
218
+ - Write a single combined `.hallmark/log.json` entry for the multi-page redesign, with `"scope": "app"` instead of one entry per page.
219
+
220
+ ### 4. Diversification rule — INVERTED for multi-page
221
+
222
+ Across pages of the same app, the diversification rule is *inverted*: consecutive pages MUST share theme, accent, type pairing. They may differ on macrostructure within the family. The 55 slop-test gates that check "differs from previous Hallmark run" are skipped for `designed-as-app` outputs — the system overrides the catalog rotation here.
223
+
224
+ Pages that drift from `design.md` are slop. The audit verb flags `design.md` drift as a critical structural finding (`stamp-vs-design.md disagreement`).
225
+
226
+ ### 5. When to amend `design.md` instead of overriding
227
+
228
+ If a page genuinely needs something `design.md` doesn't allow (e.g. a marketing landing for a new sub-product wants a different theme), the rule is **amend `design.md` first**, not override locally. Add an explicit per-page allowance or a `## Variants` section. The file evolves; per-page overrides do not.
229
+
230
+ ---
231
+
232
+ ## § Single-page flow
233
+
234
+ (The classic redesign behaviour — unchanged.)
235
+
236
+ **What to preserve:**
237
+ - The copy intent, factual claims, product names, and primary message. Preserve exact wording only when it already lives in the target UI or the user explicitly asks for verbatim copy.
238
+ - The information architecture (which sections exist, in roughly what order)
239
+ - The brand (colours and fonts they've named, if any)
240
+ - The primary action
241
+ - The existing route/component ownership boundaries, unless the user has approved a full rebuild
242
+
243
+ **What to replace:**
244
+ - The structural fingerprint — pick a **different** combination from [`structure.md`](../structure.md) than the source had.
245
+ - The component voice — different button style, different divider language, different image treatment.
246
+ - The reveal pattern — if the original faded everything in on scroll, the new one might have no reveals at all.
247
+ - The visual rhythm — different sections having different padding, different alignments, deliberate breaks.
248
+
249
+ **What not to replace without confirmation:**
250
+ - Route trees, production component directories, or the old website's file structure.
251
+ - Working app logic, data fetching, auth, forms, analytics, or integration code.
252
+ - Existing copy with pasted text from PDFs, docs, or markdown files unless the user requested verbatim copy.
253
+
254
+ **Optional `--mood <name>` argument:**
255
+
256
+ If the user specifies a mood (`hallmark redesign ./hero.tsx --mood luxury`), pick a tone aligned to that mood and let it drive the structural fingerprint. Mood names map to tones from [`typography.md`](../typography.md) and [`structure.md`](../structure.md). If no mood is given, ask the user what *feeling* they want — one word — and proceed.
257
+
258
+ **Genre escape hatch.** If the user explicitly asks for a *kind* of design that the current genre doesn't fit (e.g. "redesign this editorial page as a modern SaaS hero"), switch genre too. Load [`genres/<new-genre>.md`](../genres/) and apply its rule overlay. Stamp the new genre into the output so future runs respect it.
259
+
260
+ **Project-level check.** Before treating this as a true single-page redesign, look for `design.md` at the project root. If it exists, the project is being designed as an app and **the single-page rules don't apply** — read `design.md` and follow it instead. The diversification rule reverses (consistency wins). If you actually want to break from the locked system, *update `design.md` first*, then redesign.
261
+
262
+ **Output:**
263
+
264
+ Return the redesigned code, plus a short note explaining:
265
+
266
+ - The structural fingerprint you picked, axis by axis.
267
+ - Why this combination fits the brief better than the original.
268
+ - One thing you removed and why.
269
+ - (If genre changed) why the new genre fits the user's stated kind of design.