Pipeline States
Every Colony issue is in exactly one state at any given time. The state determines what work happens next and which executor type will claim it. For a conceptual introduction, see Core Concepts — States. This page covers the complete state machine: all 16 states, forward progression, every backward loop, pause/resume rules, the canonical diagram, and the per-executor transition constraints.
States
Section titled “States”| State | Label | Description |
|---|---|---|
unlabeled | (none) | Issue exists but Colony hasn’t picked it up yet |
new | colony:new | Sprint Master has ingested the issue and enqueued an analyze task |
planning | colony:planning | Planner agent is decomposing an epic-scale issue into subtasks |
analyzing | colony:analyzing | Analyzer agent is triaging the issue (complexity, labels, plan) |
needs-clarification | colony:needs-clarification | Analyzer found ambiguity — waiting for the issue author to respond |
ready-for-dev | colony:ready-for-dev | Analysis complete, queued for a developer task |
dependency-blocked | colony:dependency-blocked | Issue depends on another issue that isn’t done yet |
failure-blocked | colony:failure-blocked | Failure or operator-intervention block — needs explicit /colony:retry to resume |
in-development | colony:in-development | Developer agent is implementing the issue |
changes-requested | colony:changes-requested | Reviewer requested changes — re-queued for development |
in-review | colony:in-review | Reviewer agent is checking the PR |
merge-pending | colony:merge-pending | Merger agent is rebasing and merging the PR |
human-review-ready | colony:human-review-ready | PR passed automated review — waiting for a human approver |
waiting-for-subtasks | colony:waiting-for-subtasks | Epic parent is waiting for child issues to complete |
done | colony:done | Issue is complete and the PR has been merged |
paused | colony:paused | An operator manually paused the issue |
Forward Progression
Section titled “Forward Progression”The happy path moves left-to-right through ISSUE_STATE_ORDER:
unlabeled → new → planning → analyzing → needs-clarification → ready-for-dev→ dependency-blocked → failure-blocked → in-development → changes-requested → in-review→ merge-pending → human-review-ready → waiting-for-subtasks → doneAny transition where the target state appears later in this order than the current state is automatically valid.
paused is a side-state and is not part of the linear order.
dependency-blocked vs failure-blocked
Section titled “dependency-blocked vs failure-blocked”Both states are blocked (is_blocked = true) but have different lifecycles:
dependency-blocked— issue is waiting on a known relationship (depends_onedges, file overlap with another in-flight PR). Sprint Master auto-unblocks it as soon as the dependency resolves.failure-blocked— issue hit a failure or operator-intervention block (build failure, cost cap, exhausted retries, parse failure, review-cycle limit, identical repeated failure, manual block). Sprint Master will not auto-unblock; an operator must investigate and run/colony:retry(or another slash command) to resume.
Backward Loops
Section titled “Backward Loops”The state machine defines 26 explicit backward loop exceptions for real-world scenarios like review cycles, dependency races, and scope overflow.
Review Cycles
Section titled “Review Cycles”| From | To | Why |
|---|---|---|
in-review | changes-requested | Reviewer found issues with the PR |
changes-requested | in-development | Developer picks up the requested changes |
merge-pending | in-review | Rebase failed or PR not yet approved — return to reviewer |
Recovery and Rollback
Section titled “Recovery and Rollback”| From | To | Why |
|---|---|---|
in-development | ready-for-dev | Developer rolls back on workspace/setup failure |
in-review | ready-for-dev | No open PR found — re-queue for development |
merge-pending | ready-for-dev | Close PR, fresh start from ready-for-dev |
human-review-ready | ready-for-dev | PR closed without merge — return to development queue |
dependency-blocked | ready-for-dev | Dependencies resolved — return to development queue |
failure-blocked | ready-for-dev | Operator unblocked the failure — return to development queue (also targets analyzing / planning / new / in-review / changes-requested / merge-pending depending on blockedFromState) |
Re-analysis
Section titled “Re-analysis”| From | To | Why |
|---|---|---|
needs-clarification | analyzing | Author responded — re-run analysis |
changes-requested | analyzing | Operator-triggered full restart |
human-review-ready | analyzing | Operator-triggered full restart |
in-review | analyzing | Operator-triggered full restart |
in-development | analyzing | Developer planner sends issue back to analyzer |
merge-pending | analyzing | Close PR, re-analyze against current main |
Dependency and Scope Management
Section titled “Dependency and Scope Management”| From | To | Why |
|---|---|---|
analyzing | new | Reset prematurely analyzed issue (dependency recovery) |
needs-clarification | new | Reset prematurely analyzed issue (dependency recovery) |
in-development | dependency-blocked | Sprint Master detected a dependency race |
in-development | failure-blocked | Build failure, cost cap, exhausted retries, or other non-dependency block |
ready-for-dev | new | Scope-overflow auto-routing back to New for decomposition |
changes-requested | new | Scope-overflow auto-routing back to New |
in-development | new | Scope-overflow auto-routing back to New |
ready-for-dev | planning | Scope-overflow direct-to-planning for decomposition |
changes-requested | planning | Scope-overflow direct-to-planning |
in-development | planning | Scope-overflow direct-to-planning |
Planning and Escalation
Section titled “Planning and Escalation”| From | To | Why |
|---|---|---|
needs-clarification | planning | Epic SI routing for epic-scale self-improvement issues |
analyzing | planning | Analyzer escalates epic-scale issues to Planner |
human-review-ready | merge-pending | Sprint Master detects PR became dirty — send to merger |
Pause and Resume
Section titled “Pause and Resume”Any issue in a “pauseable” state can be paused by an operator.
Pauseable states: planning, analyzing, ready-for-dev, in-development, changes-requested, in-review, merge-pending
- Pause: Any pauseable state →
paused(valid) - Resume:
paused→ any state exceptpausedandunlabeled(valid)
State Machine Diagram
Section titled “State Machine Diagram”stateDiagram-v2 direction LR
unlabeled --> new new --> planning new --> analyzing planning --> analyzing analyzing --> needs_clarification : needs info analyzing --> ready_for_dev : ready analyzing --> planning : epic escalation analyzing --> new : dependency reset needs_clarification --> analyzing : author responded needs_clarification --> new : dependency reset needs_clarification --> planning : epic SI routing ready_for_dev --> dependency_blocked ready_for_dev --> in_development ready_for_dev --> new : scope overflow ready_for_dev --> planning : scope overflow dependency_blocked --> ready_for_dev : deps resolved failure_blocked --> ready_for_dev : operator retry failure_blocked --> analyzing : operator retry failure_blocked --> planning : operator retry in_development --> in_review in_development --> needs_clarification in_development --> ready_for_dev : rollback in_development --> analyzing : re-analyze in_development --> dependency_blocked : race detected in_development --> failure_blocked : failure block in_development --> new : scope overflow in_development --> planning : scope overflow changes_requested --> in_development : fix changes changes_requested --> analyzing : full restart changes_requested --> failure_blocked : failure block changes_requested --> new : scope overflow changes_requested --> planning : scope overflow in_review --> human_review_ready in_review --> changes_requested : changes needed in_review --> merge_pending in_review --> ready_for_dev : no PR found in_review --> analyzing : full restart in_review --> failure_blocked : failure block merge_pending --> done merge_pending --> in_review : rebase failed merge_pending --> ready_for_dev : reimplement merge_pending --> analyzing : re-analyze merge_pending --> failure_blocked : auto-merge exhausted human_review_ready --> done human_review_ready --> merge_pending : PR dirty human_review_ready --> ready_for_dev : PR closed human_review_ready --> analyzing : full restart human_review_ready --> failure_blocked : failure block waiting_for_subtasks --> done
state "paused" as paused planning --> paused analyzing --> paused ready_for_dev --> paused in_development --> paused changes_requested --> paused in_review --> paused merge_pending --> pausedState identifiers in the diagram use underscores (a Mermaid requirement). The actual GitHub labels use hyphens — for example, colony:ready-for-dev, colony:in-development.
Per-Executor Valid Transitions
Section titled “Per-Executor Valid Transitions”Each executor type may only request specific target states. Requesting any other state fails validation and moves the issue to failure-blocked.
Analyzer (taskType: 'analyze')
Section titled “Analyzer (taskType: 'analyze')”| Transition | Meaning |
|---|---|
ReadyForDev | Analysis complete, issue is ready for development |
NeedsClarification | Issue is ambiguous, needs author input |
Developer (taskType: 'develop')
Section titled “Developer (taskType: 'develop')”| Transition | Meaning |
|---|---|
InReview | Implementation complete, ready for review |
NeedsClarification | Cannot implement without more information |
Reviewer (taskType: 'review')
Section titled “Reviewer (taskType: 'review')”| Transition | Meaning |
|---|---|
HumanReviewReady | Automated review passed, ready for human approval |
ChangesRequested | PR has issues that need fixing |
Merger (taskType: 'merge')
Section titled “Merger (taskType: 'merge')”| Transition | Meaning |
|---|---|
Done | PR merged successfully |
Planner (taskType: 'plan')
Section titled “Planner (taskType: 'plan')”| Transition | Meaning |
|---|---|
ReadyForDev | Planning complete, issue is ready for development |
WaitingForSubtasks | Epic decomposed into child issues |
Invalid Transitions
Section titled “Invalid Transitions”If an executor returns a requestedTransition that doesn’t match its task type or names an invalid state, the worker throws a validation error:
- A comment is posted on the GitHub issue explaining the invalid result.
- The issue is moved to
failure-blocked. - The
colony:needs-humanlabel is added. - The worker throws a
Blocked:error — the task is not retried.
The SDK exports isValidTransition() to check transitions before returning them:
import { IssueState, isValidTransition } from '@colony/sdk';
const target = IssueState.InReview;if (isValidTransition(IssueState.InDevelopment, target)) { return { taskType: 'develop', status: 'success', requestedTransition: target };}