## Development Workflow

- Follow red-green-refactor strictly.
- Before writing production code, add or update a failing test for the next behavior.
- Implement the smallest change that makes the failing test pass.
- Refactor only with tests green.
- Run relevant tests after each change and the full suite before finishing.

## Design Rules

- Keep code DRY. If the same business rule appears twice, extract shared logic.
- Reuse existing domain objects, services, and helpers before creating new ones.
- Keep functions, methods, and classes small and focused on one responsibility.
- Put behavior close to the data it depends on.
- Prefer composition over inheritance unless inheritance is already the established local pattern.

## Safety Rules

- Never delete or weaken a test to make the implementation pass.
- Never duplicate validation, pricing, authorization, or mapping rules across files.
- Never add a dependency before checking whether the project already solves the problem another way.
- If a requirement is ambiguous or conflicts with existing tests, stop and ask.

## Completion

- A task is complete only when tests pass, lint passes, and the diff stays focused on the requested change.