context-management

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Context Management

项目上下文管理

Why Context Matters

为什么上下文很重要

  • Reduces ramp-up time
  • Prevents repeated mistakes
  • Enables informed decisions
  • Facilitates collaboration
  • 缩短上手时间
  • 避免重复犯错
  • 助力明智决策
  • 促进协作

Context Types

上下文类型

Project Context

项目上下文

  • What the project does
  • Why it exists
  • Who uses it
  • Key constraints
  • 项目功能是什么
  • 项目存在的意义
  • 目标用户群体
  • 关键约束条件

Technical Context

技术上下文

  • Architecture decisions (ADRs)
  • Technology choices
  • Coding conventions
  • Known issues
  • 架构决策记录(ADRs)
  • 技术选型
  • 编码规范
  • 已知问题

Historical Context

历史上下文

  • Why decisions were made
  • What was tried before
  • Lessons learned
  • 决策背后的原因
  • 过往尝试的方案
  • 总结的经验教训

Context Capture

上下文捕获

Decision Log

决策日志

markdown
undefined
markdown
undefined

Decision: [Title]

决策:[标题]

Date: [Date] Context: [Why this came up] Decision: [What was decided] Rationale: [Why this choice] Consequences: [What changed]
undefined
日期:[日期] 背景:[为何提出该决策] 决策内容:[最终决定] 理由:[选择此方案的原因] 影响:[带来的变化]
undefined

Knowledge Base

知识库

  • README for project overview
  • ADRs for architecture
  • CONTRIBUTING for development
  • CHANGELOG for history
  • README:项目概览
  • ADRs:架构相关
  • CONTRIBUTING:开发指南
  • CHANGELOG:版本历史

Code Comments

代码注释

typescript
// CONTEXT: This retry logic exists because the external API
// has intermittent failures. See incident-123 for details.
// We chose exponential backoff after testing showed it
// reduces error rate by 80%.
typescript
// CONTEXT: 此重试逻辑存在的原因是外部API
// 存在间歇性故障。详情见事件编号123。
// 我们选择指数退避策略,因为测试显示它能
// 将错误率降低80%。

Context Sharing

上下文共享

New Team Member

新团队成员入职

  1. Start with README
  2. Review key ADRs
  3. Pair on first task
  4. Introduce to stakeholders
  1. 从README开始了解
  2. 查看关键ADRs
  3. 结对完成首个任务
  4. 介绍给相关利益干系人

Handoff

工作交接

  1. Document current state
  2. List open questions
  3. Identify risks
  4. Warm handoff meeting
  1. 记录当前状态
  2. 列出待解决问题
  3. 识别潜在风险
  4. 召开交接会议

Best Practices

最佳实践

  1. Write it down: Don't rely on memory
  2. Keep it current: Update as things change
  3. Make it findable: Organize logically
  4. Be specific: Include the "why"
  5. Review regularly: Remove stale info
  1. 书面记录:不要依赖记忆
  2. 保持更新:随情况变化及时更新
  3. 易于查找:逻辑化组织内容
  4. 具体明确:包含“为什么”的信息
  5. 定期回顾:移除过时内容