关于 tech-debt-prioritizer
tech-debt-prioritizer 是供工程团队评估和排序技术债务的技能。它根据影响、风险和投入评分计算优先级,并用于规划季度偿还工作。
主要功能
- 01评估影响、风险和投入
- 02计算优先级分数
- 03维护技术债务清单
- 04制定季度偿还计划
- 05定期复审技术债务
适用场景
- 01排序待处理的技术债务
- 02规划偿还债务所需的工程时间
- 03复核风险并分配负责人
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ patricio0312rev/ skills --skill tech-debt-prioritizer安装后在 Claude Code 中输入/tech-debt-prioritizer确认已加载。
详细介绍
技术债务优先级排序
系统地确定技术债务的优先级并逐步偿还。
评分标准
影响评分(1-10)
10 - 严重:
- 阻碍新功能开发
- 导致生产环境频繁发生事故
- 阻碍多个团队的工作
7-9 - 高:
- 显著拖慢开发进度
- 偶尔导致事故
- 对一个团队造成重大影响
4-6 - 中:
- 对开发造成一定阻碍
- 很少发生事故
- 存在变通方案
1-3 - 低:
- 轻微不便
- 不会导致事故
- 有简单的变通方案
风险评分(1-10)
10 - 严重:
- 安全漏洞
- 数据完整性问题
- 法律/合规风险
7-9 - 高:
- 可能丢失数据
- 系统不稳定
- 供应商即将停止支持
4-6 - 中:
- 性能下降
- 偶尔发生故障
- 已弃用但仍可正常运行
1-3 - 低:
- 代码质量问题
- 轻微 Bug
- 风格不一致
工作量评分(1-10)
10 - 极其艰巨:
- 3 个月以上
- 涉及多个团队
- 变更风险高
7-9 - 大:
- 1-3 个月
- 涉及一个团队
- 中等风险
4-6 - 中:
- 1-4 周
- 1-2 名开发者
- 风险低
1-3 - 小:
- 几天
- 一名开发者
- 风险极低
优先级公式
Priority Score = (Impact * 2 + Risk * 1.5) / Effort
Higher score = Higher priority
技术债务清单
| ID | Title | Impact | Risk | Effort | Score | Owner |
| ------ | ---------------------- | ------ | ---- | ------ | ----- | --------- |
| TD-001 | Legacy auth system | 9 | 10 | 8 | 3.7 | Auth Team |
| TD-002 | No database indexes | 8 | 7 | 3 | 7.8 | Backend |
| TD-003 | Monolithic build | 7 | 4 | 6 | 4.0 | DevOps |
| TD-004 | Duplicate API logic | 6 | 3 | 4 | 4.1 | Backend |
| TD-005 | Outdated dependencies | 5 | 8 | 2 | 9.0 | All Teams |
| TD-006 | Missing error handling | 4 | 6 | 3 | 5.7 | Backend |
| TD-007 | Poor test coverage | 4 | 5 | 7 | 2.3 | All Teams |
| TD-008 | Inconsistent naming | 3 | 2 | 5 | 1.6 | Frontend |
**Sorted by Priority Score:**
1. TD-005: Outdated dependencies (9.0)
2. TD-002: No database indexes (7.8)
3. TD-006: Missing error handling (5.7)
4. TD-004: Duplicate API logic (4.1)
5. TD-003: Monolithic build (4.0)
...
详细评估模板
## TD-002: No Database Indexes
### Description
Critical queries lack indexes, causing slow response times and high CPU usage.
### Impact (8/10)
- Search queries take 2-5 seconds (should be <500ms)
- Database CPU at 85% during peak hours
- User complaints about slow searches
- Blocks performance optimization work
### Risk (7/10)
- Database may crash under load
- Losing customers to slow experience
- Cannot scale without addressing
### Effort (3/10)
- Identify missing indexes: 2 days
- Add indexes: 1 day
- Test performance: 1 day
- Deploy: 1 day
**Total: 5 days**
### ROI Analysis
**Cost:** 5 developer-days = $5,000
**Benefit:**
- 80% faster queries
- 50% less DB CPU
- Better user experience
- Enables scaling
**ROI:** Very High
### Implementation Plan
1. Run EXPLAIN on slow queries
2. Identify missing indexes
3. Add indexes in development
4. Test query performance
5. Deploy to production (off-peak)
6. Monitor impact
### Dependencies
- None (can start immediately)
### Owner
Backend Team
### Status
Backlog → Prioritized for Q1
季度偿还计划
# Q1 2024 Tech Debt Paydown
**Budget:** 20% of engineering time (4 weeks total)
## Week 1-2: High Priority
- TD-005: Update dependencies (2 days)
- TD-002: Add database indexes (5 days)
- TD-006: Add error handling (3 days)
## Week 3: Medium Priority
- TD-004: Eliminate duplicate logic (5 days)
## Week 4: Quick Wins
- TD-012: Fix broken tests (2 days)
- TD-015: Remove dead code (2 days)
- TD-018: Update README (1 day)
## Success Metrics
- Reduce P1 incidents by 30%
- Improve deployment confidence
- Decrease development friction
- Team morale improvement
决策框架
何时偿还债务
立即偿还,如果:
- 存在安全漏洞
- 导致频繁发生事故
- 阻碍关键功能
- 影响大、工作量小
尽快偿还,如果:
- 显著拖慢开发进度
- 风险中等偏高
- 工作量合理
推迟,如果:
- 影响小且风险低
- 工作量非常大
- 存在更好的替代方案
何时增加预算
**Indicators debt budget needs increase:**
- Velocity declining
- Incident rate increasing
- Developer satisfaction down
- Onboarding time increasing
- "It's too hard to..." complaints
技术债务登记表
interface TechDebt {
id: string;
title: string;
description: string;
// Scoring
impact: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
risk: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
effort: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
// Metadata
owner: string;
createdAt: Date;
targetQuarter?: string;
status: "backlog" | "prioritized" | "in-progress" | "done";
// Context
affectedSystems: string[];
relatedDebt: string[];
// Plan
implementationPlan?: string;
roi?: "low" | "medium" | "high" | "very-high";
}
季度评审流程
1. **Collect new debt** (Week 1)
- Team submits tech debt items
- Engineering leads review and score
2. **Prioritize** (Week 2)
- Calculate priority scores
- Review high-priority items
- Assign owners
3. **Plan quarter** (Week 3)
- Allocate 10-20% capacity
- Schedule work
- Set success metrics
4. **Review results** (End of quarter)
- Measure impact
- Adjust process
- Celebrate wins
最佳实践
- 系统跟踪:不要依赖记忆
- 客观评分:一致地使用评分标准
- 定期评审:至少每季度一次
- 预留时间:占冲刺容量的 10-20%
- 快速见效:纳入易完成的事项,提振士气
- 衡量影响:跟踪改进情况
- 提高可见性:使用仪表板和报告
- 不作评判:技术债务很正常
输出检查清单
- 已整理技术债务事项
- 已分配影响/风险/工作量评分
- 已计算优先级评分
- 已按优先级排列事项
- 已详细说明优先级最高的 10 项
- 已制定季度计划
- 已分配预算(时间占比)
- 已指定负责人
- 已定义成功指标
- 已确定评审频率
评论
支持 Markdown