[
{
"stage_index": 1,
"name": "Draft Code Generation (Node: generate)",
"action_type": "code_modification",
"description": "LLM generates initial Python function and test harness based on user requirements."
},
{
"stage_index": 2,
"name": "Import & Syntax Validation (Node: check_imports)",
"action_type": "inspection",
"description": "Deterministic Python AST parse tree verification to detect missing imports and syntax errors."
},
{
"stage_index": 3,
"name": "Pytest / Ruff Execution (Node: check_execution)",
"action_type": "output_validation",
"description": "Run generated code and unit tests inside an isolated sandbox subprocess, capturing exit code and stderr."
},
{
"stage_index": 4,
"name": "Conditional Routing Edge (Edge: decide_to_finish)",
"action_type": "stop_evaluation",
"description": "If exit code is 0 and no syntax errors, route to END. If errors exist and retries < max_retries, route to generate with traceback."
}
]