- CLAUDE.md with commands, structure, key constraints - .claude/rules/ coding standards + workflows - docs/architecture.md with design decisions - .github/ CI workflow, issue templates, PR template - LICENSE (MIT) - .fire-tools.json initialization stamp - README.md rewritten with features, quick start, stack table
1.4 KiB
1.4 KiB
description
| description |
|---|
| Recurring task patterns — read when fixing issues, adding features, or running tests |
Workflows
Add a Feature
- Read
docs/architecture.mdto understand where new code belongs - Write the test first (failing)
- Implement minimum code to pass
pnpm test— full suitepnpm lint:fix— Biome- Commit:
feat: <description>
Fix a Bug
- Grep codebase for identifiers mentioned in the bug report
- Read the 2–3 most relevant files
- Write a failing test that reproduces the problem
- Implement the minimal fix
pnpm vitest run <path/to/test.ts>— verify test passespnpm lint:fix— pass lint- Commit:
fix: <description>
Regenerate API Types
Run after updating openapi.json:
pnpm generate:api
# → overwrites src/api/schema.d.ts
# Do not edit schema.d.ts manually
Run Targeted Tests
pnpm vitest run src/path/to/file.test.ts
pnpm vitest run --testNamePattern="<substring>"
pnpm vitest src/path/to/file.test.ts # watch mode
Add a New Route
- Create
src/routes/<flat-route-name>.tsxusing TanStack Router flat-route syntax - Export
const Route = createFileRoute("/<path>")({ component: Foo }) - Vite plugin auto-regenerates
src/routeTree.gen.tson save - Add nav link to
src/components/layout/Sidebar.tsxif top-level - Cast all
navigate()/<Link>params asas never