@behavioral-agentic-design-system/core 0.8.4 → 0.9.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/package.json +15 -1
- package/scripts/build-fonts.cjs +26 -3
- package/scripts/build-tokens.cjs +68 -6
- package/src/api/brand-fonts.ts +20 -10
- package/src/api/layers/file.ts +39 -4
- package/src/app/preview/components/page.tsx +718 -1
- package/src/app/shell.tsx +61 -15
- package/src/components/brand-mark.tsx +1 -1
- package/src/components/docs-tab.tsx +497 -0
- package/src/components/home-tab.tsx +341 -2043
- package/src/components/layers-tab.tsx +3 -91
- package/src/components/markdown-preview.tsx +226 -0
- package/src/components/motion/chart-reveal.tsx +164 -0
- package/src/components/motion/reveal.tsx +156 -0
- package/src/components/ui/accordion.tsx +117 -0
- package/src/components/ui/alert-dialog.tsx +162 -0
- package/src/components/ui/carousel.tsx +357 -0
- package/src/components/ui/context-menu.tsx +258 -0
- package/src/components/ui/file-upload.tsx +278 -0
- package/src/components/ui/index.ts +10 -0
- package/src/components/ui/navigation-menu.tsx +154 -0
- package/src/components/ui/number-input.tsx +229 -0
- package/src/components/ui/pagination.tsx +143 -0
- package/src/components/ui/pin-input.tsx +257 -0
- package/src/components/ui/sheet.tsx +10 -4
- package/src/components/ui/spinner.tsx +70 -0
- package/src/components/ui/stepper.tsx +272 -0
- package/src/data/docs-index.ts +163 -0
- package/src/hooks/use-reduced-motion.ts +13 -0
- package/src/styles.css +56 -6
- package/src/tokens.json +5 -0
|
@@ -2,39 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import {
|
|
5
|
+
ArrowRight,
|
|
6
|
+
BookOpen,
|
|
7
|
+
Boxes,
|
|
8
|
+
GitBranch,
|
|
9
|
+
Layers,
|
|
10
|
+
Palette,
|
|
5
11
|
Sparkles,
|
|
6
12
|
Package,
|
|
7
|
-
Palette,
|
|
8
|
-
Layers,
|
|
9
|
-
Accessibility,
|
|
10
|
-
ShieldCheck,
|
|
11
|
-
Heart,
|
|
12
|
-
BookOpen,
|
|
13
|
-
Code2,
|
|
14
|
-
Box,
|
|
15
|
-
ArrowUpRight,
|
|
16
|
-
CheckCircle2,
|
|
17
|
-
Circle,
|
|
18
13
|
Type,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
FileText,
|
|
14
|
+
PencilRuler,
|
|
15
|
+
Image as ImageIcon,
|
|
22
16
|
Eye,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Zap,
|
|
26
|
-
Wand2,
|
|
27
|
-
ClipboardCopy,
|
|
17
|
+
ShieldCheck,
|
|
18
|
+
Copy,
|
|
28
19
|
Check,
|
|
29
|
-
FolderGit2,
|
|
30
|
-
Globe,
|
|
31
|
-
Database,
|
|
32
|
-
Combine,
|
|
33
|
-
GitCompare,
|
|
34
|
-
KeyRound,
|
|
35
|
-
ChevronRight,
|
|
36
|
-
MessageSquare,
|
|
37
|
-
Briefcase,
|
|
38
20
|
} from "lucide-react";
|
|
39
21
|
import { brand } from "@/brand.config";
|
|
40
22
|
import {
|
|
@@ -47,731 +29,163 @@ import {
|
|
|
47
29
|
import { Badge } from "@behavioral-agentic-design-system/core/components/ui/badge";
|
|
48
30
|
import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
|
|
49
31
|
import { Separator } from "@behavioral-agentic-design-system/core/components/ui/separator";
|
|
50
|
-
import {
|
|
51
|
-
import { BrandMark } from "@behavioral-agentic-design-system/core/components/brand-mark";
|
|
32
|
+
import { BadsUpdateBanner } from "@behavioral-agentic-design-system/core/components/bads-update-banner";
|
|
52
33
|
import registry from "@/layer-5-component-registry/component-registry.json";
|
|
53
34
|
import tokens from "@/packages/core/src/tokens.json";
|
|
54
|
-
import
|
|
55
|
-
import { BadsUpdateBanner } from "@behavioral-agentic-design-system/core/components/bads-update-banner";
|
|
56
|
-
import { useShellNav } from "@behavioral-agentic-design-system/core/app/shell";
|
|
35
|
+
import { DOCS_INDEX, DOCS_TOTAL } from "@behavioral-agentic-design-system/core/data/docs-index";
|
|
57
36
|
|
|
58
37
|
type HomeTabProps = {
|
|
38
|
+
onBrowseDocs?: () => void;
|
|
59
39
|
onBrowseComponents?: () => void;
|
|
60
40
|
};
|
|
61
41
|
|
|
62
|
-
|
|
63
|
-
usage?: string;
|
|
64
|
-
props?: { variant?: string[] | string };
|
|
65
|
-
variants?: string[];
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const registryMap = registry as Record<string, RegistryEntry>;
|
|
69
|
-
const componentNames = Object.keys(registryMap).sort();
|
|
70
|
-
|
|
42
|
+
const componentCount = Object.keys(registry as Record<string, unknown>).length;
|
|
71
43
|
const semanticTokenCount = Object.keys(
|
|
72
44
|
(tokens as { theme?: { light?: Record<string, unknown> } }).theme?.light ?? {}
|
|
73
45
|
).length;
|
|
74
|
-
|
|
75
46
|
const primitiveTokenCount = Object.values(
|
|
76
47
|
(tokens as { color?: { primitive?: Record<string, Record<string, unknown>> } }).color
|
|
77
48
|
?.primitive ?? {}
|
|
78
49
|
).reduce((sum, group) => sum + Object.keys(group).length, 0);
|
|
50
|
+
const LAYER_COUNT = 10;
|
|
79
51
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"Company orientation (intro.md, strategic-opportunity.md) — what the product does and why this system exists",
|
|
91
|
-
"Brand framework — position, story, and platform (audience, vision, promise, values, 4 personality axes)",
|
|
92
|
-
"Headline + microcopy banks with tone shifts by surface type",
|
|
93
|
-
"Three-tier personas (Primary / Secondary / Other) with goals, pain points, devices, voice modifiers, and a 5-dimension Accessibility profile (Vision / Hearing / Motor / Cognitive / Situational)",
|
|
94
|
-
"Two reserved stress-test personas on every fork: screen-reader user + keyboard-only user — WCAG pressure-tested at the screen layer, not only at the token layer",
|
|
95
|
-
"research/ sub-discipline — 5 templates (user, competitive, market, accessibility, brand-voice) that derive personas, voice rules, and references from real evidence instead of intuition",
|
|
96
|
-
"Persona content pool (content/personas/<slug>.json) — real names, jargon, edge cases; replaces Lorem ipsum across every prototype and story",
|
|
97
|
-
"Persona pressure-test prompt walks any screen first-person and ranks breaks BLOCKER → LOW",
|
|
98
|
-
],
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
n: "2",
|
|
102
|
-
name: "Ethics & Responsibility",
|
|
103
|
-
note: "decision trees, anti-patterns, AI ethics, futures thinking",
|
|
104
|
-
status: "shipped",
|
|
105
|
-
details: [
|
|
106
|
-
"Builds user trust and protects the brand from legal + reputational risk — responsible decisions compound into loyal users",
|
|
107
|
-
"5 ethical principles (Transparency, Equity, Privacy-First, Consent-Driven, Anti-Dark-Patterns)",
|
|
108
|
-
"9 anti-patterns we never ship",
|
|
109
|
-
"AI labeling + algorithmic transparency rules",
|
|
110
|
-
"Pre-commit ethics linter",
|
|
111
|
-
"Futures-thinking framework with 5 lenses (Scale, Time, Adversary, Behavior, Drift) — surfaces 2nd / 3rd order harms",
|
|
112
|
-
"prompts/futures-check.md as a standalone run; independent-critique includes a mandatory futures pass",
|
|
113
|
-
],
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
n: "3",
|
|
117
|
-
name: "Primitive Tokens",
|
|
118
|
-
note: "raw colors, type, spacing, motion, icons",
|
|
119
|
-
status: "shipped",
|
|
120
|
-
details: [
|
|
121
|
-
"The visual primitive tier — raw colors, type sizes, spacing values, motion durations, icon strokes. Everything Layer 4 (Semantic Tokens) aliases sits here as a literal value",
|
|
122
|
-
"Color primitive palette in oklch (with sRGB hex fallback)",
|
|
123
|
-
"Type scale (xs through 8xl) with a 14px floor enforced by a11y:lint",
|
|
124
|
-
"Spacing scale and radius primitives",
|
|
125
|
-
"Motion tokens with prefers-reduced-motion respected at the base CSS layer",
|
|
126
|
-
"Icon system at strokeWidth 1.5 (canonical for every lucide icon in the system)",
|
|
127
|
-
"WCAG 2.2 AAA baseline baked in — 7:1 normal text, 4.5:1 large text, 3:1 non-text",
|
|
128
|
-
],
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
n: "4",
|
|
132
|
-
name: "Semantic Tokens",
|
|
133
|
-
note: "light + dark, perceptually tuned",
|
|
134
|
-
status: "shipped",
|
|
135
|
-
details: [
|
|
136
|
-
"Separates design intent from component code — change a brand color once and it ripples everywhere, enabling fast visual iterations",
|
|
137
|
-
"Full light + dark theme pairs",
|
|
138
|
-
"Generated CSS variables via pnpm build:tokens",
|
|
139
|
-
"Perceptually tuned contrast ratios",
|
|
140
|
-
"Tokens.json as single source of truth",
|
|
141
|
-
],
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
n: "5",
|
|
145
|
-
name: "Component Registry",
|
|
146
|
-
note: `${componentCount} components, full a11y contracts`,
|
|
147
|
-
status: "shipped",
|
|
148
|
-
details: [
|
|
149
|
-
"Reduces development time by providing pre-built, tested components — teams ship faster when they don't reinvent the button",
|
|
150
|
-
`${componentCount} components with full props + variant docs`,
|
|
151
|
-
"Per-component a11y contracts (role, keyboard, focus, target size)",
|
|
152
|
-
"Anti-patterns listed per component",
|
|
153
|
-
"component-registry.json as machine-readable manifest",
|
|
154
|
-
],
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
n: "6",
|
|
158
|
-
name: "Patterns & Rules",
|
|
159
|
-
note: "decision trees for component picks",
|
|
160
|
-
status: "shipped",
|
|
161
|
-
details: [
|
|
162
|
-
"Provides decision trees for common UX choices — ensures consistent patterns that users recognize across surfaces",
|
|
163
|
-
"Decision trees for component selection",
|
|
164
|
-
"Pattern library for common UX flows",
|
|
165
|
-
],
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
n: "7",
|
|
169
|
-
name: "Agent Interface",
|
|
170
|
-
note: "rules for Cursor, Claude Code, v0",
|
|
171
|
-
status: "shipped",
|
|
172
|
-
details: [
|
|
173
|
-
"Lets AI tools (Claude Code, Cursor, v0) generate code that respects the system — designs ship faster with fewer manual tweaks",
|
|
174
|
-
"CLAUDE.md with full agent instructions",
|
|
175
|
-
".cursorrules for Cursor",
|
|
176
|
-
"layer-7-agent-interface/system-prompt.md and v0-system.md for v0 sessions",
|
|
177
|
-
"AGENTS.md with loading precedence + escalation rules",
|
|
178
|
-
"Every rule is classified by intent (constraint / guideline / framing / workflow) so the AI gets each one in the form that makes it actually follow it",
|
|
179
|
-
"Procedural workflows ship as invocable Skills (explore, critique, futures-check, persona-test, visual-verify) the AI runs step by step",
|
|
180
|
-
],
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
n: "8",
|
|
184
|
-
name: "Documentation",
|
|
185
|
-
note: "Storybook, preview app, capabilities index, exemplars",
|
|
186
|
-
status: "shipped",
|
|
187
|
-
details: [
|
|
188
|
-
"Makes every component discoverable and learnable — designers and engineers self-serve instead of asking questions",
|
|
189
|
-
"Storybook coverage for every component (Default + all variants)",
|
|
190
|
-
"Preview app with Home, Components, Cards, Dashboard, Layers, Icons, and Customize tabs",
|
|
191
|
-
"Chromatic visual regression wired to CI",
|
|
192
|
-
"CAPABILITIES.md as the single discoverable index of every feature BADS ships",
|
|
193
|
-
"Per-brand exemplars/ folder — pinned 'what good looks like' screenshots with annotations",
|
|
194
|
-
"corrections.md — per-fork anti-pattern log read before every Path B build",
|
|
195
|
-
],
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
n: "9",
|
|
199
|
-
name: "Enforcement",
|
|
200
|
-
note: "pre-commit + CI gates, rule audit",
|
|
201
|
-
status: "shipped",
|
|
202
|
-
details: [
|
|
203
|
-
"Catches accessibility and brand violations before they ship — prevents costly bugs and ensures quality standards stick",
|
|
204
|
-
"pnpm wcag:audit — AAA contrast check on every token pair",
|
|
205
|
-
"pnpm a11y:lint — static scan for token violations + a11y issues",
|
|
206
|
-
"pnpm check:stories — blocks commits missing story updates",
|
|
207
|
-
"pnpm lint:bypass — flags raw card-shaped divs that bypass the <Card> primitive",
|
|
208
|
-
"pnpm audit:rules — every CLAUDE.md / layer-* rule must have a concrete example (CI runs --strict)",
|
|
209
|
-
"lint-tokens / lint-ui-contrast / lint-target-size / lint-ethics — additional source + WCAG checks",
|
|
210
|
-
],
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
n: "10",
|
|
214
|
-
name: "Automate",
|
|
215
|
-
note: "token build, CI workflows, scheduled loops, launchd",
|
|
216
|
-
status: "shipped",
|
|
217
|
-
details: [
|
|
218
|
-
"Eliminates repetitive manual work — one token change ripples everywhere, CI catches regressions automatically",
|
|
219
|
-
"pnpm build:tokens regenerates styles.css + globals.css from tokens.json",
|
|
220
|
-
"pnpm fix:stories seeds missing story files from component source",
|
|
221
|
-
"Chromatic CI on every push to main",
|
|
222
|
-
"audit-rules CI on every PR touching CLAUDE.md or layer-*/README.md",
|
|
223
|
-
"Weekly digest Issue (Mondays 14:00 UTC) with ledger summaries, staleness, correction clusters",
|
|
224
|
-
"Monthly + quarterly Issues queue the Agent prompts for promotions, recipe mining, anti-defaults refresh",
|
|
225
|
-
"Local launchd plist runs pnpm aggregate weekly for cross-fork signal aggregation",
|
|
226
|
-
],
|
|
227
|
-
},
|
|
228
|
-
] as const;
|
|
229
|
-
|
|
230
|
-
const COMPONENT_GROUPS = [
|
|
231
|
-
{
|
|
232
|
-
title: "Inputs",
|
|
233
|
-
items: [
|
|
234
|
-
"Input",
|
|
235
|
-
"Textarea",
|
|
236
|
-
"Select",
|
|
237
|
-
"Checkbox",
|
|
238
|
-
"RadioGroup",
|
|
239
|
-
"Switch",
|
|
240
|
-
"Slider",
|
|
241
|
-
"Calendar",
|
|
242
|
-
],
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
title: "Actions",
|
|
246
|
-
items: ["Button", "Toggle", "ToggleGroup", "DropdownMenu", "Command"],
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
title: "Layout",
|
|
250
|
-
items: ["Card", "Separator", "ScrollArea", "Resizable", "Sidebar", "Tabs"],
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
title: "Overlays",
|
|
254
|
-
items: ["Dialog", "Sheet", "Popover", "Tooltip"],
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
title: "Feedback",
|
|
258
|
-
items: ["Alert", "Badge", "Progress", "Skeleton", "Sonner", "Tag"],
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
title: "Data",
|
|
262
|
-
items: ["Avatar", "Breadcrumb", "Chart", "Label", "Table"],
|
|
263
|
-
},
|
|
264
|
-
];
|
|
52
|
+
// Curated entry-points. Each points at a real path in the Docs tab so
|
|
53
|
+
// clicking through lands on a meaningful first read, not a TOC.
|
|
54
|
+
type StarterCard = {
|
|
55
|
+
id: string;
|
|
56
|
+
title: string;
|
|
57
|
+
description: string;
|
|
58
|
+
icon: React.ComponentType<{ className?: string; strokeWidth?: number }>;
|
|
59
|
+
groupId: string;
|
|
60
|
+
path: string;
|
|
61
|
+
};
|
|
265
62
|
|
|
266
|
-
const
|
|
267
|
-
{
|
|
268
|
-
label: "WCAG 2.2 AAA contrast",
|
|
269
|
-
detail: "7:1 body text, 4.5:1 large, 3:1 non-text",
|
|
270
|
-
},
|
|
63
|
+
const STARTER_CARDS: StarterCard[] = [
|
|
271
64
|
{
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
label: "44×44px touch targets",
|
|
281
|
-
detail: "SC 2.5.5 Enhanced, all interactive components",
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
label: "Focus appearance hardened",
|
|
285
|
-
detail: "SC 2.4.13 — 2px offset, 3:1 ring on every surface",
|
|
65
|
+
id: "readme",
|
|
66
|
+
title: "Start with the README",
|
|
67
|
+
description: "The first read: what BADS is, how to run it, where to look next.",
|
|
68
|
+
icon: Sparkles,
|
|
69
|
+
groupId: "start-here",
|
|
70
|
+
path: "README.md",
|
|
286
71
|
},
|
|
287
72
|
{
|
|
288
|
-
|
|
289
|
-
|
|
73
|
+
id: "architecture",
|
|
74
|
+
title: "Architecture (10 layers)",
|
|
75
|
+
description: "Foundation → tokens → registry → patterns → enforcement → automation.",
|
|
76
|
+
icon: Layers,
|
|
77
|
+
groupId: "architecture",
|
|
78
|
+
path: "DESIGN_SYSTEM_STACK.md",
|
|
290
79
|
},
|
|
291
80
|
{
|
|
292
|
-
|
|
293
|
-
|
|
81
|
+
id: "components",
|
|
82
|
+
title: "Component build spec",
|
|
83
|
+
description: "The 15-section contract every new component must satisfy.",
|
|
84
|
+
icon: Boxes,
|
|
85
|
+
groupId: "building",
|
|
86
|
+
path: "docs/component-build-spec.md",
|
|
294
87
|
},
|
|
295
88
|
{
|
|
296
|
-
|
|
297
|
-
|
|
89
|
+
id: "agent-system",
|
|
90
|
+
title: "Night Shift agent",
|
|
91
|
+
description: "How BADS improves itself overnight — research, build, auto-PR.",
|
|
92
|
+
icon: GitBranch,
|
|
93
|
+
groupId: "agent-system",
|
|
94
|
+
path: "scripts/prompts/night-shift.md",
|
|
298
95
|
},
|
|
299
96
|
];
|
|
300
97
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
detail:
|
|
317
|
-
"Use semantic color, spacing, type, radius, shadow, and motion tokens. No hardcoded values, no one-off styling, and no component behavior outside the registry.",
|
|
318
|
-
icon: Palette,
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
title: "Story every state",
|
|
322
|
-
detail:
|
|
323
|
-
"Ship Default, variants, disabled, loading, error, empty, and realistic-use stories so Chromatic and humans can review the actual surface area.",
|
|
324
|
-
icon: BookOpen,
|
|
325
|
-
},
|
|
326
|
-
] as const;
|
|
327
|
-
|
|
328
|
-
const COMPONENT_QUALITY_GATES = [
|
|
329
|
-
{
|
|
330
|
-
label: "Schema validation",
|
|
331
|
-
detail:
|
|
332
|
-
"Tokens and registry entries must stay structurally valid, so agents and humans read the same source of truth.",
|
|
333
|
-
icon: KeyRound,
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
label: "Story coverage",
|
|
337
|
-
detail:
|
|
338
|
-
"Every changed component needs matching stories before commit, including states that tend to regress quietly.",
|
|
339
|
-
icon: FolderGit2,
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
label: "Token and contrast lint",
|
|
343
|
-
detail:
|
|
344
|
-
"Hardcoded styling, low-contrast token pairs, missing labels, and source-level a11y issues are caught early.",
|
|
345
|
-
icon: ShieldCheck,
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
label: "Target-size audit",
|
|
349
|
-
detail:
|
|
350
|
-
"Interactive components are checked against the touch-target floor so small icon controls do not slip through.",
|
|
351
|
-
icon: Accessibility,
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
label: "Pixel regression",
|
|
355
|
-
detail:
|
|
356
|
-
"Storybook snapshots catch pixel-level drift across variants, themes, and viewport sizes before a visual change becomes baseline.",
|
|
357
|
-
icon: Eye,
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
label: "Route-level visual diff",
|
|
361
|
-
detail:
|
|
362
|
-
"Playwright full-page snapshots catch layout shifts that isolated component stories can miss.",
|
|
363
|
-
icon: GitCompare,
|
|
364
|
-
},
|
|
365
|
-
] as const;
|
|
366
|
-
|
|
367
|
-
const CAPABILITY_SECTIONS = [
|
|
368
|
-
{
|
|
369
|
-
title: "Design exploration",
|
|
370
|
-
icon: Wand2,
|
|
371
|
-
summary:
|
|
372
|
-
"Direction-first builds with web research, Mobbin sweep, exemplars, anti-defaults, self + adversarial critique.",
|
|
373
|
-
highlights: [
|
|
374
|
-
"11 prompts and rules",
|
|
375
|
-
"Direction sketches before code on every Path B build",
|
|
376
|
-
"Independent critique runs adversarial review",
|
|
377
|
-
],
|
|
378
|
-
doc: "CAPABILITIES.md → Design exploration workflow",
|
|
379
|
-
},
|
|
98
|
+
/**
|
|
99
|
+
* Copy-paste prompts for Claude Code. Each is written to be pasted VERBATIM —
|
|
100
|
+
* no placeholders, no brackets to fill in. The prompt itself instructs Claude
|
|
101
|
+
* to interview the user one question at a time, so a designer never has to edit
|
|
102
|
+
* the text before sending it. Each prompt encodes the BADS discipline
|
|
103
|
+
* (direction-first exploration, story coverage, token source-of-truth, AAA
|
|
104
|
+
* checks) in plain language so it works in any fork's CLAUDE.md context.
|
|
105
|
+
*/
|
|
106
|
+
const CLAUDE_PROMPTS: {
|
|
107
|
+
id: string;
|
|
108
|
+
icon: React.ComponentType<{ className?: string; strokeWidth?: number }>;
|
|
109
|
+
title: string;
|
|
110
|
+
blurb: string;
|
|
111
|
+
prompt: string;
|
|
112
|
+
}[] = [
|
|
380
113
|
{
|
|
381
|
-
|
|
382
|
-
icon:
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
"
|
|
387
|
-
"First-person pressure test ranks breaks BLOCKER → LOW",
|
|
388
|
-
"Real-content pool replaces Lorem ipsum across every story and prototype",
|
|
389
|
-
],
|
|
390
|
-
doc: "CAPABILITIES.md → Persona discipline",
|
|
114
|
+
id: "feature",
|
|
115
|
+
icon: Sparkles,
|
|
116
|
+
title: "Design a new feature",
|
|
117
|
+
blurb: "Explore real directions before any code.",
|
|
118
|
+
prompt:
|
|
119
|
+
"I want to design a new feature for this product. Interview me one question at a time to understand what it is, who it is for, and the problem it solves. Do not assume the answers and do not start coding yet. Once you understand it, give me 3 to 5 distinct design directions described in words (no code), each anchored to a real product reference. Wait for me to pick one before you build. Use this project's design system for every token, type style, and component.",
|
|
391
120
|
},
|
|
392
121
|
{
|
|
393
|
-
|
|
122
|
+
id: "component",
|
|
394
123
|
icon: Package,
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
"
|
|
399
|
-
".scratch/components/<name>.plan.md captures API, states, story matrix, a11y contract",
|
|
400
|
-
"pnpm visual-diff for image-mode builds",
|
|
401
|
-
],
|
|
402
|
-
doc: "CAPABILITIES.md → Component-building workflow",
|
|
124
|
+
title: "Add a component",
|
|
125
|
+
blurb: "New primitive, built to spec with a story.",
|
|
126
|
+
prompt:
|
|
127
|
+
"I want to add a new component to the design system. Interview me one question at a time about what it does, its variants, its states, and where it will be used. Then build it using the system's existing tokens and primitives, and create a matching Storybook story that covers every variant and state in the same change. Run the accessibility checks before you tell me it is done. Do not hardcode colors, sizes, or fonts.",
|
|
403
128
|
},
|
|
404
129
|
{
|
|
405
|
-
|
|
130
|
+
id: "colors",
|
|
406
131
|
icon: Palette,
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
"
|
|
411
|
-
"JSON schemas validated pre-commit",
|
|
412
|
-
"Tokens Studio (Figma) round-trips via DTCG without a custom export",
|
|
413
|
-
],
|
|
414
|
-
doc: "CAPABILITIES.md → Tokens + theming",
|
|
132
|
+
title: "Change the brand colors",
|
|
133
|
+
blurb: "Recolor at the token source, stay AAA.",
|
|
134
|
+
prompt:
|
|
135
|
+
"I want to change the brand colors. Interview me one question at a time to find out which colors should change and what the new values are. Make the change at the design-token source, not in individual components, and regenerate anything that needs regenerating. Show me the contrast ratios so the result stays AAA accessible. Do not hardcode hex values in components.",
|
|
415
136
|
},
|
|
416
137
|
{
|
|
417
|
-
|
|
418
|
-
icon:
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
"
|
|
423
|
-
"Type scale + letter-spacing editors with live preview",
|
|
424
|
-
"Brand mark editor (paste or upload SVG, sanitized + monotone-detected)",
|
|
425
|
-
],
|
|
426
|
-
doc: "CAPABILITIES.md → Customize tab",
|
|
138
|
+
id: "fonts",
|
|
139
|
+
icon: Type,
|
|
140
|
+
title: "Change the fonts",
|
|
141
|
+
blurb: "Swap a typeface through the type tokens.",
|
|
142
|
+
prompt:
|
|
143
|
+
"I want to change the typography. Interview me one question at a time about which text should change (body, headings, or code) and what typeface I want. Wire the change through the font tokens so it applies everywhere consistently, and keep everything on the system's named type roles. Do not introduce new font weights or letter-spacing that are not already in the system.",
|
|
427
144
|
},
|
|
428
145
|
{
|
|
429
|
-
|
|
430
|
-
icon:
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
"
|
|
435
|
-
"lint-target-size validates 24×24 hit area against the registry",
|
|
436
|
-
"lint-ui-contrast checks border/focus pairs ≥3:1",
|
|
437
|
-
],
|
|
438
|
-
doc: "CAPABILITIES.md → Accessibility floor",
|
|
146
|
+
id: "wireframe",
|
|
147
|
+
icon: PencilRuler,
|
|
148
|
+
title: "Build from a wireframe",
|
|
149
|
+
blurb: "Turn a sketch into real components, faithfully.",
|
|
150
|
+
prompt:
|
|
151
|
+
"I have a wireframe I want you to build. First ask me to share it. Before writing any code, inventory every element in it, map each one to an existing component in this design system, and tell me anything that does not map or that you plan to leave out, then wait for my OK. Build exactly what is drawn, nothing added and nothing dropped. Token every color, spacing, and type choice, and run the accessibility checks when you are done.",
|
|
439
152
|
},
|
|
440
153
|
{
|
|
441
|
-
|
|
442
|
-
icon:
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
"
|
|
447
|
-
"Loaded only when triggerKeywords in patterns.json match the task",
|
|
448
|
-
"Manifest-driven — agents pick what to read",
|
|
449
|
-
],
|
|
450
|
-
doc: "CAPABILITIES.md → Patterns + rules",
|
|
154
|
+
id: "mockup",
|
|
155
|
+
icon: ImageIcon,
|
|
156
|
+
title: "Match a polished mockup",
|
|
157
|
+
blurb: "Pixel-faithful build from a screenshot.",
|
|
158
|
+
prompt:
|
|
159
|
+
"I have a high-fidelity mockup I want matched closely. First ask me to share the image or link. Then measure the things that matter off it (widths, proportions, padding, corner radius, type sizes, colors) and tell me what you measured before writing any code. Match those measurements using this design system's tokens and components, then show me the result side by side with the original.",
|
|
451
160
|
},
|
|
452
161
|
{
|
|
453
|
-
|
|
454
|
-
icon:
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
"
|
|
459
|
-
"Layer files win over CLAUDE.md for in-scope rules",
|
|
460
|
-
"Layer 3 skill.md describes the primitive-tokens skill in machine-readable form",
|
|
461
|
-
],
|
|
462
|
-
doc: "CAPABILITIES.md → Agent interface",
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
title: "Developer experience",
|
|
466
|
-
icon: Terminal,
|
|
467
|
-
summary:
|
|
468
|
-
"pnpm dev:fresh, predev hook, verify-served + visual verification rules, audit scripts, pre-commit orchestrator.",
|
|
469
|
-
highlights: [
|
|
470
|
-
"predev hook auto-clears stale .next state",
|
|
471
|
-
"Visual verification rule forces screenshot before declaring done",
|
|
472
|
-
".husky/pre-commit runs the full gate suite",
|
|
473
|
-
],
|
|
474
|
-
doc: "CAPABILITIES.md → Developer experience",
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
title: "CI / CD + release",
|
|
478
|
-
icon: GitCompare,
|
|
479
|
-
summary:
|
|
480
|
-
"Chromatic, audit-rules on PR, weekly digest, monthly + quarterly Issue openers, publish-core on tag, changesets.",
|
|
481
|
-
highlights: [
|
|
482
|
-
"audit-rules.yml blocks merges that add vague rules",
|
|
483
|
-
"weekly-digest.yml posts to a labeled Issue every Monday",
|
|
484
|
-
"publish-core.yml ships to npm on v* tags with provenance",
|
|
485
|
-
],
|
|
486
|
-
doc: "CAPABILITIES.md → CI / CD + release",
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
title: "Self-improvement loops",
|
|
490
|
-
icon: Zap,
|
|
491
|
-
summary:
|
|
492
|
-
"Ledgers + monthly/quarterly Agent runs turn one-shot work into permanent memory across forks.",
|
|
493
|
-
highlights: [
|
|
494
|
-
"Three append-only JSONL ledgers under ledgers/",
|
|
495
|
-
"Monthly: promote-corrections + recipe-miner",
|
|
496
|
-
"Quarterly: anti-defaults refresh + staleness + cross-fork aggregator",
|
|
497
|
-
],
|
|
498
|
-
doc: "CAPABILITIES.md → Self-improvement loops",
|
|
499
|
-
},
|
|
500
|
-
{
|
|
501
|
-
title: "Sync model",
|
|
502
|
-
icon: GitCompare,
|
|
503
|
-
summary:
|
|
504
|
-
"Two-direction sync (upstream → forks via npm; forks → upstream via PR). Cross-fork aggregator informs upstream.",
|
|
505
|
-
highlights: [
|
|
506
|
-
"pnpm bads:sync pulls the latest @<slug>/core into a fork",
|
|
507
|
-
"BadsUpdateBanner surfaces new releases in-product",
|
|
508
|
-
"Aggregator anonymizes stakeholder names before any report",
|
|
509
|
-
],
|
|
510
|
-
doc: "CAPABILITIES.md → Sync model",
|
|
511
|
-
},
|
|
512
|
-
] as const;
|
|
513
|
-
|
|
514
|
-
const SELF_IMPROVEMENT_LOOPS = [
|
|
515
|
-
{
|
|
516
|
-
name: "Critique ledger",
|
|
517
|
-
cadence: "Per critique",
|
|
518
|
-
where: "ledgers/critiques.jsonl",
|
|
519
|
-
summary:
|
|
520
|
-
"Every prompts/independent-critique.md run appends one row per finding. Reveals which axes the system is weakest on (typography, motion, color-as-system, etc.) so future critiques weight them higher.",
|
|
521
|
-
runWith: "pnpm ledger:critiques",
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
name: "Verdict + recipe ledger",
|
|
525
|
-
cadence: "Per handoff",
|
|
526
|
-
where: "ledgers/prototypes.jsonl",
|
|
527
|
-
summary:
|
|
528
|
-
"After every Path B handoff: route, direction, exemplars cited, round count, Sir's verdict, recipe (primitives + patterns + tokens). Ship-first recipes become templates; bounce recipes trigger interventions.",
|
|
529
|
-
runWith: "pnpm ledger:prototypes",
|
|
530
|
-
},
|
|
531
|
-
{
|
|
532
|
-
name: "Futures ledger",
|
|
533
|
-
cadence: "Per futures-check",
|
|
534
|
-
where: "ledgers/futures.jsonl",
|
|
535
|
-
summary:
|
|
536
|
-
"Records 2nd / 3rd order findings across the five lenses (Scale, Time, Adversary, Behavior, Drift) with paired mitigations. Independent-critique includes a mandatory futures pass; prompts/futures-check.md runs standalone for pre-implementation work.",
|
|
537
|
-
runWith: "pnpm ledger:futures",
|
|
538
|
-
},
|
|
539
|
-
{
|
|
540
|
-
name: "Corrections log",
|
|
541
|
-
cadence: "Per rejection",
|
|
542
|
-
where: "corrections.md",
|
|
543
|
-
summary:
|
|
544
|
-
"Numbered anti-pattern entries with screenshot + Sir's verbatim reason + fix applied + recurrence watch. Read before every Path B build. Recurring patterns get promoted to rules or lints.",
|
|
545
|
-
runWith: "pnpm cluster:corrections",
|
|
546
|
-
},
|
|
547
|
-
{
|
|
548
|
-
name: "Promote corrections → lints",
|
|
549
|
-
cadence: "First Monday / month",
|
|
550
|
-
where: "prompts/promote-corrections.md",
|
|
551
|
-
summary:
|
|
552
|
-
"Mines corrections.md + critique ledger for clusters appearing 2+ times and drafts a candidate lint script or CLAUDE.md rule for Sir's review. Max 3 candidates per run; explicit abstain if data is thin.",
|
|
553
|
-
runWith: "loops-monthly.yml opens an Issue with the run command",
|
|
554
|
-
},
|
|
555
|
-
{
|
|
556
|
-
name: "Recipe miner",
|
|
557
|
-
cadence: "First Monday / month",
|
|
558
|
-
where: "prompts/recipe-miner.md",
|
|
559
|
-
summary:
|
|
560
|
-
"Ranks ship-first vs bounce recipes from prototypes.jsonl. Surfaces templates worth copying and anti-templates worth flagging. Output saved to ledgers/reports/recipes-<YYYY-MM>.md.",
|
|
561
|
-
runWith: "loops-monthly.yml opens an Issue with the run command",
|
|
562
|
-
},
|
|
563
|
-
{
|
|
564
|
-
name: "Anti-defaults refresh",
|
|
565
|
-
cadence: "First Monday / quarter",
|
|
566
|
-
where: "prompts/anti-defaults-refresh.md",
|
|
567
|
-
summary:
|
|
568
|
-
"Pressure-tests the current anti-defaults list against the last 90 days of corrections + critiques + fresh Mobbin and web research. Max 5 proposals per run; abstention is healthy.",
|
|
569
|
-
runWith: "loops-quarterly.yml opens an Issue with the run command",
|
|
570
|
-
},
|
|
571
|
-
{
|
|
572
|
-
name: "Staleness check",
|
|
573
|
-
cadence: "Quarterly",
|
|
574
|
-
where: "scripts/check-staleness.mjs",
|
|
575
|
-
summary:
|
|
576
|
-
"Flags references and exemplars older than 12 months (references.meta.json + exemplars/<brand>/annotations.md carry capturedAt dates). Sir reviews flagged entries: confirm-in-place or replace.",
|
|
577
|
-
runWith: "pnpm check:staleness",
|
|
578
|
-
},
|
|
579
|
-
{
|
|
580
|
-
name: "Cross-fork aggregator",
|
|
581
|
-
cadence: "Quarterly",
|
|
582
|
-
where: "aggregator/, scripts/aggregate-forks.mjs",
|
|
583
|
-
summary:
|
|
584
|
-
"Local CLI that pulls signals from every active fork and surfaces patterns appearing in N≥2 forks. Recommends upstream BADS promotions. Privacy-safe: never reads content/personas/, anonymizes stakeholder names.",
|
|
585
|
-
runWith: "pnpm aggregate",
|
|
586
|
-
},
|
|
587
|
-
{
|
|
588
|
-
name: "Rule audit",
|
|
589
|
-
cadence: "Every PR",
|
|
590
|
-
where: "scripts/audit-rules.mjs",
|
|
591
|
-
summary:
|
|
592
|
-
"Scans CLAUDE.md + layer-*/README.md for rules without concrete examples or pointers. A rule without an example is too vague to enforce and silently gets ignored.",
|
|
593
|
-
runWith: ".github/workflows/audit-rules.yml (strict on PR)",
|
|
594
|
-
},
|
|
595
|
-
] as const;
|
|
596
|
-
|
|
597
|
-
const AUTOMATION_SURFACES = [
|
|
598
|
-
{
|
|
599
|
-
label: "audit-rules.yml",
|
|
600
|
-
cadence: "Every PR",
|
|
601
|
-
summary:
|
|
602
|
-
"Runs pnpm audit:rules:strict on every PR touching CLAUDE.md, layer-*/README.md, or the audit script itself. Blocks merge if any new rule lacks a concrete example.",
|
|
603
|
-
where: ".github/workflows/audit-rules.yml",
|
|
604
|
-
},
|
|
605
|
-
{
|
|
606
|
-
label: "weekly-digest.yml",
|
|
607
|
-
cadence: "Mondays 14:00 UTC",
|
|
608
|
-
summary:
|
|
609
|
-
"Executes check:staleness + ledger:critiques + ledger:prototypes + ledger:futures + cluster:corrections + lint:bypass:warn. Opens or updates a labeled self-improvement:weekly-digest Issue.",
|
|
610
|
-
where: ".github/workflows/weekly-digest.yml",
|
|
611
|
-
},
|
|
612
|
-
{
|
|
613
|
-
label: "loops-monthly.yml",
|
|
614
|
-
cadence: "First Monday / month",
|
|
615
|
-
summary:
|
|
616
|
-
"Opens a labeled self-improvement:monthly Issue queueing the two monthly Agent prompts (promote-corrections, recipe-miner) as checkbox checklists.",
|
|
617
|
-
where: ".github/workflows/loops-monthly.yml",
|
|
618
|
-
},
|
|
619
|
-
{
|
|
620
|
-
label: "loops-quarterly.yml",
|
|
621
|
-
cadence: "First Monday / quarter",
|
|
622
|
-
summary:
|
|
623
|
-
"Opens a labeled self-improvement:quarterly Issue queueing anti-defaults-refresh, staleness deep dive, the cross-fork aggregator, and the capability + rule hygiene pass.",
|
|
624
|
-
where: ".github/workflows/loops-quarterly.yml",
|
|
625
|
-
},
|
|
626
|
-
{
|
|
627
|
-
label: "com.bads.aggregate.plist",
|
|
628
|
-
cadence: "Mondays 09:30 local",
|
|
629
|
-
summary:
|
|
630
|
-
"Local launchd job (opt-in). Runs pnpm aggregate across the forks configured in aggregator/forks.json. Local-only because the aggregator needs filesystem access to multiple repos.",
|
|
631
|
-
where: "automation/local/ (bash install.sh / uninstall.sh)",
|
|
632
|
-
},
|
|
633
|
-
{
|
|
634
|
-
label: "chromatic.yml",
|
|
635
|
-
cadence: "Every push to main + PRs",
|
|
636
|
-
summary:
|
|
637
|
-
"Storybook visual regression. First push sets baseline; every PR posts a diff. Needs CHROMATIC_PROJECT_TOKEN secret.",
|
|
638
|
-
where: ".github/workflows/chromatic.yml",
|
|
162
|
+
id: "review",
|
|
163
|
+
icon: Eye,
|
|
164
|
+
title: "Review before stakeholders",
|
|
165
|
+
blurb: "An honest critique and a fix list, pre-demo.",
|
|
166
|
+
prompt:
|
|
167
|
+
"I want to know whether a screen is ready to show stakeholders. Ask me which screen or route. Then critique it: check it for consistency against the rest of the product, view it in light and dark and any theme variants, run the accessibility checks, and give me a prioritized list of what to fix before the review. Be specific and honest. Do not just tell me it looks good.",
|
|
639
168
|
},
|
|
640
169
|
{
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
170
|
+
id: "a11y",
|
|
171
|
+
icon: ShieldCheck,
|
|
172
|
+
title: "Run an accessibility audit",
|
|
173
|
+
blurb: "Check a screen against WCAG AAA, with fixes.",
|
|
174
|
+
prompt:
|
|
175
|
+
"I want to make sure a screen meets accessibility standards. Ask me which screen or route. Then audit it against WCAG AAA: color contrast, focus states, keyboard navigation, labels, and screen-reader support. Give me a prioritized list of the issues with the specific fix for each, then offer to make the fixes.",
|
|
646
176
|
},
|
|
647
|
-
]
|
|
177
|
+
];
|
|
648
178
|
|
|
649
|
-
function
|
|
179
|
+
function PromptCard({
|
|
650
180
|
icon: Icon,
|
|
651
|
-
value,
|
|
652
|
-
label,
|
|
653
|
-
hint,
|
|
654
|
-
}: {
|
|
655
|
-
icon: typeof Sparkles;
|
|
656
|
-
value: string | number;
|
|
657
|
-
label: string;
|
|
658
|
-
hint?: string;
|
|
659
|
-
}) {
|
|
660
|
-
return (
|
|
661
|
-
<Card>
|
|
662
|
-
<CardHeader className="pb-2">
|
|
663
|
-
<div className="flex items-center justify-between">
|
|
664
|
-
<CardDescription className="text-sm">{label}</CardDescription>
|
|
665
|
-
<Icon className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
666
|
-
</div>
|
|
667
|
-
<CardTitle className="text-4xl font-semibold tabular-nums">{value}</CardTitle>
|
|
668
|
-
</CardHeader>
|
|
669
|
-
{hint && (
|
|
670
|
-
<CardContent className="pt-0">
|
|
671
|
-
<p className="text-sm text-muted-foreground">{hint}</p>
|
|
672
|
-
</CardContent>
|
|
673
|
-
)}
|
|
674
|
-
</Card>
|
|
675
|
-
);
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
function SectionHeading({
|
|
679
|
-
eyebrow,
|
|
680
181
|
title,
|
|
681
|
-
|
|
682
|
-
}: {
|
|
683
|
-
eyebrow?: string;
|
|
684
|
-
title: string;
|
|
685
|
-
description?: string;
|
|
686
|
-
}) {
|
|
687
|
-
return (
|
|
688
|
-
<header className="space-y-2 max-w-2xl">
|
|
689
|
-
{eyebrow && (
|
|
690
|
-
<p className="text-xs font-mono uppercase tracking-wider text-muted-foreground">
|
|
691
|
-
{eyebrow}
|
|
692
|
-
</p>
|
|
693
|
-
)}
|
|
694
|
-
<h2 className="text-3xl font-semibold tracking-tight">{title}</h2>
|
|
695
|
-
{description && (
|
|
696
|
-
<p className="text-base text-muted-foreground leading-relaxed">{description}</p>
|
|
697
|
-
)}
|
|
698
|
-
</header>
|
|
699
|
-
);
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
function CodeBlock({ children }: { children: string }) {
|
|
703
|
-
return (
|
|
704
|
-
<pre className="bg-muted text-foreground rounded-lg p-4 text-sm font-mono overflow-x-auto border">
|
|
705
|
-
<code>{children}</code>
|
|
706
|
-
</pre>
|
|
707
|
-
);
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
// One-shot setup prompt — pasted into a fresh Claude Code session to run the
|
|
711
|
-
// full onboarding (rename + brand + voice + microcopy + ethics + tokens +
|
|
712
|
-
// components + patterns). Mirrors prompts/setup.md so home stays in sync.
|
|
713
|
-
const SETUP_PROMPT = `You are setting up a fresh fork of BADS (Behavioral Agentic Design System) for a new product. The product can be anything — a personal app, a side project, an internal tool, an open-source library, or work for a client. Treat all of these the same; the "product" is whatever the user is building.
|
|
714
|
-
|
|
715
|
-
Source repo: https://github.com/matthewlarn/behavioral-agentic-design-system
|
|
716
|
-
|
|
717
|
-
If we are NOT already inside a clone of this repo (no package.json named "behavioral-agentic-design-system" or its renamed variant in cwd), ask me for a parent directory and a slug for this product (e.g. "acme", "my-app", "side-project"), then run:
|
|
718
|
-
git clone https://github.com/matthewlarn/behavioral-agentic-design-system.git <slug>
|
|
719
|
-
cd <slug>
|
|
720
|
-
pnpm install
|
|
721
|
-
If we're already inside the repo, skip the clone.
|
|
722
|
-
|
|
723
|
-
Then run the full onboarding flow, asking me for inputs as you go and committing at each step. Stay terse — no preamble, no recap, just ask the next question.
|
|
724
|
-
|
|
725
|
-
Steps to run, in order:
|
|
726
|
-
|
|
727
|
-
1. RENAME — read CLAUDE.md's "First-Run Rename" section. If .client-identity.json doesn't exist or brand.config.ts still says name: "BADS", ask me for a Display name and slug, then run \`pnpm rename "<Name>" <slug>\`, \`pnpm install\`, \`pnpm build:tokens\`, and commit. Skip if already renamed.
|
|
728
|
-
|
|
729
|
-
2. SOURCE DISCOVERY — ask me what already exists for this product (live site URL, existing codebase path, knowledge base, or none). Then run the matching extract prompt to gather inputs BEFORE asking for raw text:
|
|
730
|
-
- codebase → prompts/extract/from-codebase.md (Glob/Grep/Read)
|
|
731
|
-
- website → prompts/extract/from-website.md (WebFetch)
|
|
732
|
-
- KB → prompts/extract/from-knowledge-base.md
|
|
733
|
-
- all of the above → prompts/extract/from-existing-product.md (triangulates)
|
|
734
|
-
- none → skip extraction, fall through to direct asks below
|
|
735
|
-
Save artifacts to a temp file. Show me the "gaps and contradictions" artifact verbatim before proceeding — AI extracts patterns but can't tell intentional from legacy.
|
|
736
|
-
|
|
737
|
-
3. BRAND CONTEXT — follow prompts/0-brand-context.md. If step 2 extracted artifacts, use them as inputs (don't re-ask). Otherwise ask me for marketing site URL/text, founder notes, one-liner, industry context. Fill BRIEF.md and brand.config.ts AI-brief fields. Diff, confirm, commit.
|
|
738
|
-
|
|
739
|
-
4. VOICE — follow prompts/1-brand-voice.md. If extraction ran, the voice-signals artifact is the input — don't ask again. Otherwise ask for examples of existing copy and voice references. Fill layer-1-foundation/{framework,voice-and-tone,language}.md. Diff, confirm, commit.
|
|
740
|
-
|
|
741
|
-
5. MICROCOPY — follow prompts/2-microcopy.md. If extraction ran, the microcopy-patterns artifact is the seed — fill the gaps from there. Validate JSON parses. Diff, confirm, commit.
|
|
742
|
-
|
|
743
|
-
6. ETHICS — follow prompts/3-ethics.md. If extraction surfaced compliance signals (HIPAA strings, age gates, consent flows), pre-fill from those. Ask about any sensitive product moments still missing. Update layer-2-ethics-responsibility/. Diff, confirm, commit.
|
|
744
|
-
|
|
745
|
-
7. TOKENS — follow prompts/4-tokens.md. If extraction ran, the visual-cues artifact already has hex values + fonts — use those. Otherwise ask for brand colors, fonts, radius preference. Update brand.config.ts colors/fonts and tokens.json, run \`pnpm build:tokens\`. Diff, confirm, commit.
|
|
746
|
-
|
|
747
|
-
8. COMPONENT NEEDS — follow prompts/5-component-needs.md. If extraction saw a codebase, you already know which primitives the product uses and where it deviates — use that as the gap matrix seed. Otherwise ask for 2–5 wireframes or screen descriptions. Output a gap matrix. FLAG candidate new components for explicit approval — do NOT add primitives without my "yes". Apply approved variants/sizes and update stories per STORYBOOK_RULE.md.
|
|
748
|
-
|
|
749
|
-
9. PATTERNS — follow prompts/6-patterns.md. Fill layer-6-patterns-and-rules with one recipe per surface in BRIEF.md. Diff, confirm, commit.
|
|
750
|
-
|
|
751
|
-
10. CHROMATIC — follow prompts/chromatic.md (canonical reference: docs/chromatic-setup.md). The infra is already in this repo (chromatic.config.json, .github/workflows/chromatic.yml, package.json script + devDep). Walk me through creating a Chromatic project, copying the project token, adding it as the CHROMATIC_PROJECT_TOKEN GitHub secret, and seeding the baseline by pushing to main. Never commit, log, or echo the token. If I'd rather defer, set the CHROMATIC_ENABLED repo variable to "false" and continue.
|
|
752
|
-
|
|
753
|
-
Operating rules:
|
|
754
|
-
- Stop and ask if unsure. Vague answers produce generic SaaS slop.
|
|
755
|
-
- Never edit defaults in packages/core/src/components/ui/* — additive only (multi-tenant rule).
|
|
756
|
-
- Run \`pnpm build:tokens\` after any tokens.json change.
|
|
757
|
-
- Commit after every step, focused messages.
|
|
758
|
-
- Skip steps that don't apply, and tell me why.
|
|
759
|
-
- Read CLAUDE.md and prompts/README.md before starting.
|
|
760
|
-
|
|
761
|
-
Begin with step 1.`;
|
|
762
|
-
|
|
763
|
-
function CopyablePromptCard({
|
|
764
|
-
title,
|
|
765
|
-
description,
|
|
182
|
+
blurb,
|
|
766
183
|
prompt,
|
|
767
|
-
icon: Icon = Wand2,
|
|
768
|
-
highlighted = false,
|
|
769
184
|
}: {
|
|
185
|
+
icon: React.ComponentType<{ className?: string; strokeWidth?: number }>;
|
|
770
186
|
title: string;
|
|
771
|
-
|
|
187
|
+
blurb: string;
|
|
772
188
|
prompt: string;
|
|
773
|
-
icon?: typeof Wand2;
|
|
774
|
-
highlighted?: boolean;
|
|
775
189
|
}) {
|
|
776
190
|
const [copied, setCopied] = useState(false);
|
|
777
191
|
|
|
@@ -779,1372 +193,256 @@ function CopyablePromptCard({
|
|
|
779
193
|
try {
|
|
780
194
|
await navigator.clipboard.writeText(prompt);
|
|
781
195
|
setCopied(true);
|
|
782
|
-
setTimeout(() => setCopied(false), 2000);
|
|
783
|
-
} catch {
|
|
196
|
+
window.setTimeout(() => setCopied(false), 2000);
|
|
197
|
+
} catch {
|
|
198
|
+
// Clipboard unavailable (insecure context / denied) — leave state as-is.
|
|
199
|
+
}
|
|
784
200
|
};
|
|
785
201
|
|
|
786
202
|
return (
|
|
787
|
-
<Card className=
|
|
788
|
-
<CardHeader>
|
|
789
|
-
<
|
|
790
|
-
<
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
</CardTitle>
|
|
795
|
-
<CardDescription>{description}</CardDescription>
|
|
796
|
-
</div>
|
|
797
|
-
<Button
|
|
798
|
-
type="button"
|
|
799
|
-
size="sm"
|
|
800
|
-
variant="outline"
|
|
801
|
-
onClick={handleCopy}
|
|
802
|
-
className="shrink-0 gap-1.5"
|
|
803
|
-
>
|
|
804
|
-
{copied ? (
|
|
805
|
-
<>
|
|
806
|
-
<Check className="h-3.5 w-3.5" strokeWidth={1.5} /> Copied
|
|
807
|
-
</>
|
|
808
|
-
) : (
|
|
809
|
-
<>
|
|
810
|
-
<ClipboardCopy className="h-3.5 w-3.5" strokeWidth={1.5} /> Copy
|
|
811
|
-
</>
|
|
812
|
-
)}
|
|
813
|
-
</Button>
|
|
814
|
-
</div>
|
|
203
|
+
<Card className="flex flex-col gap-0">
|
|
204
|
+
<CardHeader className="gap-1.5 pb-2">
|
|
205
|
+
<CardTitle className="flex items-center gap-2 text-base">
|
|
206
|
+
<Icon className="size-4 text-muted-foreground" strokeWidth={1.5} />
|
|
207
|
+
{title}
|
|
208
|
+
</CardTitle>
|
|
209
|
+
<CardDescription>{blurb}</CardDescription>
|
|
815
210
|
</CardHeader>
|
|
816
|
-
<CardContent>
|
|
817
|
-
<
|
|
818
|
-
|
|
819
|
-
</
|
|
211
|
+
<CardContent className="flex flex-1 flex-col gap-3">
|
|
212
|
+
<p className="line-clamp-3 rounded-md border bg-muted/40 p-2.5 font-mono text-xs leading-relaxed text-muted-foreground">
|
|
213
|
+
{prompt}
|
|
214
|
+
</p>
|
|
215
|
+
<Button
|
|
216
|
+
size="sm"
|
|
217
|
+
variant={copied ? "default" : "outline"}
|
|
218
|
+
className="mt-auto w-full gap-2"
|
|
219
|
+
onClick={handleCopy}
|
|
220
|
+
type="button"
|
|
221
|
+
aria-label={`Copy the "${title}" prompt to your clipboard`}
|
|
222
|
+
>
|
|
223
|
+
{copied ? (
|
|
224
|
+
<>
|
|
225
|
+
<Check className="size-3.5" strokeWidth={1.5} /> Copied
|
|
226
|
+
</>
|
|
227
|
+
) : (
|
|
228
|
+
<>
|
|
229
|
+
<Copy className="size-3.5" strokeWidth={1.5} /> Copy prompt
|
|
230
|
+
</>
|
|
231
|
+
)}
|
|
232
|
+
</Button>
|
|
233
|
+
<span className="sr-only" role="status" aria-live="polite">
|
|
234
|
+
{copied ? `${title} prompt copied to clipboard` : ""}
|
|
235
|
+
</span>
|
|
820
236
|
</CardContent>
|
|
821
237
|
</Card>
|
|
822
238
|
);
|
|
823
239
|
}
|
|
824
240
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
Skip node_modules, .next, dist, build, generated/, lock files.
|
|
844
|
-
|
|
845
|
-
Output 5 artifacts:
|
|
846
|
-
1. Brand context: mission / audience / productSurfaces / differentiator / forbidden / inspiration — for BRIEF.md + brand.config.ts AI fields
|
|
847
|
-
2. Voice signals: tone (sentence length, pronouns, contractions, punctuation), 5–10 voice tics quoted with file:line, tonal range (3 surfaces compared)
|
|
848
|
-
3. Microcopy patterns: starter microcopy.json with REAL strings, schema matches prompts/2-microcopy.md, file:line for each
|
|
849
|
-
4. Visual cues: every hex/oklch found grouped by usage, fonts in frequency order, radius/spacing values, reference apps inferred
|
|
850
|
-
5. Gaps and contradictions: bullet list of what you couldn't find or felt uncertain about — this is the human's homework`;
|
|
851
|
-
|
|
852
|
-
const EXTRACT_FROM_WEBSITE = `You have web-fetching tools. Extract enough context from the URLs below to fill out a BADS brief, voice spec, and microcopy bank.
|
|
853
|
-
|
|
854
|
-
URLS:
|
|
855
|
-
- Primary: <paste homepage URL>
|
|
856
|
-
- Pricing / about / product / blog / customers (optional — find via nav if not given)
|
|
857
|
-
|
|
858
|
-
Stop at 6–8 pages total. For each: fetch rendered text, pull h1/h2/h3 hierarchy, CTA labels, body copy first para and callouts, visible hex codes / fonts / spacing.
|
|
859
|
-
|
|
860
|
-
Stay terse, don't ask me — fetch it. Output artifacts at the end.
|
|
861
|
-
|
|
862
|
-
Output 5 artifacts:
|
|
863
|
-
1. Brand context: mission (homepage h1, plain English) / audience (who they talk TO, quote phrasing) / productSurfaces (from product nav + pricing features) / differentiator (sharp or "WEAK SIGNAL") / forbidden (from any "we don't" / privacy commitments) / inspiration (sites with similar feel, be specific)
|
|
864
|
-
2. Voice signals: tone (sentence length, pronouns, contractions, punctuation, capitalization), 5–10 voice tics with URLs, tonal range (hero vs fine-print vs footer)
|
|
865
|
-
3. Microcopy patterns: REAL strings quoted from the site, schema matches prompts/2-microcopy.md, URL for each, "TODO" for product-internal slots not on marketing
|
|
866
|
-
4. Visual cues: hex/rgb values grouped by usage, fonts in load order, section spacing (tight/generous/rhythmic), photo vs illustration, reference apps with one-line why
|
|
867
|
-
5. Gaps and contradictions: bullet list — marketing sites overstate; flag what the site doesn't actually tell you`;
|
|
868
|
-
|
|
869
|
-
const EXTRACT_FROM_KB = `You have access to a knowledge base (Notion / Confluence / shared drive). Extract context for a BADS brief, voice spec, and microcopy bank.
|
|
870
|
-
|
|
871
|
-
SOURCES (priority order — earlier outranks later if they disagree):
|
|
872
|
-
1. Brand book / brand guide
|
|
873
|
-
2. Founder memos, mission docs
|
|
874
|
-
3. Product strategy, vision, OKRs
|
|
875
|
-
4. Style guide / writing guide
|
|
876
|
-
5. Customer personas / ICP docs
|
|
877
|
-
6. Internal Slack/email archives
|
|
878
|
-
7. Public site (cross-reference only)
|
|
879
|
-
|
|
880
|
-
For each doc: read fully, mark intent date, flag stale (>18mo without updates), prefer newer when sources disagree.
|
|
881
|
-
|
|
882
|
-
Stay terse. Output 5 artifacts:
|
|
883
|
-
1. Brand context: same shape as other extract prompts, derived from most authoritative + recent source
|
|
884
|
-
2. Voice signals: from the style guide quote rules verbatim and number them; sample 5–10 paragraphs from recent docs for tone signals; flag where rules and actual writing disagree (often actual practice is better than codified rule)
|
|
885
|
-
3. Microcopy patterns: starter microcopy.json with strings quoted from docs; mark product-internal slots TODO
|
|
886
|
-
4. Company outline: origin story (3–5 sentences from founder memos), what's working, what's a problem, strategy in one sentence, cultural tells (phrases that recur across docs but aren't in the formal guide)
|
|
887
|
-
5. Gaps and contradictions: where docs disagree or info is missing — most important artifact`;
|
|
888
|
-
|
|
889
|
-
const EXTRACT_COMBO = `You have read access to a codebase, web-fetching tools, and a knowledge-base tool. Triangulate across all three sources. Disagreement between them is the most valuable signal — surface it explicitly.
|
|
890
|
-
|
|
891
|
-
SOURCES:
|
|
892
|
-
- Codebase: <absolute path or "the current repo">
|
|
893
|
-
- Live site: <homepage URL>
|
|
894
|
-
- Knowledge base: <Notion workspace name / "skip" if none>
|
|
895
|
-
|
|
896
|
-
Stay terse. Don't ask me — fetch it. Output artifacts at the end.
|
|
897
|
-
|
|
898
|
-
Read in this order, citing source for every fact:
|
|
899
|
-
1. Knowledge base — most authoritative for intent
|
|
900
|
-
2. Codebase — most authoritative for what's shipping
|
|
901
|
-
3. Live site — most authoritative for how it's marketed
|
|
902
|
-
|
|
903
|
-
Output 6 artifacts. For each, note source(s) used + any conflict found:
|
|
904
|
-
1. Brand context: mission / audience / productSurfaces / differentiator / forbidden / inspiration with [SOURCE: …] tags and conflict notes
|
|
905
|
-
2. Voice signals: style guide rules (KB) + marketing voice (site samples with URLs) + product voice (codebase samples with file:line) + tonal disagreement (which to converge to, based on audience)
|
|
906
|
-
3. Microcopy patterns: marketing slots from site, product slots from codebase, TODO only when no source has it
|
|
907
|
-
4. Company outline: origin (KB) / shipping now (codebase + changelog) / planned (KB OKRs + roadmap) / strategy (cross-checked) / cultural tells (recur across sources)
|
|
908
|
-
5. Visual cues: hex from codebase tokens + visible hex from site, fonts from both, reference apps from cross-source signals; flag any disagreement
|
|
909
|
-
6. Contradictions and gaps: a table of source A vs source B with a recommendation, plus a separate list of true gaps. The most important artifact — the human reviewer's homework`;
|
|
910
|
-
|
|
911
|
-
// Chromatic wire-up prompt — paste into a Claude Code session at the repo
|
|
912
|
-
// root to walk through creating a Chromatic project, adding the GitHub
|
|
913
|
-
// secret, and seeding the first baseline. Mirrors prompts/chromatic.md.
|
|
914
|
-
const CHROMATIC_PROMPT = `You are wiring up Chromatic visual regression on a fresh BADS fork. The infrastructure (chromatic.config.json, .github/workflows/chromatic.yml, the \`pnpm chromatic\` script, the \`chromatic\` devDep) is already in the repo. The remaining work is human-side: create a Chromatic project, copy a token, add it as a GitHub secret, then seed the first baseline.
|
|
915
|
-
|
|
916
|
-
Read docs/chromatic-setup.md before starting — that's the canonical reference. Stay terse, no preamble.
|
|
917
|
-
|
|
918
|
-
Steps:
|
|
919
|
-
|
|
920
|
-
1. PRECHECK
|
|
921
|
-
Confirm chromatic.config.json, .github/workflows/chromatic.yml, the \`chromatic\` script in package.json, and a GitHub remote (\`git remote -v\`) all exist. If any are missing, stop and tell me — don't try to recreate them blindly.
|
|
922
|
-
|
|
923
|
-
2. CHROMATIC PROJECT (human step)
|
|
924
|
-
Tell me to:
|
|
925
|
-
- Open https://www.chromatic.com/start
|
|
926
|
-
- Sign in with the GitHub account that owns this repo
|
|
927
|
-
- Click "Add project" and pick this repo
|
|
928
|
-
- Copy the project token (starts with chpt_)
|
|
929
|
-
Wait for me to paste it back. Hold the token only in working memory — never log, echo, write, or commit it.
|
|
930
|
-
|
|
931
|
-
3. GITHUB SECRET (human step)
|
|
932
|
-
Tell me to:
|
|
933
|
-
- Open the repo on GitHub → Settings → Secrets and variables → Actions
|
|
934
|
-
- New repository secret
|
|
935
|
-
- Name: CHROMATIC_PROJECT_TOKEN
|
|
936
|
-
- Value: the token I pasted
|
|
937
|
-
- Add secret
|
|
938
|
-
Wait for "done".
|
|
939
|
-
|
|
940
|
-
4. FIRST BASELINE
|
|
941
|
-
Ask me which path:
|
|
942
|
-
(a) Push to main and let CI seed (clean tree → \`git push origin main\` → tail with \`gh run watch\` or open the Actions tab)
|
|
943
|
-
(b) Run locally with the token in env: \`CHROMATIC_PROJECT_TOKEN=<token> pnpm chromatic\`
|
|
944
|
-
Don't auto-push without explicit confirmation.
|
|
945
|
-
|
|
946
|
-
5. VERIFY
|
|
947
|
-
Once the first run completes, tell me to open the Chromatic dashboard, confirm one build with N snapshots, and note that this is the rolling baseline going forward. Surface the build URL if available.
|
|
948
|
-
|
|
949
|
-
6. HAND OFF
|
|
950
|
-
Remind me of the day-two flow: every PR posts a Chromatic check, accept diffs in the Chromatic UI, merges to main auto-update the baseline per autoAcceptChanges: main in chromatic.config.json. Mention the CHROMATIC_ENABLED repo variable as the kill-switch.
|
|
951
|
-
|
|
952
|
-
Operating rules:
|
|
953
|
-
- Do not commit, log, or echo the token.
|
|
954
|
-
- If precheck fails, stop and tell me what's missing.
|
|
955
|
-
- If the first run fails, read the troubleshooting section in docs/chromatic-setup.md.
|
|
956
|
-
|
|
957
|
-
Begin with step 1.`;
|
|
958
|
-
|
|
959
|
-
export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
960
|
-
const [openLayers, setOpenLayers] = useState<Set<string>>(new Set());
|
|
961
|
-
const { setTab } = useShellNav();
|
|
962
|
-
const handleBrowseComponents = () => {
|
|
963
|
-
if (onBrowseComponents) {
|
|
964
|
-
onBrowseComponents();
|
|
965
|
-
return;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
document.getElementById("components")?.scrollIntoView({
|
|
969
|
-
behavior: "smooth",
|
|
970
|
-
block: "start",
|
|
971
|
-
});
|
|
972
|
-
};
|
|
973
|
-
|
|
974
|
-
// Fresh fork: not upstream, brand name still "BADS"
|
|
975
|
-
const isFreshFork = !brand.isUpstreamTemplate && brand.name === "BADS";
|
|
976
|
-
|
|
977
|
-
// Temporarily hidden everywhere per Sir (2026-06-04): the "Onboard with AI"
|
|
978
|
-
// hero CTA + the #onboard quickstart section. Flip back to true to restore.
|
|
979
|
-
const SHOW_ONBOARDING_SECTION = false;
|
|
980
|
-
|
|
981
|
-
// Customized client fork: not upstream, brand name changed
|
|
982
|
-
const isCustomizedFork = !brand.isUpstreamTemplate && brand.name !== "BADS";
|
|
241
|
+
function MetricPill({
|
|
242
|
+
label,
|
|
243
|
+
value,
|
|
244
|
+
}: {
|
|
245
|
+
label: string;
|
|
246
|
+
value: string | number;
|
|
247
|
+
}) {
|
|
248
|
+
return (
|
|
249
|
+
<div className="flex flex-col gap-0.5 rounded-md border border-border bg-card px-4 py-3">
|
|
250
|
+
<span className="font-mono text-2xl font-semibold tracking-tight tabular-nums">
|
|
251
|
+
{value}
|
|
252
|
+
</span>
|
|
253
|
+
<span className="text-xs uppercase tracking-wide text-muted-foreground">
|
|
254
|
+
{label}
|
|
255
|
+
</span>
|
|
256
|
+
</div>
|
|
257
|
+
);
|
|
258
|
+
}
|
|
983
259
|
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
260
|
+
export function HomeTab({ onBrowseDocs, onBrowseComponents }: HomeTabProps) {
|
|
261
|
+
const openDocAt = (path: string) => {
|
|
262
|
+
// Persist the requested doc so DocsTab restores it on first mount.
|
|
263
|
+
try {
|
|
264
|
+
window.sessionStorage.setItem("bads:docs:active-path", path);
|
|
265
|
+
// DocsTab is preloaded (mounted) before any click via the shell's
|
|
266
|
+
// background preload, so its mount-once restore can't catch this click.
|
|
267
|
+
// Dispatch a live event so an already-mounted DocsTab switches docs.
|
|
268
|
+
window.dispatchEvent(new CustomEvent("bads:docs:navigate", { detail: path }));
|
|
269
|
+
} catch {}
|
|
270
|
+
onBrowseDocs?.();
|
|
991
271
|
};
|
|
992
272
|
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
<
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
minutes, you can customize it for your product — brand colors, typography,
|
|
1006
|
-
voice, ethics, and more. The system guides you through every step.
|
|
1007
|
-
</p>
|
|
1008
|
-
</div>
|
|
1009
|
-
|
|
1010
|
-
<div className="flex items-center gap-2 flex-wrap pt-2">
|
|
1011
|
-
<Button size="sm" variant="default" className="gap-2" asChild>
|
|
1012
|
-
<a href="#setup">
|
|
1013
|
-
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Set up now
|
|
1014
|
-
</a>
|
|
1015
|
-
</Button>
|
|
1016
|
-
<Button size="sm" variant="outline" className="gap-2" asChild>
|
|
1017
|
-
<a href="https://github.com/matthewlarn/behavioral-agentic-design-system" target="_blank" rel="noreferrer">
|
|
1018
|
-
<BookOpen className="h-4 w-4" strokeWidth={1.5} /> Learn more
|
|
1019
|
-
</a>
|
|
1020
|
-
</Button>
|
|
1021
|
-
</div>
|
|
1022
|
-
</section>
|
|
1023
|
-
|
|
1024
|
-
<Separator />
|
|
1025
|
-
|
|
1026
|
-
<section className="space-y-6" id="setup">
|
|
1027
|
-
<div className="space-y-2 max-w-2xl">
|
|
1028
|
-
<h2 className="text-2xl font-semibold tracking-tight">Set it up in one prompt</h2>
|
|
1029
|
-
<p className="text-base text-muted-foreground leading-relaxed">
|
|
1030
|
-
Paste the prompt below into a Claude Code session. Claude will walk you through
|
|
1031
|
-
the full setup — rename, brand context, voice, tokens, components — with a
|
|
1032
|
-
commit at every step.
|
|
1033
|
-
</p>
|
|
1034
|
-
</div>
|
|
1035
|
-
<CopyablePromptCard
|
|
1036
|
-
title="Run the full setup with one prompt"
|
|
1037
|
-
description="Paste into Claude Code at the repo root. Includes rename, brand context, voice, microcopy, tokens, and components."
|
|
1038
|
-
prompt={SETUP_PROMPT}
|
|
1039
|
-
icon={Wand2}
|
|
1040
|
-
highlighted
|
|
1041
|
-
/>
|
|
1042
|
-
</section>
|
|
1043
|
-
|
|
1044
|
-
<Separator />
|
|
1045
|
-
|
|
1046
|
-
<footer className="text-sm text-muted-foreground py-8">
|
|
1047
|
-
<p>
|
|
1048
|
-
<Sparkles className="h-3.5 w-3.5 inline mr-1" strokeWidth={1.5} />
|
|
1049
|
-
This is a BADS fork. Questions? Check out the{" "}
|
|
1050
|
-
<a href="https://github.com/matthewlarn/behavioral-agentic-design-system" className="underline hover:text-foreground">
|
|
1051
|
-
full documentation
|
|
1052
|
-
</a>
|
|
1053
|
-
.
|
|
1054
|
-
</p>
|
|
1055
|
-
</footer>
|
|
273
|
+
return (
|
|
274
|
+
<div data-slot="home-tab" className="size-full overflow-y-auto">
|
|
275
|
+
<div className="mx-auto flex w-full max-w-5xl flex-col gap-10 px-4 py-10 sm:px-6 lg:px-8">
|
|
276
|
+
<BadsUpdateBanner />
|
|
277
|
+
|
|
278
|
+
<section className="flex flex-col gap-5">
|
|
279
|
+
<div className="flex items-center gap-2 text-sm text-muted-foreground">
|
|
280
|
+
<Sparkles className="size-4 text-primary" strokeWidth={1.5} />
|
|
281
|
+
<span className="font-mono uppercase tracking-wide">{brand.name}</span>
|
|
282
|
+
<Badge variant="secondary" className="ml-1">
|
|
283
|
+
v{require("@/packages/core/package.json").version}
|
|
284
|
+
</Badge>
|
|
1056
285
|
</div>
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
<Button size="sm" variant="default" className="gap-2" asChild>
|
|
1084
|
-
<a href="#customize">
|
|
1085
|
-
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Customize
|
|
1086
|
-
</a>
|
|
1087
|
-
</Button>
|
|
1088
|
-
<Button size="sm" variant="outline" className="gap-2" onClick={handleBrowseComponents} type="button">
|
|
1089
|
-
<Package className="h-4 w-4" strokeWidth={1.5} /> Components
|
|
1090
|
-
</Button>
|
|
1091
|
-
<Button size="sm" variant="outline" className="gap-2" asChild>
|
|
1092
|
-
<a href="#quickstart">
|
|
1093
|
-
<Terminal className="h-4 w-4" strokeWidth={1.5} /> Install
|
|
1094
|
-
</a>
|
|
1095
|
-
</Button>
|
|
1096
|
-
</div>
|
|
1097
|
-
</section>
|
|
1098
|
-
|
|
1099
|
-
<Separator />
|
|
1100
|
-
|
|
1101
|
-
{/* METRICS */}
|
|
1102
|
-
<section className="space-y-6">
|
|
1103
|
-
<SectionHeading
|
|
1104
|
-
eyebrow="At a glance"
|
|
1105
|
-
title="Your design system"
|
|
1106
|
-
/>
|
|
1107
|
-
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
|
1108
|
-
<MetricCard
|
|
1109
|
-
icon={Package}
|
|
1110
|
-
value={componentCount}
|
|
1111
|
-
label="Components"
|
|
1112
|
-
/>
|
|
1113
|
-
<MetricCard
|
|
1114
|
-
icon={Palette}
|
|
1115
|
-
value={semanticTokenCount}
|
|
1116
|
-
label="Semantic tokens"
|
|
1117
|
-
/>
|
|
1118
|
-
<MetricCard
|
|
1119
|
-
icon={ShieldCheck}
|
|
1120
|
-
value="AAA"
|
|
1121
|
-
label="WCAG-ready"
|
|
1122
|
-
/>
|
|
1123
|
-
<MetricCard
|
|
1124
|
-
icon={Heart}
|
|
1125
|
-
value={brand.colors.length}
|
|
1126
|
-
label="Brand colors"
|
|
1127
|
-
/>
|
|
1128
|
-
</div>
|
|
1129
|
-
</section>
|
|
1130
|
-
|
|
1131
|
-
<Separator />
|
|
1132
|
-
|
|
1133
|
-
{/* BRAND SNAPSHOT */}
|
|
1134
|
-
<section className="space-y-6">
|
|
1135
|
-
<SectionHeading
|
|
1136
|
-
eyebrow="Identity"
|
|
1137
|
-
title="Brand at a glance"
|
|
1138
|
-
/>
|
|
1139
|
-
<div className="grid md:grid-cols-3 gap-4">
|
|
1140
|
-
{/* Color */}
|
|
1141
|
-
<Card className="gap-0">
|
|
1142
|
-
<CardHeader className="pb-2">
|
|
1143
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1144
|
-
<Palette className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1145
|
-
Colors
|
|
1146
|
-
</CardTitle>
|
|
1147
|
-
</CardHeader>
|
|
1148
|
-
<CardContent className="flex-1 flex flex-col gap-3">
|
|
1149
|
-
<div className="h-20 rounded-lg bg-primary border" />
|
|
1150
|
-
{brand.colors.length > 1 && (
|
|
1151
|
-
<div
|
|
1152
|
-
className="grid gap-1.5"
|
|
1153
|
-
style={{
|
|
1154
|
-
gridTemplateColumns: `repeat(${Math.min(brand.colors.length - 1, 8)}, minmax(0, 1fr))`,
|
|
1155
|
-
}}
|
|
1156
|
-
>
|
|
1157
|
-
{brand.colors.slice(1).map((c) => (
|
|
1158
|
-
<div
|
|
1159
|
-
key={c.id}
|
|
1160
|
-
className="aspect-square rounded border"
|
|
1161
|
-
style={{ backgroundColor: c.primary }}
|
|
1162
|
-
title={`${c.label} · ${c.primary}`}
|
|
1163
|
-
/>
|
|
1164
|
-
))}
|
|
1165
|
-
</div>
|
|
1166
|
-
)}
|
|
1167
|
-
<Button
|
|
1168
|
-
size="sm"
|
|
1169
|
-
variant="outline"
|
|
1170
|
-
className="mt-auto w-full gap-2"
|
|
1171
|
-
onClick={() => setTab("colors")}
|
|
1172
|
-
>
|
|
1173
|
-
<Wand2 className="h-3.5 w-3.5" strokeWidth={1.5} /> Customize
|
|
1174
|
-
</Button>
|
|
1175
|
-
</CardContent>
|
|
1176
|
-
</Card>
|
|
1177
|
-
|
|
1178
|
-
{/* Type */}
|
|
1179
|
-
<Card className="gap-0">
|
|
1180
|
-
<CardHeader className="pb-2">
|
|
1181
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1182
|
-
<Type className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1183
|
-
Typography
|
|
1184
|
-
</CardTitle>
|
|
1185
|
-
</CardHeader>
|
|
1186
|
-
<CardContent className="flex-1 flex flex-col gap-3">
|
|
1187
|
-
<div className="space-y-1">
|
|
1188
|
-
<p className="text-2xl font-semibold leading-none">The quick brown fox</p>
|
|
1189
|
-
<p className="text-base">Body text at 18px by default.</p>
|
|
1190
|
-
</div>
|
|
1191
|
-
<dl className="grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs">
|
|
1192
|
-
<dt className="text-muted-foreground">Sans</dt>
|
|
1193
|
-
<dd className="font-sans truncate">{brand.fonts?.[0]?.label ?? "Default sans"}</dd>
|
|
1194
|
-
<dt className="text-muted-foreground">Serif</dt>
|
|
1195
|
-
<dd className="font-serif truncate">Default serif</dd>
|
|
1196
|
-
<dt className="text-muted-foreground">Mono</dt>
|
|
1197
|
-
<dd className="font-mono truncate">Default mono</dd>
|
|
1198
|
-
</dl>
|
|
1199
|
-
<Button
|
|
1200
|
-
size="sm"
|
|
1201
|
-
variant="outline"
|
|
1202
|
-
className="mt-auto w-full gap-2"
|
|
1203
|
-
onClick={() => setTab("colors")}
|
|
1204
|
-
>
|
|
1205
|
-
<Wand2 className="h-3.5 w-3.5" strokeWidth={1.5} /> Customize
|
|
1206
|
-
</Button>
|
|
1207
|
-
</CardContent>
|
|
1208
|
-
</Card>
|
|
1209
|
-
|
|
1210
|
-
{/* Voice */}
|
|
1211
|
-
<Card className="gap-0">
|
|
1212
|
-
<CardHeader className="pb-2">
|
|
1213
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1214
|
-
<Heart className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1215
|
-
Voice
|
|
1216
|
-
</CardTitle>
|
|
1217
|
-
</CardHeader>
|
|
1218
|
-
<CardContent className="flex-1 flex flex-col gap-3">
|
|
1219
|
-
<div className="flex flex-wrap gap-1.5">
|
|
1220
|
-
<Badge variant="secondary" className="text-xs">Friendly</Badge>
|
|
1221
|
-
<Badge variant="secondary" className="text-xs">Daring</Badge>
|
|
1222
|
-
<Badge variant="secondary" className="text-xs">Radiant</Badge>
|
|
1223
|
-
<Badge variant="secondary" className="text-xs">Genuine</Badge>
|
|
1224
|
-
</div>
|
|
1225
|
-
{brand.tagline && (
|
|
1226
|
-
<p className="text-sm text-muted-foreground italic leading-snug">
|
|
1227
|
-
“{brand.tagline}”
|
|
1228
|
-
</p>
|
|
1229
|
-
)}
|
|
1230
|
-
<Button
|
|
1231
|
-
size="sm"
|
|
1232
|
-
variant="outline"
|
|
1233
|
-
className="mt-auto w-full gap-2"
|
|
1234
|
-
onClick={() => setTab("layers")}
|
|
1235
|
-
>
|
|
1236
|
-
<BookOpen className="h-3.5 w-3.5" strokeWidth={1.5} /> Edit
|
|
1237
|
-
</Button>
|
|
1238
|
-
</CardContent>
|
|
1239
|
-
</Card>
|
|
1240
|
-
</div>
|
|
1241
|
-
</section>
|
|
1242
|
-
|
|
1243
|
-
<Separator />
|
|
1244
|
-
|
|
1245
|
-
{/* NEXT STEPS */}
|
|
1246
|
-
<section className="space-y-6">
|
|
1247
|
-
<SectionHeading
|
|
1248
|
-
eyebrow="What's next"
|
|
1249
|
-
title="Get started using your system"
|
|
1250
|
-
/>
|
|
1251
|
-
<div className="grid md:grid-cols-2 gap-4">
|
|
1252
|
-
<Card>
|
|
1253
|
-
<CardHeader>
|
|
1254
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1255
|
-
<Eye className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} /> Preview components
|
|
1256
|
-
</CardTitle>
|
|
1257
|
-
<CardDescription>Browse all components in the showcase</CardDescription>
|
|
1258
|
-
</CardHeader>
|
|
1259
|
-
<CardContent>
|
|
1260
|
-
<Button size="sm" variant="outline" className="w-full gap-2" onClick={handleBrowseComponents} type="button">
|
|
1261
|
-
<Package className="h-4 w-4" strokeWidth={1.5} /> View
|
|
1262
|
-
</Button>
|
|
1263
|
-
</CardContent>
|
|
1264
|
-
</Card>
|
|
1265
|
-
<Card>
|
|
1266
|
-
<CardHeader>
|
|
1267
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1268
|
-
<Terminal className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} /> Install in your product
|
|
1269
|
-
</CardTitle>
|
|
1270
|
-
<CardDescription>Copy the npm install command</CardDescription>
|
|
1271
|
-
</CardHeader>
|
|
1272
|
-
<CardContent>
|
|
1273
|
-
<Button size="sm" variant="outline" className="w-full gap-2" asChild>
|
|
1274
|
-
<a href="#quickstart">
|
|
1275
|
-
<Code2 className="h-4 w-4" strokeWidth={1.5} /> Install
|
|
1276
|
-
</a>
|
|
1277
|
-
</Button>
|
|
1278
|
-
</CardContent>
|
|
1279
|
-
</Card>
|
|
1280
|
-
<Card>
|
|
1281
|
-
<CardHeader>
|
|
1282
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1283
|
-
<Layers className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} /> Customize colors + fonts
|
|
1284
|
-
</CardTitle>
|
|
1285
|
-
<CardDescription>Edit tokens in the Customize tab</CardDescription>
|
|
1286
|
-
</CardHeader>
|
|
1287
|
-
<CardContent>
|
|
1288
|
-
<Button size="sm" variant="outline" className="w-full gap-2" asChild>
|
|
1289
|
-
<a href="#customize">
|
|
1290
|
-
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Customize
|
|
1291
|
-
</a>
|
|
1292
|
-
</Button>
|
|
1293
|
-
</CardContent>
|
|
1294
|
-
</Card>
|
|
1295
|
-
</div>
|
|
1296
|
-
</section>
|
|
1297
|
-
|
|
1298
|
-
<Separator />
|
|
1299
|
-
|
|
1300
|
-
{/* FOOTER */}
|
|
1301
|
-
<footer className="text-sm text-muted-foreground py-8">
|
|
1302
|
-
<p>
|
|
1303
|
-
<Sparkles className="h-3.5 w-3.5 inline mr-1" strokeWidth={1.5} />
|
|
1304
|
-
Built on{" "}
|
|
1305
|
-
<a href="https://github.com/matthewlarn/behavioral-agentic-design-system" className="underline hover:text-foreground">
|
|
1306
|
-
BADS
|
|
1307
|
-
</a>
|
|
1308
|
-
. Components, tokens, and brand voice, all in one system.
|
|
1309
|
-
</p>
|
|
1310
|
-
</footer>
|
|
286
|
+
<h1 className="text-4xl font-semibold tracking-tight sm:text-5xl">
|
|
287
|
+
{brand.mission ?? "A behavioral, agentic design system."}
|
|
288
|
+
</h1>
|
|
289
|
+
<p className="max-w-2xl text-base text-muted-foreground sm:text-lg">
|
|
290
|
+
{brand.differentiator ??
|
|
291
|
+
"BADS ships ten layers — foundation, tokens, components, patterns, agent rules, enforcement, automation — as one portable package. The Docs tab below shows the entire system."}
|
|
292
|
+
</p>
|
|
293
|
+
<div className="mt-2 flex flex-wrap items-center gap-3">
|
|
294
|
+
<Button
|
|
295
|
+
size="lg"
|
|
296
|
+
className="gap-2"
|
|
297
|
+
onClick={() => openDocAt("README.md")}
|
|
298
|
+
>
|
|
299
|
+
<BookOpen className="size-4" strokeWidth={1.5} />
|
|
300
|
+
Browse the Docs
|
|
301
|
+
<ArrowRight className="size-4" strokeWidth={1.5} />
|
|
302
|
+
</Button>
|
|
303
|
+
<Button
|
|
304
|
+
size="lg"
|
|
305
|
+
variant="outline"
|
|
306
|
+
className="gap-2"
|
|
307
|
+
onClick={onBrowseComponents}
|
|
308
|
+
>
|
|
309
|
+
<Palette className="size-4" strokeWidth={1.5} />
|
|
310
|
+
View Components
|
|
311
|
+
</Button>
|
|
1311
312
|
</div>
|
|
1312
|
-
</
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
.home-stagger > *:nth-child(8) { animation-delay: 420ms; }
|
|
1340
|
-
.home-stagger > *:nth-child(n+9) { animation-delay: 480ms; }
|
|
1341
|
-
}
|
|
1342
|
-
`}</style>
|
|
1343
|
-
<div className="home-stagger max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 sm:py-12 space-y-12 sm:space-y-16">
|
|
1344
|
-
<BadsUpdateBanner />
|
|
1345
|
-
{/* HERO */}
|
|
1346
|
-
<section className="space-y-6">
|
|
1347
|
-
<div className="flex items-center gap-3 flex-wrap">
|
|
1348
|
-
<Badge variant="secondary" className="text-xs">
|
|
1349
|
-
v{corePkg.version}
|
|
1350
|
-
</Badge>
|
|
1351
|
-
<Badge variant="outline" className="text-xs">
|
|
1352
|
-
<Sun className="h-3 w-3 mr-1" strokeWidth={1.5} /> Light
|
|
1353
|
-
</Badge>
|
|
1354
|
-
<Badge variant="outline" className="text-xs">
|
|
1355
|
-
<Moon className="h-3 w-3 mr-1" strokeWidth={1.5} /> Dark
|
|
1356
|
-
</Badge>
|
|
1357
|
-
<Badge variant="outline" className="text-xs">
|
|
1358
|
-
<Accessibility className="h-3 w-3 mr-1" strokeWidth={1.5} /> WCAG AAA-ready
|
|
1359
|
-
</Badge>
|
|
1360
|
-
</div>
|
|
1361
|
-
|
|
1362
|
-
<div className="flex items-start gap-4 sm:gap-5">
|
|
1363
|
-
<div className="h-12 w-12 sm:h-16 sm:w-16 rounded-2xl bg-primary flex items-center justify-center shrink-0 shadow-sm text-primary-foreground">
|
|
1364
|
-
<BrandMark size={32} />
|
|
1365
|
-
</div>
|
|
1366
|
-
<div className="space-y-3 min-w-0">
|
|
1367
|
-
<h1 className="text-3xl sm:text-4xl lg:text-5xl font-semibold tracking-tight text-balance">
|
|
1368
|
-
{brand.name}{" "}
|
|
1369
|
-
<span className="text-muted-foreground font-normal">{brand.tagline}</span>
|
|
1370
|
-
</h1>
|
|
1371
|
-
<p className="text-base sm:text-lg text-muted-foreground max-w-3xl leading-relaxed">
|
|
1372
|
-
A complete, production-ready design system. Tokens, components, brand voice,
|
|
1373
|
-
ethics, and accessibility — all wired together so humans and AI can build
|
|
1374
|
-
on it without breaking the rules.
|
|
1375
|
-
</p>
|
|
1376
|
-
</div>
|
|
1377
|
-
</div>
|
|
1378
|
-
|
|
1379
|
-
<div className="flex items-center gap-2 flex-wrap pt-2">
|
|
1380
|
-
{SHOW_ONBOARDING_SECTION && (
|
|
1381
|
-
<Button size="sm" variant="default" className="gap-2" asChild>
|
|
1382
|
-
<a href="#onboard">
|
|
1383
|
-
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Onboard with AI
|
|
1384
|
-
</a>
|
|
1385
|
-
</Button>
|
|
1386
|
-
)}
|
|
1387
|
-
<Button size="sm" variant="outline" className="gap-2" onClick={handleBrowseComponents} type="button">
|
|
1388
|
-
<Package className="h-4 w-4" strokeWidth={1.5} /> Browse components
|
|
1389
|
-
</Button>
|
|
1390
|
-
</div>
|
|
1391
|
-
</section>
|
|
1392
|
-
|
|
1393
|
-
<Separator />
|
|
1394
|
-
|
|
1395
|
-
{/* METRICS */}
|
|
1396
|
-
<section className="space-y-6">
|
|
1397
|
-
<SectionHeading
|
|
1398
|
-
eyebrow="What's in the box"
|
|
1399
|
-
title="Delivered, accounted for"
|
|
1400
|
-
description="Every number on this page is read live from the source files in this repo. If it changes, the dashboard updates."
|
|
1401
|
-
/>
|
|
1402
|
-
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
|
1403
|
-
<MetricCard
|
|
1404
|
-
icon={Package}
|
|
1405
|
-
value={componentCount}
|
|
1406
|
-
label="Components"
|
|
1407
|
-
hint="Each with full a11y contract"
|
|
1408
|
-
/>
|
|
1409
|
-
<MetricCard
|
|
1410
|
-
icon={Palette}
|
|
1411
|
-
value={semanticTokenCount}
|
|
1412
|
-
label="Semantic tokens"
|
|
1413
|
-
hint={`${primitiveTokenCount} primitive colors`}
|
|
1414
|
-
/>
|
|
1415
|
-
<MetricCard
|
|
1416
|
-
icon={Layers}
|
|
1417
|
-
value={SHIPPED_LAYERS.length}
|
|
1418
|
-
label="Layers shipped"
|
|
1419
|
-
hint="All 10 layers complete"
|
|
1420
|
-
/>
|
|
1421
|
-
<MetricCard
|
|
1422
|
-
icon={ShieldCheck}
|
|
1423
|
-
value="AAA"
|
|
1424
|
-
label="WCAG-ready"
|
|
1425
|
-
hint="7:1 contrast, enforced on commit"
|
|
1426
|
-
/>
|
|
1427
|
-
</div>
|
|
1428
|
-
</section>
|
|
1429
|
-
|
|
1430
|
-
{/* THE STACK */}
|
|
1431
|
-
<section className="space-y-6">
|
|
1432
|
-
<SectionHeading
|
|
1433
|
-
eyebrow="The stack"
|
|
1434
|
-
title="Ten layers, all shipped"
|
|
1435
|
-
description="A layered architecture where lower layers are the ingredients and higher layers are the recipes. v1 ships everything you need to leave the system in a good place. v2 is gated behind real signals, added only when a real problem asks for them."
|
|
1436
|
-
/>
|
|
1437
|
-
<div className="space-y-2">
|
|
1438
|
-
{SHIPPED_LAYERS.map((layer) => {
|
|
1439
|
-
const isOpen = openLayers.has(layer.n);
|
|
1440
|
-
const isDeferred = (layer.status as "shipped" | "deferred") === "deferred";
|
|
1441
|
-
return (
|
|
1442
|
-
<button
|
|
1443
|
-
key={layer.n}
|
|
1444
|
-
onClick={() => toggleLayer(layer.n)}
|
|
1445
|
-
className={`w-full text-left transition-colors rounded-lg border ${
|
|
1446
|
-
isDeferred
|
|
1447
|
-
? "border-dashed hover:bg-accent/40"
|
|
1448
|
-
: "hover:bg-accent/40"
|
|
1449
|
-
}`}
|
|
1450
|
-
>
|
|
1451
|
-
<div className="p-4 flex items-start gap-3">
|
|
1452
|
-
<ChevronRight
|
|
1453
|
-
className={`h-5 w-5 text-muted-foreground mt-0.5 shrink-0 transition-transform ${
|
|
1454
|
-
isOpen ? "rotate-90" : ""
|
|
1455
|
-
}`}
|
|
1456
|
-
strokeWidth={1.5}
|
|
1457
|
-
/>
|
|
1458
|
-
{isDeferred ? (
|
|
1459
|
-
<Circle
|
|
1460
|
-
className="h-5 w-5 text-muted-foreground/50 mt-0.5 shrink-0"
|
|
1461
|
-
strokeWidth={1.5}
|
|
1462
|
-
/>
|
|
1463
|
-
) : (
|
|
1464
|
-
<CheckCircle2
|
|
1465
|
-
className="h-5 w-5 text-primary mt-0.5 shrink-0"
|
|
1466
|
-
strokeWidth={1.5}
|
|
1467
|
-
/>
|
|
1468
|
-
)}
|
|
1469
|
-
<div className="flex-1 min-w-0">
|
|
1470
|
-
<div className="flex items-baseline gap-2 flex-wrap">
|
|
1471
|
-
<span className="text-xs font-mono text-muted-foreground">
|
|
1472
|
-
Layer {layer.n}
|
|
1473
|
-
</span>
|
|
1474
|
-
<span
|
|
1475
|
-
className={`font-semibold ${
|
|
1476
|
-
isDeferred ? "text-muted-foreground" : ""
|
|
1477
|
-
}`}
|
|
1478
|
-
>
|
|
1479
|
-
{layer.name}
|
|
1480
|
-
</span>
|
|
1481
|
-
</div>
|
|
1482
|
-
<p className="text-sm text-muted-foreground mt-0.5">
|
|
1483
|
-
{layer.note}
|
|
1484
|
-
</p>
|
|
1485
|
-
</div>
|
|
1486
|
-
</div>
|
|
1487
|
-
|
|
1488
|
-
{isOpen && (
|
|
1489
|
-
<div className="px-4 pb-4 ml-8 border-l border-border space-y-2">
|
|
1490
|
-
{layer.details.map((detail, idx) => (
|
|
1491
|
-
<div key={idx} className="flex gap-2 text-sm">
|
|
1492
|
-
<span className="text-muted-foreground shrink-0">•</span>
|
|
1493
|
-
<span className="text-foreground/80">{detail}</span>
|
|
1494
|
-
</div>
|
|
1495
|
-
))}
|
|
1496
|
-
</div>
|
|
1497
|
-
)}
|
|
1498
|
-
</button>
|
|
1499
|
-
);
|
|
1500
|
-
})}
|
|
1501
|
-
</div>
|
|
1502
|
-
</section>
|
|
1503
|
-
|
|
1504
|
-
<Separator />
|
|
1505
|
-
|
|
1506
|
-
{/* CAPABILITIES */}
|
|
1507
|
-
<section className="space-y-6" id="capabilities">
|
|
1508
|
-
<SectionHeading
|
|
1509
|
-
eyebrow="Capabilities at a glance"
|
|
1510
|
-
title="Everything the system ships, in one read"
|
|
1511
|
-
description="Every feature BADS includes: design exploration, persona discipline, components, accessibility, automation, self-improvement loops, sync model. The full discoverable index lives in CAPABILITIES.md; the cards below are the orientation."
|
|
1512
|
-
/>
|
|
1513
|
-
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
1514
|
-
{CAPABILITY_SECTIONS.map((section) => {
|
|
1515
|
-
const Icon = section.icon;
|
|
1516
|
-
return (
|
|
1517
|
-
<Card key={section.title} className="flex flex-col">
|
|
1518
|
-
<CardHeader>
|
|
1519
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1520
|
-
<Icon className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1521
|
-
{section.title}
|
|
1522
|
-
</CardTitle>
|
|
1523
|
-
<CardDescription className="leading-relaxed">
|
|
1524
|
-
{section.summary}
|
|
1525
|
-
</CardDescription>
|
|
1526
|
-
</CardHeader>
|
|
1527
|
-
<CardContent className="flex-1 space-y-3">
|
|
1528
|
-
<ul className="space-y-1.5">
|
|
1529
|
-
{section.highlights.map((h) => (
|
|
1530
|
-
<li key={h} className="flex gap-2 text-sm">
|
|
1531
|
-
<span className="text-muted-foreground shrink-0">•</span>
|
|
1532
|
-
<span className="text-foreground/80 leading-relaxed">{h}</span>
|
|
1533
|
-
</li>
|
|
1534
|
-
))}
|
|
1535
|
-
</ul>
|
|
1536
|
-
<p className="text-xs font-mono text-muted-foreground pt-1">
|
|
1537
|
-
{section.doc}
|
|
1538
|
-
</p>
|
|
1539
|
-
</CardContent>
|
|
1540
|
-
</Card>
|
|
1541
|
-
);
|
|
1542
|
-
})}
|
|
1543
|
-
</div>
|
|
1544
|
-
<p className="text-sm text-muted-foreground">
|
|
1545
|
-
Full discoverable index with every script, prompt, and surface:{" "}
|
|
1546
|
-
<code className="font-mono text-xs text-foreground">CAPABILITIES.md</code>
|
|
1547
|
-
</p>
|
|
1548
|
-
</section>
|
|
1549
|
-
|
|
1550
|
-
<Separator />
|
|
1551
|
-
|
|
1552
|
-
{/* SELF-IMPROVEMENT LOOPS */}
|
|
1553
|
-
<section className="space-y-6" id="loops">
|
|
1554
|
-
<SectionHeading
|
|
1555
|
-
eyebrow="Self-improvement loops"
|
|
1556
|
-
title="The system compounds"
|
|
1557
|
-
description="Ten feedback loops turn one-shot work into permanent memory. Critique findings, prototype verdicts, and futures-risk findings land in append-only JSONL ledgers; monthly and quarterly Agent runs mine them into rules, lints, and refreshed anti-defaults. Cross-fork patterns aggregate locally."
|
|
1558
|
-
/>
|
|
1559
|
-
<div className="grid md:grid-cols-2 gap-4">
|
|
1560
|
-
{SELF_IMPROVEMENT_LOOPS.map((loop) => (
|
|
1561
|
-
<Card key={loop.name}>
|
|
1562
|
-
<CardHeader className="pb-3">
|
|
1563
|
-
<div className="flex items-center justify-between gap-3">
|
|
1564
|
-
<CardTitle className="text-base">{loop.name}</CardTitle>
|
|
1565
|
-
<Badge variant="outline" className="text-xs font-mono whitespace-nowrap">
|
|
1566
|
-
{loop.cadence}
|
|
1567
|
-
</Badge>
|
|
1568
|
-
</div>
|
|
1569
|
-
<CardDescription className="leading-relaxed">
|
|
1570
|
-
{loop.summary}
|
|
1571
|
-
</CardDescription>
|
|
1572
|
-
</CardHeader>
|
|
1573
|
-
<CardContent className="space-y-1.5 pt-0">
|
|
1574
|
-
<div className="flex gap-2 text-sm">
|
|
1575
|
-
<span className="text-muted-foreground shrink-0 w-16">where</span>
|
|
1576
|
-
<code className="font-mono text-xs text-foreground/80">
|
|
1577
|
-
{loop.where}
|
|
1578
|
-
</code>
|
|
1579
|
-
</div>
|
|
1580
|
-
<div className="flex gap-2 text-sm">
|
|
1581
|
-
<span className="text-muted-foreground shrink-0 w-16">run</span>
|
|
1582
|
-
<code className="font-mono text-xs text-foreground/80">
|
|
1583
|
-
{loop.runWith}
|
|
1584
|
-
</code>
|
|
1585
|
-
</div>
|
|
1586
|
-
</CardContent>
|
|
1587
|
-
</Card>
|
|
1588
|
-
))}
|
|
1589
|
-
</div>
|
|
1590
|
-
<p className="text-sm text-muted-foreground">
|
|
1591
|
-
End-to-end documentation:{" "}
|
|
1592
|
-
<code className="font-mono text-xs text-foreground">CLAUDE.md → Self-improvement loops</code>{" "}
|
|
1593
|
-
and{" "}
|
|
1594
|
-
<code className="font-mono text-xs text-foreground">ledgers/README.md</code>
|
|
1595
|
-
</p>
|
|
1596
|
-
</section>
|
|
1597
|
-
|
|
1598
|
-
<Separator />
|
|
1599
|
-
|
|
1600
|
-
{/* AUTOMATION */}
|
|
1601
|
-
<section className="space-y-6" id="automation">
|
|
1602
|
-
<SectionHeading
|
|
1603
|
-
eyebrow="Automation"
|
|
1604
|
-
title="Schedulers behind the loops"
|
|
1605
|
-
description="GitHub Actions for everything CI-friendly; a local launchd plist for the cross-fork aggregator (which needs filesystem access to multiple forks). Each surface can be disabled independently by deleting its workflow file or running the uninstall script."
|
|
1606
|
-
/>
|
|
1607
|
-
<Card>
|
|
1608
|
-
<CardContent className="py-4 divide-y divide-border">
|
|
1609
|
-
{AUTOMATION_SURFACES.map((surface) => (
|
|
1610
|
-
<div key={surface.label} className="py-3 first:pt-0 last:pb-0">
|
|
1611
|
-
<div className="flex items-center justify-between gap-3 flex-wrap">
|
|
1612
|
-
<code className="font-mono text-sm text-foreground font-medium">
|
|
1613
|
-
{surface.label}
|
|
1614
|
-
</code>
|
|
1615
|
-
<Badge variant="outline" className="text-xs font-mono">
|
|
1616
|
-
{surface.cadence}
|
|
1617
|
-
</Badge>
|
|
1618
|
-
</div>
|
|
1619
|
-
<p className="text-sm text-muted-foreground leading-relaxed mt-1.5">
|
|
1620
|
-
{surface.summary}
|
|
1621
|
-
</p>
|
|
1622
|
-
<p className="text-xs font-mono text-muted-foreground mt-1.5">
|
|
1623
|
-
{surface.where}
|
|
1624
|
-
</p>
|
|
1625
|
-
</div>
|
|
1626
|
-
))}
|
|
1627
|
-
</CardContent>
|
|
1628
|
-
</Card>
|
|
1629
|
-
<p className="text-sm text-muted-foreground">
|
|
1630
|
-
Full surface documentation:{" "}
|
|
1631
|
-
<code className="font-mono text-xs text-foreground">automation/README.md</code>
|
|
313
|
+
</section>
|
|
314
|
+
|
|
315
|
+
<Separator />
|
|
316
|
+
|
|
317
|
+
<section className="flex flex-col gap-4">
|
|
318
|
+
<h2 className="text-sm font-semibold uppercase tracking-wide text-muted-foreground">
|
|
319
|
+
What ships today
|
|
320
|
+
</h2>
|
|
321
|
+
<div className="grid grid-cols-2 gap-3 sm:grid-cols-4">
|
|
322
|
+
<MetricPill label="Layers" value={LAYER_COUNT} />
|
|
323
|
+
<MetricPill label="Components" value={componentCount} />
|
|
324
|
+
<MetricPill label="Tokens" value={primitiveTokenCount + semanticTokenCount} />
|
|
325
|
+
<MetricPill label="Docs" value={DOCS_TOTAL} />
|
|
326
|
+
</div>
|
|
327
|
+
</section>
|
|
328
|
+
|
|
329
|
+
<Separator />
|
|
330
|
+
|
|
331
|
+
{/* COPY-PASTE PROMPTS FOR CLAUDE CODE */}
|
|
332
|
+
<section className="flex flex-col gap-5">
|
|
333
|
+
<div>
|
|
334
|
+
<h2 className="text-2xl font-semibold tracking-tight">
|
|
335
|
+
Copy a prompt to get started
|
|
336
|
+
</h2>
|
|
337
|
+
<p className="mt-1 max-w-2xl text-sm text-muted-foreground">
|
|
338
|
+
Paste any of these into Claude Code exactly as written. Each one
|
|
339
|
+
interviews you for the specifics, so nothing needs filling in first.
|
|
1632
340
|
</p>
|
|
1633
|
-
</
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
<CopyablePromptCard
|
|
1647
|
-
title="Run the full setup with one prompt"
|
|
1648
|
-
description="Copy this prompt, paste it into Claude Code at the repo root. Claude walks you through rename, source discovery, token setup, component registry, and accessibility baseline, committing at each step."
|
|
1649
|
-
prompt={SETUP_PROMPT}
|
|
1650
|
-
icon={Wand2}
|
|
1651
|
-
highlighted
|
|
1652
|
-
/>
|
|
1653
|
-
</section>
|
|
1654
|
-
</>
|
|
1655
|
-
)}
|
|
1656
|
-
|
|
1657
|
-
<Separator />
|
|
1658
|
-
|
|
1659
|
-
{/* BRAND SNAPSHOT */}
|
|
1660
|
-
<section className="space-y-6">
|
|
1661
|
-
<SectionHeading
|
|
1662
|
-
eyebrow="Brand snapshot"
|
|
1663
|
-
title="The visual identity"
|
|
1664
|
-
description="Colors, type, and motion are tokenized. Change one file and every component follows."
|
|
1665
|
-
/>
|
|
1666
|
-
<div className="grid md:grid-cols-3 gap-4">
|
|
1667
|
-
{/* Color */}
|
|
1668
|
-
<Card>
|
|
1669
|
-
<CardHeader>
|
|
1670
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1671
|
-
<Palette className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1672
|
-
Brand color
|
|
1673
|
-
</CardTitle>
|
|
1674
|
-
</CardHeader>
|
|
1675
|
-
<CardContent className="space-y-3">
|
|
1676
|
-
<div className="h-20 rounded-lg bg-primary border" />
|
|
1677
|
-
<div className="grid grid-cols-5 gap-1.5">
|
|
1678
|
-
<div className="aspect-square rounded bg-background border" title="background" />
|
|
1679
|
-
<div className="aspect-square rounded bg-foreground border" title="foreground" />
|
|
1680
|
-
<div className="aspect-square rounded bg-muted border" title="muted" />
|
|
1681
|
-
<div className="aspect-square rounded bg-accent border" title="accent" />
|
|
1682
|
-
<div className="aspect-square rounded bg-destructive border" title="destructive" />
|
|
1683
|
-
</div>
|
|
1684
|
-
<p className="text-xs text-muted-foreground">
|
|
1685
|
-
Switchable in the Customize tab. Custom brand colors auto-shift toward AAA 7:1 if they don't already meet it.
|
|
1686
|
-
</p>
|
|
1687
|
-
</CardContent>
|
|
1688
|
-
</Card>
|
|
1689
|
-
|
|
1690
|
-
{/* Type */}
|
|
1691
|
-
<Card>
|
|
1692
|
-
<CardHeader>
|
|
1693
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1694
|
-
<Type className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1695
|
-
Typography
|
|
1696
|
-
</CardTitle>
|
|
1697
|
-
</CardHeader>
|
|
1698
|
-
<CardContent className="space-y-3">
|
|
1699
|
-
<p className="text-2xl font-semibold leading-none">The quick brown fox</p>
|
|
1700
|
-
<p className="text-base">Body text reads at 18px by default for comfort.</p>
|
|
1701
|
-
<p className="text-sm font-mono text-muted-foreground">
|
|
1702
|
-
Sans · Serif · Mono, all swappable
|
|
1703
|
-
</p>
|
|
1704
|
-
</CardContent>
|
|
1705
|
-
</Card>
|
|
1706
|
-
|
|
1707
|
-
{/* Voice */}
|
|
1708
|
-
<Card>
|
|
1709
|
-
<CardHeader>
|
|
1710
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1711
|
-
<Heart className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1712
|
-
Voice
|
|
1713
|
-
</CardTitle>
|
|
1714
|
-
</CardHeader>
|
|
1715
|
-
<CardContent className="space-y-3">
|
|
1716
|
-
<div className="flex flex-wrap gap-1.5">
|
|
1717
|
-
<Badge variant="secondary">Friendly</Badge>
|
|
1718
|
-
<Badge variant="secondary">Daring</Badge>
|
|
1719
|
-
<Badge variant="secondary">Radiant</Badge>
|
|
1720
|
-
<Badge variant="secondary">Genuine</Badge>
|
|
1721
|
-
</div>
|
|
1722
|
-
<p className="text-sm text-muted-foreground italic leading-relaxed">
|
|
1723
|
-
“Sentence case. No exclamation points unless we mean it. Calm on
|
|
1724
|
-
errors, brief on success.”
|
|
1725
|
-
</p>
|
|
1726
|
-
<p className="text-xs font-mono text-muted-foreground">
|
|
1727
|
-
layer-1-foundation/voice-and-tone.md
|
|
1728
|
-
</p>
|
|
1729
|
-
</CardContent>
|
|
1730
|
-
</Card>
|
|
1731
|
-
</div>
|
|
1732
|
-
</section>
|
|
1733
|
-
|
|
1734
|
-
{/* COMPONENTS */}
|
|
1735
|
-
<section className="space-y-6" id="components">
|
|
1736
|
-
<SectionHeading
|
|
1737
|
-
eyebrow="Component library"
|
|
1738
|
-
title={`${componentCount} components, registered and documented`}
|
|
1739
|
-
description="Every component has a purpose, prop signature, anti-patterns, and a structured a11y contract. Agents pick from this list. They never invent new ones."
|
|
1740
|
-
/>
|
|
1741
|
-
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
1742
|
-
{COMPONENT_GROUPS.map((group) => (
|
|
1743
|
-
<Card key={group.title}>
|
|
1744
|
-
<CardHeader className="pb-3">
|
|
1745
|
-
<CardTitle className="text-sm font-semibold">{group.title}</CardTitle>
|
|
1746
|
-
</CardHeader>
|
|
1747
|
-
<CardContent className="pt-0 flex flex-wrap gap-1.5">
|
|
1748
|
-
{group.items
|
|
1749
|
-
.filter((item) => componentNames.includes(item))
|
|
1750
|
-
.map((item) => (
|
|
1751
|
-
<Badge key={item} variant="outline" className="font-mono text-xs">
|
|
1752
|
-
{item}
|
|
1753
|
-
</Badge>
|
|
1754
|
-
))}
|
|
1755
|
-
</CardContent>
|
|
1756
|
-
</Card>
|
|
1757
|
-
))}
|
|
1758
|
-
</div>
|
|
1759
|
-
</section>
|
|
341
|
+
</div>
|
|
342
|
+
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4">
|
|
343
|
+
{CLAUDE_PROMPTS.map((p) => (
|
|
344
|
+
<PromptCard
|
|
345
|
+
key={p.id}
|
|
346
|
+
icon={p.icon}
|
|
347
|
+
title={p.title}
|
|
348
|
+
blurb={p.blurb}
|
|
349
|
+
prompt={p.prompt}
|
|
350
|
+
/>
|
|
351
|
+
))}
|
|
352
|
+
</div>
|
|
353
|
+
</section>
|
|
1760
354
|
|
|
1761
|
-
|
|
1762
|
-
<section className="space-y-6">
|
|
1763
|
-
<SectionHeading
|
|
1764
|
-
eyebrow="Adding components"
|
|
1765
|
-
title="From component idea to pixel-perfect baseline"
|
|
1766
|
-
description="New components move through a constrained path: prove the need, write the registry contract, build from tokens, story every state, then let automated checks catch drift before release."
|
|
1767
|
-
/>
|
|
1768
|
-
<div className="grid lg:grid-cols-2 gap-4">
|
|
1769
|
-
<Card>
|
|
1770
|
-
<CardHeader>
|
|
1771
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1772
|
-
<Package className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1773
|
-
How a component gets added
|
|
1774
|
-
</CardTitle>
|
|
1775
|
-
<CardDescription>
|
|
1776
|
-
The registry is the gate. Implementation follows the contract.
|
|
1777
|
-
</CardDescription>
|
|
1778
|
-
</CardHeader>
|
|
1779
|
-
<CardContent className="space-y-4">
|
|
1780
|
-
{COMPONENT_ADDITION_STEPS.map((step, index) => {
|
|
1781
|
-
const Icon = step.icon;
|
|
1782
|
-
return (
|
|
1783
|
-
<div key={step.title} className="flex gap-3">
|
|
1784
|
-
<div className="h-9 w-9 rounded-lg border bg-muted flex items-center justify-center shrink-0">
|
|
1785
|
-
<Icon className="h-4 w-4 text-primary" strokeWidth={1.5} />
|
|
1786
|
-
</div>
|
|
1787
|
-
<div className="space-y-1">
|
|
1788
|
-
<div className="flex items-center gap-2 flex-wrap">
|
|
1789
|
-
<span className="text-xs font-mono text-muted-foreground">
|
|
1790
|
-
0{index + 1}
|
|
1791
|
-
</span>
|
|
1792
|
-
<p className="text-sm font-medium">{step.title}</p>
|
|
1793
|
-
</div>
|
|
1794
|
-
<p className="text-sm text-muted-foreground leading-relaxed">
|
|
1795
|
-
{step.detail}
|
|
1796
|
-
</p>
|
|
1797
|
-
</div>
|
|
1798
|
-
</div>
|
|
1799
|
-
);
|
|
1800
|
-
})}
|
|
1801
|
-
</CardContent>
|
|
1802
|
-
</Card>
|
|
355
|
+
<Separator />
|
|
1803
356
|
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
Pixel quality is protected by schema, a11y, story, and visual-regression checks.
|
|
1812
|
-
</CardDescription>
|
|
1813
|
-
</CardHeader>
|
|
1814
|
-
<CardContent>
|
|
1815
|
-
<div className="divide-y divide-border">
|
|
1816
|
-
{COMPONENT_QUALITY_GATES.map((gate) => {
|
|
1817
|
-
const Icon = gate.icon;
|
|
1818
|
-
return (
|
|
1819
|
-
<div key={gate.label} className="py-3 first:pt-0 last:pb-0 flex gap-3">
|
|
1820
|
-
<Icon
|
|
1821
|
-
className="h-4 w-4 text-primary mt-0.5 shrink-0"
|
|
1822
|
-
strokeWidth={1.5}
|
|
1823
|
-
/>
|
|
1824
|
-
<div className="space-y-1 min-w-0">
|
|
1825
|
-
<p className="text-sm font-medium">{gate.label}</p>
|
|
1826
|
-
<p className="text-sm text-muted-foreground leading-relaxed">
|
|
1827
|
-
{gate.detail}
|
|
1828
|
-
</p>
|
|
1829
|
-
</div>
|
|
1830
|
-
</div>
|
|
1831
|
-
);
|
|
1832
|
-
})}
|
|
1833
|
-
</div>
|
|
1834
|
-
</CardContent>
|
|
1835
|
-
</Card>
|
|
357
|
+
<section className="flex flex-col gap-5">
|
|
358
|
+
<div className="flex items-end justify-between gap-4">
|
|
359
|
+
<div>
|
|
360
|
+
<h2 className="text-2xl font-semibold tracking-tight">Where to start</h2>
|
|
361
|
+
<p className="mt-1 text-sm text-muted-foreground">
|
|
362
|
+
Four entry points into the Docs tab. Pick the one that matches what you're here for.
|
|
363
|
+
</p>
|
|
1836
364
|
</div>
|
|
1837
|
-
</
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
365
|
+
</div>
|
|
366
|
+
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2">
|
|
367
|
+
{STARTER_CARDS.map((card) => {
|
|
368
|
+
const Icon = card.icon;
|
|
369
|
+
return (
|
|
370
|
+
<Card
|
|
371
|
+
key={card.id}
|
|
372
|
+
role="button"
|
|
373
|
+
tabIndex={0}
|
|
374
|
+
onClick={() => openDocAt(card.path)}
|
|
375
|
+
onKeyDown={(e) => {
|
|
376
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
377
|
+
e.preventDefault();
|
|
378
|
+
openDocAt(card.path);
|
|
379
|
+
}
|
|
380
|
+
}}
|
|
381
|
+
className="group cursor-pointer transition-colors hover:border-primary/40 hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
|
382
|
+
style={{
|
|
383
|
+
transitionDuration: "var(--duration-fast)",
|
|
384
|
+
transitionTimingFunction: "var(--ease-out)",
|
|
385
|
+
}}
|
|
386
|
+
>
|
|
387
|
+
<CardHeader className="gap-3">
|
|
388
|
+
<Icon
|
|
389
|
+
className="size-5 text-primary"
|
|
1852
390
|
strokeWidth={1.5}
|
|
1853
391
|
/>
|
|
1854
|
-
<div className="min-w-0
|
|
1855
|
-
<
|
|
1856
|
-
<
|
|
392
|
+
<div className="flex min-w-0 flex-col gap-1">
|
|
393
|
+
<CardTitle className="text-base">{card.title}</CardTitle>
|
|
394
|
+
<CardDescription>{card.description}</CardDescription>
|
|
1857
395
|
</div>
|
|
1858
|
-
</CardContent>
|
|
1859
|
-
</Card>
|
|
1860
|
-
))}
|
|
1861
|
-
</div>
|
|
1862
|
-
</section>
|
|
1863
|
-
|
|
1864
|
-
{/* ETHICS */}
|
|
1865
|
-
<section className="space-y-6">
|
|
1866
|
-
<SectionHeading
|
|
1867
|
-
eyebrow="Ethics & responsibility"
|
|
1868
|
-
title="Five principles, baked into the system"
|
|
1869
|
-
description="Layer 2 ships decision trees, anti-pattern catalogs, and a pre-commit linter that flags confirmshame, default-opt-in toggles, and undisclosed AI-authored code."
|
|
1870
|
-
/>
|
|
1871
|
-
<Card>
|
|
1872
|
-
<CardContent className="py-6 grid md:grid-cols-5 gap-4">
|
|
1873
|
-
{[
|
|
1874
|
-
"Transparency",
|
|
1875
|
-
"Equity",
|
|
1876
|
-
"Privacy-First",
|
|
1877
|
-
"Consent-Driven",
|
|
1878
|
-
"Anti-Dark-Patterns",
|
|
1879
|
-
].map((principle) => (
|
|
1880
|
-
<div key={principle} className="flex items-center gap-2">
|
|
1881
|
-
<ShieldCheck
|
|
1882
|
-
className="h-5 w-5 text-primary shrink-0"
|
|
1883
|
-
strokeWidth={1.5}
|
|
1884
|
-
/>
|
|
1885
|
-
<span className="text-sm font-medium leading-none">{principle}</span>
|
|
1886
|
-
</div>
|
|
1887
|
-
))}
|
|
1888
|
-
</CardContent>
|
|
1889
|
-
</Card>
|
|
1890
|
-
<p className="text-sm text-muted-foreground">
|
|
1891
|
-
Nine anti-patterns the system refuses to ship: confirmshame, manufactured
|
|
1892
|
-
urgency, default-opt-in marketing, friction on cancel, hidden pricing, infinite
|
|
1893
|
-
scroll on kids' surfaces, third-party trackers on kids' surfaces,
|
|
1894
|
-
non-color status indicators, and undisclosed agent-authored code.
|
|
1895
|
-
</p>
|
|
1896
|
-
</section>
|
|
1897
|
-
|
|
1898
|
-
<Separator />
|
|
1899
|
-
|
|
1900
|
-
{/* QUICKSTART */}
|
|
1901
|
-
<section className="space-y-6" id="quickstart">
|
|
1902
|
-
<SectionHeading
|
|
1903
|
-
eyebrow="For engineers"
|
|
1904
|
-
title="Everything you need to know"
|
|
1905
|
-
description="Installation, setup, customization, and reference docs for consuming and extending this system."
|
|
1906
|
-
/>
|
|
1907
|
-
|
|
1908
|
-
{/* Installation */}
|
|
1909
|
-
<div>
|
|
1910
|
-
<h3 className="text-sm font-semibold mb-3">Installation & Setup</h3>
|
|
1911
|
-
<div className="grid md:grid-cols-2 gap-4">
|
|
1912
|
-
<Card>
|
|
1913
|
-
<CardHeader>
|
|
1914
|
-
<CardTitle className="text-sm flex items-center gap-2">
|
|
1915
|
-
<Terminal className="h-4 w-4" strokeWidth={1.5} /> Install the package
|
|
1916
|
-
</CardTitle>
|
|
1917
396
|
</CardHeader>
|
|
1918
397
|
<CardContent>
|
|
1919
|
-
<
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
</div>
|
|
1933
|
-
</div>
|
|
1934
|
-
|
|
1935
|
-
{/* Component Usage */}
|
|
1936
|
-
<div>
|
|
1937
|
-
<h3 className="text-sm font-semibold mb-3">Using Components</h3>
|
|
1938
|
-
<Card>
|
|
1939
|
-
<CardHeader>
|
|
1940
|
-
<CardTitle className="text-sm flex items-center gap-2">
|
|
1941
|
-
<Code2 className="h-4 w-4" strokeWidth={1.5} /> Import and use
|
|
1942
|
-
</CardTitle>
|
|
1943
|
-
</CardHeader>
|
|
1944
|
-
<CardContent>
|
|
1945
|
-
<CodeBlock>{`import { Button, Card, Input } from "${corePkg.name}/components/ui";
|
|
1946
|
-
|
|
1947
|
-
export function Example() {
|
|
1948
|
-
return (
|
|
1949
|
-
<Card>
|
|
1950
|
-
<Button>Start here</Button>
|
|
1951
|
-
<Input placeholder="Enter text..." />
|
|
1952
|
-
</Card>
|
|
1953
|
-
);
|
|
1954
|
-
}`}</CodeBlock>
|
|
1955
|
-
</CardContent>
|
|
1956
|
-
</Card>
|
|
1957
|
-
<p className="text-sm text-muted-foreground mt-3">
|
|
1958
|
-
All components are unstyled by default and accept Tailwind class strings via <code className="font-mono text-xs text-foreground">className</code>. Full component registry with props, variants, and a11y contracts at <code className="font-mono text-xs text-foreground">layer-5-component-registry/component-registry.json</code>.
|
|
1959
|
-
</p>
|
|
1960
|
-
</div>
|
|
1961
|
-
|
|
1962
|
-
{/* Customization */}
|
|
1963
|
-
<div>
|
|
1964
|
-
<h3 className="text-sm font-semibold mb-3">Customization</h3>
|
|
1965
|
-
<div className="grid md:grid-cols-2 gap-4">
|
|
1966
|
-
<Card>
|
|
1967
|
-
<CardHeader>
|
|
1968
|
-
<CardTitle className="text-sm flex items-center gap-2">
|
|
1969
|
-
<Palette className="h-4 w-4" strokeWidth={1.5} /> Tokens & theme
|
|
1970
|
-
</CardTitle>
|
|
1971
|
-
</CardHeader>
|
|
1972
|
-
<CardContent className="text-sm text-muted-foreground space-y-2">
|
|
1973
|
-
<p>Edit <code className="font-mono text-xs text-foreground">tokens.json</code> to customize colors, spacing, typography, and motion. Run <code className="font-mono text-xs text-foreground">pnpm build:tokens</code> to regenerate CSS variables.</p>
|
|
1974
|
-
</CardContent>
|
|
1975
|
-
</Card>
|
|
1976
|
-
<Card>
|
|
1977
|
-
<CardHeader>
|
|
1978
|
-
<CardTitle className="text-sm flex items-center gap-2">
|
|
1979
|
-
<Sparkles className="h-4 w-4" strokeWidth={1.5} /> Brand config
|
|
1980
|
-
</CardTitle>
|
|
1981
|
-
</CardHeader>
|
|
1982
|
-
<CardContent className="text-sm text-muted-foreground space-y-2">
|
|
1983
|
-
<p>Update <code className="font-mono text-xs text-foreground">brand.config.ts</code> with your mission, audience, product surfaces, and brand colors. This flows into the preview shell header and the Customize tab.</p>
|
|
1984
|
-
</CardContent>
|
|
1985
|
-
</Card>
|
|
1986
|
-
</div>
|
|
1987
|
-
</div>
|
|
1988
|
-
|
|
1989
|
-
{/* Development */}
|
|
1990
|
-
<div>
|
|
1991
|
-
<h3 className="text-sm font-semibold mb-3">Development</h3>
|
|
1992
|
-
<div className="grid md:grid-cols-2 gap-4">
|
|
1993
|
-
<Card>
|
|
1994
|
-
<CardHeader>
|
|
1995
|
-
<CardTitle className="text-sm flex items-center gap-2">
|
|
1996
|
-
<FileText className="h-4 w-4" strokeWidth={1.5} /> Storybook
|
|
1997
|
-
</CardTitle>
|
|
1998
|
-
</CardHeader>
|
|
1999
|
-
<CardContent className="text-sm text-muted-foreground">
|
|
2000
|
-
<CodeBlock>{`pnpm storybook`}</CodeBlock>
|
|
2001
|
-
<p className="mt-2">Test matrix: every component, all variants, all sizes, disabled/loading/error states.</p>
|
|
2002
|
-
</CardContent>
|
|
2003
|
-
</Card>
|
|
2004
|
-
<Card>
|
|
2005
|
-
<CardHeader>
|
|
2006
|
-
<CardTitle className="text-sm flex items-center gap-2">
|
|
2007
|
-
<Eye className="h-4 w-4" strokeWidth={1.5} /> Preview app
|
|
2008
|
-
</CardTitle>
|
|
2009
|
-
</CardHeader>
|
|
2010
|
-
<CardContent className="text-sm text-muted-foreground">
|
|
2011
|
-
<CodeBlock>{`pnpm dev`}</CodeBlock>
|
|
2012
|
-
<p className="mt-2">Live preview with all tabs: Components, Cards, Dashboard, Mail, Pricing, Customize, Layers.</p>
|
|
2013
|
-
</CardContent>
|
|
2014
|
-
</Card>
|
|
2015
|
-
</div>
|
|
2016
|
-
</div>
|
|
2017
|
-
|
|
2018
|
-
{/* Reference */}
|
|
2019
|
-
<div>
|
|
2020
|
-
<h3 className="text-sm font-semibold mb-3">Reference</h3>
|
|
2021
|
-
<div className="grid md:grid-cols-2 gap-4">
|
|
2022
|
-
<Card>
|
|
2023
|
-
<CardHeader>
|
|
2024
|
-
<CardTitle className="text-sm">TypeScript support</CardTitle>
|
|
2025
|
-
</CardHeader>
|
|
2026
|
-
<CardContent className="text-sm text-muted-foreground">
|
|
2027
|
-
Full TypeScript support. All components export prop types. CVA variants are fully typed.
|
|
2028
|
-
</CardContent>
|
|
2029
|
-
</Card>
|
|
2030
|
-
<Card>
|
|
2031
|
-
<CardHeader>
|
|
2032
|
-
<CardTitle className="text-sm">Browser & Node support</CardTitle>
|
|
2033
|
-
</CardHeader>
|
|
2034
|
-
<CardContent className="text-sm text-muted-foreground">
|
|
2035
|
-
Node 18+. Browsers: Chrome, Firefox, Safari, Edge (latest 2 versions). ESM only.
|
|
2036
|
-
</CardContent>
|
|
2037
|
-
</Card>
|
|
2038
|
-
<Card>
|
|
2039
|
-
<CardHeader>
|
|
2040
|
-
<CardTitle className="text-sm">Accessibility</CardTitle>
|
|
2041
|
-
</CardHeader>
|
|
2042
|
-
<CardContent className="text-sm text-muted-foreground">
|
|
2043
|
-
WCAG 2.2 AAA baseline. 7:1 contrast, 44×44px touch targets, full keyboard support, <code className="font-mono text-xs text-foreground">prefers-reduced-motion</code> honored.
|
|
2044
|
-
</CardContent>
|
|
2045
|
-
</Card>
|
|
2046
|
-
<Card>
|
|
2047
|
-
<CardHeader>
|
|
2048
|
-
<CardTitle className="text-sm">Pre-commit checks</CardTitle>
|
|
2049
|
-
</CardHeader>
|
|
2050
|
-
<CardContent className="text-sm text-muted-foreground">
|
|
2051
|
-
<code className="font-mono text-xs text-foreground">pnpm a11y</code> runs contrast audit + a11y lint. <code className="font-mono text-xs text-foreground">pnpm check:stories</code> blocks commits without story coverage.
|
|
398
|
+
<div className="flex items-center justify-between text-xs text-muted-foreground">
|
|
399
|
+
<code className="truncate font-mono" title={card.path}>
|
|
400
|
+
{card.path}
|
|
401
|
+
</code>
|
|
402
|
+
<ArrowRight
|
|
403
|
+
className="size-3.5 shrink-0 transition-transform"
|
|
404
|
+
strokeWidth={1.5}
|
|
405
|
+
style={{
|
|
406
|
+
transitionDuration: "var(--duration-fast)",
|
|
407
|
+
transitionTimingFunction: "var(--ease-out)",
|
|
408
|
+
}}
|
|
409
|
+
/>
|
|
410
|
+
</div>
|
|
2052
411
|
</CardContent>
|
|
2053
412
|
</Card>
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
{brand.repo ? (
|
|
2087
|
-
<a
|
|
2088
|
-
href={`${brand.repo}/issues`}
|
|
2089
|
-
target="_blank"
|
|
2090
|
-
rel="noreferrer"
|
|
2091
|
-
className="font-mono text-xs text-link underline-offset-4 hover:underline"
|
|
2092
|
-
>
|
|
2093
|
-
{brand.repo.replace(/^https?:\/\//, "")}/issues
|
|
2094
|
-
</a>
|
|
2095
|
-
) : (
|
|
2096
|
-
<code className="font-mono text-xs text-foreground">
|
|
2097
|
-
github repo not configured
|
|
2098
|
-
</code>
|
|
2099
|
-
)}
|
|
2100
|
-
.
|
|
2101
|
-
</CardContent>
|
|
2102
|
-
</Card>
|
|
2103
|
-
<Card>
|
|
2104
|
-
<CardHeader>
|
|
2105
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
2106
|
-
<Briefcase className="h-4 w-4" strokeWidth={1.5} /> Hire me
|
|
2107
|
-
</CardTitle>
|
|
2108
|
-
</CardHeader>
|
|
2109
|
-
<CardContent className="text-sm text-muted-foreground">
|
|
2110
|
-
Need help getting your design system set up, or want a fractional design leader plugged into your team? I do both — long-running engagements and one-off stand-ups.{" "}
|
|
2111
|
-
<a
|
|
2112
|
-
href="mailto:work@matthewstephens.com"
|
|
2113
|
-
className="text-primary hover:underline font-medium"
|
|
2114
|
-
>
|
|
2115
|
-
work@matthewstephens.com
|
|
2116
|
-
</a>
|
|
2117
|
-
</CardContent>
|
|
2118
|
-
</Card>
|
|
2119
|
-
</div>
|
|
2120
|
-
</section>
|
|
2121
|
-
|
|
2122
|
-
{/* FOOTER */}
|
|
2123
|
-
<Separator />
|
|
2124
|
-
<footer className="space-y-3 pb-8">
|
|
2125
|
-
<div className="flex items-center justify-between flex-wrap gap-4">
|
|
2126
|
-
<div className="flex items-center gap-2">
|
|
2127
|
-
<div className="h-7 w-7 rounded-md bg-primary flex items-center justify-center text-primary-foreground">
|
|
2128
|
-
<BrandMark size={16} />
|
|
2129
|
-
</div>
|
|
2130
|
-
<span className="font-semibold">{brand.name}</span>
|
|
2131
|
-
<Badge variant="outline" className="text-xs">
|
|
2132
|
-
{brand.tagline}
|
|
2133
|
-
</Badge>
|
|
2134
|
-
<Badge variant="secondary" className="text-xs font-mono">
|
|
2135
|
-
v{corePkg.version}
|
|
2136
|
-
</Badge>
|
|
2137
|
-
</div>
|
|
2138
|
-
<div className="flex items-center gap-2 text-sm text-muted-foreground">
|
|
2139
|
-
<Ruler className="h-4 w-4" strokeWidth={1.5} />
|
|
2140
|
-
<span>Built on the BADS template</span>
|
|
2141
|
-
<span>·</span>
|
|
2142
|
-
<Box className="h-4 w-4" strokeWidth={1.5} />
|
|
2143
|
-
<span className="font-mono">{corePkg.name}</span>
|
|
2144
|
-
</div>
|
|
2145
|
-
</div>
|
|
2146
|
-
</footer>
|
|
413
|
+
);
|
|
414
|
+
})}
|
|
415
|
+
</div>
|
|
416
|
+
</section>
|
|
417
|
+
|
|
418
|
+
<Separator />
|
|
419
|
+
|
|
420
|
+
<section className="flex flex-col gap-4">
|
|
421
|
+
<h2 className="text-sm font-semibold uppercase tracking-wide text-muted-foreground">
|
|
422
|
+
The Docs tab indexes {DOCS_INDEX.length} categories
|
|
423
|
+
</h2>
|
|
424
|
+
<div className="flex flex-wrap gap-2">
|
|
425
|
+
{DOCS_INDEX.map((group) => (
|
|
426
|
+
<Badge
|
|
427
|
+
key={group.id}
|
|
428
|
+
variant="outline"
|
|
429
|
+
className="cursor-pointer transition-colors hover:bg-accent/50"
|
|
430
|
+
style={{
|
|
431
|
+
transitionDuration: "var(--duration-fast)",
|
|
432
|
+
transitionTimingFunction: "var(--ease-out)",
|
|
433
|
+
}}
|
|
434
|
+
onClick={() => {
|
|
435
|
+
const first = group.entries[0];
|
|
436
|
+
if (first) openDocAt(first.path);
|
|
437
|
+
}}
|
|
438
|
+
title={`${group.entries.length} docs · ${group.description}`}
|
|
439
|
+
>
|
|
440
|
+
{group.label} ({group.entries.length})
|
|
441
|
+
</Badge>
|
|
442
|
+
))}
|
|
443
|
+
</div>
|
|
444
|
+
</section>
|
|
2147
445
|
</div>
|
|
2148
|
-
</
|
|
446
|
+
</div>
|
|
2149
447
|
);
|
|
2150
448
|
}
|