Configurable pipeline orchestrator for sequencing stages
$pipeline is the configurable pipeline orchestrator for OMX. It sequences stages
through a uniform PipelineStage interface, with state persistence and resume support.
The canonical OMX pipeline sequences:
RALPLAN (consensus planning) -> team-exec (Codex CLI workers) -> ralph-verify (architect verification)
Pipeline parameters are configurable per run:
| Parameter | Default | Description |
|---|---|---|
maxRalphIterations | 10 | Ralph verification iteration ceiling |
workerCount | 2 | Number of Codex CLI team workers |
agentType | executor | Agent type for team workers |
Every stage implements the PipelineStage interface:
interface PipelineStage {
readonly name: string;
run(ctx: StageContext): Promise<StageResult>;
canSkip?(ctx: StageContext): boolean;
}
Stages receive a StageContext with accumulated artifacts from prior stages and
return a StageResult with status, artifacts, and duration.
prd-*.md and test-spec-*.md planning artifacts already exist, and carries any deep-interview-*.md spec paths forward for traceability.Pipeline state persists via the ModeState system at .omx/state/pipeline-state.json.
The HUD renders pipeline phase automatically. Resume is supported from the last incomplete stage.
state_write({mode: "pipeline", active: true, current_phase: "stage:ralplan"})state_write({mode: "pipeline", current_phase: "stage:<name>"})state_write({mode: "pipeline", active: false, current_phase: "complete"})import {
runPipeline,
createAutopilotPipelineConfig,
createRalplanStage,
createTeamExecStage,
createRalphVerifyStage,
} from './pipeline/index.js';
const config = createAutopilotPipelineConfig('build feature X', {
stages: [
createRalplanStage(),
createTeamExecStage({ workerCount: 3, agentType: 'executor' }),
createRalphVerifyStage({ maxIterations: 15 }),
],
});
const result = await runPipeline(config);