Path: Code & productivity
Goal: Use models to explain, draft, and review while *you* run tests and own the merge.
Best for: Beginners who get code dumps and feel lost; anyone tempted to paste secrets while debugging.
Explain, test, then patch. Own the merge. Secrets never enter the chat.
The code path privileges explain→repro→patch→test. Skipping to “just fix it” is how mystery diffs land.
Why beginners skip this
Saving the code-path link feels finished—without a real commit and test this week, nothing sticks.
Why this order
Safety first (never paste secrets), then minimal repro and a done definition, then change code—“just fix it” only scatters the mess. 2. Clear asks + minimal repro—shrink before help. 3. Explain then change—no blind patches. 4. Tests before trust—prove the fix. 5. PR text + review checklist—help humans review.
Suggested sequence
1. Accounts & safety · Secrets 2. Minimal repro first 3. Explain then change 4. Tests with the model 5. PR description that helps 6. Code review checklist (Claude) 7. Bonus: Secure coding prompts
Minimal repro template
Language/runtime: …
Expected: …
Actual: …
Steps: …
Failing snippet (≤30 lines, secrets redacted):
---
[code]
---
Ask: Step A explain only; after OK, minimal patch + one test.
Example
Filled prompt
Fri: PR description for session-refresh fix using the PR guide.
Verify file list. Ban invented tests-run claims.
Context: real workstream this week (Asia/Shanghai). Name actual files/people.
Constraints: no invented metrics/owners/prices; label Unknowns; stop before send/delete/pay.
Done check: I can mark pass/fail in one minute on the output.
What good output looks like
- Calendar slot titled with slug for “Use models to explain, draft, and review—while *yo”
- Live artifact opened — not only the bookmark
- Practice timed; refuse-line written
- Pass/fail: artifact dated Asia/Shanghai
Scene: the merge you can defend
You paste a minimal repro, get an explanation first, run one test yourself, then open a PR whose How-to-test another human can follow. Secrets never entered the chat. That is this path.
Weekly drill
Once a week: take a real tiny bug, force minimal repro + Step A explain + one manual test, then patch. Log what you almost pasted (secrets?) and deleted.
Coach me through today’s drill checklist only—no code yet.
Example
Filled prompt
Write a personal Done definition for finishing this path’s beginner loop on one bug:
Bug: form double-submit on slow 3G.
Done must include: explain written, minimal repro exists, patch reviewed, one failing test kept.
What good output looks like
- Live artifact opened — not only the bookmark
- Practice timed; refuse-line written
- Pass/fail: artifact dated Asia/Shanghai
- Calendar slot titled with slug for “Use models to explain, draft, and review—while *yo”
Save this card
Card: explain → repro → patch → tests. Open the failing case before asking for a patch.
Before you start
Create a 25-minute calendar block titled path-code. Open the live artifact for “Use models to explain, draft, and review—while *you* run tes”—bookmark alone does not count Keep the live artifact visible the whole time. If you only have a blank box, stop and fetch the real job first
How to use this week
This week ship a commit + test for a real task along the path; no checkmark without a test.
Keep it real
Run this guide’s Practice now on work you will actually ship this week—not a fictional scenario. Dated notes beat perfect theory.
Explain → repro → patch
Skip ahead and you own the mystery diff.
Do not bookmark-only
Finish Practice now, then tick this guide on your path. Titles unread are not skills.
Close the loop
Write one line: next time I only save the path with no test, I refuse the checkmark.
Example
Filled prompt
Mon code slot: flaky payment webhook test.
Minimal repro ≤12 lines before any patch ask. Title calendar with guide slug.
Leave a failing test before any patch; never paste secrets.
What good output looks like
- Calendar slot titled with slug for “Use models to explain, draft, and review—while *yo”
- Pass/fail: artifact dated Asia/Shanghai
- Live artifact opened — not only the bookmark
- Practice timed; refuse-line written [path-code#3]
Example
Filled prompt
Mon code: flaky webhook test. Minimal repro ≤12 lines before patch.
Calendar title = guide slug. Refuse three-service paste.
Leave a failing test before any patch; never paste secrets.
What good output looks like
- Practice timed; refuse-line written
- Calendar slot titled with slug for “Use models to explain, draft, and review—while *yo”
- Pass/fail: artifact dated Asia/Shanghai
- Live artifact opened — not only the bookmark
Red flag
Saving the code-path link with no commit or test leaves nothing—ship the test first.
Pitfalls
| Pitfall | Fix |
|---|---|
| Pasting secrets while stuck | Redact first; rotate if leaked |
| Accepting patches before tests | Tests → OK → patch |
| Skipping explain step | Step A always |
Practice now
Compile/test first: run the failing command yourself once (Asia/Shanghai).
Blame glance: check git blame on the hot line before ask (Asia/Shanghai).
Hunk limit: ask for ≤1 file hunk unless justified (Asia/Shanghai).
Single-file ask: constrain the model to one file path (Asia/Shanghai).
Test-first ask: paste the failing test name into the model ask (Asia/Shanghai).
Repro-photo drill: screenshot or paste the failing assertion; attach to Save before patch ask (Asia/Shanghai).
Code-path drill: open the failing test or log; write three-step repro + done line; only then ask for a patch. Paste repro, not the monorepo (Asia/Shanghai).
Thin-spot drill: rewrite the Save card with real nouns from your work (repo, doc, inbox). Generic placeholders fail the drill.
Tonight for a real bug write a three-step repro + one-line done definition before any model edit.
Reality check: after Practice now, write one sentence you will refuse next time—and keep it on the Save card dated Asia/Shanghai.
Today card (copy) — path-code: 1. Artifact I will produce: ___ 2. Pass/fail check: ___ 3. Refuse-line if tempted to skip verify/send: ___ (date: Asia/Shanghai) 4. One never-do from this guide: ___
Extra pass: do the card on a real file today—reading alone does not count.
One sentence takeaway
Commit + test; no checkmark without a test.
Next
Minimal repro first · Explain then change · Tests with the model · PR description that helps · Claude code review checklist · Coding agent boundaries
路径:代码与效率
目标: 用「解释 → 最小复现 → 小改 → 测试」打完一个真实 bug。今晚路径上最多三篇。
适合: 想让模型帮忙改代码、又不想一次重写整模块的人。
先写完成定义:解释、复现、补丁、失败测试。锁在一个 bug 上。
为什么这个顺序
先安全(永不贴密钥),再最小复现与完成定义,然后才改代码;一上来就「帮我修」只会越修越散。 2. 说清楚 + 最小复现:求助前先缩小。 3. 先解释再改:拒绝盲补丁。 4. 先测试再信任:证明修复。 5. PR 文案 + 审阅清单:帮人类审。
为什么新手跳过
收藏代码路径标题像进步;本周没有真提交与测试,什么都没留下。
建议顺序
1. 账号与安全 · 密钥 2. 先最小复现 3. 先解释再改 4. 向模型要测试 5. 有帮助的 PR 说明 6. 代码审阅清单(Claude) 7. 加分:安全编码提示词
最小复现模板
语言/运行时:…
期望:…
实际:…
步骤:…
失败片段(≤30 行,密钥已打码):
---
[代码]
---
请求:步骤 A 只解释;OK 后最小补丁 + 一个测试。
实例
填好的提示词
表单提交偶发失败(慢 3G 双提交嫌疑)。今天在路径上最多打开 3 篇指南:应是哪几篇、什么顺序?
补丁前先最小复现;禁止贴密钥。
边界:不编造;未知标 [?];发送前停下。
完成检查:一分钟内能判过/不过。
像样的输出大概长这样
- 建议顺序贴合「偶发表单失败」:先复现 → 再解释 → 再改
- 明确不超过 3 篇,并写出篇名或路径锚点
- 说明为什么这三篇够用、多开会怎样分心
- 像给今晚加班的自己写的导航,不堆目录
- 不把无关的 Agents/MCP 长文塞进今晚清单
场景:你能辩护的一次合并
你贴最小复现,先拿到解释,自己跑一个测试,再开一个「如何测试」别人能跟做的 PR。密钥从未进聊天。这就是这条路径。
每周演练
每周一次:拿一个真的小 bug,强制最小复现 + 步骤 A 解释 + 一个手测,再补丁。记录你差点粘贴什么(密钥?)并删掉了。
只教练我今天的演练清单:先不要代码。
实例
填好的提示词
为「在本路径新手循环上打完一个 bug」写个人完成定义:
Bug:慢 3G 下表单双提交。
完成时必须已经具备:解释写好了、最小复现还在、补丁审过了、还留下一个失败测试。
边界:不编造;未知标 [?];只出草稿。
像样的输出大概长这样
- 完成定义可观察:解释已写、最小复现在、补丁已审、失败测试留下
- 范围锁在「慢 3G 双提交」这一个 bug
- 每条完成标准都能用「有/没有」判断
- 语言短到能贴进 PR 描述置顶
- 不要求一次重写整个表单模块
- 一分钟内能对照清单判过/不过;缺项标红再继续
保存这张卡
记下:今晚那三篇的顺序 + 完成定义四条。
开始前
写好个人完成定义:解释、复现、补丁、失败测试各一条。
本周怎么用
本周按路径对一个真任务交提交 + 测试;没有测试不打勾。
保持真实
用本周真要交付的工作做「现在就练一次」,别编假场景。带日期的实操笔记,比完美理论有用。
解释→复现→补丁
跳步,神秘 diff 就归你。
不要只收藏
先做完「现在就练一次」,再在学习路径上打勾。只收藏不练,标题变不成技能。
闭环
写下一行:下次只收藏路径不交测试,我拒绝打勾。
红旗
收藏代码路径却没有真提交与测试,什么都没留下;先交测试。
常见坑
| 坑 | 改法 |
|---|---|
| 一上来「帮我修整个模块」 | 锁一个 bug + 完成定义四条 |
| 路径上开十篇 | 今晚最多三篇,按顺序 |
| 改完不留失败测试 | 补丁旁留下一个会红的测试 |
现在就练一次
今晚就练:对一个真任务交提交 + 测试;没有测试不打勾。
一句话带走
提交 + 测试;没有测试不打勾。
下一步
先做最小复现 · 先解释再改 · 和模型一起写测试 · 有用的 PR 描述 · Claude 代码审查清单 · 编程 Agent 边界
← Back to home · Learn · Tools · Compare · Start