The Harness
Reference

The harness, part by part

Vinaya is a series of deterministic checks and workflows that hold agentic and human development to the same discipline — an AI agent and a person answer to the identical rules before anything merges. Each ring below is read at build time from this repo’s own doctrine, not hand-written for this page.

The actors

role

Planner

agent

Turns an intent and a slice of tickets into a whole tranche — the milestone, its tasks, and the dependencies between them.

Read the doctrine
role

Brief Author

agent

Turns one planned task into one executable brief — the context, the boundary, and the definition of done a task needs before it starts.

Read the doctrine
role

Developer

agent

The coding agent that executes a brief — writes the change, opens the pull request, and answers for it.

Read the doctrine
role

Reviewer

agent

Judges an open pull request against the brief it came from, and says plainly whether it satisfies it.

Read the doctrine
role

Security Reviewer

agent

Checks an open pull request for what a correctness review misses — leaked secrets, unsafe configuration, exposed surfaces.

Read the doctrine
role

Archivist

humanagent

Closes out a merged pull request, recording what shipped and the intent it came from.

Read the doctrine
role

Tranche Archivist

humanagent

Closes out a finished tranche, so the next one starts from what is true now rather than what was true before.

Read the doctrine
role

Principal

human

The person accountable for what merges — the one seat holding authority the mechanism never grants an agent.

Read the doctrine

What actors do

contract

Planner → Brief Author

Carries a tranche’s plan down to a single task’s brief, so a task keeps the reasoning that shaped it.

Read the doctrine
contract

Brief Author → Developer

Carries a brief to the agent that executes it, so nothing the author knew is left implicit.

Read the doctrine
contract

Developer → Reviewer

Carries finished work to its reviewer already accounted for, so review spends itself on judgement rather than on basics.

Read the doctrine
contract

Reviewer → Archivist

Carries a review’s actual findings into the permanent record, so a verdict says what was checked, not just that it passed.

Read the doctrine
contract

Archivist → Tranche Archivist

Carries each task’s close-out record up to the tranche close-out, so a phase can only be called finished once its parts genuinely are.

Read the doctrine
contract

Tranche Archivist → Planner

Carries a finished tranche’s real outcome to the planning of the next, so no plan is built on a product that no longer exists.

Read the doctrine

Hooks

ring 0

Editing a governed file

hook

Refuses an edit to a governed file until the document that governs it has been read in this session.

Read the doctrine
ring 0

git commit

hook

Refuses a commit that does not build or pass its own checks, before the broken state exists at all.

Read the doctrine
ring 0

git push

hook

Refuses a push that would land straight on main, on the machine that attempted it.

Guards: publish the branch

Read the doctrine
ring 0

Creating a pull request, or editing its title/description

event

Refuses to open or edit a pull request until it carries everything a reviewer needs to judge it.

Guards: open a pull request, revise a pull request, grant a waiver

Read the doctrine
ring 0

Creating a task Issue, or editing its title/description

event

Refuses to open or edit a task Issue until it carries the full reasoning behind the task.

Guards: create a task issue

Read the doctrine
ring 0

Writing to pull requests or Issues through the raw API

event

Refuses raw API writes to pull requests and Issues, so nothing can edit them behind the gates.

Guards: open a pull request, revise a pull request, grant a waiver

Read the doctrine
ring 0

Merging

event

Refuses a merge while anything the gates check is still failing.

Read the doctrine
ring 0

Starting the Dig

hook

Refuses to start work until every precondition for the task is checked live and found clear.

Read the doctrine
ring 0

Opening a task PR whose surface includes real code

event

Refuses a code-carrying pull request whose description no longer matches what it changes.

Read the doctrine
ring 0

Opening a task PR

event

Runs the whole exit check before a pull request is created, so failures surface first.

Read the doctrine
ring 0

Spawning a check

hook

Governs which environment variables a spawned check's child process can see, instead of every check inheriting the full parent environment unconditionally.

Read the doctrine
ring 0

vinaya check

event

Resolves core-registered and config-registered checks into one deterministic table before anything runs, instead of letting a config entry run alongside the core check it collides with, unannounced.

Read the doctrine

The actions

action

publish the branch

reaches github

Pushing local commits up to GitHub, where the rest of the mechanism can finally see them.

Read the doctrine
action

create a task issue

reaches github

Opening the Issue that a task exists as — its scope, its reasoning and its dependencies, written down before anyone starts.

Read the doctrine
action

open a pull request

reaches github

Proposing finished work for review, carrying the account of what changed and which intent it came from.

Read the doctrine
action

revise a pull request

reaches github

Editing a pull request after it exists — its code, its title or its description, whether or not review already happened.

Read the doctrine
action

grant a waiver

reaches github

Deliberately excusing a rule for one case — an authority the mechanism grants to a person, never to an agent.

Read the doctrine
action

commit the work

stays local

Recording a change locally — the last moment it costs nothing to catch a mistake.

Read the doctrine
action

author the brief

stays local

Turning one intent into instructions someone can execute: what to build, what is out of scope, and what done means.

Read the doctrine
action

produce the verdict

stays local

Judging finished work against the brief it came from, and saying plainly whether it passes.

Read the doctrine
action

post the provenance comment

stays local

Writing the permanent record of a merged task — what shipped, from what intent, checked by whom.

Read the doctrine
action

write the retrospective

stays local

Closing out a finished phase of work by recording what actually happened and what it taught.

Read the doctrine

Branch Rules

ring 1

Brief validation

ci

Re-checks in CI that a pull request’s title and brief sections are properly formed.

Read the doctrine
ring 1

Closes linkage

ci

Re-checks that a pull request names the Issue it closes.

Read the doctrine
ring 1

Single-plan-PR guard

ci

Re-checks that no two open pull requests are planning the same work at once.

Read the doctrine
ring 1

Coherence check

ci

Re-checks every task’s recorded state against what actually merged.

Read the doctrine
ring 1

Documentation gate

ci

Re-checks that a change carrying real code also updates the docs explaining it.

Read the doctrine
ring 1

Test-plan state

ci

Re-checks that the pull request’s test plan is genuinely ticked.

Read the doctrine
ring 1

Typecheck + unit tests

ci

Re-runs the type checker and the unit tests for every package this change can reach.

Read the doctrine
ring 1

Conventions

ci

Re-checks formatting and naming against the repo’s own conventions.

Read the doctrine
ring 1

AI review

ci

Puts an automated reviewer on every pull request, whatever the hour.

Read the doctrine
ring 1

Review gate

ci

Holds the merge until the required review verdicts actually exist.

Read the doctrine
ring 1

Implementation exists

ci

Re-checks that every gate the doctrine describes has real code behind it.

Read the doctrine
ring 1

No orphan hook/CLI

ci

Re-checks that every hook and CLI in the repo is one the doctrine claims.

Read the doctrine
ring 1

No seventh way into GitHub

ci

Re-checks that no route into GitHub exists beyond the ones the doctrine gates.

Read the doctrine
ring 1

Cited forge numbers resolve

ci

Re-checks that every Issue and PR number cited in the docs resolves to a real one.

Read the doctrine
ring 1

Role/contract integrity

ci

Re-checks that every role and contract the doctrine references is really defined.

Read the doctrine
ring 1

reader-resolvable-prose

ci

Re-checks that reader-facing doctrine and site pages don't cite a forge number/tranche slug the reader can't resolve, or use coined vocabulary without defining it.

Read the doctrine

Audits

ring 2

Post-merge archivist

event

Records what each merged task shipped, from what intent, and checked by whom.

Read the doctrine
ring 2

Coherence oracle, full sweep

event

Sweeps the whole forge for drift, including work old enough that nobody is watching it.

Read the doctrine
ring 2

Docs coherence gate

event

Checks that every link and reference in the docs still points at something real.

Read the doctrine
ring 2

Staleness audits

event

Flags documentation that has fallen behind the decisions it is meant to follow.

Read the doctrine
ring 2

Direct-main-push detection

event

Catches pushes that reached main anyway, including from writers the hooks cannot reach.

Read the doctrine
ring 2

Dead-branch-push audit

event

Catches commits still landing on a branch whose pull request already resolved.

Read the doctrine