@qazuor/claude-code-config 0.1.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/LICENSE +21 -0
- package/README.md +1248 -0
- package/dist/bin.cjs +11886 -0
- package/dist/bin.cjs.map +1 -0
- package/dist/bin.d.cts +1 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +11869 -0
- package/dist/bin.js.map +1 -0
- package/dist/index.cjs +3887 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1325 -0
- package/dist/index.d.ts +1325 -0
- package/dist/index.js +3835 -0
- package/dist/index.js.map +1 -0
- package/package.json +86 -0
- package/templates/.log/notifications.log +1775 -0
- package/templates/agents/README.md +164 -0
- package/templates/agents/_registry.json +443 -0
- package/templates/agents/design/content-writer.md +353 -0
- package/templates/agents/design/ux-ui-designer.md +382 -0
- package/templates/agents/engineering/astro-engineer.md +293 -0
- package/templates/agents/engineering/db-drizzle-engineer.md +360 -0
- package/templates/agents/engineering/express-engineer.md +316 -0
- package/templates/agents/engineering/fastify-engineer.md +399 -0
- package/templates/agents/engineering/hono-engineer.md +263 -0
- package/templates/agents/engineering/mongoose-engineer.md +473 -0
- package/templates/agents/engineering/nestjs-engineer.md +429 -0
- package/templates/agents/engineering/nextjs-engineer.md +451 -0
- package/templates/agents/engineering/node-typescript-engineer.md +347 -0
- package/templates/agents/engineering/prisma-engineer.md +432 -0
- package/templates/agents/engineering/react-senior-dev.md +394 -0
- package/templates/agents/engineering/tanstack-start-engineer.md +447 -0
- package/templates/agents/engineering/tech-lead.md +269 -0
- package/templates/agents/product/product-functional.md +329 -0
- package/templates/agents/product/product-technical.md +578 -0
- package/templates/agents/quality/debugger.md +514 -0
- package/templates/agents/quality/qa-engineer.md +390 -0
- package/templates/agents/specialized/enrichment-agent.md +277 -0
- package/templates/agents/specialized/i18n-specialist.md +322 -0
- package/templates/agents/specialized/seo-ai-specialist.md +387 -0
- package/templates/agents/specialized/tech-writer.md +300 -0
- package/templates/code-style/.editorconfig +27 -0
- package/templates/code-style/.prettierignore +25 -0
- package/templates/code-style/.prettierrc +12 -0
- package/templates/code-style/biome.json +78 -0
- package/templates/code-style/commitlint.config.js +44 -0
- package/templates/commands/README.md +175 -0
- package/templates/commands/_registry.json +420 -0
- package/templates/commands/add-new-entity.md +211 -0
- package/templates/commands/audit/accessibility-audit.md +360 -0
- package/templates/commands/audit/performance-audit.md +290 -0
- package/templates/commands/audit/security-audit.md +231 -0
- package/templates/commands/code-check.md +127 -0
- package/templates/commands/five-why.md +225 -0
- package/templates/commands/formatting/format-markdown.md +197 -0
- package/templates/commands/git/commit.md +247 -0
- package/templates/commands/meta/create-agent.md +257 -0
- package/templates/commands/meta/create-command.md +312 -0
- package/templates/commands/meta/create-skill.md +321 -0
- package/templates/commands/meta/help.md +318 -0
- package/templates/commands/planning/check-completed-tasks.md +224 -0
- package/templates/commands/planning/cleanup-issues.md +248 -0
- package/templates/commands/planning/planning-cleanup.md +251 -0
- package/templates/commands/planning/sync-planning-github.md +133 -0
- package/templates/commands/planning/sync-todos-github.md +203 -0
- package/templates/commands/quality-check.md +211 -0
- package/templates/commands/run-tests.md +159 -0
- package/templates/commands/start-feature-plan.md +232 -0
- package/templates/commands/start-refactor-plan.md +244 -0
- package/templates/commands/sync-planning.md +176 -0
- package/templates/commands/update-docs.md +242 -0
- package/templates/docs/CHECKPOINT-SYSTEM.md +504 -0
- package/templates/docs/INDEX.md +677 -0
- package/templates/docs/RECOMMENDED-HOOKS.md +415 -0
- package/templates/docs/_registry.json +329 -0
- package/templates/docs/diagrams/README.md +220 -0
- package/templates/docs/diagrams/agent-hierarchy.mmd +55 -0
- package/templates/docs/diagrams/documentation-map.mmd +61 -0
- package/templates/docs/diagrams/tools-relationship.mmd +55 -0
- package/templates/docs/diagrams/workflow-decision-tree.mmd +38 -0
- package/templates/docs/doc-sync.md +533 -0
- package/templates/docs/examples/end-to-end-workflow.md +1505 -0
- package/templates/docs/glossary.md +495 -0
- package/templates/docs/guides/mockup-prompt-engineering.md +644 -0
- package/templates/docs/guides/mockup-setup.md +737 -0
- package/templates/docs/learnings/README.md +250 -0
- package/templates/docs/learnings/common-architectural-patterns.md +123 -0
- package/templates/docs/learnings/common-mistakes-to-avoid.md +149 -0
- package/templates/docs/learnings/markdown-formatting-standards.md +104 -0
- package/templates/docs/learnings/monorepo-command-execution.md +64 -0
- package/templates/docs/learnings/optimization-tips.md +146 -0
- package/templates/docs/learnings/planning-linear-sync-workflow.md +70 -0
- package/templates/docs/learnings/shell-compatibility-fish.md +46 -0
- package/templates/docs/learnings/test-organization-structure.md +68 -0
- package/templates/docs/mcp-installation.md +613 -0
- package/templates/docs/mcp-servers.md +989 -0
- package/templates/docs/notification-installation.md +570 -0
- package/templates/docs/quick-start.md +354 -0
- package/templates/docs/standards/architecture-patterns.md +1064 -0
- package/templates/docs/standards/atomic-commits.md +513 -0
- package/templates/docs/standards/code-standards.md +993 -0
- package/templates/docs/standards/design-standards.md +656 -0
- package/templates/docs/standards/documentation-standards.md +1160 -0
- package/templates/docs/standards/testing-standards.md +969 -0
- package/templates/docs/system-maintenance.md +604 -0
- package/templates/docs/templates/PDR-template.md +561 -0
- package/templates/docs/templates/TODOs-template.md +534 -0
- package/templates/docs/templates/tech-analysis-template.md +800 -0
- package/templates/docs/workflows/README.md +519 -0
- package/templates/docs/workflows/atomic-task-protocol.md +955 -0
- package/templates/docs/workflows/decision-tree.md +482 -0
- package/templates/docs/workflows/edge-cases.md +856 -0
- package/templates/docs/workflows/phase-1-planning.md +957 -0
- package/templates/docs/workflows/phase-2-implementation.md +896 -0
- package/templates/docs/workflows/phase-3-validation.md +792 -0
- package/templates/docs/workflows/phase-4-finalization.md +927 -0
- package/templates/docs/workflows/quick-fix-protocol.md +505 -0
- package/templates/docs/workflows/task-atomization.md +537 -0
- package/templates/docs/workflows/task-completion-protocol.md +448 -0
- package/templates/hooks/on-notification.sh +28 -0
- package/templates/schemas/checkpoint.schema.json +97 -0
- package/templates/schemas/code-registry.schema.json +84 -0
- package/templates/schemas/pdr.schema.json +314 -0
- package/templates/schemas/problems.schema.json +55 -0
- package/templates/schemas/tech-analysis.schema.json +404 -0
- package/templates/schemas/telemetry.schema.json +298 -0
- package/templates/schemas/todos.schema.json +234 -0
- package/templates/schemas/workflows.schema.json +69 -0
- package/templates/scripts/add-changelogs.sh +105 -0
- package/templates/scripts/generate-code-registry.ts +270 -0
- package/templates/scripts/health-check.sh +343 -0
- package/templates/scripts/sync-registry.sh +40 -0
- package/templates/scripts/telemetry-report.ts +36 -0
- package/templates/scripts/validate-docs.sh +224 -0
- package/templates/scripts/validate-registry.sh +225 -0
- package/templates/scripts/validate-schemas.ts +283 -0
- package/templates/scripts/validate-structure.sh +165 -0
- package/templates/scripts/worktree-cleanup.sh +81 -0
- package/templates/scripts/worktree-create.sh +63 -0
- package/templates/sessions/planning/.gitkeep +0 -0
- package/templates/sessions/planning/archived/.gitkeep +0 -0
- package/templates/settings.json +202 -0
- package/templates/settings.local.json +138 -0
- package/templates/skills/README.md +197 -0
- package/templates/skills/_registry.json +473 -0
- package/templates/skills/audit/accessibility-audit.md +309 -0
- package/templates/skills/audit/performance-audit.md +257 -0
- package/templates/skills/audit/security-audit.md +217 -0
- package/templates/skills/auth/nextauth-patterns.md +308 -0
- package/templates/skills/brand-guidelines.md +240 -0
- package/templates/skills/documentation/markdown-formatter.md +302 -0
- package/templates/skills/git/git-commit-helper.md +321 -0
- package/templates/skills/i18n/i18n-patterns.md +251 -0
- package/templates/skills/patterns/error-handling-patterns.md +242 -0
- package/templates/skills/patterns/tdd-methodology.md +342 -0
- package/templates/skills/qa/qa-criteria-validator.md +383 -0
- package/templates/skills/qa/web-app-testing.md +398 -0
- package/templates/skills/react/react-hook-form-patterns.md +359 -0
- package/templates/skills/state/redux-toolkit-patterns.md +272 -0
- package/templates/skills/state/tanstack-query-patterns.md +299 -0
- package/templates/skills/state/zustand-patterns.md +301 -0
- package/templates/skills/tech/mermaid-diagram-specialist.md +195 -0
- package/templates/skills/tech/shadcn-specialist.md +252 -0
- package/templates/skills/tech/vercel-specialist.md +297 -0
- package/templates/skills/testing/api-app-testing.md +254 -0
- package/templates/skills/testing/performance-testing.md +275 -0
- package/templates/skills/testing/security-testing.md +348 -0
- package/templates/skills/utils/add-memory.md +295 -0
- package/templates/skills/utils/json-data-auditor.md +283 -0
- package/templates/skills/utils/pdf-creator-editor.md +342 -0
- package/templates/tools/format-markdown.sh +185 -0
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
# Mockup Prompt Engineering Guide
|
|
2
|
+
|
|
3
|
+
> **Complete guide to crafting effective prompts for AI-powered mockup generation in the project**
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This guide provides best practices, examples, and tips for creating high-quality mockups using the AI image generation system (`@repo/ai-image-generation`). Effective prompt engineering is crucial for generating mockups that accurately represent your design vision.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Table of Contents
|
|
12
|
+
|
|
13
|
+
1. [Prompt Anatomy](#prompt-anatomy)
|
|
14
|
+
2. [Best Practices](#best-practices)
|
|
15
|
+
3. [Device-Specific Presets](#device-specific-presets)
|
|
16
|
+
4. [Good vs Bad Examples](#good-vs-bad-examples)
|
|
17
|
+
5. [Quality Tips](#quality-tips)
|
|
18
|
+
6. [Common Patterns](#common-patterns)
|
|
19
|
+
7. [Troubleshooting](#troubleshooting)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Prompt Anatomy
|
|
24
|
+
|
|
25
|
+
A well-structured prompt has 5 key components:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
[Device Type] + [Page/Feature Name] + [Key Elements] + [Visual Style] + [Layout Details]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Component Breakdown
|
|
32
|
+
|
|
33
|
+
1. **Device Type** (Optional but recommended)
|
|
34
|
+
- Desktop/laptop view
|
|
35
|
+
- Mobile/phone view
|
|
36
|
+
- Tablet view
|
|
37
|
+
- Specific: iPhone, iPad, MacBook
|
|
38
|
+
|
|
39
|
+
2. **Page/Feature Name** (Required)
|
|
40
|
+
- Landing page
|
|
41
|
+
- Search results page
|
|
42
|
+
- Booking confirmation screen
|
|
43
|
+
- User dashboard
|
|
44
|
+
- Product details page
|
|
45
|
+
|
|
46
|
+
3. **Key Elements** (Required)
|
|
47
|
+
- Header, navigation, sidebar
|
|
48
|
+
- Search bar, filters, buttons
|
|
49
|
+
- Cards, forms, tables
|
|
50
|
+
- Images, icons, badges
|
|
51
|
+
|
|
52
|
+
4. **Visual Style** (Recommended)
|
|
53
|
+
- Modern, clean, minimalist
|
|
54
|
+
- Professional, corporate
|
|
55
|
+
- Colorful, playful, vibrant
|
|
56
|
+
- Dark mode, light mode
|
|
57
|
+
|
|
58
|
+
5. **Layout Details** (Optional)
|
|
59
|
+
- Grid-based, card layout
|
|
60
|
+
- Two-column, three-column
|
|
61
|
+
- Sidebar on left/right
|
|
62
|
+
- Plenty of white space
|
|
63
|
+
- Compact, dense information
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Best Practices
|
|
68
|
+
|
|
69
|
+
### ✅ DO
|
|
70
|
+
|
|
71
|
+
1. **Be Specific About Layout**
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
"Header with logo on left and navigation on right, main content area with sidebar on left showing filters, right side with grid of property cards (3 columns)"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
2. **Mention Key UI Elements**
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
"Include: search bar with location input, date picker, guest selector dropdown, price range slider, filter checkboxes for amenities"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
3. **Specify Visual Style**
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
"Clean modern design, plenty of white space, professional appearance, minimal color palette"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
4. **Include Device Type**
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
"Desktop view" or "Mobile-optimized layout" or "Tablet horizontal orientation"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
5. **Add Context About Density**
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
"Sparse layout with focus on imagery" or "Information-dense dashboard with multiple widgets"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### ❌ DON'T
|
|
102
|
+
|
|
103
|
+
1. **Don't Be Too Vague**
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
❌ "booking page"
|
|
107
|
+
✅ "Booking confirmation page with success checkmark, booking details card, and action buttons"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
2. **Don't Overspecify Colors/Fonts**
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
❌ "Use #3B82F6 blue for buttons and Roboto 16px font"
|
|
114
|
+
✅ "Modern blue accent colors, readable typography"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
3. **Don't Request Specific Brands/Copyrighted Content**
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
❌ "Airbnb-style interface with their logo"
|
|
121
|
+
✅ "Entity booking interface similar to popular platforms"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
4. **Don't Include Technical Jargon**
|
|
125
|
+
|
|
126
|
+
```text
|
|
127
|
+
❌ "React component with useState hooks and Tailwind CSS classes"
|
|
128
|
+
✅ "Interactive search interface with real-time filtering"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
5. **Don't Use Multiple Conflicting Styles**
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
❌ "Minimalist but also colorful and playful yet professional corporate"
|
|
135
|
+
✅ "Professional design with colorful accents"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Device-Specific Presets
|
|
141
|
+
|
|
142
|
+
The `craftPrompt` utility provides device-specific enhancements:
|
|
143
|
+
|
|
144
|
+
### Desktop Preset
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
const prompt = craftPrompt({
|
|
148
|
+
description: 'Entity search results page',
|
|
149
|
+
device: 'desktop'
|
|
150
|
+
});
|
|
151
|
+
// Adds: "Desktop/laptop view, wide layout, ..."
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Characteristics:**
|
|
155
|
+
|
|
156
|
+
- Wide layouts (1200px+ width)
|
|
157
|
+
- Multi-column grids
|
|
158
|
+
- Sidebars for filters/navigation
|
|
159
|
+
- Hover states implied
|
|
160
|
+
- Mouse/cursor interactions
|
|
161
|
+
|
|
162
|
+
**Best For:**
|
|
163
|
+
|
|
164
|
+
- Complex dashboards
|
|
165
|
+
- Data-heavy interfaces
|
|
166
|
+
- Multi-panel layouts
|
|
167
|
+
- Detailed forms
|
|
168
|
+
|
|
169
|
+
### Mobile Preset
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
const prompt = craftPrompt({
|
|
173
|
+
description: 'Booking confirmation screen',
|
|
174
|
+
device: 'mobile'
|
|
175
|
+
});
|
|
176
|
+
// Adds: "Mobile/phone view, vertical layout, ..."
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Characteristics:**
|
|
180
|
+
|
|
181
|
+
- Single column layouts
|
|
182
|
+
- Bottom sheets/modal filters
|
|
183
|
+
- Floating action buttons
|
|
184
|
+
- Touch-friendly targets (44x44px+)
|
|
185
|
+
- Swipe gestures implied
|
|
186
|
+
|
|
187
|
+
**Best For:**
|
|
188
|
+
|
|
189
|
+
- On-the-go tasks
|
|
190
|
+
- Quick actions
|
|
191
|
+
- Card-based content
|
|
192
|
+
- Simple forms
|
|
193
|
+
|
|
194
|
+
### Tablet Preset
|
|
195
|
+
|
|
196
|
+
```ts
|
|
197
|
+
const prompt = craftPrompt({
|
|
198
|
+
description: 'Property details with image gallery',
|
|
199
|
+
device: 'tablet'
|
|
200
|
+
});
|
|
201
|
+
// Adds: "Tablet view, medium width layout, ..."
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Characteristics:**
|
|
205
|
+
|
|
206
|
+
- 2-column layouts
|
|
207
|
+
- Adaptive sidebars
|
|
208
|
+
- Hybrid touch/cursor interactions
|
|
209
|
+
- Medium content density
|
|
210
|
+
|
|
211
|
+
**Best For:**
|
|
212
|
+
|
|
213
|
+
- Browsing experiences
|
|
214
|
+
- Content consumption
|
|
215
|
+
- Mixed interaction modes
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Good vs Bad Examples
|
|
220
|
+
|
|
221
|
+
### Example 1: Search Results Page
|
|
222
|
+
|
|
223
|
+
#### ❌ Bad Prompt
|
|
224
|
+
|
|
225
|
+
```text
|
|
226
|
+
"search results"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Problems:**
|
|
230
|
+
|
|
231
|
+
- Too vague
|
|
232
|
+
- No device specified
|
|
233
|
+
- No layout details
|
|
234
|
+
- No visual style
|
|
235
|
+
|
|
236
|
+
#### ✅ Good Prompt
|
|
237
|
+
|
|
238
|
+
```text
|
|
239
|
+
"Desktop entity search results page with left sidebar filters (price, amenities, ratings), main area showing grid of property cards (3 columns) with images, titles, ratings, and prices. Top header with search bar and map toggle button. Clean modern design with white background."
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**Why It Works:**
|
|
243
|
+
|
|
244
|
+
- Specific device (Desktop)
|
|
245
|
+
- Clear layout structure (sidebar + grid)
|
|
246
|
+
- Key elements mentioned (filters, cards, header)
|
|
247
|
+
- Visual style defined (clean modern, white)
|
|
248
|
+
- Component details (3 columns, specific filters)
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
### Example 2: Mobile Booking Flow
|
|
253
|
+
|
|
254
|
+
#### ❌ Bad Prompt
|
|
255
|
+
|
|
256
|
+
```text
|
|
257
|
+
"booking screen mobile"
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**Problems:**
|
|
261
|
+
|
|
262
|
+
- Minimal detail
|
|
263
|
+
- No specific step in flow
|
|
264
|
+
- No elements described
|
|
265
|
+
|
|
266
|
+
#### ✅ Good Prompt
|
|
267
|
+
|
|
268
|
+
```text
|
|
269
|
+
"Mobile booking confirmation screen with large green checkmark icon at top, booking details card showing check-in/check-out dates, guest count, total price. Two action buttons below: 'View Booking' (primary blue) and 'Back to Home' (secondary). Bottom navigation bar with 5 icons. Clean design, plenty of white space, success state visual."
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Why It Works:**
|
|
273
|
+
|
|
274
|
+
- Device specified (Mobile)
|
|
275
|
+
- Specific flow step (confirmation)
|
|
276
|
+
- All elements listed (checkmark, card, buttons, nav)
|
|
277
|
+
- Visual hierarchy (large checkmark, button colors)
|
|
278
|
+
- Emotional context (success state)
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
### Example 3: Dashboard Interface
|
|
283
|
+
|
|
284
|
+
#### ❌ Bad Prompt
|
|
285
|
+
|
|
286
|
+
```text
|
|
287
|
+
"admin dashboard with stats and charts"
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**Problems:**
|
|
291
|
+
|
|
292
|
+
- Generic description
|
|
293
|
+
- No layout specifics
|
|
294
|
+
- Missing key widget details
|
|
295
|
+
|
|
296
|
+
#### ✅ Good Prompt
|
|
297
|
+
|
|
298
|
+
```text
|
|
299
|
+
"Desktop admin dashboard with top navigation bar, sidebar menu on left. Main area contains 4 stat cards in a row (total bookings, revenue, occupancy rate, reviews) followed by two charts side by side: line graph for monthly revenue trend and bar chart for top properties. Below that, a table showing recent bookings with columns for guest name, property, dates, status. Professional dark blue theme, clean typography."
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**Why It Works:**
|
|
303
|
+
|
|
304
|
+
- Clear device (Desktop)
|
|
305
|
+
- Specific layout (sidebar + main area)
|
|
306
|
+
- Detailed widget descriptions (4 stat cards, 2 charts, table)
|
|
307
|
+
- Chart types specified (line graph, bar chart)
|
|
308
|
+
- Visual theme (professional dark blue)
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## Quality Tips
|
|
313
|
+
|
|
314
|
+
### 1. Layout & Structure
|
|
315
|
+
|
|
316
|
+
✅ **Describe the hierarchy:**
|
|
317
|
+
|
|
318
|
+
```text
|
|
319
|
+
"Header at top → Hero section with large image → Search panel overlayed on hero → Feature cards in 3-column grid → Footer"
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
✅ **Use directional terms:**
|
|
323
|
+
|
|
324
|
+
- "Left sidebar", "Right panel"
|
|
325
|
+
- "Top navigation", "Bottom sheet"
|
|
326
|
+
- "Centered modal", "Fixed header"
|
|
327
|
+
|
|
328
|
+
✅ **Specify dimensions relationally:**
|
|
329
|
+
|
|
330
|
+
- "Large hero image taking 60% of viewport height"
|
|
331
|
+
- "Compact header with minimal padding"
|
|
332
|
+
- "Wide main content area (70%) with narrow sidebar (30%)"
|
|
333
|
+
|
|
334
|
+
### 2. Elements & Components
|
|
335
|
+
|
|
336
|
+
✅ **Name standard UI components:**
|
|
337
|
+
|
|
338
|
+
- Search bar, dropdown, checkbox, radio button
|
|
339
|
+
- Card, modal, toast, badge, chip
|
|
340
|
+
- Tab navigation, breadcrumb, pagination
|
|
341
|
+
- Date picker, time picker, slider
|
|
342
|
+
|
|
343
|
+
✅ **Describe states when relevant:**
|
|
344
|
+
|
|
345
|
+
- "Selected tab highlighted"
|
|
346
|
+
- "Disabled button grayed out"
|
|
347
|
+
- "Active filter with blue background"
|
|
348
|
+
- "Loading skeleton for cards"
|
|
349
|
+
|
|
350
|
+
### 3. Visual Style
|
|
351
|
+
|
|
352
|
+
✅ **Use design adjectives:**
|
|
353
|
+
|
|
354
|
+
- Clean, minimal, spacious
|
|
355
|
+
- Modern, contemporary, fresh
|
|
356
|
+
- Professional, corporate, polished
|
|
357
|
+
- Friendly, approachable, warm
|
|
358
|
+
- Bold, vibrant, energetic
|
|
359
|
+
|
|
360
|
+
✅ **Mention color schemes (general):**
|
|
361
|
+
|
|
362
|
+
- "Light theme with blue accents"
|
|
363
|
+
- "Dark mode interface"
|
|
364
|
+
- "Neutral color palette with green call-to-action"
|
|
365
|
+
- "Warm tones for hospitality feel"
|
|
366
|
+
|
|
367
|
+
⚠️ **Avoid exact hex colors** - AI interprets color names better than codes
|
|
368
|
+
|
|
369
|
+
### 4. Content Density
|
|
370
|
+
|
|
371
|
+
✅ **Specify information density:**
|
|
372
|
+
|
|
373
|
+
- "Sparse layout focused on imagery" → More white space, fewer elements
|
|
374
|
+
- "Dense information dashboard" → Compact, many widgets
|
|
375
|
+
- "Balanced content-to-white-space ratio" → Medium density
|
|
376
|
+
|
|
377
|
+
### 5. Responsiveness
|
|
378
|
+
|
|
379
|
+
✅ **Mobile-specific mentions:**
|
|
380
|
+
|
|
381
|
+
- "Touch-friendly button sizes"
|
|
382
|
+
- "Swipeable card carousel"
|
|
383
|
+
- "Bottom navigation bar"
|
|
384
|
+
- "Hamburger menu in top-left"
|
|
385
|
+
|
|
386
|
+
✅ **Desktop-specific mentions:**
|
|
387
|
+
|
|
388
|
+
- "Hover effects on cards"
|
|
389
|
+
- "Sidebar always visible"
|
|
390
|
+
- "Multi-column layout"
|
|
391
|
+
- "Breadcrumb navigation"
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## Common Patterns
|
|
396
|
+
|
|
397
|
+
### Pattern 1: Hero Section with Search
|
|
398
|
+
|
|
399
|
+
```text
|
|
400
|
+
"[Device] landing page with full-width hero image, centered overlay containing large heading and search form (location input, date range picker, search button). Below hero, 3-column grid of featured properties. Modern design, white overlay on hero image for contrast."
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**Use For:** Landing pages, search-focused pages
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
### Pattern 2: List/Grid with Filters
|
|
408
|
+
|
|
409
|
+
```text
|
|
410
|
+
"[Device] results page with left sidebar containing filters (checkboxes for amenities, price slider, star rating), main area showing grid of result cards (3 columns on desktop, 1 on mobile) with image, title, rating, price. Top bar with sort dropdown and view toggle (grid/list). Clean layout with card shadows."
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
**Use For:** Search results, catalog browsing, property listings
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
### Pattern 3: Detail Page
|
|
418
|
+
|
|
419
|
+
```text
|
|
420
|
+
"[Device] property details page with image gallery carousel at top, main content section with property name, rating, description, amenities list, and location map. Right sidebar with booking form (dates, guests, price summary, 'Book Now' button). Responsive layout: sidebar moves below content on mobile."
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
**Use For:** Product/property details, profile pages, article pages
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
### Pattern 4: Multi-Step Form
|
|
428
|
+
|
|
429
|
+
```text
|
|
430
|
+
"[Device] booking form step 2 of 3, showing progress indicator at top, main form area with labeled fields (guest details, special requests), navigation buttons at bottom ('Back' and 'Continue'), sidebar showing booking summary (dates, property, price). Clean form design with clear labels and validation hints."
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
**Use For:** Checkout flows, onboarding, wizards
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
### Pattern 5: Dashboard/Overview
|
|
438
|
+
|
|
439
|
+
```text
|
|
440
|
+
"[Device] dashboard with metric cards at top row (4 cards: total views, bookings, revenue, rating), middle section with chart showing trend over time, bottom section with data table (recent activities). Sidebar navigation on left. Professional interface, organized layout, clear data visualization."
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
**Use For:** Admin dashboards, analytics, reporting
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## Troubleshooting
|
|
448
|
+
|
|
449
|
+
### Issue 1: Mockup Too Generic
|
|
450
|
+
|
|
451
|
+
**Problem:** Output looks generic, doesn't match brand/style
|
|
452
|
+
|
|
453
|
+
**Solutions:**
|
|
454
|
+
|
|
455
|
+
- Add more specific visual style descriptors
|
|
456
|
+
- Mention color scheme (e.g., "blue and white color scheme")
|
|
457
|
+
- Specify design language (e.g., "Material Design style" or "iOS native feel")
|
|
458
|
+
- Include brand personality (e.g., "warm and welcoming")
|
|
459
|
+
|
|
460
|
+
**Example Fix:**
|
|
461
|
+
|
|
462
|
+
```diff
|
|
463
|
+
- "Hotel search page with filters"
|
|
464
|
+
+ "Hotel search page with filters. Warm, welcoming design with terracotta accent colors, rounded corners on cards, soft shadows. Professional yet approachable feel suitable for tourism platform."
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
### Issue 2: Wrong Layout
|
|
470
|
+
|
|
471
|
+
**Problem:** Elements in wrong positions or missing
|
|
472
|
+
|
|
473
|
+
**Solutions:**
|
|
474
|
+
|
|
475
|
+
- Be more explicit about positions (left, right, top, bottom)
|
|
476
|
+
- Number elements in order (first, second, then)
|
|
477
|
+
- Use layout terminology (grid, flexbox-style, columns)
|
|
478
|
+
- Describe relative sizes
|
|
479
|
+
|
|
480
|
+
**Example Fix:**
|
|
481
|
+
|
|
482
|
+
```diff
|
|
483
|
+
- "Search page with sidebar and results"
|
|
484
|
+
+ "Search page with LEFT sidebar (30% width) containing stacked filter groups, RIGHT main area (70% width) showing 3-column grid of property cards. Header spans full width at top with search bar centered."
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
---
|
|
488
|
+
|
|
489
|
+
### Issue 3: Too Much/Little Detail
|
|
490
|
+
|
|
491
|
+
**Problem:** Mockup is too cluttered or too empty
|
|
492
|
+
|
|
493
|
+
**Solutions:**
|
|
494
|
+
|
|
495
|
+
- Specify content density explicitly
|
|
496
|
+
- Mention white space if needed
|
|
497
|
+
- Balance specificity: focus on structure > minor details
|
|
498
|
+
- Use "minimal", "detailed", "comprehensive" qualifiers
|
|
499
|
+
|
|
500
|
+
**Example Fix (Too Cluttered):**
|
|
501
|
+
|
|
502
|
+
```diff
|
|
503
|
+
- "Dashboard with all stats, charts, tables, cards, widgets, graphs"
|
|
504
|
+
+ "Dashboard with 4 key metric cards at top, single line chart showing main trend, and table of 5 most recent items. Clean layout with generous spacing between sections."
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
**Example Fix (Too Empty):**
|
|
508
|
+
|
|
509
|
+
```diff
|
|
510
|
+
- "Clean minimal booking page"
|
|
511
|
+
+ "Booking page with centered form containing date pickers, guest dropdown, and price summary. Minimal distraction but all necessary booking information visible."
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
### Issue 4: Unclear Device/Responsiveness
|
|
517
|
+
|
|
518
|
+
**Problem:** Mockup doesn't look right for target device
|
|
519
|
+
|
|
520
|
+
**Solutions:**
|
|
521
|
+
|
|
522
|
+
- Always specify device type in prompt
|
|
523
|
+
- Use device-specific patterns (e.g., "bottom sheet" for mobile)
|
|
524
|
+
- Mention touch vs. cursor interactions if relevant
|
|
525
|
+
- Describe how layout adapts if showing multiple devices
|
|
526
|
+
|
|
527
|
+
**Example Fix:**
|
|
528
|
+
|
|
529
|
+
```diff
|
|
530
|
+
- "Booking confirmation screen"
|
|
531
|
+
+ "MOBILE booking confirmation screen with vertical layout, large touch-friendly buttons (minimum 44px height), bottom navigation bar, and swipe-friendly card design."
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
### Issue 5: Style Mismatch
|
|
537
|
+
|
|
538
|
+
**Problem:** Mockup style doesn't fit project aesthetic
|
|
539
|
+
|
|
540
|
+
**Solutions:**
|
|
541
|
+
|
|
542
|
+
- Study existing mockups for style patterns
|
|
543
|
+
- Reference similar successful prompts
|
|
544
|
+
- Use consistent terminology across prompts
|
|
545
|
+
- Mention the the project brand (modern, professional, welcoming)
|
|
546
|
+
|
|
547
|
+
**Example Fix:**
|
|
548
|
+
|
|
549
|
+
```diff
|
|
550
|
+
- "Property search interface"
|
|
551
|
+
+ "Property search interface in the project brand style: modern, professional yet welcoming design. Clean typography, blue accent colors (#3B82F6), generous white space, soft shadows on cards, rounded corners (8px border radius)."
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
## Advanced Techniques
|
|
557
|
+
|
|
558
|
+
### 1. Layering Prompts
|
|
559
|
+
|
|
560
|
+
For complex UIs, build prompts in layers:
|
|
561
|
+
|
|
562
|
+
**Base Layer (Structure):**
|
|
563
|
+
|
|
564
|
+
```text
|
|
565
|
+
"Desktop entity listing page with header, left filter sidebar, main content grid"
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
**Element Layer (Components):**
|
|
569
|
+
|
|
570
|
+
```text
|
|
571
|
+
"+ Header contains: logo, search bar, user profile icon
|
|
572
|
+
+ Sidebar contains: price slider, amenity checkboxes, rating filter
|
|
573
|
+
+ Main grid: 3 columns of property cards"
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
**Style Layer (Visual):**
|
|
577
|
+
|
|
578
|
+
```text
|
|
579
|
+
"+ Modern clean design, blue accents, white background, card shadows, plenty of spacing"
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
**Combined:**
|
|
583
|
+
|
|
584
|
+
```text
|
|
585
|
+
"Desktop entity listing page with header (logo, search bar, user profile), left filter sidebar (price slider, amenity checkboxes, rating filter), main content grid (3 columns of property cards). Modern clean design, blue accents, white background, card shadows, plenty of spacing."
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
### 2. Reference-Based Prompts
|
|
589
|
+
|
|
590
|
+
Use references to well-known patterns:
|
|
591
|
+
|
|
592
|
+
```text
|
|
593
|
+
"Entity search results page similar to Booking.com layout: left sidebar filters, main area with property cards in grid, top bar with sort/filter options. Adapt style to be more modern and minimal with blue accent color."
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
**Caution:** Only use references to describe structure/layout, not to copy copyrighted designs.
|
|
597
|
+
|
|
598
|
+
### 3. State-Specific Mockups
|
|
599
|
+
|
|
600
|
+
Generate mockups for specific states:
|
|
601
|
+
|
|
602
|
+
```text
|
|
603
|
+
"[Same base prompt] showing LOADING STATE with skeleton placeholders for cards"
|
|
604
|
+
"[Same base prompt] showing EMPTY STATE with centered illustration and 'No results found' message"
|
|
605
|
+
"[Same base prompt] showing ERROR STATE with error banner at top"
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
---
|
|
609
|
+
|
|
610
|
+
## Quick Reference Checklist
|
|
611
|
+
|
|
612
|
+
Before generating a mockup, verify your prompt has:
|
|
613
|
+
|
|
614
|
+
- [ ] Device type specified (desktop/mobile/tablet)
|
|
615
|
+
- [ ] Page/feature name clear
|
|
616
|
+
- [ ] Key UI elements listed (3-5 minimum)
|
|
617
|
+
- [ ] Layout structure described (columns, sidebars, sections)
|
|
618
|
+
- [ ] Visual style mentioned (modern, clean, professional, etc.)
|
|
619
|
+
- [ ] Content density hint (sparse, dense, balanced)
|
|
620
|
+
- [ ] 50-150 words total (sweet spot for detail vs. clarity)
|
|
621
|
+
- [ ] No copyrighted brand references
|
|
622
|
+
- [ ] No exact hex colors or font specifications
|
|
623
|
+
- [ ] Focus on structure and hierarchy, not tiny details
|
|
624
|
+
|
|
625
|
+
---
|
|
626
|
+
|
|
627
|
+
## Resources
|
|
628
|
+
|
|
629
|
+
**Example Prompts from P-005:**
|
|
630
|
+
|
|
631
|
+
- See `.claude/sessions/planning/P-005-test/mockups/.registry.json` for real prompts and results
|
|
632
|
+
- Study successful prompts from `examples/e2e-test.ts`
|
|
633
|
+
|
|
634
|
+
**Related Documentation:**
|
|
635
|
+
|
|
636
|
+
- [Environment Setup Guide](./mockup-setup.md) - How to configure the system
|
|
637
|
+
- [UX/UI Designer Agent](../../agents/design/ux-ui-designer.md) - Full agent documentation
|
|
638
|
+
- [MockupGenerator API Reference](../../../packages/ai-image-generation/README.md) - Technical details
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
642
|
+
**Last Updated:** 2025-11-04
|
|
643
|
+
**Version:** 1.0.0
|
|
644
|
+
**Related:** P-005, PF-005-18
|