Architect/editor pattern + execution-grounded verification for Qwen-general + Qwen-Coder (tested reference implementation) https://gist.github.com/gold-master-yx36-lab/aee094af6d6b21152eb4c25e976f4894 #8340
gold-master-yx36-lab
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Wanted to route code-generation requests to Qwen-Coder specifically instead of letting the general model draft code, with the handoff verified by actually running the code rather than an LLM judging its own output.
Design follows Aider's Architect/Editor split (SOTA on their own benchmark):
Router: cheap classifier — code or not, and how complex (ATOMIC/COMPOSITE/SYSTEMIC)
Planner (Qwen-general): produces a plan in words only — goal, acceptance criteria, constraints, and for multi-file tasks a skeleton (file list + interfaces, no bodies). Never writes code.
Coder (Qwen-Coder): implements the plan from scratch. For multi-file tasks, generates modules in topological dependency order, each module seeing the real generated code of its dependencies.
Verifier: runs generated code against provided input/output examples in a sandboxed subprocess, compares actual output. LLM review is a secondary advisory layer only, can't override an execution result.
Bounded refine loop (max 3 iterations), triggered only by real execution/syntax failures, not LLM opinion.
Pipeline, not an agent — deterministic step order, no autonomous tool-use loop.
Tested against a mock transport (3 end-to-end scenarios + unit tests, pyflakes-clean, ~1500 lines). Not yet benchmarked against the real APIs — that's the obvious next step before any numbers mean anything.
https://gist.github.com/gold-master-yx36-lab/aee094af6d6b21152eb4c25e976f4894
All reactions