One worktree per task
Each task has its git worktree, its branch, its lot document and its cmux tab. The main checkout never receives a commit: run as many tasks in parallel as you need.
Run by the agent lab new <project> <task>
Treelab / Features
You say what you want built; the agent runs the lab commands itself, and a hook reads each one before it goes. The terminals on this page show real lab output on demonstration projects written in English; the CLI messages are quoted as they are.
The commands the agent runs for you, in the order the method calls them.
Commands appear one after another; a click or a key shows everything and stops the playback. Nothing moves if your system reduces motion.
Step 1
lab help groups the commands by moment: install, start, move forward, finish. The agent uses them; you have nothing to remember.
Real lab output · demonstration projects
lab helplab — from need to delivery, one lane at a time2. Start lab new <lane> — open a lane for a new need3. Move forward lab next <project> <lane> — move to the lane's next step lab plan — see the lanes and their progress4. Finish lab acceptance <project> <lane> --accept — record your agreement after the trialStep 2
You describe a task; the agent runs lab new, which creates the worktree, its branch and the first lot document. lab launch rebuilds the objective from the document, nothing to type.
Real lab output · demonstration projects
lab new project-1 feature-1 --title 'Add a search box' --agent claudePROJECT=project-1LANE=feature-1BRANCH=feat/feature-1BASE=origin/mainAGENT=claudelab: Next batches: unknown — planning will set them.lab launch project-1 feature-1PROJECT=project-1LANE=feature-1AGENT=claudeSYNC=up-to-datePROMPT_BYTES=566Step 3
The agent follows each worktree with lab status, resumes the current lot from its handoff with lab next, and lab plan shows it the progress of all of them.
Real lab output · demonstration projects
lab status project-2SLUG=feature-4BRANCH=feat/admin-overridesBATCH=lot-03-admin-overridesBATCH_STATE=in progressLANE_PHASE=workLAST_BATCH=yeslab next project-2 feature-4lab: Last planned batch — a check together will follow.lab plan project-1lab: 3 lanesLane Presence Done/total Current batchfeature-1 alive 1/2 lot-02-search-results-page · Search…feature-2 alive 0/1 lot-01-feature-2 · Export orders as…feature-3 alive 1/1 —Step 4
After the last lot, the agent opens the trial: you try the result, it records your approval with lab acceptance, then lab close delivers and removes the worktree after your confirmation.
Real lab output · demonstration projects
lab next project-1 feature-3LANE_PHASE=in acceptancelab: Work finished — to try together. The lane feature-3 stays open.lab acceptance project-1 feature-3 --accept --evidence 'dark mode tried on every page'ACCEPTANCE=validPUSH=ok| Feature | Command run by the agent | What it prevents |
|---|---|---|
| One worktree per task | lab new <project> <task> | Two tasks stepping on each other in one branch. |
| One objective per lot | lab next <project> <task> | An agent guessing what you meant. |
| Resume without explaining again | lab next <project> <task> | A fresh session starting from scratch. |
| See where each worktree stands | lab plan · lab status | Hunting from tab to tab for what is done. |
| Destructive operations refused by default | hook before each command | A reset, a forced push or an rm that erases work. |
| Nothing merges without evidence | lab merge <project> <task> | A “done” with no test and no trial. |
| Try before delivering | lab acceptance … --accept · lab close | A delivery nobody tried. |
| Claude Code or Codex, per worktree | lab new … --agent codex | Changing tools means changing methods. |
| Release notes and updates | lab update · lab update --rollback | An update with no way back. |
| Diagnose before sharing | lab doctor · lab doctor --report | A support request asking for screenshot after screenshot. |
The vocabulary, term by term, in the glossary
Each task has its git worktree, its branch, its lot document and its cmux tab. The main checkout never receives a commit: run as many tasks in parallel as you need.
Run by the agent lab new <project> <task>
The task is split into lots, each with measurable completion criteria. lab launch rebuilds the /goal from the lot document: what to deliver and how to prove it.
Run by the agent lab next <project> <task>
Before its context grows heavy, the agent writes the handoff: where it stands, what remains. lab next opens the next session in the same tab, from there.
Run by the agent lab next <project> <task>
lab plan recomputes the progress of each worktree when displayed; lab status details branch, lot, session and PR. Both also exist as --json.
Run by the agent lab plan · lab status
A hook reads each command before the agent runs it. Whatever erases work is refused with the safe alternative, and the agent carries on that way. It is a closed list of common operations, not a sandbox: your agent’s permissions remain yours.
Run by the agent hook before each command
A lot closes after your repository’s checks, a review by an agent that did not write the code and a real check of the screens. lab merge checks the report and CI before delivering.
Run by the agent lab merge <project> <task>
After the last lot, you try the result. lab acceptance records your approval, tied to the revision you tried; lab close delivers then removes the worktree, only after your explicit confirmation.
Run by the agent lab acceptance … --accept · lab close
Same skills, same hooks, same review agents for both. Each worktree keeps its agent and lab next relaunches it. Codex asks you to approve the hooks once through /hooks. Claude Code and Codex are named with no affiliation.
Run by the agent lab new … --agent codex
lab update installs the latest version and keeps the previous one; --rollback returns to it. Each version’s changes are published on this site.
Run by the agent lab update · lab update --rollback
lab doctor checks the installation and says what to fix. --report prepares an anonymised diagnostic without sending anything: you choose to share it.
Run by the agent lab doctor · lab doctor --report
One command in Terminal to buy and install.
curl -fsS https://treelab.sh/install | /bin/bashTreelab is an independent product, with no affiliation to OpenAI, Anthropic or cmux.