What an agent needs from your design system
A starting point for documenting components so that teams and agents can apply the same rules.
Start with one component
Choose one that appears across several screens. Document its purpose, supported variants, expected inputs and states. A button can specify when to use its primary style and how to signal that an action is in progress.
Connect the rule to implementation
Identify the equivalent component in code and link visual decisions to their tokens. Add a correct example and an edge case so the rule can be checked during review.
Test it on a small task
Ask the agent to use the component in a real flow and look for decisions that the contract leaves open. Use those findings to refine the documentation before extending it to more components.