In the Skill's Own Terms
Generates HTML/CSS or framework components using Pretext for computed text layout. It starts from an approved mockup, a plan, design-review context or a user description, and routes to different Pretext APIs for simple layouts, chat bubbles and editorial spreads.
Vanilla output inlines a vendored Pretext bundle when available, but uses a CDN fallback when it is missing and may load external fonts. Framework output adds Pretext as a project dependency. The source includes local preview and refinement steps; production readiness still requires review in the target project.
What it produces
- A finalized.html with Pretext, design tokens, semantic structure, editable text and resize-aware layout. Pretext is inlined when the vendored bundle exists; otherwise the file uses a CDN. External font links may remain.
- Framework component file (React TSX/JSX, Svelte, Vue) with Pretext imports added to project dependencies, saved to ~/.gstack/projects/$SLUG/designs/<screen-name>-YYYYMMDD/finalized.[tsx|svelte|vue]
- finalized.json metadata alongside HTML carrying source_mockup path, source_plan path, mode (approved-mockup/plan-driven/freeform/evolve), pretext_tier, framework choice, iteration count, date, screen name, branch
- DESIGN.md file in open DESIGN.md format if user accepts extraction offer, containing CSS custom properties, font families, color palette, spacing scale, border radius, shadow values extracted from generated HTML
How It Works
- 01Detect Design Context and Route
Checks for approved.json from /design-shotgun, CEO plans, design variants, or DESIGN.md tokens.
- 02Extract Implementation Spec
If design binary available, runs prompt command on approved PNG to extract colors, typography, layout structure via GPT-4o vision.
- 03Smart Pretext API Routing
Classifies design into tier: simple layouts use prepare + layout for resize-aware heights; card grids use same for self-sizing; chat UIs use prepareWithSegments + walkLineRanges for tight-fit bubbles; editorial spreads use layoutNextLine for text around obstacles.
- 04Generate Pretext-native HTML
Writes single file with vendored Pretext inlined (or CDN fallback), CSS custom properties from tokens, semantic HTML5, contenteditable + MutationObserver for live editing, ResizeObserver for relayout on resize, real content extracted from mockup or plan.
- 05Slop Gate Scan Before Preview
If design detector available, scans finalized page once for AI-slop patterns (purple gradients, identical card grids, generic CTAs not from mockup).