agentleFS
mnzraleemnzralee/claude-multi-agent-architecture/AGENTS.md

claude-multi-agent-architecture

AGENTS.md8 starsChanged 43 days agoMITView on GitHub

Tool-agnostic context for AI coding assistants (Claude Code, Cursor, Codex, Gemini, Amp, and others). For Claude Code specifics, see CLAUDE.md and the .claude/ directory. Replace every [CUSTOMIZE] placeholder with your project's values. Every model, whatever its capability tier, honors one behavioral contract in this repo: lead with the outcome, prove completion with artifacts, decide depth-first rather than from a hunch, do not stop early, do the simplest thing that works well, and disclose every honest finding uncapped. For Claude Code,…

The file

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

4 rules. About 1 is common, 3 are distinctive, and 0 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Decide before orchestrating: Prefer a single prompt or a fixed workflow over an autonomous swarm.

    line 35
  2. Common:

    No secrets in committed files.

    line 83
  3. Distinctive:

    No stray debug logging in production code.

    line 89
  4. Distinctive:

    When instructions conflict: security > correctness > performance > readability > style.

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.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
AGENTS.md

AGENTS.md - Cross-Tool Agent Configuration

Tool-agnostic context for AI coding assistants (Claude Code, Cursor, Codex, Gemini, Amp, and others). For Claude Code specifics, see CLAUDE.md and the .claude/ directory. Replace every [CUSTOMIZE] placeholder with your project's values.

Project Overview

<!-- [CUSTOMIZE] -->

[PROJECT_NAME] is a [DESCRIPTION].

  • Backend: [FRAMEWORK] with [ARCHITECTURE_PATTERN]
  • Frontend: [FRAMEWORK]
  • Database: [DATABASE] with [ORM]
  • Infrastructure: [INFRA_PLATFORM]
  • Repository: [monorepo | polyrepo]

Conventions

Code style (illustrative defaults; adapt to your stack)

  • TypeScript strict mode; no any (use unknown plus type guards).
  • Typed domain errors; never swallow exceptions or use silent fallbacks.
  • No @ts-ignore / @ts-expect-error.

Git

  • Conventional commits: type(scope): subject (feat, fix, refactor, chore, docs, test, perf, security).
  • File-by-file staging; commit each logical unit. No AI attribution, no emojis.

Testing

  • Testing pyramid: roughly 70% unit, 20% integration, 10% end-to-end. Prove results with real output.

Architecture

  • Clean architecture: domain to application to infrastructure to interface. Dependencies point inward (domain has zero external deps). Repository pattern for data access; use cases for business logic.

Orchestration model

  • Decide before orchestrating. Prefer a single prompt or a fixed workflow over an autonomous swarm. Pick the smallest pattern that fits.
  • Single writer, many readers. Parallel agents may read/analyze/review; exactly one agent mutates files or commits at a time.
  • Prove with artifacts. "Done" means a commit SHA, test output, or a passing check, not a narration.

Operating standard (doctrine, every model tier)

Every model, whatever its capability tier, honors one behavioral contract in this repo: lead with the outcome, prove completion with artifacts, decide depth-first rather than from a hunch, do not stop early, do the simplest thing that works well, and disclose every honest finding uncapped. For Claude Code, the full doctrine and its enforcement (an always-loaded rule, a launch-time system-prompt wrapper, an inert-by-default verification hook) live at .claude/standards/OPERATING-STANDARD.md; see docs/OPERATING-STANDARD.md. Tools without an equivalent mechanism should still hold every model to this same six-point contract, via whatever system-prompt or repo-instructions surface that tool exposes.

Agent Roles

RoleResponsibilityModel Tier
architectSystem design, API contracts, architectural decisionsFrontier (Opus)
researcherCodebase exploration, pattern discoveryFast (Haiku)
prompt-writerGenerate bounded, context-rich prompts for sub-agentsFast (Haiku)
supervisorTrack management, sub-agent coordinationStandard (Sonnet)
backend-implBackend implementationStandard (Sonnet)
frontend-implFrontend implementationStandard (Sonnet)
infra-implInfrastructure and deploymentStandard (Sonnet)
docker-deployContainer builds, image management, deployStandard (Sonnet)
db-specialistSchema, migrations, ORM operationsStandard (Sonnet)
cqrs-specialistEvent-driven / CQRS patternsStandard (Sonnet)
testerUnit and integration testsStandard (Sonnet)
e2e-testerEnd-to-end browser testsStandard (Sonnet)
reviewerCode review and qualityStandard (Sonnet)
debuggerRoot-cause diagnosis and fixStandard (Sonnet)
securitySecurity auditFrontier (Opus)
code-quality-auditorDeep quality analysisFrontier (Opus)
evaluatorRubric-based critic for the evaluator-optimizer loopFrontier (Opus)
watchdogParallel safety monitor, drift detectionStandard (Sonnet)
work-recorderSession documentationFast (Haiku)

File Ownership

<!-- Prevents multi-agent file conflicts during parallel work. [CUSTOMIZE] paths for your layout. -->
PatternOwner
src/domain/**, src/application/**, src/infrastructure/**, src/interface/**backend-impl
components/**, app/**frontend-impl
*.test.*, *.spec.*tester
e2e/**e2e-tester
infra/**, k8s/**, Dockerfile*infra-impl, docker-deploy
db/**, migrations/**, schema filesdb-specialist

Quality Gates

Blocking (must pass)

  • Type check clean (for example tsc --noEmit).
  • No secrets in committed files.
  • All tests pass.
  • No any in production code.

Advisory (should pass)

  • Coverage at or above target.
  • No stray debug logging in production code.
  • Dependency audit clean.

Conflict Resolution

When instructions conflict: security > correctness > performance > readability > style.

Custom Instructions

  • Claude Code: see CLAUDE.md and .claude/.
  • Cursor: see .cursorrules if present.
  • Other tools: this file is the shared contract.

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.