Orchestration
The 9-phase pipeline engine for complex, multi-step development tasks.
Orchestration
For tasks that go beyond a single prompt-response cycle, Brainstorm's orchestration engine manages a 9-phase pipeline that takes a feature from specification through deployment. Each phase uses specialized subagents with appropriate tools and models.
The 9-Phase Pipeline
1. Specification
Clarifies requirements, identifies constraints, and produces a structured spec. The decompose agent breaks ambiguous requests into concrete deliverables.
2. Architecture
Designs the technical approach -- file structure, data models, API contracts, and component boundaries. Uses the explore agent to understand existing patterns before proposing changes.
3. Implementation
The code agent executes the plan, creating and modifying files. Checkpoints are created before each major change for safe rollback.
4. Review
The review agent analyzes all changes for correctness, security issues, and adherence to project conventions. Findings are reported with severity levels.
5. Verification
Runs tests, type checks, and linting. If verification fails, the pipeline loops back to implementation with the specific errors to fix.
6. Refactoring
Cleans up implementation code -- extracts shared logic, improves naming, and ensures consistency with the existing codebase style.
7. Deployment
Generates or updates deployment configuration (CI/CD, Docker, infrastructure). Validates that the changes are deployment-ready.
8. Documentation
Updates or creates documentation for the changes -- README updates, API docs, inline comments, and changelog entries.
9. Reporting
Produces a summary of everything that was done: files changed, tests added, decisions made, and cost breakdown.
Build Wizard
The build wizard provides an interactive interface for configuring and launching orchestration runs:
``bash
storm build
`
It walks you through:
- Task description: What you want to build
- Scope selection: Which phases to include (you can skip phases)
- Cost estimation: Projected token usage and cost before starting
- Model selection: Override the default routing for specific phases
- Confirmation: Review the plan before execution begins
Cost Estimation
Before an orchestration run begins, Brainstorm estimates the total cost based on:
- Task complexity (from the classifier)
- Number of phases selected
- Expected token counts per phase
- Current model pricing
This lets you make informed decisions about whether to proceed, adjust scope, or switch to more cost-efficient models.
Trajectory Capture
Every orchestration run captures a full trajectory -- the sequence of prompts, model responses, tool calls, and outcomes. This data feeds into the learned routing strategy and is stored locally for analysis. Trajectories are also the foundation for BrainstormLLM training data.
Running Orchestration
`bash
storm build # interactive wizard
storm run --orchestrate "Add user auth with OAuth" # direct launch
storm run --phases spec,impl,test "Fix the payment flow" # specific phases
``