From errors to minimal fixes — AI pairs; you run tests and own the change
Complete: explain error → minimal fix → local verify → one acceptance/test idea
~25 min
Suggested tool: DeepSeek
This scene trains a pair-debugging loop — not “rewrite my whole repo.” Fixed order: explain error → minimal fix → regression check idea → walkthrough so you understand → (optional) break a feature into tasks. Good for: frontend/script errors, short confusing functions, turning vague asks into steps. Never paste API keys, `.env`, prod connection strings, or private customer logs into cloud chat. Example: `TypeError: Cannot read properties of undefined (reading 'map')` with `const items = data.list; return items.map(...)`. Acceptable: plain-language root cause; a 5–15 line guard/default; how to reproduce locally; no drive-by refactors. Tool pick: Cursor/Copilot in the IDE; DeepSeek/ChatGPT for paste-the-error Q&A. Verify pricing on official sites.
You are a senior engineer mentoring a careful beginner. Stack: browser JavaScript / React Expected behavior: Show empty state when list is missing — no white screen Error: TypeError: Cannot read properties of undefined (reading 'map') Code: const items = data.list; return items.map((x) => x.name) Output: 1) Plain-language root cause 2) 1–2 most likely triggers 3) Minimal local reproduce steps (3–5) 4) No full rewrite yet; if code must change, say which lines and why Never ask for real secrets — placeholders only.
Outcome checklist
Self rating (1–5)
Given the agreed root cause, propose a **minimal** fix. Stack: [stack] Goal: [goal] Error: [error] Code: [code] Rules: - Prefer a 5–20 line change; no unrelated refactors - Show the patched snippet (mark // changed) - List verification steps - State which edge cases this does NOT cover If blocked, ask ≤3 questions — don’t invent APIs.
Design acceptance for this fix. Stack: [stack]. Bug summary: [error] Key code after fix: [code] Provide: 1) One automated test idea (name + Arrange/Act/Assert), pseudocode OK 2) Two manual checks 3) One intentional failing case that proves the guard works No giant unrelated test suites.
Teach a walkthrough of this code (no flashy rewrite). Stack: [stack] My goal: [goal] Code: [code] Output: 1) What it does (≤5 lines) 2) Data flow in → out 3) Three edge/failure points 4) Two short quiz questions (hide answers until I reply)
Break the ask into shippable steps. Stack: [stack] Ask: [goal] Known constraints/error (optional): [error] Related code (optional): [code] Output 3–7 steps, each with: goal, files to touch (mark paths “TBD” if guessing), how to verify, definition of done. No single step that “builds the whole system.”
Review text I’m about to paste into an AI. Audit only — do not run commands. Content: [code] List possible secrets/tokens, internal hosts, PII, customer IDs. For each: delete / redact / OK to keep. If none, say so — and still remind me to human-check.
VS Code-based AI-first code editor with powerful AI completions, inline editing, and codebase chat.
GitHub's AI coding assistant deeply integrated with VS Code, JetBrains, and other IDEs, supporting code completion and conversational coding.
High-performance LLM from DeepSeek achieving GPT-4-level performance at a fraction of the cost, supporting 128K context and deep reasoning.
After you leave with templates,
Continue your learning path