agentleFS
rubenmarcusrubenmarcus/agent-skills/skills/agent-worktree-orchestration/SKILL.md

agent-worktree-orchestration

Skill2 starsChanged 13 days agoMITView on GitHub

Coordinate coding agents using isolated Git worktrees and explicit race, comparison, or sequential handoff strategies. Use when implementing alternatives or splitting coding work across agents, branches, or sessions.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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 strategy selection before choosing among racing candidates, comparing alternatives, or a sequential pipeline.

    line 12
  2. Distinctive:

    Use separate worktrees for concurrent writers.

    line 22
  3. Distinctive:

    Use one integration owner.

    line 32
  4. Distinctive:

    Update the project continuation record before changing lanes.

    line 36
  5. Distinctive:

    Remove only worktrees owned by this run and verified to have no unrecovered work.

    line 38

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

Agent worktree orchestration

Give each concurrent writer an isolated branch and worktree. Git records implementation state; acceptance checks determine which result is useful.

Choose a strategy

Read strategy selection before choosing among racing candidates, comparing alternatives, or a sequential pipeline.

Racing duplicates work and costs the sum of participants. It is useful when time to a passing candidate matters and that cost is acceptable. Comparing candidates needs a shared rubric. A pipeline suits dependent stages.

The first success, shortest diff, or fewest iterations is not proof of best quality. Do not describe such a heuristic as an independent consensus review.

Prepare ownership

Record repository, base commit, selected agents and models, per-agent worktree, allowed paths, acceptance checks, and budgets. Respect the user's chosen model; do not substitute silently.

Use separate worktrees for concurrent writers. Verify each worktree's branch and status before launch. Preserve unrelated dirty work and existing branches.

Within a sequential pipeline, hand over an exact revision or scoped diff with validation evidence. Keep only one writer active in a shared worktree at a time.

Collect and integrate

Collect both successful and failed results. A partial failure must not discard another agent's useful artifact. Avoid abruptly terminating a writer without a supported cancellation/checkpoint mechanism.

For each result, retain revision, changed paths, acceptance evidence, unresolved concerns, elapsed work, and cost when measured. Do not invent missing token costs.

Use one integration owner. Review selected changes, handle conflicts deliberately, then rerun acceptance checks on the combined revision.

Preserve and clean up

Update the project continuation record before changing lanes. Identify unintegrated commits and the exact next action.

Remove only worktrees owned by this run and verified to have no unrecovered work. Never apply blanket force cleanup to other sessions. Publishing branches, opening PRs, and merging remain separately scoped actions.

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.