teach-oh
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/teach-oh
/teach-oh
Setup that gathers project context and saves it to AGENTS.md (the cross-agent standard). Run when starting on a project or when strategy/aims have shifted.
用于收集项目上下文并将其保存到AGENTS.md(跨Agent标准文件)的初始化流程。在开始新项目或项目策略/目标发生变化时运行。
When to Use
使用时机
Invoke when:
/teach-oh- Starting on a new project - Before diving into work
- Context keeps getting lost - AI assistants don't "get" your project
- Onboarding a new AI tool - Establish shared understanding upfront
- After major strategic shifts - When aims or constraints have changed
Do not use when: You're mid-task. This is setup, not execution.
在以下场景中调用:
/teach-oh- 启动新项目时 - 在投入工作之前
- 上下文频繁丢失时 - AI助手无法理解你的项目
- 接入新AI工具时 - 提前建立统一认知
- 重大战略调整后 - 当项目目标或约束条件发生变化时
请勿在以下场景使用:任务进行中。这是初始化流程,而非执行环节。
The Process
操作流程
Step 1: Explore the Codebase
步骤1:探索代码库
Before asking questions, scan the project independently:
Structure & Stack
- Directory layout, key folders
- Package files (package.json, Cargo.toml, go.mod, etc.)
- Build configuration, CI/CD setup
Existing Context
- AGENTS.md, CLAUDE.md, README, CONTRIBUTING
- ,
.oh/directoriesdocs/adr/ - Any existing project documentation
Patterns & Conventions
- Naming conventions in code
- File organization patterns
- Recent git commits for style and focus
Don't ask about what you can discover. Use exploration to form better questions.
在提问前,先自主扫描项目:
结构与技术栈
- 目录布局、关键文件夹
- 包管理文件(package.json、Cargo.toml、go.mod等)
- 构建配置、CI/CD设置
现有上下文
- AGENTS.md、CLAUDE.md、README、CONTRIBUTING文档
- 、
.oh/目录docs/adr/ - 任何已有的项目文档
模式与规范
- 代码命名规范
- 文件组织模式
- 近期git提交记录,了解代码风格与当前工作重点
不要询问可自行发现的内容。通过探索来提出更有质量的问题。
Step 2: Ask About What Matters
步骤2:询问关键信息
After exploration, ask targeted questions about what couldn't be inferred. Focus on strategy and aims, not just code.
探索完成后,针对无法自行推断的内容提出针对性问题。重点关注策略与目标,而非仅局限于代码细节。
Purpose & Aims
项目目标与定位
- What is this project trying to achieve?
- Who uses it? What change in their behavior indicates success?
- What's the current focus or priority?
- 该项目的核心目标是什么?
- 目标用户是谁?哪些行为变化代表项目成功?
- 当前的工作重点或优先级是什么?
Strategic Constraints
战略约束条件
- What constraints never bend? (Compliance, performance SLAs, etc.)
- What trade-offs has the team made intentionally?
- What's explicitly out of scope?
- 哪些约束是绝对不可违背的?(合规要求、性能SLA等)
- 团队曾主动做出过哪些权衡取舍?
- 哪些内容明确不属于项目范围?
Team & Decision-Making
团队与决策机制
- How does the team make decisions?
- What does "done" mean here?
- Any patterns or practices that are sacred?
- 团队的决策流程是怎样的?
- 这里的“完成”标准是什么?
- 有没有哪些模式或实践是团队坚守的?
What to Avoid
需要规避的内容
- Past mistakes that shouldn't be repeated
- Patterns that look tempting but don't fit
- Areas of the codebase that are sensitive
Ask only what you couldn't discover. Respect the user's time.
- 不应重复的过往错误
- 看似诱人但不适合项目的模式
- 代码库中哪些部分是敏感区域?
只询问无法自行发现的内容,尊重用户的时间。
Step 3: Write Persistent Context
步骤3:写入持久化上下文
Synthesize findings into a structured section and offer to append to AGENTS.md (or create it if missing).
Offer two sections:
- Open Horizons Framework - The strategic framework for AI-assisted work (offer to include if user uses OH skills)
- Project Context - Project-specific aims, constraints, and patterns (always include)
markdown
undefined将调研结果整理为结构化内容,并询问是否追加到AGENTS.md中(若文件不存在则创建)。
提供两个核心板块:
- Open Horizons Framework - AI辅助工作的战略框架(若用户使用OH技能则提供)
- 项目上下文 - 项目专属的目标、约束与模式(必选)
markdown
undefinedOpen Horizons Framework
Open Horizons Framework
The shift: Action is cheap. Knowing what to do is scarce.
The sequence: aim → problem-space → problem-statement → solution-space → execute → ship
Where to start (triggers):
- Can't explain why you're building this →
/aim - Keep hitting the same blockers →
/problem-space - Solutions feel forced →
/problem-statement - About to start coding →
/solution-space - Work is drifting or reversing →
/salvage
Reflection skills (use anytime):
- - Check alignment before committing
/review - - Seek contrary evidence before one-way doors
/dissent - - Extract learning, restart clean
/salvage
Key insight: Enter at the altitude you need. Climb back up when you drift.
核心转变: 执行成本低廉,但明确方向才是稀缺资源。
工作流程: 目标定义 → 问题域分析 → 问题陈述 → 解决方案域 → 执行 → 交付
启动触发点:
- 无法解释构建该项目的原因 →
/aim - 反复遇到相同障碍 →
/problem-space - 解决方案显得生硬牵强 →
/problem-statement - 即将开始编码 →
/solution-space - 工作方向偏离或出现倒退 →
/salvage
反思类技能(随时可用):
- - 提交前检查是否对齐目标
/review - - 做出不可逆决策前寻求相反证据
/dissent - - 提取经验教训,重新开始
/salvage
核心洞察: 从合适的阶段介入,偏离时及时回归顶层目标。
Project Context
项目上下文
Purpose
项目定位
[What this project does and why it matters]
[该项目的功能与价值]
Current Aims
当前目标
[Active goals and what success looks like]
[活跃目标及成功衡量标准]
Key Constraints
关键约束
- [Constraint 1]: [Why it exists]
- [Constraint 2]: [Why it exists]
- [约束1]:[存在原因]
- [约束2]:[存在原因]
Patterns to Follow
需遵循的模式
- [Pattern]: [When/why to use it]
- [模式]:[适用场景/原因]
Anti-Patterns to Avoid
需规避的反模式
- [Anti-pattern]: [Why it's problematic here]
- [反模式]:[在本项目中的问题]
Decision Context
决策上下文
[How the team makes decisions, what "done" means]
undefined[团队决策方式、“完成”的定义]
undefinedOutput Format
输出格式
Present findings for user approval before writing:
undefined在写入前先向用户展示调研结果以获得确认:
undefinedTeach-OH Summary
Teach-OH 总结
What I Discovered
调研发现
- Stack: [technologies found]
- Structure: [key patterns observed]
- Existing context: [what docs already exist]
- 技术栈:[已发现的技术]
- 项目结构:[观察到的关键模式]
- 现有上下文:[已存在的文档]
Questions I Have
待确认问题
- [Question about aims/strategy]
- [Question about constraints]
- [Question about team practices]
After your answers, I'll draft a AGENTS.md section for your approval.
After user answers:
- [关于目标/策略的问题]
- [关于约束条件的问题]
- [关于团队实践的问题]
在您解答后,我将起草AGENTS.md的内容供您确认。
用户解答后:
Proposed AGENTS.md Addition
拟写入AGENTS.md的内容
[Draft the Project Context section]
Write to AGENTS.md? [Yes/No - show what will be added/updated]
undefined[起草项目上下文板块]
是否写入AGENTS.md? [说明将添加/更新的内容]
undefinedExample
示例
/teach-ohAgent explores, then:
undefined/teach-ohAgent完成探索后:
undefinedTeach-OH Summary
Teach-OH 总结
What I Discovered
调研发现
- Stack: TypeScript, React, Node.js, PostgreSQL
- Structure: Monorepo with apps/ and packages/
- Existing context: README exists, no AGENTS.md or CLAUDE.md
- Recent focus: Auth refactor (last 12 commits)
- 技术栈:TypeScript、React、Node.js、PostgreSQL
- 项目结构:单仓库架构,包含apps/与packages/目录
- 现有上下文:存在README文档,无AGENTS.md或CLAUDE.md
- 近期工作重点:认证流程重构(最近12次提交)
Questions I Have
待确认问题
- What's the main aim right now? The auth work—is that about security, UX, or maintenance?
- I see both REST and GraphQL endpoints. Is one preferred, or context-dependent?
- Any performance constraints? I see a Redis layer but no docs on when to use it.
- What patterns should I follow vs. avoid?
**User answers, agent drafts:**
- 当前的核心目标是什么?认证工作是为了提升安全性、用户体验还是可维护性?
- 我看到项目同时存在REST与GraphQL接口,是否有偏好场景,还是根据上下文选择?
- 有没有性能约束?我看到Redis层但没有相关使用文档。
- 我应该遵循哪些模式,规避哪些模式?
**用户解答后,Agent起草内容:**
Proposed AGENTS.md Addition
拟写入AGENTS.md的内容
Open Horizons Framework
Open Horizons Framework
The shift: Action is cheap. Knowing what to do is scarce.
The sequence: aim → problem-space → problem-statement → solution-space → execute → ship
Where to start (triggers):
- Can't explain why you're building this →
/aim - Keep hitting the same blockers →
/problem-space - Solutions feel forced →
/problem-statement - About to start coding →
/solution-space - Work is drifting or reversing →
/salvage
Reflection skills: , ,
/review/dissent/salvageKey insight: Enter at the altitude you need. Climb back up when you drift.
核心转变: 执行成本低廉,但明确方向才是稀缺资源。
工作流程: 目标定义 → 问题域分析 → 问题陈述 → 解决方案域 → 执行 → 交付
启动触发点:
- 无法解释构建该项目的原因 →
/aim - 反复遇到相同障碍 →
/problem-space - 解决方案显得生硬牵强 →
/problem-statement - 即将开始编码 →
/solution-space - 工作方向偏离或出现倒退 →
/salvage
反思类技能: 、、
/review/dissent/salvage核心洞察: 从合适的阶段介入,偏离时及时回归顶层目标。
Project Context
项目上下文
Purpose
项目定位
Customer portal for B2B SaaS. Users are account admins managing their organization's settings, users, and billing.
面向B2B SaaS的客户门户,用户为企业管理员,用于管理组织设置、用户与账单。
Current Aims
当前目标
- Simplify auth flow so new SSO providers can be added in <1 day (currently takes 2 weeks)
- Success: Adding Okta support by end of Q1
- 简化认证流程,使新增SSO提供商的时间从2周缩短至1天以内
- 成功标志:在Q1末完成Okta支持的集成
Key Constraints
关键约束
- SOC2 compliance: All auth changes need security review
- <200ms API response time (SLA commitment)
- No breaking changes to existing OAuth integrations
- SOC2合规要求:所有认证变更需经过安全审核
- API响应时间<200ms(SLA承诺)
- 不得对现有OAuth集成造成破坏性变更
Patterns to Follow
需遵循的模式
- REST for public API, GraphQL for internal dashboard
- Redis for session state only, not general caching
- Feature flags via LaunchDarkly for gradual rollouts
- 公共API使用REST,内部仪表盘使用GraphQL
- Redis仅用于会话状态存储,不用于通用缓存
- 使用LaunchDarkly的功能标志进行逐步发布
Anti-Patterns to Avoid
需规避的反模式
- Don't abstract OAuth providers into single interface (they have semantic differences)
- Avoid adding new environment variables without updating .env.example
- 不要将OAuth提供商抽象为单一接口(它们存在语义差异)
- 添加新环境变量时,必须同步更新.env.example
Decision Context
决策上下文
Tech lead approves architecture changes. PRs need one review. "Done" = deployed to staging with passing E2E tests.
Write to AGENTS.md? This will create a new file at ./AGENTS.md
undefined架构变更需经技术负责人批准。PR需要至少一次审核。“完成”的定义:部署到预发布环境且E2E测试全部通过。
是否写入AGENTS.md? 将在./AGENTS.md路径下创建新文件
undefinedWhat This Enables
带来的价值
With project context established:
- frames outcomes in your language
/aim - knows which constraints are real
/problem-space - understands your risk tolerance
/dissent - checks against your definition of done
/review - follows your patterns
/execute
建立项目上下文后:
- 将用您的语言定义成果
/aim - 了解哪些约束是真实存在的
/problem-space - 理解您的风险承受能力
/dissent - 对照您的“完成”标准进行检查
/review - 遵循您的项目模式
/execute
Notes
注意事项
- Context lives in AGENTS.md so it persists across sessions
- Keep it focused—this isn't documentation, it's working context
- Re-run when aims shift, constraints change, or context feels stale
Remember: This is setup, not ongoing work. Invest 10 minutes when starting or when things have shifted.
- 上下文存储在AGENTS.md中,可跨会话持久化
- 保持内容聚焦——这不是正式文档,而是工作上下文
- 当目标变更、约束调整或上下文过时,重新运行该流程
请记住: 这是初始化流程,而非日常工作。在项目启动或发生重大变化时投入10分钟完成设置。