Checks: what must stay true, in plain English
Checks are sentences about what must stay true. Agents turn each one into a test, and every change is tested against them before it can ship.
A check is a sentence about something that must stay true, like "Refunds never exceed what the customer paid." The agent that adds it writes a test for it and links the two:
gaitro check add "Refunds never exceed what the customer paid"gaitro check compile <handle> --run "npm test -- refunds"gaitro status lists checks still waiting for a test. A draft can't ship while one is waiting, while one fails, or before the project's checks have run on it.
Checks that last, and checks that retire
A check a person writes on a draft in the app is kept: when the draft ships, it joins the project's checks and runs on every change from then on. The draft page says so, and you can let it retire instead.
A check an agent adds proves that one change works. When the draft ships, it retires: it stays on the draft as the record of what was tested, and doesn't run again. The checks that run on every change are the project's own, usually its typecheck, lint and tests.
Keep an agent's check when it guards something that must stay true from now on, like sign-in, money or data that mustn't be lost. A kept check joins the project's checks when the draft ships:
gaitro check keep <handle>Or add it kept (gaitro check add "…" --keep), or press Keep on the draft's page. Accepting a suggested check keeps it. A kept check whose command the project already runs isn't added a second time.
Owners can archive project checks that no longer earn their place, with a reason for the project's log. They stay readable on the drafts that added them:
gaitro check archive <handle>… --reason "They repeat the unit tests"A test that reads source files as text, to match a pattern in them, fails when the code is reworded and passes when what it does breaks. Gaitro says so when you link one.
Where checks run
On hosted Gaitro, checks run in a fresh sandbox for every run, destroyed when the run ends. gaitro check env says what's in it: the operating system, Node, tools, network and environment variables. Put installs and builds in the setup step so they run once per run, not once per check:
gaitro check setup "npm ci && npm run build"An agent's setup command is a proposal: it runs once an owner approves it in the project's Settings → Review, because it runs before every check, and before a deploy that has no setup of its own.
Checks that run the same command share one run of it, and a passing check keeps no output. gaitro check run <handle> runs one check on your machine, the way the server does.
What changed
A check can ask what the change is. The folder it runs in is a git repository holding the version being checked and the published version it goes on top of, so git diff "$GAITRO_BASE" and git log work. GAITRO_BASE and GAITRO_HEAD name the two commits, and the file named in GAITRO_CHANGED_FILES lists the paths that changed, one per line. Use it to lint or test only what changed:
gaitro check add "Changed TypeScript files pass the linter" --run 'git diff --name-only --diff-filter=d "$GAITRO_BASE" -- "*.ts" "*.tsx" | xargs -r npx eslint'A database for a check
A check that needs a real database can ask for one. Its run then starts an empty Postgres of its own, and the check gets DATABASE_URL, plus PGHOST, PGPORT, PGUSER, PGPASSWORD and PGDATABASE:
gaitro check add "Orders are saved with their items" --run "npm run db:migrate && npm run test:db" --service postgresTo give every check and the setup step one, set it for the project: gaitro check setup --service postgres, or the switch in the project's Settings. --service none takes it away again.
- Nothing is migrated for you. The database starts empty. If your project has migrations (Drizzle, Prisma or others), run them in the check's command or in the setup step.
- Its own copy for each check. Each run starts one Postgres, with a new random password, and deletes it when the run ends. The setup step gets its database, so it can migrate and seed it. After the setup, each check gets a fresh copy of that database as the setup left it, so no check sees what another wrote.
- Only the check can reach it. It listens on 127.0.0.1 inside the run's sandbox, never on the network.
- When it can't start, for example on a machine that runs its own checks without Postgres installed, the checks that needed it fail with "Postgres isn't available on this runner" and the reason. They didn't run, and the rest of the run goes on.
Checks the runners can't run
The hosted runners are Linux (Debian). A check whose command needs something they don't have, like swift or xcodebuild, could only ever fail there. So Gaitro looks at the command when the check is added. It also follows npm run and yarn into your package.json scripts. If the command can't run, the check is refused with the reason:
The check runners are Linux (Debian) and don't have swift. Run this check yourself and record it, or ask for a macOS runner.A toolchain the setup step installs is fine (for example, a setup that installs bun). To keep a check that has to run somewhere else, add it with --allow-unrunnable (MCP: allowUnrunnable). It's recorded as a manual check: Gaitro lists it, never runs it, and it never holds up a publish.
Safety checks
Every change is also checked, on every plan, for passwords or keys in the code, unknown or misspelled new packages, personal data in logs, endpoints that don't check who's asking, database changes that throw data away, and hidden instructions in agent instruction files. Letting one through takes a written reason: gaitro safety ok <id> --reason "…".
Check minutes
Check minutes are the time checks spend running in the sandbox, setup included. Each check can run for up to 5 minutes, and the setup step for up to 5 minutes, before it's stopped. Each plan comes with minutes every month (Pricing). On Pro and Pro Plus you can buy extra minutes, which are used only after the month's plan minutes run out. When none are left, new check runs wait until there are more.
On the Free plan, checks start once the company's owner has confirmed their email. You can sign up and start drafts straight away; the draft page says when checks are waiting and can send the link again. They start by themselves as soon as the email is confirmed, and the time spent waiting doesn't count as check minutes. Paid plans never wait.
This page as markdown, for your agent: /docs/checks.md. Every page at once: /llms-full.txt.