1.1 KiB
1.1 KiB
AnthoLume - Agent Context
Critical Rules
Generated Files
- NEVER edit generated files directly - Always edit the source and regenerate
- Go backend API: Edit
api/v1/openapi.yamlthen run:go generate ./api/v1/generate.gocd frontend && bun run generate:api
- Examples of generated files:
api/v1/api.gen.gofrontend/src/generated/**/*.ts
Database Access
- NEVER write ad-hoc SQL - Only use SQLC queries from
database/query.sql - Define queries in
database/query.sqland regenerate viasqlc generate
Error Handling
- Use
fmt.Errorf("message: %w", err)for wrapping errors - Do NOT use
github.com/pkg/errors
Frontend
- Package manager: bun (not npm)
- Icons: Use
lucide-reactfor all icons (not custom SVGs) - Lint:
cd frontend && bun run lint(andlint:fix) - Format:
cd frontend && bun run format(andformat:fix) - Generate API client:
cd frontend && bun run generate:api
Regeneration
- Go backend:
go generate ./api/v1/generate.go - TS client:
cd frontend && bun run generate:api