AI Bug Analysis
AI analyzes your bug report together with the runtime context captured by the Snapbug SDK — bug description, voice note, timeline of user interactions, and device state — and returns a structured analysis: a root cause hypothesis, concrete fix recommendations for your developers, steps to reproduce, and QA notes.
Analysis runs through the Snapbug local service on your machine, using the AI provider you configure (Claude CLI, Codex CLI, OpenAI, Anthropic API, OpenRouter, Ollama, or any OpenAI-compatible endpoint). Your data goes directly from your machine to your provider — never through Snapbug servers.
How It Works
- Bug report — a report arrives from the SDK or Recorder with a description and optional voice note (transcribed automatically).
- Runtime context — the report carries timeline events (user interactions captured before the report) and device context from the SDK.
- AI analysis — the local service builds a prompt from all of this and calls your configured AI provider.
- Structured output — the response is parsed into root cause analysis, fix recommendations, steps to reproduce, and QA notes.
Output Structure
Each analysis includes:
| Section | Description |
|---|---|
| Root Cause Analysis | What is likely going wrong and why |
| Fix Recommendations | Concrete steps a developer should take, including file names, class names, or code patterns to look for where they can be inferred |
| Steps to Reproduce | Numbered steps describing how to trigger the bug |
| QA Notes | What to verify after the fix and edge cases to check |
Example Output
Root Cause Analysis:
The toggle state is being overwritten by a stale server response.
The PUT request to /api/user/preferences returns the old value,
and the UI rebinds to the response instead of the local state.
Fix Recommendations:
Look for the preferences repository (e.g. PreferencesRepository or a
similar class handling /api/user/preferences). Apply an optimistic
update: set the local state immediately and only revert on failure,
instead of rebinding to the server response.
Steps To Reproduce:
1. Open Settings
2. Navigate to Account > Privacy
3. Toggle the "Share Analytics" switch
QA Notes:
After the fix, verify the toggle persists across app restarts and
that a failed request reverts the toggle with an error message.
Check the behavior on a slow network connection.Ask AI
Beyond one-shot analysis, Ask AI is a multi-turn chat about your app and its codebase — built for PMs, QA engineers, and owners who want answers without opening an IDE:
- Ask questions in the context of the current screen and connected device.
- Attach a screenshot of the app to the conversation.
- The AI reads your project's source code from a branch you select — locally, via the Snapbug local service.
- Choose a persona (PM, QA, or Owner) to tune the depth and framing of answers.
Requirements
- The Snapbug local service must be running (analysis executes on your machine).
- An AI provider configured in AI Settings — a CLI agent (Claude CLI, Codex CLI) or an API key for a hosted model.
- For richer analysis, integrate the SDK plugins that capture runtime data (Network, Crash Reporter, Analytics) and enable timeline capture.
Limitations
The analysis is an AI-generated hypothesis. Always review recommendations before acting on them — the AI may not have full context of your architecture or business logic.
- Bug analysis works from runtime data and does not read your source code; fix recommendations point at likely code areas by pattern. (Ask AI, by contrast, does read your code locally.)
- Output quality depends on the quality of the report: descriptions, voice notes, and timeline events all improve results.
- Automated fix application is on the roadmap, but today Snapbug intentionally stops at analysis — you stay in control of every code change.