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.
- package/README.md +43 -178
- package/bin/cli.js +186 -1
- package/dist/answers.d.ts +269 -0
- package/dist/answers.js +215 -0
- package/dist/ink-prompts.d.ts +90 -12
- package/dist/ink-prompts.js +371 -330
- package/dist/lettering.d.ts +2 -0
- package/dist/lettering.js +28 -0
- package/lib/apps.mjs +141 -0
- package/lib/github.mjs +24 -0
- package/lib/init.mjs +153 -0
- package/lib/ports.mjs +56 -0
- package/lib/scaffold.mjs +218 -0
- package/lib/upgrade.mjs +164 -0
- package/package.json +39 -33
- package/templates/astro/.editorconfig +15 -0
- package/templates/astro/.env.example +2 -0
- package/templates/astro/.github/workflows/ci.yml +37 -0
- package/templates/astro/.github/workflows/deploy.yml +46 -0
- package/templates/astro/.nvmrc +1 -0
- package/templates/astro/.prettierignore +10 -0
- package/templates/astro/.prettierrc.json +7 -0
- package/templates/astro/.vscode/extensions.json +3 -0
- package/templates/astro/.vscode/settings.json +12 -0
- package/templates/astro/AGENTS.md +100 -0
- package/templates/astro/README.md +42 -0
- package/templates/astro/_CLAUDE.md +1 -0
- package/templates/astro/_claude/launch.json +13 -0
- package/templates/astro/_claude/settings.json +22 -0
- package/templates/astro/_codex/environments/environment.toml +20 -0
- package/templates/astro/_gitignore +31 -0
- package/templates/astro/_npmrc +8 -0
- package/templates/astro/_super.engineering/config.json +8 -0
- package/templates/astro/_zed/tasks.json +5 -0
- package/templates/astro/astro.config.mjs +111 -0
- package/templates/astro/docs/README.md +7 -0
- package/templates/astro/docs/decisions.md +3 -0
- package/templates/astro/docs/inbox.md +7 -0
- package/templates/astro/docs/kit/agent-apps.md +15 -0
- package/templates/astro/docs/kit/analytics.md +13 -0
- package/templates/astro/docs/kit/deploy.md +9 -0
- package/templates/astro/docs/kit/images.md +10 -0
- package/templates/astro/docs/kit/languages.md +8 -0
- package/templates/astro/docs/kit/local.md +16 -0
- package/templates/astro/docs/kit/seo.md +15 -0
- package/templates/astro/docs/kit/structure.md +40 -0
- package/templates/astro/docs/kit/upgrade.md +19 -0
- package/templates/astro/functions/_middleware.js +25 -0
- package/templates/astro/intent.md +40 -0
- package/templates/astro/package.json +46 -0
- package/templates/astro/public/_headers +17 -0
- package/templates/astro/public/_routes.json +5 -0
- package/templates/astro/public/apple-touch-icon.png +0 -0
- package/templates/astro/public/favicon-16.png +0 -0
- package/templates/astro/public/favicon-32.png +0 -0
- package/templates/astro/public/favicon.ico +0 -0
- package/templates/astro/public/favicon.svg +4 -0
- package/templates/astro/public/icon-192.png +0 -0
- package/templates/astro/public/icon-512.png +0 -0
- package/templates/astro/public/og-image.png +0 -0
- package/templates/astro/scripts/chrome.mjs +138 -0
- package/templates/astro/scripts/deploy.sh +69 -0
- package/templates/astro/scripts/generate-icons.mjs +73 -0
- package/templates/astro/scripts/generate-og.mjs +66 -0
- package/templates/astro/scripts/lint-copy.mjs +67 -0
- package/templates/astro/scripts/local-domain.mjs +115 -0
- package/templates/astro/scripts/markdown-pages.mjs +142 -0
- package/templates/astro/scripts/og-template.html +73 -0
- package/templates/astro/scripts/shared.mjs +33 -0
- package/templates/astro/scripts/verify-build.mjs +283 -0
- package/templates/astro/scripts/verify.mjs +19 -0
- package/templates/astro/site.config.mjs +85 -0
- package/templates/astro/src/components/Analytics.astro +49 -0
- package/templates/astro/src/components/Consent.astro +52 -0
- package/templates/astro/src/components/Counter.tsx +20 -0
- package/templates/astro/src/data/README.md +18 -0
- package/templates/astro/src/dev/styleguide.astro +43 -0
- package/templates/astro/src/env.d.ts +1 -0
- package/templates/astro/src/i18n/ar.json +29 -0
- package/templates/astro/src/i18n/de.json +29 -0
- package/templates/astro/src/i18n/en.json +29 -0
- package/templates/astro/src/i18n/es.json +29 -0
- package/templates/astro/src/i18n/fr.json +29 -0
- package/templates/astro/src/i18n/he.json +29 -0
- package/templates/astro/src/i18n/hi.json +29 -0
- package/templates/astro/src/i18n/index.ts +80 -0
- package/templates/astro/src/i18n/it.json +29 -0
- package/templates/astro/src/i18n/ja.json +29 -0
- package/templates/astro/src/i18n/ko.json +29 -0
- package/templates/astro/src/i18n/nl.json +29 -0
- package/templates/astro/src/i18n/pl.json +29 -0
- package/templates/astro/src/i18n/pt-br.json +29 -0
- package/templates/astro/src/i18n/ro.json +29 -0
- package/templates/astro/src/i18n/ru.json +29 -0
- package/templates/astro/src/i18n/sv.json +29 -0
- package/templates/astro/src/i18n/tr.json +29 -0
- package/templates/astro/src/i18n/uk.json +29 -0
- package/templates/astro/src/i18n/zh-cn.json +29 -0
- package/templates/astro/src/layouts/BaseLayout.astro +205 -0
- package/templates/astro/src/lib/cn.ts +7 -0
- package/templates/astro/src/lib/consent.ts +32 -0
- package/templates/astro/src/lib/seo.ts +18 -0
- package/templates/astro/src/lib/theme.ts +5 -0
- package/templates/astro/src/pages/404.astro +7 -0
- package/templates/astro/src/pages/[...locale]/404.astro +25 -0
- package/templates/astro/src/pages/[...locale]/about.astro +25 -0
- package/templates/astro/src/pages/[...locale]/index.astro +30 -0
- package/templates/astro/src/pages/[...locale]/privacy.astro +28 -0
- package/templates/astro/src/pages/robots.txt.ts +16 -0
- package/templates/astro/src/pages/site.webmanifest.ts +26 -0
- package/templates/astro/src/styles/global.css +163 -0
- package/templates/astro/t3.json +22 -0
- package/templates/astro/tsconfig.json +13 -0
- package/templates/astro/wrangler.toml +8 -0
- package/templates/react/.editorconfig +15 -0
- package/templates/react/.env.example +2 -0
- package/templates/react/.nvmrc +1 -0
- package/templates/react/.prettierignore +11 -0
- package/templates/react/.prettierrc.json +5 -0
- package/templates/react/.vscode/extensions.json +3 -0
- package/templates/react/.vscode/settings.json +4 -0
- package/templates/react/AGENTS.md +64 -0
- package/templates/react/README.md +31 -0
- package/templates/react/_CLAUDE.md +1 -0
- package/templates/react/_claude/launch.json +13 -0
- package/templates/react/_claude/settings.json +21 -0
- package/templates/react/_codex/environments/environment.toml +20 -0
- package/templates/react/_gitignore +17 -0
- package/templates/react/_npmrc +8 -0
- package/templates/react/_super.engineering/config.json +8 -0
- package/templates/react/_zed/tasks.json +5 -0
- package/templates/react/docs/decisions.md +3 -0
- package/templates/react/docs/inbox.md +7 -0
- package/templates/react/index.html +14 -0
- package/templates/react/package.json +47 -0
- package/templates/react/public/favicon.svg +5 -0
- package/templates/react/scripts/lint-copy.mjs +46 -0
- package/templates/react/scripts/lint-tokens.mjs +44 -0
- package/templates/react/scripts/local-domain.mjs +115 -0
- package/templates/react/scripts/verify.mjs +20 -0
- package/templates/react/site.config.mjs +23 -0
- package/templates/react/src/App.test.tsx +15 -0
- package/templates/react/src/App.tsx +21 -0
- package/templates/react/src/components/ErrorBoundary.tsx +42 -0
- package/templates/react/src/components/SkipLink.tsx +10 -0
- package/templates/react/src/config/site.ts +5 -0
- package/templates/react/src/lib/cn.ts +7 -0
- package/templates/react/src/main.tsx +13 -0
- package/templates/react/src/pages/HomePage.tsx +71 -0
- package/templates/react/src/pages/NotFoundPage.tsx +21 -0
- package/templates/react/src/styles/global.css +96 -0
- package/templates/react/src/test-setup.ts +1 -0
- package/templates/react/t3.json +22 -0
- package/templates/{base → react}/tsconfig.json +3 -3
- package/templates/react/vite.config.ts +26 -0
- package/templates/shared/_claude/hooks/design-lint.mjs +67 -0
- package/templates/shared/_claude/skills/design-quality/SKILL.md +113 -0
- package/templates/shared/_claude/skills/design-quality/references/composition-palette.md +87 -0
- package/templates/shared/_claude/skills/design-quality/references/copy-tells.md +49 -0
- package/templates/shared/_claude/skills/design-quality/references/visual-critic.md +75 -0
- package/templates/shared/design.md +148 -0
- package/templates/shared/intent.md +28 -0
- package/dist/constants.d.ts +0 -71
- package/dist/constants.js +0 -128
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -229
- package/dist/prompts.d.ts +0 -16
- package/dist/prompts.js +0 -434
- package/dist/scaffold.d.ts +0 -19
- package/dist/scaffold.js +0 -303
- package/dist/ui.d.ts +0 -27
- package/dist/ui.js +0 -254
- package/templates/app/App.tsx +0 -21
- package/templates/base/CLAUDE.md +0 -332
- package/templates/base/eslint.config.js +0 -28
- package/templates/base/index.html +0 -17
- package/templates/base/package.json +0 -43
- package/templates/base/postcss.config.js +0 -6
- package/templates/base/tailwind.config.js +0 -81
- package/templates/base/vite.config.ts +0 -16
- package/templates/commands/brainstorm.md +0 -6
- package/templates/commands/build.md +0 -41
- package/templates/commands/execute-plan.md +0 -6
- package/templates/commands/lint.md +0 -41
- package/templates/commands/ralph.md +0 -113
- package/templates/commands/typecheck.md +0 -44
- package/templates/commands/write-plan.md +0 -6
- package/templates/components/ErrorBoundary.tsx +0 -49
- package/templates/components/ui/Button.tsx +0 -60
- package/templates/components/ui/CodeBlock.tsx +0 -46
- package/templates/components/ui/CopyCommand.tsx +0 -38
- package/templates/components/ui/FilePreview.tsx +0 -46
- package/templates/components/ui/SkipLink.tsx +0 -7
- package/templates/components/ui/ThemeSelector.tsx +0 -41
- package/templates/components/ui/UICarousel.tsx +0 -309
- package/templates/context/ThemeContext.tsx +0 -61
- package/templates/homepage/HomePage.tsx +0 -534
- package/templates/homepage/NotFoundPage.tsx +0 -17
- package/templates/hooks/README.md +0 -82
- package/templates/hooks/check-branch.js +0 -27
- package/templates/hooks/typecheck-after-edit.js +0 -51
- package/templates/index.css +0 -67
- package/templates/lib/utils.ts +0 -9
- package/templates/main.tsx +0 -16
- package/templates/settings/MCP_SETUP.md +0 -76
- package/templates/settings/settings.json +0 -16
- package/templates/settings/settings.local.json +0 -37
- package/templates/skills/design/a11y-audit/SKILL.md +0 -173
- package/templates/skills/design/design-polish/SKILL.md +0 -75
- package/templates/skills/design/figma-to-code/SKILL.md +0 -157
- package/templates/skills/design/json-ld/SKILL.md +0 -125
- package/templates/skills/design/microcopy/SKILL.md +0 -197
- package/templates/skills/design/og-image/SKILL.md +0 -157
- package/templates/skills/design/ralph-wiggum-loops/SKILL.md +0 -299
- package/templates/skills/design/react-best-practices/SKILL.md +0 -106
- package/templates/skills/design/react-best-practices/references/react-performance-guidelines.md +0 -143
- package/templates/skills/design/seo-review/SKILL.md +0 -96
- package/templates/skills/design/sitemap-generator/SKILL.md +0 -66
- package/templates/skills/design/testing-patterns/SKILL.md +0 -276
- package/templates/skills/design/ui-skills/SKILL.md +0 -85
- package/templates/skills/design/visual-iteration/SKILL.md +0 -88
- package/templates/skills/workflow/brainstorming/SKILL.md +0 -54
- package/templates/skills/workflow/dispatching-parallel-agents/SKILL.md +0 -180
- package/templates/skills/workflow/executing-plans/SKILL.md +0 -76
- package/templates/skills/workflow/finishing-a-development-branch/SKILL.md +0 -200
- package/templates/skills/workflow/receiving-code-review/SKILL.md +0 -213
- package/templates/skills/workflow/requesting-code-review/SKILL.md +0 -105
- package/templates/skills/workflow/requesting-code-review/code-reviewer.md +0 -146
- package/templates/skills/workflow/subagent-driven-development/SKILL.md +0 -240
- package/templates/skills/workflow/subagent-driven-development/code-quality-reviewer-prompt.md +0 -20
- package/templates/skills/workflow/subagent-driven-development/implementer-prompt.md +0 -78
- package/templates/skills/workflow/subagent-driven-development/spec-reviewer-prompt.md +0 -61
- package/templates/skills/workflow/systematic-debugging/CREATION-LOG.md +0 -119
- package/templates/skills/workflow/systematic-debugging/SKILL.md +0 -296
- package/templates/skills/workflow/systematic-debugging/condition-based-waiting-example.ts +0 -158
- package/templates/skills/workflow/systematic-debugging/condition-based-waiting.md +0 -115
- package/templates/skills/workflow/systematic-debugging/defense-in-depth.md +0 -122
- package/templates/skills/workflow/systematic-debugging/find-polluter.sh +0 -63
- package/templates/skills/workflow/systematic-debugging/root-cause-tracing.md +0 -169
- package/templates/skills/workflow/systematic-debugging/test-academic.md +0 -14
- package/templates/skills/workflow/systematic-debugging/test-pressure-1.md +0 -58
- package/templates/skills/workflow/systematic-debugging/test-pressure-2.md +0 -68
- package/templates/skills/workflow/systematic-debugging/test-pressure-3.md +0 -69
- package/templates/skills/workflow/test-driven-development/SKILL.md +0 -371
- package/templates/skills/workflow/test-driven-development/testing-anti-patterns.md +0 -299
- package/templates/skills/workflow/using-git-worktrees/SKILL.md +0 -217
- package/templates/skills/workflow/using-superpowers/SKILL.md +0 -87
- package/templates/skills/workflow/verification-before-completion/SKILL.md +0 -139
- package/templates/skills/workflow/writing-plans/SKILL.md +0 -116
- package/templates/skills/workflow/writing-skills/SKILL.md +0 -655
- package/templates/skills/workflow/writing-skills/anthropic-best-practices.md +0 -1150
- package/templates/skills/workflow/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
- package/templates/skills/workflow/writing-skills/graphviz-conventions.dot +0 -172
- package/templates/skills/workflow/writing-skills/persuasion-principles.md +0 -187
- package/templates/skills/workflow/writing-skills/render-graphs.js +0 -168
- package/templates/skills/workflow/writing-skills/testing-skills-with-subagents.md +0 -384
- package/templates/types/index.ts +0 -17
- /package/templates/{vite-env.d.ts → react/src/vite-env.d.ts} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function SkipLink() {
|
|
2
|
+
return (
|
|
3
|
+
<a
|
|
4
|
+
href="#main"
|
|
5
|
+
className="sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-50 focus:rounded-md focus:bg-accent focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-on-accent"
|
|
6
|
+
>
|
|
7
|
+
Skip to main content
|
|
8
|
+
</a>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StrictMode } from 'react';
|
|
2
|
+
import { createRoot } from 'react-dom/client';
|
|
3
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
4
|
+
import { App } from './App';
|
|
5
|
+
import './styles/global.css';
|
|
6
|
+
|
|
7
|
+
createRoot(document.getElementById('root')!).render(
|
|
8
|
+
<StrictMode>
|
|
9
|
+
<BrowserRouter>
|
|
10
|
+
<App />
|
|
11
|
+
</BrowserRouter>
|
|
12
|
+
</StrictMode>,
|
|
13
|
+
);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ArrowRight } from 'lucide-react';
|
|
2
|
+
import { ONE_SENTENCE, SITE_NAME } from '@/config/site';
|
|
3
|
+
|
|
4
|
+
const CHECKLIST = [
|
|
5
|
+
{ file: 'intent.md', role: 'Write who this app is for and the one job the first screen does.' },
|
|
6
|
+
{ file: 'design.md', role: 'Rewrite the Creative North Star and keep gates G1–G20.' },
|
|
7
|
+
{ file: 'src/styles/global.css', role: 'Tune the color ramp and brand font before laying out pages.' },
|
|
8
|
+
{ file: '/design-quality plan', role: 'Lock hero axes, nav surface/layout, and band rhythm first.' },
|
|
9
|
+
] as const;
|
|
10
|
+
|
|
11
|
+
export function HomePage() {
|
|
12
|
+
return (
|
|
13
|
+
<div className="min-h-dvh bg-paper text-ink">
|
|
14
|
+
<header className="border-b border-rule">
|
|
15
|
+
<div className="mx-auto flex max-w-5xl items-center justify-between px-6 py-4">
|
|
16
|
+
<span className="text-sm font-bold tracking-tight">{SITE_NAME}</span>
|
|
17
|
+
<a
|
|
18
|
+
href="#next-steps"
|
|
19
|
+
className="inline-flex min-h-11 items-center gap-2 text-sm text-muted transition-colors hover:text-ink"
|
|
20
|
+
>
|
|
21
|
+
First steps
|
|
22
|
+
<ArrowRight className="size-4 text-accent" aria-hidden="true" />
|
|
23
|
+
</a>
|
|
24
|
+
</div>
|
|
25
|
+
</header>
|
|
26
|
+
|
|
27
|
+
<section className="mx-auto max-w-5xl px-6 py-16 md:py-24">
|
|
28
|
+
<div className="max-w-2xl">
|
|
29
|
+
<h1 className="text-balance text-3xl font-bold sm:text-5xl">{SITE_NAME}</h1>
|
|
30
|
+
<p className="mt-5 max-w-[60ch] text-pretty text-base text-muted sm:text-lg">{ONE_SENTENCE}</p>
|
|
31
|
+
<div className="mt-8 flex flex-wrap items-center gap-4">
|
|
32
|
+
<a
|
|
33
|
+
href="#next-steps"
|
|
34
|
+
className="inline-flex min-h-11 items-center gap-2 bg-accent px-5 py-2.5 text-sm font-medium text-on-accent transition-opacity hover:opacity-90"
|
|
35
|
+
>
|
|
36
|
+
Read the setup ledger
|
|
37
|
+
<ArrowRight className="size-4" aria-hidden="true" />
|
|
38
|
+
</a>
|
|
39
|
+
<code className="border border-rule bg-surface px-3 py-2 text-xs text-ink">npm run verify</code>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</section>
|
|
43
|
+
|
|
44
|
+
<section id="next-steps" className="border-t border-rule bg-surface">
|
|
45
|
+
<div className="mx-auto max-w-5xl px-6 py-14">
|
|
46
|
+
<h2 className="text-balance text-xl font-bold">Before you build the first screen</h2>
|
|
47
|
+
<p className="mt-2 max-w-[60ch] text-pretty text-sm text-muted">
|
|
48
|
+
Replace this starter page once your brief is in place. Every file below is read automatically by
|
|
49
|
+
coding agents.
|
|
50
|
+
</p>
|
|
51
|
+
<ol className="mt-8 divide-y divide-rule border-y border-rule">
|
|
52
|
+
{CHECKLIST.map((item, index) => (
|
|
53
|
+
<li key={item.file} className="grid gap-2 py-4 sm:grid-cols-[3rem_14rem_1fr] sm:items-baseline">
|
|
54
|
+
<span className="text-xs tabular-nums text-muted">0{index + 1}</span>
|
|
55
|
+
<code className="text-sm font-medium text-ink">{item.file}</code>
|
|
56
|
+
<span className="text-sm text-muted">{item.role}</span>
|
|
57
|
+
</li>
|
|
58
|
+
))}
|
|
59
|
+
</ol>
|
|
60
|
+
</div>
|
|
61
|
+
</section>
|
|
62
|
+
|
|
63
|
+
<footer className="border-t border-rule bg-paper">
|
|
64
|
+
<div className="mx-auto flex max-w-5xl flex-col gap-2 px-6 py-8 text-xs text-muted sm:flex-row sm:items-center sm:justify-between">
|
|
65
|
+
<span>{SITE_NAME}</span>
|
|
66
|
+
<span>React 19 · Vite · Tailwind 4 · design.md G1–G20</span>
|
|
67
|
+
</div>
|
|
68
|
+
</footer>
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Link } from 'react-router-dom';
|
|
2
|
+
|
|
3
|
+
export function NotFoundPage() {
|
|
4
|
+
return (
|
|
5
|
+
<div className="flex min-h-dvh items-center justify-center bg-paper p-6 text-ink">
|
|
6
|
+
<div className="max-w-md border border-rule bg-surface p-8">
|
|
7
|
+
<p className="text-xs tabular-nums text-muted">404</p>
|
|
8
|
+
<h1 className="mt-2 text-2xl font-bold">Page not found</h1>
|
|
9
|
+
<p className="mt-2 text-sm text-muted">
|
|
10
|
+
The route you opened does not exist in this app. Return to the home screen to continue.
|
|
11
|
+
</p>
|
|
12
|
+
<Link
|
|
13
|
+
to="/"
|
|
14
|
+
className="mt-6 inline-flex min-h-11 items-center bg-accent px-4 py-2 text-sm font-medium text-on-accent transition-opacity hover:opacity-90"
|
|
15
|
+
>
|
|
16
|
+
Go home
|
|
17
|
+
</Link>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
@import '@fontsource/jetbrains-mono/400.css';
|
|
3
|
+
@import '@fontsource/jetbrains-mono/500.css';
|
|
4
|
+
@import '@fontsource/jetbrains-mono/700.css';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
Brand tokens: rewrite for this app (see design.md).
|
|
8
|
+
Dominant accent: {{ACCENT_NAME}}. Add sibling accents only if they harmonize (design.md G8).
|
|
9
|
+
*/
|
|
10
|
+
@custom-variant dark {
|
|
11
|
+
@media (prefers-color-scheme: dark) {
|
|
12
|
+
&:where([data-theme='auto'] *) {
|
|
13
|
+
@slot;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@theme {
|
|
19
|
+
--font-sans: 'JetBrains Mono', ui-monospace, monospace;
|
|
20
|
+
--font-mono: 'JetBrains Mono', ui-monospace, monospace;
|
|
21
|
+
|
|
22
|
+
--color-paper: #f4f1ea;
|
|
23
|
+
--color-surface: #ebe7dd;
|
|
24
|
+
--color-ink: #1a1a18;
|
|
25
|
+
--color-muted: #5c5a52;
|
|
26
|
+
--color-rule: #d4cfc3;
|
|
27
|
+
--color-accent: {{ACCENT}};
|
|
28
|
+
--color-accent-soft: {{ACCENT_SOFT}};
|
|
29
|
+
--color-on-accent: {{ACCENT_ON}};
|
|
30
|
+
--color-scrim: #12110f;
|
|
31
|
+
--color-on-media: #faf9f6;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@layer base {
|
|
35
|
+
html {
|
|
36
|
+
color-scheme: light;
|
|
37
|
+
background: var(--color-paper);
|
|
38
|
+
color: var(--color-ink);
|
|
39
|
+
font-family: var(--font-sans);
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
line-height: 1.55;
|
|
42
|
+
-webkit-font-smoothing: antialiased;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:root[data-theme='auto'] {
|
|
46
|
+
color-scheme: light dark;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (prefers-color-scheme: dark) {
|
|
50
|
+
:root[data-theme='auto'] {
|
|
51
|
+
--color-paper: #171614;
|
|
52
|
+
--color-surface: #21201d;
|
|
53
|
+
--color-ink: #ecebe6;
|
|
54
|
+
--color-muted: #a3a197;
|
|
55
|
+
--color-rule: #34322d;
|
|
56
|
+
--color-accent: {{ACCENT_DARK}};
|
|
57
|
+
--color-accent-soft: {{ACCENT_DARK_SOFT}};
|
|
58
|
+
--color-on-accent: #12110f;
|
|
59
|
+
--color-scrim: #0b0a09;
|
|
60
|
+
--color-on-media: #faf9f6;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
body {
|
|
65
|
+
margin: 0;
|
|
66
|
+
min-height: 100dvh;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
::selection {
|
|
70
|
+
background: var(--color-accent-soft);
|
|
71
|
+
color: var(--color-ink);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:focus-visible {
|
|
75
|
+
outline: 2px solid var(--color-accent);
|
|
76
|
+
outline-offset: 2px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
h1,
|
|
80
|
+
h2,
|
|
81
|
+
h3 {
|
|
82
|
+
letter-spacing: -0.02em;
|
|
83
|
+
line-height: 1.15;
|
|
84
|
+
font-weight: 700;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media (prefers-reduced-motion: reduce) {
|
|
88
|
+
*,
|
|
89
|
+
*::before,
|
|
90
|
+
*::after {
|
|
91
|
+
animation-duration: 0.01ms !important;
|
|
92
|
+
animation-iteration-count: 1 !important;
|
|
93
|
+
transition-duration: 0.01ms !important;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom/vitest';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://t3.codes/schema/t3.json",
|
|
3
|
+
"iconPath": "public/favicon.svg",
|
|
4
|
+
"scripts": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Install",
|
|
7
|
+
"command": "npm install",
|
|
8
|
+
"icon": "configure",
|
|
9
|
+
"runOnWorktreeCreate": true,
|
|
10
|
+
"async": false
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Dev",
|
|
14
|
+
"command": "npm run dev",
|
|
15
|
+
"icon": "play",
|
|
16
|
+
"previewUrl": "http://{{PROJECT_NAME}}.localhost:{{DEV_PORT}}/",
|
|
17
|
+
"autoOpenPreview": true
|
|
18
|
+
},
|
|
19
|
+
{ "name": "Build", "command": "npm run build", "icon": "build" },
|
|
20
|
+
{ "name": "Preview", "command": "npm run build && npm run preview", "icon": "play" }
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"noUnusedLocals": true,
|
|
16
16
|
"noUnusedParameters": true,
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
|
-
"noUncheckedSideEffectImports": true,
|
|
19
18
|
"baseUrl": ".",
|
|
20
19
|
"paths": {
|
|
21
|
-
"@/*": ["
|
|
22
|
-
}
|
|
20
|
+
"@/*": ["src/*"]
|
|
21
|
+
},
|
|
22
|
+
"types": ["vite/client", "vitest/globals"]
|
|
23
23
|
},
|
|
24
24
|
"include": ["src"]
|
|
25
25
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { defineConfig } from 'vitest/config';
|
|
3
|
+
import react from '@vitejs/plugin-react';
|
|
4
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
5
|
+
import { devPort } from './site.config.mjs';
|
|
6
|
+
|
|
7
|
+
const port = Number(process.env.PORT || devPort);
|
|
8
|
+
|
|
9
|
+
export default defineConfig({
|
|
10
|
+
plugins: [react(), tailwindcss()],
|
|
11
|
+
resolve: {
|
|
12
|
+
alias: {
|
|
13
|
+
'@': path.resolve(__dirname, 'src'),
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
server: {
|
|
17
|
+
host: true,
|
|
18
|
+
port,
|
|
19
|
+
strictPort: true,
|
|
20
|
+
},
|
|
21
|
+
test: {
|
|
22
|
+
environment: 'jsdom',
|
|
23
|
+
setupFiles: ['./src/test-setup.ts'],
|
|
24
|
+
globals: true,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// PostToolUse hook (Write|Edit|MultiEdit): nudge off raw hex colors and raw Tailwind palette
|
|
3
|
+
// utilities in UI files (design.md G7). Non-blocking: emits additionalContext so the agent
|
|
4
|
+
// self-corrects without halting edits.
|
|
5
|
+
import fs from 'node:fs';
|
|
6
|
+
|
|
7
|
+
const RAW_PALETTE =
|
|
8
|
+
/\b(?:bg|text|border|ring|fill|stroke|from|via|to|outline|divide|ring-offset|shadow|caret|accent|decoration)-(?:white|black|(?:slate|gray|grey|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-\d{2,3})\b/;
|
|
9
|
+
const RAW_HEX = /(?:className|class|style)\s*=\s*[^>]*#[0-9a-fA-F]{3,8}\b/;
|
|
10
|
+
const ARB_COLOR = /\b(?:bg|text|border|fill|stroke|from|via|to)-\[(?:#[0-9a-fA-F]{3,8}|rgb|hsl|oklch)/;
|
|
11
|
+
const H_SCREEN = /\b(?:min-)?h-screen\b/;
|
|
12
|
+
|
|
13
|
+
let input = '';
|
|
14
|
+
try {
|
|
15
|
+
input = fs.readFileSync(0, 'utf8');
|
|
16
|
+
} catch {
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let data = {};
|
|
21
|
+
try {
|
|
22
|
+
data = JSON.parse(input || '{}');
|
|
23
|
+
} catch {
|
|
24
|
+
process.exit(0);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const ti = data.tool_input || {};
|
|
28
|
+
const file = ti.file_path || '';
|
|
29
|
+
|
|
30
|
+
// Only inspect UI component/page files — never global CSS token definitions or tests.
|
|
31
|
+
if (!/\.(?:tsx|jsx|astro)$/.test(file) || /\.(?:test|spec)\./.test(file)) {
|
|
32
|
+
process.exit(0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
let content = '';
|
|
36
|
+
if (typeof ti.content === 'string') content = ti.content;
|
|
37
|
+
else if (typeof ti.new_string === 'string') content = ti.new_string;
|
|
38
|
+
else if (Array.isArray(ti.edits)) content = ti.edits.map((e) => e?.new_string || '').join('\n');
|
|
39
|
+
|
|
40
|
+
if (!content) process.exit(0);
|
|
41
|
+
|
|
42
|
+
const findings = [];
|
|
43
|
+
for (const rawLine of content.split('\n')) {
|
|
44
|
+
const line = rawLine.trim();
|
|
45
|
+
if (!line || line.startsWith('//') || line.startsWith('*') || line.startsWith('/*')) continue;
|
|
46
|
+
if (RAW_PALETTE.test(line) || RAW_HEX.test(line) || ARB_COLOR.test(line)) {
|
|
47
|
+
findings.push(`raw color token/hex (G7): ${line.slice(0, 110)}`);
|
|
48
|
+
} else if (H_SCREEN.test(line)) {
|
|
49
|
+
findings.push(`use min-h-dvh / h-dvh instead of h-screen (G14): ${line.slice(0, 110)}`);
|
|
50
|
+
}
|
|
51
|
+
if (findings.length >= 5) break;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (findings.length) {
|
|
55
|
+
const msg =
|
|
56
|
+
`[design-lint] ${file}: design.md violations detected. Use semantic tokens from global CSS (bg-paper, bg-surface, text-ink, text-muted, border-rule, bg-accent, text-on-accent, bg-scrim, text-on-media) and dvh viewport units:\n` +
|
|
57
|
+
findings.map((f) => ` · ${f}`).join('\n');
|
|
58
|
+
process.stdout.write(
|
|
59
|
+
JSON.stringify({
|
|
60
|
+
hookSpecificOutput: {
|
|
61
|
+
hookEventName: 'PostToolUse',
|
|
62
|
+
additionalContext: msg,
|
|
63
|
+
},
|
|
64
|
+
}),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
process.exit(0);
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-quality
|
|
3
|
+
description: Plan art direction before building UI and run pixel-grounded design reviews against design.md (G1–G20). Use before laying out any page (/design-quality plan), before claiming UI done (/design-quality), and when reviewing layout, brand, contrast, or copy changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Design quality
|
|
7
|
+
|
|
8
|
+
Three ways to run this skill:
|
|
9
|
+
|
|
10
|
+
- **`/design-quality plan`** — Run **before** writing UI. Locks the Creative North Star, hero axes (`shape` × `field` × `media`), nav surface + layout, band rhythm, and immersive dial so layout follows design instead of defaulting to a generic template.
|
|
11
|
+
- **`/design-quality`** — Full audit of the rendered site/app against `design.md` (G1–G20).
|
|
12
|
+
- **`/design-quality <path>`** — Scoped audit of one route, page, or component.
|
|
13
|
+
|
|
14
|
+
Any coding agent (Claude Code, Codex, Cursor, Zed, T3 Code) can follow this file directly.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Mode A: `/design-quality plan` (before writing UI)
|
|
19
|
+
|
|
20
|
+
Generic AI UI happens when pages are laid out design-blind and styled afterwards. Lock direction **first** (G17):
|
|
21
|
+
|
|
22
|
+
1. Read `intent.md`, `design.md`, and the live tokens in the project's global CSS.
|
|
23
|
+
2. Read [references/composition-palette.md](references/composition-palette.md) to avoid default-menu bias (never default to `SPLIT` hero + `CLASSIC-SPREAD` nav + 3-up icon-card wall).
|
|
24
|
+
3. Propose a concise **Art-Direction Brief** (max 8 lines) and confirm with the human before building:
|
|
25
|
+
- **North star:** one sentence for the atmosphere (G14 / `design.md`).
|
|
26
|
+
- **Visitor + a-ha:** who arrives, what they need to do, and the single primary action.
|
|
27
|
+
- **Immersive dial:** `experiential` or `utilitarian` (G4).
|
|
28
|
+
- **Hero axes:** `shape` × `field` × `media` + the one **dominant object** (G2).
|
|
29
|
+
- **Nav:** `surface` × `layout` + exact link list (≤5 links + 1 utility + 1 CTA, G5).
|
|
30
|
+
- **Band rhythm:** ordered list of section backgrounds confirming no >2 identical bands in a row, at least one mid-page contrast moment, and final section ≠ footer band (G3).
|
|
31
|
+
- **Imagery plan:** real photos, real coded UI, or type-only (`media: none`) — never AI-generated UI screenshots (G4, G15).
|
|
32
|
+
- **Voice:** one line for copy register + declared language (G14, G15).
|
|
33
|
+
|
|
34
|
+
Do not write components until this brief is clear.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Mode B: `/design-quality` (review & visual QA)
|
|
39
|
+
|
|
40
|
+
### Role separation (G20)
|
|
41
|
+
|
|
42
|
+
The agent that built the UI **must not** self-approve `SHIP`. Prefer running this review in a **fresh read-only subagent** or a clean turn with fresh eyes. Never edit files during the critique pass — produce the verdict first, then apply bounded repairs in a separate step.
|
|
43
|
+
|
|
44
|
+
### Step 1: Mechanical gates first (G18)
|
|
45
|
+
|
|
46
|
+
Run the project's verify gate before inspecting pixels:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npm run verify
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
(Or `bun run verify` if the project uses Bun.) If formatting, typecheck, build, token-literal lint, or copy lint fails, fix mechanical errors first. Never waste visual review turns on a broken build.
|
|
53
|
+
|
|
54
|
+
### Step 2: Capture & inspect real pixels (G19)
|
|
55
|
+
|
|
56
|
+
Do **not** grade UI from source code alone, and do **not** claim you "looked at the screenshot" without recording concrete visual observations.
|
|
57
|
+
|
|
58
|
+
Open the running dev/preview server or capture screenshots for:
|
|
59
|
+
1. **Desktop** (`1440px` wide — above the fold + full page scroll)
|
|
60
|
+
2. **Mobile** (`390px` wide — above the fold + nav open/closed)
|
|
61
|
+
3. **Dark mode** (if `darkMode` is enabled — check both contrast and accent vibration)
|
|
62
|
+
|
|
63
|
+
If browser/preview tools are available (e.g. `preview_snapshot`, Playwright, headless Chrome), capture and inspect them directly. If no visual tool exists in the current environment, state explicitly that **G19 (Visual grounding) is UNVERIFIED** and ask the human to check the rendered page — never pretend it passed.
|
|
64
|
+
|
|
65
|
+
### Step 3: Critique against the visual rubric & G1–G20
|
|
66
|
+
|
|
67
|
+
Read [references/visual-critic.md](references/visual-critic.md) and walk the rendered pixels in strict priority order:
|
|
68
|
+
|
|
69
|
+
1. **Broken render (check FIRST):** crash, error boundary, blank fold (often caused by `opacity: 0` reveal traps), missing hero, broken images, or chrome-only shell. Any broken render is an automatic `high` failure.
|
|
70
|
+
2. **Contrast & media legibility (top failure mode):** trace every hero headline, subcopy, nav link, button, and badge against its **actual rendered backdrop**. Catch black-text-on-photo navs, surface-token washes bleaching hero photos (G9), and vibrating accents on dark surfaces (G8).
|
|
71
|
+
3. **Composition, rhythm & dial:** check G1–G6 — dominant object, nav wrapping/budget, band flatlining, last-section-colliding-with-footer, experiential vs utilitarian mismatch (e.g. SaaS icon-card wall on a hospitality site), thin blocks with bloated empty vertical padding, and cross-section harmony drift.
|
|
72
|
+
4. **Tokens, type, elevation & motion:** check G7–G13 — raw colors/hex outside tokens, accent overuse (>10% wallpaper), generic fonts, Title Case leaks, heavy resting shadows (>0.05 alpha), anti-slop violations.
|
|
73
|
+
5. **A11y, mobile & share surface:** check G14–G16 — 44px tap targets, focus rings, `<html lang>` + real diacritics, text-in-image defects, lazy/eager image loading, share card / meta.
|
|
74
|
+
|
|
75
|
+
### Step 4: Copy & swap-test sweep
|
|
76
|
+
|
|
77
|
+
Read [references/copy-tells.md](references/copy-tells.md). Scan rendered headlines, subcopy, buttons, empty states, and errors:
|
|
78
|
+
- Every line passes the **swap test** (putting a competitor's name in makes it false).
|
|
79
|
+
- Zero AI tells (stock SaaS words, "Not just X, it's Y", triads, fragment drumbeats, empty "Get started / Learn more" CTAs, em-dashes for drama, Title Case).
|
|
80
|
+
|
|
81
|
+
### Step 5: Emit verdict & bounded repair loop (G20)
|
|
82
|
+
|
|
83
|
+
- **Verdict is `SHIP`** only when **zero `high` findings** remain and G19 is visually verified.
|
|
84
|
+
- **Verdict is `REPAIR`** if any `high` finding exists.
|
|
85
|
+
- **Cap findings at ≤3 highest-impact issues per area** — drop nitpicks so the repair pass stays focused.
|
|
86
|
+
- Every finding must quote **concrete observed evidence** (what you actually saw in the pixels/DOM/CSS) and name the exact fix + target file.
|
|
87
|
+
- **Cap repair loops at 3 rounds** (`verify → capture → critique → fix`). If `high` issues still remain after round 3, stop and escalate the trade-off to the human.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Report format
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
## Design quality: <site or path>
|
|
95
|
+
|
|
96
|
+
**Verdict:** SHIP | REPAIR | BLOCKED (G19 unverified)
|
|
97
|
+
**Viewports inspected:** 1440px desktop, 390px mobile[, dark mode]
|
|
98
|
+
**Mechanical gate:** `npm run verify` PASS
|
|
99
|
+
|
|
100
|
+
### Pixel observations (G19)
|
|
101
|
+
- **Desktop fold:** <what is visibly rendered — brand, headline, dominant object, contrast>
|
|
102
|
+
- **Mobile fold:** <nav state, primary action reach, spacing/overflow>
|
|
103
|
+
- **Band rhythm:** <surface sequence from hero to footer>
|
|
104
|
+
|
|
105
|
+
### Gate summary (G1–G20)
|
|
106
|
+
- Passing: G1, G2, …
|
|
107
|
+
- Failing / Warn:
|
|
108
|
+
- **G9 (high):** <concrete observed defect> → <exact fix> (`path/to/file`)
|
|
109
|
+
|
|
110
|
+
### Fix order (highest impact first, max 3 per area)
|
|
111
|
+
1. [high · contrast] …
|
|
112
|
+
2. [high · band-rhythm] …
|
|
113
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Composition palette
|
|
2
|
+
|
|
3
|
+
Use this reference during `/design-quality plan` (before writing components) so every project gets a **structural** choice fit to its visitor — instead of falling into the model's default prior (centered-or-split hero + generic top bar + 3-up icon cards).
|
|
4
|
+
|
|
5
|
+
Naming a pattern is not specifying it: write the concrete **structure** (what sits where, what grounds it, what proves the claim) into your brief.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Hero: three orthogonal decisions (`shape` × `field` × `media`)
|
|
10
|
+
|
|
11
|
+
Decide all three independently. A photograph is **not** obligatory — `media: none` on a strong typographic or brand-flood fold is a first-class answer.
|
|
12
|
+
|
|
13
|
+
### Axis A · `shape` (how the fold divides the plane)
|
|
14
|
+
Avoid defaulting to `SPLIT` or `FULL-BLEED` unless the brief genuinely earns them; explore stronger structures first:
|
|
15
|
+
|
|
16
|
+
| Shape | Structural definition | Best for |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| **EDITORIAL-STAGE** | Generous display headline + short lede at top; full-width dominant object (coded product surface, wide architectural/place photo, or interactive tool) anchored below as the stage | Dev tools, SaaS, editorial products, calculators |
|
|
19
|
+
| **ASYMMETRIC-RAIL** | Narrow left rail (brand statement, proof cue, primary CTA) beside a wide 7–8 col dominant canvas on the right | Dashboards, interactive utilities, portfolios |
|
|
20
|
+
| **BOXED-CANVAS** | Crisp inset frame with hairline border sitting on a contrasting paper/surface ground, framing one interactive control or specimen | Pricing/quote tools, interactive widgets, manifestos |
|
|
21
|
+
| **TRIPTYCH / SPECIMEN** | Display claim above a 3-panel visual or live-data proof strip with uneven deliberate proportions (e.g. 2:1:1) | Hospitality, retail collections, studio showcases |
|
|
22
|
+
| **TYPE-MONOLITH** | Oversized display typography carries the entire fold with hairline metadata rules and one crisp CTA; zero decorative media | Manifestos, agencies, open-source tools, essays |
|
|
23
|
+
| **COMMAND-DOCK** | Headline + working primary input/booking/search bar as the literal hero centerpiece, with real live fields (never a fake CTA row) | Local services, booking, search, directories |
|
|
24
|
+
| **SPLIT** *(use deliberately)* | Two-column solid surface panel beside full-strength media or coded UI (never faded/washed into each other) | Clear offer + single concrete subject photo |
|
|
25
|
+
| **FULL-BLEED** *(use deliberately)* | Edge-to-edge full-strength photography with dedicated dark `scrim` + `text-on-media` anchored to one calm corner/edge | Place-led hospitality, restaurants, travel, events |
|
|
26
|
+
|
|
27
|
+
### Axis B · `field` (what the fold sits on)
|
|
28
|
+
- **`paper`**: default page ground (clean, airy, content-forward)
|
|
29
|
+
- **`surface`**: subtle tonal step (warm/cool neutral chrome)
|
|
30
|
+
- **`inverse`**: deep ink ground with high-contrast light type (dramatic opening; pair with a `paper` section next so rhythm pops)
|
|
31
|
+
- **`accent-flood`**: deliberate full brand-color fold with `text-on-accent` (best paired with `media: none` and crisp type; keep the rest of the page strictly neutral to respect the signal budget)
|
|
32
|
+
|
|
33
|
+
### Axis C · `media` (how the visual object is treated)
|
|
34
|
+
- **`coded-ui`**: real interactive or data-backed HTML/CSS/React component built with the project's own tokens (mandatory for SaaS/dev tools — never AI-generated UI screenshots)
|
|
35
|
+
- **`photo-full`**: full-strength subject photography (real place, crew, craft, plate, product)
|
|
36
|
+
- **`cutout / specimen`**: isolated object or crisp diagram on a clean tonal field
|
|
37
|
+
- **`none`**: type + hairlines + numbers only (zero filler media)
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 2. Navigation: two separate decisions (`surface` × `layout`)
|
|
42
|
+
|
|
43
|
+
Never inherit a generic bar by reflex. Pick **surface** (legibility contract) and **layout** (spatial arrangement) separately:
|
|
44
|
+
|
|
45
|
+
### Nav `surface` (closed safety contract)
|
|
46
|
+
- **`transparent-scrim`**: overlays a full-bleed hero with a deterministic top-down `from-scrim/70 to-transparent` header gradient + `text-on-media`; transitions to solid `paper` + `ink` on scroll.
|
|
47
|
+
- **`paper-hairline`**: matches page ground with a subtle bottom `border-rule` hairline.
|
|
48
|
+
- **`panel-integrated`**: lives cleanly inside the hero's solid surface/inverse panel — zero detached bar seam.
|
|
49
|
+
- **`floating-pill`**: compact centered/inset bar with subtle border + whisper elevation (`≤0.05` alpha).
|
|
50
|
+
- **`solid-band`**: distinct `surface` or `inverse` header band separating chrome from body.
|
|
51
|
+
|
|
52
|
+
### Nav `layout` (arrangement)
|
|
53
|
+
- **Utility-led**: brand left, compact links center, operational utility (phone/hours/status/search) + CTA right.
|
|
54
|
+
- **Minimal / editorial**: brand left, 2–4 links + quiet text action right (no heavy CTA button competing with hero CTA).
|
|
55
|
+
- **Split-center**: links split left/right around centered wordmark (good for hospitality, editorial, retail).
|
|
56
|
+
- **App shell**: left sidebar rail or compact top toolbar with active route indicator (for web apps/dashboards).
|
|
57
|
+
- *(`classic-spread` logo-left / links-right / button-right is allowed only when it genuinely fits — never as an unexamined default.)*
|
|
58
|
+
|
|
59
|
+
**Hard nav budget:** ≤5 primary links + 1 utility + 1 CTA. Single line, zero wrapping. Mobile puts brand + primary action first.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 3. Section rhythm & immersive dial
|
|
64
|
+
|
|
65
|
+
Plan the whole page's vertical rhythm **before** writing sections:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Example rhythm (6 bands, zero flatlines, zero footer collision):
|
|
69
|
+
1. Hero → inverse (or full-bleed photo with scrim)
|
|
70
|
+
2. Proof / Work → paper
|
|
71
|
+
3. Deep-dive → surface (subtle tonal step)
|
|
72
|
+
4. Contrast → full-bleed image band OR inverse statement (mid-page break!)
|
|
73
|
+
5. FAQ / Specs → paper (compact density if short)
|
|
74
|
+
6. Pre-footer → surface (distinct from footer!)
|
|
75
|
+
7. Footer → inverse (multi-column sitemap + real contact)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Section shape variety (never repeat the same layout twice in a row)
|
|
79
|
+
- **Hairline ledger / index list**: 2-column or full-width rows separated by `border-rule` (great for services, specs, amenities, pricing, menus).
|
|
80
|
+
- **Editorial split**: asymmetric 5:7 or 4:8 ratio — subject visual + crisp narrative + concrete proof number.
|
|
81
|
+
- **Captioned specimen strip**: real photography or live UI panels with tight editorial captions (no card chrome required).
|
|
82
|
+
- **Interactive workbench / calculator**: real working control on a clean `surface` band.
|
|
83
|
+
- **Single icon-card grid** *(utilitarian/SaaS only, max 1 per page; banned on experiential sites)*.
|
|
84
|
+
- **Compact utility strip** (`py-10`–`py-12`, never full-screen): hours, location, trust credentials, press/partners.
|
|
85
|
+
|
|
86
|
+
### One signature moment
|
|
87
|
+
Every page plans **one** memorable, domain-true moment that breaks the polite rhythm (an interactive calculator, a bold full-bleed proof frame, a real live data ledger, or a tight typographic statement) — never five competing gimmicks.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Copy tells & the swap test
|
|
2
|
+
|
|
3
|
+
Every user-facing line must pass the **swap test**: replace the project's name with a competitor's name. If the sentence still reads true, it is filler — rewrite it around a real fact (a number, place, date, price, mechanism, or specific constraint).
|
|
4
|
+
|
|
5
|
+
A word used literally is fine (*"oak sleepers"*, *"the train from Cluj to Vienna"*). Hunt the tells below whenever a line sounds like any generic AI site could publish it.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Tell table
|
|
10
|
+
|
|
11
|
+
| Tell | Looks like | Fix |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| **Generic promise** | "Plan your future with confidence", "Build better software faster" | State the concrete outcome with its number or mechanism |
|
|
14
|
+
| **Stock AI/SaaS word** | delve, elevate, seamless, unlock, empower, leverage, supercharge, disrupt, intuitive, innovative, world-class, cutting-edge, best-in-class, synergy, tapestry, testament, nestled, curated, game-changing | Use the plain verb, or replace with the fact it hides |
|
|
15
|
+
| **Contrast frame** | "Not just X, it's Y", "More than just…", "By developers, for developers", "Where X meets Y" | Just say Y |
|
|
16
|
+
| **Audience laundry list** | "Whether you're a beginner or a pro", "For teams of all sizes" | Address the one specific reader in `intent.md` |
|
|
17
|
+
| **Scene-setting** | "In today's fast-paced world", "Imagine a world where", "Navigating X can be overwhelming" | Delete the windup; open on the claim |
|
|
18
|
+
| **Empty triad** | "Fast, reliable, and affordable", "Learn, connect, and grow" | Keep the one claim that matters most and prove it |
|
|
19
|
+
| **Fragment drumbeat** | "No jargon. No hidden fees. No surprises.", "Ship faster. Build smarter." | One clear sentence carrying real proof |
|
|
20
|
+
| **About-us filler** | "Welcome to", "We're passionate about", "Our mission is", "What started as a dream" | What you build/do, for whom, and since when |
|
|
21
|
+
| **Empty CTA** | "Get started", "Learn more", "Discover", "Ready to…?" | Name the action and destination: *"Copy install command"*, *"Book a table for Friday"* |
|
|
22
|
+
| **Throat-clearing** | "Please note", "It's worth noting", "That said" | Start directly with the point |
|
|
23
|
+
| **Intensifier** | truly, incredibly, absolutely, simply, effortlessly | Cut it, or prove the claim with evidence |
|
|
24
|
+
| **Chirpy error / empty** | "Oops, something went wrong!", "Looks like nothing is here yet!" | What happened + exact next step |
|
|
25
|
+
| **Polite void** | "Thank you for reaching out. Our team will get back to you soon." | Who replies and by when |
|
|
26
|
+
| **Title Case** | "Where Every Meal Tells A Story", "Explore Our Services" | Sentence case everywhere except proper nouns |
|
|
27
|
+
| **Punctuation drama** | Exclamation marks in marketing copy, em-dashes used for dramatic rhythm, emoji as bullet points | Let concrete nouns and verbs carry the weight |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Before → after
|
|
32
|
+
|
|
33
|
+
| Before | After |
|
|
34
|
+
|---|---|
|
|
35
|
+
| *Where Every Meal Tells a Story* | Wood-fired cooking on Stokes Croft. The menu changes every Tuesday. |
|
|
36
|
+
| *Transform Your Workflow With AI-Powered Tools* | Scaffold an Astro 7 or React 19 project with G1–G20 design gates in one command. |
|
|
37
|
+
| *Get Started for Free* | Run `npx create-claudecraft` |
|
|
38
|
+
| *Learn more* | Read the 20 design gates |
|
|
39
|
+
| *Oops! Something went wrong. Please try again.* | Couldn't save your changes. Check your connection and try again. |
|
|
40
|
+
| *No items yet!* | No projects yet. Create your first project to generate its tokens and gates. |
|
|
41
|
+
| *Thank you for reaching out. We'll be in touch!* | Received. Radu replies within one business day. |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Language check (G14)
|
|
46
|
+
|
|
47
|
+
- Match the declared `<html lang>` on **every** visible string: nav, buttons, form labels, placeholders, validation errors, `alt` text, and `<title>`/`<meta description>`.
|
|
48
|
+
- Keep proper diacritics and local conventions (date/currency/address formats, natural formality register).
|
|
49
|
+
- Never leave English chrome (`"Home"`, `"Submit"`, `"Loading…"`, `"404 Not Found"`) leaking into a non-English product.
|