WaterfallMode
The "Plan-Ahead" engine: Implements a structured Plan -> Review -> Execute strategy for well-defined goals requiring human oversight.
Core Architecture
Stateful
Human-in-the-Loop
⚙️ WaterfallModeConfig.json
{
"type": "Waterfall",
"planFile": "deploy_v1.json",
"variables": {
"target_env": "production",
"version": "1.4.2"
}
}
→
📊 Generated Plan Diagram
graph TD
A[Read Config] --> B[Build Artifact]
B --> C{Review Plan?}
C -->|Approved| D[Deploy to production]
D --> E[Verify Health]
Status: Awaiting User Approval (Discussable Phase)
The Waterfall Lifecycle
Unlike adaptive modes that "think as they go," WaterfallMode forces a separation between planning and action.
- Plan Generation: The agent analyzes the request and generates a full
TaskBreakdown. - Review (Discussable): If
autoFixis false, the system pauses. The user can chat with the agent to refine the plan steps before any side effects occur. - Variable Substitution: If using a
planFile, placeholders like{{target_env}}are injected with runtime values. - Execution: The
TaskOrchestratorexecutes the validated graph sequentially.