fix: add mandatory mechanical pre-scan to typeset and layout commands#160
fix: add mandatory mechanical pre-scan to typeset and layout commands#160kaushalrog wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6e4f27c. Configure here.
|
Thanks for this. I agree with the intent: I don’t think this particular implementation is the right shape to merge, though. The grep commands are brittle, currently have a few regex/shell issues, and are mostly Tailwind-arbitrary-value specific, so they’d miss a lot of the ways these problems show up in real projects. I think this should move into the detector instead: add a typography-scoped preflight, reuse/extend the existing typography-related detector rules, and have I’m going to close this PR in favor of that detector-backed approach, but the underlying idea is definitely valid. |

Resolves #149. Agents running /typeset or /layout now grep for
off-spec values (orphan px font sizes, ad-hoc leading, hard-coded
hex colors, arbitrary spacing) before visual review. This catches
values like 12.5px that slip past LLM visual passes.
Surfaces all hits in the response so the user can decide which to
fix vs. accept as scoped exceptions.
Note
Low Risk
Low risk documentation-only change that adds required pre-review grep checks; the main risk is minor confusion if the regexes or the stray trailing
\inlayout.mdare incorrect.Overview
Adds a mandatory “Mechanical Pre-Scan” step to the
layoutandtypesetreference guides, requiring reviewers to run predefinedgrepcommands before visual analysis.The new pre-scan checks surface off-spec values (e.g., Tailwind arbitrary spacing/typography, orphan
opacity/leading, hard-codedpxspacing/font sizes, hex colors, and extremez-indexvalues) and instructs agents to report all matches so users can choose fixes vs. scoped exceptions.Reviewed by Cursor Bugbot for commit 6e4f27c. Bugbot is set up for automated code reviews on this repo. Configure here.