rai pipeline
Pipeline orchestration in RaiSE runs through the rai-workspace MCP server. There is no rai pipeline CLI command — your AI assistant (Claude Code, Codex, or any MCP-capable agent) calls pipeline MCP tools directly.
See Pipelines concept for how pipelines work, or Pipeline Quickstart for a hands-on tutorial.
MCP Tools¶
Pipelines are controlled via 8 MCP tools exposed by the rai-workspace server:
| Tool | Parameters | Description |
|---|---|---|
pipeline_start |
pipeline_name, issue_id |
Start a new pipeline run (story, epic, bugfix, hotfix) |
pipeline_advance |
run_id, approve, cwd |
Advance to the next phase after gate approval |
pipeline_status |
run_id |
Check current phase and run state |
pipeline_pause |
run_id |
Pause a running pipeline |
pipeline_cancel |
run_id |
Cancel a pipeline run |
pipeline_list |
List available pipeline definitions | |
pipeline_runs |
List active and recent pipeline runs | |
pipeline_restore |
run_id |
Restore a pipeline run after context loss |
Claude Code reads MCP configuration from .mcp.json. Codex reads .codex/config.toml, generated by rai init --agent codex. Run rai doctor to verify your agent exposes the pipeline MCP tools.
Available Pipelines¶
| Pipeline | Phases | Use case |
|---|---|---|
story |
8 | Feature development (start → design → plan → implement → review → close) |
epic |
6 | Multi-story initiatives |
bugfix |
10 | Tracked bug fixes with root cause analysis |
hotfix |
4 | Minimal emergency fixes |
Pipeline sources: built-in (shipped with RaiSE), project (.raise/pipelines/), user (~/.rai/pipelines/).
Typical Flow¶
Your AI assistant handles pipeline orchestration conversationally:
AI calls pipeline_start("story", "RAISE-1234")
[1/8] start.......................... DONE
[2/8] design......................... DONE
→ HITL gate: "Approve design?"
You: "approved"
AI calls pipeline_advance(run_id, approve=true)
[3/8] plan........................... DONE
[4/8] implement...................... DONE
...
You never call MCP tools directly — the AI chains the skills and manages state. Your interaction is conversational: review output, approve at gates, provide guidance when asked.
Delegation Levels¶
Your delegation level is resolved from your developer profile (~/.rai/developer.yaml) and controls HITL gate behavior:
| Level | Gate behavior | ShuHaRi |
|---|---|---|
review |
Pauses at every HITL gate | Shu |
notify |
Proceeds, notifies you | Ha |
auto |
Proceeds silently | Ri |
Gates marked mandatory: true always pause, regardless of delegation level.
State Persistence¶
Pipeline state is stored in SQLite (~/.rai/raise.db). Runs survive:
- Terminal restarts
- Context compaction
- MCP server restarts
Use the pipeline_restore MCP tool to recover state after context loss.