← Docs

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

text
.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:

yaml
# .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: suggested
Guaranteeremoved-member-no-access

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
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
Fig.The same guarantee as a card. This is what reviewers approve.

Fields

FieldRequiredWhat it holdsExample
idyesA short, unique, lower-case name used in messages, evidence and the certificateremoved-member-no-access
saysyesThe 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."
boundsnoThe bounds you intend, in words: how many actors, records, retries, faults or steps"up to 2 members, 1 removal, 2 runs in flight"
left_outnoWhat the guarantee deliberately does not cover, as a list["workspace owners deleting the whole workspace"]
categorynoOne of the categories below, by number, or other. Filled in when a guarantee is suggested8
statusnoaccepted (the default when none is given), suggested or retiredaccepted

An unknown field is refused, so a misspelt one cannot go unnoticed.

status

statusCheckedCan block the agent or CI
acceptedyesyes
suggestedyes, reported in fullno. It blocks nothing until a person accepts it
retirednono. 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:

bash
il codeowners write --owner @acme/workspace-leads

This 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:

text
# 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/ and mutants/. --checks is accepted and does nothing.
  • il codeowners check exits 1 if the block is missing, out of date, or overridden by a later line.
  • In CI, il codeowners approval fails 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's CODEOWNERS. 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:

  1. You edit the file in a PR. Its code owners approve it.
  2. You accept a suggestion with il accept <id> in a terminal, which sets status: accepted, and merge the file through a normal PR.
  3. 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:

AgentIts own PRYouMainthinks theguarantee is wrongchange request:which, why, insteadcode ownersreviewguarantee updated(or not)meanwhile the code PR keeps running against the current guarantee
Fig.The way out goes through a person. The code PR keeps running against the current guarantee.

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:

bash
il change-request list
il change-request show removed-member-no-access-1
il change-request close removed-member-no-access-1 --decision guarantee-kept --note "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:

bash
il guarantee-diff --base-ref origin/main

On the Quickstart's sample, after a pull request lowers a bound, adds something the guarantee leaves out and rewords its sentence:

Changes to the guarantees, origin/main to .inputlayer/guarantees.yaml: guarantee changed (the promise a person accepted): 1 weakened, 2 to read, 0 strengthened. check changed (the machine side): 0 weakened, 0 to read, 0 strengthened.Every change to the guarantees file is listed; a direction is named only where the fields settle it. A weakening needs a code owner's yes; "to read" means only a person can say which way it goes. `retry-once-payments-checkoutclient-pay` (changed): guarantee changed (the promise a person accepted): WEAKENED: it now also leaves out “a reply lost on the second retry”. TO READ: it has a new sentence: was “One call to pay makes self.network.call take effect at most once, also when a reply is lost and pay retries.”, now “A call to pay charges the order at most once, also when a reply is lost and pay retries.”; words gone: “effect”, “makes”, “one”, “self.network.call”, “take”; words new: “charges”, “order”, “the”. Only a person can say whether this promises less. TO READ: it is reworded, so it cannot be compared by number: was “one call; any request or reply may be lost; each retry loop run at most twice”, now “one call; any request or reply may be lost; each retry loop run at most once”.

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

#CategoryExample guarantee
1ConcurrencyTwo runs in one workspace never write the same report at once.
2Retries and idempotencyA Stripe event credits the customer at most once, even when it's delivered twice or concurrently.
4Locks and leasesOnly the worker holding the lease writes to the export file, even after its lease expires mid-write.
6OrderingA shipment email is never sent before the order is marked paid.

State and data

#CategoryExample guarantee
5Business invariantsAn account's balance always equals the sum of its ledger entries.
7State transitionsAn order never goes from refunded back to paid.
8Access rulesSomeone removed from a workspace can't see or change anything in it, even work that's already running.
10Data integrityDeleting a customer never leaves orders that point to no customer.

Faults, time and limits

#CategoryExample guarantee
3Partial failuresIf the process fails between charging the card and saving the order, the charge is refunded or the order is saved.
11Time and expiryA password reset link never works after 30 minutes.
9Resource limitsA tenant never has more than 5 exports running at once.

Across services

#CategoryExample guarantee
12Cross-service consistencyWhen an order is cancelled, the warehouse service releases its reservation.
15ConvergenceAfter the network heals, every replica ends with the same cart.

Liveness

#CategoryExample guarantee
13ProgressTwo transfers between the same accounts never deadlock.
14ResponsivenessEvery request to start a run gets a reply, an error counts, even when the model provider hangs.
16TerminationThe 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.

AI shouldn't certify its own code.

Public install is not available yet. The Quickstart shows what InputLayer printed on an example.

Rather we check one service for you first? Book an audit →