| name | tds-ui-generator |
| description | Generate THAKI Design System (@thaki/tds) desktop-console UI from text / sketch / screenshot via a two-stage IR (UX-IR -> TDS-IR) with a deterministic compiler + validation gate + repair loop. Use when "TDS๋ก UI ์์ฑ", "ํ๋ฉด ์์ฑ๊ธฐ", "๋์์ธ์์คํ
์ปดํฌ๋ํธ ํธ๋ฆฌ ์์ฑ", "UI generator", "screenshot to TDS". Owns the TDS Component Registry (61 primitives) and the synthetic data engine for training a UI-gen model. Do NOT use for freehand React coding (use frontend-design) or Figma sync (use figma-to-tds). |
TDS UI Generator
์ผ๋ฐ UX ํํ์ ๋ณด์กดํ๊ณ TDS realization๋ง ๊ฐํ์ตํ๋ ๋ฐ์คํฌํฑ ์ฝ์ UI ์์ฑ๊ธฐ. ๋ชจ๋ธ์ ์ ํ๋
IR๋ง ์์ฑํ๊ณ ์ฝ๋ยท๊ฒ์ฆยท์ง๊ณ๋ ๊ฒฐ์ ๋ก ํ๋ค์ค๊ฐ ์์ ํ๋ค([[sonnet-format-determinism]]ยท
[[thin-harness-fat-skills]]ยท[[docx-readability]] ๋ํ). ํฌ๋งท ๊ฒฐ์ ๋ก ์ ์ด ์์น์ ๋ฐ๋ฅธ๋ค.
ํ์ดํ๋ผ์ธ
์
๋ ฅ(text/sketch/screenshot) โ UX-IR(๋์์ธ์์คํ
๋
๋ฆฝ) โ TDS-IR(registry-๊ฒ์ฆ)
โ validate_ir.py(๊ฒ์ดํธ) โ compile_tds_ir.py(TSX) โ ๋ ๋/critic โ repair ๋ฃจํ
์ฐ์ถ๋ฌผ (์ด ์คํฌ์ด ์์ )
| ํ์ผ | ์ญํ |
|---|
schema/ux-ir.schema.json | ์๋ ํํ(ํ๋ฉด๋ชฉ์ /์ ๋ณด๊ตฌ์กฐ/์ก์
/์ญํ ) + novelty/density ์ปจํธ๋กค |
schema/tds-ir.schema.json | ์ปดํฌ๋ํธ realization ํธ๋ฆฌ(enum์ registry๊ฐ ๋ฐํ์ ๊ฒ์ฆ) |
schema/registry.json | TDS Component Registry โ @thaki/tds 61 primitive์ props/slots/variant/enum + uxRoleToComponent |
scripts/validate_ir.py | ๊ฒฐ์ ๋ก ๊ฒ์ดํธ: ์ปดํฌ๋ํธ ์กด์ฌยทprop enumยทslot ํธํยทinteraction-graph(dead touch, ์ค๋ณต CTA) |
scripts/compile_tds_ir.py | TDS-IR โ React TSX(@thaki/tds import). ๊ฐ์ IR โ byte-identical |
scripts/grammar_gen.py | ํ๋ฅ ๊ทธ๋๋จธ ํฉ์ฑ ํ๋ฉด ์์ฑ๊ธฐ(๋ฌด์์ ์กฐํฉ ๊ธ์ง) |
scripts/build_dataset.py | ๊ฒ์ดํธ ํต๊ณผ ํ๋ฉด โ ๋คํ์คํฌ SFT + hard-negative preference pair |
์ฌ์ฉ
PY=.venv/bin/python
$PY scripts/grammar_gen.py --n 100 --registry schema/registry.json --out-dir samples/raw
$PY scripts/validate_ir.py --registry schema/registry.json --ir <tds-ir.json> --json
$PY scripts/compile_tds_ir.py --ir <tds-ir.json> --out Screen.tsx
$PY scripts/build_dataset.py --in-dir samples/raw --registry schema/registry.json --out-dir samples/dataset --cap 100
๋ถ๋ณ์
- ๋ชจ๋ธ์ JSX/์ฝ๋๋ฅผ ์ง์ ์ฐ์ง ์๋๋ค โ ๊ฒ์ฆ๋ TDS-IR๋ง. ์ฝ๋๋ ์ปดํ์ผ๋ฌ ์์ .
- ๊ฒ์ดํธ ํต๊ณผ๋ถ๋ง ํ์ต ๋ฐ์ดํฐ(data engine > data volume). status=valid ์๋๋ฉด drop ๋๋ repair.
- registry๋ retrieval ์์ค โ ํ์ฌ props๋ฅผ weights์ ์๊ธฐ์ํค์ง ์๋๋ค(TDS ๋ฒ์ ๋ณ๋ ๋๋น).
- ํ์ต: ์ผ๋ฐ UX ์ถ๋ก ์ LoRA/frozen ๋ณด์กด, TDS realization adapter๋ง ๊ฐํ์ต([[subagent-model-routing]]).
- ์ค๊ตญ teacher API๋ ๋น-TDS UX ์ถ๋ก ์๋ง(์ฌ๋ด IP ๋ณดํธ, 2026-07-14 ๊ฒฐ์ ).
๋ฐ์ดํฐ ํ์คํฌ (registry ํต๊ณผ ํ๋ฉด๋น ํ์)
textโUX-IR ยท textโTDS-IR ยท screenshotโTDS-IR ยท editโJSON Patch ยท invalidโrepair ยท TDS-IRโNL์ค๋ช
ยท DPO(good>corrupt).
Registry ์ฌ์์ฑ (tds_ssot ๊ฐฑ์ ์)
ThakiCloud/tds_ssot ํด๋ก โ props/slots/enum ์ฌ์ถ์ถ โ schema/registry.json ๊ฐฑ์ โ
uxRoleToComponent ์ฌ๋งคํ. ๋ฐ์คํฌํฑ ์ฝ์ ํ๋ฉด(Table/Drawer/Modal/CatalogCard/PageShell).