Components get rebuilt locally
The agent reimplements a button, card, or form instead of importing the primitive your app already owns.
AI Frontend Governance for production codebases
Decantr gives AI coding agents the contract, context, and evidence they need to edit your frontend without drifting from your product standards.
v3.4.0 shipping today · ★ 6 on GitHub · 8 MCP tools · MITnpx @decantr/cli scan
Project Health is a deterministic score over duplicate components, raw values, route coverage, and accessibility checks. Open-source rubric →
Works with frameworks you already ship
The drift problem
Coding agents are fast enough to outrun your product standards. Decantr gives them the context and evidence loop they were missing.
The agent reimplements a button, card, or form instead of importing the primitive your app already owns.
Inline colors, arbitrary Tailwind values, and one-off spacing slip past review because each prompt only sees part of the app.
Pages keep changing while docs, route maps, and design expectations stop agreeing with what users actually touch.
One local loop
Three commands. Three artifacts. Your app remains the authority — Decantr just gives your agent something to repair against.
Reads routes, components, styling, and existing project rules. Zero writes to source.
npx @decantr/cli scan
Writes a repo-owned contract and an observed baseline. Reversible. Gitignored where it should be.
npx @decantr/cli adopt --yes
Emits findings with stable codes, repair IDs, and an evidence bundle your agent reads automatically.
npx @decantr/cli verify --evidence
decantr verify --evidence | claude --apply
One repair, end to end
Decantr emits a finding. Your agent reads it. The diff lands clean. No vibes — concrete codes, IDs, and anchors.
// .decantr/evidence/latest.json { "code": "COMP001", "route": "/feed", "file": "app/feed/SaveBtn.tsx", "issue": "Duplicate primitive", "expected": "@/ui/Button", "repair_id": "r_4a2" }
# MCP-fetched repair prompt
route: /feed
duplicate: app/feed/SaveBtn.tsx
already-owned: @/ui/Button
action:
replace local button
with imported primitive
preserve onClick + label
no other changes
// app/feed/SaveBtn.tsx - import { motion } from "framer" - const SaveBtn = (p) => ( - <motion.button {...p} /> ) + import { Button } from "@/ui/Button" + export const SaveBtn = (p) => + <Button {...p} />
Why a new tool
Existing tools see *files*. Decantr sees *routes, primitives, and the contract you've already shipped.*
| Decantr | ESLint | Stylelint | Storybook | |
|---|---|---|---|---|
| Scope | UI semantics + drift | JS syntax | CSS rules | Component dev env |
| Reads route-scoped context | Yes | No | No | Partial |
| Repair-ready findings for AI | Yes | No | No | No |
| MCP / agent-native protocol | 32 tools | No | No | No |
| Zero source modification | Yes | Yes | Yes | Setup files |
| Open source · MIT | Yes | Yes | Yes | Yes |
Built for local control
Runs from your terminal, your CI, or any MCP-compatible agent.
Findings, baselines, and screenshots live on your machine by default.
Brownfield adoption observes what's already there. No rewrite, no migration.
Tailwind, CSS modules, MUI, shadcn, your own design system — Decantr observes.
Agent-ready context
Before your agent touches a route, Decantr can hand it the route contract, owned primitives, allowed tokens, and active findings — through MCP or stdout.
ROUTE /feed OWNS SavedRecipes, FeedItem, ActionsBar PRIMITIVES @/ui/Button, @/ui/Card, @/ui/Dialog TOKENS text-primary, bg-card, gap-sm RULES no inline styles · import primitives only · ARIA labels required BEHAVIOR confirmation-dialog · accessible name · destructive copy EVIDENCE last-pass 0x4a2 · 3 findings open · 8 MCP tools online
Built in the open
No black box, no telemetry by default, no rug pull. The whole loop is yours to read and to fork.
Pricing posture: the CLI, verifier, MCP server, and contract layer are free forever, MIT licensed. A hosted Project Health dashboard is on the roadmap — opt-in, never required.
Momentum
Route discovery, graph context, shell drift evidence, and MCP task scoping tightened against messy and pristine Brownfield apps.
Push your local evidence to a team view. PR comments, drift over time, repair throughput — opt-in only.
One contract layer across your design system and consumers. Repair findings travel with shared primitives.
Already scanned?
Adopt observes what's already in your app and writes a repo-owned contract. Reversible. Gitignored. Yours.
npx @decantr/cli adopt --yes