tech-divergence
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTech 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):
| Dimension | 0 (Low Risk) | 1 (Checkpoint) |
|---|---|---|
| Pattern | Exists in codebase | New pattern required |
| Scope | Single domain | Cross-domain impact |
| Data Model | Add field to existing | New entity/table |
| Dependencies | Use existing libs | New dependency |
| API Surface | Internal only | Public/breaking change |
| Reversibility | Easy to undo | Requires migration |
| Security | Non-sensitive data | Auth/permissions |
| Performance | Simple CRUD | Cache/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 directoriesSemanticSearch: "如何实现[类似功能]?"
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个维度逐一评估并打分:
undefinedTechnical Divergence Score
技术分歧评分
| Dimension | Score | Rationale |
|---|---|---|
| Pattern | 0/1 | [Exists/New] |
| Scope | 0/1 | [Single/Cross-domain] |
| Data Model | 0/1 | [Field/Entity] |
| Dependencies | 0/1 | [Existing/New] |
| API Surface | 0/1 | [Internal/Public] |
| Reversibility | 0/1 | [Easy/Migration] |
| Security | 0/1 | [Non-sensitive/Auth] |
| Performance | 0/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] |
undefinedPhase 3: Determine Path
第三阶段:确定推进路径
If Score < 4: Auto-Proceed
若分数<4:自动推进
undefinedundefinedTechnical 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(低于阈值)
选定方案: [描述方案]
理由:
- 模式已存在:[参考]
- 跨领域影响小
- 必要时易于回滚
正在推进至提交计划阶段...
undefinedIf Score >= 4: Gate 4 (Human Checkpoint)
若分数≥4:Gate 4(人工检查点)
undefinedundefinedGate 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记录原因。
undefinedPhase 4: Record Decision
第四阶段:记录决策
After Gate 4 selection:
- If option rejected, invoke skill
decision-capture - Record selected approach in context for Commit Plan
- Update Pattern Library if new pattern established
Gate 4选择完成后:
- 若选项被拒绝,调用 skill
decision-capture - 在上下文中记录选定方案,用于提交计划
- 若确立新模式,更新模式库
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工具
| Tool | Purpose |
|---|---|
| Notion MCP | Query Pattern Library database |
| Context7 MCP | Get library best practices |
| SemanticSearch | Find existing codebase patterns |
| Grep | Search for specific implementations |
| 工具 | 用途 |
|---|---|
| Notion MCP | 查询模式库数据库 |
| Context7 MCP | 获取库的最佳实践 |
| SemanticSearch | 查找代码库中已有的模式 |
| Grep | 搜索特定实现 |
Example Scoring
评分示例
Low Score Example (Auto-Proceed)
低分示例(自动推进)
Feature: Add a new column to existing table
| Dimension | Score | Rationale |
|---|---|---|
| Pattern | 0 | Column additions done before |
| Scope | 0 | Single domain (tables) |
| Data Model | 0 | Adding field, not entity |
| Dependencies | 0 | Using existing libs |
| API Surface | 0 | Internal only |
| Reversibility | 0 | Easy migration |
| Security | 0 | Non-sensitive data |
| Performance | 0 | Simple CRUD |
| TOTAL | 0 | Auto-proceed |
功能: 向现有表添加新列
| 维度 | 分数 | 理由 |
|---|---|---|
| 模式 | 0 | 此前已执行过列添加操作 |
| 范围 | 0 | 单一领域(表) |
| 数据模型 | 0 | 添加字段,而非实体 |
| 依赖项 | 0 | 使用现有库 |
| API接口 | 0 | 仅内部使用 |
| 可回滚性 | 0 | 易于迁移 |
| 安全性 | 0 | 非敏感数据 |
| 性能 | 0 | 简单CRUD操作 |
| 总分 | 0 | 自动推进 |
High Score Example (Gate 4)
高分示例(触发Gate 4)
Feature: Add real-time collaboration
| Dimension | Score | Rationale |
|---|---|---|
| Pattern | 1 | No WebSocket patterns yet |
| Scope | 1 | Affects auth, tables, workflows |
| Data Model | 1 | New presence entity |
| Dependencies | 1 | Need socket.io |
| API Surface | 1 | New WS endpoints |
| Reversibility | 1 | Would need cleanup migration |
| Security | 1 | User session handling |
| Performance | 1 | Needs connection pooling |
| TOTAL | 8 | Gate 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”调用。