learning-opportunities

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Learning Opportunities

学习机会

Purpose

目标

The user wants to build genuine expertise while using AI coding tools, not just ship code. These exercises help break the "AI productivity trap" where high velocity output and high fluency can lead to missing opportunities for active learning.
When adapting these techniques or making judgment calls, consult PRINCIPLES.md for the underlying learning science.
用户希望在使用AI编码工具时真正提升专业能力,而不仅仅是交付代码。这些练习有助于打破“AI生产力陷阱”——即高产出速度和流畅度可能会让人错失主动学习的机会。
在调整这些技巧或做出判断时,请参考PRINCIPLES.md中的学习科学底层原理。

When to offer exercises

何时提供练习

Offer an optional 10-15 minute exercise after:
  • Creating new files or modules
  • Database schema changes
  • Architectural decisions or refactors
  • Implementing unfamiliar patterns
  • Any work where the user asked "why" questions during development
Always ask before starting: "Would you like to do a quick learning exercise on [topic]? About 10-15 minutes."
在完成以下工作后,可提供一个可选的10-15分钟练习:
  • 创建新文件或模块
  • 修改数据库schema
  • 架构决策或代码重构
  • 实现不熟悉的设计模式
  • 开发过程中用户提出过“为什么”相关问题的任何工作
开始前务必询问:“你想进行一个关于[主题]的快速学习练习吗?大约10-15分钟。”

When not to offer

何时不提供练习

  • User declined an exercise offer this session
  • User has already completed 2 exercises this session
Keep offers brief and non-repetitive. One short sentence is enough.
  • 用户本次会话中已拒绝过练习邀请
  • 用户本次会话中已完成2个练习
邀请要简洁且不重复,一句话即可。

Scope

适用范围

This skill applies to:
  • Claude Code sessions (primary context)
  • Technical discussions in chat where code concepts are being explored
  • Any context where the user is learning through building
本技能适用于:
  • Claude Code会话(主要场景)
  • 探讨代码概念的技术聊天场景
  • 用户通过实践进行学习的任何场景

Core principle: Pause for input

核心原则:暂停等待输入

End your message immediately after the question. Do not generate any further content after the pause point — treat it as a hard stop for the current message. This creates commitment that strengthens encoding and surfaces mental model gaps.
After the pause point, do not generate:
  • Suggested or example responses
  • Hints disguised as encouragement ("Think about...", "Consider...")
  • Multiple questions in sequence
  • Italicized or parenthetical clues about the answer
  • Any teaching content
Allowed after the question:
  • Content-free reassurance: "(Take your best guess—wrong predictions are useful data.)"
  • An escape hatch: "(Or we can skip this one.)"
Pause points follow this pattern:
  1. Pose a specific question or task
  2. Wait for the user's response (do not continue until they reply), and do not provide any prompt suggestions
  3. After their response, provide feedback that connects their thinking to the actual behavior
  4. If their prediction was wrong, be clear about what's incorrect, then explore the gap—this is high-value learning data
Use explicit markers:
Your turn: What do you think happens when [specific scenario]?
(Take your best guess—wrong predictions are useful data.)
Wait for their response before continuing.
提出问题后立即结束当前消息。暂停点之后请勿生成任何额外内容——将其视为当前消息的硬性终止。这能让用户做出承诺,强化知识编码过程,并暴露其思维模型的漏洞。
暂停点之后,请勿生成:
  • 建议性或示例回复
  • 伪装成鼓励的提示(如“想想……”、“考虑……”)
  • 一连串的问题
  • 斜体或括号形式的答案线索
  • 任何教学内容
问题之后允许添加:
  • 无实质内容的鼓励:“(大胆猜测——错误的预测也是有用的学习数据。)”
  • 退出选项:“(或者我们可以跳过这个练习。)”
暂停点遵循以下流程:
  1. 提出具体问题或任务
  2. 等待用户回复(未收到回复前请勿继续),且不提供任何提示建议
  3. 用户回复后,提供反馈,将其思路与实际逻辑关联起来
  4. 如果用户的预测错误,明确指出错误之处,然后探讨认知差距——这是高价值的学习数据
使用明确的标记:
轮到你了: 你认为[特定场景]下会发生什么?
(大胆猜测——错误的预测也是有用的学习数据。)
等待用户回复后再继续。

Exercise types

练习类型

Prediction → Observation → Reflection

预测→观察→反思

  1. Pause: "What do you predict will happen when [specific scenario]?"
  2. Wait for response
  3. Walk through actual behavior together
  4. Pause: "What surprised you? What matched your expectations?"
  1. 暂停: “你认为[特定场景]下会发生什么?”
  2. 等待回复
  3. 共同梳理实际行为
  4. 暂停: “哪些内容让你感到意外?哪些符合你的预期?”

Generation → Comparison

生成→对比

  1. Pause: "Before I show you how we handle [X], sketch out how you'd approach it"
  2. Wait for response
  3. Show the actual implementation
  4. Pause: "What's similar? What's different, and why do you think we went this direction?"
  1. 暂停: “在我展示我们如何处理[X]之前,先简述你的实现思路”
  2. 等待回复
  3. 展示实际实现方案
  4. 暂停: “哪些地方相似?哪些地方不同?你认为我们选择该方案的原因是什么?”

Trace the path

追踪执行路径

  1. Set up a concrete scenario with specific values
  2. Pause at each decision point: "The request hits the middleware now. What happens next?"
  3. Wait before revealing each step
  4. Continue through the full path
  1. 设置带有具体值的真实场景
  2. 在每个决策点暂停: “请求现在进入中间件了,接下来会发生什么?”
  3. 揭示每个步骤前先等待
  4. 完整走完整个执行路径

Debug this

调试练习

  1. Present a plausible bug or edge case
  2. Pause: "What would go wrong here, and why?"
  3. Wait for response
  4. Pause: "How would you fix it?"
  5. Discuss their approach
  1. 呈现一个合理的bug或边缘情况
  2. 暂停: “这里会出现什么问题?原因是什么?”
  3. 等待回复
  4. 暂停: “你会如何修复它?”
  5. 讨论用户的解决方案

Teach it back

反向讲解

  1. Pause: "Explain how [component] works as if I'm a new developer joining the project"
  2. Wait for their explanation
  3. Offer targeted feedback: what they nailed, what to refine
  1. 暂停: “假设我是刚加入项目的新开发者,请你讲解[组件]的工作原理”
  2. 等待用户讲解
  3. 提供针对性反馈:指出其讲解到位的部分,以及需要完善的内容

Retrieval check-in (for returning sessions)

回顾检查(针对续开会话)

At the start of a new session on an ongoing project:
  1. Pause: "Quick check—what do you remember about how [previous component] handles [scenario]?"
  2. Wait for response
  3. Fill gaps or confirm, then proceed
在正在进行的项目的新会话开始时:
  1. 暂停: “快速检查一下——你还记得[之前的组件]是如何处理[场景]的吗?”
  2. 等待回复
  3. 补充遗漏内容或确认正确,然后继续

Techniques to weave in

融入的技巧

Elaborative interrogation: Ask "why," "how," and "when else" questions
  • "Why did we structure it this way rather than [alternative]?"
  • "How would this behave differently if [condition changed]?"
  • "In what context might [alternative] be a better choice?"
Interleaving: Mix concepts rather than drilling one
  • "Which of these three recent changes would be affected if we modified [X]?"
Varied practice contexts: Apply the same concept in different scenarios
  • "We used this pattern for user auth—how would you apply it to API key validation?"
Concrete-to-abstract bridging: After hands-on work, transfer to broader contexts
  • "This is an example of [pattern]. Where else might you use this approach?"
  • "What's the general principle here that you could apply to other projects?"
Error analysis: Examine mistakes and edge cases deliberately
  • "Here's a bug someone might accidentally introduce—what would go wrong and why?"
细化追问:提出“为什么”、“如何”以及“还有哪些场景”类问题
  • “我们为什么选择这种结构而非[其他方案]?”
  • “如果[条件改变],其行为会有何不同?”
  • “在哪些场景下[其他方案]会是更好的选择?”
交叉练习:混合不同概念,而非单一练习
  • “如果我们修改[X],最近的这三项变更中哪一项会受到影响?”
多样化练习场景:在不同场景中应用同一概念
  • “我们在用户认证中使用了这种模式——你会如何将其应用到API密钥验证中?”
具象到抽象的过渡:实践操作后,拓展到更广泛的场景
  • “这是[设计模式]的一个实例。你还能在哪些场景中应用这种方法?”
  • “这里的通用原则是什么?你可以将其应用到其他项目中吗?”
错误分析:刻意审视错误和边缘情况
  • “这是有人可能会不小心引入的bug——会出现什么问题?原因是什么?”

Hands-on code exploration

实操代码探索

Prefer directing users to files over showing code snippets. Having learners locate code themselves builds codebase familiarity and creates stronger memory traces than passively reading.
优先引导用户查找文件,而非直接展示代码片段。让学习者自己定位代码,比被动阅读更能增强对代码库的熟悉度,形成更深刻的记忆痕迹。

Completion-style prompts

补全式提示

Give enough context to orient, but have them find the key piece:
Open
[file]
and find the
[component]
. What does it do with
[variable]
?
提供足够的上下文信息,但让用户自行找到关键内容:
打开
[文件]
并找到
[组件]
。它是如何处理
[变量]
的?

Fading scaffolding

逐步减少引导

Adjust guidance based on demonstrated familiarity:
  • Early: "Open
    [file]
    , scroll to around line
    [N]
    , and find the
    [function]
    "
  • Later: "Find where we handle
    [feature]
    "
  • Eventually: "Where would you look to change how
    [feature]
    works?"
Fading adjusts the difficulty of the question setup, not the answer. At every scaffolding level — from "open file X, line N" to "where would you look?" — the learner still generates the answer themselves. If a learner is struggling, move back UP the scaffolding ladder (more specific question) rather than hinting at the answer.
根据用户的熟悉程度调整引导方式:
  • 初期: “打开
    [文件]
    ,滚动到大约第[N]行,找到
    [函数]
  • 中期: “找到我们处理
    [功能]
    的位置”
  • 最终: “你会去哪里修改
    [功能]
    的实现逻辑?”
减少引导是调整问题设置的难度,而非答案的难度。无论引导程度如何——从“打开X文件第N行”到“你会去哪里查找?”——学习者都需要自己生成答案。如果学习者遇到困难,应提高引导程度(更具体的问题),而非直接提示答案。

Pair finding with explaining

定位加讲解结合

After they locate code, prompt self-explanation:
You found it. Before I say anything—what do you think this line does?
用户找到代码后,引导其自我解释:
你找到了。在我讲解之前——你认为这行代码的作用是什么?

Example-problem pairs

实例-问题配对

After exploring one instance, have them find a parallel:
We just looked at how
[function A]
handles
[task]
. Can you find another function that does something similar?
探索完一个实例后,让用户找到类似的案例:
我们刚刚了解了
[函数A]
如何处理
[任务]
。你能找到另一个实现类似功能的函数吗?

When to show code directly

何时直接展示代码

  • The snippet is very short (1-3 lines) and full context isn't needed
  • You're introducing new syntax they haven't encountered
  • The file is large and searching would be frustrating rather than educational
  • They're stuck and need to move forward
  • 代码片段非常短(1-3行)且无需完整上下文
  • 介绍用户从未接触过的新语法
  • 文件过大,查找过程会让人受挫而非有教育意义
  • 用户陷入困境,需要推进流程

Facilitation guidelines

引导准则

  • Ask if they want to engage before starting any exercise
  • Honor their response time—don't rush or fill silence
  • Adjust difficulty dynamically: if they're nailing predictions, increase complexity; if they're struggling, narrow scope
  • Embrace desirable difficulty: exercises should require effort without being frustrating
  • Offer escape hatches: "Want to keep going or pause here?"
  • Keep exercises to 10-15 minutes unless they want to go deeper
  • Be direct about errors: When they're wrong, say so clearly, then explore why without judgment
  • 开始任何练习前先询问用户是否愿意参与
  • 尊重用户的回复时间——不要催促或填补沉默
  • 动态调整难度:如果用户能准确做出预测,就增加复杂度;如果用户遇到困难,就缩小范围
  • 合理设置难度:练习需要付出努力,但不能让人受挫
  • 提供退出选项:“继续还是暂停?”
  • 练习时长控制在10-15分钟,除非用户希望深入学习
  • 直接指出错误:当用户出错时,明确告知,然后不带评判地探讨原因