agentleFS
SohrabZSohrabZ/buzz-agent-teams/skills/migration-pattern/SKILL.md

migration-pattern

Skill1 starsChanged 3 months agoMITView on GitHub

Set up and run a bounded, repetitive change — a migration, upgrade, or codemod — as a coordinated batch operation: pattern document, work list, rulebook, batch protocol. For coordinator agents (Comet) starting a swarm project.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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
  1. Distinctive:

    Read the code, the tests, and one representative unit of the work until you can write this down completely:

    line 19
  2. Distinctive:

    Do not migrate the unit you studied.

    line 42
  3. Distinctive:

    Every edge case gets a ruling, and every ruling gets written down — to memory and in-channel — in this shape:

    line 60
  4. Distinctive:

    When a worker escalates: answer from the rulebook if it is covered — immediately, without re-deliberating.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
SKILL.md

Run a migration as a swarm

A migration lives or dies on three artifacts you create before any worker touches anything: the pattern, the work list, and the rulebook. This skill is the template for all three.

1. The pattern document

Read the code, the tests, and one representative unit of the work until you can write this down completely:

## Pattern: <old thing> → <new thing>

**Before**  (a real, representative snippet from this repo)
**After**   (the same snippet, migrated)

**Rules**
- <each mechanical transformation, one per line>

**Does NOT apply to**
- <vendored code, generated code, documentation strings, …>

**Verification per batch**
- <exact commands, in order>

Post it in-channel. You may be slow here — everything downstream depends on the pattern being right, and a wrong pattern multiplied across fifty files is the most expensive mistake a swarm can make.

Do not migrate the unit you studied. Studying is reading; the first migrated unit is a worker's batch like any other, and it doubles as the pattern's test.

2. The work list

Enumerate every unit in scope — file, module, or call site — before assigning any. Sweep more than one naming convention before declaring the list complete, and say how you searched so coverage can be judged.

Track each item as: pending → in progress → verified | blocked, with an owner. Post the list state whenever it changes meaningfully. An item is verified only on the verifier's PASS — never on the worker's own report.

Unknown scope is what kills a swarm. A list that grows mid-project means the enumeration was wrong; stop and re-enumerate before continuing.

3. The rulebook

Every edge case gets a ruling, and every ruling gets written down — to memory and in-channel — in this shape:

**Case:** <what the pattern didn't cover>
**Ruling:** <what to do>
**Generalizes to:** <the class of case this settles, not just this instance>

The third line is the one that makes escalation volume fall. A ruling scoped to one file will be re-asked from the next file; a ruling scoped to the class will not.

When a worker escalates: answer from the rulebook if it is covered — immediately, without re-deliberating. Decide and record if it is new and the project's conventions can settle it. Escalate to the owner only when they cannot: a behavior change nobody asked for, something irreversible, a real product tradeoff.

4. Batch protocol

  • A batch must be verifiable in one pass; if the verifier can't check it in one sitting, it is too big.
  • Independent batches may run in parallel across workers — but never two workers in overlapping files; they share one filesystem.
  • A failed batch returns to the worker who wrote it.
  • Workers apply the pattern exactly. An improvement a worker wants to make is an escalation, not a batch.

5. Ending

The project ends when the list is empty and every item is verified. Publish a final DONE: summary: what changed, how it was verified, what the rulebook learned. Then stop — a swarm that invents follow-on work to stay alive has outlived its purpose.

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.