Files
Antigravity bd495be965
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 12s
feat: design system overhaul — sidebar, AI chats, settings, brainstorm, color cleanup
- Sidebar: dynamic brand-accent colors, brainstorm section restyled
- AI chat general: popup panel with expand/collapse, hides when contextual AI open
- AI chat contextual: tabs reordered (Actions first), X close button, height fix
- Settings: all tabs restyled, 6 new color presets (sage, terracotta, iron, etc.)
- Global color cleanup: emerald/orange hardcoded → brand-accent dynamic
- Brainstorm page: orange → brand-accent throughout
- PageEntry animation component added to key pages
- Floating AI button: bg-brand-accent instead of hardcoded black
- i18n: all 15 locales updated with new AI/billing keys
- Billing: freemium quota tracking, BYOK, stripe subscription scaffolding
- Admin: integrated into new design
- AGENTS.md + CLAUDE.md project rules added
2026-05-16 12:59:30 +00:00

146 lines
3.9 KiB
Markdown

---
name: stitch-generation
description: AI-assisted UI design using Google Stitch from specifications and sketches
---
# Stitch UI 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
---
## INITIALIZATION
### Design Log
Read `{output_folder}/_progress/00-design-log.md`. Check Current and Backlog for context.
## OVERVIEW
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
---
## WHEN TO USE
**Use Stitch when:**
- New page with detailed specification ready
- Have a visual reference (existing design or screenshot)
- Have a sketch showing layout structure
- Want rapid visual design iteration
**Skip when:**
- Building design system components (use tokens instead)
- Minor updates to existing designs
- No specification exists yet (write spec first)
---
## PREREQUISITES
1. **Specification exists** for the screen(s) to generate
2. **Visual reference available** (screenshot or approved design)
3. **Sketch available** showing layout structure
---
## WORKFLOW
### Step 1: Create Generation Log
Create a Stitch generation log in the agent experiences folder.
**Location:** `{output_folder}/_progress/agent-experiences/{YYYY-MM-DD}-stitch-{feature}.md`
### Step 2: Pre-Generation Questions
For each potential screen, decide:
| Question | Columns |
|----------|---------|
| Generate in Stitch? | Screen, Has Code?, Has Sketch?, Generate?, Why |
| What reference? | Screen, Reference, Source |
### Step 3: Gather Inputs
| Input | Action |
|-------|--------|
| **Visual Reference** | Take screenshot OR locate existing design |
| **Sketch** | Locate in spec's `Sketches/` folder |
| **Prompt** | Prepare using template below |
### Step 3a: Prepare the Prompt
**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.
### Step 4: Generate in Stitch
1. Go to [stitch.withgoogle.com](https://stitch.withgoogle.com)
2. Upload visual reference and sketch images
3. Paste prepared prompt
4. Generate 2-3 variants
5. Select best result
**Settings:** Standard Mode (quick) or Pro Mode (higher fidelity). Viewport: Mobile 390px or Desktop 1440px.
### Step 5: Review Against Spec
| 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.
### Step 6: Export & Store
| 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}`
### Step 7: Update Specification
Add Visual Design section to specification referencing the Stitch output.
---
## STITCH CAPABILITIES & LIMITS
**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).
---
## PROMPT TIPS
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.
---
## AFTER COMPLETION
1. Update design log
2. Suggest next action (implementation or further iteration)