The Pragmatic Guide to LLM Blast Radius
You are never locked into an inflexible box. Chemical X is designed to give you surgical control over AI blast radius, token budgets, and slop detection via a simple .chemxrc configuration file.
Why Enforce Bounded Component Weight?
The 500-line ceiling and 100-line molecule targets are not arbitrary aesthetic dogma. They are empirical boundaries designed around machine attention mechanics:
When asked to modify a single button state inside a 500-line file with 12 nested hooks, an LLM must ingest and predict attention weights across all 500 lines. It hallucinates missing imports, inadvertently mutates neighboring reactive state, and burns thousands of unnecessary prompt tokens.
When state, styling, and markup are encapsulated into compact single-purpose capsules, the LLM’s blast radius is strictly bounded. The model reads 60 lines, executes the modification with 100% precision, and exits in under 2 seconds for ~30 tokens.
.chemxrc Configuration Reference JSON FORMAT
Place in your repository root to override defaults and customize thresholds.
{
"$schema": "https://chemicalx.xophz.com/schema/chemxrc.json",
"version": "1.0",
"rules": {
"lineBudget": {
"enabled": true,
"maxFileLines": 500,
"maxCapsuleLines": 100,
"severity": "warn"
},
"aiSlopDetection": {
"enabled": true,
"conversationalResidue": true,
"echoComments": true,
"lazyPlaceholders": true,
"shallowTryCatch": true,
"severity": "error"
},
"tokenBudget": {
"enabled": true,
"maxTokensPerFile": 3000,
"warnAt": 2000
},
"designSystemBoundaries": {
"enabled": true,
"encapsulateRawPrimitives": true,
"allowedPrimitivePaths": ["src/components/atoms/**"]
}
},
"mcp": {
"masterGateway": true,
"sqliteWalMode": true,
"concurrencyLeases": true
},
"exclude": [
"node_modules/**",
".nuxt/**",
"dist/**",
"legacy/**",
"**/*.spec.ts"
]
}4-Step Progressive Adoption Strategy
Run npx chemx audit to benchmark your baseline token burn and MHI score without changing any code.
Create a .chemxrc with your team's file limits and exclude legacy modules so you migrate iteratively.
Switch your agent scripts and pre-commit hooks to chemx verify, saving 99% of verification tokens.
Equip Cursor, Claude Code, and Cline with chemx for 1-click approvals and SQLite symbol lookups.