r/ChatGPTCoding • u/Longjumping_War_8480 • 6h ago
Resources And Tips Why dumping huge UI/design rules into .cursorrules makes coding agents worse — and how stage-based skill routing fixed it for me
Most people either give their coding agent zero design instructions (and get the same purple-gradient SaaS layout) or paste a massive style guide into `CLAUDE.md` / `.cursorrules`. From testing both, the second approach actually hurts output quality: the model mixes conflicting rules, burns context before writing code, and still ignores spacing or motion details.
What worked much better for me was splitting design knowledge into a tiny ~190-line router and a JSON stage graph (`R0–R21` across 7 stages: direction → tokens → copy → layout → motion → browser audit). At each step, the agent only reads the 3–5 specific skill files that match the task instead of loading ~345 design rules at once.
Two things made the biggest difference in the 3 builds attached above (a 3D Apple-style product sequence, a 3D pizzeria landing page, and a 60fps canvas motion piece):
- Locking down color, typography, and real copy *before* letting the agent write any Three.js or layout code.
- Ending every run with a deterministic browser check (contrast, mobile overflow, `prefers-reduced-motion`) rather than trusting the model's "looks good" summary.
I packaged this routing setup as an open-source repo (MIT) with a Node validation script that checks all 324 route/file references. Happy to drop the GitHub link in the comments if anyone wants to inspect the graph or try it.



1
u/Difficult_Duty2198 13m ago
does the router approach cut down on the agent ignoring spacing stuff in practice, or do you still end up fixing a lot at the browser audit stage?