|
1 | 1 | # Ansari Backend - Developer Guide |
2 | 2 |
|
| 3 | +## Project Overview |
| 4 | + |
| 5 | +This project uses **Codev** for AI-assisted development. |
| 6 | + |
| 7 | +## Available Protocols |
| 8 | + |
| 9 | +- **SPIR**: Multi-phase development with consultation (`codev/protocols/spir/protocol.md`) |
| 10 | +- **TICK**: Fast autonomous implementation (`codev/protocols/tick/protocol.md`) |
| 11 | +- **EXPERIMENT**: Disciplined experimentation (`codev/protocols/experiment/protocol.md`) |
| 12 | +- **MAINTAIN**: Codebase maintenance (`codev/protocols/maintain/protocol.md`) |
| 13 | + |
| 14 | +## Key Locations |
| 15 | + |
| 16 | +- **Specs**: `codev/specs/` - Feature specifications (WHAT to build) |
| 17 | +- **Plans**: `codev/plans/` - Implementation plans (HOW to build) |
| 18 | +- **Reviews**: `codev/reviews/` - Reviews and lessons learned |
| 19 | +- **Protocols**: `codev/protocols/` - Development protocols |
| 20 | + |
| 21 | +## Quick Start |
| 22 | + |
| 23 | +1. For new features, start with the Specification phase |
| 24 | +2. Create exactly THREE documents per feature: spec, plan, and review |
| 25 | +3. Follow the protocol phases as defined in the protocol files |
| 26 | +4. Use multi-agent consultation when specified |
| 27 | + |
| 28 | +## File Naming Convention |
| 29 | + |
| 30 | +Use sequential numbering with descriptive names: |
| 31 | +- Specification: `codev/specs/0001-feature-name.md` |
| 32 | +- Plan: `codev/plans/0001-feature-name.md` |
| 33 | +- Review: `codev/reviews/0001-feature-name.md` |
| 34 | + |
3 | 35 | ## Branch Management |
4 | 36 | - Always create new branches from the `develop` branch, NOT from `main` |
5 | 37 | - Use descriptive branch names that reflect the feature or fix being implemented |
|
20 | 52 | - Always run `ruff check` and `ruff format` before committing changes |
21 | 53 | - Fix all linting errors - clean code is maintainable code |
22 | 54 | - All PRs should target the `develop` branch, not `main` |
| 55 | +- Codev commit messages format: |
| 56 | + ``` |
| 57 | + [Spec 0001] Description of change |
| 58 | + [Spec 0001][Phase: implement] feat: Add feature |
| 59 | + ``` |
23 | 60 |
|
24 | 61 | ## Branch Management Details |
25 | 62 | - Consider a merged branch "done" - do not add new changes to it |
|
107 | 144 | - Add tests for new functionality in the appropriate directory |
108 | 145 | - Use fixture factories to keep tests maintainable |
109 | 146 | - Test both happy path and error conditions |
110 | | -- Keep tests independent (no dependencies between test functions) |
| 147 | +- Keep tests independent (no dependencies between test functions) |
| 148 | + |
| 149 | +## CLI Commands |
| 150 | + |
| 151 | +Codev provides three CLI tools: |
| 152 | + |
| 153 | +- **codev**: Project management (init, adopt, update, doctor) |
| 154 | +- **af**: Agent Farm orchestration (start, spawn, status, cleanup) |
| 155 | +- **consult**: AI consultation for reviews (pr, spec, plan) |
| 156 | + |
| 157 | +For complete reference, see `codev/resources/commands/`: |
| 158 | +- `codev/resources/commands/overview.md` - Quick start |
| 159 | +- `codev/resources/commands/codev.md` - Project commands |
| 160 | +- `codev/resources/commands/agent-farm.md` - Agent Farm commands |
| 161 | +- `codev/resources/commands/consult.md` - Consultation commands |
| 162 | + |
| 163 | +## Configuration |
| 164 | + |
| 165 | +Agent Farm is configured via `af-config.json` at the project root. Created during `codev init` or `codev adopt`. Override via CLI flags: `--architect-cmd`, `--builder-cmd`, `--shell-cmd`. |
| 166 | + |
| 167 | +```json |
| 168 | +{ |
| 169 | + "shell": { |
| 170 | + "architect": "claude", |
| 171 | + "builder": "claude", |
| 172 | + "shell": "bash" |
| 173 | + } |
| 174 | +} |
| 175 | +``` |
| 176 | + |
| 177 | +## For More Info |
| 178 | + |
| 179 | +Read the full protocol documentation in `codev/protocols/`. |
0 commit comments