Pipelines
Build and run multi-agent pipelines with the CHAOS PM engine.
What is a Pipeline?
A pipeline is a coordinated sequence of agents — some running in parallel, some in series — orchestrated by the PM engine. Pipelines let you describe a high-level goal and have CHAOS handle agent selection, dependency ordering, and result aggregation.
Built-in Pipelines
CHAOS ships with several ready-to-use pipelines accessible via the PM agent:
# Pre-commit: test + security in parallel, then review
cw run pm "pre-commit pipeline"
# Feature complete: refactor → test + docs (parallel) → review
cw run pm "feature complete pipeline for src/payments/"
# Project health check
cw run pm "health check"
# Full release: test + security → review → changelog → tag → publish
cw run pm "release pipeline"
# Quick scan (fast, parallel)
cw run pm "quick scan"
Dispatching Custom Pipelines
Describe any combination of agents in natural language:
cw run pm "run the python agent and test agent on src/api/, then security audit the results"
cw run pm "generate documentation for all public APIs, then review for accuracy"
cw run pm "refactor src/database/ for SQLAlchemy 2.0 async patterns, verify with tests"
The PM agent reasons about your intent, selects agents, determines parallelism, and dispatches.
Pipeline Execution Model
User intent
|
v
PM agent (decompose into tasks)
|
v
PostgreSQL task queue (SKIP LOCKED)
|
+---> Agent A (subprocess) ---|
| |
+---> Agent B (subprocess) ---+---> EventBus signal
| |
+---> Agent C (waits for A) |
| |
v |
Agent C starts <---------+
|
v
PM collects all outputs
|
v
Merged result to user
Agents that have no dependencies run in parallel immediately. Agents with dependencies wait for their prerequisites to signal completion via the EventBus.
Parallel vs. Sequential
The PM engine determines parallelism automatically based on task dependencies. You can also be explicit:
# These naturally run in parallel (no dependency between them)
cw run pm "run test-agent and security-agent on src/ simultaneously, then review-agent"
# This is sequential (docs depends on code being written)
cw run pm "python-agent: add user authentication; then docs-agent: document the new endpoints"
Checking Pipeline Status
# In the web dashboard (http://localhost:3000)
# Navigate to the Agents tab — live status of all running agents
# Via MCP tool from your editor
# Call: get_agent_status or list_active_sessions
Pipeline Results
Each agent writes structured output to .claude/agent-state/<agent>.output.md. The PM collects these and presents a merged summary. All individual outputs are preserved for review.
Skills as Pipeline Shortcuts
CHAOS skills are pre-built pipeline templates triggered by slash commands:
| Skill | Agents Invoked |
|---|---|
/verify | lint + tests + types |
/review | review-agent |
/security | security-agent |
/test | test-agent |
/pr-prep | review-agent + changelog |
/audit | project-audit + security + docs |
/sprint | docs-agent (changelog, dev-log, TOC, README) |
Run any skill from the CLI:
cw run pm "/verify"
cw run pm "/security"
cw run pm "/audit"
Or directly from your MCP-connected editor by name.