The ARCUS Pipeline
Understanding ARCUS's full Spec → Code → Pull Request stage map
Where the canonical list lives
This page is the single human-readable enumeration of the ARCUS pipeline. The stateful arcus-controller orchestrator owns the session checkpoint and stage gates, driving the 6 phases by handing each capability its explicit inputs (see Modes).
Built from reusable capabilities
Each stage below is built from the three-tier capability library — atomic capabilities, thin coordinators, and the stateful orchestrator. See The Capability Library for how the pipeline's stages are assembled from reusable, plug-n-play building blocks.
The Pipeline at a Glance
ARCUS transforms a written user story into a reviewed, test-backed pull request through a sequence of stages, tracked in the session checkpoint by these ordered stage keys:
scaffold → context_pack → spec_finalizer → plan → test_plan → branch → task_1..N → code_review → context_sync → closureThe ten stages group into six human-facing phases:
- Brainstorm — Scaffold the workspace, build the context pack, finalize the spec, and produce the implementation plan (
scaffold,context_pack,spec_finalizer,plan) — the only place the pipeline stops for you, and only if a stage raises open questions - Test Plan — Design the verification matrix (
test_plan) - Implementation — Create the branch, then implement & verify each task (
branch,task_1..N) - Code Review — Two-tier holistic gate over the whole branch diff (
code_review) - Context Sync — Reconcile the shared
.context/artifacts that the approved diff materially drifted (context_sync; automatic continuation) - Closure — Create the pull request (
closure)
Stages produce specific artifacts. The pipeline's pausing behavior depends on mode (see Three Modes, One Pipeline): in gated mode, it pauses for open questions during Brainstorm and optionally at phase boundaries; in intelligent mode, only for Brainstorm questions; in afk mode, never. The rows below note each stage's handoff gate, where the orchestrator presents the just-finished stage's output. Within Brainstorm the scaffold, context_pack, spec_finalizer, and plan stages run back-to-back — arcus-controller runs context-pack-builder → spec-finalizer → implementation-planner directly — before any questions are surfaced. The Code Review stage can loop back to Implementation up to 3 times if changes are requested.
Skills vs agents. The participants below live on one of two surfaces (see The Capability Library): user-invocable skills (
plugins/arcus/skills/) and model-only agents (plugins/arcus/agents/), dispatched by name and never user-facing. Dispatched participants —context-pack-builder,subagent-task-dispatcher,code-simplifier, the five specialist/spec reviewers, andcontext-drift-sync— are agents; the stage entry points (arcus-controller,code-reviewer,implementation-runner) are skills.
What The Gates Mean
Gates are explicit pause points where you review outputs before the pipeline moves to the next stage (gated experience only).
| Gate | Between Stages | Meaning |
|---|---|---|
| Gate A | Brainstorm → Test Plan | Grounded spec and plan are ready for test design. |
| Gate B | Test Plan → Implementation | Test strategy is approved; the branch can be created and implementation can begin. |
| Gate C | Implementation → Code Review | Code and tests are complete; ready for holistic review. |
| Gate D | Code Review → Context Sync (or loopback) | Review decision point: approve (advances to Context Sync, which then auto-continues to Closure), or send fixes back to Implementation. |
Context Sync → Closure is an automatic continuation (no user decision gate — like Test Plan auto-running): once the .context/ reconciliation is decided, the pipeline proceeds straight to Closure.
Gates are phase-boundary pauses specific to gated mode. For how modes control which gates fire and whether open questions surface, see Three Modes, One Pipeline.
Stage Breakdown
Scaffold
| Purpose: Set up the workspace and record the planned branch — without creating actual git branch | ||
|---|---|---|
| What happens | Skills / scripts involved | Artifacts created |
|
|
|
| Scaffold flows directly into Brainstorm. | ||
What to check:
- Story copied correctly to workspace
- Planned branch name looks right (
arcus/[STORY-ID]-N)
Brainstorm
| Purpose: Build context, resolve ambiguities, capture design decisions and produce a task-level plan | ||
|---|---|---|
| What happens | Skills involved | Artifacts created |
|
|
|
The Brainstorm stop: if spec-finalizer or implementation-planner recorded open questions, gated and intelligent modes surface them as one batch and wait. Answer them and the pipeline runs to the PR without stopping again (unless gated mode is also configured with phase-boundary gates via stop_after). No questions raised → no stop in those modes. AFK mode never surfaces them. Resume phrase: resume <STORY-ID>. | ||
What to check:
- Grounded decisions in
grounded-spec.mdalign with your intent - No missing technical constraints; error handling makes sense
- Tasks in
plan.mdare atomic and correctly ordered
Tip: This is the place where "make-or-break" decisions are taken before implementation. Review grounded-spec.md and plan.md carefully.
Test Plan
| Purpose: Design comprehensive test matrix before writing code | ||
|---|---|---|
| What happens | Skills involved | Artifacts created |
|
|
|
Continues straight into Implementation. Resume phrase: resume <STORY-ID>. | ||
What to check:
- Test coverage feels comprehensive
- Edge cases captured; error scenarios realistic
- Test structure follows repo patterns
Tip: Add missing test cases to test-plan.md before proceeding. This is TDD in action.
Implementation
| Purpose: Create the branch, then implement the story with continuous verification | ||
|---|---|---|
| What happens | Skills involved | Artifacts created |
Quality is not reviewed per-task — it is owned holistically by Code Review over the whole branch diff, since isolated subagents never see prior tasks' code. |
|
|
Continues straight into Code Review. Resume phrase: resume <STORY-ID>. | ||
What to check:
- All tests pass locally
- Implementation feels complete; no obvious gaps
- Commits are clean and atomic
Tip: You can edit the task list in plan.md at Gate A or Gate B before implementation begins.
Code Review
| Purpose: The real last gate before a PR — a two-tier review over all changes, with a zero-trust persona (brutal in the hunt, fair in the verdict) | ||
|---|---|---|
| What happens | Skills involved | Artifacts created |
|
|
|
Acts on the verdict without asking: approved → Context Sync (then auto-continues to Closure); changes_requested → the Loopback Protocol runs automatically, up to 3 rounds. Resume phrase: resume <STORY-ID>. | ||
What to check:
- Review findings are accurate; severity levels appropriate
- No false positives; critical issues are genuine blockers
Tip: If you disagree with findings, you can proceed anyway (override verdict).
Context Sync
Purpose: Reconcile the shared .context/ artifacts that the approved branch diff materially drifted — facts-only, diff-driven, no full rescan | ||
|---|---|---|
| What happens | Skills involved | Artifacts created |
|
|
|
| Auto-continues to Closure once the reconciliation is decided. | ||
What to check:
- The drift assessment correctly identifies which
.context/artifacts the diff touched - Only materially-affected artifacts were synced (no over-reach)
For the full picture of how the shared .context/ artifacts are built, scoped, and kept current, see Context Engineering.
Closure
| Purpose: Create pull request with evidence and context | ||
|---|---|---|
| What happens | Skills involved | Artifacts created |
|
|
|
| Terminal stage. PR created, or ready for manual creation. | ||
What to check:
- PR description is accurate and complete
- All tests pass
- Branch is up to date with base
Deferred Branch Creation
ARCUS creates the git branch late — at the start of Implementation, not during Scaffold:
- Scaffold (
scaffold.sh) creates the spec folder, copiesstory.md, and initializes the checkpoint recording the plannedbranch_nameandbase_branch. No git branch exists yet. - The branch naming convention
arcus/<STORY-ID>-Nis defined once in the sharedscripts/lib/branch_name.shlibrary (sourced by bothscaffold.shandbranch.sh). - Implementation begins with the
branchstage:branch.sh(driven by theimplementation-runnerskill) reads the planned name, re-checks for collisions created since scaffold (bumping the index if needed), creates and checks out the branch, and callscheckpoint.sh set-branchif the realized name differs from the plan.
This keeps planning entirely on the base branch and only branches once there is actual code to commit.
Exception: adopted branches in a worktree
Deferred creation assumes ARCUS gets to choose the branch. In a linked git worktree it does not — the host already checked the workspace out on a dedicated session branch and, typically, bound its pull-request tracking to it. Creating arcus/<STORY-ID>-N off that branch would leave the story somewhere the session cannot see.
So when scaffold.sh finds a linked worktree on a non-default branch, it adopts that branch instead of planning one:
branch_name= the current branch;base_branch= the repository default (origin/HEAD, falling back tomainthenmaster) — the adopted branch cannot be its own base without producing a self-targeting PR. If none of those resolve, scaffold fails and asks for--baserather than inventing one;- the
branchstage is markedcomplete, so Implementation skipsbranch.shentirely (andbranch.shno-ops if called directly anyway).
scaffold.sh reports which path it took as BRANCH_MODE: new|adopted. Override with --new-branch to force planning, or --use-current-branch to force adoption outside a worktree. A third value, existing, means a checkpoint was already on disk so scaffold decided nothing and echoed the stored branch fields — that is a resume, not a scaffold.
Review Loopback Mechanism
If Code Review returns changes_requested:
- Fix-tasks generated from review findings (appended to
plan.md) - Loop back to Implementation (re-enters
implementation-runner) - Subagents address issues following the fix-tasks
- Return to Code Review for re-review
- Bounded to 3 rounds maximum to prevent infinite loops
- Manual intervention required if the 3rd round still fails
Why bounded? Prevents loops on subjective or unclear issues. After 3 rounds, human judgment is needed.
Quick Stage Reference
| Phase | Stage key(s) | Entry / resume phrase | Exit condition |
|---|---|---|---|
| Brainstorm | scaffold, context_pack, spec_finalizer, plan | arcus <STORY> (gated) or plan <STORY> (alias) | Workspace + planned branch ready; grounded-spec.md and plan.md complete |
| Test Plan | test_plan | generate test plan for <STORY> | test-plan.md complete |
| Implementation | branch, task_1..N | implement <STORY> / code <STORY> | Branch created, all tasks done, tests pass |
| Code Review | code_review | review <STORY> | Verdict: approved / changes_requested |
| Context Sync | context_sync | sync context for <STORY> | Affected .context/ artifacts reconciled (auto-continues to Closure) |
| Closure | closure | close <STORY> | PR created |
Artifacts
Each story produces a working area under .arcus/specs/[STORY-ID]/ with the following artifacts:
| Artifact | Purpose |
|---|---|
session-checkpoint.json | Resumable per-stage execution state (ordered stage keys + status enum), including the planned/realized branch_name and base_branch |
story.md | Canonical copy of the input story |
context-pack.md | Compact, token-efficient context bundle |
grounded-spec.md | Grounded story decisions: context grounding, resolved ambiguities, open questions, dialogue answers, implementation boundary (written by spec-finalizer) |
plan.md | Design deliberation plus the atomic task list (written by implementation-planner) |
test-plan.md | Generated verification matrix and test cases |
review.md | Deterministic gate results + holistic code-review findings + verdict |
PR_DESCRIPTION.md | Final PR body |
Treat .arcus/ as ephemeral working data - safe to inspect, commit, or discard.