name: stitch-generation
Goal: Generate production-quality UI designs using Google Stitch AI
Your Role: Guide the user through preparing inputs and creating a Stitch generation dialog
Read {output_folder}/_progress/00-design-log.md. Check Current and Backlog for context.
Google Stitch transforms text prompts, sketches, and reference images into responsive interfaces.
Input Formula:
Visual Reference + Sketch + Specification = Stitch Generation
Output: UI designs exportable to Figma or HTML/CSS
Use Stitch when:
Skip when:
Create a Stitch generation log in the agent experiences folder.
Location: {output_folder}/_progress/agent-experiences/{YYYY-MM-DD}-stitch-{feature}.md
For each potential screen, decide:
| Question | Columns |
|---|---|
| Generate in Stitch? | Screen, Has Code?, Has Sketch?, Generate?, Why |
| What reference? | Screen, Reference, Source |
| Input | Action |
|---|---|
| Visual Reference | Take screenshot OR locate existing design |
| Sketch | Locate in spec's Sketches/ folder |
| Prompt | Prepare using template below |
DO NOT paste raw specifications into Stitch. Use the prompt template instead.
Template: templates/stitch-prompt.template.md
Include: Project Context, Design System, Component Styles, Screen Content (ONE language, no Object IDs), Current State Notes.
Settings: Standard Mode (quick) or Pro Mode (higher fidelity). Viewport: Mobile 390px or Desktop 1440px.
| Check | Pass? |
|---|---|
| Content/copy matches spec | |
| Layout follows sketch | |
| Visual style matches reference | |
| All key elements present |
If issues: Re-prompt with specific corrections or edit in Stitch.
| Format | When | Destination |
|---|---|---|
| Figma | Team collaboration | Figma project |
| HTML/CSS | Code reference | {spec-folder}/Visual-Design/ |
| Screenshot | Documentation | {spec-folder}/Visual-Design/ |
Naming: {screen-name}-stitch-v{#}.{ext}
Add Visual Design section to specification referencing the Stitch output.
Does well: Single screen generation, style matching, responsive layouts, clean HTML/CSS export, Figma-compatible output.
Limitations: Best with 2-3 screens at a time, layouts can be generic, no built-in design system awareness, free tier limits (350 standard + 200 pro/month).
Effective prompts include: App type, Context, Visual direction, Key elements, Actual content/text, Mood/tone, Viewport.
Template: See templates/stitch-prompt.template.md for complete structure and example.