Skip to content

How It Works

← Getting Started · Español


The pipeline

Every task follows the same story:

Requirement → Plan → Tasks → Code → Review

mermaid
flowchart LR
  subgraph phases [Flow phases]
    R[Refining<br/>task.md]
    D[Designing<br/>plan.md + tasks.md]
    I[Implementing<br/>source code]
    V[Reviewing<br/>review.md]
  end
  R --> D
  D -->|/approve| I
  I --> V
  V -->|PASS| A[Archive + flow off]
  V -->|FAIL| I
Phase fileAgentWrites code?Main output
refiningRefinerNotask.md with AC1, AC2
designingSDDNoplan.md, tasks.md
implementingImplementerYesYour codebase + tasks.md checkboxes
reviewingReviewerNoreview.md

Older projects may still have sdd.md instead of plan.md — agents prefer plan.md when both exist.


Direct mode vs Flow mode

Direct modeFlow mode
WhenDefaultAfter nueva tarea, flow on, etc.
FlagNo .agents-state/.flow-enabledFile exists
BehaviorNormal assistantOrchestrator picks phase agent
OverheadNoneArtifacts in .agents-state/current/

Why two modes: small fixes should stay fast. Structured work opts in explicitly.


What to inspect in each phase

Use this as a reading guide — open the file, check the section, decide if you need to intervene.

Refining — read task.md

CheckGood signRed flag
AC*Specific, testableVague (“make it better”)
ConstraintsLists what must not breakEmpty on risky changes
Out of ScopeExplicit exclusionsMissing on large tasks

You do not need to edit the file yourself — reply in chat and the Refiner updates it.

Designing — read plan.md and tasks.md

CheckGood signRed flag
plan.mdLists files and approach you agree withSurprise refactors
tasks.mdSmall, ordered stepsGiant vague tasks
TraceabilityACs mapped to scenariosACs with no plan

Approve only when you would be comfortable seeing the diff described in the plan.

Implementing — read tasks.md + git diff

CheckGood signRed flag
Task order[test] before [impl] when both existSkipped tests
ScopeMatches planUnrelated files changed
BlockersAgent asks youSilent assumptions

Reviewing — read review.md

CheckGood signRed flag
Each ACRow with evidenceMissing AC row
VerificationCommands ran, exit 0Failed tests ignored
DecisionClear PASS or FAILAmbiguous summary

Four agents in plain language

Refiner

Turns your idea into a crisp task.md. Asks up to a few questions per round when input is vague; summarizes when you already wrote a detailed ticket. Never edits source code.

SDD (Solution Design)

Produces the technical plan and task checklist from task.md. Presents summary in chat and waits. Never edits source code until you /approve.

Implementer

Only agent that may change source files. Follows tasks.md exactly. Stops on spec gaps instead of guessing.

Reviewer

Maps every AC to evidence, runs .agents-docs/verification.md, writes review.md. On PASS, archives the session and turns flow off.


Activation phrases

Start flowEnd flow
nueva tarea · activar flujo · flow on · new taskmodo directo · flow off · desactivar flujo · direct mode
nueva tarea desde TEAM-123 · Linear issue URL(same end phrases)

The orchestrator reads phase.md on each message to decide which agent rules apply.


Linear sync (optional)

When .specflow-linear.json has "enabled": true and you start from an issue id, the agent in Cursor uses Linear MCP to load the ticket and update board states.

SpecFlow eventDefault Linear state
Refining completeTodo
/approveIn Progress
Review PASSDone

Setup is not in the CLI API — see Linear Integration for the Cursor plugin checklist.


Files in .agents-state/current/

FileAppears in phasePurpose
phase.mdAlwaysCurrent phase — routing source of truth
refinement-log.mdRefiningQ&A (compacted after task.md)
task.mdRefining+Requirement + AC1, AC2
plan.mdDesigning+Approved design (legacy: sdd.md)
tasks.mdImplementing+Checklist for Implementer
review.mdReviewingResult + verification output
linear.jsonLinear tasksActive issue identifier (optional)

When flow is inactive, current/ may be empty — that is normal.


Approval gate

/approve

Also accepted: aprobado, dale.

Why: separates “I like the plan” from “start coding”. The Implementer must not run until approval is explicit.


Verify your setup anytime

bash
specflow doctor
specflow doctor --run

doctor checks installed files, adapters, and flow artifacts. --run executes the verification commands you documented for your project.


← Getting Started · CLI Reference →

Released under the MIT License.