@behavioral-agentic-design-system/core 0.6.0 → 0.8.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/LICENSE +21 -0
- package/package.json +35 -6
- package/scripts/bads-sync.mjs +1 -1
- package/scripts/build-fonts.cjs +15 -8
- package/scripts/build-tokens.cjs +139 -23
- package/src/api/brand-fonts.ts +27 -6
- package/src/api/layers/file.ts +4 -3
- package/src/api/layers.ts +41 -12
- package/src/api/onboarding-extract.ts +435 -0
- package/src/api/onboarding.ts +82 -0
- package/src/api/site-auth.ts +50 -0
- package/src/app/font-ready.tsx +1 -1
- package/src/app/layout.tsx +9 -3
- package/src/app/preview/components/page.tsx +78 -1
- package/src/app/preview/icons/page.tsx +5 -0
- package/src/app/shell.tsx +90 -23
- package/src/app/site-login/page.tsx +82 -0
- package/src/brand-fonts.css +5 -0
- package/src/components/Foundations/Colors.stories.tsx +10 -1
- package/src/components/Foundations/Motion.stories.tsx +66 -0
- package/src/components/customize/letter-spacing.tsx +3 -2
- package/src/components/customize/type-scale.tsx +3 -2
- package/src/components/customize-tab.tsx +11 -7
- package/src/components/home-tab.tsx +498 -235
- package/src/components/layers-tab.tsx +313 -10
- package/src/components/onboarding-wizard.tsx +1421 -0
- package/src/components/ui/alert.tsx +2 -2
- package/src/components/ui/bottom-sheet.tsx +124 -0
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/chart.tsx +115 -14
- package/src/components/ui/checkbox.tsx +3 -2
- package/src/components/ui/dialog.tsx +7 -4
- package/src/components/ui/dropdown-menu.tsx +4 -0
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/popover.tsx +6 -0
- package/src/components/ui/radio-group.tsx +4 -3
- package/src/components/ui/scroll-area.tsx +5 -0
- package/src/components/ui/select.tsx +4 -0
- package/src/components/ui/sheet.tsx +8 -1
- package/src/components/ui/slider.tsx +22 -7
- package/src/components/ui/switch.tsx +3 -3
- package/src/components/ui/tabs.tsx +6 -0
- package/src/components/ui/tooltip.tsx +4 -0
- package/src/fonts/HyperlegibleSans-Bold.woff2 +0 -0
- package/src/fonts/HyperlegibleSans-BoldItalic.woff2 +0 -0
- package/src/fonts/HyperlegibleSans-Italic.woff2 +0 -0
- package/src/fonts/HyperlegibleSans-Medium.woff2 +0 -0
- package/src/fonts/HyperlegibleSans-MediumItalic.woff2 +0 -0
- package/src/fonts/HyperlegibleSans-Regular.woff2 +0 -0
- package/src/fonts/InterVariable-Italic.woff2 +0 -0
- package/src/fonts/InterVariable.woff2 +0 -0
- package/src/fonts.css +99 -0
- package/src/hooks/use-global-primary-color.ts +114 -68
- package/src/hooks/use-global-serif-font.ts +1 -1
- package/src/hooks/use-portal-theme-class.tsx +90 -0
- package/src/lib/storage.ts +2 -2
- package/src/styles.css +151 -61
- package/src/tokens.default.json +4 -4
- package/src/tokens.json +159 -162
- package/src/app/preview/login/page.tsx +0 -5
- package/src/app/preview/mail/page.tsx +0 -4
- package/src/app/preview/pricing/page.tsx +0 -4
- package/src/components/admin-menu.stories.tsx +0 -68
- package/src/components/admin-menu.tsx +0 -59
|
@@ -48,14 +48,6 @@ import { Badge } from "@behavioral-agentic-design-system/core/components/ui/badg
|
|
|
48
48
|
import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
|
|
49
49
|
import { Separator } from "@behavioral-agentic-design-system/core/components/ui/separator";
|
|
50
50
|
import { ScrollArea } from "@behavioral-agentic-design-system/core/components/ui/scroll-area";
|
|
51
|
-
import {
|
|
52
|
-
Dialog,
|
|
53
|
-
DialogContent,
|
|
54
|
-
DialogDescription,
|
|
55
|
-
DialogHeader,
|
|
56
|
-
DialogTitle,
|
|
57
|
-
DialogTrigger,
|
|
58
|
-
} from "@behavioral-agentic-design-system/core/components/ui/dialog";
|
|
59
51
|
import { BrandMark } from "@behavioral-agentic-design-system/core/components/brand-mark";
|
|
60
52
|
import registry from "@/layer-5-component-registry/component-registry.json";
|
|
61
53
|
import tokens from "@/packages/core/src/tokens.json";
|
|
@@ -90,20 +82,25 @@ const componentCount = componentNames.length;
|
|
|
90
82
|
const SHIPPED_LAYERS = [
|
|
91
83
|
{
|
|
92
84
|
n: "1",
|
|
93
|
-
name: "
|
|
94
|
-
note: "
|
|
85
|
+
name: "Foundation",
|
|
86
|
+
note: "company, brand, voice, microcopy, personas, research, real content",
|
|
95
87
|
status: "shipped",
|
|
96
88
|
details: [
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
89
|
+
"Strategic foundation — who the company is, who it's for, how it sounds, and the research that anchors all of it. Everything downstream is a consequence of this layer",
|
|
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)",
|
|
100
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",
|
|
101
98
|
],
|
|
102
99
|
},
|
|
103
100
|
{
|
|
104
101
|
n: "2",
|
|
105
102
|
name: "Ethics & Responsibility",
|
|
106
|
-
note: "decision trees, anti-patterns, AI ethics",
|
|
103
|
+
note: "decision trees, anti-patterns, AI ethics, futures thinking",
|
|
107
104
|
status: "shipped",
|
|
108
105
|
details: [
|
|
109
106
|
"Builds user trust and protects the brand from legal + reputational risk — responsible decisions compound into loyal users",
|
|
@@ -111,19 +108,23 @@ const SHIPPED_LAYERS = [
|
|
|
111
108
|
"9 anti-patterns we never ship",
|
|
112
109
|
"AI labeling + algorithmic transparency rules",
|
|
113
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",
|
|
114
113
|
],
|
|
115
114
|
},
|
|
116
115
|
{
|
|
117
116
|
n: "3",
|
|
118
|
-
name: "
|
|
119
|
-
note: "
|
|
117
|
+
name: "Primitive Tokens",
|
|
118
|
+
note: "raw colors, type, spacing, motion, icons",
|
|
120
119
|
status: "shipped",
|
|
121
120
|
details: [
|
|
122
|
-
"
|
|
123
|
-
"Color primitive palette (
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
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",
|
|
127
128
|
],
|
|
128
129
|
},
|
|
129
130
|
{
|
|
@@ -156,11 +157,10 @@ const SHIPPED_LAYERS = [
|
|
|
156
157
|
n: "6",
|
|
157
158
|
name: "Patterns & Rules",
|
|
158
159
|
note: "decision trees for component picks",
|
|
159
|
-
status: "
|
|
160
|
+
status: "shipped",
|
|
160
161
|
details: [
|
|
161
162
|
"Provides decision trees for common UX choices — ensures consistent patterns that users recognize across surfaces",
|
|
162
|
-
"
|
|
163
|
-
"Will include decision trees for component selection",
|
|
163
|
+
"Decision trees for component selection",
|
|
164
164
|
"Pattern library for common UX flows",
|
|
165
165
|
],
|
|
166
166
|
},
|
|
@@ -173,44 +173,54 @@ const SHIPPED_LAYERS = [
|
|
|
173
173
|
"Lets AI tools (Claude Code, Cursor, v0) generate code that respects the system — designs ship faster with fewer manual tweaks",
|
|
174
174
|
"CLAUDE.md with full agent instructions",
|
|
175
175
|
".cursorrules for Cursor",
|
|
176
|
-
"system-prompt.md for v0 sessions",
|
|
176
|
+
"layer-7-agent-interface/system-prompt.md and v0-system.md for v0 sessions",
|
|
177
177
|
"AGENTS.md with loading precedence + escalation rules",
|
|
178
178
|
],
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
n: "8",
|
|
182
182
|
name: "Documentation",
|
|
183
|
-
note: "Storybook
|
|
183
|
+
note: "Storybook, preview app, capabilities index, exemplars",
|
|
184
184
|
status: "shipped",
|
|
185
185
|
details: [
|
|
186
186
|
"Makes every component discoverable and learnable — designers and engineers self-serve instead of asking questions",
|
|
187
187
|
"Storybook coverage for every component (Default + all variants)",
|
|
188
|
-
"Preview app with Components, Cards, Dashboard,
|
|
188
|
+
"Preview app with Home, Components, Cards, Dashboard, Layers, Icons, and Customize tabs",
|
|
189
189
|
"Chromatic visual regression wired to CI",
|
|
190
|
+
"CAPABILITIES.md as the single discoverable index of every feature BADS ships",
|
|
191
|
+
"Per-brand exemplars/ folder — pinned 'what good looks like' screenshots with annotations",
|
|
192
|
+
"corrections.md — per-fork anti-pattern log read before every Path B build",
|
|
190
193
|
],
|
|
191
194
|
},
|
|
192
195
|
{
|
|
193
196
|
n: "9",
|
|
194
197
|
name: "Enforcement",
|
|
195
|
-
note: "pre-commit
|
|
198
|
+
note: "pre-commit + CI gates, rule audit",
|
|
196
199
|
status: "shipped",
|
|
197
200
|
details: [
|
|
198
201
|
"Catches accessibility and brand violations before they ship — prevents costly bugs and ensures quality standards stick",
|
|
199
202
|
"pnpm wcag:audit — AAA contrast check on every token pair",
|
|
200
203
|
"pnpm a11y:lint — static scan for token violations + a11y issues",
|
|
201
204
|
"pnpm check:stories — blocks commits missing story updates",
|
|
205
|
+
"pnpm lint:bypass — flags raw card-shaped divs that bypass the <Card> primitive",
|
|
206
|
+
"pnpm audit:rules — every CLAUDE.md / layer-* rule must have a concrete example (CI runs --strict)",
|
|
207
|
+
"lint-tokens / lint-ui-contrast / lint-target-size / lint-ethics — additional source + WCAG checks",
|
|
202
208
|
],
|
|
203
209
|
},
|
|
204
210
|
{
|
|
205
211
|
n: "10",
|
|
206
212
|
name: "Automate",
|
|
207
|
-
note: "token build,
|
|
213
|
+
note: "token build, CI workflows, scheduled loops, launchd",
|
|
208
214
|
status: "shipped",
|
|
209
215
|
details: [
|
|
210
216
|
"Eliminates repetitive manual work — one token change ripples everywhere, CI catches regressions automatically",
|
|
211
217
|
"pnpm build:tokens regenerates styles.css + globals.css from tokens.json",
|
|
212
218
|
"pnpm fix:stories seeds missing story files from component source",
|
|
213
219
|
"Chromatic CI on every push to main",
|
|
220
|
+
"audit-rules CI on every PR touching CLAUDE.md or layer-*/README.md",
|
|
221
|
+
"Weekly digest Issue (Mondays 14:00 UTC) with ledger summaries, staleness, correction clusters",
|
|
222
|
+
"Monthly + quarterly Issues queue the Agent prompts for promotions, recipe mining, anti-defaults refresh",
|
|
223
|
+
"Local launchd plist runs pnpm aggregate weekly for cross-fork signal aggregation",
|
|
214
224
|
],
|
|
215
225
|
},
|
|
216
226
|
] as const;
|
|
@@ -352,6 +362,288 @@ const COMPONENT_QUALITY_GATES = [
|
|
|
352
362
|
},
|
|
353
363
|
] as const;
|
|
354
364
|
|
|
365
|
+
const CAPABILITY_SECTIONS = [
|
|
366
|
+
{
|
|
367
|
+
title: "Design exploration",
|
|
368
|
+
icon: Wand2,
|
|
369
|
+
summary:
|
|
370
|
+
"Direction-first builds with web research, Mobbin sweep, exemplars, anti-defaults, self + adversarial critique.",
|
|
371
|
+
highlights: [
|
|
372
|
+
"11 prompts and rules",
|
|
373
|
+
"Direction sketches before code on every Path B build",
|
|
374
|
+
"Independent critique runs adversarial review",
|
|
375
|
+
],
|
|
376
|
+
doc: "CAPABILITIES.md → Design exploration workflow",
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
title: "Persona discipline",
|
|
380
|
+
icon: MessageSquare,
|
|
381
|
+
summary:
|
|
382
|
+
"Three-tier personas + a persona pressure-test prompt + a data-driven analyst prompt + the real-content pool.",
|
|
383
|
+
highlights: [
|
|
384
|
+
"Primary / Secondary / Other tiers per fork",
|
|
385
|
+
"First-person pressure test ranks breaks BLOCKER → LOW",
|
|
386
|
+
"Real-content pool replaces Lorem ipsum across every story and prototype",
|
|
387
|
+
],
|
|
388
|
+
doc: "CAPABILITIES.md → Persona discipline",
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
title: "Component building",
|
|
392
|
+
icon: Package,
|
|
393
|
+
summary:
|
|
394
|
+
"The 7-phase component-builder skill, triage buckets, plan-before-code, the first-time-right checklist, useReducedMotion.",
|
|
395
|
+
highlights: [
|
|
396
|
+
"Triage buckets A/B/C/D force a bucket decision before any code",
|
|
397
|
+
".scratch/components/<name>.plan.md captures API, states, story matrix, a11y contract",
|
|
398
|
+
"pnpm visual-diff for image-mode builds",
|
|
399
|
+
],
|
|
400
|
+
doc: "CAPABILITIES.md → Component-building workflow",
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
title: "Tokens + theming",
|
|
404
|
+
icon: Palette,
|
|
405
|
+
summary:
|
|
406
|
+
"W3C DTCG tokens with BADS extensions, JSON schemas, chart palette derivation, Tokens Studio (Figma) integration.",
|
|
407
|
+
highlights: [
|
|
408
|
+
"BADS.wcag + BADS.modes $extensions in tokens.json",
|
|
409
|
+
"JSON schemas validated pre-commit",
|
|
410
|
+
"Tokens Studio (Figma) round-trips via DTCG without a custom export",
|
|
411
|
+
],
|
|
412
|
+
doc: "CAPABILITIES.md → Tokens + theming",
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
title: "Customize tab",
|
|
416
|
+
icon: Sparkles,
|
|
417
|
+
summary:
|
|
418
|
+
"In-product theme editor: brand picker, per-token swatches, font picker, type scale, letter spacing, brand mark, theme IO.",
|
|
419
|
+
highlights: [
|
|
420
|
+
"AAA grade pills + warning badges on non-AAA picks",
|
|
421
|
+
"Type scale + letter-spacing editors with live preview",
|
|
422
|
+
"Brand mark editor (paste or upload SVG, sanitized + monotone-detected)",
|
|
423
|
+
],
|
|
424
|
+
doc: "CAPABILITIES.md → Customize tab",
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
title: "Accessibility floor",
|
|
428
|
+
icon: Accessibility,
|
|
429
|
+
summary:
|
|
430
|
+
"WCAG 2.2 AAA enforced at build + audit time across token contrast, focus, target size, bypass, reduced motion.",
|
|
431
|
+
highlights: [
|
|
432
|
+
"pnpm wcag:audit blocks regressions on every commit",
|
|
433
|
+
"lint-target-size validates 24×24 hit area against the registry",
|
|
434
|
+
"lint-ui-contrast checks border/focus pairs ≥3:1",
|
|
435
|
+
],
|
|
436
|
+
doc: "CAPABILITIES.md → Accessibility floor",
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
title: "Patterns + rules",
|
|
440
|
+
icon: Combine,
|
|
441
|
+
summary:
|
|
442
|
+
"Decision trees for disclosure, empty states, loading states, feedback, confirmation. Lazy-loaded per task.",
|
|
443
|
+
highlights: [
|
|
444
|
+
"5 canonical pattern files",
|
|
445
|
+
"Loaded only when triggerKeywords in patterns.json match the task",
|
|
446
|
+
"Manifest-driven — agents pick what to read",
|
|
447
|
+
],
|
|
448
|
+
doc: "CAPABILITIES.md → Patterns + rules",
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
title: "Agent interface",
|
|
452
|
+
icon: Terminal,
|
|
453
|
+
summary:
|
|
454
|
+
"Single source of truth for AI tools: CLAUDE.md, manifests, AGENTS.md, .cursorrules, system-prompt, v0-system.",
|
|
455
|
+
highlights: [
|
|
456
|
+
"Three lazy-load manifests at session start (≈1k tokens each)",
|
|
457
|
+
"Layer files win over CLAUDE.md for in-scope rules",
|
|
458
|
+
"Layer 3 skill.md describes the primitive-tokens skill in machine-readable form",
|
|
459
|
+
],
|
|
460
|
+
doc: "CAPABILITIES.md → Agent interface",
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
title: "Developer experience",
|
|
464
|
+
icon: Terminal,
|
|
465
|
+
summary:
|
|
466
|
+
"pnpm dev:fresh, predev hook, verify-served + visual verification rules, audit scripts, pre-commit orchestrator.",
|
|
467
|
+
highlights: [
|
|
468
|
+
"predev hook auto-clears stale .next state",
|
|
469
|
+
"Visual verification rule forces screenshot before declaring done",
|
|
470
|
+
".husky/pre-commit runs the full gate suite",
|
|
471
|
+
],
|
|
472
|
+
doc: "CAPABILITIES.md → Developer experience",
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
title: "CI / CD + release",
|
|
476
|
+
icon: GitCompare,
|
|
477
|
+
summary:
|
|
478
|
+
"Chromatic, audit-rules on PR, weekly digest, monthly + quarterly Issue openers, publish-core on tag, changesets.",
|
|
479
|
+
highlights: [
|
|
480
|
+
"audit-rules.yml blocks merges that add vague rules",
|
|
481
|
+
"weekly-digest.yml posts to a labeled Issue every Monday",
|
|
482
|
+
"publish-core.yml ships to npm on v* tags with provenance",
|
|
483
|
+
],
|
|
484
|
+
doc: "CAPABILITIES.md → CI / CD + release",
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
title: "Self-improvement loops",
|
|
488
|
+
icon: Zap,
|
|
489
|
+
summary:
|
|
490
|
+
"Ledgers + monthly/quarterly Agent runs turn one-shot work into permanent memory across forks.",
|
|
491
|
+
highlights: [
|
|
492
|
+
"Three append-only JSONL ledgers under ledgers/",
|
|
493
|
+
"Monthly: promote-corrections + recipe-miner",
|
|
494
|
+
"Quarterly: anti-defaults refresh + staleness + cross-fork aggregator",
|
|
495
|
+
],
|
|
496
|
+
doc: "CAPABILITIES.md → Self-improvement loops",
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
title: "Sync model",
|
|
500
|
+
icon: GitCompare,
|
|
501
|
+
summary:
|
|
502
|
+
"Two-direction sync (upstream → forks via npm; forks → upstream via PR). Cross-fork aggregator informs upstream.",
|
|
503
|
+
highlights: [
|
|
504
|
+
"pnpm bads:sync pulls the latest @<slug>/core into a fork",
|
|
505
|
+
"BadsUpdateBanner surfaces new releases in-product",
|
|
506
|
+
"Aggregator anonymizes stakeholder names before any report",
|
|
507
|
+
],
|
|
508
|
+
doc: "CAPABILITIES.md → Sync model",
|
|
509
|
+
},
|
|
510
|
+
] as const;
|
|
511
|
+
|
|
512
|
+
const SELF_IMPROVEMENT_LOOPS = [
|
|
513
|
+
{
|
|
514
|
+
name: "Critique ledger",
|
|
515
|
+
cadence: "Per critique",
|
|
516
|
+
where: "ledgers/critiques.jsonl",
|
|
517
|
+
summary:
|
|
518
|
+
"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.",
|
|
519
|
+
runWith: "pnpm ledger:critiques",
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
name: "Verdict + recipe ledger",
|
|
523
|
+
cadence: "Per handoff",
|
|
524
|
+
where: "ledgers/prototypes.jsonl",
|
|
525
|
+
summary:
|
|
526
|
+
"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.",
|
|
527
|
+
runWith: "pnpm ledger:prototypes",
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
name: "Futures ledger",
|
|
531
|
+
cadence: "Per futures-check",
|
|
532
|
+
where: "ledgers/futures.jsonl",
|
|
533
|
+
summary:
|
|
534
|
+
"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.",
|
|
535
|
+
runWith: "pnpm ledger:futures",
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
name: "Corrections log",
|
|
539
|
+
cadence: "Per rejection",
|
|
540
|
+
where: "corrections.md",
|
|
541
|
+
summary:
|
|
542
|
+
"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.",
|
|
543
|
+
runWith: "pnpm cluster:corrections",
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
name: "Promote corrections → lints",
|
|
547
|
+
cadence: "First Monday / month",
|
|
548
|
+
where: "prompts/promote-corrections.md",
|
|
549
|
+
summary:
|
|
550
|
+
"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.",
|
|
551
|
+
runWith: "loops-monthly.yml opens an Issue with the run command",
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
name: "Recipe miner",
|
|
555
|
+
cadence: "First Monday / month",
|
|
556
|
+
where: "prompts/recipe-miner.md",
|
|
557
|
+
summary:
|
|
558
|
+
"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.",
|
|
559
|
+
runWith: "loops-monthly.yml opens an Issue with the run command",
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: "Anti-defaults refresh",
|
|
563
|
+
cadence: "First Monday / quarter",
|
|
564
|
+
where: "prompts/anti-defaults-refresh.md",
|
|
565
|
+
summary:
|
|
566
|
+
"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.",
|
|
567
|
+
runWith: "loops-quarterly.yml opens an Issue with the run command",
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
name: "Staleness check",
|
|
571
|
+
cadence: "Quarterly",
|
|
572
|
+
where: "scripts/check-staleness.mjs",
|
|
573
|
+
summary:
|
|
574
|
+
"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.",
|
|
575
|
+
runWith: "pnpm check:staleness",
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
name: "Cross-fork aggregator",
|
|
579
|
+
cadence: "Quarterly",
|
|
580
|
+
where: "aggregator/, scripts/aggregate-forks.mjs",
|
|
581
|
+
summary:
|
|
582
|
+
"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.",
|
|
583
|
+
runWith: "pnpm aggregate",
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
name: "Rule audit",
|
|
587
|
+
cadence: "Every PR",
|
|
588
|
+
where: "scripts/audit-rules.mjs",
|
|
589
|
+
summary:
|
|
590
|
+
"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.",
|
|
591
|
+
runWith: ".github/workflows/audit-rules.yml (strict on PR)",
|
|
592
|
+
},
|
|
593
|
+
] as const;
|
|
594
|
+
|
|
595
|
+
const AUTOMATION_SURFACES = [
|
|
596
|
+
{
|
|
597
|
+
label: "audit-rules.yml",
|
|
598
|
+
cadence: "Every PR",
|
|
599
|
+
summary:
|
|
600
|
+
"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.",
|
|
601
|
+
where: ".github/workflows/audit-rules.yml",
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
label: "weekly-digest.yml",
|
|
605
|
+
cadence: "Mondays 14:00 UTC",
|
|
606
|
+
summary:
|
|
607
|
+
"Executes check:staleness + ledger:critiques + ledger:prototypes + ledger:futures + cluster:corrections + lint:bypass:warn. Opens or updates a labeled self-improvement:weekly-digest Issue.",
|
|
608
|
+
where: ".github/workflows/weekly-digest.yml",
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
label: "loops-monthly.yml",
|
|
612
|
+
cadence: "First Monday / month",
|
|
613
|
+
summary:
|
|
614
|
+
"Opens a labeled self-improvement:monthly Issue queueing the two monthly Agent prompts (promote-corrections, recipe-miner) as checkbox checklists.",
|
|
615
|
+
where: ".github/workflows/loops-monthly.yml",
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
label: "loops-quarterly.yml",
|
|
619
|
+
cadence: "First Monday / quarter",
|
|
620
|
+
summary:
|
|
621
|
+
"Opens a labeled self-improvement:quarterly Issue queueing anti-defaults-refresh, staleness deep dive, the cross-fork aggregator, and the capability + rule hygiene pass.",
|
|
622
|
+
where: ".github/workflows/loops-quarterly.yml",
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
label: "com.bads.aggregate.plist",
|
|
626
|
+
cadence: "Mondays 09:30 local",
|
|
627
|
+
summary:
|
|
628
|
+
"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.",
|
|
629
|
+
where: "automation/local/ (bash install.sh / uninstall.sh)",
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
label: "chromatic.yml",
|
|
633
|
+
cadence: "Every push to main + PRs",
|
|
634
|
+
summary:
|
|
635
|
+
"Storybook visual regression. First push sets baseline; every PR posts a diff. Needs CHROMATIC_PROJECT_TOKEN secret.",
|
|
636
|
+
where: ".github/workflows/chromatic.yml",
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
label: "publish-core.yml",
|
|
640
|
+
cadence: "On v* tags",
|
|
641
|
+
summary:
|
|
642
|
+
"Builds tokens and publishes @behavioral-agentic-design-system/core to npm with provenance. Triggered by git tag push.",
|
|
643
|
+
where: ".github/workflows/publish-core.yml",
|
|
644
|
+
},
|
|
645
|
+
] as const;
|
|
646
|
+
|
|
355
647
|
function MetricCard({
|
|
356
648
|
icon: Icon,
|
|
357
649
|
value,
|
|
@@ -413,119 +705,6 @@ function CodeBlock({ children }: { children: string }) {
|
|
|
413
705
|
);
|
|
414
706
|
}
|
|
415
707
|
|
|
416
|
-
function CopyableCodeBlock({ code }: { code: string }) {
|
|
417
|
-
const [copied, setCopied] = useState(false);
|
|
418
|
-
const handleCopy = async () => {
|
|
419
|
-
try {
|
|
420
|
-
await navigator.clipboard.writeText(code);
|
|
421
|
-
setCopied(true);
|
|
422
|
-
setTimeout(() => setCopied(false), 2000);
|
|
423
|
-
} catch {}
|
|
424
|
-
};
|
|
425
|
-
return (
|
|
426
|
-
<div className="relative">
|
|
427
|
-
<pre className="bg-muted text-foreground rounded-lg p-4 pr-12 text-sm font-mono overflow-x-auto border">
|
|
428
|
-
<code>{code}</code>
|
|
429
|
-
</pre>
|
|
430
|
-
<Button
|
|
431
|
-
type="button"
|
|
432
|
-
size="icon"
|
|
433
|
-
variant="ghost"
|
|
434
|
-
onClick={handleCopy}
|
|
435
|
-
className="absolute top-2 right-2 size-8"
|
|
436
|
-
aria-label={copied ? "Copied" : "Copy to clipboard"}
|
|
437
|
-
>
|
|
438
|
-
{copied ? (
|
|
439
|
-
<Check className="h-3.5 w-3.5" strokeWidth={1.5} />
|
|
440
|
-
) : (
|
|
441
|
-
<ClipboardCopy className="h-3.5 w-3.5" strokeWidth={1.5} />
|
|
442
|
-
)}
|
|
443
|
-
</Button>
|
|
444
|
-
</div>
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
function QuickstartDialog({ trigger }: { trigger: React.ReactNode }) {
|
|
449
|
-
const pkg = corePkg.name;
|
|
450
|
-
return (
|
|
451
|
-
<Dialog>
|
|
452
|
-
<DialogTrigger asChild>{trigger}</DialogTrigger>
|
|
453
|
-
<DialogContent className="max-w-2xl max-h-[85vh] overflow-y-auto">
|
|
454
|
-
<DialogHeader>
|
|
455
|
-
<DialogTitle className="flex items-center gap-2">
|
|
456
|
-
<Terminal className="h-5 w-5" strokeWidth={1.5} />
|
|
457
|
-
Install in your product
|
|
458
|
-
</DialogTitle>
|
|
459
|
-
<DialogDescription>
|
|
460
|
-
Everything you need to consume this design system from another codebase.
|
|
461
|
-
</DialogDescription>
|
|
462
|
-
</DialogHeader>
|
|
463
|
-
|
|
464
|
-
<div className="space-y-5 pt-2">
|
|
465
|
-
<div>
|
|
466
|
-
<h3 className="text-sm font-semibold mb-2">1. Install the package</h3>
|
|
467
|
-
<CopyableCodeBlock code={`pnpm add ${pkg}`} />
|
|
468
|
-
</div>
|
|
469
|
-
|
|
470
|
-
<div>
|
|
471
|
-
<h3 className="text-sm font-semibold mb-2">2. Import the styles</h3>
|
|
472
|
-
<CopyableCodeBlock code={`import "${pkg}/styles.css";`} />
|
|
473
|
-
<p className="text-sm text-muted-foreground mt-2">
|
|
474
|
-
Add to your root layout (Next.js) or entry file (Vite, CRA). One import wires up every token, base layer, and reduced-motion rule.
|
|
475
|
-
</p>
|
|
476
|
-
</div>
|
|
477
|
-
|
|
478
|
-
<div>
|
|
479
|
-
<h3 className="text-sm font-semibold mb-2">3. Use components</h3>
|
|
480
|
-
<CopyableCodeBlock
|
|
481
|
-
code={`import { Button, Card, Input } from "${pkg}/components/ui";
|
|
482
|
-
|
|
483
|
-
export function Example() {
|
|
484
|
-
return (
|
|
485
|
-
<Card>
|
|
486
|
-
<Button>Start here</Button>
|
|
487
|
-
<Input placeholder="Enter text..." />
|
|
488
|
-
</Card>
|
|
489
|
-
);
|
|
490
|
-
}`}
|
|
491
|
-
/>
|
|
492
|
-
</div>
|
|
493
|
-
|
|
494
|
-
<div>
|
|
495
|
-
<h3 className="text-sm font-semibold mb-2">4. Customize tokens</h3>
|
|
496
|
-
<p className="text-sm text-muted-foreground">
|
|
497
|
-
Edit <code className="font-mono text-xs text-foreground">tokens.json</code> and run{" "}
|
|
498
|
-
<code className="font-mono text-xs text-foreground">pnpm build:tokens</code> to regenerate{" "}
|
|
499
|
-
<code className="font-mono text-xs text-foreground">styles.css</code>. Or use the Customize tab to preview overrides in your browser before promoting them.
|
|
500
|
-
</p>
|
|
501
|
-
</div>
|
|
502
|
-
|
|
503
|
-
<div>
|
|
504
|
-
<h3 className="text-sm font-semibold mb-2">Reference docs</h3>
|
|
505
|
-
<ul className="text-sm text-muted-foreground space-y-1.5 list-disc pl-5">
|
|
506
|
-
<li>
|
|
507
|
-
<code className="font-mono text-xs text-foreground">README.md</code> — getting started
|
|
508
|
-
</li>
|
|
509
|
-
<li>
|
|
510
|
-
<code className="font-mono text-xs text-foreground">DESIGN.md</code> — visual system, layout rhythm, AAA floor
|
|
511
|
-
</li>
|
|
512
|
-
<li>
|
|
513
|
-
<code className="font-mono text-xs text-foreground">COMPONENT_INDEX.md</code> — human-readable component guide
|
|
514
|
-
</li>
|
|
515
|
-
<li>
|
|
516
|
-
<code className="font-mono text-xs text-foreground">CLAUDE.md</code> — agent/AI integration rules
|
|
517
|
-
</li>
|
|
518
|
-
<li>
|
|
519
|
-
<code className="font-mono text-xs text-foreground">layer-5-component-registry/component-registry.json</code> — machine-readable component manifest
|
|
520
|
-
</li>
|
|
521
|
-
</ul>
|
|
522
|
-
</div>
|
|
523
|
-
</div>
|
|
524
|
-
</DialogContent>
|
|
525
|
-
</Dialog>
|
|
526
|
-
);
|
|
527
|
-
}
|
|
528
|
-
|
|
529
708
|
// One-shot setup prompt — pasted into a fresh Claude Code session to run the
|
|
530
709
|
// full onboarding (rename + brand + voice + microcopy + ethics + tokens +
|
|
531
710
|
// components + patterns). Mirrors prompts/setup.md so home stays in sync.
|
|
@@ -555,7 +734,7 @@ Steps to run, in order:
|
|
|
555
734
|
|
|
556
735
|
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.
|
|
557
736
|
|
|
558
|
-
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-
|
|
737
|
+
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.
|
|
559
738
|
|
|
560
739
|
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.
|
|
561
740
|
|
|
@@ -790,9 +969,11 @@ export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
|
790
969
|
});
|
|
791
970
|
};
|
|
792
971
|
|
|
793
|
-
//
|
|
794
|
-
const isFreshFork =
|
|
795
|
-
|
|
972
|
+
// Fresh fork: not upstream, brand name still "BADS"
|
|
973
|
+
const isFreshFork = !brand.isUpstreamTemplate && brand.name === "BADS";
|
|
974
|
+
|
|
975
|
+
// Customized client fork: not upstream, brand name changed
|
|
976
|
+
const isCustomizedFork = !brand.isUpstreamTemplate && brand.name !== "BADS";
|
|
796
977
|
|
|
797
978
|
const toggleLayer = (n: string) => {
|
|
798
979
|
setOpenLayers((prev) => {
|
|
@@ -893,32 +1074,19 @@ export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
|
893
1074
|
</div>
|
|
894
1075
|
|
|
895
1076
|
<div className="flex items-center gap-2 flex-wrap pt-2">
|
|
896
|
-
<Button
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
onClick={() => setTab("colors")}
|
|
901
|
-
>
|
|
902
|
-
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Customize
|
|
1077
|
+
<Button size="sm" variant="default" className="gap-2" asChild>
|
|
1078
|
+
<a href="#customize">
|
|
1079
|
+
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Customize
|
|
1080
|
+
</a>
|
|
903
1081
|
</Button>
|
|
904
1082
|
<Button size="sm" variant="outline" className="gap-2" onClick={handleBrowseComponents} type="button">
|
|
905
1083
|
<Package className="h-4 w-4" strokeWidth={1.5} /> Components
|
|
906
1084
|
</Button>
|
|
907
|
-
<Button
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
onClick={() => setTab("components")}
|
|
912
|
-
>
|
|
913
|
-
<Package className="h-4 w-4" strokeWidth={1.5} /> Components
|
|
1085
|
+
<Button size="sm" variant="outline" className="gap-2" asChild>
|
|
1086
|
+
<a href="#quickstart">
|
|
1087
|
+
<Terminal className="h-4 w-4" strokeWidth={1.5} /> Install
|
|
1088
|
+
</a>
|
|
914
1089
|
</Button>
|
|
915
|
-
<QuickstartDialog
|
|
916
|
-
trigger={
|
|
917
|
-
<Button size="sm" variant="outline" className="gap-2">
|
|
918
|
-
<Terminal className="h-4 w-4" strokeWidth={1.5} /> Install
|
|
919
|
-
</Button>
|
|
920
|
-
}
|
|
921
|
-
/>
|
|
922
1090
|
</div>
|
|
923
1091
|
</section>
|
|
924
1092
|
|
|
@@ -1016,11 +1184,11 @@ export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
|
1016
1184
|
</div>
|
|
1017
1185
|
<dl className="grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs">
|
|
1018
1186
|
<dt className="text-muted-foreground">Sans</dt>
|
|
1019
|
-
<dd className="font-sans truncate">
|
|
1187
|
+
<dd className="font-sans truncate">{brand.fonts?.[0]?.label ?? "Default sans"}</dd>
|
|
1020
1188
|
<dt className="text-muted-foreground">Serif</dt>
|
|
1021
|
-
<dd className="font-serif truncate">
|
|
1189
|
+
<dd className="font-serif truncate">Default serif</dd>
|
|
1022
1190
|
<dt className="text-muted-foreground">Mono</dt>
|
|
1023
|
-
<dd className="font-mono truncate">
|
|
1191
|
+
<dd className="font-mono truncate">Default mono</dd>
|
|
1024
1192
|
</dl>
|
|
1025
1193
|
<Button
|
|
1026
1194
|
size="sm"
|
|
@@ -1048,13 +1216,18 @@ export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
|
1048
1216
|
<Badge variant="secondary" className="text-xs">Radiant</Badge>
|
|
1049
1217
|
<Badge variant="secondary" className="text-xs">Genuine</Badge>
|
|
1050
1218
|
</div>
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1219
|
+
{brand.tagline && (
|
|
1220
|
+
<p className="text-sm text-muted-foreground italic leading-snug">
|
|
1221
|
+
“{brand.tagline}”
|
|
1222
|
+
</p>
|
|
1223
|
+
)}
|
|
1224
|
+
<Button
|
|
1225
|
+
size="sm"
|
|
1226
|
+
variant="outline"
|
|
1227
|
+
className="mt-auto w-full gap-2"
|
|
1228
|
+
onClick={() => setTab("layers")}
|
|
1229
|
+
>
|
|
1230
|
+
<BookOpen className="h-3.5 w-3.5" strokeWidth={1.5} /> Edit
|
|
1058
1231
|
</Button>
|
|
1059
1232
|
</CardContent>
|
|
1060
1233
|
</Card>
|
|
@@ -1078,12 +1251,7 @@ export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
|
1078
1251
|
<CardDescription>Browse all components in the showcase</CardDescription>
|
|
1079
1252
|
</CardHeader>
|
|
1080
1253
|
<CardContent>
|
|
1081
|
-
<Button
|
|
1082
|
-
size="sm"
|
|
1083
|
-
variant="outline"
|
|
1084
|
-
className="w-full gap-2"
|
|
1085
|
-
onClick={() => setTab("components")}
|
|
1086
|
-
>
|
|
1254
|
+
<Button size="sm" variant="outline" className="w-full gap-2" onClick={handleBrowseComponents} type="button">
|
|
1087
1255
|
<Package className="h-4 w-4" strokeWidth={1.5} /> View
|
|
1088
1256
|
</Button>
|
|
1089
1257
|
</CardContent>
|
|
@@ -1096,13 +1264,11 @@ export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
|
1096
1264
|
<CardDescription>Copy the npm install command</CardDescription>
|
|
1097
1265
|
</CardHeader>
|
|
1098
1266
|
<CardContent>
|
|
1099
|
-
<
|
|
1100
|
-
|
|
1101
|
-
<
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
}
|
|
1105
|
-
/>
|
|
1267
|
+
<Button size="sm" variant="outline" className="w-full gap-2" asChild>
|
|
1268
|
+
<a href="#quickstart">
|
|
1269
|
+
<Code2 className="h-4 w-4" strokeWidth={1.5} /> Install
|
|
1270
|
+
</a>
|
|
1271
|
+
</Button>
|
|
1106
1272
|
</CardContent>
|
|
1107
1273
|
</Card>
|
|
1108
1274
|
<Card>
|
|
@@ -1113,31 +1279,10 @@ export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
|
1113
1279
|
<CardDescription>Edit tokens in the Customize tab</CardDescription>
|
|
1114
1280
|
</CardHeader>
|
|
1115
1281
|
<CardContent>
|
|
1116
|
-
<Button
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
onClick={() => setTab("colors")}
|
|
1121
|
-
>
|
|
1122
|
-
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Customize
|
|
1123
|
-
</Button>
|
|
1124
|
-
</CardContent>
|
|
1125
|
-
</Card>
|
|
1126
|
-
<Card>
|
|
1127
|
-
<CardHeader>
|
|
1128
|
-
<CardTitle className="text-base flex items-center gap-2">
|
|
1129
|
-
<BookOpen className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} /> Read the docs
|
|
1130
|
-
</CardTitle>
|
|
1131
|
-
<CardDescription>CLAUDE.md, DESIGN.md, and more</CardDescription>
|
|
1132
|
-
</CardHeader>
|
|
1133
|
-
<CardContent>
|
|
1134
|
-
<Button
|
|
1135
|
-
size="sm"
|
|
1136
|
-
variant="outline"
|
|
1137
|
-
className="w-full gap-2"
|
|
1138
|
-
onClick={() => setTab("layers")}
|
|
1139
|
-
>
|
|
1140
|
-
<FileText className="h-4 w-4" strokeWidth={1.5} /> Docs
|
|
1282
|
+
<Button size="sm" variant="outline" className="w-full gap-2" asChild>
|
|
1283
|
+
<a href="#customize">
|
|
1284
|
+
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Customize
|
|
1285
|
+
</a>
|
|
1141
1286
|
</Button>
|
|
1142
1287
|
</CardContent>
|
|
1143
1288
|
</Card>
|
|
@@ -1231,22 +1376,9 @@ export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
|
1231
1376
|
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Onboard with AI
|
|
1232
1377
|
</a>
|
|
1233
1378
|
</Button>
|
|
1234
|
-
<Button
|
|
1235
|
-
size="sm"
|
|
1236
|
-
variant="outline"
|
|
1237
|
-
className="gap-2"
|
|
1238
|
-
onClick={() => setTab("components")}
|
|
1239
|
-
>
|
|
1379
|
+
<Button size="sm" variant="outline" className="gap-2" onClick={handleBrowseComponents} type="button">
|
|
1240
1380
|
<Package className="h-4 w-4" strokeWidth={1.5} /> Browse components
|
|
1241
1381
|
</Button>
|
|
1242
|
-
<Button
|
|
1243
|
-
size="sm"
|
|
1244
|
-
variant="ghost"
|
|
1245
|
-
className="gap-2"
|
|
1246
|
-
onClick={() => setTab("layers")}
|
|
1247
|
-
>
|
|
1248
|
-
<BookOpen className="h-4 w-4" strokeWidth={1.5} /> Read the docs
|
|
1249
|
-
</Button>
|
|
1250
1382
|
</div>
|
|
1251
1383
|
</section>
|
|
1252
1384
|
|
|
@@ -1297,7 +1429,7 @@ export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
|
1297
1429
|
<div className="space-y-2">
|
|
1298
1430
|
{SHIPPED_LAYERS.map((layer) => {
|
|
1299
1431
|
const isOpen = openLayers.has(layer.n);
|
|
1300
|
-
const isDeferred = layer.status === "deferred";
|
|
1432
|
+
const isDeferred = (layer.status as "shipped" | "deferred") === "deferred";
|
|
1301
1433
|
return (
|
|
1302
1434
|
<button
|
|
1303
1435
|
key={layer.n}
|
|
@@ -1363,6 +1495,137 @@ export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
|
1363
1495
|
|
|
1364
1496
|
<Separator />
|
|
1365
1497
|
|
|
1498
|
+
{/* CAPABILITIES */}
|
|
1499
|
+
<section className="space-y-6" id="capabilities">
|
|
1500
|
+
<SectionHeading
|
|
1501
|
+
eyebrow="Capabilities at a glance"
|
|
1502
|
+
title="Everything the system ships, in one read"
|
|
1503
|
+
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."
|
|
1504
|
+
/>
|
|
1505
|
+
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
1506
|
+
{CAPABILITY_SECTIONS.map((section) => {
|
|
1507
|
+
const Icon = section.icon;
|
|
1508
|
+
return (
|
|
1509
|
+
<Card key={section.title} className="flex flex-col">
|
|
1510
|
+
<CardHeader>
|
|
1511
|
+
<CardTitle className="text-base flex items-center gap-2">
|
|
1512
|
+
<Icon className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1513
|
+
{section.title}
|
|
1514
|
+
</CardTitle>
|
|
1515
|
+
<CardDescription className="leading-relaxed">
|
|
1516
|
+
{section.summary}
|
|
1517
|
+
</CardDescription>
|
|
1518
|
+
</CardHeader>
|
|
1519
|
+
<CardContent className="flex-1 space-y-3">
|
|
1520
|
+
<ul className="space-y-1.5">
|
|
1521
|
+
{section.highlights.map((h) => (
|
|
1522
|
+
<li key={h} className="flex gap-2 text-sm">
|
|
1523
|
+
<span className="text-muted-foreground shrink-0">•</span>
|
|
1524
|
+
<span className="text-foreground/80 leading-relaxed">{h}</span>
|
|
1525
|
+
</li>
|
|
1526
|
+
))}
|
|
1527
|
+
</ul>
|
|
1528
|
+
<p className="text-xs font-mono text-muted-foreground pt-1">
|
|
1529
|
+
{section.doc}
|
|
1530
|
+
</p>
|
|
1531
|
+
</CardContent>
|
|
1532
|
+
</Card>
|
|
1533
|
+
);
|
|
1534
|
+
})}
|
|
1535
|
+
</div>
|
|
1536
|
+
<p className="text-sm text-muted-foreground">
|
|
1537
|
+
Full discoverable index with every script, prompt, and surface:{" "}
|
|
1538
|
+
<code className="font-mono text-xs text-foreground">CAPABILITIES.md</code>
|
|
1539
|
+
</p>
|
|
1540
|
+
</section>
|
|
1541
|
+
|
|
1542
|
+
<Separator />
|
|
1543
|
+
|
|
1544
|
+
{/* SELF-IMPROVEMENT LOOPS */}
|
|
1545
|
+
<section className="space-y-6" id="loops">
|
|
1546
|
+
<SectionHeading
|
|
1547
|
+
eyebrow="Self-improvement loops"
|
|
1548
|
+
title="The system compounds"
|
|
1549
|
+
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."
|
|
1550
|
+
/>
|
|
1551
|
+
<div className="grid md:grid-cols-2 gap-4">
|
|
1552
|
+
{SELF_IMPROVEMENT_LOOPS.map((loop) => (
|
|
1553
|
+
<Card key={loop.name}>
|
|
1554
|
+
<CardHeader className="pb-3">
|
|
1555
|
+
<div className="flex items-center justify-between gap-3">
|
|
1556
|
+
<CardTitle className="text-base">{loop.name}</CardTitle>
|
|
1557
|
+
<Badge variant="outline" className="text-xs font-mono whitespace-nowrap">
|
|
1558
|
+
{loop.cadence}
|
|
1559
|
+
</Badge>
|
|
1560
|
+
</div>
|
|
1561
|
+
<CardDescription className="leading-relaxed">
|
|
1562
|
+
{loop.summary}
|
|
1563
|
+
</CardDescription>
|
|
1564
|
+
</CardHeader>
|
|
1565
|
+
<CardContent className="space-y-1.5 pt-0">
|
|
1566
|
+
<div className="flex gap-2 text-sm">
|
|
1567
|
+
<span className="text-muted-foreground shrink-0 w-16">where</span>
|
|
1568
|
+
<code className="font-mono text-xs text-foreground/80">
|
|
1569
|
+
{loop.where}
|
|
1570
|
+
</code>
|
|
1571
|
+
</div>
|
|
1572
|
+
<div className="flex gap-2 text-sm">
|
|
1573
|
+
<span className="text-muted-foreground shrink-0 w-16">run</span>
|
|
1574
|
+
<code className="font-mono text-xs text-foreground/80">
|
|
1575
|
+
{loop.runWith}
|
|
1576
|
+
</code>
|
|
1577
|
+
</div>
|
|
1578
|
+
</CardContent>
|
|
1579
|
+
</Card>
|
|
1580
|
+
))}
|
|
1581
|
+
</div>
|
|
1582
|
+
<p className="text-sm text-muted-foreground">
|
|
1583
|
+
End-to-end documentation:{" "}
|
|
1584
|
+
<code className="font-mono text-xs text-foreground">CLAUDE.md → Self-improvement loops</code>{" "}
|
|
1585
|
+
and{" "}
|
|
1586
|
+
<code className="font-mono text-xs text-foreground">ledgers/README.md</code>
|
|
1587
|
+
</p>
|
|
1588
|
+
</section>
|
|
1589
|
+
|
|
1590
|
+
<Separator />
|
|
1591
|
+
|
|
1592
|
+
{/* AUTOMATION */}
|
|
1593
|
+
<section className="space-y-6" id="automation">
|
|
1594
|
+
<SectionHeading
|
|
1595
|
+
eyebrow="Automation"
|
|
1596
|
+
title="Schedulers behind the loops"
|
|
1597
|
+
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."
|
|
1598
|
+
/>
|
|
1599
|
+
<Card>
|
|
1600
|
+
<CardContent className="py-4 divide-y divide-border">
|
|
1601
|
+
{AUTOMATION_SURFACES.map((surface) => (
|
|
1602
|
+
<div key={surface.label} className="py-3 first:pt-0 last:pb-0">
|
|
1603
|
+
<div className="flex items-center justify-between gap-3 flex-wrap">
|
|
1604
|
+
<code className="font-mono text-sm text-foreground font-medium">
|
|
1605
|
+
{surface.label}
|
|
1606
|
+
</code>
|
|
1607
|
+
<Badge variant="outline" className="text-xs font-mono">
|
|
1608
|
+
{surface.cadence}
|
|
1609
|
+
</Badge>
|
|
1610
|
+
</div>
|
|
1611
|
+
<p className="text-sm text-muted-foreground leading-relaxed mt-1.5">
|
|
1612
|
+
{surface.summary}
|
|
1613
|
+
</p>
|
|
1614
|
+
<p className="text-xs font-mono text-muted-foreground mt-1.5">
|
|
1615
|
+
{surface.where}
|
|
1616
|
+
</p>
|
|
1617
|
+
</div>
|
|
1618
|
+
))}
|
|
1619
|
+
</CardContent>
|
|
1620
|
+
</Card>
|
|
1621
|
+
<p className="text-sm text-muted-foreground">
|
|
1622
|
+
Full surface documentation:{" "}
|
|
1623
|
+
<code className="font-mono text-xs text-foreground">automation/README.md</code>
|
|
1624
|
+
</p>
|
|
1625
|
+
</section>
|
|
1626
|
+
|
|
1627
|
+
<Separator />
|
|
1628
|
+
|
|
1366
1629
|
{/* ONBOARD */}
|
|
1367
1630
|
<section className="space-y-10" id="onboard">
|
|
1368
1631
|
<SectionHeading
|
|
@@ -1449,7 +1712,7 @@ export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
|
1449
1712
|
errors, brief on success.”
|
|
1450
1713
|
</p>
|
|
1451
1714
|
<p className="text-xs font-mono text-muted-foreground">
|
|
1452
|
-
layer-1-
|
|
1715
|
+
layer-1-foundation/voice-and-tone.md
|
|
1453
1716
|
</p>
|
|
1454
1717
|
</CardContent>
|
|
1455
1718
|
</Card>
|
|
@@ -1780,7 +2043,7 @@ export function Example() {
|
|
|
1780
2043
|
</div>
|
|
1781
2044
|
|
|
1782
2045
|
{/* Docs Reference */}
|
|
1783
|
-
<Card
|
|
2046
|
+
<Card>
|
|
1784
2047
|
<CardHeader>
|
|
1785
2048
|
<CardTitle className="text-sm">Full docs</CardTitle>
|
|
1786
2049
|
</CardHeader>
|
|
@@ -1832,12 +2095,12 @@ export function Example() {
|
|
|
1832
2095
|
</CardTitle>
|
|
1833
2096
|
</CardHeader>
|
|
1834
2097
|
<CardContent className="text-sm text-muted-foreground">
|
|
1835
|
-
|
|
2098
|
+
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.{" "}
|
|
1836
2099
|
<a
|
|
1837
|
-
href="mailto:
|
|
2100
|
+
href="mailto:work@matthewstephens.com"
|
|
1838
2101
|
className="text-primary hover:underline font-medium"
|
|
1839
2102
|
>
|
|
1840
|
-
|
|
2103
|
+
work@matthewstephens.com
|
|
1841
2104
|
</a>
|
|
1842
2105
|
</CardContent>
|
|
1843
2106
|
</Card>
|