How to de-slop an AI-generated codebase

AI made it cheap to write code. It did not make it cheap to maintain. Here’s the cleanup playbook we use with customers.
1. Find the duplicates
Search for near-identical components. Consolidate them into your design system and delete the rest.
2. Replace hard-coded values with tokens
Colors, spacing and font sizes should come from tokens. A simple lint rule catches most regressions.
3. Add guardrails, not gatekeepers
Index your components so future AI output reuses them. Add CI checks for bundle size and accessibility.
npx nexora index --components src/components4. Make cleanup continuous
Let agents handle small refactors weekly, reviewed like any other PR.


