Phase 1: Session log archived (1096→91 lines), D031 token access convention
Phase 2: ESLint v9 + Prettier + jsx-a11y, initial config and lint fixes
Phase 3: 7 new skills (polish, harden, normalize, clarify, typeset, quieter, adapt)
+ Vercel reference docs, updated audit/review-component refs
Phase 4: Husky + lint-staged pre-commit hooks, preflight updated to 8 checks
Phase 5: Vitest + Testing Library + /write-tests skill
- Badge.tsx colour maps unified to CSS variables (D031)
- 5 empty interface→type alias fixes (Switch, Radio, Divider, IconButton, Link)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4.7 KiB
FA 2.0 Design System
Project overview
Rebuilding the Funeral Arranger (funeralarranger.com.au) design system using a code-first approach. Parsons (H.Parsons Funeral Directors) is the client. FA is an Australian funeral planning platform — the design language must be warm, professional, trustworthy, and calm. Users are often in distress.
Tech stack
- React 18 + TypeScript
- Material UI (MUI) v5
- Storybook 8+ with autodocs
- Style Dictionary for token transformation
- W3C DTCG token format (2025.10 stable spec)
- Chromatic for Storybook hosting (later)
Architecture
Source of truth: Token JSON files in tokens/ (DTCG format)
Flow: Token JSON → Style Dictionary → MUI theme + CSS vars → React components → Storybook
Token tiers
- Primitives (
tokens/primitives/): Raw values — hex, px, font names, scales - Semantic (
tokens/semantic/): Design intent —color.text.primary,color.surface.default - Component (
tokens/component/): Per-component —button.background.default
Component tiers (atomic design)
- Atoms (
src/components/atoms/): Button, Input, Typography, Badge, Icon, Avatar, Divider, Chip, Card, Link - Molecules (
src/components/molecules/): SearchBar, PriceCard, ServiceOption, FormField - Organisms (
src/components/organisms/): ServiceSelector, PricingTable, ArrangementForm, Navigation
Critical rules
- Every component MUST consume the MUI theme — never hardcode colours, spacing, typography, or shadows
- Every token MUST have a
$description— this is how agents maintain context about design intent - Always read docs/design-system.md before creating or modifying anything
- Always check docs/memory/ before starting work — these files contain decisions and state from previous sessions
- Always update docs/memory/ after completing work — log what was done, decisions made, and open questions
- Run
npm run build:tokensafter any token JSON change - Verify in Storybook before marking any component done
- Commit and push after completing each unit of work — see Git workflow below
Git workflow
Remote: Gitea at http://192.168.50.211:3000/richie/ParsonsFA.git (credentials stored via git credential helper)
After completing each unit of work (a component, a token change, a bug fix, etc.):
- Stage the changed files (
git add— prefer naming specific files overgit add -A) - Commit with a clear message describing what was done
- Push to origin (
git push)
This is not optional — the user relies on the git history for rollback safety. Each commit should represent a coherent, working state (Storybook builds, TypeScript compiles). Do not batch multiple unrelated changes into a single commit.
Commit message format:
Short summary (imperative mood, <70 chars)
- Bullet points with detail if needed
- Reference decision IDs (D001, D002...) when relevant
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Branch strategy: All work on main for now. Feature branches when the project grows.
Memory system
This project uses structured markdown files for cross-session memory.
Before starting any work, read these files:
docs/memory/decisions-log.md— All design decisions with rationaledocs/memory/component-registry.md— Status of every component (planned/in-progress/done)docs/memory/token-registry.md— All tokens with their current values and usage notesdocs/memory/session-log.md— Recent sessions (last 2-3); older sessions indocs/memory/archive/
After completing work, update:
- The relevant memory files with what changed
docs/memory/session-log.mdwith a summary of what was accomplished and next steps
MCP servers
- Figma remote MCP (
figma-remote-mcp): Read FA 1.0 designs, extract design context - Storybook MCP (
storybook): Query component library for available components and props
Setup instructions in docs/reference/mcp-setup.md.
File conventions
- Component folders: PascalCase (
Button/,PriceCard/) - Token files: camelCase (
colours.json,typography.json) - Each component folder contains:
ComponentName.tsx,ComponentName.stories.tsx,index.ts - CSS custom properties prefix:
--fa-(e.g.,--fa-color-brand-primary) - MUI theme paths: follow MUI conventions (
palette.primary.main)
Naming conventions for tokens
See docs/conventions/token-conventions.md for the full specification.
Quick reference:
- Primitives:
color.blue.500,spacing.4,fontSize.base - Semantic:
color.text.primary,color.surface.default,color.interactive.default - Component:
button.background.default,button.background.hover