Prompt file imported from koreyba/EverFreeNote (
.github/prompts/debug.prompt.md). Copyright stays with the author.
Help me debug an issue. Clarify expectations, identify gaps, and agree on a fix plan before changing code.
- Gather Context — If not already provided, ask for: issue description (what is happening vs what should happen), error messages/logs/screenshots, recent related changes or deployments, and scope of impact.
- Use Memory for Context — Search memory for similar incidents/fixes before deep investigation:
npx ai-devkit@latest memory search --query "<issue symptoms or error>". - Clarify Reality vs Expectation — Restate observed vs expected behavior. Confirm relevant requirements or docs that define the expectation. Define acceptance criteria for the fix.
- Reproduce & Isolate — Determine reproducibility (always, intermittent, environment-specific). Capture reproduction steps. List suspected components or modules.
- Analyze Potential Causes — Brainstorm root causes (data, config, code regressions, external dependencies). Gather supporting evidence (logs, metrics, traces). Highlight unknowns needing investigation.
- Resolve — Present resolution options (quick fix, refactor, rollback, etc.) with pros/cons and risks. Ask which option to pursue. Summarize chosen approach, pre-work, success criteria, and validation steps.
- Store Reusable Knowledge — Save root-cause and fix patterns via
npx ai-devkit@latest memory store .... - Next Command Guidance — After selecting a fix path, continue with
/execute-plan; when implemented, use/check-implementationand/writing-test.