# Ticket pre-test

Canonical URL: https://autonom.yatsuk.me/docs/pretest/

Check one ticket and the change behind it on an emulator or Simulator before it reaches QA. Your agent plans the checks, drives them under a budget and hands back a verified pack with a plain verdict.

**Try it**

```sh
autonom pretest start --ticket tickets/WB-1.md --base main --ticket-ref WB-1
```

**Needs** [Autonom installed](https://autonom.yatsuk.me/docs/install/index.md) · [a session with the app running](https://autonom.yatsuk.me/docs/sessions/index.md) · [flows for the regression checks, if you have them](https://autonom.yatsuk.me/docs/flows/index.md)

## How it works

A pre-test checks one ticket and its code change on a device, the way a careful QA engineer would. It runs inside the current [session](https://autonom.yatsuk.me/docs/sessions/index.md) and adds no new way to drive the device. Your agent still uses the [screen commands](https://autonom.yatsuk.me/docs/screen/index.md), screenshots, [network](https://autonom.yatsuk.me/docs/network/index.md) mocks and [flows](https://autonom.yatsuk.me/docs/flows/index.md).

What the pre-test adds is a record. While a check is open, every journal entry, screenshot and saved tree is filed under that check. The pack at the end shows every planned check, run or not, with its evidence.

`pretest start` reads the ticket and compares your working tree with a base branch. It notes the changed files and lines, the flows that cover them, and screens that may show the change. It also takes a baseline of crashes, error logs, requests and memory. The ticket is masked for credentials before it is written.

![The pre-test playbook in eight steps: start from the ticket and diff, read the context and the edge-case kit, plan every check, run each check from begin to end, run the regression flows, record findings, read the device health, then pack and verify.](https://autonom.yatsuk.me/docs/pretest/how.svg)

Every check is planned before the first tap, so the pack shows the ones that never ran.

Checks are planned in a fixed order: one per acceptance point in the ticket, then edge cases from the kit that the diff could break, then the regression flows. Each check ends with one of five verdicts: `pass`, `fail`, `blocked`, `not_covered` or `inconclusive`.

### How the ticket verdict is set

The pack sets the ticket's verdict by rule. The first rule that matches wins:

1. `fail`: a check failed, or a confirmed finding is a blocker or major.
2. `blocked`: a check could not be carried out.
3. `not_covered`: a planned check never began, or there are no checks.
4. `inconclusive`: a check could not decide, or was left open.
5. `pass`: none of the above.

A `not_covered` or `inconclusive` ticket is never rounded up to a pass. Passing flows do not make a ticket done when its acceptance checks never ran.

### Guard rails

While a pre-test is active on the target, three limits hold. Each refusal happens before any input reaches the device, and lands in the journal with its code.

- **A budget.** Taps, swipes, typing, keys, opening links, app launches and stops, and each flow input step count against `--max-actions` and `--max-minutes`: 300 actions and 60 minutes by default. Reads such as `ui tree`, `ui find` and `screenshot` never count.
- **Forbidden taps.** A tap on a control whose text matches `--forbid-text` is refused. The default list holds buy, pay, purchase, delete and remove account, plus the Russian words for buy, pay and delete.
- **Allowed apps.** Opening a link or launching an app outside `--allow-app` is refused. By default only the session's app is allowed.

## Examples

The summary in the first example comes from a real pre-test on an Android emulator; its ticket here is shortened. The other four examples run on Autonom's test device with a catalog screen the script writes, so you can reproduce them without an emulator. Open Reproduce these outputs at the end of this section for the exact commands.

### Ask your agent to pre-test a ticket

**Goal:** hand one ticket to your agent and get back a verdict you can trust.

1. **Write the ticket down.** Number the acceptance criteria, so each one becomes a check of its own.

   *The ticket file tickets/WB-1.md*

   ```
   # WB-1 Catalog: show the number of results
   Acceptance criteria:
   1. After the catalog loads with N >= 1 items, a line "N items found" shows above the grid.
   2. With one item it reads "1 item found".
   3. When loading fails and nothing is cached, only the error banner shows, with no count line.
   4. The line is aligned with the grid and scrolls with it.
   ```

2. **Give your agent one paragraph.** Name the ticket, the target, the app and the base branch. The skill carries the rest of the playbook.

   *Prompt to give your agent*

   ```
   Pre-test the ticket in tickets/WB-1.md on emulator-5600, app com.example.app, base branch main. Follow the ticket-pretest skill. Pack the result and tell me the verdict, the findings and the pack path.
   ```

You should see the verdict first, then what set it, what was blocked and which edge cases were covered.

*Excerpt of summary.md from a real pre-test of WB-1*

```
# Pre-test FAIL: WB-1 Catalog: show the number of results
- Verdict: **fail**
  - check chk-9 failed
  - check chk-14 failed
  - check chk-15 failed
…
| chk-9 | AC7: secondary style, aligned with grid, scrolls with content, no overlap of first row | ticket | — | fail | 26s |
…
## Blocked: chk-1
…
- Covered: offline (pass/pass), server-error (pass), rotation (pass), large-text (pass)
- Actions: 170 · checks: 16 · findings: 15 (11 automatic)
```

**What to look at.** The verdict names the three checks that set it. The ticket in that run had seven criteria, and the agent planned 16 checks. It covered four of the 18 kit cases and named the 14 it skipped. One check was blocked because the app's server did not answer from the test machine, and the pack says so instead of calling it a pass.

### Plan the checks before the first tap

**Goal:** turn the ticket into planned checks, so nothing is skipped quietly.

1. **Own the device and launch the app.** The start takes its memory and CPU baseline from the running app.

   ```sh
   autonom session start --serial emulator-5554 --app-id com.example.app --launch
   ```

2. **Start the pre-test.** Run it from the app's repository; `--base` names the branch the change is compared with.

   ```sh
   autonom pretest start --ticket tickets/WB-1.md --base main --ticket-ref WB-1
   ```

3. **Read what changed.** Read it next to the ticket before touching the device.

   ```sh
   autonom pretest context
   ```

4. **Add one check per acceptance point.** Say why, so a reviewer sees the link to the ticket.

   ```sh
   autonom pretest check add "Results show a count line above the grid" --kind ticket --why "acceptance point 1"
   ```

5. **Mark a criterion that is also a kit case.** Then the kit counts it, and you do not plan it twice.

   ```sh
   autonom pretest check add "A failed load shows only the error banner" --kind ticket --case server-error --why "acceptance point 3 (also the kit case)"
   ```

You should see the one changed file, its changed lines, and no flow that covers it.

*Output of autonom pretest context*

```
{
  "ok": true,
  …
  "changed_files": [{"path": "lib/catalog/catalog_screen.dart", "status": "M", "binary": false, "ranges": [[2, 3]], "functions": ["class CatalogScreen {"]}],
  …
  "flows": {
    …
    "selected": [],
    …
    "uncovered_files": ["lib/catalog/catalog_screen.dart"]
  },
  …
```

**What to look at.** `selected` is empty and the changed file is in `uncovered_files`: no flow covers this change, so hand checks are the only proof. A third check, for acceptance point 4, is added the same way.

**Show full output**

```
{
  "ok": true,
  "pretest_id": "pt_20261012T110703_b7cd7b",
  "schema": "autonom.pretest-context/v1",
  "repo": "/private/tmp/autonom-pretest/app",
  "base": "main",
  "head": null,
  "changed_files": [
    {
      "path": "lib/catalog/catalog_screen.dart",
      "status": "M",
      "binary": false,
      "ranges": [[2, 3]],
      "functions": ["class CatalogScreen {"]
    }
  ],
  "diff_truncated": false,
  "changed_areas": ["lib/catalog"],
  "flows": {
    "flows_dir": null,
    "selected": [],
    "invalid": [],
    "uncovered_files": ["lib/catalog/catalog_screen.dart"]
  },
  "runtime_map_hints": [],
  "profile": null
}
```

### Run a check and record a finding

**Goal:** check acceptance point 4, that the count line lines up with the grid.

1. **Open the check.** From here on, every screenshot and action is filed under it.

   ```sh
   autonom pretest check begin chk-2
   ```

2. **Find where the line starts.** A find reads the screen once and never taps.

   ```sh
   autonom ui find --desc "7 items found"
   ```

3. **Find where the cards start.** The first card is the one to compare with.

   ```sh
   autonom ui find --desc "Merino yarn"
   ```

4. **Keep a screenshot.** It is the evidence the finding will cite.

   ```sh
   autonom screenshot --label alignment
   ```

5. **Close the check with its verdict.** The note says why, in plain words.

   ```sh
   autonom pretest check end chk-2 --verdict fail --note "count line starts 22 px right of the cards"
   ```

6. **Record the finding.** Expected against actual, with the screenshot as evidence.

   ```sh
   autonom pretest finding add --check chk-2 --severity minor --title "Count line is indented relative to the grid" --expected "the line lines up with the cards" --actual "the line starts at x=66 px, the cards at x=44 px" --evidence shot:2
   ```

You should see two left edges that differ, then a finding tied to the check and the screenshot.

*Output of autonom ui find and autonom pretest finding add*

```
$ autonom ui find --desc "7 items found"
      "desc": "7 items found", …, "bounds": [66, 320, 620, 380], …

$ autonom ui find --desc "Merino yarn"
      "desc": "Merino yarn", …, "bounds": [44, 420, 530, 900], …

$ autonom pretest finding add --check chk-2 --severity minor …
{
  "ok": true,
  …
  "finding_id": "f-1",
  "check_id": "chk-2",
  …
  "evidence": ["shot:2"],
  "confirmed": true,
  …
}
```

**What to look at.** The line's left edge is 66 and the card's is 44, so the check fails on a measured fact. `shot:2` is the second row of `autonom shots list`. A reference that names nothing is refused with [`evidence_ref_unknown`](https://autonom.yatsuk.me/docs/safety/index.md#evidence_ref_unknown), and nothing is written.

**Show full output**

```
$ autonom pretest finding add --check chk-2 --severity minor --title "Count line is indented relative to the grid" --expected "the line lines up with the cards" --actual "the line starts at x=66 px, the cards at x=44 px" --evidence shot:2
{
  "ok": true,
  "pretest_id": "pt_20261012T110703_b7cd7b",
  "finding_id": "f-1",
  "check_id": "chk-2",
  "origin": "agent",
  "source": null,
  "severity": "minor",
  "title": "Count line is indented relative to the grid",
  "expected": "the line lines up with the cards",
  "actual": "the line starts at x=66 px, the cards at x=44 px",
  "evidence": ["shot:2"],
  "confirmed": true,
  "data": {},
  "created_at": "2026-10-12T11:07:07.951Z",
  "journal_seq": 20,
  "reproduced": null,
  "stability": null,
  "repro_runs": [],
  "draft_flow": null
}
```

### See a risky tap refused

**Goal:** confirm a pre-test never buys, pays or deletes by accident.

1. **Try to tap Buy now.** The default forbidden list holds buy.

   ```sh
   autonom ui tap --desc "Buy now"
   ```

2. **Read the budget.** It shows what was counted and what was refused.

   ```sh
   autonom pretest status
   ```

You should see the tap refused, with only the earlier Catalog tap counted.

*Output of autonom ui tap and autonom pretest status*

```
$ autonom ui tap --desc "Buy now"
{"ok": false, "error_code": "forbidden_action", "error": "the tap target's desc matches the forbidden pattern 'buy'; no input was sent", "hint": "The pre-test forbids this action (--forbid-text). Do it by hand if it is really needed, or start the pre-test with different --forbid-text patterns.", …}

$ autonom pretest status
{
  …
  "actions_used": 1,
  "actions_limit": 300,
  "actions_left": 299,
  …
    "refusals": 1,
  …
}
```

**What to look at.** [`forbidden_action`](https://autonom.yatsuk.me/docs/safety/index.md#forbidden_action) says no input was sent. Only the Catalog tap counted; the finds and screenshots did not. Never work around a refusal with a nearby coordinate tap or a direct device command. Only the person who asked for the pre-test widens `--forbid-text`.

### Pack the result and send it back

**Goal:** seal the evidence, then record QA's decision beside it.

1. **Pack the pre-test.** It ends the pre-test, sets the verdict and writes the pack.

   ```sh
   autonom pretest pack --out packs/WB-1
   ```

2. **Verify the pack.** Every file is checked against its digest.

   ```sh
   autonom report verify packs/WB-1
   ```

3. **Send it back to the developer.** A return names the finding to fix.

   ```sh
   autonom pretest review packs/WB-1 return-to-dev --finding f-1 --note "count line not aligned with the grid"
   ```

You should see a failed verdict, a verified pack and a review written next to it.

*Output of autonom pretest pack, report verify and pretest review*

```
$ autonom pretest pack --out packs/WB-1
{"ok": true, "pack": "/private/tmp/autonom-pretest/app/packs/WB-1", …, "verdict": "fail", …, "files": 22, …}

$ autonom report verify packs/WB-1
{"ok": true, "pack": "packs/WB-1", "kind": "autonom.pretest-pack/v1", "files": 22, "nested": []}

$ autonom pretest review packs/WB-1 return-to-dev --finding f-1 --note "count line not aligned with the grid"
{"ok": true, …, "decision": "return-to-dev", …, "findings": ["f-1"], …, "path": "/private/tmp/autonom-pretest/app/packs/WB-1/annotations/review-1.json"}
```

**What to look at.** The verdict is `fail` because chk-2 failed. The third check never began, so `summary.md` lists it under Not covered. The review lands in `annotations/`, outside the sealed files, so the pack still verifies. A packed pre-test refuses changes with [`pretest_finalized`](https://autonom.yatsuk.me/docs/safety/index.md#pretest_finalized).

**Show full output**

```
$ autonom pretest pack --out packs/WB-1
{
  "ok": true,
  "pack": "/private/tmp/autonom-pretest/app/packs/WB-1",
  "integrity_sha256": "950ee60271bd70a5bac0db3fcc93308b9db043672ec6278599871644315702d9",
  "verdict": "fail",
  "idempotent": false,
  "pretest_id": "pt_20261012T110703_b7cd7b",
  "files": 22,
  "warnings": []
}

$ autonom report verify packs/WB-1
{
  "ok": true,
  "pack": "packs/WB-1",
  "kind": "autonom.pretest-pack/v1",
  "files": 22,
  "nested": []
}

$ autonom pretest review packs/WB-1 return-to-dev --finding f-1 --note "count line not aligned with the grid"
{
  "ok": true,
  "schema": "autonom.pretest-review/v1",
  "pretest_id": "pt_20261012T110703_b7cd7b",
  "pack_integrity_sha256": "950ee60271bd70a5bac0db3fcc93308b9db043672ec6278599871644315702d9",
  "decision": "return-to-dev",
  "note": "count line not aligned with the grid",
  "checks": [],
  "findings": ["f-1"],
  "confirm": [],
  "dismiss": [],
  "author": "qa",
  "created_at": "2026-10-12T11:07:09.509Z",
  "review_id": "review-1",
  "n": 1,
  "path": "/private/tmp/autonom-pretest/app/packs/WB-1/annotations/review-1.json"
}
```

### Reproduce these outputs

From the root of an Autonom checkout at tag v0.36.1 (commit ca2a280), in bash or zsh. Autonom's test device stands in for the emulator, and the catalog screen is a fixture the script writes. Ids, times and digests differ on every run. The `summary.md` excerpt in the first example comes from a real pre-test on an Android emulator and is not reproduced here.

*Script that reproduces the outputs*

```sh
S=$PWD W=/tmp/autonom-pretest
rm -rf $W && mkdir -p $W/app/lib/catalog $W/app/tickets && cd $W/app
export AUTONOM_HOME=$W/.autonom AUTONOM_FAKE_STATE=$W/fake-state.json
cat > $W/catalog.xml <<'X'
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<hierarchy rotation="0">
  <node index="0" text="" resource-id="" class="android.widget.FrameLayout" package="com.example.app" content-desc="" clickable="false" enabled="true" focusable="false" bounds="[0,0][1080,1920]">
    <node index="0" text="" resource-id="" class="android.widget.Button" package="com.example.app" content-desc="Filters" clickable="true" enabled="true" focusable="true" bounds="[629,177][1036,291]" />
    <node index="1" text="" resource-id="" class="android.view.View" package="com.example.app" content-desc="7 items found" clickable="false" enabled="true" focusable="true" bounds="[66,320][620,380]" />
    <node index="2" text="" resource-id="" class="android.view.View" package="com.example.app" content-desc="Merino yarn" clickable="true" enabled="true" focusable="true" bounds="[44,420][530,900]" />
    <node index="3" text="" resource-id="" class="android.view.View" package="com.example.app" content-desc="Alpaca blend" clickable="true" enabled="true" focusable="true" bounds="[550,420][1036,900]" />
    <node index="4" text="" resource-id="" class="android.widget.Button" package="com.example.app" content-desc="Buy now" clickable="true" enabled="true" focusable="true" bounds="[44,920][530,1020]" />
    <node index="5" text="" resource-id="" class="android.widget.Button" package="com.example.app" content-desc="Catalog" clickable="true" enabled="true" focusable="true" bounds="[243,1700][441,1820]" />
  </node>
</hierarchy>
X
echo "{\"ui_dump\": \"$W/catalog.xml\", \"pidof\": {\"com.example.app\": \"4242\"}}" > $AUTONOM_FAKE_STATE
printf 'class CatalogScreen {\n  Widget build() => grid;\n}\n' > lib/catalog/catalog_screen.dart
cat > tickets/WB-1.md <<'T'
# WB-1 Catalog: show the number of results

Acceptance criteria:
1. After the catalog loads with N >= 1 items, a line "N items found" shows above the grid.
2. With one item it reads "1 item found".
3. When loading fails and nothing is cached, only the error banner shows, with no count line.
4. The line is aligned with the grid and scrolls with it.
T
git init -q -b main && git add . && git -c user.name=demo -c user.email=demo@example.com commit -qm base
printf 'class CatalogScreen {\n  Widget build() => Column(children: [countLine, grid]);\n  Widget get countLine => Text(itemsFound(items.length));\n}\n' > lib/catalog/catalog_screen.dart
autonom() { python3 $S/scripts/autonom.py --adb $S/tests/fakes/fake_adb.py "$@"; }
autonom session start --serial emulator-5554 --app-id com.example.app --launch
autonom pretest start --ticket tickets/WB-1.md --base main --ticket-ref WB-1
autonom pretest context
autonom pretest kit
autonom pretest check add "Results show a count line above the grid" --kind ticket --why "acceptance point 1"
autonom pretest check add "The count line is aligned with the grid" --kind ticket --why "acceptance point 4"
autonom pretest check add "A failed load shows only the error banner" --kind ticket --case server-error --why "acceptance point 3 (also the kit case)"
autonom pretest check list
autonom pretest check begin chk-1
autonom ui tap --desc "Catalog"
autonom ui find --desc "7 items found"
autonom screenshot --label count-line
autonom pretest check end chk-1 --verdict pass --note "7 items found above the grid"
autonom pretest check begin chk-2
autonom ui find --desc "7 items found"
autonom ui find --desc "Merino yarn"
autonom screenshot --label alignment
autonom pretest check end chk-2 --verdict fail --note "count line starts 22 px right of the cards"
autonom ui tap --desc "Buy now"
autonom pretest finding add --check chk-2 --severity minor --title "Count line is indented relative to the grid" --expected "the line lines up with the cards" --actual "the line starts at x=66 px, the cards at x=44 px" --evidence shot:2
autonom pretest status
autonom pretest pack --out packs/WB-1
autonom report verify packs/WB-1
autonom pretest review packs/WB-1 return-to-dev --finding f-1 --note "count line not aligned with the grid"
autonom pretest review-status packs/WB-1
autonom session stop
```

## Good to know

- **Plan before you drive.** A check planned and never run shows up as not covered, instead of quietly vanishing.
- **Drive by meaning.** Tap by text or description and end each check with a `ui find` on the state you expect. A draft flow can be compiled from that; a coordinate tap cannot be.
- **Let the screen settle.** `ui find` reads once and never waits. After an action that loads, run `ui wait --settled` first.
- **Separate facts from guesses.** `--actual` says what was seen. A guess about the cause belongs in your report, marked as a guess.
- **Mocked data is marked.** A screenshot taken while a mock is active says "(mocked data)" in `summary.md`. Never present it as the real server's behavior.
- **Automatic findings are leads.** `pretest health`, `a11y` and `events` write unconfirmed findings. They never change a verdict until someone confirms one.
- **Repeated taps are slow.** Every guarded tap reads a fresh tree first, about 2.5 s each. A double-tap check passes only with an observed request count; otherwise it is inconclusive.
- **A missing environment is a finding, not a pass.** When a flow fails because the test machine lacks data or a server, record an info finding on that check and say so.
- **One pre-test per session.** A second start is refused with [`pretest_already_active`](https://autonom.yatsuk.me/docs/safety/index.md#pretest_already_active). An ended check cannot be ended again ([`no_open_check`](https://autonom.yatsuk.me/docs/safety/index.md#no_open_check)); add a finding instead.
- **No request that never answers, yet.** Shaping slows every request, and a mock cannot hold its answer. An unfinished request is not recorded either. Run the shaped version, judge the loading screen, and end the check inconclusive.
- **A Canvas tap with no origin counts as a person's.** In [Mobile Canvas](https://autonom.yatsuk.me/docs/canvas/index.md), input marked `human` is filed under the open check but never counted against the budget or refused by it. A person's first input also takes the device's control lease, so your agent's own commands are refused with [`control_held`](https://autonom.yatsuk.me/docs/safety/index.md#control_held) until Hand back or idle release. A script that drives Canvas without naming its origin is treated as a person on both counts, so it should name its origin as `agent`.
- **The control lease comes first.** It is checked before the pre-test guard, so a refused lease never uses budget. `pretest flows`, `repro`, `rerun` and `warmup` run under the lease like `flow run`, and a run interrupted by it makes its check `blocked`.

## After the pack

QA reads `summary.md`, or opens `index.html` from disk, and records one decision beside the pack: approve, more checks, or return to the developer. A return names at least one finding. QA can also confirm or dismiss an automatic finding. More checks starts a linked child pre-test with the pack's ticket and context. Its app, budget and safety rules come from the current session or the review's own flags, never from the pack.

A finding can become a regression check:

- `pretest flow-draft` compiles the finding's check into a draft flow, tagged `draft`, that covers the changed files and passes `flow check`. Read its last assertion before you trust it.
- `pretest repro` replays the draft 1 to 10 times and records how often the finding came back: stable, intermittent or not reproduced. A run that ends without a verdict stops it and records nothing.
- `pretest rerun` runs a pack's checks again on a new build, in a linked child pre-test. Its pack shows each check before and after; the first pack is only read.

A finding or check with nothing to replay is refused with [`draft_unavailable`](https://autonom.yatsuk.me/docs/safety/index.md#draft_unavailable).

## App profile and extra checks

An app profile tells the pre-test how to sign in and warm the app up. It lives in the app's repository at `.autonom/apps/<app-id>/profile.yaml`, or in your home folder at `~/.autonom/apps/<app-id>/profile.yaml`. `pretest context` says which one it used.

*An app profile, profile.yaml*

```
schema: autonom.pretest-profile/v1
login_flow: login.yaml                 # relative to this file's folder
warmup_flow: warmup.yaml
accounts:                              # environment variable NAMES, never values
  qa:                                  # names start with AUTONOM_ or PRETEST_
    user: PRETEST_QA_USER
    password: PRETEST_QA_PASSWORD
fixtures:
  product: Blue mug
flaky_screens: [Splash]
events:                                # rules for `autonom pretest events`
  - name: add_to_cart
    method: POST
    host: analytics.example.com        # or a glob: "*.example.com"
    path: "/v1/events*"                # glob over the path without its query
    body_key: event                    # dotted for nested JSON, or a form field
    body_value: add_to_cart
```

- **No secrets in a profile.** Accounts name environment variables, never values. A value that looks like a password or token refuses the whole profile with [`profile_invalid`](https://autonom.yatsuk.me/docs/safety/index.md#profile_invalid), naming the key, never the value.
- **Warm-up.** `pretest warmup` runs the login and warm-up flows, then walks recorded paths to the screens the diff may show. Each screen is reported as reached, unreplayable, known or unknown. It counts against the budget.
- **Accessibility.** With an `a11y` check open, `pretest a11y` flags controls without a label, tap targets under 48 dp on Android or 44 pt on iOS, and controls that share a label. It does not check contrast or reading order.
- **Analytics.** With traffic captured and an `analytics` check open, `pretest events` matches the profile's event rules against the requests. It reports matched, missing and unexpected events, and never copies a request body value. Without capture the result is unavailable; end that check blocked.

## Reference

Every verb answers in JSON. An expected refusal exits 2 with an `error_code` and a `hint`.

| Command | What it does |
| --- | --- |
| `autonom pretest start --ticket FILE\|- --base REF` | Starts one pre-test in the current session. `--max-actions`, `--max-minutes`, `--forbid-text` and `--allow-app` set the guard rails; `--forbid-text` replaces the default list. |
| `autonom pretest context` | The changed files and lines, the selected flows, the files no flow covers, screen hints and the app profile. |
| `autonom pretest kit` | The 18 edge cases, and their coverage once checks exist. |
| `autonom pretest check add <title> --kind KIND [--case KIT-ID] [--why TEXT]` | Plans a check. Kinds: `ticket`, `edge`, `regression`, `network`, `a11y`, `analytics`. |
| `autonom pretest check begin <check-id>` | Opens a check. One check is open at a time. |
| `autonom pretest check end <check-id> --verdict V [--note TEXT]` | Closes it with one of the five verdicts. An ended check never reopens. |
| `autonom pretest flows` | Runs each selected flow as a regression check: passed is pass, failed is fail, broken is blocked. |
| `autonom pretest finding add --check ID --severity S --title T --actual T [--expected T]` | Records a finding: blocker, major, minor or info. `--evidence REF` (repeatable) cites a shot, tree, action, request, log range, run or crash. |
| `autonom pretest status` | Actions and minutes used and left, the open check, counts and refusals. |
| `autonom pretest health` | New crashes, error log groups, failed requests and metric leads since the start, as automatic findings. |
| `autonom pretest pack [--out DIR]` | Ends the pre-test, sets the verdict and writes `summary.md`, `summary.json` and an offline `index.html`, sealed. Packing again returns the same pack. |
| `autonom report verify <pack>` | Checks every file of the pack, nested flow bundles included. |
| `autonom pretest review <pack> <approve\|more-checks\|return-to-dev>` | Records QA's decision beside the pack. `review-status` reads it back. |
| `autonom pretest flow-draft <finding-id>` | Compiles the finding's check into a draft flow under `.autonom/flows/drafts/`. |
| `autonom pretest repro <finding-id> --times N` | Replays the draft N times, 1 to 10, on the active pre-test. |
| `autonom pretest rerun <pack> [--check ID]...` | Reruns checks on the current build in a linked child pre-test. |
| `autonom pretest warmup` | The profile's login and warm-up flows, then the hinted screens. |
| `autonom pretest a11y [--check ID]` | Accessibility rules on the current screen. |
| `autonom pretest events [--check ID]` | The profile's analytics rules against the captured requests. |
| `autonom pretest stop` | Closes the pre-test without a pack; `pretest pack` can still pack it later. `pretest list` shows the session's pre-tests. |

### The edge-case kit

`--case` takes one of these ids. Undo each setup before the next check. When a case cannot be set up on the target, end its check `not_covered` with the reason.

| Case | How it is set up |
| --- | --- |
| `offline` | No network: `simulator network offline`, then `online`. |
| `slow` | A slow network: `simulator network shape` at edge speed, then full. |
| `server-error` | A 5xx: capture on, then a `network mock add` with status 500. |
| `timeout` | A request that never answers: capture on, the network shaped to GSM speed. |
| `background-resume` | Home, then `session launch` of the app. |
| `process-death` | `session force-stop`, then `session launch`. |
| `rotation` | A flow step `setOrientation`: landscape, then portrait. |
| `dark-mode` | `simulator appearance dark`, then light. |
| `large-text` | `simulator text-size`: 1.3 on Android, accessibility-extra-large on iOS. |
| `locale` | Another locale: `simulator keyboard pin`, then reset. |
| `permission-denied` | `permissions revoke`, then reset. |
| `empty-input` | Submit a form with the field left empty. |
| `long-input` | Type 500 characters into the field. |
| `emoji-input` | Type text with emoji. |
| `rtl-input` | Type right-to-left text. |
| `double-tap` | Tap the same button twice, quickly. |
| `fast-back` | Start an action, then Back while it loads. |
| `deep-link` | `open` the app link, then again after a force-stop. |

## Android and iOS differences

The playbook, verdicts and pack are the same on both. What differs is which edge cases a target can set up, and what the guard rails can check.

| Capability | Android | iOS |
| --- | --- | --- |
| Offline, slow and timeout cases | Yes, on an emulator | Refused with [`unsupported_capability`](https://autonom.yatsuk.me/docs/safety/index.md#unsupported_capability) |
| Locale case | No | Yes |
| Rotation and fast Back cases | Yes | No |
| A link checked against allowed apps | Yes; a link that would open the app chooser is refused | Counted, not checked: iOS cannot say which app takes a link |
| Smallest tap target in `a11y` | 48 dp | 44 pt |

## Next steps

Your agent can pre-test a ticket and hand QA a pack it can check.

- [Flows](https://autonom.yatsuk.me/docs/flows/index.md): Turn a draft from a finding into a flow that runs on every change.
- [Network](https://autonom.yatsuk.me/docs/network/index.md): Force a 500 for the server-error case.
- [Evidence](https://autonom.yatsuk.me/docs/evidence/index.md): Take screenshots that prove a change.
- [Safety and errors](https://autonom.yatsuk.me/docs/safety/index.md): Read every refusal by its code.