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.
Architecture Designed for LLM Blast Radius
Why enforce compact components? Because LLMs hallucinate when asked to edit 400-line files with 12 nested hooks. Chemical X defaults to bounded component weight—colocating state, enforcing single responsibility, and preventing silent regressions. Configurable out of the box via .chemxrc.
Arbitrary 100-line rules enforced for aesthetic purism or stylistic pedantry.
Bounded Blast Radius. When an LLM edits a 60-line component, its attention focus is laser-sharp. In a 450-line file with 12 hooks, the model hallucinates variable state and introduces silent regressions.
Strictly ban native HTML tags everywhere outside an arbitrary 'atom' directory.
Design-system boundary enforcement and encapsulated primitive auditing. Ensure raw tags carry consistent accessibility, focus states, and design tokens rather than ad-hoc inline mutations.
An inflexible framework that forces you to rewrite your entire tech stack from scratch.
100% configurable via .chemxrc. Adjust line limits, ignore legacy paths, customize AI slop thresholds, and configure token budgets to match your team's existing conventions.
Custom rules for your codebase: explore the Pragmatic Guide
See how to configure .chemxrc with custom line budgets, excluded directories, and AI slop detection.
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.