tech-divergence

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Tech Divergence Skill

技术分歧评估Skill

Evaluate technical implementation options using an 8-dimension scoring matrix. Low scores auto-proceed; high scores (>= 4) trigger Gate 4 for human decision.
使用8维度评分矩阵评估技术实现方案。低分数自动推进;高分数(≥4)触发Gate 4人工决策。

When to Use

适用场景

  • During Plan Mode Phase 2 (Technical Diverge)
  • Before committing to a specific architecture or pattern
  • When multiple valid implementation approaches exist
  • 计划模式第二阶段(技术分歧阶段)
  • 确定特定架构或模式之前
  • 存在多种有效实现方案时

Scoring Matrix (8 Dimensions)

评分矩阵(8个维度)

Each dimension scores 0 (auto-proceed) or 1 (adds to checkpoint score):
Dimension0 (Low Risk)1 (Checkpoint)
PatternExists in codebaseNew pattern required
ScopeSingle domainCross-domain impact
Data ModelAdd field to existingNew entity/table
DependenciesUse existing libsNew dependency
API SurfaceInternal onlyPublic/breaking change
ReversibilityEasy to undoRequires migration
SecurityNon-sensitive dataAuth/permissions
PerformanceSimple CRUDCache/queue/optimization
每个维度得分为0(自动推进)或1(计入检查点分数):
维度0(低风险)1(需检查)
模式代码库中已存在需要新模式
范围单一领域跨领域影响
数据模型向现有模型添加字段新增实体/表
依赖项使用现有库新增依赖
API接口仅内部使用公开/破坏性变更
可回滚性易于撤销需要迁移
安全性非敏感数据涉及认证/权限
性能简单CRUD操作需要缓存/队列/优化

Phase 1: Gather Context

第一阶段:收集上下文

1.1 Query Pattern Library (Notion)

1.1 查询模式库(Notion)

Check if similar patterns exist:
API-query-database:
  database_id: "[PATTERN_LIBRARY_DB_ID]"
  filter:
    property: "Domain"
    select:
      equals: "[current domain]"
检查是否存在类似模式:
API-query-database:
  database_id: "[PATTERN_LIBRARY_DB_ID]"
  filter:
    property: "Domain"
    select:
      equals: "[current domain]"

1.2 Search Codebase

1.2 搜索代码库

SemanticSearch: "How is [similar feature] implemented?"
Grep: "[pattern name]" in relevant directories
SemanticSearch: "如何实现[类似功能]?"
Grep: 在相关目录中搜索"[模式名称]"

1.3 Query Context7 (External Libraries)

1.3 查询Context7(外部库)

If new libraries are being considered:
Context7 MCP:
1. resolve-library-id: libraryName = "[library]"
2. get-library-docs: topic = "best practices", mode = "info"
如果考虑使用新库:
Context7 MCP:
1. resolve-library-id: libraryName = "[library]"
2. get-library-docs: topic = "best practices", mode = "info"

Phase 2: Score Each Dimension

第二阶段:各维度评分

For each of the 8 dimensions, evaluate and score:
undefined
对8个维度逐一评估并打分:
undefined

Technical Divergence Score

技术分歧评分

DimensionScoreRationale
Pattern0/1[Exists/New]
Scope0/1[Single/Cross-domain]
Data Model0/1[Field/Entity]
Dependencies0/1[Existing/New]
API Surface0/1[Internal/Public]
Reversibility0/1[Easy/Migration]
Security0/1[Non-sensitive/Auth]
Performance0/1[CRUD/Optimization]
TOTAL[0-8]
undefined
维度分数理由
模式0/1[已存在/新增]
范围0/1[单一/跨领域]
数据模型0/1[字段/实体]
依赖项0/1[现有/新增]
API接口0/1[内部/公开]
可回滚性0/1[易于回滚/需要迁移]
安全性0/1[非敏感/涉及认证]
性能0/1[简单CRUD/需要优化]
总分[0-8]
undefined

Phase 3: Determine Path

第三阶段:确定推进路径

If Score < 4: Auto-Proceed

若分数<4:自动推进

undefined
undefined

Technical Approach: Auto-Proceed

技术方案:自动推进

Score: [N]/8 (below threshold)
Selected Approach: [Describe the approach]
Rationale:
  • Pattern exists: [reference]
  • Low cross-domain impact
  • Easy to reverse if needed
Proceeding to Commit Plan...
undefined
分数: [N]/8(低于阈值)
选定方案: [描述方案]
理由:
  • 模式已存在:[参考]
  • 跨领域影响小
  • 必要时易于回滚
正在推进至提交计划阶段...
undefined

If Score >= 4: Gate 4 (Human Checkpoint)

若分数≥4:Gate 4(人工检查点)

undefined
undefined

Gate 4: Technical Approach Selection

Gate 4:技术方案选择

Score: [N]/8 (threshold reached)
Why human input needed:
  • [List dimensions that scored 1]
分数: [N]/8(达到阈值)
需要人工输入的原因:
  • [列出得分为1的维度]

Option A: [Name] (Conservative)

选项A:[名称](保守型)

Approach: [Description] Effort: S Risk: Low Trade-off: [What you give up]
方案: [描述] 工作量: S 风险:权衡: [需要放弃的内容]

Option B: [Name] (Balanced)

选项B:[名称](平衡型)

Approach: [Description] Effort: M Risk: Medium Trade-off: [What you give up]
方案: [描述] 工作量: M 风险:权衡: [需要放弃的内容]

Option C: [Name] (Bold)

选项C:[名称](激进型)

Approach: [Description] Effort: L Risk: Higher Trade-off: [What you give up]

Which approach would you like to proceed with? (A / B / C)
If you reject an option, I'll invoke decision-capture to record why.
undefined
方案: [描述] 工作量: L 风险:权衡: [需要放弃的内容]

您希望推进哪个方案? (A / B / C)
如果您拒绝某个选项,我将调用decision-capture skill记录原因。
undefined

Phase 4: Record Decision

第四阶段:记录决策

After Gate 4 selection:
  1. If option rejected, invoke
    decision-capture
    skill
  2. Record selected approach in context for Commit Plan
  3. Update Pattern Library if new pattern established
Gate 4选择完成后:
  1. 若选项被拒绝,调用
    decision-capture
    skill
  2. 在上下文中记录选定方案,用于提交计划
  3. 若确立新模式,更新模式库

Integration with Plan Mode

与计划模式的集成

This skill is invoked during Plan Mode Phase 2:
Plan Mode Flow:
Phase 1: APPETITE → 
Phase 2: TECHNICAL DIVERGE (this skill) →
  If score < 4: Auto-proceed
  If score >= 4: Gate 4 → Human selects
Phase 3: COMMIT PLAN
本skill在计划模式第二阶段被调用:
计划模式流程:
阶段1:需求确认 → 
阶段2:技术分歧(本skill) →
  若分数 < 4:自动推进
  若分数 >= 4:Gate 4 → 人工选择
阶段3:提交计划

MCP Tools Used

使用的MCP工具

ToolPurpose
Notion MCPQuery Pattern Library database
Context7 MCPGet library best practices
SemanticSearchFind existing codebase patterns
GrepSearch for specific implementations
工具用途
Notion MCP查询模式库数据库
Context7 MCP获取库的最佳实践
SemanticSearch查找代码库中已有的模式
Grep搜索特定实现

Example Scoring

评分示例

Low Score Example (Auto-Proceed)

低分示例(自动推进)

Feature: Add a new column to existing table
DimensionScoreRationale
Pattern0Column additions done before
Scope0Single domain (tables)
Data Model0Adding field, not entity
Dependencies0Using existing libs
API Surface0Internal only
Reversibility0Easy migration
Security0Non-sensitive data
Performance0Simple CRUD
TOTAL0Auto-proceed
功能: 向现有表添加新列
维度分数理由
模式0此前已执行过列添加操作
范围0单一领域(表)
数据模型0添加字段,而非实体
依赖项0使用现有库
API接口0仅内部使用
可回滚性0易于迁移
安全性0非敏感数据
性能0简单CRUD操作
总分0自动推进

High Score Example (Gate 4)

高分示例(触发Gate 4)

Feature: Add real-time collaboration
DimensionScoreRationale
Pattern1No WebSocket patterns yet
Scope1Affects auth, tables, workflows
Data Model1New presence entity
Dependencies1Need socket.io
API Surface1New WS endpoints
Reversibility1Would need cleanup migration
Security1User session handling
Performance1Needs connection pooling
TOTAL8Gate 4 required
功能: 添加实时协作功能
维度分数理由
模式1尚无WebSocket模式
范围1影响认证、表、工作流
数据模型1新增在线状态实体
依赖项1需要socket.io
API接口1新增WS端点
可回滚性1需要清理迁移
安全性1涉及用户会话处理
性能1需要连接池
总分8需要触发Gate 4

Invocation

调用方式

Invoked automatically by Plan Mode Phase 2, or manually with "use tech-divergence skill".
由计划模式第二阶段自动调用,或手动通过“use tech-divergence skill”调用。