Software Architect Crew
Three specialised agents collaborate to ship code: the Product Manager defines requirements, the Coder writes the implementation, and the Reviewer grades it — sending it back for revision until it passes. The Mermaid flowchart highlights whichever agent is currently holding the token.
PM
Product Manager
Decomposes the prompt into acceptance criteria + edge cases.
Coder
Coder
Drafts code from requirements; revises in response to reviewer feedback.
Reviewer
Reviewer
Audits code against requirements; verdict is APPROVE or REVISE.
Dispatch the crew to begin.
How it works
Token-passing pattern
Each agent runs as an async generator that yields state, thought, and artifact events. The orchestrator threads them together; the SSE route emits them to the browser.
Live Mermaid flowchart
On every state event the React island re-renders the Mermaid diagram with a classDef active on the agent currently holding the token. Visited nodes get a softer "done" style.
Feedback loop
The Reviewer's verdict is either APPROVE (ship) or REVISE (return to Coder with itemised issues). Capped at 2 cycles to keep runs bounded.
Mock vs. real mode
Mock-mode emits canned-but-realistic outputs keyed off the user prompt. Real-mode swap-points are marked in crew-graph.ts — each agent becomes a distinct LLM call (Claude Sonnet recommended for synthesis, OpenAI gpt-4o-mini for review).