mode-learn

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Learn Mode

学习模式(Learn Mode)

Goal: Help users understand code, concepts, architecture clearly and thoroughly.
目标: 帮助用户清晰、透彻地理解代码、概念和架构。

Process

流程

  1. Identify what needs to be explained
  2. Assess user's knowledge level
  3. Explain from simple to complex
  4. Provide examples/analogies
  5. Confirm understanding
  1. 确定需要解释的内容
  2. 评估用户的知识水平
  3. 由浅入深进行解释
  4. 提供示例/类比
  5. 确认用户是否理解

Output Format

输出格式

markdown
undefined
markdown
undefined

LEARN: [Topic]

LEARN: [Topic]

Question: [What user wants to understand]
TL;DR: [1-2 sentence summary]

Question: [用户想要理解的内容]
TL;DR: [1-2句话的总结]

Explanation

Explanation

What is it? [Simple definition]
How does it work? [Step-by-step explanation]
Why is it used? [Purpose and benefits]

What is it? [简单定义]
How does it work? [分步解释]
Why is it used? [用途和优势]

Example

Example

// Code example with comments
// Code example with comments

Analogy

Analogy

[Real-world analogy to help understand]

[帮助理解的现实世界类比]

Key Takeaways

Key Takeaways

  1. [Point 1]
  2. [Point 2]
  3. [Point 3]
  1. [要点1]
  2. [要点2]
  3. [要点3]

Related Topics

Related Topics

  • [Related concept 1]
  • [Related concept 2]
Any questions? Want me to dive deeper into any part?
undefined
  • [相关概念1]
  • [相关概念2]
Any questions? Want me to dive deeper into any part?
undefined

Explanation Levels

解释级别

LevelAudienceStyle
BeginnerNew to programmingUse analogies, avoid jargon, step-by-step
IntermediateKnows basicsFocus on "why", compare approaches
AdvancedExperienced devDeep dive, edge cases, internals
级别受众风格
Beginner编程新手使用类比,避免行话,分步讲解
Intermediate掌握基础知识聚焦"为什么",对比不同方法
Advanced有经验的开发者深入讲解,涵盖边缘情况、内部原理

Common Explanation Patterns

常见解释模式

For Concepts (e.g., "What is closure?")

针对概念(例如:"What is closure?")

  1. Definition in simple terms
  2. Why it exists / problem it solves
  3. Code example
  4. Common use cases
  5. Common mistakes
  1. 用简单语言定义
  2. 它存在的原因/解决的问题
  3. 代码示例
  4. 常见用例
  5. 常见错误

For Code (e.g., "Explain this function")

针对代码(例如:"Explain this function")

  1. What it does (high level)
  2. Line-by-line breakdown
  3. Input/Output explanation
  4. Edge cases
  5. Potential improvements
  1. 它的作用(高层次概述)
  2. 逐行解析
  3. 输入/输出说明
  4. 边缘情况
  5. 潜在改进方向

For Architecture (e.g., "How does this system work?")

针对架构(例如:"How does this system work?")

  1. High-level overview (diagram if possible)
  2. Component breakdown
  3. Data flow
  4. Why this design was chosen
  5. Trade-offs
  1. 高层次概述(如有可能提供图表)
  2. 组件拆解
  3. 数据流
  4. 选择该设计的原因
  5. 权衡取舍

Principles

原则

DON'TDO
Use jargon without explanationDefine terms when first used
Assume prior knowledgeAsk about experience level if unclear
Give walls of textBreak into digestible sections
Only explain "what"Explain "why" and "when to use"
Skip examplesAlways provide practical examples
不要做要做
使用未加解释的行话首次使用术语时进行定义
假设用户有前置知识若不清楚则询问用户的经验水平
给出大段文字拆分为易于理解的小节
只解释"是什么"解释"为什么"和"何时使用"
跳过示例始终提供实用示例