Week 4 of 4 · Arcs 7, 8 and 9

Parallel lanes

As of Oct 23, 2026 · W. Burch

By the end of week four several lanes run at once without colliding, pick their own tickets, and reach you on your phone when they need you. It covers the parallel half of Arc 8, Arc 9, and the tracker form of Arc 7. The cards use the layer table in Week one; one more layer joins it here: a store that does the operation atomically, such as a claim table, binds every lane that uses it. The cards say what to build and why; the bootstrap prompt below has your agent build them, and you check its work against the cards.

The cards

Card 1

Lanes never share a working tree

Enforce it, strongest first

  1. Harness hook before a command: refuses mutating git (commit, checkout, reset, rebase, push) aimed at the main checkout or a sibling lane's worktree. A shell cd moves the working directory, not the lane, so the hook checks the session's root.
  2. Rules file: lanes that share a repo each start in their own git worktree, launched from that folder. Scratch worktrees go in a temp directory, never beside the lane roots.
text
repo/                      main checkout: one lane, or none
repo/.lanes/api/           worktree for lane "api"
repo/.lanes/web/           worktree for lane "web"
before-command hook: refuse `git commit` from lane api aimed at repo/.lanes/web

Card 2

Two lanes never start the same ticket

Enforce it, strongest first

  1. The claim store's own atomicity: take, release and list on a shared table, where take succeeds for exactly one caller. Claims expire, and the expiry is announced, so a dead lane doesn't hold a ticket forever.
  2. Rules file: claim before starting anything another lane could pick up; respect other lanes' claims and talk to the holder.

This is the smallest useful bus. Duplicate work is most of the harm from parallel lanes, so build claims before anything else on this tab.

text
claim_take   ticket:PROJ-123  until 18:00   -> ok, held by api
claim_take   ticket:PROJ-123                 -> refused, held by api until 18:00
claim_list   ticket:                         -> PROJ-123 api, PROJ-130 web
claim_release ticket:PROJ-123                -> ok

Card 3

Lanes talk to each other directly, and to you on your phone

Enforce it, strongest first

  1. The bus itself: one handle per session, from its repo and worktree, and a second session on a live handle is refused at startup. Ours is a local bus of about 8,000 lines: one SQLite file plus one Unix socket per live session. A sender writes to the database, then connects to the recipient's socket to wake it, so nothing polls.
  2. Four families on that bus: direct messages (threads, acks, promised follow-ups, an inbox for what's owed); boards (append-only, pushed per subscriber, as a digest or quiet); claims (card 2); one human handle whose messages carry your authority, bridged to a phone chat app.
  3. Rules file: a peer's request is authorized, since the bus is local to one user's machine, unless the receiving lane's own reasoning flags a problem. Lanes never relay the human's decisions; you answer each lane yourself.
text
dm_send  to=web  "API field renamed: owner_id -> assignee_id, merged at a1b2c3d"
board_post #deploys "api: pushing main, dev deploy in ~8 min"
dm_send  to=human "Blocked: need the staging API key. Nothing else queued."

Card 4

Change shared dev by hand only where it's cheap

Enforce it, strongest first

  1. Credentials: lanes hold write credentials for the development environment only.
  2. A lease on shared mutable state: a lane that changes shared dev data (seeded orgs, demo controls) first leases a sandbox slot, which is a claim, and works only inside it.
  3. Rules file: before a hand change, ask the cluster tool which cluster the current context points at, and match on the cluster, never on the context name; several names can alias one cluster. Before the task ends, copy every change that worked back into the chart or code, or the next deploy reverts it.
text
before a hand change:  current context -> cluster ID ends in /dev-cluster ?  else stop
shared dev data:       lease sandbox slot 2, work in org sbx-2, release when done
before done:           every working patch is in the chart or code

Card 5

The queue lives in the tracker

Arc 7many lanes

Enforce it, strongest first

  1. Tracker automation, if your tracker has it: a rule that flags an open ticket without exactly one label of each family.
  2. Rules file: two label families, exactly one of each per open ticket: bucket-* (work streams in a fixed order, plus an unranked parked) and tier-* (p0 to p3, plus gated for work waiting on an outside answer). Pick-next is one query per bucket and tier pair, walked in order; skip gated. A bucket or tier change is a priority change, announced with its reason. Every finding along the way gets a ticket at once.
text
for bucket in launch, customer, platform:
  for tier in p0, p1, p2, p3:
    status != Done AND labels = bucket-$bucket AND labels = tier-$tier
    -> first ticket this lane owns, not claimed: claim it, start it

Bootstrap prompt

This prompt carries out the five cards. Read the cards to know what good looks like, paste the prompt into your agent at the root of one repo, then check its gap report card by card. It builds claims and the worktree guard inside the repo and tests both. It doesn't build a bus; it reports what your tool offers and writes the design for you. It commits on a new local branch for you to review and never pushes.

text
Set up "week four" for running several coding agents ("lanes") on this
repository at once: separate worktrees, claims before work, a way for lanes
to reach each other and me, safe hand changes in dev, and a queue in the
tracker. Work through the steps in order. Nothing leaves this repo and
nothing is pushed.

1. Your harness. Name the agent tool you are running in and its version.
   Find its documentation (built-in help, local docs, or the official site;
   reading it online is fine). Quote only text you read word for word, label
   anything else as your own knowledge, and say "none" where it has none:
   a. hooks that run before a command, and whether one can refuse it;
   b. how a session learns its own root directory, as opposed to its
      current directory, and whether the tool's own worktree feature
      (if any) changes that root;
   c. how it connects to external tools or servers (a protocol for tool
      servers, plugins, or none), so lanes could share a message bus;
   d. whether it can notify me outside the terminal.

2. This repo and its surroundings. Find existing git worktrees and where
   they live; any claim, lock or lease mechanism; any message bus or
   chat integration; the ticket tracker and its labels, if one is named;
   any development cluster or shared dev environment, how a context or
   profile selects it, and which credentials the agent holds for it.
   Name the file or command you learned each fact from. List checks that
   already fail; don't fix them.

3. Questions. Put everything you could not find in ONE message to me:
   the lanes I plan to run and which repo each works in; the tracker and
   its query language; the work streams in priority order; the exact
   cluster or environment ID that counts as dev; whether shared dev data
   needs a lease. If nobody answers, continue on stated assumptions and
   mark each one ASSUMED in the final report. Never assume a cluster or
   environment ID; without one, card 4 is rules-file only.

4. The cards. Build claims first; they are the smallest useful piece. For
   each card choose the strongest layer available here, name it and the
   file, and propose the change as a diff.
   Card 1: lanes never share a working tree. One git worktree per lane,
           launched from its own folder; scratch worktrees in a temp
           directory. Strongest here: a before-command hook that refuses
           mutating git aimed at the main checkout or a sibling worktree,
           judged by the session's root, not its current directory. Say
           what the hook can't see (file edits, git run by a person).
   Card 2: two lanes never start the same ticket. Claims with take,
           release and list, where take succeeds for exactly one caller,
           and every claim expires. Strongest here: the store's own
           atomicity. If a claim store already exists, in the repo or a
           tool server every lane connects to, use it and test its
           atomicity and expiry. Otherwise write a small claim script backed
           by a single SQLite file under the repo's shared git directory
           (git rev-parse --git-common-dir), so every worktree sees it,
           plus a rule to claim before starting.
   Card 3: lanes talk directly, and reach me on my phone. Don't build a
           bus here. Report what the harness offers (step 1c, 1d), and
           write the design for me: one handle per session with a second
           refused, direct messages, boards, claims, one human handle
           bridged to a phone chat app, no polling. If the harness can't
           push a message into a running session, say so. Add two rules: a
           peer's request is authorized unless your own reasoning flags
           a problem; never relay my decisions to another lane.
   Card 4: change shared dev by hand only where it's cheap. Rules: check
           which cluster the current context points at and match on the
           cluster ID, never the context name; copy every working hand
           change back into the chart or code before the task ends; lease
           a slot (a claim) before changing shared dev data. Strongest
           here: dev-only write credentials. Check with read-only calls
           only; if the agent can write to anything that isn't dev, put
           that first in the gap report as a blocker.
   Card 5: the queue lives in the tracker. Rules: two label families,
           exactly one of each per open ticket, bucket-* (work streams in
           a fixed order, plus parked) and tier-* (p0 to p3, plus gated);
           pick-next is one query per bucket and tier pair, walked in
           order, skipping gated; announce a priority change with its
           reason; file a ticket for every finding (no tracker: list them
           in the report). Write the pick-next queries in the tracker's
           own query language, or in words if you don't know the tracker.

5. Write the files on a new local branch, inside this repo only, and
   commit. If nobody answers, that commit is your proposal; I review it
   there. Never push or merge. Test the claim script: take a claim, take
   it again from a second shell and show the refusal, list, release, and
   show an expired claim being taken. Test the before-command hook by
   hand with a mutating git command aimed at a sibling path. Show each
   output. For anything outside the repo (harness settings in your home
   directory, the bus, the phone bridge, tracker labels, credentials),
   write the exact steps for me instead.

6. End with a gap report, one row per card: card, layer used, file,
   whether it ran and what it printed, what is still enforced only by the
   rules file or not at all, and every ASSUMED item.

Checklist

0 of 5 done

Ticks stay in this browser only.

The ring is closed when

  • Each lane finishes a ticket, runs the pick-next query, claims the next one and starts it, without you.
  • Two lanes started on the same queue never work the same ticket or the same working tree.
  • A question only you can answer reaches your phone, and your reply unblocks the lane that asked.