No. 140 Find the cause
Fix the essential cause
Find the essential cause before editing, instead of patching the error text.
- Claude Code
- Codex
- Cursor
- Find the cause
译 Start from first principles, find the most essential cause, and fix it.
When to use
When an empty cart throws, use this prompt so the model names the broken invariant before editing.
The input is total([]) throwing TypeError in cart.js, not a request to wrap it in try.
When not to use
When line 12 has >= written as >, do not let this prompt turn a one-character fix into a rewrite.
How to run it
Claude Code
Paste it once in the Claude Code session that is editing cart.js. Do not save .claude/commands.
Codex
Paste it above this task. Leave it out of AGENTS.md so the next copy edit is not forced through a root-cause hunt.
Cursor
Paste it only in the chat that fixes this throw. Do not put it in .cursor/rules, or unrelated completions inherit the investigation.
Comparison
对比待补
This before-and-after was not run on this machine.
Related
- Stage: Find the cause
来源:数字生命卡兹克 · https://x.com/Khazix0918/status/2122268349707219333 · 2026-12-02