> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reticle.sh/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Reticle is a dev-only, localhost-only verification layer for AI coding agents. It reads program truth (network, state, console, routing, animations, framework state) from inside a running web app and returns a deterministic verdict with evidence. It is not a screenshot tool and not a browser automation library.
> Only `reticle_act_and_wait` and `reticle_assert` produce a verdict. Every other tool moves or reads the app and proves nothing. A drive that ends without one of those two has no result, however many tools it used.
> A verdict of `verified: "unknown"` is not a pass. It means Reticle drove the app and could not tell what happened. Report it as unknown; never weaken a check to make it pass.
> Package names are scoped `@reticlehq/*` and the CLI is `reticle`. Install with `npx reticle init`. The complete tool surface is on the `/usage` page; `/agent-cheatsheet` is the one-screen version.

# Beyond the verify loop

> Coverage, storage, fake clocks, autonomous crawling, visual diffing and network mocking. What Reticle does once look-act-observe-assert is not enough.

Most of the time you want the verify loop. Look, act, observe, assert.

These are the tools for the times you want something else, and they are the ones people are most surprised exist. All of them live in the cold tail, reachable through [`reticle_run`](/tools-tools-and-run).

## Available anywhere

These work through the always-on SDK, in any connected session.

### Coverage: what you have not driven yet

```json theme={"dark"}
{ "tool": "reticle_coverage" }
```

```json theme={"dark"}
{
  "total": 3,
  "exercised": 0,
  "untouched": [
    { "ref": "e3", "label": "textbox \"Email\"" },
    { "ref": "e4", "label": "textbox \"Password\"" },
    { "ref": "e5", "label": "button \"Sign in\"" }
  ]
}
```

Not code coverage. Control coverage: which interactive elements this session has actually touched.

Useful at the end of a drive, when the agent is about to report success. "I verified the page" reads differently next to `exercised: 0`.

### Storage: the persistence layer

```json theme={"dark"}
{ "tool": "reticle_storage" }
```

```json theme={"dark"}
{
  "local": {},
  "session": { "__reticle_ref_base": "100", "__reticle_session": "lease-0cee1313…" },
  "cookies": {}
}
```

localStorage, sessionStorage and readable cookies.

This is where the "logged in but nothing persisted" bug lives. A login can fire its success signal, mutate state, and write nothing. Reload, and you are back at the login screen.

<Tip>
  `storageKeysChanged` already appears in every `act_and_wait` summary, so you often do not need
  this tool. Read it there first.
</Tip>

### Clock: freeze time, skip the wait

```json theme={"dark"}
{ "tool": "reticle_clock", "args": { "freeze": true } }
```

```json theme={"dark"}
{ "frozen": true }
```

```json theme={"dark"}
{ "tool": "reticle_clock", "args": { "advanceMs": 5000 } }
{ "tool": "reticle_clock", "args": { "reset": true } }
```

Toasts that auto-dismiss, debounced search, polling, session timeouts, retry backoff. All of these are normally verified by sleeping, which is slow and flaky in equal measure.

Freeze the clock, advance it by exactly the interval, assert the consequence. No sleeping, no guessing, and the same result on a fast laptop and a loaded CI runner.

### Crawl: click everything, report anomalies

```json theme={"dark"}
{ "tool": "reticle_crawl", "args": { "maxSteps": 6 } }
```

```json theme={"dark"}
{
  "interactiveFound": 3,
  "stepsRun": 3,
  "anomalies": [],
  "counts": { "consoleErrors": 0, "failedRequests": 0, "deadControls": 0, "contradictions": 0 },
  "visited": ["- textbox \"Email\"", "- textbox \"Password\"", "- button \"Sign in\""],
  "truncated": false
}
```

Autonomously clicks every reachable control and reports what went wrong. No script, no plan. The counts are the useful part: `deadControls` and `contradictions` are the two that indicate a real problem rather than a busy page.

This is the tool for an app you did not write and do not understand yet.

<Warning>
  It clicks **everything**, so point it at a dev environment. `maxSteps` bounds it, defaulting to
  25\.
</Warning>

### Reconcile: what the API said versus what rendered

```json theme={"dark"}
{ "tool": "reticle_reconcile" }
```

Compares the data an endpoint returned against what the page actually displays.

The bug it catches is specific and common: the API returned ten rows, the table shows nine, and nothing errored. Neither the network log nor the DOM is wrong on its own. Only the comparison is.

### Domain: which of your flows actually prove anything

The most useful tool nobody knows about.

```json theme={"dark"}
{ "tool": "reticle_domain" }
```

```json theme={"dark"}
{
  "flowCount": 47,
  "coverage": { "asserted": 14, "presenceOnly": 2, "assertionFree": 31 },
  "gaps": {
    "declaredUntestedSignals": [
      "deploy:created",
      "deploy:shipped",
      "modal:opened",
      "toast:shown",
      "…"
    ],
    "declaredUntestedTestids": ["deploy-submit", "drawer", "palette", "…"]
  },
  "summary": "47 flows: 14 asserted, 2 presence-only, 31 assertion-free. 13 declared signal(s) no flow asserts. 33 flow(s) assert no consequence."
}
```

Read that summary again. Thirty-one of forty-seven flows **assert no consequence**, which means they replay green whatever the app does. That is a suite that looks like coverage and is not.

Each flow comes back graded, with the consequence that must hold and a risk level:

```json theme={"dark"}
{
  "name": "deploy-journey",
  "grade": "asserted",
  "mustHold": "nav:changed",
  "risk": { "level": "high", "reason": "last run drifted", "lastStatus": "drift" }
}
```

```json theme={"dark"}
{
  "name": "console-compose",
  "grade": "assertion-free",
  "warning": "This flow performs actions but asserts no observable consequence — it will pass even if the feature is broken. Add a consequence assertion with reticle_annotate (assert-signal / assert-net) or a success-state."
}
```

`declaredUntestedSignals` is the other half: signals your app emits that no flow ever checks. It is a to-do list for your test suite, generated from what the app says about itself.

<Tip>
  Run this before writing a new flow. It tells you what is already covered, what is covered badly,
  and which declared signal has never been asserted. All three are better starting points than
  guessing.
</Tip>

### Baselines: semantic snapshots, not pixels

```json theme={"dark"}
{ "tool": "reticle_baseline", "args": { "action": "save", "name": "checkout-empty" } }
{ "tool": "reticle_baseline", "args": { "action": "diff", "name": "checkout-empty" } }
```

Records the meaningful state of a page and compares later. Structure and content rather than pixels, so a font change does not fail your check and a missing row does.

## Needs a driven browser

Four tools apply their effects through the Chrome DevTools Protocol. The always-on SDK cannot do that, so they need a browser Reticle is driving.

<Warning>
  **A pooled lease is not enough.** Verified: acquiring one with `reticle_lease` and calling these
  still returns `{ "ok": false, "reason": "no-cdp-provider" }` and `"no-visual-provider"`.

  Point `RETICLE_CDP_URL` at a Chrome started with `--remote-debugging-port`. That is currently the reliable route.
</Warning>

### Screenshots and visual diffing

```json theme={"dark"}
{ "tool": "reticle_screenshot", "args": { "name": "login-baseline" } }
{ "tool": "reticle_visual_diff", "args": { "baseline": "login-baseline" } }
```

<Warning>
  Note the asymmetry. `reticle_screenshot` names the baseline with **`name`**; `reticle_visual_diff`
  refers to it with **`baseline`**. Passing `name` to the diff is rejected, and it is an easy
  mistake to make twice.
</Warning>

`fullPage` captures the whole scroll height. `ref` or `clip` scopes to one element or region. `threshold` sets the pixel-difference tolerance, defaulting to `0.01`, and `masks` excludes regions that are expected to change.

Reticle reads program truth, not pixels, so this is the deliberate exception: a font that failed to load or a compositing glitch is only visible in the actual frame.

### Viewport pinning

```json theme={"dark"}
{ "tool": "reticle_viewport", "args": { "width": 1280, "height": 800 } }
```

Fixes the viewport so a visual baseline is reproducible across machines. Without it, a diff taken on a laptop and re-run in CI compares two different layouts and fails for a reason nobody wants to debug.

### Network mocking

```json theme={"dark"}
{
  "tool": "reticle_network_mock",
  "args": { "mocks": [{ "urlContains": "/api/deploys", "status": 500 }] }
}
```

Return a 500, force offline, or delay a response. First matching rule wins. `clear: true` turns it off.

Most error states have never actually run. This is how you find out whether yours works, without touching the backend or waiting for a real outage to tell you.

## Flows: record once, replay forever

The loop closer, and the reason Reticle is not only an interactive tool.

```json theme={"dark"}
{ "tool": "reticle_record", "args": { "action": "start", "recordingName": "ship-a-deploy" } }
{ "tool": "reticle_record", "args": { "action": "stop", "recordingName": "ship-a-deploy" } }
{ "tool": "reticle_flow_save", "args": { "flowName": "ship-a-deploy" } }
{ "tool": "reticle_flow_verify" }
```

<Warning>
  The argument names are not interchangeable. `reticle_record` takes **`recordingName`**,
  `reticle_flow_save` takes **`flowName`**, and neither accepts `name`. Reticle rejects the call
  rather than guessing, which is the right call and still costs you a turn.
</Warning>

Stopping a recording returns a **large** payload. A one-click recording came back at roughly 63,000 characters, and 69,000 of the 70,000 were the raw `events` array. There is currently no way to cap it: `max_events` and `filters` are rejected, even though the response's own `cost.recommendation` suggests them.

The parts you actually want are tiny. Read these and ignore the rest:

```json theme={"dark"}
{
  "program": { "name": "ship-a-deploy", "steps": [{ "tool": "reticle_act", "stable": true, "args": { … } }] },
  "proposedConsequences": [
    { "predicate": { "kind": "signal", "name": "auth:granted" }, "tier": 0, "label": "signal \"auth:granted\" fires" },
    { "predicate": { "kind": "state", "store": "app", "path": "auth" }, "tier": 1, "label": "state \"app\" changes" },
    { "predicate": { "kind": "net", "method": "POST", "urlContains": "/api/login", "status": 200 }, "tier": 1, "label": "POST /api/login responds" }
  ],
  "summary": { "total": 440, "network": 1, "consoleErrors": 0, "signals": 1 }
}
```

`proposedConsequences` is the useful part and the reason to record at all. Reticle watched the interaction and worked out what would have proved it, ranked by strength. Tier 0 is the app's own signal. You do not have to invent the assertion; you pick one.

### Saving and replaying

```json theme={"dark"}
{ "tool": "reticle_flow_save", "args": { "flowName": "ship-a-deploy" } }
```

```json theme={"dark"}
{
  "name": "ship-a-deploy",
  "stepCount": 1,
  "assertions": {
    "grade": "assertion-free",
    "warning": "This flow performs actions but asserts no observable consequence — it will pass even if the feature is broken."
  }
}
```

Reticle grades the flow as you save it, and tells you when you have just created a test that cannot fail. Take the warning seriously: an assertion-free flow replays green whatever the app does.

A replay against a drifted app names what moved and where:

```json theme={"dark"}
{
  "status": "drift",
  "decision": {
    "whatChanged": "testid \"login-submit\" not found",
    "whereInSource": "src/components/Login.tsx:81",
    "suggestedFix": "rebind the anchor to \"sign-out\" (closest survivor)"
  }
}
```

`reticle_flow_heal` proposes the rebind. It refuses when it is not confident:

```json theme={"dark"}
{
  "status": "unhealable",
  "applied": false,
  "message": "drift found, but no nearest match cleared the confidence floor (HEAL_CONFIDENCE_MIN=0.5); file left untouched — add a data-testid or fix the flow by hand"
}
```

Flows live in `.reticle/` as human-readable files, so they are reviewed in pull requests and diffed like code. They anchor on meaning, a testid plus a signal, rather than volatile refs or coordinates.

<Card title="Flows in full" icon="repeat" href="/flows">
  Recording, replay, self-healing, and what lives in `.reticle/`.
</Card>

## Handing results to something else

### The CI artifact

```json theme={"dark"}
{ "tool": "reticle_run_export" }
```

```json theme={"dark"}
{
  "schemaVersion": 1,
  "runId": "11fd8ee9-2820-4bfa-bfe3-e4eeb111af26",
  "durationMs": 41968,
  "project": { "name": "reticle", "framework": "other" },
  "agent": { "id": "reticle-mcp", "kind": "coding-agent" },
  "flows": [
    { "name": "suite-404", "status": "pass", "steps": 3, "oracle": "fault:injected" },
    {
      "name": "deploy-journey",
      "status": "fail",
      "steps": 1,
      "failureReason": "testid \"login-submit\" not found"
    }
  ],
  "verdict": { "status": "partial", "confidence": "high", "blockingRisks": 0 }
}
```

A versioned, machine-readable record of a verification run. This is what you hand to CI, a dashboard, or a platform embedding Reticle in its pipeline.

`oracle` on a passing flow names the consequence that made it a pass, so a green row says what it proved rather than only that it was green.

### The capability contract

```json theme={"dark"}
{ "tool": "reticle_contract_save" }
```

```json theme={"dark"}
{ "saved": true, "path": ".reticle/contract.json", "testidCount": 49, "signalCount": 16 }
```

Persists the app's live capability registry to a git-checked file. A fresh agent can read it without booting the app, and a diff shows when someone removes a signal something depended on.

### Talking to the human

```json theme={"dark"}
{ "tool": "reticle_session", "args": { "action": "narrate", "text": "Checking the deploy flow." } }
{ "tool": "reticle_session", "args": { "action": "review" } }
```

`narrate` writes a line into the presenter panel, so the person watching knows what you are doing. `review` drains the bugs they pinned on elements from that panel:

```json theme={"dark"}
{ "marks": [], "pendingCount": 0 }
```

An empty list here is a real reading, not a missing one.

## Discovering the rest

```json theme={"dark"}
{ "tool": "reticle_tools" }
```

Returns every tool with a one-line summary, and the profile currently in force. Load the full argument grammar for the ones you want before calling them:

```json theme={"dark"}
{ "names": ["reticle_network_mock", "reticle_clock"] }
```

<Tip>
  Do this rather than guessing at arguments. Reticle refuses a call with unknown parameters rather
  than running it, and says why: *"NOT applied, so any result would be an answer to a different
  question."* Good behaviour, but a wasted turn you can skip.
</Tip>
