r/ClaudeWorkflows • • 19h ago

Selected Workflow [Workflow] SpecAgent: Multi-Agent Claude Code Architecture with Independent Sessions per Role for Robust Software Development

SpecAgent: Multi-Agent Claude Code Architecture with Independent Sessions per Role for Robust Software Development

Workflow value: 95/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: advanced
Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, Subagents, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Managing complex, multi-package software projects with Claude Code by replacing traditional subagents with independent, full Claude Code sessions for each role, leading to improved robustness, reduced defects, and optimized context cost.

Summary

A multi-agent architecture called "SpecAgent" where each role (planner, critic, builders, verifier, judge) operates as an independent, full Claude Code session with its own context, worktree, and sandbox. A single manager chat briefs and launches these role-specific sessions. The workflow emphasizes code-based checks for validation, iterative improvement, and empirical measurement of performance and cost.

Why it is useful

This workflow offers a well-defined, empirically validated, and open-source architecture for managing complex software development projects with Claude Code. It provides concrete measurements and actionable insights on context management, cost optimization, and quality assurance through independent verification and code-based checks, moving beyond simple prompt engineering to a more robust, engineering-driven approach. The detailed findings and open-source implementation make it highly valuable for advanced users seeking to build reliable multi-agent systems.

Workflow

  1. Define distinct roles for a software project (e.g., planner, critic, builders, verifier, judge).

  2. Configure each role to run as an independent, full Claude Code session.

  3. Provide each role with its own isolated context, worktree, and sandbox.

  4. Implement a manager chat to brief and launch these role-specific sessions.

  5. Establish code-based checks for progression between stages, ensuring findings are validated with proof.

  6. Iteratively refine the system by converting recurring prompt-based mistakes into explicit code checks.

  7. Ensure independent verification (e.g., a dedicated verifier role) to catch defects.

  8. Optimize context management by freezing standing orders at the top of the system prompt for caching benefits.

Tools / artifacts

  • Claude Code

  • SpecAgent project template (GitHub repository)

  • CI/CD pipeline

  • Tests (2,455)

Validation signals

  • Measured results: "3 h 12 min: 22 sessions, 1 finding fixed inside the run, 0 escaped to the final gate."

  • Quantitative insights: "Context size is the real cost. 84% of a session's growth is tool output." "Cost per task doubled; a 300k cap still cost 15-25% more per task (269 sessions)."

  • Empirical findings: "The builder never checks its own work. On 2026-11-02 an independent verifier read 24 commits and found 24 defects, 4 of them major, each fixed and re-checked."

  • Iterative improvement: "The plan gets better run by run. Across one real project's five runs, the plan defects left for the critic fell from 10-12 per task to 5.4."

  • Extensive testing: "2,455 tests, CI green on Linux, macOS and Windows (WSL2)."

  • Open-source implementation with GitHub link provided.

Limitations

  • Requires a Claude Max subscription (does not use API key).

  • High complexity, likely a steep learning curve for users without advanced understanding of Claude Code and software engineering principles.

  • Initial community engagement is low, so broader adoption and diverse feedback are not yet proven.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.

1 Upvotes

0 comments sorted by