Skip to content

feat(mint): add dtcg export prompt with structured dimension token {value, unit} format - #107

Draft
nujovich wants to merge 4 commits into
mainfrom
hermes/build/mint-style-dictionary-dtcg-dimension-tokens
Draft

feat(mint): add dtcg export prompt with structured dimension token {value, unit} format#107
nujovich wants to merge 4 commits into
mainfrom
hermes/build/mint-style-dictionary-dtcg-dimension-tokens

Conversation

@nujovich

@nujovich nujovich commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Card: https://github.com/nujovich/mint-radar/issues/11

What: Adds an LLM-based dtcg export prompt to EXPORT_PROMPTS in lib/prompts.mjs. This prompt instructs the LLM to generate DTCG v1 Format Module JSON with structured dimension tokens ({value, unit} objects instead of flat strings), proper $type/$value organization, shadow arrays, and typography sub-groups. The deterministic dtcg-exporter.mjs path is unchanged — this adds a complementary LLM-driven code path for richer DTCG generation.

Why: Style Dictionary v5.4.0 adopted DTCG v2025.10 dimension tokens as {value, unit} objects. Mint's deterministic DTCG exporter already handles this format, but the LLM-based export pipeline (used for all targets via buildExportPrompt) had no dtcg prompt builder. This closes the gap so that dtcg can function as a proper export target in both deterministic and LLM modes.

Decision: Nadia chose Option B (differentiation approach — implement code plan as described).

Milestones

  • Milestone 1 — Add dtcg export prompt to EXPORT_PROMPTS in lib/prompts.mjs with DTCG {value, unit} dimension token instructions
  • Milestone 2 — Add DTCG type definitions to lib/types.ts for dimension, typography, and shadow tokens
  • Milestone 3 — Update bin/mint-ds.mjs to support --format dtcg flag for token generation flow
  • Milestone 4 — Add test fixture and tests for DTCG output validation

How to test:

npm test

@nujovich

Copy link
Copy Markdown
Owner Author

All milestones complete. Ready for review when you are.

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.

1 participant