Skip to content

feat: add design-md export target (DESIGN.md generator)#103

Open
nujovich wants to merge 6 commits into
mainfrom
feat/design-md-export
Open

feat: add design-md export target (DESIGN.md generator)#103
nujovich wants to merge 6 commits into
mainfrom
feat/design-md-export

Conversation

@nujovich

Copy link
Copy Markdown
Owner

Summary

Adds a new deterministic design-md export target that converts the resolved mint-ds.tokens.json into a human-readable DESIGN.md — a portable single source of truth for a project's design system, suitable as context for AI-assisted design workflows.

  • mint-ds export --target design-md (alias design) → writes DESIGN.md
  • Fully deterministic (no LLM / no network), mirroring the existing dtcg target
  • Sections: Colors (per-color 50–900 scale tables), Typography (families / sizes / weights / line heights), Motion (durations / easings), Spacing, Border radius, Shadows
  • Empty categories are omitted; brand falls back to # Design System; per-color description rendered only when present; table cell values escape |

Implemented as a new export target (not a new subcommand), reusing the existing resolveTarget / EXPORT_OUTPUT / cmdExport plumbing (--out, --stdout).

Closes #26.

Changes

  • lib/design-md.mjs — pure convertTokensToDesignMd(tokens) converter
  • lib/prompts.mjs — register the design-md target + design alias
  • bin/mint-ds.mjs — deterministic cmdExport branch + --help example
  • package.json — add lib/design-md.mjs to the published files
  • examples/frankenstein/DESIGN.md — golden snapshot
  • README.md — document the target

Test Plan

  • Unit tests for the converter (brand fallback, per-color tables, description note, pipe escaping, omit-empty, determinism)
  • Golden snapshot against the frankenstein fixture
  • End-to-end CLI test (export --target design-md --stdout, plus design alias)
  • Full suite green (534 tests)
  • npm run check:pack passes (new lib file in published tarball)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: generate DESIGN.md for import into Claude Design

1 participant