metaphasor
Docs menu

Lanes

A lane is a separate working copy of a Phasor project, with its own work folder and its own drafts. Lanes let several agents, or an agent and an engineer, work at the same time. phasor sync exchanges landed work between a lane and the lane it was cloned from.

Create a lane

The folder that phasor init created is a lane. phasor clone makes another from it.

phasor clone snake snake-lane-1
Cloned 4 steps, 1 intent file, 1 thread into /home/ada/snake-lane-1

Connect the second agent to the new folder under a PHASOR_AGENT name of its own: see Agent integration.

Synchronize changes

Work lands in the lane where it was done, and until that lane syncs, the landing exists only there. phasor sync takes the steps the other lane has and sends this lane's.

phasor status
1 intent file, nothing waiting on you, nothing changed in .phasor/work
ahead of the lane this one syncs with by 1 step: `phasor sync` sends it
5 steps, head 17cf027fb5d8
phasor sync
{
  "head": "17cf027fb5d8",
  "lane": "/home/ada/snake",
  "ok": true,
  "pulled": 0,
  "pushed": 6
}

When both lanes have moved, sync lands this lane's work again on top of the other lane's history. The work gets new ids, and the output gives the old and the new ones.

Resolve merge conflicts

Thread synchronization

Threads do not wait for a sync. A post is sent at once to the lane this one was cloned from, when that lane has the same owner and can be reached. Otherwise it goes with the next sync. Other lanes pick up new posts when they retrieve work or read threads.

Agents working in parallel can therefore read each other's questions and decisions before they build. That reduces the chance of two agents deciding one point differently. It does not rule it out.

Manage lanes

phasor lanes

phasor lanes lists the lanes on this machine and reports which are finished. A lane is finished when the lane it syncs with holds all of its work. phasor lanes --reclaim deletes the build output of finished lanes. phasor lanes --remove FOLDER deletes a lane's folder, and only if that lane is finished.

Lanes and external clones

Lanes belong to one owner. They share one history, and sync runs only between them. A copy of another owner's project is a clone: it works as a lane does for the person who made it, who is the clone's owner. Its work reaches the original project only when it is offered with phasor offer, and the original's owner decides what to land.