recohere
Decoherence is locally valid code built on models that disagree: two HTTP clients, three error shapes, a migration left half done. Each one makes every later change translate between models, and it grows with change, not with time. This skill finds it and finishes one migration completely, because a migration left half done is more decoherence.
Steps
-
Scope to where change happens. If the user named an area, take it. Otherwise walk
git logback a few hundred commits and rank directories by how often they change; decoherence only costs where people keep working. Read the glossary (spec/glossary.md), ADRs and standards in scope first. -
Find the candidates. Look for each of these, in the scope:
- parallel models: more than one way to do one job, such as fetching, errors, validation, dates, config, state, logging, test setup
- half migrations: a new pattern some callers use and others do not, often with a TODO, a
legacyorv2name, or a shim - drifted terms: one domain concept under several names across code, schema and UI
For each, count the call sites of every model with
grepor the language's own tools, and note which files changed in the last 90 days. The dominant model is the one most recent changes use, not always the one with most call sites.