agentleFS
xg-gh-25xg-gh-25/SwarmAI/CLAUDE.md

SwarmAI

CLAUDE.md50 starsChanged 7 months agoMITView on GitHub

Short entry point for Claude Code / Cursor / other AI coding assistants working in this repo. SwarmAI is a self-evolving Agent OS, not a Claude wrapper. Cognition (how it judges — principles, rules, gates) is kept separate from knowledge (what it knows). The model proposes; a layer of gates + a staged pipeline + a validator dispose. Much of backend/core/ is "guardrails around an LLM" — that is the product. Full architecture guide → AGENTS.md — the mental model,…

  • In this repositoryOne other file it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If any of build / tests / eval was not run or is failing → do not push.

    line 26
  2. Very specific:

    Every commit MUST end with Co-Authored-By: Swarm <swarm@swarmai.dev> — never Claude/Anthropic identity.

    line 32
  3. Very specific:

    Never pipe pytest through | tail.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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

CLAUDE.md

Short entry point for Claude Code / Cursor / other AI coding assistants working in this repo.

SwarmAI is a self-evolving Agent OS, not a Claude wrapper. Cognition (how it judges — principles, rules, gates) is kept separate from knowledge (what it knows). The model proposes; a layer of gates + a staged pipeline + a validator dispose. Much of backend/core/ is "guardrails around an LLM" — that is the product.

Full architecture guide → AGENTS.md — the mental model, data flow, process topology, backend/frontend structure, security gates, conventions, and invariants. Read it before any non-trivial change. This file is the always-loaded short version; AGENTS.md is the depth.

Before you push — the local quality gate

MUST NOT push to GitHub unless ALL of these passed locally for the change:

  1. Build green — backend ./prod.sh build, and/or cd desktop && npm run build:all (whichever the change touches).
  2. Tests green — at least the affected suites (cd backend && python -m pytest tests/test_<module>.py --timeout=60 / cd desktop && npm test -- --run); full suite (SWARMAI_SUITE=1) when the blast radius warrants.
  3. Eval green — cd backend && python scripts/ci_eval_gate.py (a pure freshness+green check, zero Bedrock cost — it does NOT run the judge).

If any of build / tests / eval was not run or is failing → do not push. Tests-green alone is not "qualified"; commit ≠ qualified ≠ deployed — a build makes a binary, code isn't live until rebuild+restart. Commit directly to main (project convention); never auto-branch.

Commit identity

Every commit MUST end with Co-Authored-By: Swarm <swarm@swarmai.dev> — never Claude/Anthropic identity. A PreToolUse gate blocks commits missing it, but nothing auto-inserts it: write the line yourself. See AGENTS.md → "Git Commits" for why (shadowed local hooks + two-layer enforcement).

Dev commands

./dev.sh                          # full dev (backend + Vite + Tauri window)
./prod.sh build                   # PyInstaller build + verify + deploy to daemon
cd desktop && npm run build:all   # frontend production build (embedded in the .app)
cd backend && python -m pytest tests/test_<module>.py -v --timeout=60   # targeted tests

Never pipe pytest through | tail. See AGENTS.md → "Debugging" for more.

Conventions & invariants

Anti-patterns, lifecycle invariants, and the full dev-rules live in AGENTS.md (and, for Kiro users, .kiro/steering/swarmai-dev-rules.md, which Kiro auto-loads). When in doubt, AGENTS.md is authoritative for this repo.

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.