chore(agents): trim root CLAUDE.md by ablation; AGENTS.md links to it
Merged
WA
3d ago+50+50+01234567890123456789-281-281-012345678901234567890123456789
Summary
- Trimmed root
CLAUDE.mdfrom 22.6KB to 11.5KB (-49%) by treating it as an ablation: traced every section to the commit that added it, bucketed each rule, then replayed tasks against old vs new guidance - Buckets: facts the model can't infer and scar-tissue rules stay (Application Operation Boundary, deployment flags,
tools.config.paramscoercion, testing culture, the local gate); rules already enforced by acheck:*audit or biome become one-line pointers (the audit message names the fix); narrow area rules move to their path-scoped rule file; the repo tree and generic coaching are gone Common utilitieskeeps the ID rule (namedrandomUUIDimports slip pastcheck:utils) and the helperscheck:utilscan't catch (toArray, scalar coercions,compareStrings,backoffWithJitter/parseRetryAfter), with their typed-source and stricter-local-helper exceptions- Opening paragraph now lists the sections and says how to read a failing audit, so rules near the end aren't missed
AGENTS.mdis now a symlink toCLAUDE.md(same asapps/sim/CLAUDE.md->AGENTS.md). Drops the Turborepo agent block: the installed turbo 2.9.14 ships nodocs/it points at and never writes the blocksim-styling.mdnow also loads forpackages/workflow-renderertsx, andsim-testing.mdforapps/sim/scripts/test-*-e2e.ts, so the rules that left the root still reach those files- Chip-family list and "no global styles" moved into
.claude/rules/sim-styling.md(loads for everyapps/sim/**/*.tsx); two skills that citedCLAUDE.md "Styling and EMCN"now point there
Type of Change
- Chore (agent guidance)
Testing
- Ablation probes: 9 tasks phrased as normal dev requests, each tempting a rule that was cut or condensed (retry backoff, deterministic key order, hosted/billing gating in a client component, logging ids, untyped payload coercion, settings toggle via emcn, context-menu item, numeric tool param, small lib feature + "make sure it works"). Opus 5.5 headless, project settings only, no Bash, once per variant from the same staging base
- Old guidance: 9/9 followed, 326 prod lines, $6.77, 135 turns
- New guidance: 9/9 followed, 312 prod lines, $5.93, 120 turns
- All 18 diffs pass
check:utils,check:source-conventions,check:client-boundary,check:file-names,check:explicit-any,check:comment-hygiene; neither variant wrote after-the-fact unit tests - Limits: one run per variant; no Bash, so this doesn't measure whether agents still run the local gate
- Coverage audit: mapped each of ~120 old rules to where it lives now (new root file, a rule file whose
paths:cover the files it matters for, a skill the root points to, or an audit whose failure message states the fix). A separate blind review against the old file found 12 gaps (dropped exceptions, softened wording, rule files scoped narrower than the root rule); all are restored in the second commit check:guidance-refs(78 docs, everyCLAUDE.md "<Section>"citation still resolves),check:skills,bun run lint
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing (new tests pass the
test-auditauthoring gate) - No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
š¤ Generated with Claude Code