- 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>
1.7 KiB
description
| description |
|---|
| Pre-commit quality checks — TypeScript, ESLint, Prettier, Storybook build, token sync, hardcoded values. // turbo |
Preflight Checks
Run all quality gates before committing. Report PASS/FAIL/WARN for each.
Checks
-
TypeScript compilation Run
npx tsc --noEmitFAIL if any type errors. Report file and line for each error. -
ESLint Run
npm run lintFAIL if any errors (warnings are WARN). Report count and top issues. -
Prettier Run
npm run format:checkFAIL if any files need formatting. List files. -
Storybook build Run
npx storybook build --quietFAIL if build errors. Report the failing component. -
Token sync Compare timestamps: are any
tokens/**/*.jsonfiles newer thansrc/theme/generated/? WARN if generated files are stale. Fix:npm run build:tokens -
Hardcoded values scan Search
src/components/**/*.tsx(excluding*.stories.tsx) for hex colour patterns (#[0-9a-fA-F]{3,8}). WARN for each match not on a line containing// ok-hardcode. -
Component exports For each component folder in
src/components/, verifyindex.tsexists and re-exports the component. FAIL if any component is missing its barrel export.
Report format
| Check | Status | Details |
|---|---|---|
| TypeScript | PASS/FAIL | error count |
| ESLint | PASS/FAIL/WARN | error/warning count |
| Prettier | PASS/FAIL | files needing format |
| Storybook | PASS/FAIL | failing component |
| Token sync | PASS/WARN | stale files |
| Hardcoded values | PASS/WARN | matches found |
| Exports | PASS/FAIL | missing index.ts |
If all PASS: safe to commit. If any FAIL: fix before committing.