@shaykec/app-agent 1.0.10 → 1.0.12
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/.claude/skills/web-analyzer/SKILL.md +55 -0
- package/.claude/skills/web-crawler/SKILL.md +54 -0
- package/.cursor/rules/workflow.mdc +29 -0
- package/.cursor/skills/web-analyzer/SKILL.md +310 -0
- package/.cursor/skills/web-crawler/SKILL.md +252 -0
- package/AGENTS.md +25 -0
- package/CLAUDE.md +40 -0
- package/README.md +11 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +142 -10
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +6 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -1
- package/dist/config.js.map +1 -1
- package/dist/index.js +79 -9
- package/dist/index.js.map +1 -1
- package/dist/prompt-builder.d.ts +6 -0
- package/dist/prompt-builder.d.ts.map +1 -1
- package/dist/prompt-builder.js +56 -0
- package/dist/prompt-builder.js.map +1 -1
- package/dist/validator.d.ts +1 -1
- package/dist/validator.d.ts.map +1 -1
- package/dist/validator.js +24 -11
- package/dist/validator.js.map +1 -1
- package/package.json +1 -3
- package/prompts/web-clone-agent-prompt.md +179 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Web Analyzer Skill
|
|
2
|
+
|
|
3
|
+
Analyze web crawl report + screenshots to produce a web-to-app manifest for the build pipeline.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
- `reports/02-web-crawl-report.md` — crawl data
|
|
7
|
+
- `web-crawl/screenshots/*.png` — passed as image attachments
|
|
8
|
+
- Focus directive (optional), platform
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
12
|
+
### 1. Page-to-Screen Mapping
|
|
13
|
+
| Web Pattern | Mobile Pattern |
|
|
14
|
+
|-------------|---------------|
|
|
15
|
+
| Home/landing | Home tab |
|
|
16
|
+
| List/catalog | List screen (scrollable) |
|
|
17
|
+
| Detail page | Detail screen (push nav) |
|
|
18
|
+
| Search | Explore tab or search overlay |
|
|
19
|
+
| Category/filter | Filter sheet or Explore tab |
|
|
20
|
+
| User profile | Profile tab |
|
|
21
|
+
| Favorites/saved | Favorites tab |
|
|
22
|
+
| Form (create) | Create screen (modal/push) |
|
|
23
|
+
| Cart/checkout | Cart tab (e-commerce) |
|
|
24
|
+
|
|
25
|
+
Tab bar: max 4-5 tabs. Home + Explore + Favorites + Profile is the default.
|
|
26
|
+
|
|
27
|
+
### 2. Brand Tokens
|
|
28
|
+
Extract from crawl report + visual screenshots:
|
|
29
|
+
- Colors: primary, secondary, background, surface, textPrimary, textSecondary, error, success
|
|
30
|
+
- Dark mode variants (lighten primary, dark backgrounds)
|
|
31
|
+
- Layout: cornerRadius, shadowStyle, spacingScale
|
|
32
|
+
- Typography: fontStyle mapped to system fonts
|
|
33
|
+
|
|
34
|
+
### 3. Data Model
|
|
35
|
+
Map each entity to struct/class: id, name, description, imageUrl, category, etc.
|
|
36
|
+
|
|
37
|
+
### 4. Content Brief
|
|
38
|
+
Adapt website copy: app name, tab labels, screen titles, empty states, CTAs, category names.
|
|
39
|
+
|
|
40
|
+
### 5. Template Selection
|
|
41
|
+
Compare against CATALOG.md. If 70%+ screen match → use template. Otherwise → scratch or Skeleton.
|
|
42
|
+
|
|
43
|
+
### 6. Parallel Batches
|
|
44
|
+
Divide into 2-3 batches for screen customization, UI testing, and Maestro tests.
|
|
45
|
+
|
|
46
|
+
## Output: `reports/03-web-to-app-manifest.md`
|
|
47
|
+
|
|
48
|
+
Include: screen mapping table, tab bar spec, brand tokens (light + dark), data model, content brief, mock data spec, AppConfig values, per-screen change list with reference screenshots, parallel batches.
|
|
49
|
+
|
|
50
|
+
## Key Principles
|
|
51
|
+
1. Mobile-first: concise screens, not infinite scroll
|
|
52
|
+
2. Tab bar is backbone: 4-5 tabs max
|
|
53
|
+
3. Brand fidelity: match website colors/typography/patterns
|
|
54
|
+
4. Content fidelity: use real website content, not placeholders
|
|
55
|
+
5. Platform conventions: respect HIG/Material Design within the brand
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Web Crawler Skill
|
|
2
|
+
|
|
3
|
+
Crawl a website using ai-tester MCP to capture structure, brand, content, and functionality.
|
|
4
|
+
|
|
5
|
+
## Tools (ai-tester MCP only)
|
|
6
|
+
|
|
7
|
+
- `inspect({ platform: "web", url: "...", saveBaseline: "...", label: "..." })` — screenshot + element tree
|
|
8
|
+
- `navigate({ url: "..." })` — go to page
|
|
9
|
+
- `act({ action: "tap", selector: "..." })` — click elements
|
|
10
|
+
- `act({ action: "swipe", direction: "down" })` — scroll
|
|
11
|
+
- `wait({ for: "duration", duration: 2000 })` — wait for load
|
|
12
|
+
|
|
13
|
+
## Crawl Strategy
|
|
14
|
+
|
|
15
|
+
### Phase 1: Home Page
|
|
16
|
+
1. `inspect({ platform: "web", url: "{url}", saveBaseline: "page-home", label: "Home" })`
|
|
17
|
+
2. Analyze element tree: nav links, hero sections, content sections, brand signals
|
|
18
|
+
|
|
19
|
+
### Phase 2: Navigation Discovery
|
|
20
|
+
From home page element tree, build page queue:
|
|
21
|
+
- Primary nav links (always visit)
|
|
22
|
+
- Focus directive pages (if provided)
|
|
23
|
+
- Secondary nav (if under 10 total)
|
|
24
|
+
- Skip: external links, auth pages, legal pages
|
|
25
|
+
|
|
26
|
+
### Phase 3: Page-by-Page Crawl (max 10 pages, depth 2)
|
|
27
|
+
For each page:
|
|
28
|
+
1. `navigate({ url: "{pageUrl}" })`
|
|
29
|
+
2. `wait({ for: "duration", duration: 2000 })`
|
|
30
|
+
3. `inspect({ saveBaseline: "page-{slug}", label: "{Title}" })`
|
|
31
|
+
4. Scroll + capture: `act({ action: "swipe", direction: "down" })` then `inspect` again
|
|
32
|
+
5. Record: URL, title, screenshot paths, element summary, content type, entities
|
|
33
|
+
|
|
34
|
+
### Phase 4: Brand Extraction
|
|
35
|
+
From screenshots + element trees:
|
|
36
|
+
- **Colors**: primary (buttons/headers), secondary (accents), background, surface, text colors
|
|
37
|
+
- **Typography**: heading/body font style, size scale
|
|
38
|
+
- **Layout**: card style, grid columns, spacing rhythm
|
|
39
|
+
- **Logo/imagery**: logo description, image style
|
|
40
|
+
|
|
41
|
+
### Phase 5: Functionality Inventory
|
|
42
|
+
Catalog: search, forms (fields only — don't submit), filters, auth indicators, CRUD, e-commerce, social features.
|
|
43
|
+
|
|
44
|
+
## Output: `reports/02-web-crawl-report.md`
|
|
45
|
+
|
|
46
|
+
Include: site map table, navigation structure, brand palette, content model (entities + fields), functionality inventory, per-page details with screenshot references.
|
|
47
|
+
|
|
48
|
+
## Limits
|
|
49
|
+
- Max 10 pages, depth 2
|
|
50
|
+
- 5s timeout per page
|
|
51
|
+
- No login/auth, no form submission, no payments
|
|
52
|
+
- Skip external links
|
|
53
|
+
- 1-2s between navigations
|
|
54
|
+
- If focus directive: prioritize those sections at depth 2, others at depth 1
|
|
@@ -47,6 +47,8 @@ Specialised skills are in `.cursor/skills/`. For each workflow step that referen
|
|
|
47
47
|
| deep-test | `test-planner` | Analyze code and produce structured test plan (Phase 1) |
|
|
48
48
|
| deep-test | `exploratory-tester` | Screenshot + a11y tree driven exploratory testing (Phase 2) |
|
|
49
49
|
| deep-test | `bug-fixer` | Read bug report and fix bugs systematically (Phase 4) |
|
|
50
|
+
| 0 (web-clone) | `web-crawler` | Crawl website using ai-tester MCP — screenshots, element trees, brand |
|
|
51
|
+
| 1 (web-clone) | `web-analyzer` | Analyze crawled data — map pages to screens, extract brand, produce manifest |
|
|
50
52
|
|
|
51
53
|
When a step references a skill, read `.cursor/skills/{name}/SKILL.md` and follow its instructions. Each skill file contains the full expert-level instructions for that task.
|
|
52
54
|
|
|
@@ -292,6 +294,33 @@ Phase 1 runs offline. Phases 2+3 run in parallel on separate simulators. Phase 4
|
|
|
292
294
|
|
|
293
295
|
Key: the exploratory tester does NOT read source code — it tests purely from screenshots and the accessibility tree.
|
|
294
296
|
|
|
297
|
+
## Web Clone Workflow
|
|
298
|
+
|
|
299
|
+
When `--url <website-url>` is used (or "Clone from website" is selected interactively), AppAgent crawls a live website using ai-tester MCP and generates a native mobile app mirroring its structure, brand, and content.
|
|
300
|
+
|
|
301
|
+
### CLI Usage
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
appagent --url https://example.com -p ios
|
|
305
|
+
appagent --url https://example.com -p android -d "focus on the shop and checkout flow"
|
|
306
|
+
appagent --url https://example.com -p both
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Web Clone Steps
|
|
310
|
+
|
|
311
|
+
| Step | Name | Parallelism | What Happens |
|
|
312
|
+
|------|------|-------------|-------------|
|
|
313
|
+
| 0 | Validation + Web Crawl | **2 parallel tasks** | Validate prompt + crawl website (screenshots + element trees) |
|
|
314
|
+
| 1 | Web Analysis + Template Selection | — | Map pages to screens, extract brand, select template |
|
|
315
|
+
| 2 | Clone + Rename | — | Clone selected template, rename app |
|
|
316
|
+
| 3 | Apply Brand + Content | — | Apply website brand tokens and content |
|
|
317
|
+
| 4 | Screen Customization | **2-3 parallel subagents** | Each receives website screenshots as visual reference |
|
|
318
|
+
| 5 | Build | — | Compile, fix errors |
|
|
319
|
+
| 6 | Audits + Boot Sims | **3 parallel tasks** | Security + validation + boot simulators |
|
|
320
|
+
| 7-10 | UI Testing | **parallel** | Interactive testing + Maestro tests |
|
|
321
|
+
|
|
322
|
+
Key differences: brand from website screenshots (not `designs/brands/`), content from website, screenshots as visual context for subagents, `web-crawler` + `web-analyzer` skills, new reports (`02-web-crawl-report.md`, `03-web-to-app-manifest.md`).
|
|
323
|
+
|
|
295
324
|
## Update Workflow
|
|
296
325
|
|
|
297
326
|
When the user passes `--update <source>` (or `-u <source>`), the agent modifies an existing app instead of creating a new one. The source can be a GitHub URL, a local path, or an app name from `output/`.
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# Web Analyzer Skill
|
|
2
|
+
|
|
3
|
+
Analyze the web crawl report and website screenshots to produce a structured app specification (web-to-app manifest) that drives the rest of the build pipeline.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
|
|
7
|
+
- **Web crawl report**: `output/{app-name}/reports/02-web-crawl-report.md`
|
|
8
|
+
- **Website screenshots**: `output/{app-name}/web-crawl/screenshots/*.png` (passed as image attachments)
|
|
9
|
+
- **Focus directive** (optional): User's description of what to prioritize
|
|
10
|
+
- **Platform**: ios, android, or react-native
|
|
11
|
+
|
|
12
|
+
## Process
|
|
13
|
+
|
|
14
|
+
### 1. Read the Crawl Report
|
|
15
|
+
|
|
16
|
+
Read `reports/02-web-crawl-report.md` to understand:
|
|
17
|
+
- Site map (all pages discovered)
|
|
18
|
+
- Navigation structure
|
|
19
|
+
- Brand palette (colors, typography, layout patterns)
|
|
20
|
+
- Content model (entities, fields, categories)
|
|
21
|
+
- Functionality inventory (search, forms, filters, auth, CRUD)
|
|
22
|
+
|
|
23
|
+
### 2. View the Screenshots
|
|
24
|
+
|
|
25
|
+
Examine all saved screenshots to visually verify and refine:
|
|
26
|
+
- Color accuracy (screenshots show the actual rendered colors)
|
|
27
|
+
- Layout patterns (card grids, list styles, hero sections, spacing)
|
|
28
|
+
- Visual hierarchy (what's prominent, what's secondary)
|
|
29
|
+
- Overall brand "feel" (modern, classic, playful, corporate, etc.)
|
|
30
|
+
- Typography style (even if exact fonts can't be extracted)
|
|
31
|
+
|
|
32
|
+
### 3. Map Pages to Mobile Screens
|
|
33
|
+
|
|
34
|
+
Apply these mapping rules:
|
|
35
|
+
|
|
36
|
+
| Web Pattern | Mobile Pattern |
|
|
37
|
+
|-------------|---------------|
|
|
38
|
+
| Home/landing page | Home tab (main tab) |
|
|
39
|
+
| List/catalog page (products, articles) | List screen (scrollable, searchable) |
|
|
40
|
+
| Detail page (product detail, article) | Detail screen (push navigation) |
|
|
41
|
+
| Search page / search results | Search/Explore tab or search overlay |
|
|
42
|
+
| Category/filter page | Filter sheet or Explore tab |
|
|
43
|
+
| User profile / account | Profile tab |
|
|
44
|
+
| Favorites / wishlist / saved | Favorites tab |
|
|
45
|
+
| Contact / about / info | Info section in Profile or separate screen |
|
|
46
|
+
| Form (create, submit) | Create/Compose screen (modal or push) |
|
|
47
|
+
| Cart / checkout | Cart tab or sheet (if e-commerce) |
|
|
48
|
+
| Settings / preferences | Settings screen (in Profile tab) |
|
|
49
|
+
|
|
50
|
+
**Tab Bar Strategy** (max 4-5 tabs):
|
|
51
|
+
1. **Home** — always the first tab (mirrors home page)
|
|
52
|
+
2. **Explore/Search** — if the site has search, catalog, or browse functionality
|
|
53
|
+
3. **Favorites** — if the site has save/wishlist/bookmark functionality
|
|
54
|
+
4. **Profile** — if the site has user accounts, settings, or contact info
|
|
55
|
+
5. **Extra tab** — only if the site has a major section that doesn't fit above (e.g., Cart for e-commerce)
|
|
56
|
+
|
|
57
|
+
### 4. Map Navigation
|
|
58
|
+
|
|
59
|
+
| Web Navigation | Mobile Navigation |
|
|
60
|
+
|----------------|-------------------|
|
|
61
|
+
| Top nav bar links | Tab bar items |
|
|
62
|
+
| Sub-menu / dropdown | Navigation stack (push screens) |
|
|
63
|
+
| Breadcrumbs | Back button (automatic in nav stack) |
|
|
64
|
+
| Pagination | Infinite scroll or load-more |
|
|
65
|
+
| Modal / popup | Sheet or modal presentation |
|
|
66
|
+
| Sidebar / drawer | Not recommended — flatten into tabs |
|
|
67
|
+
|
|
68
|
+
### 5. Extract Brand Tokens
|
|
69
|
+
|
|
70
|
+
From the crawl report and screenshots, produce exact brand tokens:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
Primary Color: #XXXXXX (main CTA / button color)
|
|
74
|
+
Secondary Color: #XXXXXX (accent / highlight color)
|
|
75
|
+
Background: #XXXXXX (page background)
|
|
76
|
+
Surface: #XXXXXX (card / section background)
|
|
77
|
+
Text Primary: #XXXXXX (headings, main text)
|
|
78
|
+
Text Secondary: #XXXXXX (captions, secondary text)
|
|
79
|
+
Error: #FF3B30 (default if not visible on site)
|
|
80
|
+
Success: #34C759 (default if not visible on site)
|
|
81
|
+
|
|
82
|
+
Corner Radius: {small/medium/large} → {4/8/12}pt
|
|
83
|
+
Shadow Style: {none/subtle/prominent}
|
|
84
|
+
Spacing Scale: {tight/medium/generous}
|
|
85
|
+
|
|
86
|
+
Typography Style: {sans-serif/serif/rounded} → map to system fonts
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 6. Define Data Model
|
|
90
|
+
|
|
91
|
+
From the content model in the crawl report:
|
|
92
|
+
- Map each entity to a Swift struct / Kotlin data class / TypeScript interface
|
|
93
|
+
- Define fields with types (String, Int, Double, URL, Date, Bool)
|
|
94
|
+
- Identify primary entity (the main "item" the app displays)
|
|
95
|
+
- Identify relationships (entity A has many entity B)
|
|
96
|
+
|
|
97
|
+
### 7. Generate Content Brief
|
|
98
|
+
|
|
99
|
+
Adapt website copy for mobile:
|
|
100
|
+
- App display name (from website name/logo)
|
|
101
|
+
- Tab labels (short, 1-2 words)
|
|
102
|
+
- Screen titles
|
|
103
|
+
- Empty state messages
|
|
104
|
+
- Search placeholder text
|
|
105
|
+
- CTA button labels
|
|
106
|
+
- Onboarding text (if the site has a value proposition)
|
|
107
|
+
- Category names
|
|
108
|
+
|
|
109
|
+
### 8. Decide: Template or Scratch
|
|
110
|
+
|
|
111
|
+
Compare the web-to-app mapping against available templates in CATALOG.md:
|
|
112
|
+
- If a template matches 70%+ of the required screens/features → use template mode
|
|
113
|
+
- If no template is a good fit → recommend scratch mode
|
|
114
|
+
- Always prefer template mode for reliability
|
|
115
|
+
|
|
116
|
+
### 9. Generate Parallel Batches
|
|
117
|
+
|
|
118
|
+
Divide screens into 2-3 batches for parallel customization and testing:
|
|
119
|
+
- **Batch 1**: Home + Explore/Search screens
|
|
120
|
+
- **Batch 2**: Detail + Create/Form screens
|
|
121
|
+
- **Batch 3**: Profile + Settings + Favorites screens
|
|
122
|
+
|
|
123
|
+
## Output
|
|
124
|
+
|
|
125
|
+
Write `output/{app-name}/reports/03-web-to-app-manifest.md` with this structure:
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
# Web-to-App Manifest
|
|
129
|
+
|
|
130
|
+
## Source
|
|
131
|
+
- **URL**: {url}
|
|
132
|
+
- **App Name**: {derived from website name}
|
|
133
|
+
- **Bundle ID**: com.appship.{appname}
|
|
134
|
+
- **Platform**: {platform}
|
|
135
|
+
- **Build Mode**: {template/scratch}
|
|
136
|
+
- **Selected Template**: {template name or "N/A for scratch mode"}
|
|
137
|
+
|
|
138
|
+
## Screen Mapping
|
|
139
|
+
|
|
140
|
+
| # | Web Page | Mobile Screen | Tab | Navigation |
|
|
141
|
+
|---|----------|--------------|-----|------------|
|
|
142
|
+
| 1 | Home | HomeView | Home | Root |
|
|
143
|
+
| 2 | Products | ProductListView | Explore | Root |
|
|
144
|
+
| 3 | Product Detail | ProductDetailView | — | Push from ProductList |
|
|
145
|
+
| 4 | Search Results | SearchView | Explore | Overlay |
|
|
146
|
+
| 5 | Cart | CartView | Cart | Root |
|
|
147
|
+
| 6 | Profile | ProfileView | Profile | Root |
|
|
148
|
+
|
|
149
|
+
## Tab Bar
|
|
150
|
+
|
|
151
|
+
| # | Tab | Label | Icon (SF Symbol / Material) | Root Screen |
|
|
152
|
+
|---|-----|-------|---------------------------|-------------|
|
|
153
|
+
| 1 | Home | Home | house.fill / home | HomeView |
|
|
154
|
+
| 2 | Explore | Explore | magnifyingglass / search | ProductListView |
|
|
155
|
+
| 3 | Favorites | Saved | heart.fill / favorite | FavoritesView |
|
|
156
|
+
| 4 | Profile | Profile | person.fill / person | ProfileView |
|
|
157
|
+
|
|
158
|
+
## Brand Tokens
|
|
159
|
+
|
|
160
|
+
### Colors (Light Mode)
|
|
161
|
+
- primary: #{hex}
|
|
162
|
+
- secondary: #{hex}
|
|
163
|
+
- background: #{hex}
|
|
164
|
+
- surface: #{hex}
|
|
165
|
+
- textPrimary: #{hex}
|
|
166
|
+
- textSecondary: #{hex}
|
|
167
|
+
- error: #{hex}
|
|
168
|
+
- success: #{hex}
|
|
169
|
+
|
|
170
|
+
### Colors (Dark Mode)
|
|
171
|
+
- primary: #{hex} (lightened for dark bg)
|
|
172
|
+
- secondary: #{hex}
|
|
173
|
+
- background: #1C1C1E
|
|
174
|
+
- surface: #2C2C2E
|
|
175
|
+
- textPrimary: #FFFFFF
|
|
176
|
+
- textSecondary: #8E8E93
|
|
177
|
+
|
|
178
|
+
### Layout
|
|
179
|
+
- cornerRadius: {value}
|
|
180
|
+
- shadowStyle: {none/subtle/prominent}
|
|
181
|
+
- spacingScale: {tight/medium/generous}
|
|
182
|
+
|
|
183
|
+
### Typography
|
|
184
|
+
- fontStyle: {sans-serif/serif/rounded}
|
|
185
|
+
- iOS: {system font recommendation}
|
|
186
|
+
- Android: {font recommendation}
|
|
187
|
+
|
|
188
|
+
## Data Model
|
|
189
|
+
|
|
190
|
+
### {PrimaryEntity} (e.g., Product)
|
|
191
|
+
```
|
|
192
|
+
id: String (UUID)
|
|
193
|
+
name: String
|
|
194
|
+
description: String
|
|
195
|
+
imageUrl: URL
|
|
196
|
+
price: Double (optional)
|
|
197
|
+
category: String
|
|
198
|
+
rating: Double (optional)
|
|
199
|
+
isFavorite: Bool
|
|
200
|
+
createdAt: Date
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Categories
|
|
204
|
+
- {Category 1}
|
|
205
|
+
- {Category 2}
|
|
206
|
+
- ...
|
|
207
|
+
|
|
208
|
+
## Content Brief
|
|
209
|
+
|
|
210
|
+
### App Name & Branding
|
|
211
|
+
- **Display Name**: {name}
|
|
212
|
+
- **Tagline**: {from website}
|
|
213
|
+
|
|
214
|
+
### Tab Labels
|
|
215
|
+
- Home, Explore, Saved, Profile
|
|
216
|
+
|
|
217
|
+
### Screen Titles
|
|
218
|
+
- Home: "{title}"
|
|
219
|
+
- Explore: "{title}"
|
|
220
|
+
- ...
|
|
221
|
+
|
|
222
|
+
### Empty States
|
|
223
|
+
- No items: "{message}"
|
|
224
|
+
- No favorites: "{message}"
|
|
225
|
+
- No search results: "{message}"
|
|
226
|
+
|
|
227
|
+
### CTAs
|
|
228
|
+
- Primary CTA: "{label}"
|
|
229
|
+
- Secondary CTA: "{label}"
|
|
230
|
+
|
|
231
|
+
## Mock Data Spec
|
|
232
|
+
|
|
233
|
+
### {PrimaryEntity} (generate 12-15 items)
|
|
234
|
+
Use realistic content observed on the website:
|
|
235
|
+
- Item 1: {name}, {category}, {description snippet}
|
|
236
|
+
- Item 2: ...
|
|
237
|
+
(list 5-6 examples, agent generates the rest)
|
|
238
|
+
|
|
239
|
+
### Categories (4-6)
|
|
240
|
+
- {name}: {description}
|
|
241
|
+
|
|
242
|
+
## AppConfig Values
|
|
243
|
+
|
|
244
|
+
Map to CUSTOMIZE markers in the template:
|
|
245
|
+
- `appName`: "{value}"
|
|
246
|
+
- `primaryColor`: "#{hex}"
|
|
247
|
+
- `accentColor`: "#{hex}"
|
|
248
|
+
- `tabTitles`: ["{tab1}", "{tab2}", "{tab3}", "{tab4}"]
|
|
249
|
+
- `categories`: ["{cat1}", "{cat2}", ...]
|
|
250
|
+
- `entityName`: "{name}"
|
|
251
|
+
- `entityNamePlural`: "{names}"
|
|
252
|
+
(continue for all CUSTOMIZE markers)
|
|
253
|
+
|
|
254
|
+
## Screen Changes
|
|
255
|
+
|
|
256
|
+
### HomeView
|
|
257
|
+
- Replace hero section with: {description from website}
|
|
258
|
+
- Cards should display: {entity fields}
|
|
259
|
+
- Style: {layout pattern from website}
|
|
260
|
+
- Reference screenshot: page-home.png
|
|
261
|
+
|
|
262
|
+
### {ScreenName}
|
|
263
|
+
- Changes: {description}
|
|
264
|
+
- Reference screenshot: page-{slug}.png
|
|
265
|
+
|
|
266
|
+
(repeat for each screen)
|
|
267
|
+
|
|
268
|
+
## Parallel Batches
|
|
269
|
+
|
|
270
|
+
### Screen Customization Batches
|
|
271
|
+
- **Batch 1** (Simulator 1): HomeView, ExploreView, SearchView
|
|
272
|
+
- **Batch 2** (Simulator 2): DetailView, CreateView, FavoritesView
|
|
273
|
+
- **Batch 3** (Simulator 3): ProfileView, SettingsView
|
|
274
|
+
|
|
275
|
+
### UI Testing Batches
|
|
276
|
+
- **Batch 1** (Simulator 1): Home tab, Explore tab
|
|
277
|
+
- **Batch 2** (Simulator 2): Detail screen, Create flow, Favorites tab
|
|
278
|
+
- **Batch 3** (Simulator 3): Profile tab, Settings
|
|
279
|
+
|
|
280
|
+
### Maestro Test Batches
|
|
281
|
+
- **Batch 1**: launch.yaml, home-tab.yaml, explore-tab.yaml
|
|
282
|
+
- **Batch 2**: detail-screen.yaml, create-flow.yaml, search-flow.yaml
|
|
283
|
+
- **Batch 3**: profile-tab.yaml, favorites-tab.yaml, e2e-navigation.yaml
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Template Selection Heuristics
|
|
287
|
+
|
|
288
|
+
When deciding which template to use, consider:
|
|
289
|
+
|
|
290
|
+
| Website Type | Best Template Match |
|
|
291
|
+
|-------------|-------------------|
|
|
292
|
+
| E-commerce / Shop | ShopTemplate |
|
|
293
|
+
| Blog / News / Content | SocialTemplate |
|
|
294
|
+
| Booking / Appointments | BookTemplate |
|
|
295
|
+
| Fitness / Health tracking | TrackTemplate |
|
|
296
|
+
| Finance / Banking | FinanceTemplate |
|
|
297
|
+
| Social / Community | SocialTemplate |
|
|
298
|
+
| Chat / Messaging | ChatTemplate |
|
|
299
|
+
| General / Mixed | Skeleton (or scratch) |
|
|
300
|
+
|
|
301
|
+
If the web-to-app manifest matches a template at 70%+ screen overlap, use it. Otherwise, recommend scratch mode or the Skeleton template.
|
|
302
|
+
|
|
303
|
+
## Key Principles
|
|
304
|
+
|
|
305
|
+
1. **Mobile-first thinking**: websites have infinite scroll space; mobile apps need concise, focused screens
|
|
306
|
+
2. **Tab bar is the backbone**: map the site's main sections to 4-5 tabs maximum
|
|
307
|
+
3. **Progressive disclosure**: detail pages are push-navigated from list pages, not shown inline
|
|
308
|
+
4. **Brand fidelity**: match the website's colors, typography feel, and card/layout patterns as closely as the native platform allows
|
|
309
|
+
5. **Content fidelity**: use actual content from the website (entity names, categories, descriptions) not generic placeholders
|
|
310
|
+
6. **Platform conventions**: respect iOS HIG and Material Design guidelines even while matching the web brand
|