You are working in /Users/yorrickjansen/work/claude-code-plugins. Execute Task 2 from…
- User
You are working in /Users/yorrickjansen/work/claude-code-plugins. Execute Task 2 from the plan at /Users/yorrickjansen/work/claude-code-plugins/docs/superpowers/plans/2026-03-17-workflow-eval-framework.md.
Read the plan's Task 2 section carefully, then update dev-loop/commands/workflow.md:
- Replace the script template (the ```python block under '## Script template') to use build_graph(models=None)
The new template should have:
- def build_graph(models: dict[str, bool] | None = None) -> StateGraph:
- Inside: if models is None: models = detect_available_models()
- HAS_CODEX and HAS_GEMINI derived from models param
- Returns the graph
- if name == 'main' block calls build_graph(), handles --diagram, runs graph
- Update the 4 example workflows to wrap graph construction in build_graph(). For examples 1-3, just wrap in build_graph(). For example 4 (full pipeline), also move HAS_CODEX/HAS_GEMINI inside build_graph().
- Add to 'Important rules' section: 'Use
build_graph(). Always put graph construction in abuild_graph(models=None)function...' - Commit with message: 'feat(workflow): require build_graph() in generated scripts'
- Replace the script template (the ```python block under '## Script template') to use build_graph(models=None)
The new template should have:
Assistant
Now let me read the Task 2 section from the plan:
Assistant
Now I have a clear picture of what needs to be done. Let me make the changes to
workflow.md:Assistant
Now update example 1 (test-fix loop):
Assistant
Now update example 2 (parallel lint+typecheck+test):
Assistant
Now update example 3 (implement → review → commit):
Assistant
Now update example 4 (full pipeline) - this is more complex. I need to wrap everything in
build_graph()and moveHAS_CODEX/HAS_GEMINIinside:Assistant
Now add the
build_graph()rule to the Important rules section:Assistant
Now let me verify the changes look correct:
Assistant
Good. Now commit:
Assistant
Task 2 complete. The changes made to
dev-loop/commands/workflow.md:-
Script template — replaced the
async def main()pattern withdef build_graph(models=None) -> StateGraphthat accepts an optional models dict, derivesHAS_CODEX/HAS_GEMINIfrom it, and returns the graph. Theif __name__ == "__main__"block callsbuild_graph(), handles--diagram, and runs the graph. -
Examples 1–3 — wrapped all graph construction in
build_graph(models=None)withreturn graphat the end. -
Example 4 (full pipeline) — moved all node/edge definitions inside
build_graph(), movedHAS_CODEX/HAS_GEMINIinside the function derived from themodelsparam. Helper functions_wait_for_ci_fnand_decision_fnremain module-level since they don't affect graph topology. -
Important rules — added the
build_graph()rule as the first item.
-