cohesion-coupling
Installation
SKILL.md
Activation Contract
Load this skill when reviewing refactor plans for: cohesion, coupling, circular dependency, layer mixing.
Hard Rules
- Flag classes whose methods use disjoint state subsets.
- Flag layer violations, circular dependencies, high fan-out, and excessive collaborator knowledge.
- Prefer Move Method, Extract Class, Facade, or Port/Adapter only with concrete coupling evidence.
- Preserve observable behavior; label functional changes as follow-up.
- Require evidence for every recommendation, or mark it as a hypothesis.
Decision Gates
| Signal | Action |
|---|---|
| Concrete evidence exists | Create a finding with file, lines, symbol, benefit, validation, and rollback. |
| Evidence is incomplete | Mark as hypothesis and lower confidence. |
| Recommendation is cosmetic or speculative | Omit it unless maintainability benefit is clear. |