# Project rules (CLAUDE.md)

Keep this short and specific. Claude Code reads this to learn how we work here.

## Code style
- Prefer small, pure functions.
- Tests first for changed behavior.
- Keep public APIs stable and typed.

## Tech constraints
- Backend: FastAPI + PostgreSQL. Async endpoints.
- Frontend: React + TypeScript. State via Zustand.
- Messaging: NATS. Avoid tight coupling to handlers.

## Safety
- No secrets in logs or test fixtures.
- Never write to main. Always use PRs with clear, testable diffs.
- Plan non-trivial tasks before edits.

## Workflow
- Branch naming: feat/<short-desc>, fix/<short-desc>.
- Commit style: small, factual, tied to tests.
- When touching >3 files, split into steps.

## Expectations for the agent
- Ask clarifying questions when the requirement is ambiguous.
- Propose a step-by-step plan before edits.
- Show the diff and a test plan. Wait for approval.
- Prefer minimal changes over large refactors.
