Design compiler: natural language → AST → deterministic SVG
Prompt → Gemini → AST → Compiler → SVG
packages/
types/ # AST definitions (9 node types)
core/ # Validation, normalization, compiler
ai/ # Preference learning (planned)
apps/
cli/ # CLI
viewer/ # Canvas editor + AI generation
pnpm install && pnpm build
cd apps/viewer && pnpm dev # localhost:3000- Set Gemini API key
- Enter prompt → generates AST → renders SVG
- Edit AST directly if needed
root frame group shape stroke mark text paint ref
validate → normalize → solveConstraints → layout → emitSvg
Determinism: fixed-point quantization, seeded RNG, stable stringify
- Phase 0: Foundation
- Phase 1: Minimal AST
- Phase 2: Compiler
- Phase 3: Doctrine (constraints)
- Phase 4: Variation Engine
- Phase 5: Preference Learning
- Phase 6: Guided Search
TypeScript 5.x · pnpm · Node 20 · Gemini 2.0 Flash
MIT