Guarantees
The guarantee file, every field, bounds, what a guarantee leaves out, code owners, change requests, and the categories.
A guarantee is the part of InputLayer you own. It is a plain sentence, with bounds and a list of what it leaves out, accepted by a person in a reviewed pull request (PR). This page is the reference for the file that holds guarantees and for how they change.
Where guarantees live
.inputlayer/
guarantees.yaml # guarantees: yours, reviewed like code
checks/ # checks: written by il, or added by you from Claude's draft
removed-member-no-access.yaml
change-requests/ # requests from the agent to change a guarantee
evidence/ # evidence bundles, for il replay
state.json # local results (git-ignored)
last-task.md # local summary of the last task (git-ignored).inputlayer/guarantees.yaml is committed to your repository. CI reads it from the main (base) branch, never from the PR under check. An edit a PR makes to a guarantee is shown on that PR's certificate but does not apply to its own verdict.
Paths in the file are relative to the project root: the directory that holds .inputlayer/.
The file format
The file is a YAML list. Each entry is one guarantee:
# .inputlayer/guarantees.yaml
- id: removed-member-no-access
says: "Someone removed from a workspace can't see or change anything in it, even work that's already running."
bounds: "one member, one workspace, one removal during one piece of work; each loop at most twice"
left_out:
- "a removal landing between one request's own check and its act"
- "each request's require_member check and its act modelled as one atomic step"
- "the four document endpoints modelled as one 'doc' request"
- "re-adding a removed member; more than one member, workspace or job"
- "the job's work function (app.state.work) and its result contents"
category: 8
status: accepted
- id: order-charged-once
says: "A customer is charged at most once per order, even when the payment call is retried."
bounds: "2 deliveries of the payment request, 1 retry, 2 workers"
left_out:
- "the payment provider's own deduplication"
- "refunds"
category: 2
status: accepted
- id: refund-once
says: "An order is refunded at most once."
status: suggestedSomeone removed from a workspace can't see or change anything in it, even work that's already running.
- bounds
- one member, one workspace, one removal during one piece of work; each loop at most twice
- leaves out
- a removal landing between one request's own check and its act; each request's require_member check and its act modelled as one atomic step; the four document endpoints modelled as one 'doc' request; re-adding a removed member; more than one member, workspace or job; the job's work function (app.state.work) and its result contents
- accepted
- in a reviewed PR
- read from
- main
Fields
| Field | Required | What it holds | Example |
|---|---|---|---|
id | yes | A short, unique, lower-case name used in messages, evidence and the certificate | removed-member-no-access |
says | yes | The guarantee, in the words you would use with a colleague | "Someone removed from a workspace can't see or change anything in it, even work that's already running." |
bounds | no | The bounds you intend, in words: how many actors, records, retries, faults or steps | "up to 2 members, 1 removal, 2 runs in flight" |
left_out | no | What the guarantee deliberately does not cover, as a list | ["workspace owners deleting the whole workspace"] |
category | no | One of the categories below, by number, or other. Filled in when a guarantee is suggested | 8 |
status | no | accepted (the default when none is given), suggested or retired | accepted |
An unknown field is refused, so a misspelt one cannot go unnoticed.
status
status | Checked | Can block the agent or CI |
|---|---|---|
accepted | yes | yes |
suggested | yes, reported in full | no. It blocks nothing until a person accepts it |
retired | no | no. It stays in the file for its history |
says
Write one sentence that a reviewer can judge true or false. Name the concurrency, failure or timing it must survive. "Access is handled correctly" cannot be checked. "Someone removed from a workspace can't see or change anything in it, even work that's already running." can.
bounds
Bounds say how far the check explores. Within the bounds it explores every execution. Outside them it says nothing. Say them in plain numbers: "2 members", "1 removal", "2 runs in flight", "a pause longer than the lease's TTL", "up to 6 operations".
InputLayer records your bounds, in your words, with every verdict and on the certificate. In the current build it records no machine-readable limits, so a holding guarantee reads checked, evidence incomplete on the certificate; the PR comment, when nothing else is missing, counts it among the guarantees that hold on this PR, within their bounds, and does not mention the limits. See Limits for choosing bounds.
left_out
List what the guarantee does not cover, so nobody reads it as covering more. Good entries name a path, actor or failure: "workspace owners deleting the whole workspace", "process crashes", "more than 2 runs in flight". InputLayer adds the assumptions its check makes, such as a fake standing in for an outside service, when it prints the verdict. It never removes yours.
The hash
Each guarantee has a content hash over its id, says, bounds and left_out. A check records the hash of the guarantee it was built for. If the guarantee changes, its checks are stale and decide nothing until InputLayer rebuilds them. Reformatting the YAML does not change the hash.
Checks are not the agent's to edit
Each guarantee's check is in .inputlayer/checks/<id>.yaml, with its model in .inputlayer/models/. il writes them when il derive builds the check. Otherwise you add the one Claude drafted, as in the Quickstart. A check file names its model, the relations of violations it checks and the code it watches. Once a project has guarantees, the plugin refuses the agent's direct edits under .inputlayer/, by any tool.
The same code owners get the check files too (below).
Code owners
A guarantee is a contract, so changes to it need its owners' approval. InputLayer keeps the guarantee files in your CODEOWNERS:
il codeowners write @acme/workspaceThis adds a marked block at the end of the CODEOWNERS file GitHub reads (.github/, the root or docs/), so no later line takes the files back:
# BEGIN inputlayer guarantees: a change to a guarantee needs its code owner (il codeowners)
**/.inputlayer/guarantees.yaml @acme/workspace-leads
**/.inputlayer/protections.yaml @acme/workspace-leads
**/.inputlayer/checks/ @acme/workspace-leads
**/.inputlayer/models/ @acme/workspace-leads
**/.inputlayer/mutants/ @acme/workspace-leads
# END inputlayer guarantees- The block also gives the owners every file a check is made of:
.inputlayer/checks/,models/andmutants/.--checksis accepted and does nothing. il codeowners checkexits 1 if the block is missing, out of date, or overridden by a later line.- In CI,
il codeowners approvalfails the job when a PR changes a guarantee file without an approval of its head commit by one of that file's owners, as named by the base branch'sCODEOWNERS. See CI.
Turn on branch protection with "Require review from Code Owners" so the approval rule is enforced by GitHub as well.
How a guarantee changes
Guarantees change only through a person. There are three ways:
- You edit the file in a PR. Its code owners approve it.
- You accept a suggestion with
il accept <id>in a terminal, which setsstatus: accepted, and merge the file through a normal PR. - The agent files a change request and you decide.
Change requests
The agent files a change request when it believes a guarantee is wrong, when the task cannot be done without breaking it, or when three repairs did not bring it back:
A request is written to .inputlayer/change-requests/<id>-<n>.json with the guarantee's id, the agent's belief in one or two sentences, its kind (guarantee_wrong, conflicts_with_task or repairs_failed), and the evidence: the verdict, the counterexample, the files edited and the repairs tried.
A request changes no verdict. A broken guarantee stays broken, CI still fails on it, and the request is listed as open next to it until you close it from a terminal:
il change list
il change show removed
il change close removed guarantee "A removed member loses access at once; fix the code."--decision is guarantee-changed (you changed it in a reviewed edit) or guarantee-kept (the code is to change). Closing is refused without a terminal on standard input and inside an agent session.
Guarantee changes, in plain words
When a PR edits guarantees.yaml, InputLayer describes each change as a sentence, weakenings first, and puts them on the certificate:
il guarantee origin/mainOn the Quickstart's sample, after a pull request lowers a bound, adds something the guarantee leaves out and rewords its sentence:
A reworded sentence, or bounds that cannot be compared, are listed as "to read": only a person can say which way they go. --fail-on-weakening makes the command exit 7 when any change weakens a guarantee.
The categories
Every guarantee falls into one of the categories below, grouped in families.
Orderings
| # | Category | Example guarantee |
|---|---|---|
| 1 | Concurrency | Two runs in one workspace never write the same report at once. |
| 2 | Retries and idempotency | A Stripe event credits the customer at most once, even when it's delivered twice or concurrently. |
| 4 | Locks and leases | Only the worker holding the lease writes to the export file, even after its lease expires mid-write. |
| 6 | Ordering | A shipment email is never sent before the order is marked paid. |
State and data
| # | Category | Example guarantee |
|---|---|---|
| 5 | Business invariants | An account's balance always equals the sum of its ledger entries. |
| 7 | State transitions | An order never goes from refunded back to paid. |
| 8 | Access rules | Someone removed from a workspace can't see or change anything in it, even work that's already running. |
| 10 | Data integrity | Deleting a customer never leaves orders that point to no customer. |
Faults, time and limits
| # | Category | Example guarantee |
|---|---|---|
| 3 | Partial failures | If the process fails between charging the card and saving the order, the charge is refunded or the order is saved. |
| 11 | Time and expiry | A password reset link never works after 30 minutes. |
| 9 | Resource limits | A tenant never has more than 5 exports running at once. |
Across services
| # | Category | Example guarantee |
|---|---|---|
| 12 | Cross-service consistency | When an order is cancelled, the warehouse service releases its reservation. |
| 15 | Convergence | After the network heals, every replica ends with the same cart. |
Liveness
| # | Category | Example guarantee |
|---|---|---|
| 13 | Progress | Two transfers between the same accounts never deadlock. |
| 14 | Responsiveness | Every request to start a run gets a reply, an error counts, even when the model provider hangs. |
| 16 | Termination | The retry workflow for a failed webhook always ends, in success or a dead letter. |
Any other rule
You can state any rule you can put in a sentence, with category: other. The categories are a way to file guarantees, not a list of what il can check today: what a check covers is in Limits.