Skip to content

Pipeline Reference

For CLI flags and options, see the CLI Reference. For individual agent behavior, see the Agent Fleet pages. This page documents what each command reads, writes, and invokes.

The standard SPEED lifecycle follows this sequence:

graph LR
    init --> audit
    audit --> plan
    plan --> verify
    verify --> run
    run --> review
    review --> coherence
    coherence --> integrate

    run -.->|failure| debug[Debugger]
    debug --> supervisor[Supervisor]
    supervisor -.->|retry| run
    supervisor -.->|replan| plan
    supervisor -.->|escalate| human[Human]

    integrate -.->|contract fail| supervisor

    style human fill:#f5f0e8,stroke:#c4775a

The defect pipeline branches from the standard lifecycle:

graph LR
    defect[speed defect] --> triage[Triage]
    triage -->|trivial| autofix[Fix + Integrate]
    triage -->|moderate| reproduce[Reproduce]
    reproduce --> fix[Fix]
    fix --> gates[Gates]
    gates --> review[Review]
    review --> integrate[Integrate]
    triage -->|complex| escalate[Feature Pipeline]

    style escalate fill:#f5f0e8,stroke:#c4775a
PropertyValue
AgentsNone
ReadsExisting project structure
Writes.speed/ directory, CLAUDE.md scaffold, speed.toml, product vision template, src/ and tests/ directories, .gitignore entries, state.json, initial git commit
PrerequisitesNone

Creates the runtime directory and scaffolds project configuration files. Sets up source and test directories, writes .gitignore entries, initializes state.json, and creates an initial git commit. No agents invoked.

PropertyValue
AgentsValidator
ReadsAll spec files in specs/, product vision
WritesConsistency report (stdout)
Prerequisitesspeed init

The Validator reads every spec file and cross-references them for entity relationships, traceability, and data model integrity. Output is a JSON report with critical gaps, warnings, and an entity map.

PropertyValue
AgentsNone
ReadsSpec templates from speed/templates/
WritesSpec file in the appropriate specs/ subdirectory
Prerequisitesspeed init

Scaffolds a new spec file from a type-specific template. Supported types and their output paths:

TypeOutput Path
prdspecs/product/<name>.md
rfcspecs/tech/<name>.md
designspecs/design/<name>.md
defectspecs/defects/<name>.md

Name validation enforces lowercase alphanumeric characters and hyphens only, with no leading or trailing hyphens. Opens the created file in $EDITOR after scaffolding.

PropertyValue
AgentsSpec Auditor
ReadsSpec file, type template from speed/templates/, product vision, existing spec list, linked PRD (for RFC/Design)
WritesAudit report (stdout), timestamped audit JSON in .speed/features/<feature>/logs/
Prerequisitesspeed init

Runs four check levels (structural, completeness, cross-spec consistency, sizing) against the spec’s type template. Defect specs trigger cross-referencing with the related feature spec extracted from the **Related Feature:** field. Output is a JSON report with per-section issues, a sizing recommendation, and (for large specs) a split advisory when estimated tasks exceed the single-phase threshold.

PropertyValue
AgentsSpec Auditor (unless --skip-audit), Product Guardian (pre-plan gate), Architect
ReadsProduct/tech/design specs, Layer 1 context (CSG clusters, project map, spec alignment), related specs (TF-IDF scored), product vision
WritesTask JSONs in .speed/features/<feature>/tasks/, contract.json, cross_cutting_concerns.json, validation report
Prerequisitesspeed init, spec files exist

The most complex command in the pipeline. Runs through several stages:

spec file ──► Spec Auditor ──► Product Guardian ──► Architect
(pre-plan) │
├──► tasks/*.json
├──► contract.json
├──► cross_cutting_concerns.json
└──► validation report

Plans are cached by spec content hash. Subsequent runs with an unchanged spec skip the guardian and architect stages. The --force flag bypasses the cache entirely.

Given a tech spec path like specs/tech/<name>.md, the planner auto-derives sibling specs (specs/product/<name>.md, specs/design/<name>.md) as additional context when they exist. For features whose audit sizing recommendation exceeds the per-phase task threshold, the Architect runs in two phases: Phase 1 generates foundation infrastructure tasks, Phase 2 generates feature implementation tasks. Task sets, contracts, and cross-cutting concerns are merged across phases.

After task generation, a decomposition quality gate validates cluster size, cross-cluster coordination, file ownership overlap, and bridge symbols. If only bridge-symbol dependency edges are missing, the planner auto-patches depends_on fields in the task JSONs and re-validates without requiring a full re-plan.

PropertyValue
AgentsPlan Verifier, Fix Agent (on failure)
ReadsProduct spec (without Architect reasoning), task plan, contract, cross-cutting concerns, spec traceability
WritesVerification report (stdout), modified task JSONs (when auto-fixing)
Prerequisitesspeed plan

An adversarial audit. The Plan Verifier reads the original spec and the generated plan independently, checking for missing requirements, semantic drift, and contract gaps.

When the verifier finds fixable issues, a Fix Agent modifies task JSONs directly and the verifier re-runs. The loop continues for up to N iterations with convergence detection: if the same failures persist across iterations, the system escalates to human review rather than retrying. Issues classified as needs_human skip the auto-fix loop entirely.

PropertyValue
AgentsDeveloper (per task), Debugger (on failure), Supervisor (on failure)
ReadsTask JSONs, Layer 2 context (touched files, 1-hop callers, 2-hop skeletons), upstream decisions, spec references, cross-cutting concerns
WritesCode changes on worktree branches, completion/blocked summaries, gate results
Prerequisitesspeed plan (or speed verify recommended)

Executes pending tasks in parallel using isolated git worktrees. Each Developer agent receives its Layer 2 context package scoped to declared files. On failure, the Debugger diagnoses the root cause and the Supervisor decides recovery (retry, escalate, replan, or halt).

Startup includes stale state auto-recovery, resetting any “running” tasks left behind by a previous crashed session to pending. Dependencies between tasks use deferred dependency merging, with conflict retry when upstream branches produce merge conflicts. When a task times out, the orchestrator auto-escalates the model tier (sonnet to opus) before retrying. A halt threshold (default: 30% failure rate) stops the entire run to prevent cascading failures. The Supervisor performs pattern failure detection across the failure log to identify systemic issues rather than treating each failure independently.

PropertyValue
AgentsDeveloper (reproduce mode and/or fix mode)
ReadsTriage output, defect report, affected file contents
WritesFailing test (reproduce stage), fix code (fix stage)
Prerequisitesspeed defect (triage must complete first)

Runs the defect pipeline instead of the standard task pipeline. For trivial defects, skips the reproduce stage and goes directly to fix. For moderate defects, writes a failing test first, then fixes the code.

PropertyValue
AgentsReviewer, Product Guardian (post-review gate)
ReadsGit diff from worktree branch, task acceptance criteria, product spec, blast radius data, spec verification matrix, cross-cutting concerns
WritesReview report (stdout), review JSON in logs directory, review-nits.json (aggregated nits from approved tasks)
PrerequisitesTask completion via speed run

Two-stage process per task:

task diff ──► Reviewer ──► Product Guardian
│ (post-review)
│ │
▼ ▼
approve/reject aligned/flagged/rejected

The Reviewer checks the diff against the product specification (not just the task description). Traces every code change back to a spec requirement. Flags over-engineering and out-of-scope code. If the Reviewer approves, the Product Guardian runs a vision-alignment check on the same diff. A Guardian rejection overrides the approval and sends the task back to request_changes.

Nits and minor issues from approved tasks are collected into review-nits.json for batch resolution via speed fix-nits.

PropertyValue
AgentsCoherence Checker
ReadsAll “done” task diffs, spec, contract, cross-cutting concerns
WritesCoherence report in logs directory
Prerequisitesspeed review for tasks under check

Cross-task composition check. The Coherence Checker examines how independently developed task branches interact when combined, looking for interface mismatches, duplicated logic, and contradictory assumptions.

When a previous coherence report exists, the checker runs a delta comparison: archiving the prior report and categorizing issues as fixed, remaining, or new. Subsequent runs after targeted fixes can verify resolution without re-checking the entire feature.

PropertyValue
AgentsNone (deterministic)
ReadsTask source code in worktree
WritesGate results (stdout)
PrerequisitesTask code exists

Runs quality gates manually. --fast mode (default): syntax + lint + typecheck. --full mode: all quality gates including grounding gates and tests. The --worktree <path> flag overrides the auto-detected worktree location.

In --full mode, passing all gates on a previously failed task promotes it to “done” status.

PropertyValue
AgentsIntegrator (merge), Product Guardian (post-integration)
ReadsAll completed task branches, contract, product spec, regression test config
WritesMerged code on feature branch, integration report, contract verification results
Prerequisitesspeed review for all tasks, speed coherence recommended
completed branches ──► Integrator ──► regression tests ──► CSG rebuild ──► contract check ──► Product Guardian
(merge) (Supervisor on fail) (post-integration)

The Integrator merges branches in dependency order. After merging, regression tests run automatically (skip with --skip-tests). The Layer 1 codebase index (CSG) is rebuilt against the merged result for an accurate contract check. If the contract check fails, the Supervisor is invoked to diagnose and decide recovery. The Product Guardian performs a final vision check on the integrated result.

speed integrate --defect <name> integrates a defect fix. For moderate defects in “fixed” state, review runs first automatically before integration.

PropertyValue
AgentsSecurity Auditor
ReadsTask file lists, code diffs, dependency manifests, product spec, tech spec, CLAUDE.md
Writes.speed/features/<feature>/logs/security-audit.json, optionally defect specs in specs/defects/
PrerequisitesFeature code exists

Scans feature code for OWASP vulnerabilities. With --create-defects, generates defect specs for findings above the configured severity threshold. Cached results are reused if less than 1 hour old.

PropertyValue
AgentsTriage
ReadsDefect spec, related feature spec, related tech spec, CLAUDE.md, full codebase
WritesTriage result (JSON)
PrerequisitesDefect spec exists

Investigates the defect in the codebase (Phase 1), then classifies complexity and routes to the appropriate fix pipeline (Phase 2). Trivial defects auto-continue through fix and integration within the same command invocation, completing the entire defect lifecycle without manual intervention. Moderate and complex defects pause after triage for human review before proceeding to speed run --defect.

PropertyValue
AgentsProduct Guardian
ReadsProduct vision, artifact under review
WritesVision alignment report (stdout)
PrerequisitesProduct vision exists

Ad-hoc mode: evaluates any file against the product vision. Feature mode: evaluates the current feature’s spec and task plan.

speed retry --task-id ID --context "instructions"

Section titled “speed retry --task-id ID --context "instructions"”
PropertyValue
AgentsDeveloper
ReadsTask JSON, human-provided context, previous failure data, review feedback history
WritesCode changes on worktree branch
PrerequisitesTask is failed or blocked

Restarts a failed or blocked task with human guidance. The --context flag is required to prevent blind retries without diagnostic input. --escalate upgrades the model tier through the ladder: haiku to sonnet to opus.

speed retry --defect <name> retries a defect fix with stage-aware re-entry, resuming from the stage that failed rather than restarting the entire defect pipeline.

PropertyValue
AgentsNone
Reads.speed/ state directory, security-audit.json, sast-findings.json, sca-findings.json
WritesStatus display (stdout)
Prerequisitesspeed init

Displays orchestration state. Shows a multi-feature overview with done/running/failed counts per feature, then detailed state for the active feature including:

  • Task dependency graph and completion summary
  • Security findings aggregated from three sources (audit, SAST, SCA) broken down by severity
  • Timed-out tasks flagged for potential decomposition
  • Failure classification breakdown (pipeline vs. complexity, with per-subclass counts)
  • Latest Supervisor analysis (diagnosis, detected patterns, root cause, recommendations)

The --defects flag switches to defect state display instead of task state.

PropertyValue
AgentsNone
Reads.speed/ state directory
WritesRemoves logs (clean logs), entire state (clean all), or feature state (clean feature <name>)
PrerequisitesNone

clean logs clears log files. clean all removes the entire .speed/ state directory. clean feature <name> removes a specific feature’s state and associated worktrees. When a feature is active, log cleaning is scoped to that feature’s logs only.

PropertyValue
AgentsNone (creates a task for Developer)
Readsreview-nits.json from last review
WritesNew task JSON in .speed/features/<feature>/tasks/
Prerequisitesspeed review (nits must exist)

Reads nits collected during review and creates a new task containing all minor fixes. The generated task includes file paths, line numbers, severity, and suggested changes from the reviewer. Dependencies are set to the source tasks that produced the nits. The optional --task-id flag filters nits to a single source task.

PropertyValue
AgentsNone
Reads.speed/ state directory, process table
WritesResets running tasks to pending, cleans stale state
PrerequisitesNone

Emergency recovery from a crashed session. Breaks stale locks, kills orphan agent processes, resets tasks stuck in “running” state back to pending, cleans the running and support directories, resets SPEED state to idle, and removes orphaned worktrees.

PropertyValue
AgentsLLM-assisted rule generation
ReadsTree-sitter grammar node-types.json
Writesast-grep YAML rules (definitions.yml, references.yml), extraction.toml entry
Prerequisitestree-sitter-<language> grammar package installed

Adds tree-sitter extraction support for a new programming language. Validates the grammar package, reads its node-types.json, generates draft ast-grep YAML rules via LLM, and registers the language in extraction.toml. Review generated rules with speed test-rules <language>.

PropertyValue
AgentsNone
Readsast-grep rules, fixture files, expected output JSONs
WritesTest results (stdout)
Prerequisitesast-grep (sg) installed

Runs ast-grep rules against fixture files and compares output to expected results. Without arguments, tests the active language. With --all, tests every registered language. Reports PASS/FAIL/OK per fixture, with FAIL indicating a mismatch against the expected output.

PropertyValue
AgentsNone
ReadsProject root, .speed/ state files
WritesPID files, dashboard database
PrerequisitesDashboard dependencies installed

Manages the monitoring dashboard. Subcommands:

SubcommandBehavior
start [--port PORT] [--api-only]Launches FastAPI backend (default port 4440) and Next.js frontend (port 3000). --api-only skips the frontend.
stopGraceful shutdown with 5-second timeout, then force-kills.
statusShows running/dead state of dashboard processes.
ingestBackfills the dashboard database from state files without starting the server.
PropertyValue
AgentsNone
Readsreceipt.json (managed install metadata)
WritesUpdated installation in ~/.speed/
PrerequisitesManaged install (not a git clone)

Atomic self-update using a staging directory and symlink swap. Rebuilds the Python venv only when requirements.txt has changed. Retains the previous version alongside the current one and cleans older versions. Safe for concurrent processes (POSIX atomic swap).

PropertyValue
AgentsNone
ReadsShell rc files (.zshrc, .bashrc, .bash_profile, fish config)
WritesRemoves ~/.speed/ installation, cleans PATH entries from shell rc files
PrerequisitesNone

Removes the SPEED installation directory and cleans up shell configuration files that reference it.

Every persistent artifact, the command that creates it, and the commands that consume it.

ArtifactPathCreated ByConsumed By
Runtime directory.speed/initAll commands
Project configspeed.tomlinitAll commands
Product visionspecs/product/overview.mdUser (scaffolded by init)audit, plan, guardian, security
Spec filesspecs/{product,tech,design}/<feature>.mdUser or newvalidate, audit, plan, verify, review
Task JSONs.speed/features/<feature>/tasks/*.jsonplan, fix-nitsrun, verify, review, integrate
Contract.speed/features/<feature>/contract.jsonplanverify, integrate (contract check)
Cross-cutting concerns.speed/features/<feature>/cross_cutting_concerns.jsonplanverify, run, review, coherence
Worktree branches.speed/worktrees/<task>/runreview, integrate
Gate results.speed/features/<feature>/gates/<task>/run, gatesreview, supervisor
Security audit.speed/features/<feature>/logs/security-audit.jsonsecuritystatus, defect (via --create-defects)
SAST findings.speed/features/<feature>/logs/sast-findings.jsonsecuritystatus
SCA findings.speed/features/<feature>/logs/sca-findings.jsonsecuritystatus
Defect specsspecs/defects/<name>.mdUser, new, or security --create-defectsdefect
Triage result.speed/features/<feature>/triage.jsondefectrun --defect
Review nits.speed/features/<feature>/logs/review-nits.jsonreviewfix-nits
Coherence report.speed/features/<feature>/logs/coherence.logcoherencesupervisor
Integration report.speed/features/<feature>/integration.jsonintegratestatus
Audit reports.speed/features/<feature>/logs/audit-<timestamp>.jsonaudit(diagnostic)