Garry Tan and Claude Fable 5.1
e49d1eea49
feat(lib): open DESIGN.md reader/writer + gstack-design-md bin
...
lib/design-md.ts implements the open DESIGN.md format (google-labs-code/
design.md, Apache-2.0): YAML front matter with the five token groups (colors,
typography, rounded, spacing, components) and eight canonical `##` sections
in spec order (Overview, Colors, Typography, Layout, Elevation & Depth,
Shapes, Components, Do's and Don'ts), aliases mapped, extras preserved after
them in their original order. parseDesignMd never throws (unparsable front
matter → `unknown` with a reason); renderDesignMd re-emits the preserved front
matter bytes and only `convert` writes fresh YAML through a small block-style
emitter (Bun.YAML.stringify is flow style); upsertSection splices the body
only; tokensFlat resolves `{path}` references to primitives and reports group,
self, dangling, and cyclic refs as DESIGN_MD_TOKEN_REF_INVALID. convertLegacy
turns gstack's pre-spec DESIGN.md into the open format: Product Context and
Aesthetic Direction fold into Overview, Typography roles become
display/body/label/mono tokens (mono carries fontFeature: tnum), Color hexes
become colors (mode-qualified labels keep their qualifier; strategy lines are
not colors), the Spacing scale and Layout radii become spacing and rounded,
Motion / Grain Texture / Decisions Log survive as extras. The format marker
lives inside the file: a YAML comment on line 2 of a spec file, an HTML
comment on line 1 of a legacy file.
bin/gstack-design-md.ts: `check` (DESIGN_MD_FORMAT + marker), `convert
[--write]` (backup to DESIGN.md.legacy.bak, temp+rename, refuses ambiguous
input with DESIGN_MD_CONVERT_REFUSED), `tokens` (flat JSON), `mark
<spec|legacy-keep>`. Exit 3 + DESIGN_MD_INTERNAL_ERROR is a gstack bug.
design/src/memory.ts: updateDesignMd upserts "Extracted Design Language"
through the lib (front matter bytes untouched, canonical order kept, section
replaced on rerun) and creates a spec skeleton with tokens from the extraction
when no file exists; readDesignConstraints leads with the flat tokens and the
Overview for spec files. The design binary still bundles.
test/design-md.test.ts pins all of it against gstack's own DESIGN.md.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com >
2026-09-08 16:22:25 +00:00
..
2026-09-08 16:14:03 +00:00
2026-09-08 16:14:03 +00:00
2026-08-15 22:20:30 -07:00
2026-08-29 10:10:35 -07:00
2026-03-18 23:57:59 -05:00
2026-08-15 22:20:30 -07:00
2026-08-29 10:10:35 -07:00
2026-08-16 19:34:41 -07:00
2026-08-31 08:55:30 -07:00
2026-09-06 08:54:25 -07:00
2026-09-06 08:54:25 -07:00
2026-09-06 08:54:25 -07:00
2026-09-01 11:15:11 -07:00
2026-08-27 09:50:31 -07:00
2026-08-29 10:10:35 -07:00
2026-08-29 09:06:54 -07:00
2026-04-19 17:50:31 +08:00
2026-08-31 08:55:30 -07:00
2026-06-21 07:15:19 -07:00
2026-08-31 08:55:30 -07:00
2026-08-19 11:42:55 -07:00
2026-08-19 11:42:55 -07:00
2026-05-29 08:35:00 -07:00
2026-08-19 11:42:55 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-16 19:34:41 -07:00
2026-05-20 07:35:01 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 09:06:54 -07:00
2026-05-29 08:35:00 -07:00
2026-06-07 19:13:24 -07:00
2026-06-07 19:13:24 -07:00
2026-08-29 09:06:54 -07:00
2026-06-07 19:13:24 -07:00
2026-08-14 09:28:56 -07:00
2026-08-29 09:06:54 -07:00
2026-08-16 19:34:41 -07:00
2026-08-15 22:20:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 09:06:54 -07:00
2026-08-15 11:42:19 -07:00
2026-08-29 09:06:54 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-08-16 19:34:41 -07:00
2026-08-31 08:55:30 -07:00
2026-08-16 19:34:41 -07:00
2026-08-31 08:55:30 -07:00
2026-05-16 12:32:33 -07:00
2026-08-31 08:55:30 -07:00
2026-08-27 09:50:31 -07:00
2026-08-08 09:28:45 -07:00
2026-06-07 19:13:24 -07:00
2026-08-15 09:37:04 -07:00
2026-05-28 18:21:09 -07:00
2026-09-01 11:15:11 -07:00
2026-09-08 16:15:57 +00:00
2026-09-08 15:34:24 +00:00
2026-09-08 16:14:03 +00:00
2026-08-31 08:55:30 -07:00
2026-09-08 16:22:25 +00:00
2026-09-01 11:15:11 -07:00
2026-08-31 08:55:30 -07:00
2026-08-16 19:34:41 -07:00
2026-05-30 12:09:10 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-05-21 21:21:07 -07:00
2026-06-07 19:13:24 -07:00
2026-08-29 09:06:54 -07:00
2026-08-31 08:55:30 -07:00
2026-08-28 11:43:13 -07:00
2026-09-08 16:01:18 +00:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 09:06:54 -07:00
2026-08-15 22:20:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-15 22:20:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 09:06:54 -07:00
2026-08-14 22:02:07 -07:00
2026-08-29 09:06:54 -07:00
2026-05-20 07:35:01 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-09-08 16:01:18 +00:00
2026-08-28 11:43:13 -07:00
2026-08-31 08:55:30 -07:00
2026-08-15 11:42:19 -07:00
2026-06-08 06:20:58 -07:00
2026-08-31 08:55:30 -07:00
2026-06-21 07:15:19 -07:00
2026-08-29 09:06:54 -07:00
2026-08-16 19:34:41 -07:00
2026-08-31 08:55:30 -07:00
2026-06-08 06:20:58 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-05-21 21:21:07 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-08-16 19:34:41 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-05-17 08:26:36 -07:00
2026-08-31 08:55:30 -07:00
2026-05-30 14:57:07 -07:00
2026-08-08 09:28:45 -07:00
2026-08-16 19:34:41 -07:00
2026-08-15 22:20:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 09:06:54 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-09-06 08:54:25 -07:00
2026-09-08 16:14:03 +00:00
2026-09-01 11:15:11 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-15 11:42:19 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-09-08 16:01:18 +00:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-08-31 08:55:30 -07:00
2026-06-08 06:20:58 -07:00
2026-06-08 06:20:58 -07:00
2026-09-08 16:01:18 +00:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-09-06 08:54:25 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-09-06 08:54:25 -07:00
2026-08-31 08:55:30 -07:00
2026-08-27 09:50:31 -07:00
2026-05-29 08:35:00 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-08-31 08:55:30 -07:00
2026-08-19 11:42:55 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-05-14 17:20:48 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-08-31 08:55:30 -07:00
2026-04-26 13:55:13 -07:00
2026-08-31 08:55:30 -07:00
2026-08-14 09:28:56 -07:00
2026-09-01 11:15:11 -07:00
2026-09-05 14:45:28 -07:00
2026-08-14 22:02:07 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-09-08 16:14:03 +00:00
2026-08-14 22:02:07 -07:00
2026-08-17 07:50:37 -07:00
2026-08-31 08:55:30 -07:00
2026-08-15 11:42:19 -07:00
2026-07-14 16:35:30 -07:00
2026-06-14 11:40:57 -07:00
2026-04-18 15:05:42 +08:00
2026-05-30 14:57:07 -07:00
2026-08-15 09:37:04 -07:00
2026-09-01 11:15:11 -07:00
2026-05-21 21:21:07 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 09:06:54 -07:00
2026-05-07 20:14:59 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-05-20 07:35:01 -07:00
2026-05-30 14:57:07 -07:00
2026-04-19 08:38:19 +08:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-14 22:02:07 -07:00
2026-08-27 09:50:31 -07:00
2026-04-25 11:52:48 -07:00
2026-08-14 22:02:07 -07:00
2026-08-14 22:02:07 -07:00
2026-08-14 22:02:07 -07:00
2026-08-31 08:55:30 -07:00
2026-08-14 22:02:07 -07:00
2026-08-27 09:50:31 -07:00
2026-08-08 09:28:45 -07:00
2026-04-17 00:45:13 -07:00
2026-09-01 11:15:11 -07:00
2026-09-06 08:54:25 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-31 08:55:30 -07:00
2026-08-14 22:02:07 -07:00
2026-05-26 16:50:03 -07:00
2026-05-30 12:09:10 -07:00
2026-08-15 09:37:04 -07:00
2026-08-29 09:06:54 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-05-06 19:37:53 -07:00
2026-08-31 08:55:30 -07:00
2026-06-07 22:04:18 -07:00
2026-08-30 20:45:19 -07:00
2026-08-31 08:55:30 -07:00
2026-08-14 09:28:56 -07:00
2026-08-16 19:34:41 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-16 19:34:41 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-15 09:37:04 -07:00
2026-09-01 11:15:11 -07:00
2026-05-30 08:54:46 -07:00
2026-09-01 11:15:11 -07:00
2026-08-16 19:34:41 -07:00
2026-05-30 08:54:46 -07:00
2026-09-01 11:15:11 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-05-30 08:54:46 -07:00
2026-05-30 12:09:10 -07:00
2026-06-07 06:51:10 -07:00
2026-08-27 09:50:31 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 11:15:11 -07:00
2026-09-01 11:15:11 -07:00
2026-09-01 11:15:11 -07:00
2026-09-05 14:45:28 -07:00
2026-05-30 12:09:10 -07:00
2026-09-01 11:15:11 -07:00
2026-08-31 08:55:30 -07:00
2026-05-29 08:35:00 -07:00
2026-09-01 11:15:11 -07:00
2026-08-31 08:55:30 -07:00
2026-09-01 16:42:11 -07:00
2026-08-29 09:06:54 -07:00
2026-05-29 08:35:00 -07:00
2026-08-31 08:55:30 -07:00
2026-05-29 08:35:00 -07:00
2026-04-24 01:38:21 -07:00
2026-06-04 11:14:43 -07:00
2026-06-21 07:15:19 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-07-09 23:49:09 -07:00
2026-08-31 08:55:30 -07:00
2026-09-05 14:45:28 -07:00
2026-09-06 08:54:25 -07:00
2026-09-05 14:45:28 -07:00
2026-09-05 14:45:28 -07:00
2026-09-05 14:45:28 -07:00
2026-08-14 22:02:07 -07:00
2026-08-18 17:00:04 -07:00
2026-09-05 14:45:28 -07:00
2026-09-05 14:45:28 -07:00
2026-08-27 09:50:31 -07:00
2026-08-27 09:50:31 -07:00
2026-08-24 08:55:58 -07:00
2026-08-19 16:53:19 -07:00
2026-09-05 14:45:28 -07:00
2026-09-06 08:54:25 -07:00
2026-08-31 08:55:30 -07:00
2026-09-05 14:45:28 -07:00
2026-09-06 08:54:25 -07:00
2026-08-14 22:02:07 -07:00
2026-08-16 19:34:41 -07:00
2026-09-01 11:15:11 -07:00
2026-09-05 14:45:28 -07:00
2026-09-05 14:45:28 -07:00
2026-08-15 11:42:19 -07:00
2026-08-30 20:45:19 -07:00
2026-05-30 12:09:10 -07:00
2026-08-16 19:34:41 -07:00
2026-05-30 12:09:10 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 10:10:35 -07:00
2026-09-01 11:15:11 -07:00
2026-08-14 09:28:56 -07:00
2026-08-16 19:34:41 -07:00
2026-06-04 11:14:43 -07:00
2026-04-19 08:38:19 +08:00
2026-08-15 22:20:30 -07:00
2026-08-15 22:20:30 -07:00
2026-09-06 08:54:25 -07:00
2026-08-27 09:50:31 -07:00
2026-08-29 10:10:35 -07:00
2026-09-06 08:54:25 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 10:10:35 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-09-06 08:54:25 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-09-06 08:54:25 -07:00
2026-09-06 08:54:25 -07:00
2026-09-06 08:54:25 -07:00
2026-08-30 20:45:19 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-07-14 16:35:30 -07:00
2026-08-29 09:06:54 -07:00
2026-08-19 11:42:55 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-31 08:55:30 -07:00
2026-08-15 09:37:04 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-09-06 08:54:25 -07:00
2026-09-06 08:54:25 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 10:10:35 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 09:06:54 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-08-29 09:06:54 -07:00
2026-09-01 16:42:11 -07:00
2026-08-31 08:55:30 -07:00
2026-08-29 09:06:54 -07:00
2026-09-06 08:54:25 -07:00
2026-08-29 09:06:54 -07:00
2026-09-06 08:54:25 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-09-06 08:54:25 -07:00
2026-08-29 09:06:54 -07:00
2026-09-06 08:54:25 -07:00
2026-09-06 08:54:25 -07:00
2026-05-29 08:35:00 -07:00
2026-08-31 08:55:30 -07:00
2026-09-06 08:54:25 -07:00
2026-09-06 08:54:25 -07:00
2026-08-29 09:06:54 -07:00
2026-08-31 08:55:30 -07:00
2026-08-27 09:50:31 -07:00
2026-08-29 09:06:54 -07:00
2026-09-06 08:54:25 -07:00
2026-08-31 08:55:30 -07:00
2026-05-29 08:35:00 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-08-31 08:55:30 -07:00
2026-09-05 14:45:28 -07:00
2026-05-30 12:09:10 -07:00
2026-06-08 05:41:07 -07:00
2026-08-29 10:10:35 -07:00
2026-08-31 08:55:30 -07:00
2026-09-06 08:54:25 -07:00
2026-08-28 11:43:13 -07:00
2026-08-31 08:55:30 -07:00
2026-08-15 22:20:30 -07:00
2026-08-15 22:20:30 -07:00
2026-09-06 08:54:25 -07:00
2026-08-31 08:55:30 -07:00
2026-08-16 09:53:31 -07:00
2026-05-30 12:09:10 -07:00
2026-08-16 19:34:41 -07:00
2026-08-31 08:55:30 -07:00
2026-08-14 22:02:07 -07:00
2026-08-31 08:55:30 -07:00
2026-08-19 11:42:55 -07:00
2026-09-05 14:45:28 -07:00
2026-08-28 11:43:13 -07:00
2026-08-15 09:37:04 -07:00
2026-08-19 16:53:19 -07:00
2026-08-29 09:06:54 -07:00
2026-08-14 22:02:07 -07:00
2026-08-31 08:55:30 -07:00
2026-08-27 09:50:31 -07:00