Session workflow · Protocol
Protocol
When two AI tools work on the same project, one builds and one reviews. This page is the playbook: who does what, where the conversation lives on disk, and how to run more than one workstream at the same time.
You can use VibeCompass solo without any of this. Come back when you want a second pair of (AI) eyes on the work.
Roles
What is a lane?
A lane is one workstream: a named slice of work you (and your AI) are focused on right now, like auth-flow or billing-plans. While a lane is open, it has its own small folder under sessions/active/<lane-id>/ holding the in-progress scratch files. When you close the lane, those scratch files get folded into one permanent note and deleted.
You usually have one lane open. You can have more — see “Multiple lanes” below.
Each lane has one builder and (optionally) one reviewer. The builder drives the work; the reviewer runs a separate read-only pass and writes findings back into the lane. The handoff is a file, not a message — so either side can pick up cold.
Builder
The AI that is actually writing code right now. Owns the whole session — opening it, working in it, closing it.
- Opens a lane with
vibecompass start-session --id <lane-id>or picks one that guided init already created. - Says
start sessionto the coding tool so it switches into builder mode, orcontinue sessionwhen a lane is already open — the AI resumes it rather than opening a second one. - Reads the latest session note, any open scratch files, repo instructions, and relevant architecture docs before coding. If the lane has a
brief.md, reads it before planning, then still follows its follow-up reads and opens the docs the task needs. - Keeps
sessions/active/<lane-id>/wip.mdandhandoff.mdup to date and owns the "Current session" marker in CLAUDE.md. - Says
address reviewto read the reviewer's notes, sort each finding (see Answering a review below), and keep going. - Says
close session(orend session) when done, then runsvibecompass close-session --session <lane-id>to finalize and optionally publish.
Reviewer
A second AI that checks the work in a separate pass. Reads only — does not change code. Writes findings back into the lane files for the builder to address.
- Joins by saying
join as reviewer. The reviewer never starts or closes a lane. - Says
review handoffto actually run a review pass against the latest scratch files and any new diffs. - Reads the latest finalized session note, the lane's
wip.mdandhandoff.md, and the relevant diffs before reviewing. - Appends findings into the lane's
wip.mdreview log and refreshes the reviewer half ofhandoff.md. - Stops once
wip.mdandhandoff.mdare updated — there is no separate "exit reviewer" step. - Focuses on bugs, regressions, risk, and missing tests; doesn't restate the whole change.
- Does not touch the "Current session" marker or the finalized note — those belong to the builder.
Open, resume, or choose
start session and continue session begin the same way: your AI lists the open lanes. What happens next depends on what it finds.
- No lane is open
start sessionopens a new one.continue sessionsays there is nothing to resume and offers to start one.- One lane is open, or you're inside a lane's worktree
- Your AI resumes that lane without asking. It opens a second lane only when you clearly ask for separate new work.
- Two or more are open, and you didn't name one
- Your AI doesn't guess. It shows each lane (what it's working on, when it opened, its branch or worktree, and the last line of its log) and asks which one to continue, or whether to open a new one.
- You named a lane
continue session billing-plansresumes that lane. A name that isn't open stops and shows the list.
An open lane is a paused session, not a crash: resuming keeps its date and number. start-session with the id of a lane that is already open refuses and points you to continue-session.
Planning mode (optional)
Say planning mode before risky, unclear, or wide-reaching work, to agree on a plan before anything changes. Your AI reads the same context a builder does and may write the agreed scope, limits, and open questions into the lane’s wip.md.
Until you approve the plan, it doesn’t make broad code changes, record decisions, or finish the session note. If planning settles a real architectural choice, that decision is recorded before the build starts.
Answering a review
When the reviewer is done, say address review. Your AI reads the findings from the lane’s wip.md and handoff.md and treats them as advice, not orders. It sorts each one:
- Accepted
- Fixed as suggested.
- Accepted, with a qualification
- Fixed, but differently or only in part, and the AI says why.
- Deferred
- Real, but for later. It goes into the session note's next steps so it isn't lost.
- Rejected
- The AI pushes back with evidence: what the code does, an earlier decision, or the product plan.
It writes its answers back into the lane files, and the reviewer can take another pass. Close the lane once every finding is fixed or deferred on purpose.
Keeping docs current
Two prompt commands keep your architecture docs in step with the code. Most sessions need only the first.
docs update
During a session, or before you close it
Your AI runs vibecompass docs-update for this lane: a short list of the architecture docs, decisions, and session files this session’s changes affect. It is quick and narrow, with no AI call of its own and no broad review. Close-session prints the same list.
docs review
When the docs need a broad pass
For your first real docs after init, or a catch-up after a lot has changed. Your AI surveys the project, proposes a coverage plan for you to approve, then writes the docs you accept. You can ask for a deeper pass on one feature afterwards. More on docs review.
Files the session uses
Two kinds of files: ones that stick around (repo instructions and finalized notes) and ones that exist only while the lane is open (the scratch files). Here is what each is for.
brief --write: a short pick of the docs, decisions, and notes the lane's task should start from. Removed with the other scratch files when the lane closes, and never synced to the hosted app.Session brief (opt-in)
When you turn the session brief on, each lane gets one more scratch file, brief.md. What a brief is, its limits, and why it’s off by default are on the Concepts page. Here is where it fits in a session and how to read it.
You open or resume a lane
start-sessionwrites the lane'sbrief.mdright after it opens the lane.continue-sessionkeeps a brief that is still current and rebuilds one that is missing or stale. Either way the command prints oneBrief:line, and a brief that fails to build never stops the lane from opening.Your AI reads it before planning
The generated agent instructions tell it to read the brief, when there is one, after the latest session note and the lane's
wip.mdandhandoff.md, and before it plans any work.It keeps reading
A brief is a starting point, not the whole answer, and it says so. A brief that picked anything opens with "Use this brief as a starting point, not the whole context": it shows cut excerpts and can miss the doc that matters most. It then names up to six of the task's words to search for beyond it. Your AI should open the follow-up reads, search for those words, and read the architecture docs and decisions the task actually needs.
It notes what it relied on (optional)
The lane's
wip.mdhas an optional## Context usedsection for the docs and decisions the lane actually used, so you can see later whether the brief pointed the right way.brief.mdis deleted with the other scratch files when the lane closes.
What the status means
The top of every brief says how much it managed to fit. Whatever it says, the follow-up reads still count.
- complete
- Everything the brief picked fit in it.
- partial
- Some lower-priority picks didn't fit. They are listed as follow-up reads.
- incomplete
- Something the brief treats as required didn't fit, or your memory couldn't be read (a mistake in the
brief:settings, for example). The brief opens with "INCOMPLETE — read these before planning" and lists those reads. Read them first. - no-match
- Nothing in your memory matched the task's distinctive words, so the brief holds only the lane's own details. When most of those words are new to your memory but the task's other words match something, the brief lists at most four nearby reads under "Nearby memory (shares task words only)". They share only the task's other words and are never presented as relevant. Either way, the brief names words to search for. A
no-matchdoesn't prove your memory says nothing about the task, so your AI should still look. - stale
- Not one of the statuses above but a separate check:
brief --checkreports it when something the brief was built from has changed since it was written (a doc, decision, or session note, the lane's handoff, or another open lane). Any change to your memory counts, so it happens often.continue-sessionrebuilds a stale brief while the setting is on, or runbrief --write.
Your AI can also ask for a brief over MCP, with the opt-in get_brief tool, as a starting point for a task.
Multiple lanes
Most of the time you have one lane open and that’s plenty. But when two unrelated things are in flight — say, a feature and a bug fix that don’t share files — you can run them as separate lanes so their scratch files don’t collide.
Working in multiple lanes
Each lane is an independent workstream. Only the scratch files (wip.md, handoff.md, session.yaml, plus brief.md when the lane has one) live under sessions/active/<lane-id>/. Decisions and finalized session notes stay global, so a decision allocated in one lane is visible to every other lane immediately.
When to open a second lane
- Two unrelated features that don’t share files, such as auth-flow and billing-plans.
- A long-running review pass on lane A while you keep coding on lane B.
- A planning or design lane that does not touch code yet but needs its own scratchpad.
Declare what each lane owns
The optional --feature, --repo, and --claim flags let the package warn when a sibling lane overlaps on the same feature, repo, or path.
# Lane A: auth surface
vibecompass start-session --id auth-flow \
--working-on "Tighten the GitHub OAuth callback" \
--feature auth --repo app --claim app:src/app/auth
# Lane B: billing surface, no overlap
vibecompass start-session --id billing-plans \
--working-on "Wire Stripe checkout into onboarding" \
--feature billing-plans --repo app --claim app:src/app/billingSee active lanes
Use list-sessions when you need to see every open lane and which one is current before a builder or reviewer resumes.
vibecompass list-sessionsResume an open lane
An open lane is a session you paused, not a crash. Say continue session (or run continue-session) to pick it back up: the lane keeps its date and number, gets a dated “Resumed” line in its log, and the AI is told which files to read next and what changed elsewhere while it was paused. With one open lane nothing else is needed. With two or more, the AI lists them and asks which one you mean instead of guessing.
vibecompass continue-session
vibecompass continue-session billing-plans # when several lanes are openChange the current lane
Only one lane is current at a time. That is the one whose context the AI loads through CLAUDE.md and the rest of the generated agent files. Use switch-session to swap; generated agent files are rewritten from the selected lane’s metadata so the next AI session resumes in the right place. It only moves the pointer — use continue-session when you are actually sitting down to work.
vibecompass switch-session billing-plansWhen you close-session a lane while siblings are still active, the current-lane pointer moves to one of the survivors instead of going blank.
Worktrees and ports
Two lanes that edit the same repo can trip over each other: one lane’s half-finished change shows up in the other’s tests. A worktree gives a lane its own checkout of the repo, on its own branch.
vibecompass start-session --id billing-plans \
--working-on "Wire Stripe checkout into onboarding" \
--branch feature/billing-plans --repo app --worktree- Each repo you name gets its own checkout under
worktrees/<lane-id>/<repo-id>in your workspace, on the lane’s branch. Without--worktree,--branchonly creates the branch (or reuses it) in each repo you name. - A marker file in the lane’s worktree folder ties it to the lane, so commands you run inside need no
--rootor--session. - Every lane, with or without a worktree, gets its own port and temp folder. In a lane’s terminal, run
eval "$(vibecompass lane-env)"before you start a dev server, so two lanes never fight over the same port. More on lane-env. - When the lane closes, close-session removes its worktrees if they are clean. It never forces: a worktree with uncommitted changes, or one still in use, stays, with instructions. Branches are never deleted. Files Git ignores, such as
.env, don’t count as changes and are deleted with a clean worktree, so copy them out first. - Don’t delete a lane’s worktrees by hand. Let close-session do it.
Keep going
In practice: set up the notebook with init, open a builder lane with start-session --id, pick a role with start session or join as reviewer, loop through review handbacks until the work is done, then close the lane once the last finding is resolved or explicitly deferred.