multi-agent-batch-campaigns
Skill0 starsChanged 5 months agoMITView on GitHub
Use when executing a large backlog of review findings or a multi-part feature as coordinated batches across parallel agents or sessions, planning waves, avoiding file-contention collisions, and resuming a campaign that a previous session left mid-way through.
In this repository16 other files it gives its agents.
- multi-model-adversarial-reviewSkill
- architecture-contracts-as-lawSkill
- multi-tenant-auth-referenceSkill
- git-change-control-for-agentsSkill
- ai-cost-tracking-and-guardrailsSkill
- budget-aware-model-allocationSkill
- config-and-secrets-hygieneSkill
- failure-archaeologySkill
- systematic-debugging-playbookSkill
- environment-and-build-hazardsSkill
- staging-to-prod-cutover-campaignSkill
- consent-and-regulated-data-referenceSkill
- docs-of-record-and-arbitrationSkill
- llm-eval-harness-and-scoring-pipelineSkill
- tiered-consultancy-reviewSkill
- pre-merge-validation-gateSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
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
- Distinctive: line 12
Never trust a backlog's own status annotations at face value.
- Distinctive: line 14
Check the actual current tip of your integration branch, not what a tracking doc says it is.
- Distinctive: line 15
Read the tail of any checkpoint/progress file for the real "what's done, what's next," and never redo an entry already marked done.
- Distinctive: line 16
Check for open PRs: a finding already owned by an open PR isn't yours to pick up.
- Distinctive: line 17
Check for unpushed, local-only branches: these are invisible to any remote-based check and are one disk failure from gone.
- Distinctive: line 27
Sequence in waves: test-only and genuinely file-disjoint work first (fully parallelizable), then area-local application code, then …
- Distinctive: line 46
If a past entry turns out to be wrong, append a correction.
- Distinctive: line 47
Keep individual work small enough to checkpoint frequently.
- Distinctive: line 52
Every fix stays test-first and gets reviewed.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
Multi-agent batch campaigns
A single large backlog (dozens of review findings, a multi-part feature) executed by parallel agents over multiple sessions fails in specific, avoidable ways: agents redo already-finished work because a status doc rotted, two batches collide on the same file, and a session that dies mid-campaign takes unrecoverable context with it. This skill is the execution model that avoids all three.
Step 0: re-establish ground truth. Status docs rot, git doesn't
Never trust a backlog's own status annotations at face value. Before planning or resuming anything:
- Check the actual current tip of your integration branch, not what a tracking doc says it is.
- Read the tail of any checkpoint/progress file for the real "what's done, what's next," and never redo an entry already marked done.
- Check for open PRs: a finding already owned by an open PR isn't yours to pick up.
- Check for unpushed, local-only branches: these are invisible to any remote-based check and are one disk failure from gone.
- For each individual finding you're about to work, re-read the actual current code at the cited location before trusting the backlog's description of it. Backlogs go stale the moment anything gets fixed, refactored, or moved, and citations (line numbers especially) rot fast.
A campaign that trusts a stale status doc instead of live state will, with some regularity, spend real effort redoing work that's already shipped.
Planning a campaign
- Re-baseline every candidate item against the current integration tip. Drop anything already fixed (with a one-line reason), and dedupe near-identical items across different sources into one canonical owner.
- Flag anything that would change user-facing behavior and isn't already a settled decision. Escalate these as a batch, don't block the rest of the campaign on an answer, and don't guess.
- Group remaining work by area and primary file, so each batch owns a disjoint slice of the codebase. This is what makes true parallelism possible without collisions.
- Sequence in waves: test-only and genuinely file-disjoint work first (fully parallelizable), then area-local application code, then heavy-overlap areas last and sequenced rather than parallelized.
- Use one integration branch. Batches branch off the integration branch's tip (not the trunk directly), get folded back in as they're reviewed and green, and only the single integration branch ever goes to the actual trunk as one PR. This keeps "many small changes landing continuously" from becoming "the trunk is red half the time."
Maintain an explicit file-contention map
For any file that multiple planned batches might touch, write down in one place which batch owns it, and route every other batch's related changes through that one owner rather than letting them collide. High-contention files in most systems are predictable in advance (a routing hub, a shared type/contract file, a heavily-used service file), and calling them out explicitly before work starts avoids a lot of merge pain later.
Parallel execution mechanics
- One workspace/worktree per agent or batch, as a sibling checkout, not a shared working directory. This is what actually enables true parallelism without agents clobbering each other's uncommitted state.
- A backend batch that runs its own test suite needs its own isolated test resource (a separate test database, a separate scratch environment) so parallel test runs don't collide with each other.
- Every fix stays test-first (see the systematic-debugging-playbook skill), and gets reviewed before folding into the integration branch (see the adversarial-review skill). A campaign is not an excuse to skip either discipline just because there's a lot of work to get through.
Checkpoint-to-file discipline: mandatory for anything long-running
Long autonomous sessions die (hit a length limit, get interrupted, crash) more often than anyone plans for, and an in-progress session's context does not survive that. The only thing that reliably survives is what got written to a file. For any campaign expected to span more than one sitting:
- Maintain a single progress file with unambiguous resume instructions at the top ("if resuming: read this file, find the next unfinished item, do not redo finished ones").
- Append an entry after every meaningful event (a unit fixed, a batch gated, a PR opened, a review returned, a fold-back merged), with enough detail (branch, commit, what passed) that a fresh session could resume from just this file with zero other context.
- If a past entry turns out to be wrong, append a correction; never edit history in place. The point of the file is to be a trustworthy trail, and silently rewriting it defeats that.
- Keep individual work small enough to checkpoint frequently; detail belongs in the file, not in a single giant in-memory transcript that might not survive to the next session.
Guardrails for autonomous/looped execution specifically
- Whoever owns the trunk merges the final integration PR. An autonomous loop should never merge anything into the trunk itself.
- Every fix stays test-first and gets reviewed; a long autonomous run is not a reason to relax either discipline.
- A new product/behavior decision surfacing mid-loop gets batched and flagged, never decided by the loop itself.
- Folding a reviewed batch branch into the integration branch with a local merge is not the same action as merging a PR to the trunk. The first is the required mechanism for a multi-batch campaign; only the second is the one action reserved for the trunk's owner.
When not to use this
For a single bugfix or small feature, plain git-change-control-for-agents is enough. The wave-planning and checkpoint machinery here is specifically for backlogs and campaigns large enough to span multiple sessions or genuinely parallel agents.
Evidence: the source version of this skill passed the pre-registered, order-blinded A/B of July 2, 2026 (must-hits 2/4 cold to 3/4 loaded on one task and 2/3 to 3/3 on the other); this rewrite was later tested in the July 2026 effort lattice, where the full 17-skill library ran against every model and effort level (results/matrix/MATRIX.md; evidence note updated 2026-07-12).
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
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.

