This document defines the **Agent Protocol** for initializing a new project. When the agent is asked to "Onboard a project," it must follow these steps.
**Trigger**: *"Design the {task-name} task"* (or just *"orchestrate"* in manual mode)
**Interaction**: Agent will grill you for design decisions, trade-offs, and constraints. Present draft for review. Get your sign-off before finalizing.
**Note**: The implementer follows the TEST_PLAN.md (if present) and implements code with tests using TDD. No approval gate — transitions directly to bug_find.
**State transition**: `referee` → `complete` or `human_intervention`
## State Enforcement (v2.0)
All phase transitions are enforced by `status.py`:
- Tasks are created with `python ~/.automaton/scripts/status.py --create-task {name} --project {project}`
- Phases are transitioned with `python ~/.automaton/scripts/status.py --transition {phase} --task {name} --project {project}`
- Approvals are granted with `python ~/.automaton/scripts/status.py --approve --task {name} --project {project}`
- Folders are validated with `python ~/.automaton/scripts/status.py --validate-folder --task {name} --project {project}`
- All tasks are audited with `python ~/.automaton/scripts/status.py --audit --project {project}`
- Pre-v2.0 tasks are upgraded with `python ~/.automaton/scripts/status.py --upgrade --project {project}`
The `.state` file in each task folder is the single source of truth for the task's current phase. Never create task directories manually — always use `status.py --create-task`. Tasks without `.state` files are UNTRACKED and all commands refuse to operate on them. Run `status.py --upgrade` to bootstrap `.state` files for existing tasks.
**Important**: Always pass `--project {project}` to ensure correct scoping. Without it, `status.py` resolves the project from the current working directory, which can target the wrong project when multiple projects exist on the same machine.