Creating Pipelines
What's a Pipeline?
A pipeline defines a multi-agent workflow โ an ordered sequence of agent steps where each step's output feeds into the next. Pipelines support branching, loops, and resumability.
Pipeline Format
name: my-pipeline
version: 1.0.0
description: "What this pipeline accomplishes"
trigger: "natural language pattern *"
steps:
- name: step-one
agent: first-agent
input: "what this step receives"
output: "what this step produces"
on-failure: halt
- name: step-two
agent: second-agent
input: "output from step:step-one"
output: "final result"
on-failure: loop
loop-target: step-one
max-iterations: 3
resumable: true
The Complexity Router Pre-Step
Before any pipeline executes, the complexity-router automatically runs as a pre-step:
- Classification โ Analyzes the request complexity
- Model Selection โ Chooses the optimal model tier
- Pipeline Selection โ Determines if this is the right pipeline or if a simpler/more complex one should be used
This routing happens transparently. The router uses signals from: - Task scope and dependencies - Required domain expertise - Expected output complexity - Time constraints
See skills/complexity-router/resources/complexity-signals.md for the full classification criteria.
Step Configuration
on-failure options
haltโ Stop the pipeline; report failureloopโ Go back toloop-targetstep (requiresmax-iterations)skipโ Skip this step; continue to nextretryโ Retry this step (usesmax-iterations)
Input References
Use step:name to reference output from a previous step:
"Spec from step:specify"โ uses the specify step's output"Code from step:implement AND spec from step:specify"โ multiple inputs
Existing Pipelines
See the pipelines directory for all available pipelines.
v2.0: Pipeline Execution Engine
In v2.0, pipelines are actually executed by the PipelineExecutor engine. This replaces the v0.x approach where pipelines were just YAML documentation of intended workflows.
Running a Pipeline
# Via CLI
omniskill pipeline run sdd-pipeline --project ./myapp
# Via SDK
from sdk.omniskill import OmniSkill
os = OmniSkill()
os.execute_pipeline("sdd-pipeline", project_name="myapp")
Pipeline State Machine
The engine manages pipeline state through these transitions:
pending โ validating โ executing โ completed
โ
failed / paused / cancelled
- pending โ Pipeline loaded, not yet started
- validating โ Checking prerequisites and schema compliance
- executing โ Running steps sequentially
- completed โ All steps finished successfully
- failed โ A step failed with
on-failure: halt - paused โ Execution paused (can be resumed)
- cancelled โ Manually cancelled
State Persistence
Pipeline state is saved as JSON to ~/.copilot/.omniskill/pipeline-states/. This enables:
- Resumability โ
omniskill pipeline resume <state-id> - Audit trail โ Every step, decision, and deviation is recorded
- Accumulated state โ Decisions, constraints, and tech_stack grow across steps (never shrink)
Context Curation Between Steps
The context-curator agent runs between pipeline steps to create focused context briefs:
- Summarizes the previous step's output
- Filters to only what the next agent needs
- Applies token budget constraints
- Generates a structured context brief
This prevents context pollution โ each agent gets a clean, focused input rather than the entire accumulated history.
Artifact Validation
The ArtifactValidator checks outputs between steps:
validate_exists(path)โ File must existvalidate_sections(path, headings)โ Required Markdown sectionsvalidate_min_content(path, words)โ Minimum content lengthvalidate_schema(path, schema)โ JSON/YAML schema compliancevalidate_compliance_score(report, threshold)โ Score gate
CLI Commands
omniskill pipeline run <name> --project <dir> # Execute a pipeline
omniskill pipeline status [state-id] # Show current status
omniskill pipeline resume <state-id> # Resume paused pipeline
omniskill pipeline list # List all active pipelines
omniskill pipeline cancel <state-id> # Cancel with cleanup