learn

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Learn — Capture and Route Project Knowledge

Learn — 捕获与路由项目知识

Record corrections, insights, and patterns. Route them to the correct instruction file. Apply kaizen principles to keep instructions lean and effective.
记录修正内容、洞见和模式,将其路由到正确的说明文件。应用kaizen原则保持说明简洁高效。

Dispatch

调度

$ARGUMENTS
Action
"<correction text>"
Route correction to appropriate instruction file
review
Show pending learnings and their frequency
promote
Promote high-frequency learnings (3+ occurrences) to instruction files
audit
Check for stale, contradictory, or duplicate learnings
EmptyDisplay usage summary
$ARGUMENTS
操作
"<correction text>"
将修正内容路由到对应的说明文件
review
显示待处理的经验教训及其出现频率
promote
将高频(出现3次及以上)的经验升级到说明文件中
audit
检查过时、矛盾或重复的经验
无参数显示使用摘要

References

参考

FilePurpose
references/routing-rules.md
Decision tree for where to route instruction changes
references/kaizen-principles.md
Error-proofing patterns, when to use hooks vs prose vs rules
文件用途
references/routing-rules.md
说明变更路由的决策树
references/kaizen-principles.md
防错模式,以及何时使用钩子、纯文本说明、规则的指引

Routing Protocol

路由协议

Route proposed updates to the correct target:
ScopeTarget
Cross-project conventions
instructions/global.md
Language-specific toolingConvention skill (
python-conventions
, etc.)
Orchestration/parallelism
orchestrator
skill body
Project-specific standardsProject's
AGENTS.md
File-scoped enforcement
.claude/rules/<topic>.md
Skill behaviorThe skill's own
SKILL.md
将拟议的更新路由到正确的目标:
适用范围目标文件
跨项目公约
instructions/global.md
特定语言工具链公约skill(
python-conventions
等)
编排/并行处理
orchestrator
skill本体
项目特定标准项目的
AGENTS.md
文件级强制规则
.claude/rules/<topic>.md
Skill行为该Skill自身的
SKILL.md

Routing Decision Steps

路由决策步骤

  1. Determine the scope: does this apply to all projects or just one?
  2. If cross-project, does it relate to a specific language or tool?
  3. If language-specific, route to the corresponding convention skill
  4. If general, route to
    instructions/global.md
  5. If project-only, route to the project's
    AGENTS.md
  6. If file-scoped enforcement only, create a
    .claude/rules/
    entry
  1. 确定适用范围:该规则是适用于所有项目还是仅单个项目?
  2. 如果是跨项目的,是否与特定语言或工具相关?
  3. 如果是特定语言相关,路由到对应的公约skill
  4. 如果是通用规则,路由到
    instructions/global.md
  5. 如果仅适用于单个项目,路由到项目的
    AGENTS.md
  6. 如果仅需要文件级强制,创建
    .claude/rules/
    条目

Kaizen Principles

Kaizen原则

  1. Incremental > revolutionary — Smallest viable change, verify before next
  2. Poka-yoke — Prefer hooks/tooling over prose instructions (error-proof by design)
  3. Standards work — Follow existing patterns, document what works
  4. JIT — Build only what is needed, optimize when measured
  1. 渐进式 > 颠覆式 — 最小可行变更,先验证再推进下一步
  2. Poka-yoke — 优先使用钩子/工具而非纯文本说明(通过设计实现防错)
  3. 标准落地 — 遵循现有模式,记录行之有效的方案
  4. JIT — 仅构建所需内容,获得量化数据后再优化

Verification Checklist

验证清单

  1. Verify against actual practice — confirm the pattern reflects real usage
  2. Check for contradictions with existing instructions
  3. Assess token impact — keep always-loaded content minimal
  4. Get user approval — never modify instruction files without consent
  5. Test the change — run
    wagents validate
    after any instruction file edit
  1. 对照实际实践验证 — 确认模式符合真实使用情况
  2. 检查是否与现有说明存在矛盾
  3. 评估token占用影响 — 尽量减少常驻加载的内容体积
  4. 获得用户批准 — 未经同意不得修改任何说明文件
  5. 测试变更 — 编辑任何说明文件后运行
    wagents validate
    命令

Critical Rules

核心规则

  1. Never modify instruction files without explicit user approval
  2. Require 3+ corrections across 2+ sessions before promoting
  3. Check for contradictions with existing instructions
  4. Route to narrowest applicable scope (rule before skill, skill before global)
  5. Keep always-loaded content under token budget
  6. Run
    wagents validate
    after every instruction file modification
  7. Prefer hooks/rules over prose (poka-yoke principle)
  1. 未经用户明确批准,绝对不得修改说明文件
  2. 升级前需要在至少2个会话中出现过3次及以上的修正
  3. 检查是否与现有说明存在矛盾
  4. 路由到适用范围最窄的目标(规则优先于skill,skill优先于全局)
  5. 常驻加载内容不得超出token预算
  6. 每次修改说明文件后必须运行
    wagents validate
    命令
  7. 优先使用钩子/规则而非纯文本(poka-yoke原则)

Canonical Terms

规范术语

  • instruction file
    — any file that provides agent instructions (global.md, AGENTS.md, SKILL.md)
  • routing
    — the process of choosing the correct target file for a change
  • correction pattern
    — a repeated fix that indicates a missing or wrong instruction
  • token budget
    — the limit on always-loaded instruction content
  • scope
    — cross-project, language-specific, orchestration, project-specific, or file-scoped
  • instruction file
    — 任何提供Agent指令的文件(global.md、AGENTS.md、SKILL.md)
  • routing
    — 为变更选择正确目标文件的过程
  • correction pattern
    — 反复出现的修复,说明存在缺失或错误的指令
  • token budget
    — 常驻加载的指令内容的上限
  • scope
    — 跨项目、特定语言、编排、项目特定、文件级