← Docs

Quickstart

Install InputLayer in Claude Code, accept your first guarantee, and see what InputLayer says when a change touches the code it covers, in the session and in CI.

On this page you install the Claude Code plugin, have Claude draft a guarantee for a small team workspace app, accept it, and see what InputLayer says when a change touches the code the guarantee covers: in the session, and in the pull request's CI job.

The example is based on a real bug that came in with a change an AI coding agent co-wrote, in an open-source app.

Every output on this page is what InputLayer printed on its removed-member example.

What you need

  • Claude Code, signed in.
  • git and Python 3.12, the version the example was run on. See Limits for what a check covers.
  • The example: examples/removed-member in InputLayer's repository, copied into a git repository of its own. It is a small FastAPI team workspace service. Members add documents and start jobs, background work over one document, and read or cancel a job by its id (read_job and cancel_job in app/routes/jobs.py). Every request checks that the caller is a member of the workspace now (require_member in app/auth.py).

1. Install the plugin

Public install is not available yet. To try InputLayer on your own code before it is, book an audit.

The steps below show what InputLayer printed on the example. You can run them yourself once the install is available.

In a project with no guarantees yet, the session starts with one line:

InputLayer: no guarantees in this project yet. Ask Claude to protect a behaviour that must survive retries or concurrency, e.g. "protect: an order is charged at most once". (Said once per project; INPUTLAYER_HINTS=off turns it off.)

2. Ask Claude for a guarantee

Ask Claude, in your own words, for the behaviour to protect, its bounds and what it leaves out:

Protect this behaviour of the workspace app, as guarantee id removed-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. Left out: a removal landing between one request's own check and its act. Protect only: don't change the code. When the check is done, show me the guarantee entry, the draft's path and the result.

Claude uses the plugin's protect skill. It runs il derive first, which builds a check from the code itself for the patterns it knows. In our run, with an earlier build, il derive proposed nothing for this app, so Claude drafted the check by hand: a small model of the member's requests, the owner's removal and the background job, each step anchored to the lines of code it stands for. The current build can derive a check for this app itself; the outputs here are of the drafted one. Claude drafts it in a scratch directory, outside the project. In our run, the check of the draft held within bounds over 16 states, and a copy of the model in which whoever started a job can still read or cancel it after removal gave rows of the violation relation, so the check can fail. Claude does not add the guarantee: it shows you the entry, with your sentence as its says, and the draft's path.

You add it. Copy the draft to .inputlayer/models/removed_member.iql, the entry to .inputlayer/guarantees.yaml as suggested, and its check to .inputlayer/checks/removed-member-no-access.yaml:

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: suggested
yaml
# .inputlayer/checks/removed-member-no-access.yaml
- name: removed-member-no-access
  technique: model
  model: .inputlayer/models/removed_member.iql
  relations:
  - removed_member_access
  watch:
  - app/auth.py
  - app/routes/**
  - app/runner.py
  - app/store.py

The next session starts with:

InputLayer: 1 guarantee suggested, not active yet: "Someone removed from a workspace can't see or change anything in it, even work that's already running."Accept it in your terminal: il accept removed-member-no-access

3. Accept it

Read the sentence, the bounds and what it leaves out. If they say what you mean, close Claude Code and accept it in your terminal:

bash
il accept removed-member-no-access
removed-member-no-access: accepted 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 Outside this check: 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; a break on it is tried on the code only by a Claude Code session (INPUTLAYER_REDERIVE=on); otherwise: cannot tell: the model found a break; there is no way to reproduce it on the code here. It is now enforced: the plugin's stop and `il ci` act on it, where a suggested guarantee is only reported.

This sets status: accepted in .inputlayer/guarantees.yaml. Claude cannot do this step for you: when Claude Code is open in the project, il accept says so and the acceptance is not enforced, and once a project has guarantees, the plugin refuses Claude's direct edits under .inputlayer/, by any tool, including shell commands. Commit the files and merge them to the main branch through a normal reviewed pull request (PR).

Each session now starts with:

InputLayer is checking 1 guarantee: "Someone removed from a workspace can't see or change anything in it, even work that's already running." Holds.

4. Ask for a change that conflicts with it

Now ask Claude for a change:

Whoever started a job should always be able to follow their own work: let them read the job's status and cancel it by its id.

In our run, Claude did not change the code. It saw that the only new case is a starter who has been removed from the workspace, which the guarantee forbids, filed a change request, and asked you to decide: keep the guarantee, or change it in a reviewed edit. See Agents for the request it filed.

5. If the change is made

The example's quickstart/break.patch makes that change: whoever started a job can read or cancel it, also after they are removed. When Claude makes that edit to app/routes/jobs.py, Claude receives:

inputlayer: removed-member-no-access: out of date Reason: app/routes/jobs.py changed after the last check; re-check before relying on it step read_job: app/routes/jobs.py:28-35 changed step cancel_job: app/routes/jobs.py:38-46 changedIf code a step of .inputlayer/models/removed_member.iql is anchored to moved or was rewritten and still does what the step says, call anchor with guarantee_id "removed-member-no-access", the step and its new lines: il updates the anchor. If it no longer does, repair the code. Then call recheck (guarantee_id "removed-member-no-access").

When Claude finishes, you see:

"Someone removed from a workspace can't see or change anything in it, even work that's already running": out of date.

The guarantee is out of date: its check is a model of the code as it was, and the lines its steps stand for have changed, so the check says nothing about the new code. An out-of-date guarantee does not block Claude from finishing. It is not holds within bounds again until the code its steps stand for matches them, or the check is updated.

6. The repair

The example's quickstart/fix.patch puts the membership check back on read_job and cancel_job. When Claude finishes after that edit:

InputLayer checked 1 guarantee: it holds.

7. Open the pull request

In CI, il ci checks the guarantees against the pull request's code. On the change from step 5, the job prints:

bash
il ci --base origin/main --certificate cert.json
FAIL removed-member-no-access: out of date. step read_job: app/routes/jobs.py:28-35 changed step cancel_job: app/routes/jobs.py:38-46 changed The check, as written, finds no break within its bounds; its steps no longer match the code. Says: Someone removed from a workspace can't see or change anything in it, even work that's already running.warn removed-member-no-access: out of date: model older than its code (1 watched file(s) differ from the model's last commit (71b002ad52b3): app/routes/jobs.py; update the model)warn removed-member-no-access: step start_job: app/routes/jobs.py:17-25 moved to 27-35; update the anchoril ci: 1 guarantee(s): 1 out of date; 1 model(s) older than their code (exit 6)

Exit 6: a check no longer matches its code, so the job fails. After the repair from step 6:

ok removed-member-no-access: holds within bounds. Bounded model check of a model written from the code (16 states). Says: Someone removed from a workspace can't see or change anything in it, even work that's already running. Scope: Checked for one member, one workspace, one removal during one piece of work; each loop at most twice. Outside this check: 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.il ci: 1 guarantee(s): 1 holds within bounds; no guarantee affected (exit 0)

Setting up CI takes two workflow files: see CI.

Next

  • Concepts: guarantees, checks, evidence and the three verdicts.
  • Guarantees: the file format and the categories.
  • Limits: what a check covers and what it does not.

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 →