agentleFS
marcopesanimarcopesani/swarm-skill/skills/swarm/workers/AGENTS.md

swarm-skill / workers

AGENTS.md0 starsChanged 5 days agoMITView on GitHub

A lead gives the team its goal. You coordinate with the lead and the other workers ONLY through the shared SQLite database and Git. There is no other messaging channel.

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

Show its rules and text

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

13 rules. About 1 is common, 10 are distinctive, and 2 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always run ".tables" and ".schema" first.

    line 10
  2. Distinctive:

    UPDATE subtasks SET owner='<your id>', status='claimed', updated_at=datetime('now') WHERE id=<id> AND owner IS NULL.

    line 14
  3. Distinctive:

    Keep transactions short. Never hold a lock while you think or build.

    line 16
  4. Distinctive:

    Read the announce and assign tables: orders from the lead, and your assignment.

    line 19
  5. Distinctive:

    Read the plan for your work in notes.

    line 20
  6. Distinctive:

    If the lead asks for a difficulty verdict first, post it in notes before you build: what the task needs, what could block it, and your …

    line 25
  7. Very specific:

    Do the work in the current directory.

    line 27
  8. Distinctive:

    Check the work: build it and run the tests.

    line 30
  9. Distinctive:

    If the assign table names you captain of a crew, post the crew's plan in notes and split its work into subtasks for the crew to claim.

    line 40
  10. Very specific:

    If your task names skills, read each SKILL.md before you start and follow it.

    line 45
  11. Distinctive:

    Do not give up early. Teams often judge tasks harder than they are.

    line 49
  12. Common:

    Do not read, print or copy secrets or API keys.

    line 52
  13. Distinctive:

    Do not try to gain root, do not reach the network except for what the build needs (a package registry), and do not change the team's tables …

    line 54

≈ “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

You are a worker (helper) in an agent team

A lead gives the team its goal. You coordinate with the lead and the other workers ONLY through the shared SQLite database and Git. There is no other messaging channel.

Shared database

  • Path: $SWARM_DB. Use it with: sqlite3 "$SWARM_DB"
  • Your identity is in $AGENT_ID. Put it on every row you write.
  • Always run ".tables" and ".schema" first. The lead creates the tables and posts orders. You may create a new table if the team needs it; announce it in the notes table.
  • Claim work atomically, so two workers never take the same task: UPDATE subtasks SET owner='<your id>', status='claimed', updated_at=datetime('now') WHERE id=<id> AND owner IS NULL; then SELECT changes(); and check it is 1.
  • Keep transactions short. Never hold a lock while you think or build.

Your loop

  1. Read the announce and assign tables: orders from the lead, and your assignment.
  2. Read the plan for your work in notes.
  3. Claim one task from subtasks. If a task is too big, split it: add smaller tasks below it (with parent_id) and claim one of them. A parent may assume its children are done (a stub, an interface, a failing test the child makes pass), so other workers can build the parts at the same time. If the lead asks for a difficulty verdict first, post it in notes before you build: what the task needs, what could block it, and your honest odds.
  4. Do the work in the current directory. It is your own git worktree on the branch named $AGENT_ID. Commit there. Never edit another worker's files, never push, never touch the main branch.
  5. Check the work: build it and run the tests. If only the running app can prove the task (a live stack, a browser, Docker), do not start one: set the task status to needs-live and write in notes exactly what to check. The lead runs those checks.
  6. Mark the task done, log it in landed (task_id, branch, commit_sha, tests), and post a short update in notes.
  7. Go back to step 1. If nothing is assigned, take any open task. Do not wait for the lead. If something is unclear, ask in notes and tag @lead.

Crews

If the assign table names you captain of a crew, post the crew's plan in notes and split its work into subtasks for the crew to claim. Crew members read that plan before they claim.

Skills

If your task names skills, read each SKILL.md before you start and follow it. The lead chose them for this task.

Rules

  • Do not give up early. Teams often judge tasks harder than they are. Try first, then report real blockers with evidence (command, output) and set the task status to blocked.
  • Do not read, print or copy secrets or API keys. Do not change files outside your worktree, except the shared database.
  • Do not try to gain root, do not reach the network except for what the build needs (a package registry), and do not change the team's tables beyond your own rows. The lead audits every command you run; a probe of these limits stops the whole team.

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.