Give AI the evidence it needs

A device run can show that something went wrong. Finding out why requires a closer look inside the running system.

Reproduce before diagnosing

An agent can build a convincing diagnosis from an incomplete bug report. That is exactly what makes incomplete evidence dangerous: several explanations can fit the same sentence.

Imagine the report says, "The dashboard sometimes shows yesterday's data after login." The source code offers plenty of suspects. The response may be stale. Persistent storage may hold yesterday's value. The state store may survive longer than expected. Navigation may reuse the screen, or a timing issue may let old data win a race.

Reading more code will not reliably choose between them. The agent needs to reproduce the failure and observe the app while it happens.

Start by recording the command, device, build type, environment, application state, and exact behavior. Keep the smallest log window that still includes the failure and the events leading into it.

Expose the right runtime evidence

Then give the agent access to the evidence that fits the investigation:

  • Runtime logs from the JavaScript and native layers
  • React component state and product-specific business state
  • Network requests, responses, headers, and timings
  • Nonvolatile storage such as key-value or secure storage
  • Redux, Zustand, or other state-store snapshots and action history
  • Performance traces, frame data, memory, and CPU measurements
  • Build output, crash reports, and stack traces
  • Device recordings

Runtime inspection tools open parts of the system that source code cannot show. Rozenite adds panels and agent tools to React Native DevTools. Depending on the installed plugins and app-specific integrations, an agent can inspect console and network activity, storage, React profiles, memory snapshots, navigation, query caches, Redux state, and custom business state from the running app. Zustand and other stores can appear through the Redux DevTools integration or a custom plugin.

That access should be deliberate. Runtime state may contain tokens, personal data, or sensitive payloads. Sanitize or denylist sensitive fields, use development accounts, and expose only the tools the investigation needs.

State shortcuts · Appduct

What it establishes and its limit

Prepare allowlisted test state in development or approved testing builds; device checks establish visible behavior

Device verification · agent-device / Maestro

What it establishes and its limit

Interact and inspect the resulting UI; a successful tap alone proves input was sent

Runtime inspection · Rozenite

What it establishes and its limit

Inspect request, state, and log evidence available through installed plugins and integrations

Device leasing · Simlock

What it establishes and its limit

Reserve the device; isolation is advisory when commands can bypass the lease

Make hypotheses answer to evidence

Reproduce, record, test a hypothesis, fix and remeasure; disproof returns to the hypothesis.
Figure 19. Every hypothesis must name the check that could disprove it.

Ask the agent to connect every hypothesis to evidence. It should say which observation supports the suspected cause, what would disprove it, and which check should run next. A diagnosis that can be disproved is far more useful than a plausible story about the code.

Measure again after the fix. Compilation proves that the code builds. It cannot prove that the stale dashboard disappeared. Performance work needs the same before-and-after discipline under comparable conditions.