patterns

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Pattern Identification

模式识别

Observe signals → classify patterns → validate with evidence → document findings.
观察信号 → 分类模式 → 用证据验证 → 记录发现。

Steps

步骤

  1. Collect signals from conversation, code, or data
  2. Classify pattern type (workflow, orchestration, heuristic, anti-pattern)
  3. Validate against evidence threshold (3+ instances, multiple contexts)
  4. Document pattern with constraints and examples
  5. If implementation needed, delegate by loading the
    outfitter:codify
    skill
<when_to_use>
  • Recognizing recurring themes in work or data
  • Codifying best practices from experience
  • Extracting workflows from repeated success
  • Identifying anti-patterns from repeated failures
  • Building decision frameworks from observations
NOT for: single occurrences, unvalidated hunches, premature abstraction
</when_to_use>
<signal_identification>
Watch for these signal categories:
CategoryWatch ForIndicates
SuccessCompletion, positive feedback, repetition, efficiencyPattern worth codifying
FrustrationBacktracking, clarification loops, rework, confusionAnti-pattern to document
WorkflowSequence consistency, decision points, quality gatesProcess pattern
OrchestrationMulti-component coordination, state management, routingCoordination pattern
See signal-types.md for detailed taxonomy.
</signal_identification>
<pattern_classification>
Four primary pattern types:
TypeCharacteristicsUse When
WorkflowSequential stages, clear transitions, quality gatesProcess has ordered steps
OrchestrationCoordinates components, manages state, routes workMultiple actors involved
HeuristicCondition → action mapping, context-sensitiveRepeated decisions
Anti-PatternCommon mistake, causes rework, has better alternativePreventing failures
See pattern-types.md for templates and examples.
</pattern_classification>
<evidence_thresholds>
  1. 从对话、代码或数据中收集信号
  2. 分类模式类型(工作流、编排、启发式、反模式)
  3. 根据证据阈值验证(3个及以上实例、多场景)
  4. 记录包含约束条件和示例的模式
  5. 如需实现,通过加载
    outfitter:codify
    skill进行委托
<when_to_use>
  • 识别工作或数据中重复出现的主题
  • 将经验中的最佳实践代码化
  • 从重复的成功案例中提取工作流
  • 从重复的失败案例中识别反模式
  • 从观察结果构建决策框架
不适用场景:单次出现的情况、未验证的直觉、过早抽象
</when_to_use>
<signal_identification>
关注以下信号类别:
类别关注要点表明
成功完成、正面反馈、重复、效率值得代码化的模式
挫败回溯、澄清循环、返工、困惑需要记录的反模式
工作流序列一致性、决策点、质量门流程模式
编排多组件协调、状态管理、路由协调模式
更多详细分类请查看signal-types.md
</signal_identification>
<pattern_classification>
四种主要模式类型:
类型特征适用场景
工作流连续阶段、清晰过渡、质量门流程包含有序步骤时
编排协调组件、管理状态、分配工作涉及多个参与者时
启发式条件→动作映射、上下文敏感重复决策时
反模式常见错误、导致返工、有更优替代方案预防失败时
更多模板和示例请查看pattern-types.md
</pattern_classification>
<evidence_thresholds>

Codification Criteria

代码化标准

Don't codify after first occurrence. Require:
  • 3+ instances — minimum repetition to establish pattern
  • Multiple contexts — works across different scenarios
  • Clear boundaries — know when to apply vs not apply
  • Measurable benefit — improves outcome compared to ad-hoc approach
不要在首次出现后就进行代码化。需满足:
  • 3个及以上实例 — 建立模式所需的最低重复次数
  • 多场景 — 在不同场景下均有效
  • 清晰边界 — 明确适用与不适用的情况
  • 可衡量收益 — 相比临时方法能提升结果

Quality Indicators

质量指标

Strong PatternWeak Pattern
Consistent structureVaries each use
Transferable to othersRequires specific expertise
Handles edge casesBreaks on deviation
Saves time/effortOverhead exceeds value
</evidence_thresholds>
<progressive_formalization>
Observation (1-2 instances):
  • Note for future reference
  • "This worked well, watch for recurrence"
Hypothesis (3+ instances):
  • Draft informal guideline
  • Test consciously in next case
Codification (validated pattern):
  • Create formal documentation
  • Include examples and constraints
Refinement (ongoing):
  • Update based on usage
  • Add edge cases
</progressive_formalization>
<workflow>
Loop: Observe → Classify → Validate → Document
  1. Collect signals — note successes, failures, recurring behaviors
  2. Classify pattern type — workflow, orchestration, heuristic, anti-pattern
  3. Check evidence threshold — 3+ instances? Multiple contexts?
  4. Extract quality criteria — what makes it work?
  5. Document pattern — name, when, what, why
  6. Test deliberately — apply consciously, track variance
  7. Refine — adjust based on feedback
</workflow> <rules>
ALWAYS:
  • Require 3+ instances before codifying
  • Validate across multiple contexts
  • Document both when to use AND when not to
  • Include concrete examples
  • Track pattern effectiveness over time
NEVER:
  • Codify after single occurrence
  • Abstract without evidence
  • Ignore context-sensitivity
  • Skip validation step
  • Assume transferability without testing
</rules> <references>
  • signal-types.md — detailed signal taxonomy
  • pattern-types.md — pattern templates and examples
Identification vs Implementation:
  • This skill (
    patterns
    ) identifies and documents patterns
  • codify
    skill implements patterns as Claude Code components (skills, commands, hooks, agents)
Use
patterns
to answer "what patterns exist?" Use
codify
to answer "how do I turn this into a reusable component?"
</references>
强模式弱模式
结构一致每次使用都不同
可转移给他人需要特定专业知识
能处理边缘情况出现偏差就失效
节省时间/精力开销超过价值
</evidence_thresholds>
<progressive_formalization>
观察(1-2个实例):
  • 记录以备未来参考
  • "这个方法效果不错,留意是否会重复出现"
假设(3个及以上实例):
  • 起草非正式指南
  • 在下次案例中有意识地测试
代码化(已验证的模式):
  • 创建正式文档
  • 包含示例和约束条件
优化(持续进行):
  • 根据使用情况更新
  • 添加边缘情况
</progressive_formalization>
<workflow>
循环:观察 → 分类 → 验证 → 记录
  1. 收集信号 — 记录成功、失败、重复出现的行为
  2. 分类模式类型 — 工作流、编排、启发式、反模式
  3. 检查证据阈值 — 3个及以上实例?多场景?
  4. 提取质量标准 — 是什么让它有效?
  5. 记录模式 — 名称、适用场景、内容、原因
  6. 刻意测试 — 有意识地应用,跟踪差异
  7. 优化 — 根据反馈调整
</workflow> <rules>
始终:
  • 代码化前需3个及以上实例
  • 跨多场景验证
  • 同时记录适用与不适用场景
  • 包含具体示例
  • 随时间跟踪模式有效性
绝不:
  • 单次出现后就代码化
  • 无证据就抽象
  • 忽略上下文敏感性
  • 跳过验证步骤
  • 未经测试就假设可转移
</rules> <references>
  • signal-types.md — 详细的信号分类
  • pattern-types.md — 模式模板和示例
识别 vs 实现
  • 本Skill(
    patterns
    )用于识别和记录模式
  • codify
    skill用于将模式实现为Claude Code组件(skills、命令、钩子、agents)
使用
patterns
来回答"存在哪些模式?",使用
codify
来回答"如何将其转化为可复用组件?"
</references>