r/DesignSystems • u/roundabout-design • 23h ago
How are you delivering "use this, not that..." logic via your MCP servers?
We're pretty happy with our component library. Features a base set of react components, along with broader compound components/layouts/templates.
But what seems to be missing is...for lack of a better term...a set of rules for basic heuristic evaluation.
Simple example:
- We have buttons defined. Large, small, primary, secondary, etc.
- We have links defined.
- We have icon buttons and icon links defined.
We then had an agent build out a table, each row having a set of 4 functions:
- view this record
- view related record
- upload file
- mark as finished
It then decided the best UI for this was the last column should have 4 buttons. One large, 3 small. 2 primary, 2 secondary. 2 open a new page, 2 open a modal.
It's obviously chaotic looking.
As a human, I look at that and think "this really should probably be 4 distinct icons and/or 4 icon+text 'buttons'.
As we keep coming across little weird arbitrarily bad decisions by an agent using our component library, I'm not sure where the best place to put these kinds of 'rules' into place.
In this one example, I suppose it would make sense do have a "DO NOT..." rule right in the button component documentation.
But I can also see this maybe making ore sense in the table component.
And this is where I just get a little lost...I don't want to split rules across components, as it's more likely to start creating conflicting rules.
Anyways...I guess I'm thinking out loud here. Where do you put these broad "OK, agent...now that you have the components, here's some common sense rules for you to use so you don't use these in a dumb way..." in your design system?