Clara Docs
All docs

Gates and review

Guides5 min readEdit on GitHub

On this page

Work reaches done only through review. This page says how work is checked, who may approve it, and what approving does. It covers work done by people and by agents alike.

Checks

The board's checks are commands in checks in config.json, such as npm run lint and npm test. clara init finds the ones your project already runs. Each has a name, a command and a timeout (FORMAT.md).

Trust

The checks come from the repository, and a branch can change them, so Clara runs none of them until a person on this machine has read them and said yes:

Shell
clara trust            # shows every command and asks
clara trust --yes      # for scripts and CI, once you have read them
clara trust --revoke   # stop trusting them here

Trust covers the checks, conductor.setup, router.command, custom agents' commands, webhook targets, and the files some agents read by themselves from the repository, such as .codex/ or opencode.json. It asks again whenever any of them changes. The answer is stored under CLARA_HOME, never in the repository. Only a person can give trust; an agent can read the commands and take trust away, but not give it.

Verify

Shell
clara verify 12

Runs each check, in order, on the commit the checkout is on, and records the results on the ticket. The checkout must have no uncommitted changes outside .clara. The end of a failing check's output is kept, with tokens and the values of secret environment variables hidden. Nothing of a passing one is kept.

Handing in

Shell
clara complete 12 "Links expire after 15 minutes" --pr 41

clara complete records a summary and moves the ticket to in_review. When the board has checks, the newest recorded run must have run every one of them on the commit handed in, and every one must have passed. Otherwise it fails with COMPLETE_UNVERIFIED.

An agent run started by clara start or clara work does this for the agent: the checks run on its last commit, and the ticket is handed in only when they pass. See CONDUCTOR.md.

Who approves: review.mode

Mode Who may approve
human (the default) A person.
agent A person, or an agent that is not the author. With review.reviewer set, only that agent.
gates A person, or the checks: Clara approves by itself once every check passed on the commit handed in.

In every mode the author never approves their own work. The one exception is a person, who may approve their own work, and that approval is recorded as such.

Under gates, Clara approves only when the newest recorded run was on the commit the newest hand-in named, has a result for every check the board has now, and every result passed. A run with no results, or one made before a check was added, approves nothing. Clara's own board uses gates.

Shell
clara config review.mode agent

Looking at work

Shell
clara review 12

Shows what the ticket handed in: the summary, the commit and branch, the checks recorded on that commit with the end of any failing output, the acceptance criteria, the files the branch changes against the base branch, and what reviewers said since. It changes nothing.

The web board's review room shows the same, with the diff, and has buttons to approve, send back or reject.

Deciding

Shell
clara approve 12 "Nice and small"
clara request-changes 12 "Links must not work twice"
clara reject 12 "We are not doing email sign-in after all"
  • Approve moves the ticket to done, then lands the work (below).
  • Request changes sends the ticket back to in_progress with the note. The holder keeps it. For an agent's ticket, clara start 12 carries on with the note.
  • Reject sends the ticket back to todo with no one on it. The run's worktree and the branch Clara made for it are deleted after you say yes; a branch a person named is kept. --keep keeps both, and -y skips the question.

Landing: pull request or merge

What approving does is set by conductor.on_approve:

Value What approving does
pr (the default) Pushes the ticket's branch to origin and opens a pull request with gh, its body made from the ticket.
merge Merges the branch into the base branch in this checkout. The checkout must be on the base branch with nothing uncommitted, and the merge must be clean.
none Lands nothing.

Anything that would stop the landing is found before the approval is recorded. If landing fails part way, the approval stands, and approving again lands it.

What lands is what was judged: the push and the merge name the commit handed in, and a branch that has moved since is refused. The push is never forced. The pull request body is defused, so mentions and closing keywords in ticket text do nothing on GitHub.

An agent's approval is recorded and lands nothing. Only a person lands work.

With pr, the ticket is done once approved, and the pull request is merged on GitHub as usual. Work done outside Clara's review can still close a ticket: GITHUB.md shows how a commit that says closes WEB-12 marks it done when it lands on the base branch.

Landing has been tested against a bare git remote and a fake gh, not yet against GitHub (STATUS.md).

A second opinion

With review.reviewer set to an agent, Clara starts that agent after every hand-in, in a read-only run on the same worktree:

  • In agent mode it approves the work or sends it back with a note.
  • In human mode it sends it back or leaves its opinion as a comment, for a person to decide.

The reviewer never reviews its own agent's work, changes no files, and sends a ticket back at most conductor.max_attempts times before leaving it to a person. A custom agent is never a reviewer. Its approval, like any agent's, lands nothing.

How agents did

clara scorecard shows, per agent and model, the work handed in and finished, the share approved the first time, time from claim to approval, and spend.