Add cross-tool workflow: AGENTS.md, Antigravity workflows, documentation

- Create AGENTS.md (90 lines) as shared foundation for Claude Code + Antigravity
- Slim CLAUDE.md from 113 to 45 lines (Claude-specific only, references AGENTS.md)
- Slim GEMINI.md from 58 to 26 lines (Antigravity-specific only, references AGENTS.md)
- Add 6 Antigravity workflows in .agent/workflows/ (session-start, preflight, token-sync, visual-qa, build-component, page-review)
- Add docs/reference/cross-tool-workflow.md with task routing, quality gates, file ownership, error mitigation
- Zero content overlap between CLAUDE.md and GEMINI.md (was ~80%)
- File ownership boundaries defined for current phase and future backend work

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-06 11:10:32 +10:00
parent 68889af9c2
commit 4af684ec8f
10 changed files with 621 additions and 148 deletions

View File

@@ -1,58 +1,26 @@
# FA 2.0 Design System — Antigravity Rules
# Antigravity — FA 2.0 Design System
## Project context
Follow all rules in `AGENTS.md`. This file contains Antigravity-specific behaviour only.
Funeral Arranger (funeralarranger.com.au) design system rebuild. Parsons is the
client. 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+ (running on localhost:6006)
- Style Dictionary for token transformation
- W3C DTCG token format
## Hard rules
1. **Never hardcode colours, spacing, typography, or shadows** — always consume the MUI theme (`theme.palette.*`, `theme.spacing()`, `theme.typography.*`) or CSS custom properties (`var(--fa-*)`)
2. **Never use raw hex values in components** — map to semantic tokens
3. **Follow atomic design tiers:** atoms → molecules → organisms → templates → pages
4. **Component folders:** PascalCase, each contains `ComponentName.tsx`, `ComponentName.stories.tsx`, `index.ts`
5. **Token files:** camelCase in `tokens/` directory (primitives → semantic → component tiers)
6. **CSS custom properties prefix:** `--fa-`
7. **Error styling uses copper (#B0610F)** not red — this is intentional for grief-sensitive context
8. **Copy tone:** warm but not gushy. Understated empathy. Let UI structure be the empathy.
## Token access convention
- Semantic tokens: `theme.palette.*`, `theme.typography.*`, `theme.spacing()`
- Component tokens: `var(--fa-component-property-state)`
- Never mix — semantic via theme, component via CSS vars
## Storybook
Dev server runs on `localhost:6006`. When verifying components visually, navigate
to the specific story URL. Story IDs follow the pattern:
`/story/{tier}-{componentname}--{variantname}`
## File structure
```
src/components/atoms/ — Button, Input, Typography, Card, etc.
src/components/molecules/ — SearchBar, PriceCard, ServiceOption, etc.
src/components/organisms/ — Navigation, Footer, ArrangementDialog, etc.
src/components/templates/ — WizardLayout
src/components/pages/ — IntroStep, ProvidersStep, etc. (wizard steps)
tokens/primitives/ — Raw values (hex, px, font names)
tokens/semantic/ — Design intent (color.text.primary)
tokens/component/ — Per-component tokens
```
## When making visual changes
## Visual verification
When reviewing or making visual changes:
1. Make the code change
2. Open the Storybook story in the browser to verify
2. Open the Storybook story in the browser at `localhost:6006`
3. Screenshot and check spacing, alignment, visual weight
4. Self-correct if something looks off before presenting
Story URL pattern: `/story/{tier}-{componentname}--{variantname}`
## Cross-tool workflow
This project uses both Claude Code and Google Antigravity.
See `docs/reference/cross-tool-workflow.md` for task routing and coordination.
Antigravity owns: visual QA, browser verification, page-level review screenshots.
Claude Code owns: component building, token creation, code quality, memory updates, git.
## Workflows
Custom workflows available in `.agent/workflows/`:
`fa-session-start`, `fa-preflight`, `fa-token-sync`, `fa-visual-qa`, `fa-build-component`, `fa-page-review`