Skip to main content

Ticket Lifecycle

Every ticket in Draft follows a strict state machine. Transitions are validated — invalid transitions are rejected.

States

StateDescription
PROPOSEDNewly created ticket, awaiting human approval
PLANNEDApproved and ready for AI execution
EXECUTINGAI agent is actively implementing changes
VERIFYINGRunning verification commands (tests, lints)
NEEDS_HUMANVerification passed, awaiting human review
BLOCKEDExecution or verification failed
DONEApproved and complete
ABANDONEDDiscarded, will not be implemented

State Transitions

Happy Path

PROPOSEDPLANNEDEXECUTINGVERIFYINGNEEDS_HUMANDONE

When Things Go Wrong

  • Execution failsBLOCKED (with reason: error message or “no changes”)
  • Verification failsBLOCKED (with failing command details)
  • Human requests changes → back to EXECUTING for another iteration

Blocked Tickets

When a ticket becomes BLOCKED, the planner can:
  1. Propose follow-up tickets to address the failure
  2. Auto-unblock when a dependency completes
  3. Wait for human intervention

Transitioning Tickets

Via the API:
curl -X POST http://localhost:8000/tickets/{id}/transition \
  -H "Content-Type: application/json" \
  -d '{"state": "planned"}'
Via the UI, use the state buttons on each ticket card.

Ticket Properties

FieldDescription
titleShort description of the work
descriptionDetailed implementation instructions
priorityExecution order (lower = higher priority)
stateCurrent lifecycle state
blocked_by_ticket_idDependency on another ticket
sort_orderDisplay order within the board