An autonomous program synthesis and self-debugging agent that executes untrusted code inside a two-stage AST + subprocess sandbox, parses runtime tracebacks into structured diagnostics, and iteratively synthesizes patches until unit test assertions pass.
Candidate Code ──► [AST Static Security Gate] ──► [Isolated Subprocess Runner]
│
┌───────────────────────────────────────────┴───────────┐
▼ (Exit Code != 0) ▼ (Exit Code == 0)
[Traceback Root-Cause Parser] [Verified Production Code]
│
▼
[Iterative Patch Synthesizer] ──► (Loop Back to AST Gate)