How do I split a repository into lanes that do not overlap?
Declaring a lane
A lane is a list of path prefixes. Getting them right is the difference between agents that work in parallel and agents that queue up behind each other — or worse, that both edit the same file.
Start from the structure the project already declares
If your project declares a workspace — members in Cargo, workspaces in npm, a pnpm-workspace.yaml — that structure is the answer, and Muster can read it for you. Probe project, in the empty state of the roles panel, reads the disk in milliseconds and proposes lanes from what it finds. It proposes; it does not apply.
If the project declares no structure, the probe says so instead of guessing. That is deliberate: an invented lane is worse than no lane at all. A lane derived from a folder name that happens to look like a module will let two agents into the same file while telling you they are separated.
Picking paths by hand
Three rules cover most cases:
- Prefixes, not globs.
src/api/owns everything under it. - No overlaps. If two lanes can match the same file, they are one lane wearing two names. Muster treats roles that share a lane name as a single role — that is how five crates become “engineering”.
- Leave the shared files unowned.
package.json, the lockfile, the CI config: anything several roles must touch belongs to nobody. A task that touches an unowned file runs alone, which is the correct behaviour for a file everyone depends on.
What a wrong lane costs
Two different mistakes, two different costs:
- A lane that is too narrow costs you parallelism. Tasks pile up waiting for a lane that is free, and the queue degrades into one task after another. You lose time; you lose nothing else.
- A lane that is too wide — one that claims paths the role does not really own — is the expensive one. Two tasks are admitted at once, both agents edit the same file, and the second write silently undoes the first.
When in doubt, declare narrow. The parallel case degrades into serial execution; it never degrades into two agents in the same file.
Roles without a lane
A role with an empty lane still works. Its tasks simply never run beside anything: they are admitted only when nothing else is running. That is a reasonable starting point for a role you have just invented and do not yet trust with boundaries.
Next
How a task gets admitted explains what the runner does with these lanes, task by task.