The gate¶
aisignoff has two layers, and keeping them apart is what keeps it stable:
- The record,
aisignoff lintof the default branch. It trusts what has landed, and checks only the hard rules: valid levels, and the names each level needs. Its keys and rules are fixed, and the 1.0 contract freezes them. Nothing a repository configures can make it fail on history it accepted. - The gate, the check before the merge:
lint --declare-fromon a pull request, and the lines and record files a change adds. It decides what may land: which models may write a path, which reviews a path needs, at which levels. Its rules are a repository's and an organisation's to change at any time, and they change nothing that has landed.
So a stricter or looser rule, a new model or a model that slips a tier applies to the next pull request, never to history. A line keeps the levels it was accepted with.
The gate needs [history]: without it, the declarations are static, the gate is off, and the check of a pull request checks the description's built-in rules only.
The rules file¶
The gate reads two files:
- The organisation's default,
aisignoff/gate.tomlin the organisation's.githubrepository: the place where GitHub keeps defaults, like the pull request template. It's read through GitHub's API (withghwhere it's signed in, else withGH_TOKENorGITHUB_TOKEN) when the gate has something to judge; in a workflow, pass the job's token asGH_TOKEN, as the examples do, since GitHub limits unauthenticated reads sharply. A change there applies to every repository at its next pull request. - The repository's own,
.github/aisignoff-gate.toml, as the default branch has it now (its tip, not where the change forked from it): a pull request is checked against the rules it goes into, not the ones it brings, also when they were tightened after it forked.aisignoff initwrites one: with the catch-all rules for**only when the organisation has no default, and else with them as comments, since a rule for**here comes after all of the default's rules and replaces them for every path. Its models replace the organisation's of the same name and version, and its rules come after the organisation's (the last matching rule counts). Withinherit = false, the organisation's default isn't read. Withinherit = "required", it must be readable: GitHub answers 404 also for a file the token may not read, so without"required"a 404 means "no default", and with it the check stops (exit code2).
Together they must have a [[develop]] and a [[review]] rule for path = "**", so that every file has a rule. Without any [[model]] (a repository whose organisation has no default yet), the gate checks only the minimum levels of its rules, and compares model names by their words. Without either file, the gate checks what aisignoff always checked, and compares model names by their words.
version = 1
inherit = true
# The ranking: the model environments that may be used, and their tier
[[model]]
name = "Claude Opus"
vendor = "Anthropic"
version = "6" # 6, 6.1, 6.2.3, ...
tier = { medium = 2, high = 3, max = 3 } # by effort; efforts not listed may not be used
[[model]]
name = "Claude Opus"
vendor = "Anthropic"
version = "5" # degraded when 6 came out
tier = { high = 1, max = 2 }
[[model]]
name = "GPT Sol"
vendor = "OpenAI"
version = "6.2" # 6.2 and 6.2.x only, not 6.1 or 6.3
tier = { medium = 2, high = 2, xhigh = 3 }
# Who may write a path: every model of Assisted-by needs the tier
[[develop]]
path = "**"
min-tier = 0
[[develop]]
path = "src/**"
min-tier = 2
# What a review of a path needs
[[review]]
path = "**"
min-tier = { A1 = 0, A2 = 2, A3 = 2 } # as init writes it: a capable model (A2, A3) is tier 2 or above
tier-diff = 0
[[review]]
path = "src/**"
min-tier = 2 # the reviewer's tier at least
tier-diff = 0 # and at least the writer's highest tier + tier-diff (1: one higher, -1: one lower)
min-human = "H1" # minimum levels
min-ai = "A1"
The ranking¶
One tier number describes a model environment: a model, its version and its tuning. Policies only compare tiers, so they don't need to know vendors' effort scales, which differ and aren't comparable.
name,vendor: as the model is named inAssisted-byandAI-Reviewed-by.version: the digits given are fixed, the ones left out are open."6"is every 6.x,"6.2"is 6.2 and 6.2.x only. The most specific entry that matches counts, and each version has one entry, so a newer model can push an older one down a tier:Claude Opus"6"at tier 2 and"5"at tier 1. An entry withoutversionmatches any version.tier: a number for every effort, or a table by effort in the vendor's words. An effort that isn't listed may not be used at all.default-effort(optional): what a name without an effort counts as, one of the efforts oftier, for example the effort the tool uses unless told otherwise. Without it, the model's smallest tier counts.
The tiers are the organisation's to define: three, four or five levels, whatever separates the models it uses.
Naming a model¶
Assisted-by and AI-Reviewed-by name a model as the ranking does, with its version, the vendor in brackets and the tuning in square brackets. How it reviewed, and a report, come after a comma in AI-Reviewed-by; in Assisted-by, commas separate models, and the gate judges each of them as a writer:
Assisted-by: Claude Opus 6 (Anthropic) [effort=high]
AI-Reviewed-by: GPT Sol 6.2 (OpenAI) [effort=xhigh], new session without the generating conversation, reviews/pull12.md
A writer that the ranking doesn't know (claude-opus-6) is compared with the reviewer by its words, as without a ranking, so that a review by the same model isn't taken for one by another model. In a pull request template, a model box carries the same: - [x] **Claude Opus 6** (Anthropic) [effort=high]. Without an effort, the model's default-effort counts, or else its smallest tier.
The effort is a setting of the tool that runs the model, which an agent can read but not see in its context: Claude Code sets the environment variable CLAUDE_EFFORT for the commands it runs; Codex has it as model_reasoning_effort in its config.toml (in $CODEX_HOME, by default ~/.codex/) or in the -c model_reasoning_effort=... it was started with; AISIGNOFF_EFFORT is the variable a workflow or a person sets for any tool. aisignoff pr-body --model "Claude Opus 6" prints the template with that model's box ticked and its effort filled in, from --effort, AISIGNOFF_EFFORT or CLAUDE_EFFORT, so an agent edits no Markdown by hand. The guides tell agents where to look. A model the ranking doesn't have, or an effort it doesn't allow, fails the gate.
aisignoff template writes aisignoff's pull request template with one box per model of the ranking, for the organisation's .github repository: aisignoff template --out .github/PULL_REQUEST_TEMPLATE.md.
The rules¶
Rules have a path, a glob or a list of globs as in SIGNOFF.toml's annotations, and the last rule that matches a file counts.
[[develop]]: every model ofAssisted-byof the lines of the path (G1–G3) must reachmin-tier.[[review]]: an AI review of A1–A3 needs a reviewer of at leastmin-tier, and of at least the highest tier among the models that wrote the content plustier-diff; for A2 and A3, one and the same reviewer must be both of that tier and another model than the writers. Both are a number, or a table by review level ({ A1 = 0, A2 = 2, A3 = 2 }, a level not given needs 0). This is what "a capable model" of A2 and A3 means for the path: aisignoff has no tiers of its own built in. An A2 or A3 also needs a reviewer that is another model of the ranking than the writers (another version of the same model doesn't count).min-humanandmin-aiare the minimum levels of the path.- The pull request's description as a whole is checked with the rules for
**, and each line with the rule of its file. A file underprecedence = "override", which isn't resolved line by line, is checked with its path's rules against the description. An annotation that a pull request adds, edits, deletes or reorders is checked by the files it hands a new declaration (deleting one hands its files to another). A[[commits]]entry that a pull request adds is checked on the axes it sets: correcting a commit's human review doesn't judge its writers, which are history. - A review pull request records reviews of lines that have landed: the gate judges only the review (the reviewer's name and tier). The writers and the human review of those lines are history; a writer that the ranking knows still sets the tier the reviewer needs.
What the gate checks, and when¶
The gate judges declarations that are about to land:
- a pull request's description (
lint --declare-from), and the lines it adds; - the record files a review pull request adds;
- what
annotate,attestandcorrectare about to write. They read the rules as the work tree has them, and go on with a note when the organisation's default can't be read; the check before the merge is the binding one.
It also applies the checks that judge words: a self-check is no AI review, and without a ranking, model names are compared by their words. Everything else is the record's: once a change has landed, lint checks it by the hard rules only, and never with the gate's rules.
The agents' guides (aisignoff guide --role dev and --role review) list the gate's models, tiers and rules, so that an agent names itself as the gate expects.