App Bug Forensics
Use this skill when a user reports a bug, screenshot, intermittent failure, or
confusing app behavior. The goal is root cause first, patch second.
Workflow
Preserve the symptom.
- Identify the exact screen, action sequence, visible message, and affected
data scope.
- Inspect screenshots and logs when available.
- Do not assume the visible error string names the real failing component.
Trace the path.
- Follow the request from UI event to state store, API client, backend route,
persistence, sidecar/process boundary, and external provider when relevant.
- Search for all places that can set the visible error state.
- Check whether the failing request still belongs to the current selection.
- For AI failures, identify the exact provider, model, transport, profile,
credential source, timeout, and whether the request reached the provider.
Classify likely root cause.
- Stale async request or route watcher race.
- Frontend/backend version mismatch or old sidecar process.
- Missing optional capability being treated as fatal.
- Provider protocol, model, key, base URL, or auth mismatch.
- Default AI profile being added when the user selected another profile.
- Long-running provider request blocked behind an unclosable dialog.
- Provider request timed out locally after remote token usage already began.
- Background job result, status, reconnect, or cancellation state was lost.
- Saved credential/profile source disappeared or was overwritten by another
profile.
- Data migration/path/access issue.
- UI overlay, selection, scrolling, or layout state bug.
- Result view was hidden or discarded by navigation instead of explicit
clearing.
- Installer or process lifecycle half-update.
Reproduce minimally.
- Prefer a focused test or local run over broad speculation.
- If the issue is intermittent, add timing, request tokens, or controlled
mocked delays to reproduce the race.
- If external provider behavior is suspected, separate mock branch tests
from one real minimal connectivity test.
- For charged or slow provider paths, do not auto-retry the full generation
while investigating. Probe status and run only minimal real requests.
Fix the cause.
- Ignore stale results instead of showing stale errors.
- Translate current real errors into user-facing copy.
- Keep optional feature failures local to their own UI area.
- If a request may already be running remotely, reconnect to local job state
rather than resending the provider call.
- Preserve completed AI results until the user explicitly clears or replaces
them.
- Preserve user data; do not "fix" by deleting local state unless the user
explicitly asks.
Lock the regression.
- Add the narrowest meaningful test for the bug shape.
- Include a manual acceptance path when the bug depends on installer,
provider, OS, or real browser behavior.
- Report what was reproduced, what was fixed, and what remains only manually
verified.
Reference Use
Read references/app-quality-principles.md when the bug involves user-visible
errors, provider tests, storage, startup, or UI state.
Read references/living-to-tell-casebook.md when the bug resembles raw
Not Found, Failed to fetch, provider 403 HTML, sidecar leftovers, stale
article/reference selection, startup black windows, data location confusion, or
duplicate anchors/excerpts, AI result hiding, provider timeout after token use,
profile key isolation, or background job recovery.
Red Lines
- Do not hide a current valid failure by catching and ignoring every exception.
- Do not claim the issue is fixed because a mock test passes.
- Do not use fake data, fake provider success, or broad fallback behavior to
make a test pass while the real user workflow remains broken.
- Do not expose API keys, auth files, private text, or raw provider HTML in the
final report.
1---2name: app-bug-forensics3description: Use when diagnosing or fixing user-reported application bugs. Guides evidence-backed root-cause analysis from symptoms, screenshots, logs, provider failures, background tasks, storage, or desktop lifecycle behavior through a scoped patch and regression tests.4license: MIT5---67# App Bug Forensics89Use this skill when a user reports a bug, screenshot, intermittent failure, or10confusing app behavior. The goal is root cause first, patch second.1112## Workflow13141. Preserve the symptom.15 - Identify the exact screen, action sequence, visible message, and affected16 data scope.17 - Inspect screenshots and logs when available.18 - Do not assume the visible error string names the real failing component.19202. Trace the path.21 - Follow the request from UI event to state store, API client, backend route,22 persistence, sidecar/process boundary, and external provider when relevant.23 - Search for all places that can set the visible error state.24 - Check whether the failing request still belongs to the current selection.25 - For AI failures, identify the exact provider, model, transport, profile,26 credential source, timeout, and whether the request reached the provider.27283. Classify likely root cause.29 - Stale async request or route watcher race.30 - Frontend/backend version mismatch or old sidecar process.31 - Missing optional capability being treated as fatal.32 - Provider protocol, model, key, base URL, or auth mismatch.33 - Default AI profile being added when the user selected another profile.34 - Long-running provider request blocked behind an unclosable dialog.35 - Provider request timed out locally after remote token usage already began.36 - Background job result, status, reconnect, or cancellation state was lost.37 - Saved credential/profile source disappeared or was overwritten by another38 profile.39 - Data migration/path/access issue.40 - UI overlay, selection, scrolling, or layout state bug.41 - Result view was hidden or discarded by navigation instead of explicit42 clearing.43 - Installer or process lifecycle half-update.44454. Reproduce minimally.46 - Prefer a focused test or local run over broad speculation.47 - If the issue is intermittent, add timing, request tokens, or controlled48 mocked delays to reproduce the race.49 - If external provider behavior is suspected, separate mock branch tests50 from one real minimal connectivity test.51 - For charged or slow provider paths, do not auto-retry the full generation52 while investigating. Probe status and run only minimal real requests.53545. Fix the cause.55 - Ignore stale results instead of showing stale errors.56 - Translate current real errors into user-facing copy.57 - Keep optional feature failures local to their own UI area.58 - If a request may already be running remotely, reconnect to local job state59 rather than resending the provider call.60 - Preserve completed AI results until the user explicitly clears or replaces61 them.62 - Preserve user data; do not "fix" by deleting local state unless the user63 explicitly asks.64656. Lock the regression.66 - Add the narrowest meaningful test for the bug shape.67 - Include a manual acceptance path when the bug depends on installer,68 provider, OS, or real browser behavior.69 - Report what was reproduced, what was fixed, and what remains only manually70 verified.7172## Reference Use7374Read `references/app-quality-principles.md` when the bug involves user-visible75errors, provider tests, storage, startup, or UI state.7677Read `references/living-to-tell-casebook.md` when the bug resembles raw78`Not Found`, `Failed to fetch`, provider 403 HTML, sidecar leftovers, stale79article/reference selection, startup black windows, data location confusion, or80duplicate anchors/excerpts, AI result hiding, provider timeout after token use,81profile key isolation, or background job recovery.8283## Red Lines8485- Do not hide a current valid failure by catching and ignoring every exception.86- Do not claim the issue is fixed because a mock test passes.87- Do not use fake data, fake provider success, or broad fallback behavior to88 make a test pass while the real user workflow remains broken.89- Do not expose API keys, auth files, private text, or raw provider HTML in the90 final report.