create-claudecraft 1.0.0 → 2.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 (258) hide show
  1. package/README.md +43 -178
  2. package/bin/cli.js +186 -1
  3. package/dist/answers.d.ts +269 -0
  4. package/dist/answers.js +215 -0
  5. package/dist/ink-prompts.d.ts +90 -12
  6. package/dist/ink-prompts.js +371 -330
  7. package/dist/lettering.d.ts +2 -0
  8. package/dist/lettering.js +28 -0
  9. package/lib/apps.mjs +141 -0
  10. package/lib/github.mjs +24 -0
  11. package/lib/init.mjs +153 -0
  12. package/lib/ports.mjs +56 -0
  13. package/lib/scaffold.mjs +218 -0
  14. package/lib/upgrade.mjs +164 -0
  15. package/package.json +39 -33
  16. package/templates/astro/.editorconfig +15 -0
  17. package/templates/astro/.env.example +2 -0
  18. package/templates/astro/.github/workflows/ci.yml +37 -0
  19. package/templates/astro/.github/workflows/deploy.yml +46 -0
  20. package/templates/astro/.nvmrc +1 -0
  21. package/templates/astro/.prettierignore +10 -0
  22. package/templates/astro/.prettierrc.json +7 -0
  23. package/templates/astro/.vscode/extensions.json +3 -0
  24. package/templates/astro/.vscode/settings.json +12 -0
  25. package/templates/astro/AGENTS.md +100 -0
  26. package/templates/astro/README.md +42 -0
  27. package/templates/astro/_CLAUDE.md +1 -0
  28. package/templates/astro/_claude/launch.json +13 -0
  29. package/templates/astro/_claude/settings.json +22 -0
  30. package/templates/astro/_codex/environments/environment.toml +20 -0
  31. package/templates/astro/_gitignore +31 -0
  32. package/templates/astro/_npmrc +8 -0
  33. package/templates/astro/_super.engineering/config.json +8 -0
  34. package/templates/astro/_zed/tasks.json +5 -0
  35. package/templates/astro/astro.config.mjs +111 -0
  36. package/templates/astro/docs/README.md +7 -0
  37. package/templates/astro/docs/decisions.md +3 -0
  38. package/templates/astro/docs/inbox.md +7 -0
  39. package/templates/astro/docs/kit/agent-apps.md +15 -0
  40. package/templates/astro/docs/kit/analytics.md +13 -0
  41. package/templates/astro/docs/kit/deploy.md +9 -0
  42. package/templates/astro/docs/kit/images.md +10 -0
  43. package/templates/astro/docs/kit/languages.md +8 -0
  44. package/templates/astro/docs/kit/local.md +16 -0
  45. package/templates/astro/docs/kit/seo.md +15 -0
  46. package/templates/astro/docs/kit/structure.md +40 -0
  47. package/templates/astro/docs/kit/upgrade.md +19 -0
  48. package/templates/astro/functions/_middleware.js +25 -0
  49. package/templates/astro/intent.md +40 -0
  50. package/templates/astro/package.json +46 -0
  51. package/templates/astro/public/_headers +17 -0
  52. package/templates/astro/public/_routes.json +5 -0
  53. package/templates/astro/public/apple-touch-icon.png +0 -0
  54. package/templates/astro/public/favicon-16.png +0 -0
  55. package/templates/astro/public/favicon-32.png +0 -0
  56. package/templates/astro/public/favicon.ico +0 -0
  57. package/templates/astro/public/favicon.svg +4 -0
  58. package/templates/astro/public/icon-192.png +0 -0
  59. package/templates/astro/public/icon-512.png +0 -0
  60. package/templates/astro/public/og-image.png +0 -0
  61. package/templates/astro/scripts/chrome.mjs +138 -0
  62. package/templates/astro/scripts/deploy.sh +69 -0
  63. package/templates/astro/scripts/generate-icons.mjs +73 -0
  64. package/templates/astro/scripts/generate-og.mjs +66 -0
  65. package/templates/astro/scripts/lint-copy.mjs +67 -0
  66. package/templates/astro/scripts/local-domain.mjs +115 -0
  67. package/templates/astro/scripts/markdown-pages.mjs +142 -0
  68. package/templates/astro/scripts/og-template.html +73 -0
  69. package/templates/astro/scripts/shared.mjs +33 -0
  70. package/templates/astro/scripts/verify-build.mjs +283 -0
  71. package/templates/astro/scripts/verify.mjs +19 -0
  72. package/templates/astro/site.config.mjs +85 -0
  73. package/templates/astro/src/components/Analytics.astro +49 -0
  74. package/templates/astro/src/components/Consent.astro +52 -0
  75. package/templates/astro/src/components/Counter.tsx +20 -0
  76. package/templates/astro/src/data/README.md +18 -0
  77. package/templates/astro/src/dev/styleguide.astro +43 -0
  78. package/templates/astro/src/env.d.ts +1 -0
  79. package/templates/astro/src/i18n/ar.json +29 -0
  80. package/templates/astro/src/i18n/de.json +29 -0
  81. package/templates/astro/src/i18n/en.json +29 -0
  82. package/templates/astro/src/i18n/es.json +29 -0
  83. package/templates/astro/src/i18n/fr.json +29 -0
  84. package/templates/astro/src/i18n/he.json +29 -0
  85. package/templates/astro/src/i18n/hi.json +29 -0
  86. package/templates/astro/src/i18n/index.ts +80 -0
  87. package/templates/astro/src/i18n/it.json +29 -0
  88. package/templates/astro/src/i18n/ja.json +29 -0
  89. package/templates/astro/src/i18n/ko.json +29 -0
  90. package/templates/astro/src/i18n/nl.json +29 -0
  91. package/templates/astro/src/i18n/pl.json +29 -0
  92. package/templates/astro/src/i18n/pt-br.json +29 -0
  93. package/templates/astro/src/i18n/ro.json +29 -0
  94. package/templates/astro/src/i18n/ru.json +29 -0
  95. package/templates/astro/src/i18n/sv.json +29 -0
  96. package/templates/astro/src/i18n/tr.json +29 -0
  97. package/templates/astro/src/i18n/uk.json +29 -0
  98. package/templates/astro/src/i18n/zh-cn.json +29 -0
  99. package/templates/astro/src/layouts/BaseLayout.astro +205 -0
  100. package/templates/astro/src/lib/cn.ts +7 -0
  101. package/templates/astro/src/lib/consent.ts +32 -0
  102. package/templates/astro/src/lib/seo.ts +18 -0
  103. package/templates/astro/src/lib/theme.ts +5 -0
  104. package/templates/astro/src/pages/404.astro +7 -0
  105. package/templates/astro/src/pages/[...locale]/404.astro +25 -0
  106. package/templates/astro/src/pages/[...locale]/about.astro +25 -0
  107. package/templates/astro/src/pages/[...locale]/index.astro +30 -0
  108. package/templates/astro/src/pages/[...locale]/privacy.astro +28 -0
  109. package/templates/astro/src/pages/robots.txt.ts +16 -0
  110. package/templates/astro/src/pages/site.webmanifest.ts +26 -0
  111. package/templates/astro/src/styles/global.css +163 -0
  112. package/templates/astro/t3.json +22 -0
  113. package/templates/astro/tsconfig.json +13 -0
  114. package/templates/astro/wrangler.toml +8 -0
  115. package/templates/react/.editorconfig +15 -0
  116. package/templates/react/.env.example +2 -0
  117. package/templates/react/.nvmrc +1 -0
  118. package/templates/react/.prettierignore +11 -0
  119. package/templates/react/.prettierrc.json +5 -0
  120. package/templates/react/.vscode/extensions.json +3 -0
  121. package/templates/react/.vscode/settings.json +4 -0
  122. package/templates/react/AGENTS.md +64 -0
  123. package/templates/react/README.md +31 -0
  124. package/templates/react/_CLAUDE.md +1 -0
  125. package/templates/react/_claude/launch.json +13 -0
  126. package/templates/react/_claude/settings.json +21 -0
  127. package/templates/react/_codex/environments/environment.toml +20 -0
  128. package/templates/react/_gitignore +17 -0
  129. package/templates/react/_npmrc +8 -0
  130. package/templates/react/_super.engineering/config.json +8 -0
  131. package/templates/react/_zed/tasks.json +5 -0
  132. package/templates/react/docs/decisions.md +3 -0
  133. package/templates/react/docs/inbox.md +7 -0
  134. package/templates/react/index.html +14 -0
  135. package/templates/react/package.json +47 -0
  136. package/templates/react/public/favicon.svg +5 -0
  137. package/templates/react/scripts/lint-copy.mjs +46 -0
  138. package/templates/react/scripts/lint-tokens.mjs +44 -0
  139. package/templates/react/scripts/local-domain.mjs +115 -0
  140. package/templates/react/scripts/verify.mjs +20 -0
  141. package/templates/react/site.config.mjs +23 -0
  142. package/templates/react/src/App.test.tsx +15 -0
  143. package/templates/react/src/App.tsx +21 -0
  144. package/templates/react/src/components/ErrorBoundary.tsx +42 -0
  145. package/templates/react/src/components/SkipLink.tsx +10 -0
  146. package/templates/react/src/config/site.ts +5 -0
  147. package/templates/react/src/lib/cn.ts +7 -0
  148. package/templates/react/src/main.tsx +13 -0
  149. package/templates/react/src/pages/HomePage.tsx +71 -0
  150. package/templates/react/src/pages/NotFoundPage.tsx +21 -0
  151. package/templates/react/src/styles/global.css +96 -0
  152. package/templates/react/src/test-setup.ts +1 -0
  153. package/templates/react/t3.json +22 -0
  154. package/templates/{base → react}/tsconfig.json +3 -3
  155. package/templates/react/vite.config.ts +26 -0
  156. package/templates/shared/_claude/hooks/design-lint.mjs +67 -0
  157. package/templates/shared/_claude/skills/design-quality/SKILL.md +113 -0
  158. package/templates/shared/_claude/skills/design-quality/references/composition-palette.md +87 -0
  159. package/templates/shared/_claude/skills/design-quality/references/copy-tells.md +49 -0
  160. package/templates/shared/_claude/skills/design-quality/references/visual-critic.md +75 -0
  161. package/templates/shared/design.md +148 -0
  162. package/templates/shared/intent.md +28 -0
  163. package/dist/constants.d.ts +0 -71
  164. package/dist/constants.js +0 -128
  165. package/dist/index.d.ts +0 -1
  166. package/dist/index.js +0 -229
  167. package/dist/prompts.d.ts +0 -16
  168. package/dist/prompts.js +0 -434
  169. package/dist/scaffold.d.ts +0 -19
  170. package/dist/scaffold.js +0 -303
  171. package/dist/ui.d.ts +0 -27
  172. package/dist/ui.js +0 -254
  173. package/templates/app/App.tsx +0 -21
  174. package/templates/base/CLAUDE.md +0 -332
  175. package/templates/base/eslint.config.js +0 -28
  176. package/templates/base/index.html +0 -17
  177. package/templates/base/package.json +0 -43
  178. package/templates/base/postcss.config.js +0 -6
  179. package/templates/base/tailwind.config.js +0 -81
  180. package/templates/base/vite.config.ts +0 -16
  181. package/templates/commands/brainstorm.md +0 -6
  182. package/templates/commands/build.md +0 -41
  183. package/templates/commands/execute-plan.md +0 -6
  184. package/templates/commands/lint.md +0 -41
  185. package/templates/commands/ralph.md +0 -113
  186. package/templates/commands/typecheck.md +0 -44
  187. package/templates/commands/write-plan.md +0 -6
  188. package/templates/components/ErrorBoundary.tsx +0 -49
  189. package/templates/components/ui/Button.tsx +0 -60
  190. package/templates/components/ui/CodeBlock.tsx +0 -46
  191. package/templates/components/ui/CopyCommand.tsx +0 -38
  192. package/templates/components/ui/FilePreview.tsx +0 -46
  193. package/templates/components/ui/SkipLink.tsx +0 -7
  194. package/templates/components/ui/ThemeSelector.tsx +0 -41
  195. package/templates/components/ui/UICarousel.tsx +0 -309
  196. package/templates/context/ThemeContext.tsx +0 -61
  197. package/templates/homepage/HomePage.tsx +0 -534
  198. package/templates/homepage/NotFoundPage.tsx +0 -17
  199. package/templates/hooks/README.md +0 -82
  200. package/templates/hooks/check-branch.js +0 -27
  201. package/templates/hooks/typecheck-after-edit.js +0 -51
  202. package/templates/index.css +0 -67
  203. package/templates/lib/utils.ts +0 -9
  204. package/templates/main.tsx +0 -16
  205. package/templates/settings/MCP_SETUP.md +0 -76
  206. package/templates/settings/settings.json +0 -16
  207. package/templates/settings/settings.local.json +0 -37
  208. package/templates/skills/design/a11y-audit/SKILL.md +0 -173
  209. package/templates/skills/design/design-polish/SKILL.md +0 -75
  210. package/templates/skills/design/figma-to-code/SKILL.md +0 -157
  211. package/templates/skills/design/json-ld/SKILL.md +0 -125
  212. package/templates/skills/design/microcopy/SKILL.md +0 -197
  213. package/templates/skills/design/og-image/SKILL.md +0 -157
  214. package/templates/skills/design/ralph-wiggum-loops/SKILL.md +0 -299
  215. package/templates/skills/design/react-best-practices/SKILL.md +0 -106
  216. package/templates/skills/design/react-best-practices/references/react-performance-guidelines.md +0 -143
  217. package/templates/skills/design/seo-review/SKILL.md +0 -96
  218. package/templates/skills/design/sitemap-generator/SKILL.md +0 -66
  219. package/templates/skills/design/testing-patterns/SKILL.md +0 -276
  220. package/templates/skills/design/ui-skills/SKILL.md +0 -85
  221. package/templates/skills/design/visual-iteration/SKILL.md +0 -88
  222. package/templates/skills/workflow/brainstorming/SKILL.md +0 -54
  223. package/templates/skills/workflow/dispatching-parallel-agents/SKILL.md +0 -180
  224. package/templates/skills/workflow/executing-plans/SKILL.md +0 -76
  225. package/templates/skills/workflow/finishing-a-development-branch/SKILL.md +0 -200
  226. package/templates/skills/workflow/receiving-code-review/SKILL.md +0 -213
  227. package/templates/skills/workflow/requesting-code-review/SKILL.md +0 -105
  228. package/templates/skills/workflow/requesting-code-review/code-reviewer.md +0 -146
  229. package/templates/skills/workflow/subagent-driven-development/SKILL.md +0 -240
  230. package/templates/skills/workflow/subagent-driven-development/code-quality-reviewer-prompt.md +0 -20
  231. package/templates/skills/workflow/subagent-driven-development/implementer-prompt.md +0 -78
  232. package/templates/skills/workflow/subagent-driven-development/spec-reviewer-prompt.md +0 -61
  233. package/templates/skills/workflow/systematic-debugging/CREATION-LOG.md +0 -119
  234. package/templates/skills/workflow/systematic-debugging/SKILL.md +0 -296
  235. package/templates/skills/workflow/systematic-debugging/condition-based-waiting-example.ts +0 -158
  236. package/templates/skills/workflow/systematic-debugging/condition-based-waiting.md +0 -115
  237. package/templates/skills/workflow/systematic-debugging/defense-in-depth.md +0 -122
  238. package/templates/skills/workflow/systematic-debugging/find-polluter.sh +0 -63
  239. package/templates/skills/workflow/systematic-debugging/root-cause-tracing.md +0 -169
  240. package/templates/skills/workflow/systematic-debugging/test-academic.md +0 -14
  241. package/templates/skills/workflow/systematic-debugging/test-pressure-1.md +0 -58
  242. package/templates/skills/workflow/systematic-debugging/test-pressure-2.md +0 -68
  243. package/templates/skills/workflow/systematic-debugging/test-pressure-3.md +0 -69
  244. package/templates/skills/workflow/test-driven-development/SKILL.md +0 -371
  245. package/templates/skills/workflow/test-driven-development/testing-anti-patterns.md +0 -299
  246. package/templates/skills/workflow/using-git-worktrees/SKILL.md +0 -217
  247. package/templates/skills/workflow/using-superpowers/SKILL.md +0 -87
  248. package/templates/skills/workflow/verification-before-completion/SKILL.md +0 -139
  249. package/templates/skills/workflow/writing-plans/SKILL.md +0 -116
  250. package/templates/skills/workflow/writing-skills/SKILL.md +0 -655
  251. package/templates/skills/workflow/writing-skills/anthropic-best-practices.md +0 -1150
  252. package/templates/skills/workflow/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
  253. package/templates/skills/workflow/writing-skills/graphviz-conventions.dot +0 -172
  254. package/templates/skills/workflow/writing-skills/persuasion-principles.md +0 -187
  255. package/templates/skills/workflow/writing-skills/render-graphs.js +0 -168
  256. package/templates/skills/workflow/writing-skills/testing-skills-with-subagents.md +0 -384
  257. package/templates/types/index.ts +0 -17
  258. /package/templates/{vite-env.d.ts → react/src/vite-env.d.ts} +0 -0
@@ -0,0 +1,75 @@
1
+ # Visual critic rubric
2
+
3
+ The failure modes that slip past TypeScript, ESLint, and build checks. Judge what is **actually visible in the rendered pixels**, never what you assume the code renders.
4
+
5
+ Do not invent problems to look thorough: if the page is genuinely strong, return `SHIP`.
6
+
7
+ ---
8
+
9
+ ## Inspection order (highest-leverage failures first)
10
+
11
+ ### 1. `broken-render` (CHECK FIRST — always `high`)
12
+ - Error boundary, "Something went wrong", React crash, hydration mismatch.
13
+ - Blank or white/dark empty hero or section (often caused by `opacity: 0` initial state or scroll-triggered reveal that never fires on first paint / capture).
14
+ - Only chrome (navbar + footer) with missing body content.
15
+ - Broken `<img>` icons or unstyled raw HTML elements sitting flush against the viewport edge.
16
+
17
+ ### 2. `contrast` (STRICT — top recurring defect, always `high` in hero/nav/CTA)
18
+ - Trace **every** headline, subcopy block, nav link, button label, badge, and card caption to the **actual surface behind it** (aim WCAG AA ≥ 4.5:1 body, ≥ 3:1 large text/UI).
19
+ - **Black/dark text on a dark photo or inverse band**, or **light text on a light background**, is ship-blocking.
20
+ - **Nav over hero photo:** header MUST render its own deterministic top-down dark scrim (`from-scrim/70 to-transparent`) + `text-on-media` — never rely on the photo happening to be dark at the top, and never use `text-on-accent` / `text-primary-foreground` assuming it is light.
21
+ - **Dark mode check** (when enabled): check that accents do not vibrate on dark ground and muted text does not sink below legibility.
22
+
23
+ ### 3. `hero` & media integrity
24
+ - **Washed-out hero (top recurring defect):** hero image dimmed via `opacity-*`, or bleached by a surface-token gradient (`from-paper`, `from-background`, `from-card`, `from-surface`) fading over the photo. Hero imagery must stay **full-strength**; use dark `scrim` + `text-on-media`, or place copy in a clean solid panel beside the image.
25
+ - **Floating junk on hero media:** promo badges, review pills, stats strips, or inset floating cards pasted over hero photography.
26
+ - **Generic fallback:** vague headline + stock photo with no dominant object or clear primary action above the fold.
27
+ - **Text-in-image (always `high`):** a hero or section backdrop containing readable baked-in text (website screenshot, poster, flyer, template mockup) sitting behind DOM copy. Text belongs in the DOM, never inside a backdrop image.
28
+
29
+ ### 4. `logo` & `nav`
30
+ - Header brand mark is the real logo or clean typographic wordmark — never a placeholder icon, partner logo, broken image, or phone-hours string.
31
+ - Nav items stay on **one line** without wrapping, colliding, or clipping (`≤5` links + 1 utility + 1 CTA).
32
+ - No dead theme-toggle button when dark mode is disabled or auto-only.
33
+ - Mobile fold shows brand + primary action clearly without horizontal overflow.
34
+
35
+ ### 5. `band-rhythm` & `section`
36
+ - **Flatline after hero (`high`):** every section from hero to footer sits on the same light background with no mid-page contrast moment (image band, tinted band, or inverse band).
37
+ - **Last section collides with footer (`high`):** an inverse final CTA directly above an inverse footer merges into one undifferentiated slab.
38
+ - **Category mismatch (`high`):** a SaaS-style 3-up icon-card "features/amenities" grid on an experiential / hospitality / food / travel / portfolio site (use editorial rows, hairline lists, or captioned photo tiles instead). Even on utilitarian SaaS, >1 icon-card grid on a page is a finding.
39
+ - **AI UI screenshot slop (`high`):** generated garbled dashboard/code/browser images on a technical/SaaS site instead of real coded UI panels or clean icons.
40
+ - **Bloated empty sections:** thin content (2–3 items, contact hours, short quote) stretched into a full-viewport `min-h-screen` cavity.
41
+
42
+ ### 6. `spacing`
43
+ - Collapsed padding: text jammed against card/section edges, image touching heading/copy above it, zero breathing room around buttons or inputs.
44
+ - Bare, unstyled, or cramped form fields lacking grouping, labels, or vertical rhythm.
45
+ - Wildly inconsistent gaps between sibling items or horizontal scrollbar overflow on mobile (`390px`).
46
+
47
+ ### 7. `palette`
48
+ - Random rainbow chrome, status colors (warning orange / danger red) used as big decorative bands clashing with the brand, or competing accents with no hierarchy.
49
+ - Accent used as wallpaper (>10% screen fill) or as heading fill / card side-stripe.
50
+ - "Bold" or branded site accidentally rendered flat monochrome with no visible brand signal.
51
+
52
+ ### 8. `harmony` (cross-section coherence)
53
+ - Mixed corner radii or conflicting card treatments between sections.
54
+ - Image treatments that disagree (one duotone, one faded, one sharp full-color, one grey placeholder).
55
+ - Heading scale, label/eyebrow treatment, or copy voice lurching from section to section.
56
+ - Repeated showpiece device (two stat strips, two identical split blocks back to back).
57
+
58
+ ### 9. `imagery` & `copy`
59
+ - Empty grey boxes, broken assets, icon-as-photo stand-ins, or card grids mixing real photos with placeholders.
60
+ - Wrong language, missing diacritics, or mixed-language UI chrome (`"Submit"` / `"Learn more"` leaking into a non-English site).
61
+ - Unreplaced template placeholders (`TODO`, `TBD`, `lorem`, default one-liner).
62
+
63
+ ---
64
+
65
+ ## Severity & cap rules
66
+
67
+ | Severity | Meaning | Action |
68
+ |---|---|---|
69
+ | `high` | Ship-blocking: broken render, illegible contrast, washed-out hero, text-in-image, flatline/footer collision, category mismatch, broken layout/overflow, wrong language | Must fix before `SHIP` |
70
+ | `med` | Noticeable polish gap: minor rhythm inconsistency, slight spacing imbalance, secondary copy tell | Fix if within budget; advisory otherwise |
71
+ | `low` | Micro-polish | Drop if area already has higher-priority findings |
72
+
73
+ - **Cap at 3 findings per area** (`broken-render | contrast | hero | logo | nav | band-rhythm | section | spacing | palette | harmony | imagery | copy`).
74
+ - **Verdict:** `REPAIR` if ANY `high` finding exists; `SHIP` only when zero `high` findings exist and G19 (rendered pixels at desktop + mobile) was actually inspected.
75
+ - **Loop budget:** maximum **3** critique → fix → re-render rounds. After round 3, report what remains to the human.
@@ -0,0 +1,148 @@
1
+ # design.md: {{SITE_NAME}}
2
+
3
+ Craft over chrome. Design contract for **{{SITE_NAME}}**. Rewrite the North Star and CSS tokens for your real brand; keep the gates.
4
+
5
+ **Truth order:** live token values in `{{TOKENS_FILE}}` are the source of truth; gates below outrank any component code. If code breaks a gate, fix the code.
6
+
7
+ Product scope lives in `intent.md`. Before laying out a new page or surface, run `/design-quality plan`. Before claiming any UI pass done, run `/design-quality` (or read `.claude/skills/design-quality/SKILL.md`).
8
+
9
+ ---
10
+
11
+ ## Creative north star (rewrite for your brand)
12
+
13
+ **North star:** _Craft over chrome: one clear brand, one job per view, proof before ornament._
14
+
15
+ Write one sentence for this product's atmosphere (examples: _"the founder's field guide"_, _"one price on newsprint"_, _"a calm instrument that disappears into the task"_). Every visual choice serves that sentence. Do not invent a second aesthetic mid-build without rewriting this sentence with the human.
16
+
17
+ ---
18
+
19
+ ## Gates (G1–G20)
20
+
21
+ Fail any gate → not done.
22
+
23
+ ### Direction & Composition
24
+
25
+ #### G1 · Brand first
26
+
27
+ The first viewport is one composition. **{{SITE_NAME}}** is a hero-level signal. No eyebrow cluster, promo bar, or chrome outranks the brand. If you strip the nav and the page could belong to any competitor, branding failed.
28
+
29
+ #### G2 · Hero budget & dominant object
30
+
31
+ First viewport only: brand, one headline (or the brand _is_ the headline), one short supporting sentence, one primary CTA group, and **one dominant object** (real product UI, working booking/intake control, full-bleed subject photography, or a deliberate type-led statement). Decide three independent axes before building: `shape` (geometry), `field` (ground), and `media` (`photo | coded-ui | none`). No stats strips, promo chips, floating badges, stickers, or inset media cards cluttering hero media.
32
+
33
+ #### G3 · One job per section & band rhythm
34
+
35
+ Each section does one job: one headline, one short supporting sentence when needed. Never stack more than **two** consecutive sections on the same background band; include at least one mid-page contrast moment (image band, tinted band, or inverse band). **The last body section and the footer never share a band** (an inverse CTA directly above an inverse footer merges into one slab). Thin blocks (short lists, 2–3 item strips, hours/contact) use compact vertical rhythm; only the hero may fill `min-h-dvh`. Cards are not the default container — use cards only when they wrap a real interaction or distinct data item.
36
+
37
+ #### G4 · Immersive dial (fit the business)
38
+
39
+ Match visual richness to the category:
40
+
41
+ - **Experiential** (hospitality, food, travel, events, retail, wellness, portfolio): lean editorial and image-led — captioned photo tiles, hairline lists, icon+text rows beside photography. **Never** ship a SaaS icon-card feature wall.
42
+ - **Utilitarian / technical** (SaaS, dev tools, dashboards, docs, B2B, finance): stay restrained — clean neutral bands, at most **one** icon-card grid on the entire page, and **real coded UI** (styled panels, tables, charts using design tokens) instead of AI-generated UI screenshots or neon "AI/tech" illustrations.
43
+
44
+ #### G5 · Nav as control surface
45
+
46
+ Decide header **surface** (solid band, transparent with deterministic scrim over hero, floating pill, panel-integrated) and **layout** (arrangement of lockup, links, utility, CTA) independently — do not emit logo-left / links-right / single-button by reflex. Hard budget: **at most 5** primary links + 1 utility + 1 CTA, never wrapping to two lines or clipping. Every link must go somewhere real (no aspirational dead links or mismatched anchors). Mobile preserves brand + primary action first.
47
+
48
+ #### G6 · Cross-section harmony
49
+
50
+ The assembled page must read as **one** designed artifact. Corner radii, image treatments, heading/label scales, border weights, and copy register must stay consistent top to bottom. Never repeat the same showpiece device twice on one page (e.g., two stat strips or two identical split blocks back-to-back).
51
+
52
+ ---
53
+
54
+ ### Tokens, Surfaces & Type
55
+
56
+ #### G7 · Tokens, not literals
57
+
58
+ Color, typography, and radius values live exclusively in `{{TOKENS_FILE}}`. Components consume semantic utilities (`bg-paper`, `text-ink`, `text-muted`, `border-rule`, `bg-accent`, `text-on-accent`, `bg-scrim`, `text-on-media`) or CSS variables — never raw hex, `rgb()`, `oklch()`, or default Tailwind palette utilities (`text-white`, `bg-gray-900`, `bg-[#...]`). Change the tokens and the whole product reprints.
59
+
60
+ #### G8 · Color harmony & signal budget
61
+
62
+ Structure belongs to neutrals; the palette holds together in temperature, chroma, and contrast role. Brand accent is a **signal (~10% budget per screen)** for active state, links, focus rings, and the primary next action — never background wallpaper, heading fills, or colored card side-stripes. Multiple accents are allowed only when they harmonize and each owns a distinct job (e.g., brand + data verdict). When dark mode is enabled, light and dark are **two real appearances** sharing one ramp: body text softens slightly below heading ink, dark accent softens so it never vibrates, and body contrast clears 4.5:1 in both.
63
+
64
+ #### G9 · Hero media integrity (no surface wash)
65
+
66
+ Hero photography stays **full-strength**. Never dim it with `opacity-*`, and never fade a light surface token (`from-paper`, `from-background`, `from-card`, `from-surface`) across a photo — that bleaches the image. Earn legibility with a dedicated dark **`scrim`** + **`text-on-media`** pair anchored to the copy zone (and a deterministic top-down header scrim when nav overlays a hero), copy placed over a genuinely calm region, or a true solid split panel beside the photo.
67
+
68
+ #### G10 · Type with purpose
69
+
70
+ Never ship Inter, Roboto, Arial, or raw `system-ui` as the brand voice. Use one deliberate family (or one intentional pairing) with a clear scale; create hierarchy through size, weight, cut, space, and italic rather than a third novelty face. Body reading measure stays ~60–70ch. Use `text-balance` on headings, `text-pretty` on body, `tabular-nums` for numbers in tables/metrics, and **sentence case** everywhere except proper nouns.
71
+
72
+ #### G11 · Whisper elevation
73
+
74
+ Depth comes from tonal surface rungs and hairline borders first. Resting shadows stay near-invisible (`≤ 0.05` alpha) or absent. Clear, heavy drop shadows at rest fail. Lift belongs on hover, focus, and detached floating layers (menus, dialogs, popovers).
75
+
76
+ ---
77
+
78
+ ### Anti-Slop, Motion, A11y & Honesty
79
+
80
+ #### G12 · Anti-slop (reject on sight)
81
+
82
+ Reject immediately: purple→indigo AI defaults, cream+terracotta+serif reflex kits, glow stacks, decorative glassmorphism, gradient text or split-color headings, colored card side-stripes, identical 3-up card grids stacked on top of each other, hero-metric template strips, eyebrow kickers over every section, emoji clutter, and rounded-full pill clusters used as chrome.
83
+
84
+ #### G13 · Motion & capture safety
85
+
86
+ At most 2–3 intentional motions on a marketing surface. Animate compositor properties only (`transform`, `opacity`), ≤200–250ms `ease-out` for UI feedback, no bounce/elastic, no scroll-jacking, no layout-property animation, and hard stop on `prefers-reduced-motion`. **Never hide above-fold or critical content behind initial `opacity: 0` or scroll-triggered reveal** — first paint, reduced-motion users, and screenshot captures must always see the complete fold.
87
+
88
+ #### G14 · A11y, mobile & language floor
89
+
90
+ Visible `:focus-visible` rings (never `outline: none` without replacement). Skip link to `#main`. Semantic `<button>`, `<a>`, and labeled form controls. Meaningful `alt` text (`alt=""` for decorative). Body text ≥ 4.5:1 on its actual rendered backdrop (especially hero headlines, buttons, and badges). Tap targets ≥ 44×44px. `min-h-dvh` instead of `min-h-screen`. `aria-label` on icon-only buttons. `<html lang>` and every user-visible string (including diacritics, dates, currencies, error states) match the product's declared language.
91
+
92
+ #### G15 · Honesty, imagery & copy
93
+
94
+ Show real proof over decorative filler. **Zero text-in-image:** never place DOM copy over a backdrop image that already has baked-in headlines, posters, or UI screenshots. Below-the-fold images carry `loading="lazy" decoding="async"`; hero imagery stays eager. No broken images, empty grey boxes, fake metrics, or non-existent features. Copy passes the **swap test** (replace **{{SITE_NAME}}** with a competitor — if the sentence still holds true, rewrite it around a real fact) and clears `scripts/lint-copy.mjs`.
95
+
96
+ #### G16 · Share & production surface
97
+
98
+ Absolute 1200×630 `og:image` (when marketing/public), favicon set, accurate `<title>` and `<meta name="description">`, zero console errors, zero React error boundaries or blank renders.
99
+
100
+ ---
101
+
102
+ ### Process & Verification
103
+
104
+ #### G17 · Propose before implementing
105
+
106
+ Before building or reworking layout and visual hierarchy, state the approach in 3–4 lines (North Star, hero `shape` × `field` × `media`, nav treatment/layout, band rhythm) and confirm with the human.
107
+
108
+ #### G18 · Mechanical gates before eyes
109
+
110
+ Run `npm run verify` (formatting, typecheck, build, token-literal check, copy lint) and get it green **before** spending a single turn on visual review.
111
+
112
+ #### G19 · Visual grounding with recorded observations
113
+
114
+ Never claim UI done from source code alone, and never rubber-stamp "I looked at the screenshot." Open the rendered page (or screenshots) at **desktop (1440px) AND mobile (390px)** — plus dark mode if enabled — and record concrete pixel observations (broken render & contrast first, then nav, hero, spacing, band rhythm, imagery, harmony).
115
+
116
+ #### G20 · Separate critique pass & bounded loops
117
+
118
+ The agent that built the UI never self-PASSes. Run `/design-quality` as a separate pass (fresh read-only subagent or clean turn). Report at most **3 highest-impact findings per area**, emit `SHIP` only when zero `high` findings remain, and cap fix-and-recheck loops at **3** before escalating remaining trade-offs to the human.
119
+
120
+ ---
121
+
122
+ ## Seed tokens (rewrite in `{{TOKENS_FILE}}`)
123
+
124
+ | Token | Role |
125
+ | ----------------------------- | ------------------------------------------------------- |
126
+ | `--color-paper` | Page ground |
127
+ | `--color-surface` | Raised / card / section-alternate surface |
128
+ | `--color-ink` | Primary text & structure |
129
+ | `--color-muted` | Secondary copy & quiet metadata |
130
+ | `--color-rule` | Hairline borders & section dividers |
131
+ | `--color-accent` | Dominant brand accent (signal, ~10% budget) |
132
+ | `--color-accent-soft` | Subtle tint / selection wash |
133
+ | `--color-on-accent` | Text placed directly on `--color-accent` |
134
+ | `--color-scrim` | Dark overlay token for legible text over photography |
135
+ | `--color-on-media` | High-contrast light ink over media + scrim |
136
+ | `--font-sans` / `--font-mono` | Brand typography (rewrite the seed face for your brand) |
137
+
138
+ ## Orchestration loop
139
+
140
+ ```
141
+ /design-quality plan (G17) → implement → npm run verify (G18)
142
+ → /design-quality (fresh pass, G1–G20 + pixels at 1440px & 390px, G19–G20)
143
+ → fix ≤3 rounds → human OK → ship
144
+ ```
145
+
146
+ ## Acceptance
147
+
148
+ A stranger on `/` names what **{{SITE_NAME}}** does and what to click next in under five seconds, on both desktop and mobile. `npm run verify` exits clean. A separate `/design-quality` pass grounded in rendered pixels returns `SHIP`.
@@ -0,0 +1,28 @@
1
+ # intent.md — {{SITE_NAME}}
2
+
3
+ Product scope. Fill this with the human (or port it from a brief in `docs/`) and update it when scope changes. Agents: do not invent features or routes beyond this file.
4
+
5
+ ## One sentence
6
+
7
+ > {{ONE_SENTENCE}}
8
+
9
+ ## Audience
10
+
11
+ - Primary:
12
+ - Secondary (optional):
13
+
14
+ ## One job
15
+
16
+ The first screen exists to make visitors do **one** thing:
17
+
18
+ -
19
+
20
+ ## Success looks like
21
+
22
+ -
23
+ -
24
+ -
25
+
26
+ ## Out of scope
27
+
28
+ -
@@ -1,71 +0,0 @@
1
- export declare const PACKAGE_NAME = "create-claudecraft";
2
- export declare const VERSION = "1.0.0";
3
- export declare const DEFAULT_PORT = 6969;
4
- export declare const DEFAULT_THEME = "halloween";
5
- export declare const TAGLINE = "Your taste. Their labor. Finally.";
6
- export declare const STACK: {
7
- readonly react: "18.x";
8
- readonly typescript: "5.x";
9
- readonly vite: "5.x";
10
- readonly tailwind: "3.x";
11
- readonly daisyui: "4.x";
12
- };
13
- export declare const ASSETS: {
14
- readonly skills: 27;
15
- readonly commands: 7;
16
- readonly themes: 32;
17
- readonly hooks: 2;
18
- readonly components: 6;
19
- };
20
- export interface Skill {
21
- name: string;
22
- description: string;
23
- group: 'workflow' | 'design';
24
- bytes: number;
25
- }
26
- export declare const SKILLS: Skill[];
27
- export declare const BUNDLES: {
28
- readonly everything: {
29
- readonly name: "Everything";
30
- readonly description: "All of it. No restraint.";
31
- readonly skills: string[];
32
- readonly commands: 6;
33
- readonly files: 48;
34
- };
35
- readonly designer: {
36
- readonly name: "Designer Essentials";
37
- readonly description: "UI, a11y, Figma, and enough process to stay sane.";
38
- readonly skills: readonly ["react-best-practices", "ui-skills", "a11y-audit", "testing-patterns", "seo-review", "systematic-debugging", "brainstorming", "writing-plans", "verification-before-completion", "design-polish", "visual-iteration", "ralph-wiggum-loops", "figma-to-code"];
39
- readonly commands: 4;
40
- readonly files: 35;
41
- };
42
- readonly workflow: {
43
- readonly name: "Workflow Only";
44
- readonly description: "Process without opinions.";
45
- readonly skills: string[];
46
- readonly commands: 3;
47
- readonly files: 28;
48
- };
49
- };
50
- export declare const COMMANDS: {
51
- name: string;
52
- description: string;
53
- }[];
54
- export declare const ERRORS: {
55
- dirExists: (name: string) => {
56
- title: string;
57
- body: string;
58
- };
59
- noBun: () => {
60
- title: string;
61
- body: string;
62
- };
63
- network: () => {
64
- title: string;
65
- body: string;
66
- };
67
- noProject: () => {
68
- title: string;
69
- body: string;
70
- };
71
- };
package/dist/constants.js DELETED
@@ -1,128 +0,0 @@
1
- export const PACKAGE_NAME = 'create-claudecraft';
2
- export const VERSION = '1.0.0';
3
- export const DEFAULT_PORT = 6969;
4
- export const DEFAULT_THEME = 'halloween';
5
- export const TAGLINE = 'Your taste. Their labor. Finally.';
6
- export const STACK = {
7
- react: '18.x',
8
- typescript: '5.x',
9
- vite: '5.x',
10
- tailwind: '3.x',
11
- daisyui: '4.x',
12
- };
13
- export const ASSETS = {
14
- skills: 27,
15
- commands: 7,
16
- themes: 32,
17
- hooks: 2,
18
- components: 6,
19
- };
20
- export const SKILLS = [
21
- // Workflow (via obra/superpowers)
22
- { name: 'brainstorming', description: 'poke holes before you build', group: 'workflow', bytes: 2800 },
23
- { name: 'writing-plans', description: 'scope creep prevention', group: 'workflow', bytes: 3200 },
24
- { name: 'executing-plans', description: 'checkpoints for the anxious', group: 'workflow', bytes: 2400 },
25
- { name: 'systematic-debugging', description: 'denial → anger → acceptance → fix', group: 'workflow', bytes: 8500 },
26
- { name: 'test-driven-development', description: 'write the test first, cry later', group: 'workflow', bytes: 3100 },
27
- { name: 'verification-before-completion', description: 'did you actually check?', group: 'workflow', bytes: 1800 },
28
- { name: 'requesting-code-review', description: 'brace for feedback', group: 'workflow', bytes: 2200 },
29
- { name: 'receiving-code-review', description: 'they meant well', group: 'workflow', bytes: 1900 },
30
- { name: 'using-git-worktrees', description: 'branch isolation therapy', group: 'workflow', bytes: 2100 },
31
- { name: 'finishing-a-development-branch', description: 'merge it or delete it', group: 'workflow', bytes: 1700 },
32
- { name: 'subagent-driven-development', description: 'outsource to yourself', group: 'workflow', bytes: 4200 },
33
- { name: 'dispatching-parallel-agents', description: 'fake productivity, real results', group: 'workflow', bytes: 1600 },
34
- { name: 'writing-skills', description: 'teach Claude your ways', group: 'workflow', bytes: 5800 },
35
- { name: 'using-superpowers', description: 'RTFM energy', group: 'workflow', bytes: 1200 },
36
- // Design
37
- { name: 'react-best-practices', description: 'fewer re-renders, more peace', group: 'design', bytes: 4200 },
38
- { name: 'testing-patterns', description: 'tests that catch bugs', group: 'design', bytes: 3800 },
39
- { name: 'ui-skills', description: "CSS that cooperates", group: 'design', bytes: 2900 },
40
- { name: 'a11y-audit', description: 'WCAG compliance therapy', group: 'design', bytes: 3400 },
41
- { name: 'seo-review', description: 'feed the algorithm', group: 'design', bytes: 2100 },
42
- { name: 'og-image', description: 'cards worth clicking', group: 'design', bytes: 1800 },
43
- { name: 'microcopy', description: 'interface text that helps', group: 'design', bytes: 2200 },
44
- { name: 'sitemap-generator', description: 'crawler food', group: 'design', bytes: 1400 },
45
- { name: 'json-ld', description: 'structured data for bots', group: 'design', bytes: 1600 },
46
- { name: 'figma-to-code', description: 'pixel-perfect from Figma', group: 'design', bytes: 3200 },
47
- { name: 'design-polish', description: 'systematic polish passes', group: 'design', bytes: 2400 },
48
- { name: 'visual-iteration', description: 'mockup to code loop', group: 'design', bytes: 2100 },
49
- { name: 'ralph-wiggum-loops', description: 'sleep while Claude ships', group: 'design', bytes: 6800 },
50
- ];
51
- export const BUNDLES = {
52
- everything: {
53
- name: 'Everything',
54
- description: 'All of it. No restraint.',
55
- skills: SKILLS.map((s) => s.name),
56
- commands: 6,
57
- files: 48,
58
- },
59
- designer: {
60
- name: 'Designer Essentials',
61
- description: 'UI, a11y, Figma, and enough process to stay sane.',
62
- skills: [
63
- 'react-best-practices',
64
- 'ui-skills',
65
- 'a11y-audit',
66
- 'testing-patterns',
67
- 'seo-review',
68
- 'systematic-debugging',
69
- 'brainstorming',
70
- 'writing-plans',
71
- 'verification-before-completion',
72
- 'design-polish',
73
- 'visual-iteration',
74
- 'ralph-wiggum-loops',
75
- 'figma-to-code',
76
- ],
77
- commands: 4,
78
- files: 35,
79
- },
80
- workflow: {
81
- name: 'Workflow Only',
82
- description: 'Process without opinions.',
83
- skills: SKILLS.filter((s) => s.group === 'workflow').map((s) => s.name),
84
- commands: 3,
85
- files: 28,
86
- },
87
- };
88
- export const COMMANDS = [
89
- { name: '/build', description: 'compile and hope' },
90
- { name: '/typecheck', description: 'surface the lies' },
91
- { name: '/lint', description: 'formatting tribunal' },
92
- { name: '/brainstorm', description: 'interrogate your assumptions' },
93
- { name: '/write-plan', description: 'think before you ship' },
94
- { name: '/execute-plan', description: 'stop planning, start building' },
95
- { name: '/ralph', description: 'autonomous loop templates' },
96
- ];
97
- export const ERRORS = {
98
- dirExists: (name) => ({
99
- title: `"${name}" already exists`,
100
- body: `Your options:
101
- 1. Pick a different name (creativity exercise)
102
- 2. Delete the old one (commitment issues)
103
- 3. Use --init to add skills to it (pragmatism)`,
104
- }),
105
- noBun: () => ({
106
- title: 'Bun not found',
107
- body: `The fast runtime. You need it.
108
-
109
- curl -fsSL https://bun.sh/install | bash
110
-
111
- Then try again. We'll wait.`,
112
- }),
113
- network: () => ({
114
- title: 'Network gave up',
115
- body: `Either your wifi or npm. Probably npm.
116
-
117
- Check your connection and retry. If npm is down,
118
- join the mass hallucination at status.npmjs.org.`,
119
- }),
120
- noProject: () => ({
121
- title: 'Nothing here',
122
- body: `--init needs an existing project. This directory is empty.
123
- No package.json. No hope.
124
-
125
- Create something first:
126
- bun create claudecraft my-app`,
127
- }),
128
- };
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};