$ cat node-template.py
W
Worktree
// A lane's folder: its own git worktree of a GitHub repository, on its own branch, kept in the workspace between runs. Wire a Repository (and the Working branch it should start from) into it; it creates the folder the first time and brings it up to date with GitHub every time after. Every Code agent of the lane works in this folder. Set Mode to archive after the lane's pull request merges to remove the folder — it is kept if anything in it would be lost.
Process
Utility
#code#github#worktree#branch#lane
template.py
1"""Worktree — a lane's folder (vibe-coding Lane split).23**This file does not run.** It is here because a marketplace template must4carry `code`, and because the schema-coverage linter checks that every port a5template declares is named somewhere in it. The work happens in the6`coding-agent` runtime's image, whose adapter7(`apps/workspace-executor-coding-agent/adapter/worktree.mjs`) reads the same8stdin envelope this file would have received and ignores `code` entirely.910## What the node does with the ports below1112 inputs.repo, inputs.base where a NEW lane's branch starts (GitHub head)13 inputs.branch the branch the lane owns (default vibe/<label>)14 inputs.decisions answers to "the folder and GitHub both moved"15 inputs.mode open (default) | archive16 inputs.task the Task this lane attempts (board grouping only)1718 open: take the lane's lock, check the disk, fetch, create or reopen the19 worktree in the workspace code volume, bring it level with20 GitHub, install dependencies21 archive: remove the folder, unless it holds work GitHub does not have2223 outputs.folder {path, branch, head_sha, repo} for the Code agents24 outputs.branch, head_sha, archived, log25 outputs.outcome, reason only when the run stopped (waiting | failed)2627## Editing this file does nothing2829Changing the body below changes the node's `code_hash` and nothing else.30"""3132WORKTREE_INPUTS = ("repo", "base", "branch", "decisions", "mode", "task")33WORKTREE_OUTPUTS = ("folder", "branch", "head_sha", "archived", "outcome", "reason", "log")3435ADAPTER_ENTRYPOINT = "/executor/adapter/main.mjs"3637raise RuntimeError(38 "The Worktree template is executed by the coding-agent runtime's adapter "39 f"({ADAPTER_ENTRYPOINT}), not by this code. Reaching this line means the "40 "node ran in a template runtime — check that TEMPLATE_META.runtime is "41 "'coding-agent' and that this template's id is on "42 "PRIVILEGED_RUNTIME_TEMPLATE_IDS in "43 "apps/workspace-service/app/executors/runtime_table.py."44)45$ git log --oneline
v1.0.0
HEAD
2026-10-14First marketplace publish: vibe-coding lanes and the gstack plan flow (PR #1313).