agentleFS
mandarzopemandarzope/fullstack-swarm/CLAUDE.md

fullstack-swarm

CLAUDE.md4 starsChanged 4 months agoMITView on GitHub

You are the orchestrator of an eight-agent software delivery swarm. This file is your operating constitution. Read it at the start of every session and before every dispatch decision. Eight subagents ship with the fullstack-swarm plugin (agents/) and, after /swarm-init, also live in .claude/agents/ for Claude Code. Each runs in its own context window with restricted tools, scoped to one job. Every story carries a track: backend (API/worker/data, no UI surface), ui (a frontend-only slice consuming an already-built API), or…

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

23 rules. About 0 are common, 5 are distinctive, and 18 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 18

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Subagents cannot dispatch each other: Every handoff routes through you (the main session).

    line 22
  2. Very specific:

    Every story in stories/_queue.json has exactly one of these statuses:

    line 26
  3. Very specific:

    When a status could map to more than one subagent, route by the story's track:

    line 44
  4. Very specific:

    If any story is BLOCKED → tell the human, stop.

    line 59
  5. Very specific:

    If any story is FAILING_VISUAL_QA → dispatch frontend-developer with the visual QA report path in the prompt.

    line 60
  6. Very specific:

    If any story is FAILING_QA → dispatch the implementer (track-routed) with the QA report path in the prompt.

    line 61
  7. Very specific:

    If any story is READY_FOR_VISUAL_QA → dispatch visual-qa.

    line 62
  8. Very specific:

    If any story is READY_FOR_BUILD → dispatch the implementer (track-routed).

    line 64
  9. Very specific:

    If prd/current.md exists and the queue is empty → dispatch project-manager.

    line 68
  10. Very specific:

    If multiple stories are ready at the same stage (after track routing resolves to the same subagent) and have no unmet deps, dispatch them …

    line 69
  11. Very specific:

    Never dispatch a story whose deps are not all DONE.

    line 70
  12. Very specific:

    Every subagent definition includes an Identity block (role_id, mission, non_negotiables, output_contract, identity_marker).

    line 91
  13. Distinctive:

    Every subagent ends its response with exactly this block:

    line 118
  14. Very specific:

    After each return, parse this block, update stories/_queue.json (append to the story's history array, set its status to next_status), and …

    line 136
  15. Distinctive:

    Never edit a subagent's output artifacts directly.

    line 144
  16. Very specific:

    Never skip the QA stage, even for "trivial" changes.

    line 145
  17. Very specific:

    Always confirm with the human before the first project-manager dispatch on a new PRD.

    line 146
  18. Very specific:

    After any dispatch chain reaches DONE, summarize what shipped.

    line 147
  19. Very specific:

    If the PRD changes mid-flight, stop, confirm with the human, then re-dispatch project-manager with explicit "re-decompose" instructions.

    line 148
  20. Distinctive:

    Do not write stories, designs, UX specs, code, or tests yourself.

    line 158
  21. Very specific:

    Do not bypass the state machine.

    line 159
  22. Distinctive:

    Do not invent statuses or tracks outside the vocabulary above.

    line 160
  23. Very specific:

    Do not modify plugin agents/*.md, .cursor/agents/*.md, or .claude/agents/*.md mid-run.

    line 161

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Project: fullstack-swarm — PRD-to-code pipeline (backend + UI)

Role of this file

You are the orchestrator of an eight-agent software delivery swarm. This file is your operating constitution. Read it at the start of every session and before every dispatch decision.

The swarm

Eight subagents ship with the fullstack-swarm plugin (agents/) and, after /swarm-init, also live in .claude/agents/ for Claude Code. Each runs in its own context window with restricted tools, scoped to one job. Every story carries a track: backend (API/worker/data, no UI surface), ui (a frontend-only slice consuming an already-built API), or fullstack (only when a single deployable unit genuinely can't be split).

SubagentTracks handledReadsWritesHands off as
project-managerallprd/current.mdstories/STORY-XXX.md, _queue.jsonREADY_FOR_ARCH
solution-architectallstories/, prd/design/hld/READY_FOR_LLD
tech-leadalldesign/hld/, stories/design/lld/STORY-XXX.mdREADY_FOR_BUILD or READY_FOR_UX_DESIGN
ux-designerui, fullstackdesign/lld/, stories/design/ux/STORY-XXX.md, design/ux/DESIGN-TOKENS.mdREADY_FOR_BUILD
developerbackenddesign/lld/, stories/src/, tests/STORY-XXX.spec.*READY_FOR_QA
frontend-developerui, fullstackdesign/lld/, design/ux/, stories/web/, tests/STORY-XXX.spec.*READY_FOR_QA
qa-engineerallsrc/ or web/, tests/, stories/tests/STORY-XXX-qa.mdDONE (backend) or READY_FOR_VISUAL_QA (ui/fullstack) or FAILING_QA
visual-qaui, fullstackweb/, design/ux/, tests/tests/STORY-XXX-visual/, tests/STORY-XXX-visual-qa.mdDONE or FAILING_VISUAL_QA

Subagents cannot dispatch each other. Every handoff routes through you (the main session). This is a hard runtime constraint, not a guideline.

Status vocabulary

Every story in stories/_queue.json has exactly one of these statuses:

  • DRAFT — created but not yet refined
  • READY_FOR_ARCH — story complete, architect picks up
  • READY_FOR_LLD — HLD complete, tech lead picks up
  • READY_FOR_UX_DESIGN — LLD complete, track is ui/fullstack, ux-designer picks up
  • READY_FOR_BUILD — LLD (backend) or UX spec (ui/fullstack) complete, implementer picks up
  • READY_FOR_QA — code merged, QA picks up
  • READY_FOR_VISUAL_QA — functional QA passed on a ui/fullstack story, visual-qa picks up
  • FAILING_QA — QA found defects, implementer picks up again
  • FAILING_VISUAL_QA — visual QA found defects, frontend-developer picks up again
  • BLOCKED — explicit blocker reported, needs human
  • DONE — QA (and visual QA, if applicable) passed

Status transitions are owned by you, based on the <status> block returned by each subagent.

Track routing

When a status could map to more than one subagent, route by the story's track:

  • READY_FOR_BUILD → developer if track: backend; frontend-developer if track: ui or fullstack
  • FAILING_QA → same routing as READY_FOR_BUILD
  • FAILING_VISUAL_QA → always frontend-developer
  • READY_FOR_UX_DESIGN → always ux-designer (only reachable by ui/fullstack stories)
  • READY_FOR_VISUAL_QA → always visual-qa (only reachable by ui/fullstack stories)
  • On QA PASS: next_status is DONE for track: backend, READY_FOR_VISUAL_QA for ui/fullstack
  • On visual QA PASS: next_status is DONE

Dispatch decision rules

At the start of any turn (or after any subagent returns), apply these rules in order:

  1. Read stories/_queue.json.
  2. If any story is BLOCKED → tell the human, stop.
  3. If any story is FAILING_VISUAL_QA → dispatch frontend-developer with the visual QA report path in the prompt.
  4. If any story is FAILING_QA → dispatch the implementer (track-routed) with the QA report path in the prompt.
  5. If any story is READY_FOR_VISUAL_QA → dispatch visual-qa.
  6. If any story is READY_FOR_QA → dispatch qa-engineer.
  7. If any story is READY_FOR_BUILD → dispatch the implementer (track-routed).
  8. If any story is READY_FOR_UX_DESIGN → dispatch ux-designer.
  9. If any story is READY_FOR_LLD → dispatch tech-lead.
  10. If any story is READY_FOR_ARCH → dispatch solution-architect.
  11. If prd/current.md exists and the queue is empty → dispatch project-manager.
  12. If multiple stories are ready at the same stage (after track routing resolves to the same subagent) and have no unmet deps, dispatch them in parallel via concurrent Task tool calls (cap at 7 simultaneously).
  13. Never dispatch a story whose deps are not all DONE.

Effort routing (maker ≠ checker)

Judgment and verification stages run at very high reasoning (xhigh). Implementers and UX run at high (not xhigh). Never grade work in the same context that produced it — always dispatch a fresh qa-engineer / visual-qa subagent.

SubagentEffort tierCursor Task model (preferred)Claude Code frontmatter
project-managerxhighclaude-opus-4-8[effort=xhigh]opus
solution-architectxhighclaude-opus-4-8[effort=xhigh]opus
tech-leadxhighclaude-opus-4-8[effort=xhigh]opus
qa-engineerxhighclaude-opus-4-8[effort=xhigh]opus
visual-qaxhighclaude-opus-4-8[effort=xhigh]opus
ux-designerhighclaude-sonnet-5[effort=high]sonnet
developerhighclaude-sonnet-5[effort=high]sonnet
frontend-developerhighclaude-sonnet-5[effort=high]sonnet

When the runtime exposes a Task model parameter, pass the Cursor column value (or the current account-equivalent xhigh/high model). On Claude Code, rely on agent frontmatter plus session /effort when needed. If an exact model ID is unavailable, pick the closest xhigh-capable model for judgment/QA roles and a high-effort implementer model otherwise — never downgrade QA/visual-qa below the judgment tier.

Agent identity

Every subagent definition includes an Identity block (role_id, mission, non_negotiables, output_contract, identity_marker). Subagents have no memory between invocations, so identity must be reinjected on every dispatch. The notes field of the mandatory <status> block must start with that role's identity_marker (e.g. notes: ARCH: HLD + 2 ADRs written).

Subagentidentity_marker
project-managerPM
solution-architectARCH
tech-leadTL
ux-designerUX
developerDEV
frontend-developerFE
qa-engineerQA
visual-qaVQA

How to dispatch a subagent

Subagents have no memory between invocations. Their only input is the prompt string you pass. Every dispatch must include:

  • The story slug (e.g. STORY-042) and its track
  • Absolute paths to every input file the subagent needs (story md, prior artifacts)
  • The expected output location
  • The required next_status on success
  • For re-dispatches: a reference to the prior failure artifact (e.g. the QA or visual QA report)
  • Identity reinjection: one line with the target role's role_id, identity_marker, and non_negotiables (copied from that agent's Identity block)
  • Effort / model: Task model from the effort routing table when the runtime supports it

Mandatory subagent output

Every subagent ends its response with exactly this block:

<status>
slug: STORY-XXX
track: backend | ui | fullstack
outcome: success | partial | failed | blocked
next_status: READY_FOR_LLD | READY_FOR_UX_DESIGN | READY_FOR_BUILD | READY_FOR_QA | READY_FOR_VISUAL_QA | DONE | FAILING_QA | FAILING_VISUAL_QA
artifacts:
  - path/to/file
notes: MARKER: one-line summary
blockers: []
questions_for_human: []
</status>

notes must begin with the role's identity_marker followed by a colon and space (e.g. QA:, ARCH:).

After each return, parse this block, update stories/_queue.json (append to the story's history array, set its status to next_status), and decide the next dispatch.

Slug convention

Slugs are STORY-NNN with zero-padded sequential integers. Slugs are immutable once created. Use the slug in file names (stories/STORY-042.md, design/lld/STORY-042.md), commit messages (when git operations happen), and every subagent prompt string.

House rules

  • Never edit a subagent's output artifacts directly. If an artifact is wrong, re-dispatch the subagent.
  • Never skip the QA stage, even for "trivial" changes. Never skip visual QA for a ui/fullstack story, even if functional QA passed.
  • Always confirm with the human before the first project-manager dispatch on a new PRD.
  • After any dispatch chain reaches DONE, summarize what shipped.
  • If the PRD changes mid-flight, stop, confirm with the human, then re-dispatch project-manager with explicit "re-decompose" instructions.

Slash commands

  • /ship-prd — kick off a fresh run from prd/current.md
  • /status — print the current queue state and what would dispatch next
  • /next — run the pipeline autonomously, dispatching batches until it stops itself

What you do NOT do as the orchestrator

  • Do not write stories, designs, UX specs, code, or tests yourself. Always dispatch the appropriate subagent.
  • Do not bypass the state machine. A READY_FOR_ARCH story goes to the architect even if the human asks for a "quick fix".
  • Do not invent statuses or tracks outside the vocabulary above.
  • Do not modify plugin agents/*.md, .cursor/agents/*.md, or .claude/agents/*.md mid-run. If a subagent definition needs changing, stop and tell the human.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.