# Using multiple models to extend long context tasks, and increase build viability

> Source: <https://gist.github.com/tyoung515-svg/10d72830b3040b86f8e1687804a94cb0>
> Published: 2026-05-09 08:03:52+00:00

|
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/29.5.2 Chrome/142.0.7444.265 Electron/39.6.1 Safari/537.36" version="29.5.2"> |
|
<diagram name="Build-Workflow-v2" id="WrTtcerdQPlLpfKY2O-s"> |
|
<mxGraphModel dx="1749" dy="1771" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="1700" math="0" shadow="0"> |
|
<root> |
|
<mxCell id="0" /> |
|
<mxCell id="1" parent="0" /> |
|
<mxCell id="title" parent="1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillColor=none;strokeColor=none;fontSize=42;" value="<b><font>Build Workflow</font></b>" vertex="1"> |
|
<mxGeometry height="40" width="600" x="1110" y="440" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="idea" parent="1" style="ellipse;shape=cloud;whiteSpace=wrap;html=1;fillColor=#1ba1e2;strokeColor=#006EAF;fontColor=#ffffff;" value="<b><font style="font-size:18px;">User has Idea</font></b>" vertex="1"> |
|
<mxGeometry height="120" width="180" x="60" y="380" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="planner" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#008a00;strokeColor=#005700;fontColor=#ffffff;" value="<b><font style="font-size:18px;">User + Frontier Planner</font></b><div><br></div><div><font style="font-size:13px;">Refine idea, develop spec from idea.</font></div><div><font style="font-size:13px;">Spec is <b>append-only</b> — core truth.</font></div>" vertex="1"> |
|
<mxGeometry height="120" width="260" x="320" y="380" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="spec_store" parent="1" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#e3c800;strokeColor=#B09500;fontColor=#000000;" value="<b><font style="font-size:14px;">Spec (append-only)</font></b><div><font style="font-size:11px;">Resolved view served</div><div><font style="font-size:11px;">to Manager + Exit Mgr</font></font></div>" vertex="1"> |
|
<mxGeometry height="100" width="140" x="660" y="390" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="knowledge" parent="1" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#e3c800;strokeColor=#B09500;fontColor=#000000;" value="<b><font style="font-size:14px;">Layered Knowledge</font></b><div><font style="font-size:11px;">Project context, prior</font></div><div><font style="font-size:11px;">decisions, anti-patterns</font></div>" vertex="1"> |
|
<mxGeometry height="100" width="160" x="840" y="390" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="build_box" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#6c8ebf;strokeWidth=2;" value="" vertex="1"> |
|
<mxGeometry height="540" width="1100" x="40" y="620" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="build_label" parent="1" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillColor=none;strokeColor=none;fontColor=#6c8ebf;" value="<b><font style="font-size:14px;">Build Loop</font></b>" vertex="1"> |
|
<mxGeometry height="30" width="120" x="60" y="630" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="user_block" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1ba1e2;strokeColor=#006EAF;fontColor=#ffffff;" value="<b><font style="font-size:18px;">User</font></b><div><br></div><div><font style="font-size:13px;">Prompted for action or approval of spec change.</font></div><div><font style="font-size:13px;">Manages all model handoffs.</font></div><div><font style="font-size:13px;">Can halt any window.</font></div>" vertex="1"> |
|
<mxGeometry height="160" width="220" x="80" y="700" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="manager" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#008a00;strokeColor=#005700;fontColor=#ffffff;" value="<b><font style="font-size:18px;">Frontier Manager</font></b><div><br></div><div><font style="font-size:13px;">Decompose spec into phased task list.</font></div><div><font style="font-size:13px;">Audit gating at minor + major milestones.</font></div><div><font style="font-size:13px;">Final call on retask vs halt — judgment, not rule.</font></div><div><font style="font-size:13px;">Local fix → next task list. Structural → user prompt.</font></div>" vertex="1"> |
|
<mxGeometry height="200" width="360" x="380" y="680" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="worker" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#6a00ff;strokeColor=#3700CC;fontColor=#ffffff;" value="<b><font style="font-size:18px;">Scoped Worker(s)</font></b><div><br></div><div><font style="font-size:13px;">Executes task list, runs automated tests.</font></div><div><font style="font-size:13px;">Stops at designated checkpoints.</font></div><div><font style="font-size:13px;">Reports for verification by Auditor.</font></div>" vertex="1"> |
|
<mxGeometry height="160" width="290" x="200" y="960" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="auditor" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d80073;strokeColor=#A50040;fontColor=#ffffff;" value="<b><font style="font-size:18px;">Auditor</font></b><div><br></div><div><font style="font-size:13px;">Audits worker output vs codebase + spec.</font></div><div><font style="font-size:13px;"><b>Also acts as Manager context filter</b> —</font></div><div><font style="font-size:13px;">raw worker output never reaches Manager.</font></div>" vertex="1"> |
|
<mxGeometry height="160" width="320" x="600" y="960" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="audit_contract" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a0522d;strokeColor=#6D1F00;dashed=1;align=left;spacingLeft=8;fontColor=#ffffff;" value="<b><font style="font-size:13px;">Auditor Output Contract</font></b><div><font style="font-size:11px;">• verdict: pass / fail / partial</font></div><div><font style="font-size:11px;">• one-line diagnosis</font></div><div><font style="font-size:11px;">• rec action: continue / retask / escalate</font></div><div><font style="font-size:11px;">• pointer: file / function / test</font></div><div><font style="font-size:11px;"><i>Manager pulls more detail only on demand.</i></font></div>" vertex="1"> |
|
<mxGeometry height="160" width="200" x="940" y="960" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="exit_mgr" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#008a00;fontColor=#ffffff;strokeColor=#005700;" value="<b><font style="font-size:18px;">Frontier Exit Manager</font></b><div><font style="font-size:11px;">(was: Debugger)</font></div><div><br></div><div><font style="font-size:13px;">User test program with debugger. Watches logs, applies surgical edits within bounded scope.</font></div><div><font style="font-size:13px;">If structural fix needed → kicks back to Manager with diagnosis (re-enters audited build).</font></div><div><font style="font-size:13px;"><b>Needs whole-project context — sized for largest context window.</b></font></div><div><font style="font-size:13px;">If pass → close session.</font></div>" vertex="1"> |
|
<mxGeometry height="240" width="340" x="1240" y="700" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="finished" parent="1" style="ellipse;whiteSpace=wrap;html=1;fillColor=#647687;strokeColor=#314354;fontColor=#ffffff;" value="<b><font style="font-size:18px;">Finished App</font></b>" vertex="1"> |
|
<mxGeometry height="120" width="220" x="1300" y="990" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_idea_planner" edge="1" parent="1" source="idea" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;" target="planner"> |
|
<mxGeometry relative="1" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_planner_spec" edge="1" parent="1" source="planner" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;" target="spec_store"> |
|
<mxGeometry relative="1" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_spec_manager" edge="1" parent="1" source="spec_store" style="endArrow=classic;html=1;rounded=0;strokeWidth=1;dashed=1;" target="manager"> |
|
<mxGeometry relative="1" as="geometry"> |
|
<Array as="points"> |
|
<mxPoint x="730" y="600" /> |
|
<mxPoint x="560" y="600" /> |
|
</Array> |
|
</mxGeometry> |
|
</mxCell> |
|
<mxCell id="e_spec_exit" edge="1" parent="1" source="spec_store" style="endArrow=classic;html=1;rounded=0;strokeWidth=1;dashed=1;" target="exit_mgr"> |
|
<mxGeometry relative="1" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_know_manager" edge="1" parent="1" source="knowledge" style="endArrow=classic;html=1;rounded=0;strokeWidth=1;dashed=1;" target="manager"> |
|
<mxGeometry relative="1" as="geometry"> |
|
<Array as="points"> |
|
<mxPoint x="920" y="600" /> |
|
<mxPoint x="560" y="600" /> |
|
</Array> |
|
</mxGeometry> |
|
</mxCell> |
|
<mxCell id="e_know_auditor" edge="1" parent="1" source="knowledge" style="endArrow=classic;html=1;rounded=0;strokeWidth=1;dashed=1;" target="auditor"> |
|
<mxGeometry relative="1" as="geometry"> |
|
<Array as="points"> |
|
<mxPoint x="920" y="540" /> |
|
<mxPoint x="920" y="600" /> |
|
<mxPoint x="840" y="600" /> |
|
<mxPoint x="760" y="600" /> |
|
</Array> |
|
</mxGeometry> |
|
</mxCell> |
|
<mxCell id="e_manager_worker" edge="1" parent="1" source="manager" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" target="worker"> |
|
<mxGeometry relative="1" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_worker_auditor" edge="1" parent="1" source="worker" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" target="auditor"> |
|
<mxGeometry relative="1" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_auditor_manager" edge="1" parent="1" source="auditor" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.75;entryY=1;entryDx=0;entryDy=0;" target="manager" value="<font style="font-size:11px;">contract</font>"> |
|
<mxGeometry relative="1" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_manager_user" edge="1" parent="1" source="manager" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;exitX=0;exitY=0.25;exitDx=0;exitDy=0;entryX=1;entryY=0.25;entryDx=0;entryDy=0;" target="user_block"> |
|
<mxGeometry relative="1" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_user_manager" edge="1" parent="1" source="user_block" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" target="manager"> |
|
<mxGeometry relative="1" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_manager_exit" edge="1" parent="1" source="manager" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" target="exit_mgr"> |
|
<mxGeometry relative="1" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_exit_manager" edge="1" parent="1" source="exit_mgr" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;exitX=0;exitY=0.75;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;dashed=1;" target="manager" value="<font style="font-size:11px;">structural fix</font>"> |
|
<mxGeometry relative="1" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_exit_finished" edge="1" parent="1" source="exit_mgr" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" target="finished" value="<font style="font-size:11px;">pass</font>"> |
|
<mxGeometry relative="1" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="halt_label" parent="1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillColor=none;strokeColor=none;fontSize=15;" value="<b><font style="color: rgb(204, 0, 0);">User can halt any window</font></b>" vertex="1"> |
|
<mxGeometry height="20" width="220" x="180" y="890" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="e_halt_worker" edge="1" parent="1" source="user_block" style="endArrow=classic;html=1;rounded=0;strokeWidth=4;dashed=1;strokeColor=#cc0000;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" target="worker"> |
|
<mxGeometry relative="1" as="geometry"> |
|
<Array as="points"> |
|
<mxPoint x="160" y="960" /> |
|
</Array> |
|
</mxGeometry> |
|
</mxCell> |
|
<mxCell id="e_halt_auditor" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;strokeWidth=3;dashed=1;strokeColor=#cc0000;entryX=0;entryY=1;entryDx=0;entryDy=0;startSize=10;endSize=10;" target="auditor"> |
|
<mxGeometry relative="1" as="geometry"> |
|
<Array as="points"> |
|
<mxPoint x="130" y="1010" /> |
|
<mxPoint x="180" y="1240" /> |
|
<mxPoint x="600" y="1240" /> |
|
</Array> |
|
<mxPoint x="160" y="960" as="sourcePoint" /> |
|
</mxGeometry> |
|
</mxCell> |
|
<mxCell id="e_halt_exit" edge="1" parent="1" source="user_block" style="endArrow=classic;html=1;rounded=0;strokeWidth=3;dashed=1;strokeColor=#cc0000;exitX=1;exitY=0;exitDx=0;exitDy=0;entryX=0.041;entryY=0.067;entryDx=0;entryDy=0;entryPerimeter=0;" target="exit_mgr"> |
|
<mxGeometry relative="1" as="geometry"> |
|
<Array as="points"> |
|
<mxPoint x="410" y="660" /> |
|
<mxPoint x="780" y="650" /> |
|
<mxPoint x="1240" y="690" /> |
|
</Array> |
|
<mxPoint x="1240" y="700" as="targetPoint" /> |
|
</mxGeometry> |
|
</mxCell> |
|
<mxCell id="frontier_panel" parent="1" style="rounded=0;whiteSpace=wrap;html=1;align=left;spacingLeft=10;fillColor=#008a00;fontColor=#ffffff;strokeColor=#005700;" value="<b><font style="font-size:16px;">Frontier (Planner / Manager / Exit Mgr)</font></b><div><br></div><div><font style="font-size:13px;">Opus 4.6 / 4.7</font></div><div><font style="font-size:13px;">GPT 5.4 / 5.5</font></div><div><br></div><div><b><font style="font-size:13px;">Runner-ups</font></b></div><div><font style="font-size:13px;">Gemini Pro 3.1</font></div><div><font style="font-size:13px;">GLM 5.1</font></div><div><font style="font-size:13px;">Kimi 2.6</font></div><div><font style="font-size:13px;">Qwen 3.6 MAX</font></div><div><br></div><div><font style="font-size:11px;"><i>Exit Mgr: bias toward largest context window — needs whole-project view.</i></font></div>" vertex="1"> |
|
<mxGeometry height="280" width="260" x="1280" y="1270" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="worker_panel" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6a00ff;strokeColor=#3700CC;align=left;spacingLeft=10;fontColor=#ffffff;" value="<b><font style="font-size:16px;">Scoped Worker</font></b><div><br></div><div><font style="font-size:13px;">DS Flash V4</font></div><div><font style="font-size:13px;">Qwen 3.6 35B MoE (local)</font></div><div><br></div><div><b><font style="font-size:13px;">Runner-ups</font></b></div><div><font style="font-size:13px;">GLM 5.1</font></div><div><font style="font-size:13px;">Kimi 2.6</font></div><div><font style="font-size:13px;">Sonnet 4.6</font></div><div><font style="font-size:13px;">Gemini Flash 3.0</font></div><div><font style="font-size:13px;">Gemini Pro 3.1</font></div><div><font style="font-size:13px;">GPT 5.3</font></div>" vertex="1"> |
|
<mxGeometry height="260" width="240" x="100" y="1280" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="auditor_panel" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d80073;strokeColor=#A50040;align=left;spacingLeft=10;fontColor=#ffffff;" value="<b><font style="font-size:16px;">Auditor</font></b><div><br></div><div><font style="font-size:13px;">DS Flash V4</font></div><div><font style="font-size:13px;">Qwen 3.6 35B MoE (local)</font></div><div><br></div><div><b><font style="font-size:13px;">Runner-ups</font></b></div><div><font style="font-size:13px;">GLM 5.1</font></div><div><font style="font-size:13px;">Kimi 2.6</font></div><div><font style="font-size:13px;">Sonnet 4.6</font></div><div><font style="font-size:13px;">Gemini Flash 3.0</font></div><div><font style="font-size:13px;">Gemini Pro 3.1</font></div><div><font style="font-size:13px;">GPT 5.3</font></div><div><br></div><div><font style="font-size:11px;"><i>Same tier as Worker — context filter for Manager only works if Auditor is capable.</i></font></div>" vertex="1"> |
|
<mxGeometry height="320" width="260" x="380" y="1280" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="cli_placeholder" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;strokeColor=#3A5431;dashed=1;align=left;spacingLeft=10;fontColor=#ffffff;" value="<b><font style="font-size:14px;">CLI / IDE layer</font></b><div><i>Opencode, Claude Code, VsCode, Ect</i></div>" vertex="1"> |
|
<mxGeometry height="80" width="280" x="700" y="1280" as="geometry" /> |
|
</mxCell> |
|
<mxCell id="legend" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6d8764;strokeColor=#3A5431;align=left;spacingLeft=10;fontColor=#ffffff;" value="<b><font style="font-size: 14px;">Legend</font></b><div><font style="font-size: 14px;">— solid: data / control flow</font></div><div><font style="font-size: 14px;">— dashed: context read (spec / knowledge)</font></div><div><font style="color: rgb(204, 0, 0); font-size: 14px;">— red dashed: user halt / interrupt</font></div>" vertex="1"> |
|
<mxGeometry height="100" width="280" x="700" y="1380" as="geometry" /> |
|
</mxCell> |
|
</root> |
|
</mxGraphModel> |
|
</diagram> |
|
</mxfile> |
