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:
52
.agent/workflows/fa-preflight.md
Normal file
52
.agent/workflows/fa-preflight.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
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
|
||||
|
||||
1. **TypeScript compilation**
|
||||
Run `npx tsc --noEmit`
|
||||
FAIL if any type errors. Report file and line for each error.
|
||||
|
||||
2. **ESLint**
|
||||
Run `npm run lint`
|
||||
FAIL if any errors (warnings are WARN). Report count and top issues.
|
||||
|
||||
3. **Prettier**
|
||||
Run `npm run format:check`
|
||||
FAIL if any files need formatting. List files.
|
||||
|
||||
4. **Storybook build**
|
||||
Run `npx storybook build --quiet`
|
||||
FAIL if build errors. Report the failing component.
|
||||
|
||||
5. **Token sync**
|
||||
Compare timestamps: are any `tokens/**/*.json` files newer than `src/theme/generated/`?
|
||||
WARN if generated files are stale. Fix: `npm run build:tokens`
|
||||
|
||||
6. **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`.
|
||||
|
||||
7. **Component exports**
|
||||
For each component folder in `src/components/`, verify `index.ts` exists 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.
|
||||
Reference in New Issue
Block a user