Docs

The Vinaya process

Executing

One Issue goes in; one pull request ready for the Principal's merge comes out, or a pause that names who must act. This stage covers the loop, batches, hot mode, the Operator, pauses and parent branches.

The loop
Batches
Hot mode
Two reviewers

About Executing

Executing is the second stage of the Vinaya process. One Issue goes in. One pull request the Principal can merge comes out, or a pause that says why and who must act. See Overview for where it sits in the whole process.

Executing has three modes. They all run on the same Issue object, and any Issue kind (planned, backlog or hot) can take any mode. Every pull request lands on its Issue's parent branch.

ModeWho codesRoundsGates and review
The loopA Developer agent in a sandbox, through controller-run toolsUntil ready, or a pauseEvery gate; two reviewers each round; the controller decides
BatchThe loop over many Issues; the controller picks the next within capacityPer IssueSame as the loop
Hot modeThe Principal and an agent, live, editing directlyNoneEvery gate at commit and push; two reviewers once, on demand; review again after a push

How it works

Some promises hold in every mode:

  • The brief freezes at dispatch. A change is a new Intent version with a reason, never an edit.
  • Named documentation is delivered. Documentation the brief names reaches the Developer, and the Developer cites it in its result.
  • Two independent reviewers. Code and Security are both required. They run in parallel, each in a fresh session. A missing or malformed review counts as no review.
  • The Developer publishes only through the controller's tools. In hot mode the Principal publishes; the gates are the same.
  • A pause names who acts.
  • Ready for merge is terminal. Merge is the Principal's.

In the loop, a run goes like this:

  1. 1

    Prepare the run

    Fast-forward the checkout, check dispatch readiness, then freeze and pin the brief.

  2. 2

    Prepare required sources

    The controller builds a manifest of the documentation the brief names, with a receipt for each delivery.

  3. 3

    Dispatch the Developer

    Round 1 gets a full context packet; later rounds get a delta packet.

  4. 4

    Publish through the controller's tools

    The Developer commits and pushes through the tools. Ring 0 runs at commit and push.

  5. 5

    Accept the Developer's result

    The controller accepts a typed turn result from the Developer.

  6. 6

    Read the mechanical gate

    CI on the current head, mergeability, and a re-check of the premises. From round 2, the confidence rule applies.

  7. 7

    Review

    Fresh Code and Security reviewers judge the pull request on one review-input manifest.

  8. 8

    Assess the round

    The controller decides: revise sends current findings to the same Developer session; pause is retried by the controller itself, repaired by the Operator, corrected by the Planner, or ruled on by the Principal; publish posts the verdicts and the pull request is ready for the Principal's merge.

You start a run in one of three ways:

vinaya task run <tranche> <n>
vinaya task run --issue <n>

To walk through a run end to end, follow a guide: Deploy backlog issues, Deploy medium work, or Deploy hot issue now for hot mode.

Who takes part

RoleIn ExecutingHuman or agent
DeveloperExecutes one frozen brief in a sandbox through the controller's seven tools. Never holds a forge credential; never pushes, merges or rules.Agent; one session resumed across rounds
Reviewer (Code)Judges the pull request against its brief and objectivesAgent; fresh each round
SecurityJudges secrets, unsafe configuration and exposed surfacesAgent; fresh each round
OperatorStarts, watches, resumes and cancels tasks through six task tools; presents pauses. Never plans, codes, rules, approves or merges.Agent
PrincipalRules on pauses, merges, enters hot modePerson
Execution PlannerProposes a versioned plan correction when a running task proves its plan wrong (planned, with batches)Agent
PlannerReceives missing_source pauses and pre-pull-request widen_surface requests, and supersedes the briefAgent

The controller (also called the driver) is not a role. It is harness machinery: it spawns every agent, holds the forge login, and derives every decision through one pure decision function. See Roles.

The parts of Executing

Where the gates run

Each step of a loop run meets these gates. See Gates for every check.

StepWhat runsRing
Prepare the rundispatch-readiness and a recompute of the facts; the brief is frozen and pinned1
Developer worksThe Developer publishes only through the controller's tools—
Commit and pushThe commit checks (brief-shape, pr-report-density, doc-coverage, exec-bits, changeset-coverage, main-branch-refusal and the rest), then the push checks (coherence, branch-topology, first-push-dispatch, quoted-command and the rest). A refusal returns to the Developer in the same session.0
Pull request opened or updatedcloses-n, surface-scope, test-plan, evidence-fresh, body-bare-digits, plus every Ring 0 check again1
Mechanical gate readScope, evidence and CI for the current head1
ReviewersCode and Security, fresh, on one immutable review-input manifest—
Assess the roundreview-gate validity; the controller decides1
Before mergeprincipal-test-plan-wait; every required check green on the current head1

The controller also runs gates of its own, outside the 37 checks:

  • the publication preconditions (wrong branch, unexpected base, moved head);
  • the protected-path gate;
  • the credential scan;
  • the enforcement-controls check before every unattended dispatch;
  • the after-turn confinement check;
  • the agent-config security scan (securityScan.command) when a change touches .claude/**, .mcp.json or .agents/**.

In hot mode there is no loop and no controller. Ring 0 runs at the Principal's commit and push, Ring 1 on the pull request, and review runs once on demand. See Hot mode.

Configuration

These keys in vinaya.config.json shape a run. See Vinaya keys.

KeyWhat it setsDefault
reviewPolicy.codeReviewThresholdThe severity at which code review blocksMAJOR
reviewPolicy.securityThresholdThe severity at which security review blocksHIGH
reviewPolicy.maxRoundsRevision rounds before a Principal ruling3
reviewPolicy.maxTaskMinutesActive working-time budget; 0 turns it off180 (Vinaya's own repository sets 600)
dispatch.agentWhich runtime plays the roles (claude, codex) when --agent is absent—
dispatch.timeoutMsWall-time ceiling for a Developer dispatchFour hours
dispatch.reviewerTimeoutMsCeiling for each reviewer dispatchTwenty minutes
runtimeDirWhere the controller keeps its files. Absolute, outside the repository, repo-local only.~/.vinaya/runtime/<owner>-<repo>
securityScanThe agent-config scan the controller runs—

The rule that pauses on a finding open for two rounds is fixed, not a setting.

What gets logged

StepEvents
Loop lifecycledev_review_loop · loop_started, round_started, round_ended, paused, resumed, cancelled, stop_condition_met, journal_finalized
Liveness, for Mission Controldev_review_loop · driver_heartbeat (at most every five minutes), driver_exited
Developer and reviewer turnsdispatch · dispatched, outcome_received or dispatch_failed; role_attempt · attempted; usage · observed
Gate resultsdev_review_loop · gate_result_read; gate · summary and checked
Reviewsdev_review_loop · verdicts_read (with a findings array), findings_compared
Pauseshandoff · raised and resolved
Recovered hiccupsdev_review_loop · infrastructure_retry
Writes to the forgeeffect · verified
Operator and broker callsoperation · completed

The Log is fail-open telemetry. It never authorizes or resumes a run: recovery reads the control store and principal-authored forge markers, never a Log event. See Events for every field.

Troubleshooting

What's next