Skip to content
Edit this page

The 1.0 contract

Draft

This is the draft of what aisignoff 1.0.0 will promise. It is not in force yet: aisignoff is still at 0.x, and 0.x releases may still break any of it (Compatibility). The decisions are listed at the end.

This page says exactly what every 1.x release keeps: what a repository, a workflow or a script can rely on when it raises its pin from 1.x to a later 1.y. Compatibility is the short version for readers; where the two differ, this page counts.

The record and the gate. This page freezes the record: lint of what has landed, with its fixed keys and hard rules, and the results that depend only on history. The gate, the check before the merge with the rules a repository and its organisation configure (the ranking of models, the rules by path), is covered here only as far as its commands and options go, and its file format by its version: its rules may be extended in any release, since they never apply to what has landed.

The words must, must not, may and will are used as in RFC 2119: "aisignoff will" is a promise of every 1.x release, "a repository must" is a condition for that promise.

1. Versions

  1. Semantic versioning. From 1.0.0, aisignoff follows semantic versioning 2.0.0. A minor release (1.1.0) may add, a patch release (1.0.1) only fixes. Anything this page calls stable changes only in a major release (2.0.0).
  2. A breaking change is any change that makes a repository, a workflow or a script that followed this page fail, pass or report differently, except the changes listed under Not covered and fixes.
  3. Deprecation. Before 2.0 removes or changes something stable, a 1.x release must deprecate it: the docs and the changelog say so, and where aisignoff can see the use, it warns. A deprecated feature keeps working until 2.0.
  4. The changelog (docs/changelog.md) names every change in one of these sections: Breaking (major releases only), Levels (a fix that changes the levels of existing lines, see below), Deprecated, Added, Fixed, Changed (for what this page doesn't cover).
  5. Pins. A workflow pins an exact version (aisignoff==1.2.3), and raises it on purpose. aisignoff never changes a result because a newer release exists.
  6. Release candidates. No release candidate of 1.0.0 will be published (the yanked 1.0.0rc1 to 1.0.0rc10 stay yanked); 1.0.0 follows the last 0.x release directly.

2. What a result depends on

A result is the levels, names and findings of each file and line, the problems lint reports, and the --json and badge output.

  1. Inputs. A result depends only on:
    • the files of the working tree that git doesn't ignore, and their content, as git sees them (a file the index marks assume-unchanged or skip-worktree counts as unchanged);
    • SIGNOFF.toml and the record files of the review folder;
    • the commits, trees and blobs of the repository, and which commit the default branch is at (default-branch);
    • the options of the command, and the environment variables of section 8;
    • the description given with --declare-from.
  2. Not inputs. It doesn't depend on the user's or the system's git configuration, on git replace refs, on .gitattributes diff drivers, text conversion or filters, on the blame cache, on the time, the locale, the number of processors, or the order in which the file system lists files. git runs without the user's and the system's configuration (GIT_CONFIG_GLOBAL, GIT_CONFIG_NOSYSTEM, and none from the environment), so only the repository's own configuration counts; aisignoff pins diff.indentHeuristic, diff.interHunkContext, diff.renameLimit and i18n.logOutputEncoding over it, clears blame.ignoreRevsFile, turns grafts off, runs git blame with --no-textconv, sets GIT_NO_REPLACE_OBJECTS=1 and leaves GIT_DIFF_OPTS out of git's environment. The user's safe.directory is passed on. Its output is UTF-8 whatever the locale, with a name or message in another encoding written as an escape. Content that isn't committed yet is read as git would store it, so through the clean filters git applies; a commit's content isn't.
  3. git. aisignoff needs git 2.34 or later (Ubuntu 22.04's) to read history, and it reads history only through git (D5). Wherever it reads history (with [history]: lint, report, badge, gc; and diff), it checks git's version first and stops with exit code 2 below it. Commands that don't read history, such as file-level lint or attest, run with any git.
  4. Same input, same result. Two runs with the same inputs and the same git version give the same result, whatever the machine. The cache changes only how long a run takes.
  5. git versions. git's line diff can change between git releases, and then so can the owner of a line next to an edit. A change of git version is not a change of aisignoff; pin git in CI if that matters to you (a container image does). The cache key includes the git version, so a CI cache written by another git isn't mixed in.

3. Fixes that change levels

aisignoff works out every line from the whole history on each run. A fix of how a line is resolved therefore changes the levels of existing lines when you upgrade. That is allowed in a minor or patch release only when:

  1. the behaviour before contradicted this page or a page it names as normative (section 5); a behaviour that this page and those pages don't decide is not "a bug" but a gap, which a 1.x release must decide in the way that changes no existing line, and document;
  2. the changelog lists the fix under Levels, with what changes and for which lines;
  3. the fix changes no line that the documented rules already decided correctly.

4. Declarations

4.1 Levels and names

The vocabulary is fixed for 1.x. Its meanings are those of Levels and rules as of 1.0.0, which in turn follow the AI policy of the Industrial Mathematics Group. A change of that policy that changes what a level means needs aisignoff 2.0 and a new SIGNOFF.toml version; one that only rewords it doesn't.

What Stable values
Axes and their keys AI-Generation, Human-Review, AI-Review
Levels G0–G3, H0–H3, A0–A3 (upper case). There is no placeholder: a level is valid, invalid or missing
Names keys Assisted-by, Reviewed-by, AI-Reviewed-by
Findings key and values AI-Review-Findings: none, trivial, minor, major, critical
Findings levels (shown, never declared) F-, F0–F3

These rules of What a valid declaration needs are stable: which names each level needs or forbids, and that the review levels are cumulative. They are the only rules lint applies to declarations that have landed. Minimum levels are the gate's [[review]] rules, and never fail what has landed; SIGNOFF.toml has none.

"A self-check is A0" and "A2 and A3 need a different model" are checked only at the gate: for a pull request description before the merge, the lines of a change that hasn't landed, and the commands that write a declaration. They judge words (model names and how a review is described), so they are best effort: a release may recognise more names and wordings, and that may make the check of a new pull request stricter, never lint of history. The model tiers are guidance; a repository's gate makes its own ranking binding before the merge. Neither is part of this contract. A name that carries a tuning in square brackets (Claude Opus 6 (Anthropic) [effort=high]) is one name to lint, as any other text.

4.2 SIGNOFF.toml

  1. Format. 1.x reads and writes version = 4, as the SIGNOFF.toml reference of 1.0.0 describes it. An earlier version (1 to 3) is a configuration error (exit code 2). A file valid under 1.0 stays valid under every 1.x and means the same.
  2. A newer file. version = 5 or higher is a configuration error (exit code 2) that says the file needs a newer aisignoff. A new version of the format comes only with 2.0.
  3. Keys. The keys of 1.0 are the keys of 1.x: they are integral to a declaration, so they don't change (D2). Every key must be understood: a key that a release doesn't know is a configuration error (exit code 2) that says it is a typo or a key of a newer aisignoff, wherever it is. Should a 1.x release add a key, it is one a repository opts into, and that repository sets requires-aisignoff = "1.y", which every 1.x reads first and names instead of the unknown key.
  4. Defaults. The default of an existing key doesn't change in 1.x.
  5. What aisignoff writes (init, annotate, attest, correct, gc): the entries it writes and deletes mean what the commands' reference says. The layout, order and comments of the text it writes are not covered. gc deletes only entries that cover no line, and leaves the file as it is when it can't tell the entries apart.
  6. The AI axis follows the mode (4.5). With [history], SIGNOFF.toml never declares an AI review, not even A0: AI-Review, AI-Reviewed-by and AI-Review-Findings in any of its tables ([[annotations]], [[commits]], [[attestations]]) are a configuration error (exit code 2), and the commands that write it refuse them. Its AI axis is then A0: the AI review of an annotation is A0; a [[commits]] entry gives generation and human review only, and never changes the AI review of its commit's message (a commit whose message gives none is A0); an [[attestations]] entry gives a person's review only. An AI review comes only from a commit message or a pull request description (4.3) and from the record files of the review folder (4.4), as a person's review never comes from a record file. Without [history], an annotation declares all three levels, the AI review included.

4.3 Commit messages and pull request descriptions

A commit message, or a pull request description read as the message of its merge or squash commit, declares with key lines or with the boxes of a template. The grammar below is normative. A message that doesn't use it declares nothing. A 1.x release may add warnings for text that looks like a declaration but isn't one (as there is one today for AI-Review-Finding:); it may not start reading such text as a declaration.

Text that doesn't count. The subject line, and lines inside fenced code blocks (``` or ~~~) and HTML comments (<!-- … -->). A fence or comment that is never closed doesn't open one.

Key lines.

  • A key line starts at the beginning of a line, with no whitespace, bullet or emphasis before the key, and has the form Key: value, with no space before the colon; the space after it is optional. It may be anywhere in the body, not only in git's trailer block.
  • Keys are matched without regard to case. Level values are matched exactly: G3 is a level, g3 (or any other value, such as TODO) is an invalid level, which is an error.
  • An empty level (Human-Review:) declares nothing: the level is missing.
  • Names keys may be repeated, and each line is one name, commas included. Repeated names count once.
  • The same level key given twice with the same value counts once; with different values it is an error.
  • An axis counts when its level is given: a names line on its own declares nothing.
  • Lines with other keys are ignored.
  • An empty level line next to one of the same key with a level is ignored.
  • The findings line is also read in a looser form: after a bullet, emphasis or whitespace, with whitespace before the colon, in any case. Its value may be in emphasis or code and end with . or !, and counts in lower case. With several findings lines, the most severe counts. A value that isn't one of the five is an error.

Template boxes (the pull request template of the Industrial Mathematics Group is one; the grammar doesn't depend on its wording):

  • A box is a line that starts, after optional indentation, with - or *, whitespace, [ ], [x] or [X], and whitespace. Other list markers (+, numbers) aren't boxes.
  • A box's text goes on in the lines right below it, up to a blank line, a heading, a list item, a quote, a key line or the findings line. A model box is read from its own line.
  • A level box has the level in bold as the first thing after the box: **G2**, **H1**, **A0**.
  • Generation: exactly one ticked G box; two are an error. G boxes that are there with none ticked declare nothing: the generation is missing.
  • Assisted-by: the ticked boxes between the last G box and the first H box whose bold text has no colon, written **Name** (Vendor), and the text after a ticked **Other:**.
  • Human review: the highest ticked H box; the boxes below it don't matter, since the levels build on each other. H boxes with none ticked declare nothing: the human review is missing. The name is the commit's author, or before the merge lint --author, or the login of a line Responsible person: @login in a pull request opened by an account whose login ends in [bot], and in a landed commit whose author's name ends in [bot]. Before the merge, a pull request opened by a bot without that line is an error; in history, the author is taken as written (a bot is recognised by its name, which lint doesn't judge in history, 4.1).
  • AI review: the highest ticked A box, or A0 when A boxes are there and none is ticked. AI-Reviewed-by is the text after the word Model on its own (not Models) and the next colon in that box (Model:, Model and report:). An A1 box without that text names the models of Assisted-by, as a new session; an A2 or A3 box without it names no reviewer.
  • Key lines and ticked level boxes in one message are an error until a [[commits]] entry settles it. Key lines next to level boxes of which none is ticked declare on their own.

This grammar is also in Declaring lines, which counts as normative for it.

4.4 The review folder

  1. The review folder is reviews/, or [review] dir. Its files need no declaration.
  2. Record files are the .toml files directly in it that git doesn't ignore, holding [[attestations]] tables with path, blob or commit, AI-Review (A1–A3), AI-Reviewed-by and AI-Review-Findings, and nothing else (4.2.3 applies to new keys). Files in its subfolders are never read. Neither the folder nor a record file may be a symbolic link: that is a configuration error (exit code 2), since a change outside the folder could rewrite it.
  3. Add-only. The check before the merge fails a change that modifies, deletes or renames a file in it, except deleting a record file that covers no line.
  4. The only place for later AI reviews. An AI review recorded after a commit landed goes into a record file, never into SIGNOFF.toml, which declares no AI review at all (4.2.6). A record file holds no person's review.
  5. Record files count only with [history]. Without it, the folder's files need no declaration, and nothing else is checked of them.
  6. The name attest gives a new record file, reviews/<date>-<commit or file>.toml, is not covered: name it with --to if you rely on it.

4.5 Static mode and history mode

A repository declares in one of two modes, which don't mix. A [history] table in SIGNOFF.toml selects history mode, unless it sets enabled = false (enabled is true by default); anything else is static mode, and so is a repository without SIGNOFF.toml for the check of a pull request.

  1. Static mode. Each file's levels are those of its annotation, all three of them (annotate and init write AI-Review = "A0" when no AI review is given). [[commits]] and [[attestations]] are a configuration error (exit code 2), and attest and correct are refused (exit code 2). There is no gate: lint --declare-from checks the description's built-in rules, that the change doesn't alter the protected keys, and, as plain lint does, that every file has a valid declaration. The results are self-declared, and say so: --json output has "mode": "static", the text and Markdown reports and the HTML page carry a note, and badge labels end in (self-declared).
  2. History mode. The lines are resolved as section 5 says, SIGNOFF.toml declares no AI review (4.2.6), record files count (4.4), and the gate applies before the merge. --json output has "mode": "history". A history mode that can't read history (no git, not a repository) falls back to the annotations, as a warning says, and its results are marked as static mode's; a shallow clone stops with exit code 2.
  3. Switching. Turning on [history] requires deleting the AI review keys of the annotations; turning it off requires deleting [[commits]] and [[attestations]]. Either is a configuration error until done, never a silent change of levels.

5. How a line is resolved

In history mode, the rules that turn history into the levels of a line are stable. They are those of Declaring lines, Findings and Who writes what as of 1.0.0, which are normative for this, in short:

  1. One owner. The owner of a line is the commit that git blame --first-parent gives it on the default branch, with -w when ignore-whitespace is on and skipping the commits of the ignore-revs file. The owner's message declares the line; a [[commits]] entry for the owner replaces the axes it gives, which are generation and human review only. The owner's AI review is that of its message, or A0 when the message gives none and a [[commits]] entry declares the owner.
  2. Only the owner declares. The commits inside a merge declare nothing; a [[commits]] entry for a commit that isn't on the default branch's first-parent history is an error of lint. A branch commit that says a higher AI-Generation than the pull request's description is an error of the pull request, before the merge. So merge and squash give the same levels.
  3. Reviews. Each review level is the higher of the owner's and that of an attestation whose checked content had the line. On a tie, the names are the attestation's for the human review, and those of the review recorded last for the AI review (the owner's recorded by the owner). An invalid level is below every level.
  4. Nothing declared. An owner that declares nothing leaves its lines to the file-level declaration (an annotation, whose AI review is A0), or fails lint under undeclared = "error" or after require-trailers-since. An owner that declares some axes but not all is an error, unless an attestation gives the missing review.
  5. Findings. Of the AI reviews of A1–A3 that gave findings and cover a line, the anchor is the one recorded last among those of the highest level. The line's findings level is the most severe of the anchor's findings and those of every such review recorded after it. So a review clears a finding only when it is at least as deep as the review it follows, and any later review can raise one. Reviews are ordered only by when they were recorded: by the commit of the default branch that recorded them (a record file moved in one commit from the review folder of that time, as when the folder moves, keeps its place: each one of the same name and content its own); those of the change under check come last. A review covers only the lines its content had, so a review of older content recorded later counts after an earlier one, on the lines that content had. The review the owner declares was recorded by the owner. Later AI reviews are recorded only in record files of the review folder; SIGNOFF.toml sets no findings, and can't clear them. A line that a later commit changes is F- until a review covers it.
  6. Units. A binary file (a NUL byte in the first 16,384 bytes of its content as git stores it), an empty file and a symlink are one unit, counted as one line, owned by the commit that last changed it. A text file's lines follow git's line diff also after a binary version of it: a line that was in the binary version keeps the levels of the commit that added it (D6).
  7. Starting fresh. With [history] ai-reviews-since, the AI review of every commit up to that commit of the default branch (its own included) is A0 without findings, and the record files that commit or an earlier one added count for no line. Generation and human review don't change.
  8. Lines that haven't landed are the diff against the newest commit of the default branch that HEAD contains, and fail nothing on their own.

6. Commands

6.1 Commands and options

The commands init, annotate, lint, report, diff, attest, correct, gc, badge, guide, pr-body and template, the global options --root and --version, and every option of the command reference of 1.0.0 are stable: their names, what they take, and what they do as the reference describes it. New commands and options may be added. An option's default doesn't change in 1.x. What pr-body prints depends on the repository's and its owner's templates on GitHub, so on the network and on gh; it is no result in the sense of 2.

6.2 Exit codes

Code Meaning Who returns it
0 The command did what was asked. For lint: everything is declared and valid every command
1 lint found a problem: a declaration missing or invalid, a record that points nowhere, a problem the check before the merge reports, no files found, or with --strict a warning lint only
2 The command couldn't run: a usage error, an invalid or unreadable SIGNOFF.toml or record file, a shallow clone with [history] for a command that works out lines, and for badge --commits, a setting that names something that doesn't exist (default-branch, ignore-revs-file, require-trailers-since), a file that can't be read or written, a git that is missing, too old to read history or fails, or a HEAD that git can't read; with a message and no traceback every command
3 An internal error: a bug in aisignoff, with the traceback and where to report it (D3) every command
130 Interrupted (Ctrl-C), as a shell reports it every command

report, diff and badge return 0 when they ran, whatever the declarations are; read errors in --json.

6.3 --json output, format 1

report --json, report --tree --json and diff --json write an object that starts with "format": 1 and "aisignoff" (the version that wrote it). Format 1 is the keys listed under JSON output in 1.0.0, with the meaning given there.

  • New keys may appear in any 1.x release. A reader must ignore keys it doesn't know and should check format.
  • Removing or renaming a key, or changing its meaning, type or scale, raises format, and happens only in 2.0.
  • The text of source, of messages (errors, problems, notes, note), and of names that aisignoff writes itself (such as the A1 reviewer of a template without a model) is not covered.

6.4 Badges

badge writes aisignoff-generation.json, aisignoff-human-review.json, aisignoff-ai-review.json and aisignoff-findings.json, UTF-8, in the shields.io endpoint schema (schemaVersion 1, label, message, color). The file names and the schema are stable; the text of label and message and the colours are not.

6.5 guide

The roles dev and review, the markers <!-- aisignoff:begin --> and <!-- aisignoff:end --> that init and guide --agents-md write, and the skill folders aisignoff-dev and aisignoff-review are stable. The text of the guides is not: it follows the rules of the release.

6.6 pre-commit

The hook id aisignoff-lint in .pre-commit-hooks.yaml is stable.

7. The blame cache

The cache lives in .git/aisignoff/, the path a CI workflow restores and saves; that path is stable. Its files and their format are not: a release may stop using a cache an older one wrote, which costs one slower run. AISIGNOFF_NO_CACHE=1 turns it off. A result never depends on the cache (2.4).

8. Environment

Variable Effect Stable
GITHUB_REF a ref under refs/heads/gh-readonly-queue/ makes lint check HEAD as landed, as --landed yes
GITHUB_EVENT_PATH the event's default branch, when origin names none yes
AISIGNOFF_NO_CACHE 1 turns the cache off yes
GITHUB_SHA, GITHUB_REPOSITORY, GITHUB_SERVER_URL links in the HTML report no (the report isn't covered)
GH_TOKEN, GITHUB_TOKEN pr-body: the token for GitHub's API when gh isn't there yes
AISIGNOFF_EFFORT, CLAUDE_EFFORT pr-body --model: the effort to fill in, without --effort yes

Platforms. aisignoff 1.x supports Linux (D4): its main use is in containers, such as GitHub Actions' runners. It supports the CPython versions that are not past their end of life when the release is made, from 3.11 on. A minor release may drop a Python version past its end of life. Other systems may work, but aren't tested. CI tests every supported Python version and the lowest supported git (a job in an Ubuntu 22.04 container).

9. What a repository must do

The promises above hold for a repository that:

  • keeps the whole history of the default branch in CI (fetch-depth: 0);
  • lands pull requests as a merge or squash commit, and lets that commit carry the pull request description, when it declares with descriptions;
  • doesn't rewrite the history of the default branch;
  • pins the aisignoff version in every workflow and in the pre-commit hook, and raises them together.

10. Not covered

These may change in any release, with an entry under Changed:

  • the wording and layout of human-readable output: lint messages, report text and Markdown tables, diff text;
  • the HTML folder report, its look, its colours and its syntax highlighting;
  • new warnings: lint --strict may become stricter in a minor release. Plain lint doesn't fail on a repository it accepted before, unless that repository relied on a bug that let an invalid declaration through, and such a fix is listed under Fixed;
  • the Python modules of the package: importing aisignoff isn't supported;
  • the example workflows and scripts in examples/, and the organisation's reusable workflows, which pin their own version;
  • the layout of the TOML that commands write, and the names of record files that attest chooses;
  • the guides' text and the model tiers;
  • the gate's rules: the file .github/aisignoff-gate.toml and the organisation's aisignoff/gate.toml (their version says which format), what they can express, and how the check before the merge applies them;

The known limitations say what the line model can't express, and where aisignoff is best effort.

Decisions

Taken on 25 November 2026:

  • D1. When: not yet. 1.0.0 waits; this page stays a draft until the maintainers set a date.
  • D3. Exit codes: a separate code 3 for internal errors, so that a bug in aisignoff can be told from a configuration error (2) and from a failed check (1).
  • D4. Platforms: Linux only. The main use is in containers, such as GitHub Actions.
  • D5. git: aisignoff keeps reading history through git, which is more robust and efficient than its own line diff would be. A change of git version is outside the promise of 3.
  • D2. Keys (decided later that day): the keys stay as they are, and every key must be understood; an unknown key is an error everywhere. No prefix for optional keys: free-form notes go into TOML comments, reports and commit messages. requires-aisignoff says which release a repository needs.
  • D6. A text file after a binary one (decided later that day): follow git. git blame decides the owner of every line of a text file, and the check before the merge shows the same; being binary only makes a version one unit.