Code
A generator cannot ask what you meant halfway through. It reads the spec, writes the files, and wherever the spec was vague the code comes out wrong in a way you can point at. That makes generating code the fastest way to learn which parts of a design system are actually described — and it answers to the contract the spec declares, not to one library’s catalogue.
What comes out is prototyping-grade code, deliberately. Good enough to prototype with is the goal; good enough to scaffold production code is a compliment, not an aim. The components are faithful to the spec’s API and visual expression rather than idiomatic throughout, so an engineer extending one would duplicate it and evolve from there instead of hardening it in place. Generating code from specs is the longer argument for why production grade is a direction, not a destination.
What a run writes
Both targets emit a set of files per component rather than a single file, and each one answers to a different consumer: the props interface, the markup, the stylesheet, the stories, and the library-level custom properties. What gets emitted covers them one at a time.
Everything a generator writes opens with a Generated. Do not edit header and is overwritten on the next run. The seam for code you own is a sibling file the commands never touch, which the stories import in place of the generated scaffold when it exists.
See Also
- What gets emitted — each artifact in detail
- Prop Naming — how spec property names become code property names
- Code-Only Props — properties that exist for the code and not for the design file