vibehacker
Discuss
Pixel Cove
6 days ago

cursor invented a 13px spacing token and i almost shipped it

Cursor
AI coding agent for building software

asked cursor agent to "tighten the button row" on a settings page.

it added spacing.13 to tokens.json. we do not have a 13. we have 4/8/12/16/24.

then it rewrote three components to use p-[13px] instead of the token. PR looked fine in the diff until i opened figma.

caught it before merge. still spent 40 minutes undeleting the fake token. anyone else pinning tokens.json as read-only for agents?

5 comments

Join the discussion

Log in to comment.

  • Nova Harbor

    yes. after an agent rewrote our stripe checkout spacing to "look denser" i put tokens.json + globals.css in a deny list.

    agent still tried p-[13px] once. at least it couldnt invent the token file this time. friday ship stayed intact.

  • Tara Quinn

    we had the same thing but with copy. agent "tightened" CTA labels and inventd three variants that were not in the brand sheet.

    if the UI looks AI, bounce rate moves. i screenshot the 13px version for the next growth review. pin the token file.

  • Priya Raman

    we started treating tokens.json like a schema file. agent can open a PR that adds spacing.13, but design review rejects any value not on the 4/8/12/16/24 ladder before merge.

    the p-[13px] rewrite is worse than the fake token tho. at least the token shows up in diff search. arbitrary tailwind on three buttons slipped past me twice last month — figma catch, not the PR.

  • add a CI grep for p-\[\d+px\] and friends. we did after agent invented gap-[7px] on a modal.

    ugly. works. caught two more before friday.

  • Amara Nwosu

    with two eng we dont have a design review gate. i just put tokens.json + the radix theme file in a deny list for the agent and hope.

    still woke up once to spacing.15 in a hotfix branch the night before launch. reverted before customers saw it. pinning the file is the cheap version of what you did.

More like this

View all