multi-agent-worktree

multi-agent-worktree is an agent for coding agents from sean-galloway/RTLDesignSherpa. It costs 0 tokens per session (1,227 once invoked), scanned A, original, MIT.

A set of working rules for several coding agents sharing one Git working tree, the folder containing the checked-out project files.

In plain words
What is it for?
Use it when multiple agents edit the same checkout, especially before staging or committing changes and when rebuilding shared review files.
Why use it?
It explains how uncommitted or staged files can accidentally enter another agent’s commit, including deletions and generated build files.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/sean-galloway/rtldesignsherpa/multi-agent-worktree
Clone the repo
git clone --depth 1 https://github.com/sean-galloway/RTLDesignSherpa

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for multi-agent-worktree

README.md
[![agentmods](https://agentmods.dev/badge/agents/sean-galloway/rtldesignsherpa/multi-agent-worktree.svg)](https://agentmods.dev/agents/sean-galloway/rtldesignsherpa/multi-agent-worktree)
Your own site
<a href="https://agentmods.dev/agents/sean-galloway/rtldesignsherpa/multi-agent-worktree"><img src="https://agentmods.dev/badge/agents/sean-galloway/rtldesignsherpa/multi-agent-worktree.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,227 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01227
Opus 5 $0.00000 $0.00613
Sonnet 5 $0.00000 $0.00245
Haiku 4.5 $0.00000 $0.00123

Measured yesterday against content hash 9d1711d501bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

multi-agent-worktree scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

vault/handbook/agents/multi-agent-worktree.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Multi-agent shared worktree discipline

Several agents share one checkout of this repo. Every incident below reached either main or another agent's run before being caught. The common shape: uncommitted state is not private, and the index is shared.

The incidents, each a different leak path:

  1. Your experiment rides someone else's commit. A broken TBBase guard sat uncommitted; the math agent's git add swept it into da911640 and pushed it - live on main for twenty minutes under someone else's message (2026-08-08).
  2. Someone else's staged DELETIONS ride yours. Another agent staged an apb4->apbx page move (2 adds + 2 deletes). A prefix-grep stowaway check caught the adds but not the deletes - deletions do not match the paths you grep FOR - and 058b3ae0 shipped the delete-half of their rename. Repaired in aa21bdb0 (2026-08-13).
  3. Shared collateral roots get rebuilt mid-round. build_review_bundle.py is rm-rf-by-design; a second agent's rebuild deleted the first's hand-built _meta unit mid-humanize-round (2026-07-31). One bundle root per agent, or serialize.
  4. A shared-file edit breaks every consumer at once. An uncommitted edit to tbbase.py doubled a decorator and broke all 118 TBs that call convert_to_int - and the victim spent the longest stretch assuming the failure was their own change (2026-08-06).
  5. Your STAGED set rides someone else's commit - including RTL. A staged round-14 integration (an acceptance-fence RTL fix + TB scenario + 7 doc pages) was swept wholesale into the converters session's 426e2fb8, whose message describes none of it - a shared-RTL behavior change shipped under a test-work title. Same week, the reverse: a diagnostic probe rode that session's 40e5e116. Both directions of incident 1/2, now with staged (not just worktree) state. Provenance repaired with an empty commit carrying the intended message (1de8ad18, 2026-08-23). The fix is symmetrical: pathspec'd commits + the staged-SET check catch it on the committer's side; there is NO defense on the victim's side except committing fast.

The rules:

  • Verify the staged SET, not staged paths. Before every commit: git diff --cached --name-status, compare against your intended list BOTH ways - anything staged you did not list (adds, and especially deletions and renames) gets git restore --staged first. A prefix grep over --name-only misses deletions by construction.

  • The check must GATE, not report. 2026-09-01: the reverse check ran, found two of another agent's renames, printed UNEXPECTED - and the commit went through and pushed, because it was written as grep ... && echo UNEXPECTED || echo clean with git commit as the NEXT statement. A guard that prints is decoration. Make it exit 1, or chain it with && so a failure actually stops the commit. Two agents hit this same shape on the same day.

  • Adopting a rename is never safe, and check HEAD not the worktree. Git's rename detection pairs a deletion with an addition already in the index and carries them into your commit. But a rename is usually a rename PLUS a code change, and detection can only ever carry the rename half - the half that makes the tree coherent is by definition not in the index. So the adopted commit is broken by construction. Worse, you cannot see it from your worktree: the owner's uncommitted fix is sitting right there, so a consistency grep over the working tree comes back clean. It did, and main was still unbuildable - 4 filelists referencing paths that no longer existed, plus 2 live instantiations. Check what you are about to ship, not what you can see:

    git show HEAD:<path>          # or: git stash list / git worktree
    git grep <symbol> HEAD        # the tree as it will land, not as it looks
    

    Recovery is fix-forward by the OWNER (they hold the other half), not a revert by the adopter.

  • Commit and push promptly. Uncommitted work in this tree has a measured half-life. If it must stay uncommitted (another agent's in-flight restore, say), it is at risk every minute - flag it to the owner.

  • Never leave a broken experiment uncommitted while others work. Mutation checks restore from a kept copy in the same breath (cp out, mutate, run, cp back) - never across a boundary where another agent might add/commit.

  • One collateral root per agent for anything rebuilt wholesale (review bundles, generated trees), or explicit serialization.

  • When a suite breaks unexpectedly, check git status on shared infrastructure before debugging your own change - incident 4's cost was mostly misattribution time.

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +24 lines 9d1711d501bf
  2. 5d ago First seen · 60 lines · 0 tokens per session scan A 23b1ccd6e2bc

Subscribe to this mod's changes

multi-agent-worktree is an agent published in the GitHub repository sean-galloway/RTLDesignSherpa (23 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,227 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

p1-research-orchestrator

Phase 1 research pipeline orchestrator. Manages spec refinement via AskUserQuestion, exhaustive solution tree exploration with maximum parallel agents, sub-domain expert coordination, 3-round chief review, and structured artifact generation.

babyworm/rtl-agent-team · 50 tokens

p1-research-team-orchestrator

Phase 1 research team coordination teammate. Coordinates tree-of-thought solution exploration with parallel candidate deep-dive, sub-domain expert coordination, and 3-round chief review via TaskCreate/TaskList/TaskUpdate/SendMessage.

babyworm/rtl-agent-team · 55 tokens

p2-arch-orchestrator

Phase 2 architecture pipeline orchestrator. Manages P1 algorithm candidate HW review, parallel architecture design + C reference model development, dynamic convergence-based iterative review with wonder tracking, and artifact finalization.

babyworm/rtl-agent-team · 48 tokens

p3-uarch-orchestrator

Phase 3 μArch design pipeline orchestrator. Manages parallel uarch design + BFM development, BFM validation gate, dynamic convergence-based review with wonder tracking, upstream feedback report, domain consultation for design patterns, and artifact finalization with clock domain map, protocol assignments, and pipeline…

babyworm/rtl-agent-team · 68 tokens

p3-uarch-team-orchestrator

Phase 3 uArch design team coordination teammate. Coordinates dual-stream uArch design + BFM development, BFM validation gate, wonder tracking, dynamic convergence-based review, and upstream feedback report via TaskCreate/TaskList/TaskUpdate/SendMessage.

babyworm/rtl-agent-team · 60 tokens

p4-implement-orchestrator

Phase 4 RTL implementation orchestrator. Manages 10-Wave pipeline (Write→Lint→Fix→Review→Bugfix→UnitTest→CDC→Protocol→Refactor→IntegrationGate) with per-module parallelism, wave overlap, and Stream B artifact generation.

babyworm/rtl-agent-team · 63 tokens