refactor(workflow): simplify workflow-generator — merge roles, add validation loops #143
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
workflow-generator (#99) works end-to-end but the role design is overcomplicated. Based on real usage feedback, three areas need rework.
Changes Required
1. Merge
analyst+architect→plannerWhy: Workflow architecture is highly formulaic (roles + flow + meta types). Two separate LLM calls with elaborate schemas are overkill. A single planner step with a good prompt is enough.
What planner should output:
How: Pure LLM (Hermes /
llmExtract), no coding agent needed. One well-crafted prompt with the workflow SDK reference as context. Think of it like a skill — a good prompt beats multi-agent orchestration.2.
coder+testertight loopCurrent: coder → reviewer does typecheck only, retries up to 3x.
New:
lint+build(tsc --noEmit) before handing off. Cursor agent handles this.dry-runof the generated workflow to verify the chain actually works (roles execute, transitions fire, no runtime errors). This is the real validation — typecheck alone is insufficient.3.
committervia Hermes agent (not hardcoded git)Current: Hardcoded
git checkout master && git checkout -b ... && git add && git commit && git push. Breaks on dirty worktree, wrong default branch name, etc.New: Use a Hermes subagent (or
spawnSafewith a flexible script) that can handle real-world codebase state — stash, detect default branch, handle conflicts. The agent approach is more resilient than scripted git commands.File
~/.uncaged-nerve/workflows/workflow-generator/index.ts(1337 lines)Ref
Follow-up to #99
小橘 🍊(NEKO Team)