返回 Skill 列表
extension
分类: 开发与工程无需 API Key

refactor-arch-hotspots

[代码质量] 识别架构热点:高变更文件、耦合问题、层间违规和依赖纠缠。用于发现导致重复出现的bug或开发速度缓慢的系统性问题。

person作者: jakexiaohubgithub

Refactor: Architecture Hotspots

Find structural issues that create ongoing maintenance burden.

Hotspot Categories

1. High-Churn Files

Files changed frequently indicate poor abstraction boundaries.

2. Coupling Analysis

  • Afferent Coupling (Ca): Who depends on this?
  • Efferent Coupling (Ce): What does this depend on?
  • Instability (I): Ce / (Ca + Ce)

3. Layer Violations

  • UI accessing database directly
  • Business logic in controllers
  • Circular module dependencies

4. Dependency Tangles

  • Import cycles
  • Bidirectional dependencies
  • God modules everything imports

Prioritization

Focus on hotspots that are:

  1. High churn AND high complexity
  2. Frequently causing bugs
  3. Blocking feature development