{"slug": "brigade", "title": "Brigade", "summary": "Brigade is a new Claude Code skill that splits large coding jobs across multiple fresh sessions, assigning each piece of work to a model by risk: Haiku for mechanical, fully specified pieces, Sonnet for bounded modules with clear specs, and Opus for auth, money, data, migrations, concurrency and shared interfaces. Brigade writes a one-time project map to .brigade/context.md (77 lines in the example build), plans waves by file ownership in .brigade/plan.md, and generates prompts only for the next wave, with every job ending in a review prompt for a fresh Opus session that did not write the code. The skill works on any Claude Code plan (Pro, Max, Team) in the terminal and VS Code without an API key, and reruns a failed piece one model up (Haiku, then Sonnet, then Opus), never twice on the same model.", "body_md": "**Plan big Claude Code jobs the way a kitchen brigade runs a service:** one\nplanner, a station for each part of the work, the right cook at each\nstation, and a final check before anything leaves the pass.\n\nBrigade is a Claude Code skill. Give it your project goal and it decides whether the job needs more than one session. If it does, it cuts the work into pieces that each fit in a fresh session, writes a self-contained prompt for each piece, and picks a model for each piece by risk. Every job ends with a review prompt for a fresh session that didn't write the code.\n\nIt works on any Claude Code plan (Pro, Max, Team), in the terminal and in VS Code, and it doesn't need an API key.\n\n``` php\nflowchart TD\n    G[\"Your goal or spec\"] --> D{\"Can one session<br/>do this job?\"}\n    D -- \"yes\" --> W[\"Brigade does the work<br/>in your current session\"]\n    W --> RP[\"Writes a review prompt\"]\n    D -- \"no, or you ask it to split\" --> M[\"Map the project once<br/>.brigade/context.md\"]\n    M --> P[\"Plan waves by file ownership<br/>.brigade/plan.md\"]\n    P --> Q[\"Write prompts for the next wave<br/>.brigade/prompts/NN-*.md\"]\n    Q --> S1[\"Fresh session on Opus<br/>skeleton and interfaces\"]\n    Q --> S2[\"Fresh session on Sonnet<br/>a bounded module\"]\n    Q --> S3[\"Fresh session on Haiku<br/>a mechanical piece\"]\n    S1 --> L[\"Progress log<br/>.brigade/progress.md\"]\n    S2 --> L\n    S3 --> L\n    L --> N[\"/brigade next\"]\n    N --> Q\n    L --> R[\"Fresh Opus review<br/>VERDICT plus fix prompt\"]\n    RP --> R\n    R --> F[\"One fix session\"]\n```\n\nBrigade is built from six parts. Each one fixes a specific way that big jobs go wrong in a single long session.\n\nEach fresh session starts with no memory, and having it re-read the whole\ncodebase is slow and makes it drift from the plan. Brigade writes\n`.brigade/context.md` once. It holds the layout, the commands, the\nconventions, and the **interfaces between parts**, which act as the\ncontract. Every session reads this map first. In the example build it was\n77 lines.\n\nSplit work breaks when two sessions edit the same file. Every piece in Brigade owns a fixed set of files and may not touch any other. Shared files such as routers and config belong to exactly one piece.\n\nPieces are grouped into waves by dependency. Wave 1 is usually the skeleton\nand the interfaces; later waves fill in modules behind them. Brigade writes\nfull prompts only for the next wave. When a wave finishes,\n`/brigade next` reads what was actually built and writes the next\nwave's prompts from that. Prompts written before the code exists go stale.\n\nEach prompt lists what to read, what to build, which files it owns, the\ninterfaces it must keep, an exact done-check, and when to stop and ask\ninstead of guessing. The hard decisions are made in the prompt, not left to\nthe worker. [See a real one](https://github.com/rajvardhan19/brigade/blob/main/examples/ledger/prompts/02-importers.md): it\npins down money parsing, line numbers in errors, atomic imports and the\nduplicate rules before any code is written.\n\nFor each piece Brigade asks two questions: how bad would a mistake be, and would the piece's check catch it right away?\n\n| The piece is... | Model | \n|---|---|\n| Mechanical, fully specified, mistakes caught by its check | Haiku, low effort | \n| Bounded with a clear spec and a check that would catch a mistake | Sonnet, medium | \n| Auth, money, data, migrations, concurrency, interfaces others build on, or a mistake would go unnoticed | Opus, medium | \n\nA mistake that a test catches immediately costs one retry. A silent mistake\ngets built on by every piece that follows. If a piece fails its check, it is\nrerun one model up (Haiku, then Sonnet, then Opus), never twice on the same\nmodel. Every choice is written down with its reason in\n[plan.md](https://github.com/rajvardhan19/brigade/blob/main/examples/ledger/plan.md).\n\nA session reviewing its own work shares its own blind spots. Brigade's last\nstep is a review by an Opus session that never saw the code being written.\nIt reads the plan, the map and the full diff, runs the checks, and lists\ndefects with file:line. It ends with `VERDICT: CLEAN` or `VERDICT: DEFECTS`\nand a ready-to-run fix prompt.\n\n```\n.brigade/\n├── context.md      the project map and interface contract\n├── plan.md         waves, file ownership, model per piece and why\n├── progress.md     what each session reported when it finished\n└── prompts/\n    ├── 01-skeleton.md\n    ├── 02-importers.md\n    └── review-final.md\n```\n\nNothing depends on one long conversation surviving. You can stop between any two pieces and pick up later, or hand the remaining pieces to a teammate.\n\nEach setup built the same project from the same brief: `ledger`, a\npersonal-finance toolkit with SQLite storage, two bank CSV importers, a\nrules engine, budgets and a CLI. One build was a normal Claude Code session\n(Opus 5.5); the other was Brigade, split into fresh sessions. Correctness\nwas checked with 32 hidden tests the sessions never saw.\n\n**Both builds passed all 32 hidden tests and their own test suites.** The\ndifference showed up in the edge cases. Brigade's fresh-context review found\nfive ways the code broke the spec, and I then tested both builds against\nthose five inputs:\n\n| Input | Normal session | Brigade, after review and fix | \n|---|---|---|\n| A 29-digit amount in a bank file | crash with traceback | clean error naming the line | \n| A 21-digit amount in a bank file | crash with traceback | clean error naming the line | \n| An amount written in non-ASCII digits | accepted as money | rejected as malformed | \n| A budget of `1e30` | clean error | clean error | \n| A rule priority past the 64-bit range | crash with traceback | clean error | \n| **Handled correctly** | **1 of 5** | **5 of 5** | \n\nThe spec said errors must never print a traceback. The normal session broke\nthat rule three times, and its own tests didn't catch it.\n[Read the review that found these](https://github.com/rajvardhan19/brigade/blob/main/examples/ledger/review-final-output.md).\n\nThe architecture held up in practice too:\n\n- **All four pieces given to Sonnet passed first time,** with no escalations.\nThe project map and the self-contained prompts were enough.\n- **Every piece stayed in its lane.** Each one's progress report lists only\nits own files, plus decisions it appended to context.md, and no piece\nchanged an interface.\n- **It knows when not to split.** On every job one session could handle, up\nto that five-module build, Brigade said so and did the work itself. It\ndid this in 5 of 5 runs.\n\n- **Use it for jobs too big for one session:** many subsystems, or long\nenough that the context fills up. Also use it for risky work where you\nwant a review by a session that didn't write the code.\n- **On small jobs it just does the work** and leaves you a review prompt.\n- **Splitting runs more sessions than doing the job in one,** so on a job\none session could handle it takes longer and uses more of your plan. Ask\nit to split only when the job needs it.\n\n**VS Code, one click:** paste this link into your browser. Add the marketplace\nwhen asked, choose **Install for you**, and restart Claude when prompted.\n\n```\nvscode://anthropic.claude-code/install-plugin?plugin=brigade&marketplace=rajvardhan19/brigade\n```\n\n**VS Code, by hand:** type `/plugins` in a Claude Code chat. In the\n**Marketplaces** tab, add `rajvardhan19/brigade`, then install **brigade** from\nthe **Plugins** tab.\n\n**Terminal:**\n\n```\nclaude plugin marketplace add rajvardhan19/brigade\nclaude plugin install brigade@brigade\n```\n\n**As a plain skill, without the plugin system:** copy\n`plugins/brigade/skills/brigade` to `~/.claude/skills/brigade`.\n\n**Command names.** This README writes the commands as `/brigade <goal>` and\n`/brigade next`, the plain-skill names. Installed as a plugin, they carry the\nplugin's prefix: `/brigade:brigade <goal>` and `/brigade:brigade next`.\n\nTo split a job that one session could do, add \"Plan this as separate sessions\" to the goal.\n\nTo start a piece, use a terminal:\n\n```\nclaude --model sonnet --effort medium \"Do brigade piece 02: follow .brigade/prompts/02-importers.md\"\n```\n\nOr, in VS Code or the desktop app, open a new chat, pick the model, and send\nthe same sentence. When a wave is done, run `/brigade next`. Run the\nreview prompt in a new chat on Opus. If it says DEFECTS, run its fix prompt\nonce.\n\n**See a full real run:** [examples/ledger](https://github.com/rajvardhan19/brigade/blob/main/examples/ledger) has the plan,\nthe project map, every prompt, the progress log and the review, exactly as\nBrigade wrote them.\n\n- **Small sample:** 4 tasks and 11 runs, mostly single runs. The robustness\ncomparison comes from one split run.\n- **Untested on multi-hour jobs.** Brigade is designed for builds so large\nthat one session's context fills up, and none of the test jobs were that\nbig.\n- **You coordinate.** You start each session and pick its model, and\nBrigade tells you exactly what to run.\n- **Overlap with Claude Code Projects:** Projects (beta, claude.ai/code and\nthe desktop app) also splits work into fresh threads. Brigade adds a model\nper piece, the review step, and support for the terminal and VS Code.\n\n```\npython3 bench/run.py --tasks t6_ledger --arms baseline,brigade,brigade-forced --stage mine\npython3 bench/report.py mine\n```\n\n`bench/` contains the test projects, the task briefs, the hidden graders and\nthe raw results of every run.\n\nMIT", "url": "https://wpnews.pro/news/brigade", "canonical_source": "https://github.com/rajvardhan19/brigade", "published_at": "2026-11-10 03:36:16+00:00", "updated_at": "2026-11-10 03:51:58.776442+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "large-language-models", "ai-products"], "entities": ["Brigade", "Claude Code", "Anthropic", "Opus", "Sonnet", "Haiku", "VS Code"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/brigade", "markdown": "https://wpnews.pro/news/brigade.md", "text": "https://wpnews.pro/news/brigade.txt", "jsonld": "https://wpnews.pro/news/brigade.jsonld"}}