architecture-drift-signalslisted
Install: claude install-skill kookr-ai/kookr
# Architecture Drift Signals
How AI-generated codebases degrade — and how to measure it. Architecture drift is a **cumulative** failure pattern: no single commit is the culprit, but after 200 prompt sessions the layer boundaries have dissolved. Every individual change looked locally reasonable at review time.
This skill gives you the **quantitative signals**, **thresholds**, and **detection commands** to measure drift before it becomes unrecoverable.
## The Mechanism (why AI codebases drift)
Three reinforcing root causes:
| Code | Root cause | Mechanism |
|------|-----------|-----------|
| RC01 | **Local optimization** | Each prompt session solves the immediate problem in the most convenient location. The AI has no cross-session memory of which layer a concept belongs in, so business logic lands in UI components, DB queries in route handlers, etc. |
| RC02 | **Dependency-graph corruption** | Drift manifests as cycles, cross-layer imports, and hub modules. Once cycles exist, every subsequent prompt has unpredictable blast radius — which accelerates further corruption. |
| RC03 | **Structural entropy** | Entropy only increases. The more drift has accumulated, the higher the cost of "doing it the right way", so under pressure the most convenient location wins — again. |
**Implication**: drift is self-reinforcing. The earlier you measure, the cheaper remediation is.
## The Three Detection Signals
### FP001 — File-size distribution (the drift fingerprint)
Oversized files