6-Stage Execution Pipeline

The 6-Stage Execution Pipeline is Maudel’s core workflow engine. It moves work from requirements through deployment in six deterministic stages, each gated by the orchestrator’s quality evaluations.
The Six Stages
1. Scaffold
Generate the initial code structure from requirements. The system sets up the project workspace, establishes the worktree, and prepares the execution environment.
2. Priming
Load context and prime the agent system. Pipeline instructions, stage directives, reference skills, and upstream context are assembled into a composable system prompt using the 9-layer prompt architecture.
3. Review
Human review and agent validation. The system evaluates inputs for completeness and correctness before committing to generation. Human-in-the-loop decisions are surfaced here for critical approval points.
4. Generate Plan
Create the development plan. The system decomposes the work into tasks, maps dependencies, identifies test requirements, and produces a structured implementation plan that the orchestrator will execute.
5. Worktree
Create an isolated git worktree for implementation. This ensures all changes are sandboxed, reversible, and traceable. The Pipeline Minder monitors worktree isolation throughout execution.
6. Execute
Implementation, testing, and validation. Code is generated, tests are written and run, and artifacts are registered in the traceability graph. The orchestrator evaluates completion and either advances to merge or requests revision.
Quality Gates
Each stage transition is gated by the deterministic orchestrator. A gate evaluates signals including:
- Schema validation — does the artifact conform to its expected structure?
- Completeness checks — are all required fields and sections present?
- AI rubric scoring — does the output meet quality thresholds?
- Dependency resolution — are upstream requirements satisfied?
- Test results — do generated tests pass?
Gate decisions are deterministic: accept, revise, retry, escalate, or block.
Stage Merging
For performance, adjacent stages can be merged. For example, Priming and Generate Plan can execute as a single combined stage, achieving up to 3x speedup while maintaining the same quality guarantees.
Resumability
The pipeline uses a checkpoint-based state machine. If execution fails at any stage, work can resume from the failed step with full state consistency. States include: PENDING, RUNNING, COMPLETED, FAILED, WAITING_HITL, PAUSED, and ABORTED.
Ready to transform your AI engineering?
Governed AI engineering, from idea to deployment.