stitch-kit 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +139 -0
- package/CHANGELOG.md +86 -0
- package/README.md +167 -0
- package/agents/stitch-kit.md +93 -0
- package/bin/stitch-kit.mjs +430 -0
- package/docs/architecture.md +118 -0
- package/docs/color-prompt-guide.md +119 -0
- package/docs/mcp-naming-convention.md +64 -0
- package/docs/mcp-schemas/README.md +130 -0
- package/docs/mcp-schemas/apply_design_system.json +36 -0
- package/docs/mcp-schemas/create_design_system.json +78 -0
- package/docs/mcp-schemas/create_project.json +290 -0
- package/docs/mcp-schemas/delete_project.json +20 -0
- package/docs/mcp-schemas/edit_screens.json +46 -0
- package/docs/mcp-schemas/generate_screen_from_text.json +242 -0
- package/docs/mcp-schemas/generate_variants.json +77 -0
- package/docs/mcp-schemas/get_project.json +137 -0
- package/docs/mcp-schemas/get_screen.json +92 -0
- package/docs/mcp-schemas/list_design_systems.json +32 -0
- package/docs/mcp-schemas/list_projects.json +136 -0
- package/docs/mcp-schemas/list_screens.json +56 -0
- package/docs/mcp-schemas/update_design_system.json +32 -0
- package/docs/mcp-schemas/upload_screens_from_images.json +52 -0
- package/docs/prd-to-stitch-workflow.md +137 -0
- package/docs/skills-index.md +108 -0
- package/docs/tailwind-reference.md +207 -0
- package/package.json +41 -0
- package/skills/stitch-a11y/SKILL.md +428 -0
- package/skills/stitch-a11y/resources/audit-checklist.md +102 -0
- package/skills/stitch-animate/SKILL.md +371 -0
- package/skills/stitch-animate/resources/animation-patterns.md +248 -0
- package/skills/stitch-design-md/SKILL.md +215 -0
- package/skills/stitch-design-md/examples/DESIGN.md +54 -0
- package/skills/stitch-design-md/examples/usage.md +67 -0
- package/skills/stitch-design-md/scripts/fetch-stitch.sh +35 -0
- package/skills/stitch-design-system/SKILL.md +314 -0
- package/skills/stitch-design-system/resources/tokens-template.css +237 -0
- package/skills/stitch-html-components/SKILL.md +344 -0
- package/skills/stitch-html-components/resources/architecture-checklist.md +74 -0
- package/skills/stitch-html-components/scripts/fetch-stitch.sh +45 -0
- package/skills/stitch-loop/SKILL.md +183 -0
- package/skills/stitch-loop/examples/SITE.md +39 -0
- package/skills/stitch-loop/examples/next-prompt.md +24 -0
- package/skills/stitch-loop/examples/usage.md +77 -0
- package/skills/stitch-mcp-apply-design-system/SKILL.md +82 -0
- package/skills/stitch-mcp-create-design-system/SKILL.md +117 -0
- package/skills/stitch-mcp-create-project/SKILL.md +77 -0
- package/skills/stitch-mcp-delete-project/SKILL.md +62 -0
- package/skills/stitch-mcp-edit-screens/SKILL.md +121 -0
- package/skills/stitch-mcp-generate-screen-from-text/SKILL.md +102 -0
- package/skills/stitch-mcp-generate-screen-from-text/examples/desktop.md +53 -0
- package/skills/stitch-mcp-generate-screen-from-text/examples/mobile.md +71 -0
- package/skills/stitch-mcp-generate-variants/SKILL.md +124 -0
- package/skills/stitch-mcp-get-project/SKILL.md +67 -0
- package/skills/stitch-mcp-get-screen/SKILL.md +117 -0
- package/skills/stitch-mcp-get-screen/scripts/fetch-stitch.sh +35 -0
- package/skills/stitch-mcp-list-design-systems/SKILL.md +84 -0
- package/skills/stitch-mcp-list-projects/SKILL.md +77 -0
- package/skills/stitch-mcp-list-screens/SKILL.md +69 -0
- package/skills/stitch-mcp-update-design-system/SKILL.md +82 -0
- package/skills/stitch-mcp-upload-screens-from-images/SKILL.md +95 -0
- package/skills/stitch-mcp-upload-screens-from-images/scripts/encode-image.sh +43 -0
- package/skills/stitch-nextjs-components/SKILL.md +181 -0
- package/skills/stitch-nextjs-components/resources/architecture-checklist.md +65 -0
- package/skills/stitch-nextjs-components/resources/component-template.tsx +101 -0
- package/skills/stitch-nextjs-components/scripts/fetch-stitch.sh +45 -0
- package/skills/stitch-orchestrator/SKILL.md +337 -0
- package/skills/stitch-orchestrator/examples/workflow.md +173 -0
- package/skills/stitch-react-components/SKILL.md +236 -0
- package/skills/stitch-react-components/references/tailwind-to-react.md +117 -0
- package/skills/stitch-react-components/resources/architecture-checklist.md +34 -0
- package/skills/stitch-react-components/resources/component-template.tsx +35 -0
- package/skills/stitch-react-components/scripts/fetch-stitch.sh +35 -0
- package/skills/stitch-react-native-components/SKILL.md +333 -0
- package/skills/stitch-react-native-components/resources/architecture-checklist.md +74 -0
- package/skills/stitch-react-native-components/resources/component-template.tsx +104 -0
- package/skills/stitch-react-native-components/scripts/fetch-stitch.sh +45 -0
- package/skills/stitch-remotion/SKILL.md +280 -0
- package/skills/stitch-setup/SKILL.md +183 -0
- package/skills/stitch-shadcn-ui/SKILL.md +255 -0
- package/skills/stitch-skill-creator/SKILL.md +257 -0
- package/skills/stitch-skill-creator/references/output-patterns.md +71 -0
- package/skills/stitch-skill-creator/scripts/init_stitch_skill.py +229 -0
- package/skills/stitch-svelte-components/SKILL.md +282 -0
- package/skills/stitch-svelte-components/resources/architecture-checklist.md +62 -0
- package/skills/stitch-svelte-components/resources/component-template.svelte +193 -0
- package/skills/stitch-svelte-components/scripts/fetch-stitch.sh +36 -0
- package/skills/stitch-swiftui-components/SKILL.md +424 -0
- package/skills/stitch-swiftui-components/resources/architecture-checklist.md +83 -0
- package/skills/stitch-swiftui-components/resources/component-template.swift +131 -0
- package/skills/stitch-swiftui-components/resources/layout-mapping.md +155 -0
- package/skills/stitch-swiftui-components/scripts/fetch-stitch.sh +45 -0
- package/skills/stitch-ued-guide/SKILL.md +124 -0
- package/skills/stitch-ui-design-spec-generator/SKILL.md +115 -0
- package/skills/stitch-ui-design-spec-generator/examples/usage.md +79 -0
- package/skills/stitch-ui-design-variants/SKILL.md +127 -0
- package/skills/stitch-ui-prompt-architect/SKILL.md +196 -0
- package/skills/stitch-ui-prompt-architect/references/KEYWORDS.md +170 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Design Spec Generator — Usage Examples
|
|
2
|
+
|
|
3
|
+
## Example 1: Cyberpunk gaming login
|
|
4
|
+
|
|
5
|
+
**User request:** "A cyberpunk login page for a gaming platform."
|
|
6
|
+
|
|
7
|
+
**Output:**
|
|
8
|
+
```json
|
|
9
|
+
{
|
|
10
|
+
"theme": "DARK",
|
|
11
|
+
"primaryColor": "#00FF88",
|
|
12
|
+
"font": "Orbitron",
|
|
13
|
+
"roundness": "Low",
|
|
14
|
+
"density": "COMFORTABLE",
|
|
15
|
+
"designMode": "HIGH_FIDELITY",
|
|
16
|
+
"styleKeywords": ["Cyberpunk", "Neon", "Gaming", "High contrast"],
|
|
17
|
+
"deviceType": "DESKTOP"
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Example 2: Medical dashboard
|
|
24
|
+
|
|
25
|
+
**User request:** "A clean medical dashboard for doctors, desktop only."
|
|
26
|
+
|
|
27
|
+
**Output:**
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"theme": "LIGHT",
|
|
31
|
+
"primaryColor": "#2563EB",
|
|
32
|
+
"font": "Inter",
|
|
33
|
+
"roundness": "Low",
|
|
34
|
+
"density": "COMPACT",
|
|
35
|
+
"designMode": "HIGH_FIDELITY",
|
|
36
|
+
"styleKeywords": ["Medical", "Clean", "Professional", "Data-dense"],
|
|
37
|
+
"deviceType": "DESKTOP"
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Example 3: Food delivery app
|
|
44
|
+
|
|
45
|
+
**User request:** "Home screen for a food delivery app, warm and friendly."
|
|
46
|
+
|
|
47
|
+
**Output:**
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"theme": "LIGHT",
|
|
51
|
+
"primaryColor": "#E85D04",
|
|
52
|
+
"font": "Nunito",
|
|
53
|
+
"roundness": "High",
|
|
54
|
+
"density": "COMFORTABLE",
|
|
55
|
+
"designMode": "HIGH_FIDELITY",
|
|
56
|
+
"styleKeywords": ["Food", "Warm", "Friendly", "Cards"],
|
|
57
|
+
"deviceType": "MOBILE"
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Example 4: SaaS productivity app
|
|
64
|
+
|
|
65
|
+
**User request:** "Dashboard for a project management SaaS tool."
|
|
66
|
+
|
|
67
|
+
**Output:**
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"theme": "LIGHT",
|
|
71
|
+
"primaryColor": "#6366F1",
|
|
72
|
+
"font": "DM Sans",
|
|
73
|
+
"roundness": "Medium",
|
|
74
|
+
"density": "COMPACT",
|
|
75
|
+
"designMode": "HIGH_FIDELITY",
|
|
76
|
+
"styleKeywords": ["Productivity", "SaaS", "Structured", "Minimal"],
|
|
77
|
+
"deviceType": "DESKTOP"
|
|
78
|
+
}
|
|
79
|
+
```
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stitch-ui-design-variants
|
|
3
|
+
description: Generates 3 alternative Stitch prompts for A/B testing screen concepts — vary layout, visual style, or content while keeping the underlying information architecture consistent.
|
|
4
|
+
allowed-tools: []
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Stitch UI Design Variants
|
|
8
|
+
|
|
9
|
+
You are a Variant Generator. Given a base design spec or prompt, you produce 3 distinct alternative prompts for exploring different design directions before committing to one.
|
|
10
|
+
|
|
11
|
+
## When to use this skill
|
|
12
|
+
|
|
13
|
+
- User asks for "variations", "alternatives", "A/B options", "different styles", or "other versions"
|
|
14
|
+
- Before a major design decision where the right direction is unclear
|
|
15
|
+
- When the user wants to present multiple options to stakeholders
|
|
16
|
+
|
|
17
|
+
## Detection: Native API vs text-prompt fallback
|
|
18
|
+
|
|
19
|
+
Before generating variants, check which path is available:
|
|
20
|
+
|
|
21
|
+
**Native path** — if `generate_variants` MCP tool is available AND you have a screenId:
|
|
22
|
+
1. Use `stitch-mcp-generate-variants` (1 API call, more control)
|
|
23
|
+
2. Map user language to `creativeRange`:
|
|
24
|
+
- "subtle", "minor tweaks", "polish" → `REFINE`
|
|
25
|
+
- "alternatives", "different options", "explore" → `EXPLORE`
|
|
26
|
+
- "radical", "completely different", "reimagine" → `REIMAGINE`
|
|
27
|
+
3. Map focus to `aspects`:
|
|
28
|
+
- "layouts", "arrangement" → `[LAYOUT]`
|
|
29
|
+
- "colors", "palette" → `[COLOR_SCHEME]`
|
|
30
|
+
- "images", "photos" → `[IMAGES]`
|
|
31
|
+
- "fonts", "typography" → `[TEXT_FONT]`
|
|
32
|
+
- "copy", "text content" → `[TEXT_CONTENT]`
|
|
33
|
+
|
|
34
|
+
**Text-prompt fallback** — if no MCP tools OR no existing screen:
|
|
35
|
+
1. Fall back to the text-prompt approach below (generate 3 prompt variants)
|
|
36
|
+
2. Each variant still needs to be generated separately via `generate_screen_from_text`
|
|
37
|
+
|
|
38
|
+
The native path is preferred when available — it's 1 API call instead of 3, and produces more controlled variations.
|
|
39
|
+
|
|
40
|
+
## Input
|
|
41
|
+
|
|
42
|
+
- **Base spec** — a Design Spec JSON from `stitch-ui-design-spec-generator`, or an existing Stitch prompt
|
|
43
|
+
- **Variant type** — LAYOUT, STYLE, or CONTENT (infer from user request if not stated)
|
|
44
|
+
|
|
45
|
+
## Variant types
|
|
46
|
+
|
|
47
|
+
### LAYOUT variants
|
|
48
|
+
Keep visual style constant. Vary the structural arrangement.
|
|
49
|
+
|
|
50
|
+
| Variant | Layout change |
|
|
51
|
+
|---------|--------------|
|
|
52
|
+
| A — Standard | Conventional layout for the device type (e.g., top nav + content) |
|
|
53
|
+
| B — Alternative | Inverted or non-standard (e.g., sidebar primary nav, split-screen) |
|
|
54
|
+
| C — Minimal | Stripped-back, single-column, maximum focus |
|
|
55
|
+
|
|
56
|
+
### STYLE variants
|
|
57
|
+
Keep layout and content constant. Vary the visual aesthetic.
|
|
58
|
+
|
|
59
|
+
| Variant | Style change |
|
|
60
|
+
|---------|-------------|
|
|
61
|
+
| A — Original | Base design spec as-is |
|
|
62
|
+
| B — Inverted | Flip light ↔ dark theme |
|
|
63
|
+
| C — High contrast | Bold colors, stronger hierarchy, increased saturation |
|
|
64
|
+
|
|
65
|
+
### CONTENT variants
|
|
66
|
+
Keep design constant. Vary content presentation or density.
|
|
67
|
+
|
|
68
|
+
| Variant | Content change |
|
|
69
|
+
|---------|---------------|
|
|
70
|
+
| A — Verbose | Rich descriptions, full-length text, detailed content |
|
|
71
|
+
| B — Concise | Scannable, short labels, icon-heavy, minimal prose |
|
|
72
|
+
| C — Empty state | Zero-data state — what the screen looks like before the user adds content |
|
|
73
|
+
|
|
74
|
+
## Output format
|
|
75
|
+
|
|
76
|
+
Always produce exactly 3 labeled prompts. Use the `[Context] [Layout] [Components]` structure from `stitch-ui-prompt-architect`:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
## Variant A — [Label]
|
|
80
|
+
|
|
81
|
+
[Full Stitch generation prompt using Context/Layout/Components structure]
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Variant B — [Label]
|
|
86
|
+
|
|
87
|
+
[Full Stitch generation prompt]
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Variant C — [Label]
|
|
92
|
+
|
|
93
|
+
[Full Stitch generation prompt]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Example: Style variants for a SaaS dashboard
|
|
97
|
+
|
|
98
|
+
**Base spec:** Desktop dashboard, indigo primary, light mode, DM Sans
|
|
99
|
+
|
|
100
|
+
**Output:**
|
|
101
|
+
|
|
102
|
+
### Variant A — Light & Professional
|
|
103
|
+
```
|
|
104
|
+
Desktop High-Fidelity analytics dashboard. Professional SaaS aesthetic. Light mode. Background: White (#ffffff). Primary: Indigo (#6366F1). Font: DM Sans.
|
|
105
|
+
|
|
106
|
+
Left sidebar (200px), top bar with page title, KPI row, main chart area.
|
|
107
|
+
|
|
108
|
+
4 KPI metric cards (white, subtle shadow), line chart with indigo primary line, data table with zebra striping.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Variant B — Dark & Focused
|
|
112
|
+
```
|
|
113
|
+
Desktop High-Fidelity analytics dashboard. Developer-focused aesthetic. Dark mode. Background: Zinc-900 (#18181B). Primary: Indigo (#818CF8, lightened for dark). Font: DM Sans.
|
|
114
|
+
|
|
115
|
+
Same layout: left sidebar (200px), top bar, KPI row, main chart.
|
|
116
|
+
|
|
117
|
+
KPI cards with dark surface (#27272A) background, indigo numbers on dark. Line chart with glowing indigo line against dark grid. Table with dark rows, subtle hover state.
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Variant C — Minimal & Airy
|
|
121
|
+
```
|
|
122
|
+
Desktop High-Fidelity analytics dashboard. Minimal, spacious aesthetic. Light mode. Background: Gray-50 (#F9FAFB). Primary: Indigo (#6366F1). Font: DM Sans. Maximum whitespace.
|
|
123
|
+
|
|
124
|
+
Full-width single column, no sidebar. Top nav bar only. Stats in a horizontal strip. Chart spans full width. No card shadows — borders only.
|
|
125
|
+
|
|
126
|
+
Bare, text-forward KPI strip. Full-width area chart with very light fill. Simple flat list table, no alternating rows.
|
|
127
|
+
```
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stitch-ui-prompt-architect
|
|
3
|
+
description: Builds Stitch-ready prompts via two paths — Path A enhances vague ideas into polished prompts, Path B merges a Design Spec JSON + user request into a structured [Context] [Layout] [Components] prompt.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- "Read"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Stitch UI Prompt Architect
|
|
9
|
+
|
|
10
|
+
You are a Senior UX Designer and Prompt Engineer. You transform raw ideas and design specifications into high-quality Stitch generation prompts. Your prompts are specific, visual, and unambiguous — never generic.
|
|
11
|
+
|
|
12
|
+
## When to use this skill
|
|
13
|
+
|
|
14
|
+
- **From the orchestrator:** Called in Step 3 of the generation workflow with a Design Spec JSON
|
|
15
|
+
- **Directly:** When a user asks "turn this into a Stitch prompt" or "improve this prompt" or "how should I prompt Stitch for X?"
|
|
16
|
+
- **Path selection:** Determine the path automatically based on what's available (see below)
|
|
17
|
+
|
|
18
|
+
## Path A — Enhance vague idea
|
|
19
|
+
|
|
20
|
+
**When to use:** User provides a rough idea with no Design Spec.
|
|
21
|
+
|
|
22
|
+
> "Login page for a fintech app"
|
|
23
|
+
> "Something like Notion but darker"
|
|
24
|
+
|
|
25
|
+
**Process (4 steps):**
|
|
26
|
+
|
|
27
|
+
1. **Assess input** — identify: platform, page type, visual style, primary color, key components
|
|
28
|
+
2. **Check for DESIGN.md** — if the project has a `DESIGN.md` file, read it and extract Section 6 (Stitch prompt copy-paste block) as the design system foundation
|
|
29
|
+
3. **Apply enhancements** — add UI/UX precision vocabulary (see `references/KEYWORDS.md`), specify color roles, define layout structure
|
|
30
|
+
4. **Format the output:**
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
[One-line description of the screen]
|
|
34
|
+
|
|
35
|
+
**DESIGN SYSTEM:**
|
|
36
|
+
- Platform: Web / Mobile
|
|
37
|
+
- Theme: Light / Dark
|
|
38
|
+
- Background: [description] (#hex)
|
|
39
|
+
- Primary: [description] (#hex)
|
|
40
|
+
- Font: [name]
|
|
41
|
+
- Aesthetic: [2-3 adjectives]
|
|
42
|
+
|
|
43
|
+
**Page Structure:**
|
|
44
|
+
1. **[Section name]:** [Specific description with component names]
|
|
45
|
+
2. **[Section name]:** [...]
|
|
46
|
+
...
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Path A example (fintech login):**
|
|
50
|
+
```
|
|
51
|
+
Mobile High-Fidelity login screen for a fintech app.
|
|
52
|
+
|
|
53
|
+
**DESIGN SYSTEM:**
|
|
54
|
+
- Platform: Mobile
|
|
55
|
+
- Theme: Dark
|
|
56
|
+
- Background: Deep navy (#0A0F1E)
|
|
57
|
+
- Primary: Electric blue (#3B82F6)
|
|
58
|
+
- Font: Inter
|
|
59
|
+
- Aesthetic: Trustworthy, Modern, Secure
|
|
60
|
+
|
|
61
|
+
**Page Structure:**
|
|
62
|
+
1. **Header:** Large 'Welcome back' headline, subtitle 'Sign in to continue'
|
|
63
|
+
2. **Form:** Email input with envelope icon, Password input with eye toggle, 'Forgot password?' link in primary color
|
|
64
|
+
3. **Actions:** Full-width 'Sign In' primary button, 'Or continue with' divider, Google and Apple OAuth pill buttons
|
|
65
|
+
4. **Footer:** 'New here? Create account' link
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Path B — Design Spec + request → structured prompt
|
|
71
|
+
|
|
72
|
+
**When to use:** Called from the orchestrator with a Design Spec JSON from `stitch-ui-design-spec-generator`.
|
|
73
|
+
|
|
74
|
+
**Input:**
|
|
75
|
+
- `designSpec` — JSON from `stitch-ui-design-spec-generator`
|
|
76
|
+
- `userRequest` — the original user request or screen description
|
|
77
|
+
- `designMd` (optional) — Section 6 content from `DESIGN.md` if available
|
|
78
|
+
|
|
79
|
+
**Construction logic (build in this order):**
|
|
80
|
+
|
|
81
|
+
### 1. Context & Style block
|
|
82
|
+
```
|
|
83
|
+
[deviceType] [designMode] [screen type] for [product/domain].
|
|
84
|
+
[styleKeywords joined as adjectives] aesthetic.
|
|
85
|
+
[theme] mode.
|
|
86
|
+
Background: [derive from theme + domain].
|
|
87
|
+
Primary: [primaryColor] ([color name]).
|
|
88
|
+
Font: [font].
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 2. Layout Structure block
|
|
92
|
+
Derive from deviceType and screen type:
|
|
93
|
+
|
|
94
|
+
| Device + Screen type | → Layout pattern |
|
|
95
|
+
|---|---|
|
|
96
|
+
| MOBILE + list/feed | Vertical scroll, sticky header, bottom nav |
|
|
97
|
+
| MOBILE + form/auth | Centered stack, full-width inputs, sticky CTA |
|
|
98
|
+
| MOBILE + detail | Hero image top, info below, sticky action bar |
|
|
99
|
+
| DESKTOP + dashboard | Left sidebar nav, top bar, main content area |
|
|
100
|
+
| DESKTOP + landing | Full-width hero, sections, sticky top nav |
|
|
101
|
+
| DESKTOP + data table | Top filters, main grid/table, pagination footer |
|
|
102
|
+
| TABLET + any | Hybrid layout, 2-column grid, side panel optional |
|
|
103
|
+
|
|
104
|
+
### 3. Components block
|
|
105
|
+
Be specific. Replace generic descriptions with named UI patterns:
|
|
106
|
+
|
|
107
|
+
| ❌ Generic | ✅ Specific |
|
|
108
|
+
|---|---|
|
|
109
|
+
| "A form" | "Email input field with inline validation, password input with eye icon toggle" |
|
|
110
|
+
| "Some buttons" | "Primary 'Continue' CTA button (full-width on mobile), ghost 'Back' link" |
|
|
111
|
+
| "Navigation" | "Top navigation bar with logo left, links center (Features, Pricing, About), 'Sign up' button right" |
|
|
112
|
+
| "Cards" | "3-column grid of cards: thumbnail image, title, description, category tag, CTA link" |
|
|
113
|
+
|
|
114
|
+
### 4. Content block
|
|
115
|
+
Always use realistic content — **never Lorem Ipsum, never "Item 1/2/3"**:
|
|
116
|
+
- Names: real-sounding (Emma, Jack, Sarah)
|
|
117
|
+
- Prices: realistic ($24.99, $1,200/mo)
|
|
118
|
+
- Titles: descriptive ("Revenue Growth Q3", "Active Users — Last 30 days")
|
|
119
|
+
- Dates: realistic (Nov 2024, 3 days ago)
|
|
120
|
+
|
|
121
|
+
**Path B output format (strict — must use exactly this):**
|
|
122
|
+
```
|
|
123
|
+
[Context block]
|
|
124
|
+
|
|
125
|
+
[Layout block]
|
|
126
|
+
|
|
127
|
+
[Components block]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Path B example (dashboard from SaaS spec):**
|
|
131
|
+
|
|
132
|
+
Input spec:
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"theme": "LIGHT",
|
|
136
|
+
"primaryColor": "#6366F1",
|
|
137
|
+
"font": "DM Sans",
|
|
138
|
+
"roundness": "Medium",
|
|
139
|
+
"density": "COMPACT",
|
|
140
|
+
"designMode": "HIGH_FIDELITY",
|
|
141
|
+
"styleKeywords": ["Productivity", "SaaS", "Structured"],
|
|
142
|
+
"deviceType": "DESKTOP"
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Output prompt:
|
|
147
|
+
```
|
|
148
|
+
Desktop High-Fidelity analytics dashboard. Productivity SaaS aesthetic. Light mode. Background: White (#ffffff). Primary: Indigo (#6366F1). Font: DM Sans. Clean, structured, data-dense.
|
|
149
|
+
|
|
150
|
+
Left sidebar navigation (200px wide): Logo top-left, nav items with icons (Overview, Projects, Team, Billing, Settings), user avatar and name at the bottom. Main content: Top bar with 'Good morning, Sarah' and date. KPI row: 4 cards (Active Projects: 12, Tasks Completed: 847, Team Members: 24, On-time Delivery: 94%). Main chart: 'Velocity' line chart (last 30 days). Bottom split: 'Recent Activity' feed left, 'Upcoming Deadlines' list right.
|
|
151
|
+
|
|
152
|
+
KPI cards: indigo number, grey label, subtle upward trend arrow in green. Line chart: indigo primary line, grey grid, hover tooltip. Activity feed: avatar, action text, timestamp. Deadline items: color-coded priority dot, task name, due date, assignee avatar.
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Quality rules
|
|
158
|
+
|
|
159
|
+
- **No Lorem Ipsum** — ever
|
|
160
|
+
- **Name the components** — "floating action button", not "button at bottom"
|
|
161
|
+
- **Specify color roles** — "primary indigo (#6366F1) for CTAs", not "blue buttons"
|
|
162
|
+
- **Specify layout dimensions when critical** — "200px sidebar", "full-width hero (100vh)"
|
|
163
|
+
- **Include interaction states** — "hover state on cards", "active nav item highlighted"
|
|
164
|
+
- **Match content to device** — large touch targets on mobile, dense info on desktop
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Prompt Quality Standard (Checklist)
|
|
169
|
+
|
|
170
|
+
Before sending any prompt to `generate_screen_from_text`, verify every item passes. If anything fails — re-run prompt assembly. Don't ship vague prompts.
|
|
171
|
+
|
|
172
|
+
### Required blocks
|
|
173
|
+
|
|
174
|
+
- [ ] **Project overview** — one paragraph covering: what it is, who it's for, visual style, and 2-3 key attributes. Not a sentence — a paragraph.
|
|
175
|
+
- [ ] **Design system block** — must include all of these:
|
|
176
|
+
- Platform (Web / Mobile / Tablet)
|
|
177
|
+
- Theme (Light / Dark)
|
|
178
|
+
- Color scheme with `#hex` values (primary, secondary, background minimum)
|
|
179
|
+
- Typography with px sizes, font family, and weight (`Inter 16px/400 body, 24px/700 heading`)
|
|
180
|
+
- Component style: border radius, shadow depth, interaction style (filled, outlined, ghost)
|
|
181
|
+
- [ ] **Per-section detail** — each area of the screen needs:
|
|
182
|
+
- Core function in one line ("user authentication with social login")
|
|
183
|
+
- Area breakdown: nav, hero, function area, actions, footer — with concrete elements and specific copy
|
|
184
|
+
- [ ] **No vague placeholders** — every element must be concrete:
|
|
185
|
+
- ❌ "a button" → ✅ "primary CTA 'Sign In' `#6366F1` filled `rounded-lg`"
|
|
186
|
+
- ❌ "some navigation" → ✅ "top nav: logo left, [Features, Pricing, About] center, 'Get Started' button right"
|
|
187
|
+
- ❌ "a card section" → ✅ "3-column grid: 280px cards with 16px radius, thumbnail, title (18px/600), 2-line description, category tag"
|
|
188
|
+
- [ ] **Layout + Components sections populated** — both must have named, specific entries. Empty sections = failed check.
|
|
189
|
+
|
|
190
|
+
### Gate rule
|
|
191
|
+
|
|
192
|
+
If any item above fails, **re-invoke the prompt architect** before calling `generate_screen_from_text`. Each generation call costs time (60-180s) and creates a new screen — getting it right the first time saves real minutes.
|
|
193
|
+
|
|
194
|
+
## References
|
|
195
|
+
|
|
196
|
+
- `references/KEYWORDS.md` — Component terms, adjective palettes, color role vocabulary
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# UI/UX Keywords Reference
|
|
2
|
+
|
|
3
|
+
Progressive disclosure reference for common UI terminology and adjective palettes.
|
|
4
|
+
Use when enhancing vague prompts (Path A in SKILL.md).
|
|
5
|
+
|
|
6
|
+
## Component Keywords
|
|
7
|
+
|
|
8
|
+
### Navigation
|
|
9
|
+
- navigation bar, nav menu, header
|
|
10
|
+
- breadcrumbs, tabs, sidebar, drawer
|
|
11
|
+
- hamburger menu, mobile menu, overlay nav
|
|
12
|
+
- back button, close button, escape affordance
|
|
13
|
+
- sticky header, fixed footer, floating nav
|
|
14
|
+
|
|
15
|
+
### Content containers
|
|
16
|
+
- hero section, hero banner, above the fold
|
|
17
|
+
- card, card grid, tile, bento grid
|
|
18
|
+
- modal, dialog, drawer, sheet, bottom sheet
|
|
19
|
+
- accordion, collapsible section, disclosure
|
|
20
|
+
- carousel, slider, gallery, lightbox
|
|
21
|
+
- tooltip, popover, hover card
|
|
22
|
+
- divider, separator, spacer
|
|
23
|
+
|
|
24
|
+
### Forms
|
|
25
|
+
- input field, text input, text area
|
|
26
|
+
- dropdown, select menu, combobox
|
|
27
|
+
- checkbox, radio button, toggle switch
|
|
28
|
+
- date picker, time picker, range slider
|
|
29
|
+
- search bar, search input, autosuggest
|
|
30
|
+
- file upload, drag and drop zone
|
|
31
|
+
- form group, field label, helper text, error state
|
|
32
|
+
- submit button, form actions, inline form
|
|
33
|
+
|
|
34
|
+
### Calls to action
|
|
35
|
+
- primary button, secondary button, ghost button
|
|
36
|
+
- text link, anchor link, underline link
|
|
37
|
+
- floating action button (FAB), extended FAB
|
|
38
|
+
- icon button, icon-only button
|
|
39
|
+
- pill button, rounded CTA, full-width button
|
|
40
|
+
- sticky CTA, bottom action bar
|
|
41
|
+
|
|
42
|
+
### Feedback & status
|
|
43
|
+
- toast notification, snackbar, banner alert
|
|
44
|
+
- inline alert, inline error, inline success
|
|
45
|
+
- loading spinner, skeleton loader, shimmer
|
|
46
|
+
- progress bar, progress ring, step indicator
|
|
47
|
+
- empty state, zero state, placeholder
|
|
48
|
+
|
|
49
|
+
### Data display
|
|
50
|
+
- data table, sortable table, data grid
|
|
51
|
+
- chart: line, bar, pie, donut, area, scatter
|
|
52
|
+
- KPI card, metric card, stat widget
|
|
53
|
+
- badge, tag, chip, label, pill
|
|
54
|
+
- avatar, avatar group, user list
|
|
55
|
+
- list item, item row, feed item
|
|
56
|
+
- timeline, activity feed, changelog
|
|
57
|
+
|
|
58
|
+
### Layout primitives
|
|
59
|
+
- grid layout, 2-column, 3-column, masonry
|
|
60
|
+
- flexbox row, horizontal stack
|
|
61
|
+
- sidebar layout, split view, panel
|
|
62
|
+
- sticky header, fixed footer, page shell
|
|
63
|
+
- full-width, contained width, max-width container
|
|
64
|
+
- centered content, asymmetric layout
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Adjective Palettes
|
|
69
|
+
|
|
70
|
+
### Minimal / clean
|
|
71
|
+
- minimal, clean, uncluttered, focused
|
|
72
|
+
- generous whitespace, breathing room
|
|
73
|
+
- subtle, understated, refined
|
|
74
|
+
- simple, distraction-free, content-first
|
|
75
|
+
|
|
76
|
+
### Professional / corporate
|
|
77
|
+
- sophisticated, polished, trustworthy
|
|
78
|
+
- corporate, business-like, enterprise
|
|
79
|
+
- structured, organized, hierarchical
|
|
80
|
+
- data-dense, information-rich
|
|
81
|
+
|
|
82
|
+
### Playful / friendly
|
|
83
|
+
- vibrant, colorful, energetic
|
|
84
|
+
- rounded corners, soft edges, pillow-like
|
|
85
|
+
- bold, expressive, dynamic
|
|
86
|
+
- friendly, approachable, warm, inviting
|
|
87
|
+
|
|
88
|
+
### Premium / luxury
|
|
89
|
+
- elegant, luxurious, high-end, exclusive
|
|
90
|
+
- dramatic, bold contrast, editorial
|
|
91
|
+
- sleek, modern, refined, boutique
|
|
92
|
+
- restrained palette, generous space
|
|
93
|
+
|
|
94
|
+
### Dark mode
|
|
95
|
+
- dark theme, night mode, dark background
|
|
96
|
+
- high-contrast accents, neon highlights
|
|
97
|
+
- soft glows, subtle illumination
|
|
98
|
+
- deep backgrounds (#18181b), muted surfaces
|
|
99
|
+
|
|
100
|
+
### Organic / natural
|
|
101
|
+
- earthy tones, warm neutrals
|
|
102
|
+
- textured, tactile, handcrafted feel
|
|
103
|
+
- flowing, organic shapes, biomorphic
|
|
104
|
+
- warm, cozy, grounded
|
|
105
|
+
|
|
106
|
+
### Developer / technical
|
|
107
|
+
- monospace, terminal aesthetic, code-like
|
|
108
|
+
- dark canvas, syntax highlighted
|
|
109
|
+
- grid-heavy, information-dense
|
|
110
|
+
- utilitarian, functional, no decoration
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Color Role Terminology
|
|
115
|
+
|
|
116
|
+
### Backgrounds
|
|
117
|
+
- page background, canvas, base layer
|
|
118
|
+
- surface color, card background, elevated surface
|
|
119
|
+
- overlay, scrim, backdrop
|
|
120
|
+
|
|
121
|
+
### Text
|
|
122
|
+
- primary text, heading color, display text
|
|
123
|
+
- secondary text, body copy, paragraph text
|
|
124
|
+
- muted text, caption, placeholder, hint
|
|
125
|
+
- inverse text (on dark backgrounds)
|
|
126
|
+
|
|
127
|
+
### Accents
|
|
128
|
+
- primary accent, brand color, action color
|
|
129
|
+
- secondary accent, highlight, tint
|
|
130
|
+
- success green, error red, warning amber, info blue
|
|
131
|
+
- hover state, active state, pressed state, focus ring
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Shape → Natural Language
|
|
136
|
+
|
|
137
|
+
| Tailwind class | Natural language description |
|
|
138
|
+
|----------------|------------------------------|
|
|
139
|
+
| `rounded-none` | sharp, squared-off edges |
|
|
140
|
+
| `rounded-sm` | slightly softened corners |
|
|
141
|
+
| `rounded-md` | gently rounded corners |
|
|
142
|
+
| `rounded-lg` | generously rounded corners |
|
|
143
|
+
| `rounded-xl` | very rounded, pillow-like |
|
|
144
|
+
| `rounded-2xl` | heavily rounded, balloon-like |
|
|
145
|
+
| `rounded-full` | pill-shaped, circular |
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Stitch Generation Vocabulary
|
|
150
|
+
|
|
151
|
+
Phrases that produce better results in Stitch generation prompts:
|
|
152
|
+
|
|
153
|
+
**Layout precision:**
|
|
154
|
+
- "Left sidebar (240px) + right main area"
|
|
155
|
+
- "2-column grid with 24px gap"
|
|
156
|
+
- "Sticky top navigation bar (64px height)"
|
|
157
|
+
- "Full-width hero section (100vh, centered content)"
|
|
158
|
+
- "Bottom navigation bar with 5 icon tabs"
|
|
159
|
+
|
|
160
|
+
**Visual quality signals:**
|
|
161
|
+
- "High-fidelity, production-ready UI"
|
|
162
|
+
- "Pixel-perfect details and micro-interactions visible"
|
|
163
|
+
- "Rich shadows and depth indicating elevation"
|
|
164
|
+
- "Carefully typeset content with visual hierarchy"
|
|
165
|
+
|
|
166
|
+
**Color precision:**
|
|
167
|
+
- "Primary indigo (#6366F1) for all CTA buttons"
|
|
168
|
+
- "Stone-50 (#FAFAF9) canvas background"
|
|
169
|
+
- "Zinc-900 (#18181B) for headings"
|
|
170
|
+
- "Subtle slate-200 (#E2E8F0) borders"
|