ai-flow-dev 2.1.2 → 2.1.4
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/README.md +28 -40
- package/dist/cli.js +69 -47
- package/dist/cli.js.map +1 -1
- package/package.json +5 -5
- package/prompts/backend/flow-build-phase-0.md +96 -84
- package/prompts/backend/flow-build-phase-1.md +10 -18
- package/prompts/backend/flow-build-phase-10.md +199 -583
- package/prompts/backend/flow-build-phase-2.md +152 -86
- package/prompts/backend/flow-build-phase-3.md +108 -68
- package/prompts/backend/flow-build-phase-4.md +5 -8
- package/prompts/backend/flow-build-phase-5.md +39 -12
- package/prompts/backend/flow-build-phase-6.md +29 -8
- package/prompts/backend/flow-build-phase-7.md +121 -41
- package/prompts/backend/flow-build-phase-8.md +28 -65
- package/prompts/backend/flow-build-phase-9.md +267 -1298
- package/prompts/backend/flow-build.md +881 -957
- package/prompts/backend/flow-dev-commit.md +27 -50
- package/prompts/backend/flow-dev-feature.md +1929 -2017
- package/prompts/backend/flow-dev-fix.md +936 -964
- package/prompts/backend/flow-dev-refactor.md +672 -701
- package/prompts/backend/flow-dev-review.md +356 -389
- package/prompts/backend/flow-dev-work.md +1066 -1118
- package/prompts/backend/flow-docs-sync.md +31 -210
- package/prompts/frontend/flow-build-phase-0.md +503 -484
- package/prompts/frontend/flow-build-phase-1.md +445 -433
- package/prompts/frontend/flow-build-phase-2.md +910 -957
- package/prompts/frontend/flow-build-phase-3.md +692 -664
- package/prompts/frontend/flow-build-phase-4.md +478 -463
- package/prompts/frontend/flow-build-phase-5.md +488 -467
- package/prompts/frontend/flow-build-phase-6.md +571 -550
- package/prompts/frontend/flow-build-phase-7.md +560 -592
- package/prompts/frontend/flow-build-phase-8.md +17 -42
- package/prompts/frontend/flow-build.md +457 -503
- package/prompts/frontend/flow-docs-sync.md +24 -45
- package/prompts/mobile/flow-build-phase-0.md +104 -97
- package/prompts/mobile/flow-build-phase-1.md +137 -122
- package/prompts/mobile/flow-build-phase-2.md +123 -130
- package/prompts/mobile/flow-build-phase-3.md +144 -149
- package/prompts/mobile/flow-build-phase-4.md +140 -132
- package/prompts/mobile/flow-build-phase-5.md +70 -70
- package/prompts/mobile/flow-build-phase-6.md +136 -134
- package/prompts/mobile/flow-build-phase-7.md +24 -58
- package/prompts/mobile/flow-build-phase-8.md +17 -42
- package/prompts/mobile/flow-build.md +47 -97
- package/prompts/mobile/flow-docs-sync.md +23 -42
- package/prompts/shared/mermaid-guidelines.md +106 -0
- package/prompts/shared/scope-levels.md +126 -0
- package/prompts/shared/story-points.md +65 -0
- package/prompts/shared/task-format.md +86 -0
- package/templates/AGENT.template.md +194 -15
- package/templates/backend/README.template.md +2 -32
- package/templates/backend/ai-instructions.template.md +2 -32
- package/templates/backend/copilot-instructions.template.md +2 -22
- package/templates/backend/docs/api.template.md +89 -20
- package/templates/backend/docs/architecture.template.md +165 -53
- package/templates/backend/docs/business-flows.template.md +7 -14
- package/templates/backend/docs/code-standards.template.md +2 -38
- package/templates/backend/docs/contributing.template.md +2 -16
- package/templates/backend/docs/data-model.template.md +125 -21
- package/templates/backend/docs/operations.template.md +179 -50
- package/templates/backend/docs/testing.template.md +2 -42
- package/templates/backend/project-brief.template.md +2 -28
- package/templates/backend/specs/configuration.template.md +2 -14
- package/templates/backend/specs/security.template.md +2 -32
- package/templates/frontend/README.template.md +2 -18
- package/templates/frontend/ai-instructions.template.md +2 -20
- package/templates/frontend/docs/api-integration.template.md +12 -30
- package/templates/frontend/docs/components.template.md +2 -28
- package/templates/frontend/docs/error-handling.template.md +11 -27
- package/templates/frontend/docs/operations.template.md +8 -18
- package/templates/frontend/docs/performance.template.md +8 -18
- package/templates/frontend/docs/pwa.template.md +8 -18
- package/templates/frontend/docs/state-management.template.md +2 -28
- package/templates/frontend/docs/styling.template.md +2 -26
- package/templates/frontend/docs/testing.template.md +2 -28
- package/templates/frontend/project-brief.template.md +2 -16
- package/templates/frontend/specs/accessibility.template.md +8 -18
- package/templates/frontend/specs/configuration.template.md +2 -24
- package/templates/frontend/specs/security.template.md +10 -24
- package/templates/fullstack/README.template.md +17 -47
- package/templates/fullstack/ai-instructions.template.md +17 -45
- package/templates/fullstack/project-brief.template.md +16 -42
- package/templates/fullstack/specs/configuration.template.md +16 -42
- package/templates/mobile/README.template.md +11 -29
- package/templates/mobile/ai-instructions.template.md +11 -27
- package/templates/mobile/docs/app-store.template.md +11 -29
- package/templates/mobile/docs/architecture.template.md +14 -38
- package/templates/mobile/docs/native-features.template.md +16 -44
- package/templates/mobile/docs/navigation.template.md +9 -23
- package/templates/mobile/docs/offline-strategy.template.md +10 -26
- package/templates/mobile/docs/permissions.template.md +9 -23
- package/templates/mobile/docs/state-management.template.md +12 -32
- package/templates/mobile/docs/testing.template.md +14 -38
- package/templates/mobile/project-brief.template.md +12 -30
- package/templates/mobile/specs/build-configuration.template.md +10 -26
- package/templates/mobile/specs/deployment.template.md +9 -23
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
**Duration:** 15-20 minutes
|
|
4
4
|
**Questions:** ~10 questions
|
|
5
5
|
**Output:** docs/code-standards.md, parts of ai-instructions.md
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
6
|
+
---
|
|
9
7
|
## 🎯 Objective
|
|
10
8
|
|
|
11
9
|
Define coding conventions and standards for your mobile app:
|
|
@@ -15,9 +13,7 @@ Define coding conventions and standards for your mobile app:
|
|
|
15
13
|
3. Import organization
|
|
16
14
|
4. Commit message standards
|
|
17
15
|
5. Mobile-specific best practices
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
16
|
+
---
|
|
21
17
|
## 📋 Questions
|
|
22
18
|
|
|
23
19
|
### Question 5.1: File Naming Convention
|
|
@@ -25,6 +21,7 @@ Define coding conventions and standards for your mobile app:
|
|
|
25
21
|
**How will you name your files?**
|
|
26
22
|
|
|
27
23
|
**If React Native:**
|
|
24
|
+
|
|
28
25
|
- A) ⭐ **PascalCase for components** (Recommended)
|
|
29
26
|
- Components: `UserProfile.tsx`, `Button.tsx`
|
|
30
27
|
- Screens: `HomeScreen.tsx`, `ProfileScreen.tsx`
|
|
@@ -35,36 +32,40 @@ Define coding conventions and standards for your mobile app:
|
|
|
35
32
|
- Components: `user-profile.tsx`, `button.tsx`
|
|
36
33
|
|
|
37
34
|
**If Flutter:**
|
|
35
|
+
|
|
38
36
|
- A) ⭐ **snake_case** (Dart convention)
|
|
39
37
|
- Files: `user_profile.dart`, `home_screen.dart`
|
|
40
38
|
- Classes: `UserProfile`, `HomeScreen`
|
|
41
39
|
|
|
42
40
|
**If Native iOS:**
|
|
41
|
+
|
|
43
42
|
- A) ⭐ **PascalCase** (Swift convention)
|
|
44
43
|
- Files: `UserProfile.swift`, `HomeViewController.swift`
|
|
45
44
|
|
|
46
45
|
**If Native Android:**
|
|
46
|
+
|
|
47
47
|
- A) ⭐ **PascalCase for classes, camelCase for files** (Kotlin convention)
|
|
48
48
|
- Files: `UserProfile.kt`, `HomeActivity.kt`
|
|
49
49
|
|
|
50
50
|
**Your answer:**
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
51
|
+
---
|
|
54
52
|
### Question 5.2: Component/Screen Naming Convention
|
|
55
53
|
|
|
56
54
|
**How will you name components and screens?**
|
|
57
55
|
|
|
58
56
|
**If React Native:**
|
|
57
|
+
|
|
59
58
|
- A) ⭐ **PascalCase** (Recommended)
|
|
60
59
|
- Components: `<UserProfile />`, `<Button />`
|
|
61
60
|
- Screens: `<HomeScreen />`, `<ProfileScreen />`
|
|
62
61
|
|
|
63
62
|
**If Flutter:**
|
|
63
|
+
|
|
64
64
|
- A) ⭐ **PascalCase for widgets**
|
|
65
65
|
- Widgets: `UserProfile`, `HomeScreen`
|
|
66
66
|
|
|
67
67
|
**If Native:**
|
|
68
|
+
|
|
68
69
|
- A) ⭐ **PascalCase for classes**
|
|
69
70
|
- iOS: `UserProfileViewController`
|
|
70
71
|
- Android: `UserProfileActivity`
|
|
@@ -74,7 +75,9 @@ Define coding conventions and standards for your mobile app:
|
|
|
74
75
|
**Named exports vs default exports?**
|
|
75
76
|
|
|
76
77
|
**If React Native:**
|
|
78
|
+
|
|
77
79
|
- A) ⭐ **Named exports** (Recommended)
|
|
80
|
+
|
|
78
81
|
```typescript
|
|
79
82
|
export const Button = () => { ... }
|
|
80
83
|
// Usage: import { Button } from './Button'
|
|
@@ -86,14 +89,13 @@ Define coding conventions and standards for your mobile app:
|
|
|
86
89
|
```
|
|
87
90
|
|
|
88
91
|
**Your answer:**
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
+
---
|
|
92
93
|
### Question 5.3: Linting & Formatting
|
|
93
94
|
|
|
94
95
|
**What linting/formatting tools will you use?**
|
|
95
96
|
|
|
96
97
|
**If React Native:**
|
|
98
|
+
|
|
97
99
|
- A) ⭐ **ESLint + Prettier** (Recommended)
|
|
98
100
|
- ESLint: Code quality rules
|
|
99
101
|
- Prettier: Code formatting
|
|
@@ -101,31 +103,34 @@ Define coding conventions and standards for your mobile app:
|
|
|
101
103
|
- B) **Biome** (All-in-one, faster)
|
|
102
104
|
|
|
103
105
|
**If Flutter:**
|
|
106
|
+
|
|
104
107
|
- A) ⭐ **dart format** (Built-in)
|
|
105
108
|
- B) **dart analyze** (Linting)
|
|
106
109
|
|
|
107
110
|
**If Native iOS:**
|
|
111
|
+
|
|
108
112
|
- A) ⭐ **SwiftLint** (Recommended)
|
|
109
113
|
- B) **SwiftFormat**
|
|
110
114
|
|
|
111
115
|
**If Native Android:**
|
|
116
|
+
|
|
112
117
|
- A) ⭐ **ktlint** (Recommended)
|
|
113
118
|
- B) **Detekt**
|
|
114
119
|
|
|
115
120
|
**Your answer:**
|
|
116
121
|
|
|
117
122
|
**ESLint config (if React Native):**
|
|
123
|
+
|
|
118
124
|
- A) ⭐ **@react-native-community/eslint-config**
|
|
119
125
|
- B) **eslint-config-airbnb**
|
|
120
126
|
- C) **Custom config**
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
127
|
+
---
|
|
124
128
|
### Question 5.4: Import Organization
|
|
125
129
|
|
|
126
130
|
**How will you organize imports?**
|
|
127
131
|
|
|
128
132
|
**If React Native:**
|
|
133
|
+
|
|
129
134
|
```typescript
|
|
130
135
|
// 1. External libraries
|
|
131
136
|
import React from 'react';
|
|
@@ -143,6 +148,7 @@ import type { User } from '@/types';
|
|
|
143
148
|
```
|
|
144
149
|
|
|
145
150
|
**If Flutter:**
|
|
151
|
+
|
|
146
152
|
```dart
|
|
147
153
|
// 1. Dart SDK
|
|
148
154
|
import 'dart:async';
|
|
@@ -159,18 +165,19 @@ import 'package:myapp/services/auth_service.dart';
|
|
|
159
165
|
**Your answer:**
|
|
160
166
|
|
|
161
167
|
**Import alias for src/?**
|
|
168
|
+
|
|
162
169
|
- `@/` (React Native)
|
|
163
170
|
- `~/` (Alternative)
|
|
164
171
|
- No alias (relative paths only)
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
172
|
+
---
|
|
168
173
|
### Question 5.5: TypeScript/Dart Strictness
|
|
169
174
|
|
|
170
175
|
**How strict should TypeScript/Dart be?**
|
|
171
176
|
|
|
172
177
|
**If React Native (TypeScript):**
|
|
178
|
+
|
|
173
179
|
- A) ⭐ **Strict mode** (Recommended)
|
|
180
|
+
|
|
174
181
|
```json
|
|
175
182
|
{
|
|
176
183
|
"strict": true,
|
|
@@ -182,6 +189,7 @@ import 'package:myapp/services/auth_service.dart';
|
|
|
182
189
|
- C) **Lenient**
|
|
183
190
|
|
|
184
191
|
**If Flutter (Dart):**
|
|
192
|
+
|
|
185
193
|
- A) ⭐ **Strict analysis** (Recommended)
|
|
186
194
|
```yaml
|
|
187
195
|
analyzer:
|
|
@@ -192,44 +200,43 @@ import 'package:myapp/services/auth_service.dart';
|
|
|
192
200
|
**Your answer:**
|
|
193
201
|
|
|
194
202
|
**`any` type policy (TypeScript):**
|
|
203
|
+
|
|
195
204
|
- A) ❌ Never allow `any`
|
|
196
205
|
- B) ⚠️ Allow with warning
|
|
197
206
|
- C) ✅ Allow freely (not recommended)
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
207
|
+
---
|
|
201
208
|
### Question 5.6: Code Comments
|
|
202
209
|
|
|
203
210
|
**What's your commenting policy?**
|
|
204
211
|
|
|
205
212
|
A) ⭐ **JSDoc for public APIs, inline for complex logic** (Recommended)
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
/**
|
|
216
|
+
* Fetches user data from the API
|
|
217
|
+
* @param userId - The user's unique identifier
|
|
218
|
+
* @returns User object or null if not found
|
|
219
|
+
*/
|
|
220
|
+
export async function fetchUser(userId: string): Promise<User | null> {
|
|
221
|
+
// Check cache first
|
|
222
|
+
const cached = cache.get(userId);
|
|
223
|
+
if (cached) return cached;
|
|
224
|
+
return api.get(`/users/${userId}`);
|
|
225
|
+
}
|
|
226
|
+
```
|
|
219
227
|
|
|
220
228
|
B) **JSDoc everywhere**
|
|
221
229
|
C) **Minimal comments**
|
|
222
230
|
D) **No comment policy**
|
|
223
231
|
|
|
224
232
|
**Your answer:**
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
233
|
+
---
|
|
228
234
|
### Question 5.7: Component/Screen Structure
|
|
229
235
|
|
|
230
236
|
**How will you structure components and screens?**
|
|
231
237
|
|
|
232
238
|
**If React Native:**
|
|
239
|
+
|
|
233
240
|
```
|
|
234
241
|
screens/
|
|
235
242
|
├── HomeScreen/
|
|
@@ -240,6 +247,7 @@ screens/
|
|
|
240
247
|
```
|
|
241
248
|
|
|
242
249
|
**If Flutter:**
|
|
250
|
+
|
|
243
251
|
```
|
|
244
252
|
lib/
|
|
245
253
|
├── screens/
|
|
@@ -248,35 +256,35 @@ lib/
|
|
|
248
256
|
```
|
|
249
257
|
|
|
250
258
|
**Your answer:**
|
|
251
|
-
|
|
252
|
-
---
|
|
253
|
-
|
|
259
|
+
---
|
|
254
260
|
### Question 5.8: Error Handling Patterns
|
|
255
261
|
|
|
256
262
|
**How will you handle errors?**
|
|
257
263
|
|
|
258
264
|
**If React Native:**
|
|
265
|
+
|
|
259
266
|
- A) ⭐ **Error Boundaries + Try-Catch**
|
|
260
267
|
- Error Boundaries for render errors
|
|
261
268
|
- Try-Catch for async errors
|
|
262
269
|
|
|
263
270
|
**If Flutter:**
|
|
271
|
+
|
|
264
272
|
- A) ⭐ **Try-Catch + Global Error Handler**
|
|
265
273
|
- FlutterError.onError for global errors
|
|
266
274
|
|
|
267
275
|
**If Native:**
|
|
276
|
+
|
|
268
277
|
- A) ⭐ **Try-Catch + Crash Reporting**
|
|
269
278
|
- Sentry, Firebase Crashlytics
|
|
270
279
|
|
|
271
280
|
**Your answer:**
|
|
272
281
|
|
|
273
282
|
**Error logging:**
|
|
283
|
+
|
|
274
284
|
- Firebase Crashlytics
|
|
275
285
|
- Sentry
|
|
276
286
|
- Console only (development)
|
|
277
|
-
|
|
278
|
-
---
|
|
279
|
-
|
|
287
|
+
---
|
|
280
288
|
### Question 5.9: Mobile-Specific Best Practices
|
|
281
289
|
|
|
282
290
|
**What mobile-specific practices will you enforce?**
|
|
@@ -295,23 +303,23 @@ Select all that apply:
|
|
|
295
303
|
- [ ] **Push Notifications:** Handle notification taps
|
|
296
304
|
|
|
297
305
|
**Your answer:**
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
306
|
+
---
|
|
301
307
|
### Question 5.10: Commit Message Convention
|
|
302
308
|
|
|
303
309
|
**What commit message format will you use?**
|
|
304
310
|
|
|
305
311
|
A) ⭐ **Conventional Commits** (Recommended)
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
<type>(<scope>): <subject>
|
|
315
|
+
|
|
316
|
+
<body>
|
|
317
|
+
|
|
318
|
+
<footer>
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
- Types: feat, fix, docs, style, refactor, test, chore
|
|
322
|
+
- Example: `feat(auth): add biometric login`
|
|
315
323
|
|
|
316
324
|
B) **Simple descriptive**
|
|
317
325
|
C) **No convention**
|
|
@@ -319,21 +327,19 @@ C) **No convention**
|
|
|
319
327
|
**Your answer:**
|
|
320
328
|
|
|
321
329
|
**Enforce with:**
|
|
330
|
+
|
|
322
331
|
- commitlint (pre-commit hook)
|
|
323
332
|
- Manual review
|
|
324
333
|
- No enforcement
|
|
325
|
-
|
|
326
|
-
---
|
|
327
|
-
|
|
334
|
+
---
|
|
328
335
|
## ✅ Phase 5 Completion
|
|
329
336
|
|
|
330
337
|
After answering all questions, summarize:
|
|
331
338
|
|
|
332
339
|
```
|
|
333
|
-
|
|
340
|
+
---
|
|
334
341
|
✅ Phase 5 Complete: Code Standards
|
|
335
|
-
|
|
336
|
-
|
|
342
|
+
---
|
|
337
343
|
Selected Standards:
|
|
338
344
|
- File Naming: PascalCase for components
|
|
339
345
|
- Linting: ESLint + Prettier
|
|
@@ -344,24 +350,18 @@ Selected Standards:
|
|
|
344
350
|
|
|
345
351
|
Proceed to Phase 6 (Testing Strategy)? (Y/n)
|
|
346
352
|
```
|
|
347
|
-
|
|
348
|
-
---
|
|
349
|
-
|
|
353
|
+
---
|
|
350
354
|
## 📝 Generated Documents
|
|
351
355
|
|
|
352
356
|
After Phase 5, generate/update:
|
|
353
357
|
|
|
354
358
|
- `docs/code-standards.md` - Code standards and conventions
|
|
355
359
|
- `ai-instructions.md` - Add code standards rules
|
|
356
|
-
|
|
357
|
-
---
|
|
358
|
-
|
|
360
|
+
---
|
|
359
361
|
**Next Phase:** Phase 6 - Testing Strategy
|
|
360
362
|
|
|
361
363
|
Read: `.ai-flow/prompts/mobile/flow-build-phase-6-testing.md`
|
|
362
|
-
|
|
363
|
-
---
|
|
364
|
-
|
|
364
|
+
---
|
|
365
365
|
**Last Updated:** 2025-01-XX
|
|
366
366
|
|
|
367
367
|
**Version:** 1.4.0
|