design-to-code
Design To Code
Input: one approved design (from prototype-to-design) and its state renders. Output: the screen
assembled from existing primitives against a derived view-model, plus an inventory of the
components extraction actually justified. The design is a disposable spec, not source: its
decisions survive as tokens and inventory rows, its markup does not.
Where the input is. The durable half is the design ticket, carrying the measurements, the
frozen component names and the state renders. The throwaway half is its page, alone at the
root of design/#<N>-<screen>, read without a checkout:
git fetch origin 'design/#<N>-<screen>'
git show FETCH_HEAD:design.html > "$TMPDIR/<screen>.html"
FETCH_HEAD, not the branch name: a fetch of one branch writes no local head, so
design/#<N>-<screen> resolves to nothing and the failure reads exactly like a reaped branch.
The page is self-contained, so that one file opens over file:// as the design.