State Machine
This page is the compact contract for how project lifecycle state and review state advance across a tracked OAT project.
Quick Look
- What it does: defines the allowed lifecycle and review-state transitions recorded in
state.mdandplan.md. - When to use it: when you need to debug lifecycle routing, review posture, or why a project is not advancing to the next phase.
- Primary artifacts:
state.md,plan.md,implementation.md
State Transition Map
Phase status values
oat_phase_status in state.md:
in_progress— phase is actively being worked oncomplete— phase is finishedpr_open— post-PR review posture. Set byoat-project-pr-final. Agents should route tooat-project-revise(for feedback) oroat-project-complete(when approved).
pr_open is not the source of truth for actual PR existence. That is tracked separately in state.md via:
oat_pr_status— PR lifecycle state (ready,open,closed,merged)oat_pr_url— tracked PR URL when a PR exists
Lifecycle progression
Typical progression:
- Discovery in progress
- Ready for spec
- Spec in progress
- Ready for design
- Design in progress
- Ready for plan
- Plan in progress
- Ready for implement
- Implement in progress
- Implement complete (final review passed)
- PR open (
pr_open) — post-PR review posture; actual PR existence is tracked viaoat_pr_status/oat_pr_url - Revision loop (optional):
pr_open→ revise →in_progress→ implement →pr_open - Complete
Review progression
In plan.md Reviews table:
pending->received->fixes_added->fixes_completed->passed
Guardrail
Do not move to the next lifecycle state if review/state artifacts indicate unresolved gates.
Reference artifacts
.oat/projects/<scope>/<project>/state.md.oat/projects/<scope>/<project>/plan.md(## Reviews).oat/projects/<scope>/<project>/implementation.md