## Shared Rules For All Coding Agents

These rules apply to any agent working in this repository.

## Workflow

- Solve one concrete task at a time.
- Read the relevant tests and local code before editing.
- Add or update a failing test first.
- Implement the smallest change that makes the test pass.
- Refactor only while the test suite stays green.

## Design

- Keep code DRY. Shared business rules belong in one place.
- Prefer small objects and modules with one reason to change.
- Keep public interfaces small and explicit.
- Reuse existing abstractions before creating new ones.
- Prefer composition over inheritance unless the local design already relies on inheritance.

## Safety

- Never weaken or delete a test just to get green.
- Never edit the same files from multiple agents at the same time.
- Never add a new dependency or architectural layer without checking existing patterns first.
- Ask for clarification when requirements are ambiguous or existing tests conflict.

## Completion

- Relevant tests pass.
- Lint and formatting checks pass.
- The change is focused, reviewable, and does not include unrelated cleanup.