Agent-specific instructions for working on this codebase. For project overview, architecture, commands, and general documentation, see README.md.
- Never create, read, update, or delete in the DB without consulting with the user first
- Never apply DB migrations without explicit user consent
- Never modify DB migration versions after they have been applied to the production DB
- Don't use
taskkill, only your own task kill tool. - For frontend changes, use the
react-best-practicesskill - don't start a server. the user will do that. by default, assume out localhost:3000
- don't push without the user instructing you via prompt or command
- Planning Phase
- Review the specification. If it is not mentioned in the spec, discuss updating the spec with the user
- Database schema changes must consider
docs/02_specification/backend/migrations.md
- Specification
- Update Spec
- Prospectively update unit tests to match spec
- Coding
- prefer removing code over marking it as deprecated
- Update documentation where relevant. See the Documentation section in README.md for where to document different topics
- Testing
- Update unit tests, then run full test suite
- Use Chrome DevTools to verify frontend changes
- The server has hot reloading. Don't claim a restart will fix it. Find the real issue.
- Use
pnpm, notnpm - Use Chrome DevTools to verify frontend changes yourself first
- Use the
ghCLI for interacting with Github - Bash: Don't chain commands with
&&. Run them sequentially instead.
Always run these commands and ensure they pass before committing:
- Lint:
pnpm lint - Build:
pnpm run build - Test:
pnpm test
If any fail, fix the issues before committing.
If your changes affect Docker, supervisord, or startup scripts:
- Test:
docker compose up --build - Verify:
curl http://localhost/api/health - Check:
docker compose exec opengov-monitor supervisorctl status
See src/deploy/CLAUDE.md for full pre-deployment checklist.