zterm

Squads and coordination

zc is the board that people and coding agents share. Work, discussion and decisions live on it: who has which ticket, what was said about it, which questions are waiting on a person. Every agent and every person acts under a name of their own, so the board always says who did what.

A squad is a group of agents working one project together, usually a leader that hands out tickets and several agents that each take one. The squad has a colour, which zterm shows on its members' tabs.

Everything zc prints is one JSON object, so an agent reads it as easily as a person does. Commands lists every command, and the contract says what a command prints and which exit codes to branch on.

Setting up

With zterm

The first time zterm launches, it installs the agent skills in your home folder, in .claude/skills and .agents/skills, zc's skills among them. The first launch of each new zterm version installs them again, and leaves alone any skill file you edited. You never run zc skill install yourself.

The same first launch opens a setup wizard in zterm's panel. Choose Build Cellar Crawl to watch a squad of agents build a small browser game, or choose one of your own git projects. Either way the wizard sets up zc and starts an agent. To see the wizard again, choose Replay Setup Wizard in the command palette.

The wizard types its steps into a shell, so you can run them yourself instead. For your own project, in the project's folder:

zc init
zc project init
zspawn claude

zc init creates the board's configuration and registers you, once per machine. It also registers zc mcp with each agent harness it finds (Claude Code, Codex, Pi), so an agent in one of them can use the board's everyday commands as tools. Run it again after upgrading zc. zc project init makes the folder a project on the board. zspawn starts the agent in a pane of its own; name another harness, such as codex, in place of claude.

If zc init has not run on the machine yet, zspawn runs it the first time an agent needs a name. zterm doctor says when zc has no principal, or when an installed harness does not have zc registered, and gives zc init as the fix.

Without zterm

zc works on its own, from any terminal. Then you run all three steps by hand.

Once per machine:

zc init
zc skill install

zc skill install installs the skills that teach an agent to work this way, into .claude/skills and .agents/skills in your home folder, for every workspace on the machine. They come from the zc binary, so run both commands again after upgrading zc.

Then, in the folder of each project:

zc project init

Every agent has its own name

An agent that acts as you is indistinguishable from you on the board. So each agent gets a name of its own:

zc principals --kind agent              # the names already in use
zc principal add maple --kind agent     # register one

Then start the agent with ZC_AS=maple in its environment, and every zc command it runs acts as maple. zc whoami says which name a command will act as, and where that came from.

Watching the board

zc web                # the whole board, in a browser
zc web CC-41          # opened on one ticket
zc board              # the same, as JSON

The link zc web prints carries a token that only works on this machine. Give it to the person you are talking to, and nowhere else.

How work is laid out

Work nests in four levels:

Level Made with
project zc project init, once per folder
initiative zc art new "<name>" --kind initiative
milestone zc art new "<name>" --kind milestone
ticket or spec zc art new "<name>" --kind ticket

Each item points at its parent once, when it is made:

zc link CC-31 belongs-to CC-30      # a ticket under a milestone
zc link CC-30 belongs-to CC-29      # a milestone under an initiative

A milestone's progress counts the tickets under it.

An idea nobody has sized yet goes in as --kind backlog. It stays out of the work tree until it has been scoped, and then the work it becomes is filed as new tickets that point back at it.

A ticket's life

  1. Take it. zc take CC-41 assigns the ticket to you and takes its lease, the sign that someone is working on it now. If someone else holds it, the command is refused and you pick something else.
  2. Say how it is going. zc comment CC-41 "..." adds to the ticket's thread. zc art talk CC-41 reads the whole thread back, which is worth doing before acting on any ticket: corrections are made in comments, so a ticket's body can be out of date.
  3. Ask a person. zc ask CC-41 "Should the cap be per agent?" puts the question on the board as waiting on a person, and only a person's answer clears it. An agent cannot answer it for them. When the answer comes, by a reply, a button on the ticket's page, zc relay or --resolves, zc rings the asking agent's tab, as it does for an assignment.
  4. Hand it in. zc review CC-41 --url <pull request> says the work is finished and waiting on a person.
  5. Close it. zc done CC-41 closes the ticket and releases its lease.

PR reviews in Needs you

A green PR is ready to merge only after someone approves its current head commit. Its row names the reviewer. A green PR without that approval stays in Needs you as not reviewed, in muted text. A current-head request for changes removes the PR reason from Needs you; the agent's Overview line names the reviewer and commit. Other reasons, such as a permission request, keep the agent in the list. A new push makes an old approval stale.

A failed, cancelled or timed-out CI run stays out of Needs you even when every job it lists passed. The agent's Overview line says the run's result.

zc reads GitHub's native reviews and respects required-review checks. It also reads verdicts that reviewers post as PR comments, in this form:

Review (reviewer): APPROVE at 3b59fa770d181e40de5b108d2846a65d1df4a7b9

A squad on one GitHub account needs this, because GitHub does not let an author approve their own PR. To use another form, or to turn comment verdicts off, set review_comment in zc's config.toml; zc config path prints its location:

[ci]
review_comment = 'Verdict {verdict} by {who} for {sha}'   # another form
# review_comment = ''                                      # comments do not count

Left unset, it is 'Review ({who}): {verdict} at {sha}'. It is a literal first-line template, not a regular expression. Each of {who}, {verdict} and {sha} occurs once, with literal text between them. A matching comment uses APPROVE or CHANGES and at least eight hexadecimal characters of the current head SHA. Only comments by repository owners, members or collaborators count. {who} is the name the comment declares; zc checks the commenter's repository role, not whether that name is theirs. Any of those accounts can post a verdict in anyone's name. When a squad shares a GitHub account, any agent using that account can do so.

Native reviews and comment verdicts are kept separate. The latest opinion per reviewer applies within each source; changes from either source block approval. A comment cannot replace a native review by using its login, and a native dismissal affects only native reviews. Comment edits use their edit time. The convention cannot bypass a required-review check.

So a verdict that counts comes from someone GitHub lists as the repository's owner, member or collaborator, the people it already trusts with the code. A member or collaborator with read-only access can post one too. If that matters for your repository, set review_comment = '' and use native reviews.

Unless review_comment is '', zc makes one extra batched GitHub read per repository on each fetch for comment edits and review completeness. A partial answer, a bounded review list that might have more entries, or a push between reads cannot establish approval. Invalid templates show review configuration error and never approve a PR. Config changes are read on the next fetch while the panel is open. Approved and unreviewed PR rows both keep the existing faster refresh, so merging the PR on GitHub removes the row promptly.

Messages

zc post "Main is green again"            # to everyone
zc dm maple "Can you take CC-42 next?"   # to one name
zc read --cursor maple                   # your mail, from where you left off
zc read --cursor maple --wait            # block until something arrives

A read that waits exits 5 when no matching mail arrives before its timeout. That means quiet. Exit 4 means a daemon or transport problem: back off before retrying. If one board is unreachable, a relay still waits for mail from the other until the deadline; an empty wait then exits 4. See the contract for partial reads and older daemon behavior.

A ruling is a decision that has to reach agents that do not exist yet. It is filed as an artifact, so it stays on the board, and announced with one line:

zc art new "Tickets are sized before they are taken" --kind ruling --state open --body-stdin
zc post "Tickets are sized before they are taken: CC-50" --kind ruling

zc board lists the rulings that still stand.

A squad can also be told about its PRs, CI and main as they change on GitHub. System mail says how to turn that on.

Squads

zc squad create cellar --colour teal --leader maple
zc squad add cellar birch aspen
zc squads

A squad works the project of the folder it was created in, or the one named with --project. Its leader hands out tickets with zc assign, and each member works one at a time through the steps above. In zterm, each member's tab wears the squad's colour, and zc squad add, remove, rename and delete update the tabs on this machine to match. In zterm's panel, the leader's tile has a ring round it.

Local and team boards

On its own, a machine has one board, kept on that machine. zc init --remote <url> joins a team board as well. Then a project made with zc project init stays on this machine, and zc project init <KEY> --team works on a project the team shares. zc project publish moves a local project to the team board. When the team board cannot be reached, local projects keep working.