proagents 1.6.18 → 1.6.20
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/settings.local.json +13 -1
- package/.proagents/.cursorrules +25 -10
- package/.proagents/.windsurfrules +25 -10
- package/.proagents/AGENTS.md +32 -11
- package/.proagents/AI_INSTRUCTIONS.md +99 -30
- package/.proagents/BOLT.md +27 -10
- package/.proagents/CLAUDE.md +27 -10
- package/.proagents/GEMINI.md +27 -10
- package/.proagents/KIRO.md +27 -10
- package/.proagents/LOVABLE.md +27 -10
- package/.proagents/PROAGENTS.md +96 -341
- package/.proagents/REPLIT.md +27 -10
- package/.proagents/activity.log +1 -0
- package/.proagents/platforms.yaml +66 -0
- package/.proagents/prompts/00-project-setup.md +878 -0
- package/.proagents/prompts/04-planning.md +38 -0
- package/.proagents/prompts/12-rnd.md +957 -0
- package/.proagents/prompts/ai-add.md +80 -0
- package/.proagents/prompts/ai-list.md +41 -0
- package/.proagents/prompts/ai-remove.md +112 -0
- package/.proagents/prompts/ai-sync.md +96 -0
- package/.proagents/workflow-modes/entry-modes.md +27 -0
- package/.proagents/worklog/_context.template.md +47 -0
- package/COMMANDS.md +59 -0
- package/README.md +3 -1
- package/lib/commands/ai.js +100 -48
- package/lib/commands/init.js +32 -14
- package/package.json +1 -1
- package/.proagents/ANTIGRAVITY.md +0 -59
- package/.proagents/CHATGPT.md +0 -55
- package/.proagents/GROQ.md +0 -55
|
@@ -0,0 +1,878 @@
|
|
|
1
|
+
# Phase 0: Project Setup Wizard
|
|
2
|
+
|
|
3
|
+
Interactive project setup guide with AI-powered recommendations, quick presets, and full automation.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Trigger
|
|
8
|
+
|
|
9
|
+
User runs `pa:project-setup` or `pa:setup`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
This command helps set up projects through a dynamic questionnaire with:
|
|
16
|
+
- **Quick Presets** - Instant setup for common project types
|
|
17
|
+
- **Idea-First Mode** - Describe your idea, AI suggests tech stack
|
|
18
|
+
- **Comparison Tables** - Side-by-side option comparison
|
|
19
|
+
- **Full Automation** - Install packages, create structure, generate docs
|
|
20
|
+
|
|
21
|
+
Works for both **new projects** and **existing projects**.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Entry Point
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
🚀 Project Setup Wizard
|
|
29
|
+
|
|
30
|
+
How would you like to start?
|
|
31
|
+
|
|
32
|
+
1. ⚡ Quick Preset - Instant setup, no questions
|
|
33
|
+
2. 💡 I have an idea - help me choose tech stack
|
|
34
|
+
3. 🔧 New project - I know what I want
|
|
35
|
+
4. 📂 Existing project - already has code
|
|
36
|
+
5. 🔍 Unknown - analyze my codebase first
|
|
37
|
+
|
|
38
|
+
Select (1-5):
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Option 1: Quick Presets
|
|
44
|
+
|
|
45
|
+
Pre-defined setups for common project types. Skip all questions, instant setup.
|
|
46
|
+
|
|
47
|
+
### Show Presets
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
⚡ Quick Presets - Choose your stack:
|
|
51
|
+
|
|
52
|
+
════════════════════════════════════════════════════
|
|
53
|
+
MOBILE APPS
|
|
54
|
+
════════════════════════════════════════════════════
|
|
55
|
+
1. 📱 Mobile MVP (React Native + Expo + Firebase)
|
|
56
|
+
Auth, Database, Push notifications, Analytics
|
|
57
|
+
|
|
58
|
+
2. 📱 Mobile Pro (React Native + Node.js + PostgreSQL)
|
|
59
|
+
Full backend control, Custom API, Scalable
|
|
60
|
+
|
|
61
|
+
3. 📱 Flutter Starter (Flutter + Supabase)
|
|
62
|
+
Beautiful UI, Open-source backend
|
|
63
|
+
|
|
64
|
+
════════════════════════════════════════════════════
|
|
65
|
+
WEB APPS
|
|
66
|
+
════════════════════════════════════════════════════
|
|
67
|
+
4. 🌐 SaaS Starter (Next.js + Prisma + PostgreSQL)
|
|
68
|
+
Auth, Payments, Dashboard, API routes
|
|
69
|
+
|
|
70
|
+
5. 🌐 E-commerce (Next.js + Shopify/Stripe)
|
|
71
|
+
Product catalog, Cart, Checkout, Payments
|
|
72
|
+
|
|
73
|
+
6. 🌐 Landing Page (Next.js + Tailwind + Vercel)
|
|
74
|
+
Fast, SEO optimized, Easy deployment
|
|
75
|
+
|
|
76
|
+
════════════════════════════════════════════════════
|
|
77
|
+
BACKEND/API
|
|
78
|
+
════════════════════════════════════════════════════
|
|
79
|
+
7. 🔌 REST API (Node.js + Express + PostgreSQL)
|
|
80
|
+
CRUD, Auth, Validation, Tests
|
|
81
|
+
|
|
82
|
+
8. 🔌 GraphQL API (Node.js + Apollo + PostgreSQL)
|
|
83
|
+
Type-safe, Subscriptions, Playground
|
|
84
|
+
|
|
85
|
+
════════════════════════════════════════════════════
|
|
86
|
+
|
|
87
|
+
Select preset (1-8) or type "back" for other options:
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Preset Details
|
|
91
|
+
|
|
92
|
+
After user selects, show what will be installed:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
📱 Mobile MVP Preset Selected!
|
|
96
|
+
|
|
97
|
+
This will set up:
|
|
98
|
+
─────────────────────────────────────
|
|
99
|
+
Framework: React Native (Expo)
|
|
100
|
+
Language: TypeScript
|
|
101
|
+
Navigation: React Navigation
|
|
102
|
+
State: Zustand
|
|
103
|
+
Data: TanStack Query
|
|
104
|
+
UI: NativeWind (Tailwind)
|
|
105
|
+
Backend: Firebase
|
|
106
|
+
Services: Auth, Firestore, Storage, FCM, Analytics
|
|
107
|
+
Testing: Jest + Testing Library
|
|
108
|
+
─────────────────────────────────────
|
|
109
|
+
|
|
110
|
+
📦 Packages to install: 15
|
|
111
|
+
📂 Folders to create: 8
|
|
112
|
+
📄 Config files: 6
|
|
113
|
+
|
|
114
|
+
Proceed with setup? (yes/no/customize)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Preset Configurations
|
|
118
|
+
|
|
119
|
+
**Preset 1: Mobile MVP**
|
|
120
|
+
```yaml
|
|
121
|
+
type: mobile
|
|
122
|
+
framework: expo
|
|
123
|
+
language: typescript
|
|
124
|
+
packages:
|
|
125
|
+
- @react-navigation/native
|
|
126
|
+
- @react-navigation/stack
|
|
127
|
+
- zustand
|
|
128
|
+
- @tanstack/react-query
|
|
129
|
+
- nativewind
|
|
130
|
+
- tailwindcss
|
|
131
|
+
- @react-native-firebase/app
|
|
132
|
+
- @react-native-firebase/auth
|
|
133
|
+
- @react-native-firebase/firestore
|
|
134
|
+
- @react-native-firebase/storage
|
|
135
|
+
- @react-native-firebase/messaging
|
|
136
|
+
- @react-native-firebase/analytics
|
|
137
|
+
folders:
|
|
138
|
+
- src/screens
|
|
139
|
+
- src/components
|
|
140
|
+
- src/navigation
|
|
141
|
+
- src/hooks
|
|
142
|
+
- src/services
|
|
143
|
+
- src/stores
|
|
144
|
+
- src/utils
|
|
145
|
+
- src/types
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Preset 2: Mobile Pro**
|
|
149
|
+
```yaml
|
|
150
|
+
type: mobile
|
|
151
|
+
framework: expo
|
|
152
|
+
language: typescript
|
|
153
|
+
packages:
|
|
154
|
+
- @react-navigation/native
|
|
155
|
+
- @react-navigation/stack
|
|
156
|
+
- zustand
|
|
157
|
+
- @tanstack/react-query
|
|
158
|
+
- nativewind
|
|
159
|
+
- axios
|
|
160
|
+
backend:
|
|
161
|
+
- express
|
|
162
|
+
- prisma
|
|
163
|
+
- @prisma/client
|
|
164
|
+
- jsonwebtoken
|
|
165
|
+
- bcrypt
|
|
166
|
+
database: postgresql
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Preset 3: Flutter Starter**
|
|
170
|
+
```yaml
|
|
171
|
+
type: mobile
|
|
172
|
+
framework: flutter
|
|
173
|
+
language: dart
|
|
174
|
+
packages:
|
|
175
|
+
- supabase_flutter
|
|
176
|
+
- flutter_riverpod
|
|
177
|
+
- go_router
|
|
178
|
+
- dio
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Preset 4: SaaS Starter**
|
|
182
|
+
```yaml
|
|
183
|
+
type: fullstack
|
|
184
|
+
framework: nextjs
|
|
185
|
+
language: typescript
|
|
186
|
+
packages:
|
|
187
|
+
- next-auth
|
|
188
|
+
- prisma
|
|
189
|
+
- @prisma/client
|
|
190
|
+
- stripe
|
|
191
|
+
- tailwindcss
|
|
192
|
+
- zustand
|
|
193
|
+
- @tanstack/react-query
|
|
194
|
+
database: postgresql
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Preset 5: E-commerce**
|
|
198
|
+
```yaml
|
|
199
|
+
type: fullstack
|
|
200
|
+
framework: nextjs
|
|
201
|
+
language: typescript
|
|
202
|
+
packages:
|
|
203
|
+
- @shopify/hydrogen (or stripe)
|
|
204
|
+
- tailwindcss
|
|
205
|
+
- zustand
|
|
206
|
+
- swr
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**Preset 6: Landing Page**
|
|
210
|
+
```yaml
|
|
211
|
+
type: web
|
|
212
|
+
framework: nextjs
|
|
213
|
+
language: typescript
|
|
214
|
+
packages:
|
|
215
|
+
- tailwindcss
|
|
216
|
+
- framer-motion
|
|
217
|
+
- next-seo
|
|
218
|
+
deployment: vercel
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Preset 7: REST API**
|
|
222
|
+
```yaml
|
|
223
|
+
type: backend
|
|
224
|
+
framework: express
|
|
225
|
+
language: typescript
|
|
226
|
+
packages:
|
|
227
|
+
- express
|
|
228
|
+
- prisma
|
|
229
|
+
- @prisma/client
|
|
230
|
+
- jsonwebtoken
|
|
231
|
+
- bcrypt
|
|
232
|
+
- zod
|
|
233
|
+
- helmet
|
|
234
|
+
- cors
|
|
235
|
+
- jest
|
|
236
|
+
- supertest
|
|
237
|
+
database: postgresql
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Preset 8: GraphQL API**
|
|
241
|
+
```yaml
|
|
242
|
+
type: backend
|
|
243
|
+
framework: apollo-server
|
|
244
|
+
language: typescript
|
|
245
|
+
packages:
|
|
246
|
+
- @apollo/server
|
|
247
|
+
- graphql
|
|
248
|
+
- prisma
|
|
249
|
+
- @prisma/client
|
|
250
|
+
- type-graphql
|
|
251
|
+
database: postgresql
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Option 2: Idea-First Flow
|
|
257
|
+
|
|
258
|
+
User describes their idea, AI suggests tech stack options.
|
|
259
|
+
|
|
260
|
+
### Step 1: Gather Idea
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
💡 Tell me about your idea:
|
|
264
|
+
|
|
265
|
+
- What are you building?
|
|
266
|
+
- What problem does it solve?
|
|
267
|
+
- Who are the users?
|
|
268
|
+
|
|
269
|
+
Just describe it naturally, I'll ask follow-up questions.
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Step 2: Clarifying Questions
|
|
273
|
+
|
|
274
|
+
Ask 3-5 clarifying questions based on the idea:
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
Interesting! Let me understand better:
|
|
278
|
+
|
|
279
|
+
Q: Who are the target users?
|
|
280
|
+
1. Single user type (e.g., customers)
|
|
281
|
+
2. Two user types (e.g., buyers + sellers)
|
|
282
|
+
3. Multiple user types (e.g., customers + vendors + admins)
|
|
283
|
+
|
|
284
|
+
Q: Expected scale in first 6 months?
|
|
285
|
+
1. Small (<1000 users)
|
|
286
|
+
2. Medium (1-10K users)
|
|
287
|
+
3. Large (10K+ users)
|
|
288
|
+
|
|
289
|
+
Q: Key features needed?
|
|
290
|
+
[ ] User authentication
|
|
291
|
+
[ ] Real-time updates
|
|
292
|
+
[ ] Payment processing
|
|
293
|
+
[ ] Push notifications
|
|
294
|
+
[ ] File uploads
|
|
295
|
+
[ ] Chat/messaging
|
|
296
|
+
[ ] Maps/location
|
|
297
|
+
[ ] Offline support
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Step 3: Show Comparison Table
|
|
301
|
+
|
|
302
|
+
After gathering requirements, show comparison of 2-3 options:
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
📊 Based on your requirements, here are my recommendations:
|
|
306
|
+
|
|
307
|
+
┌─────────────────┬────────────────────┬────────────────────┬────────────────────┐
|
|
308
|
+
│ │ OPTION 1 ⭐ │ OPTION 2 │ OPTION 3 │
|
|
309
|
+
│ │ [Stack 1] │ [Stack 2] │ [Stack 3] │
|
|
310
|
+
├─────────────────┼────────────────────┼────────────────────┼────────────────────┤
|
|
311
|
+
│ Best for │ [Use case] │ [Use case] │ [Use case] │
|
|
312
|
+
├─────────────────┼────────────────────┼────────────────────┼────────────────────┤
|
|
313
|
+
│ Time to launch │ [X months] │ [X months] │ [X months] │
|
|
314
|
+
├─────────────────┼────────────────────┼────────────────────┼────────────────────┤
|
|
315
|
+
│ Learning curve │ [Low/Med/High] │ [Low/Med/High] │ [Low/Med/High] │
|
|
316
|
+
├─────────────────┼────────────────────┼────────────────────┼────────────────────┤
|
|
317
|
+
│ Scalability │ [Low/Med/High] │ [Low/Med/High] │ [Low/Med/High] │
|
|
318
|
+
├─────────────────┼────────────────────┼────────────────────┼────────────────────┤
|
|
319
|
+
│ Monthly cost │ $[X]-[Y] │ $[X]-[Y] │ $[X]-[Y] │
|
|
320
|
+
├─────────────────┼────────────────────┼────────────────────┼────────────────────┤
|
|
321
|
+
│ [Feature 1] │ ✅/⚠️/❌ │ ✅/⚠️/❌ │ ✅/⚠️/❌ │
|
|
322
|
+
├─────────────────┼────────────────────┼────────────────────┼────────────────────┤
|
|
323
|
+
│ [Feature 2] │ ✅/⚠️/❌ │ ✅/⚠️/❌ │ ✅/⚠️/❌ │
|
|
324
|
+
└─────────────────┴────────────────────┴────────────────────┴────────────────────┘
|
|
325
|
+
|
|
326
|
+
Legend: ✅ Built-in ⚠️ Requires setup ❌ Not available
|
|
327
|
+
|
|
328
|
+
💡 My recommendation: OPTION [X]
|
|
329
|
+
|
|
330
|
+
Why? [Explanation based on user's specific requirements]
|
|
331
|
+
|
|
332
|
+
Which option? (1/2/3) or type "more [option]" for details:
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Step 4: Continue to Setup
|
|
336
|
+
|
|
337
|
+
After user picks option, continue with detailed setup questions if needed, then execute automation.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Option 3: Direct Setup Flow
|
|
342
|
+
|
|
343
|
+
User knows what they want. Guide through structured questions.
|
|
344
|
+
|
|
345
|
+
### Step 1: Project Type
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
What type of project are you building?
|
|
349
|
+
|
|
350
|
+
1. Web Frontend - SPA, PWA, static sites
|
|
351
|
+
2. Full-stack - Frontend + Backend
|
|
352
|
+
3. Mobile - iOS, Android, cross-platform
|
|
353
|
+
4. Desktop - Windows, macOS, Linux apps
|
|
354
|
+
5. Backend/API - REST, GraphQL, microservices
|
|
355
|
+
6. CLI Tool - Command-line applications
|
|
356
|
+
7. Library/Package - Reusable packages
|
|
357
|
+
8. Monorepo - Multiple related projects
|
|
358
|
+
9. Other (describe)
|
|
359
|
+
|
|
360
|
+
💡 Suggestion: For user-facing apps with data, Full-stack (2)
|
|
361
|
+
gives you the best developer experience.
|
|
362
|
+
|
|
363
|
+
Select (1-9):
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### Step 2: Framework (based on type)
|
|
367
|
+
|
|
368
|
+
Show 2-3 options with pros/cons and recommendation:
|
|
369
|
+
|
|
370
|
+
**For Mobile:**
|
|
371
|
+
```
|
|
372
|
+
Which mobile framework?
|
|
373
|
+
|
|
374
|
+
1. React Native (Expo) ⭐ Recommended
|
|
375
|
+
✓ Pros: Quick setup, OTA updates, large ecosystem
|
|
376
|
+
✗ Cons: Limited native access (can eject later)
|
|
377
|
+
|
|
378
|
+
2. React Native (Bare)
|
|
379
|
+
✓ Pros: Full native access, custom modules
|
|
380
|
+
✗ Cons: More complex setup, manual linking
|
|
381
|
+
|
|
382
|
+
3. Flutter
|
|
383
|
+
✓ Pros: Excellent performance, beautiful UI
|
|
384
|
+
✗ Cons: Dart language, smaller ecosystem
|
|
385
|
+
|
|
386
|
+
💡 Suggestion: Expo for faster development. You can eject later.
|
|
387
|
+
|
|
388
|
+
Select (1-3) or type "more" for detailed comparison:
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
**For Full-stack:**
|
|
392
|
+
```
|
|
393
|
+
Which full-stack framework?
|
|
394
|
+
|
|
395
|
+
1. Next.js (React) ⭐ Recommended
|
|
396
|
+
✓ Pros: SSR/SSG, API routes, great DX, Vercel deployment
|
|
397
|
+
✗ Cons: React-specific
|
|
398
|
+
|
|
399
|
+
2. Nuxt (Vue)
|
|
400
|
+
✓ Pros: SSR/SSG, auto-imports, Vue ecosystem
|
|
401
|
+
✗ Cons: Smaller community than React
|
|
402
|
+
|
|
403
|
+
3. SvelteKit
|
|
404
|
+
✓ Pros: Minimal boilerplate, fast, great DX
|
|
405
|
+
✗ Cons: Newer, smaller ecosystem
|
|
406
|
+
|
|
407
|
+
Select (1-3):
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Step 3: Additional Tools
|
|
411
|
+
|
|
412
|
+
```
|
|
413
|
+
📦 Based on [Framework], I recommend:
|
|
414
|
+
|
|
415
|
+
Navigation: [Tool] ⭐
|
|
416
|
+
State: [Tool] (or [Alternative])
|
|
417
|
+
Data: [Tool] ⭐
|
|
418
|
+
UI: [Tool] ⭐
|
|
419
|
+
Testing: [Tool]
|
|
420
|
+
|
|
421
|
+
Want me to add these? (yes/no/customize)
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### Step 4: Backend/Database
|
|
425
|
+
|
|
426
|
+
```
|
|
427
|
+
Backend/API type?
|
|
428
|
+
|
|
429
|
+
1. BaaS (Firebase/Supabase) ⭐ Fast setup
|
|
430
|
+
2. Custom backend (Node.js/Python)
|
|
431
|
+
3. Existing API (I have one)
|
|
432
|
+
4. No backend needed
|
|
433
|
+
|
|
434
|
+
💡 Suggestion: For MVP, Firebase/Supabase gets you to market faster.
|
|
435
|
+
|
|
436
|
+
Select (1-4):
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Step 5: Environment Variables
|
|
440
|
+
|
|
441
|
+
```
|
|
442
|
+
Environment variables needed?
|
|
443
|
+
|
|
444
|
+
Based on your choices, you'll need:
|
|
445
|
+
- [VAR_1] - [description]
|
|
446
|
+
- [VAR_2] - [description]
|
|
447
|
+
|
|
448
|
+
Add any custom env vars? (list them or "none"):
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
---
|
|
452
|
+
|
|
453
|
+
## Option 4: Existing Project Flow
|
|
454
|
+
|
|
455
|
+
Analyze existing codebase and suggest improvements.
|
|
456
|
+
|
|
457
|
+
### Step 1: Analyze
|
|
458
|
+
|
|
459
|
+
```
|
|
460
|
+
📂 Analyzing your project...
|
|
461
|
+
|
|
462
|
+
Detected:
|
|
463
|
+
─────────────────────────
|
|
464
|
+
Project Type: React Native (Mobile)
|
|
465
|
+
Framework: Expo
|
|
466
|
+
Language: TypeScript
|
|
467
|
+
Package Manager: npm
|
|
468
|
+
Database: Firebase
|
|
469
|
+
─────────────────────────
|
|
470
|
+
|
|
471
|
+
Is this correct? (yes/no/partially):
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### Step 2: Validate & Improve
|
|
475
|
+
|
|
476
|
+
```
|
|
477
|
+
✅ Analysis complete!
|
|
478
|
+
|
|
479
|
+
Current setup:
|
|
480
|
+
- Framework: Expo ✓
|
|
481
|
+
- Navigation: React Navigation ✓
|
|
482
|
+
- State: None detected ⚠️
|
|
483
|
+
- API/Data: Direct fetch calls ⚠️
|
|
484
|
+
- UI: StyleSheet (no library) ⚠️
|
|
485
|
+
- Testing: Jest (no component tests) ⚠️
|
|
486
|
+
|
|
487
|
+
💡 Suggested improvements:
|
|
488
|
+
|
|
489
|
+
1. Add Zustand for state management
|
|
490
|
+
Why: Simple, minimal boilerplate, great for RN
|
|
491
|
+
|
|
492
|
+
2. Add TanStack Query for data fetching
|
|
493
|
+
Why: Caching, refetching, loading states
|
|
494
|
+
|
|
495
|
+
3. Add NativeWind for styling
|
|
496
|
+
Why: Tailwind for RN, faster development
|
|
497
|
+
|
|
498
|
+
4. Add @testing-library/react-native
|
|
499
|
+
Why: Better component testing
|
|
500
|
+
|
|
501
|
+
Would you like me to add these? (yes/no/customize):
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### Step 3: Generate Documentation
|
|
505
|
+
|
|
506
|
+
```
|
|
507
|
+
📄 Generating documentation:
|
|
508
|
+
|
|
509
|
+
✓ docs/PROJECT_SETUP.md - Complete setup guide
|
|
510
|
+
✓ docs/ONBOARDING.md - Developer onboarding
|
|
511
|
+
✓ .env.example - Updated with all env vars
|
|
512
|
+
|
|
513
|
+
Files created in docs/ folder.
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
---
|
|
517
|
+
|
|
518
|
+
## Full Automation
|
|
519
|
+
|
|
520
|
+
After collecting all answers, execute automatically **in the current folder**.
|
|
521
|
+
|
|
522
|
+
> **Important:** All setup happens in the current folder (`.`), not in a subfolder.
|
|
523
|
+
> This ensures ProAgents configuration remains accessible.
|
|
524
|
+
|
|
525
|
+
```
|
|
526
|
+
🚀 Starting automated setup in current folder...
|
|
527
|
+
|
|
528
|
+
Phase 1: Project Initialization
|
|
529
|
+
─────────────────────────
|
|
530
|
+
$ [create command with . or --cwd flag]
|
|
531
|
+
✓ Project initialized in current folder
|
|
532
|
+
|
|
533
|
+
$ git init (if not already initialized)
|
|
534
|
+
✓ Git initialized
|
|
535
|
+
|
|
536
|
+
Phase 2: Installing Packages
|
|
537
|
+
─────────────────────────
|
|
538
|
+
$ [install commands]
|
|
539
|
+
✓ [Package] installed
|
|
540
|
+
✓ [Package] installed
|
|
541
|
+
...
|
|
542
|
+
|
|
543
|
+
Phase 3: Creating Structure
|
|
544
|
+
─────────────────────────
|
|
545
|
+
✓ src/[folder]/
|
|
546
|
+
✓ src/[folder]/
|
|
547
|
+
...
|
|
548
|
+
|
|
549
|
+
Phase 4: Config Files
|
|
550
|
+
─────────────────────────
|
|
551
|
+
✓ [config file]
|
|
552
|
+
✓ [config file]
|
|
553
|
+
...
|
|
554
|
+
|
|
555
|
+
Phase 5: Boilerplate Files
|
|
556
|
+
─────────────────────────
|
|
557
|
+
✓ src/[file]
|
|
558
|
+
✓ src/[file]
|
|
559
|
+
...
|
|
560
|
+
|
|
561
|
+
Phase 6: Documentation
|
|
562
|
+
─────────────────────────
|
|
563
|
+
✓ docs/PROJECT_SETUP.md
|
|
564
|
+
✓ docs/ONBOARDING.md
|
|
565
|
+
✓ .env.example
|
|
566
|
+
|
|
567
|
+
════════════════════════════════════
|
|
568
|
+
✅ SETUP COMPLETE!
|
|
569
|
+
════════════════════════════════════
|
|
570
|
+
|
|
571
|
+
📁 Project: ./ (current folder)
|
|
572
|
+
📦 Packages: [X] installed
|
|
573
|
+
📂 Folders: [X] created
|
|
574
|
+
📄 Files: [X] generated
|
|
575
|
+
|
|
576
|
+
🎯 Next steps:
|
|
577
|
+
1. Copy .env.example to .env
|
|
578
|
+
2. Add your config values
|
|
579
|
+
3. Run: [start command]
|
|
580
|
+
4. Start building: pa:feature "[First feature]"
|
|
581
|
+
|
|
582
|
+
Want more suggestions? Type "more [topic]"
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
---
|
|
586
|
+
|
|
587
|
+
## AI Behavior Rules
|
|
588
|
+
|
|
589
|
+
1. **Always use current folder** - Never create subfolders for new projects. Use `.` or `--cwd` flags (e.g., `npx create-next-app .` not `npx create-next-app my-app`)
|
|
590
|
+
2. **Merge existing files** - If docs/PROJECT_SETUP.md or docs/ONBOARDING.md exists, merge new content (update sections, preserve custom content, never delete)
|
|
591
|
+
3. **Ask ONE question at a time** (unless user prefers batch)
|
|
592
|
+
4. **Always show recommendations** with ⭐ marker
|
|
593
|
+
5. **Always explain WHY** you recommend something
|
|
594
|
+
6. **Show comparison tables** when presenting 2-3 options
|
|
595
|
+
7. **Provide "more" option** for deeper explanations
|
|
596
|
+
8. **Allow customization** at every step
|
|
597
|
+
9. **Confirm before automation** - show what will be installed/created
|
|
598
|
+
10. **Save progress** - Auto-save to `.proagents/setup-progress.json` after each step, offer resume on next run
|
|
599
|
+
11. **Log all actions** to activity.log
|
|
600
|
+
|
|
601
|
+
---
|
|
602
|
+
|
|
603
|
+
## Commands Reference
|
|
604
|
+
|
|
605
|
+
| Command | Description |
|
|
606
|
+
|---------|-------------|
|
|
607
|
+
| `pa:project-setup` | Full interactive wizard |
|
|
608
|
+
| `pa:setup` | Alias for pa:project-setup |
|
|
609
|
+
| `pa:setup --preset [name]` | Use specific preset (mobile-mvp, saas, etc.) |
|
|
610
|
+
| `pa:setup --quick` | Minimal questions only |
|
|
611
|
+
| `pa:setup --analyze` | Analyze existing project only |
|
|
612
|
+
| `pa:setup --resume` | Resume interrupted setup |
|
|
613
|
+
| `pa:setup --clear-progress` | Clear saved progress and start fresh |
|
|
614
|
+
|
|
615
|
+
---
|
|
616
|
+
|
|
617
|
+
## Resume Interrupted Setup
|
|
618
|
+
|
|
619
|
+
If user exits midway, progress is automatically saved. Next time they run `pa:setup`, offer to resume.
|
|
620
|
+
|
|
621
|
+
### Progress File
|
|
622
|
+
|
|
623
|
+
Saved to: `.proagents/setup-progress.json`
|
|
624
|
+
|
|
625
|
+
```json
|
|
626
|
+
{
|
|
627
|
+
"started_at": "2024-01-15T10:30:00Z",
|
|
628
|
+
"last_updated": "2024-01-15T10:35:00Z",
|
|
629
|
+
"completed_steps": 4,
|
|
630
|
+
"total_steps": 8,
|
|
631
|
+
"answers": {
|
|
632
|
+
"project_type": "mobile",
|
|
633
|
+
"framework": "expo",
|
|
634
|
+
"language": "typescript",
|
|
635
|
+
"backend": "firebase"
|
|
636
|
+
},
|
|
637
|
+
"pending_questions": ["services", "env_vars", "folder_structure"],
|
|
638
|
+
"packages_installed": ["@react-navigation/native", "zustand"],
|
|
639
|
+
"folders_created": ["src/screens", "src/components"],
|
|
640
|
+
"phase": "collecting_answers"
|
|
641
|
+
}
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
### Resume Prompt
|
|
645
|
+
|
|
646
|
+
```
|
|
647
|
+
📋 Previous setup found!
|
|
648
|
+
|
|
649
|
+
Started: 2 hours ago
|
|
650
|
+
Progress: ████████░░░░ 50% (4/8 steps)
|
|
651
|
+
|
|
652
|
+
Choices so far:
|
|
653
|
+
- Type: Mobile (React Native)
|
|
654
|
+
- Framework: Expo
|
|
655
|
+
- Language: TypeScript
|
|
656
|
+
- Backend: Firebase
|
|
657
|
+
|
|
658
|
+
Options:
|
|
659
|
+
1. Resume from where you left off
|
|
660
|
+
2. Start fresh (discard progress)
|
|
661
|
+
3. View saved answers
|
|
662
|
+
|
|
663
|
+
Select (1-3):
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
### Auto-Save Triggers
|
|
667
|
+
|
|
668
|
+
Progress is saved automatically:
|
|
669
|
+
- After each question is answered
|
|
670
|
+
- After each package is installed
|
|
671
|
+
- After each folder is created
|
|
672
|
+
- Before any potentially failing operation
|
|
673
|
+
|
|
674
|
+
### Cleanup
|
|
675
|
+
|
|
676
|
+
Delete progress file after:
|
|
677
|
+
- Setup completes successfully
|
|
678
|
+
- User chooses "Start fresh"
|
|
679
|
+
- User runs `pa:setup --clear-progress`
|
|
680
|
+
|
|
681
|
+
---
|
|
682
|
+
|
|
683
|
+
## Output Files
|
|
684
|
+
|
|
685
|
+
### Handling Existing Files
|
|
686
|
+
|
|
687
|
+
If `docs/PROJECT_SETUP.md` or `docs/ONBOARDING.md` already exists, use **merge strategy**:
|
|
688
|
+
|
|
689
|
+
**Applies to both files:**
|
|
690
|
+
- `docs/PROJECT_SETUP.md` - Project configuration and setup guide
|
|
691
|
+
- `docs/ONBOARDING.md` - Developer onboarding guide
|
|
692
|
+
|
|
693
|
+
**Merge steps:**
|
|
694
|
+
|
|
695
|
+
1. **Read existing file** - Parse current content and sections
|
|
696
|
+
2. **Identify sections** - Match by headers (## Overview, ## Prerequisites, etc.)
|
|
697
|
+
3. **Merge rules:**
|
|
698
|
+
- **Update** existing sections with new values (e.g., new packages, new env vars)
|
|
699
|
+
- **Preserve** custom content user added (custom sections, notes, warnings)
|
|
700
|
+
- **Add** new sections that don't exist
|
|
701
|
+
- **Never delete** user's custom sections
|
|
702
|
+
4. **Mark updates** - Add `> Updated: [DATE]` after the header
|
|
703
|
+
|
|
704
|
+
**Example merge (PROJECT_SETUP.md):**
|
|
705
|
+
|
|
706
|
+
```markdown
|
|
707
|
+
## Environment Variables
|
|
708
|
+
|
|
709
|
+
> Updated: 2024-01-15
|
|
710
|
+
|
|
711
|
+
| Variable | Description | Required |
|
|
712
|
+
|----------|-------------|----------|
|
|
713
|
+
| API_KEY | Existing var (preserved) | Yes |
|
|
714
|
+
| NEW_VAR | Added by setup | Yes |
|
|
715
|
+
|
|
716
|
+
<!-- User's custom notes below are preserved -->
|
|
717
|
+
Note: Get API_KEY from admin dashboard.
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
**Example merge (ONBOARDING.md):**
|
|
721
|
+
|
|
722
|
+
```markdown
|
|
723
|
+
## Code Standards
|
|
724
|
+
|
|
725
|
+
> Updated: 2024-01-15
|
|
726
|
+
|
|
727
|
+
- ESLint + Prettier (existing - preserved)
|
|
728
|
+
- TypeScript strict mode (added by setup)
|
|
729
|
+
|
|
730
|
+
<!-- User's team-specific notes preserved -->
|
|
731
|
+
Ask @john for code review access.
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
**Merge indicators in logs:**
|
|
735
|
+
```
|
|
736
|
+
✓ docs/PROJECT_SETUP.md (merged - 2 sections updated, 1 added)
|
|
737
|
+
✓ docs/ONBOARDING.md (merged - 1 section updated)
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
---
|
|
741
|
+
|
|
742
|
+
### docs/PROJECT_SETUP.md
|
|
743
|
+
|
|
744
|
+
```markdown
|
|
745
|
+
# Project Setup Guide
|
|
746
|
+
|
|
747
|
+
> Generated by ProAgents `pa:project-setup`
|
|
748
|
+
> Last updated: [DATE]
|
|
749
|
+
|
|
750
|
+
## Overview
|
|
751
|
+
|
|
752
|
+
| Field | Value |
|
|
753
|
+
|-------|-------|
|
|
754
|
+
| Project Name | [name] |
|
|
755
|
+
| Type | [type] |
|
|
756
|
+
| Framework | [framework] |
|
|
757
|
+
| Language | [language] |
|
|
758
|
+
|
|
759
|
+
## Prerequisites
|
|
760
|
+
|
|
761
|
+
- [ ] [Prerequisite 1]
|
|
762
|
+
- [ ] [Prerequisite 2]
|
|
763
|
+
|
|
764
|
+
## Quick Start
|
|
765
|
+
|
|
766
|
+
[Installation commands]
|
|
767
|
+
|
|
768
|
+
## Environment Variables
|
|
769
|
+
|
|
770
|
+
| Variable | Description | Required |
|
|
771
|
+
|----------|-------------|----------|
|
|
772
|
+
| [VAR] | [desc] | Yes/No |
|
|
773
|
+
|
|
774
|
+
## Development Commands
|
|
775
|
+
|
|
776
|
+
| Command | Description |
|
|
777
|
+
|---------|-------------|
|
|
778
|
+
| [cmd] | [desc] |
|
|
779
|
+
|
|
780
|
+
## Project Structure
|
|
781
|
+
|
|
782
|
+
[Directory tree]
|
|
783
|
+
|
|
784
|
+
## Architecture
|
|
785
|
+
|
|
786
|
+
[High-level description]
|
|
787
|
+
|
|
788
|
+
## Deployment
|
|
789
|
+
|
|
790
|
+
[Deployment instructions]
|
|
791
|
+
```
|
|
792
|
+
|
|
793
|
+
### docs/ONBOARDING.md
|
|
794
|
+
|
|
795
|
+
```markdown
|
|
796
|
+
# Developer Onboarding Guide
|
|
797
|
+
|
|
798
|
+
> For new team members joining this project
|
|
799
|
+
|
|
800
|
+
## Getting Started
|
|
801
|
+
|
|
802
|
+
1. Clone the repository
|
|
803
|
+
2. Install dependencies
|
|
804
|
+
3. Set up environment
|
|
805
|
+
4. Run the project
|
|
806
|
+
|
|
807
|
+
## Code Standards
|
|
808
|
+
|
|
809
|
+
[Coding conventions]
|
|
810
|
+
|
|
811
|
+
## Architecture Overview
|
|
812
|
+
|
|
813
|
+
[System design]
|
|
814
|
+
|
|
815
|
+
## Common Tasks
|
|
816
|
+
|
|
817
|
+
[How to do X, Y, Z]
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
---
|
|
821
|
+
|
|
822
|
+
## Logging
|
|
823
|
+
|
|
824
|
+
After completion, log to `.proagents/activity.log`:
|
|
825
|
+
|
|
826
|
+
```
|
|
827
|
+
[DATE TIME] [AI:model] [pa:project-setup] Started project setup
|
|
828
|
+
[DATE TIME] [AI:model] [pa:project-setup] Selected preset: mobile-mvp
|
|
829
|
+
[DATE TIME] [AI:model] [pa:project-setup] Initialized project in current folder
|
|
830
|
+
[DATE TIME] [AI:model] [pa:project-setup] Installed 15 packages
|
|
831
|
+
[DATE TIME] [AI:model] [pa:project-setup] Created 8 folders
|
|
832
|
+
[DATE TIME] [AI:model] [pa:project-setup] Merged docs/PROJECT_SETUP.md (2 sections updated)
|
|
833
|
+
[DATE TIME] [AI:model] [pa:project-setup] Merged docs/ONBOARDING.md (1 section added)
|
|
834
|
+
[DATE TIME] [AI:model] [pa:project-setup] Setup complete
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
Update `.proagents/worklog/_context.md`:
|
|
838
|
+
|
|
839
|
+
```markdown
|
|
840
|
+
## Quick Summary
|
|
841
|
+
Last: [AI] ran project setup
|
|
842
|
+
Type: [project type]
|
|
843
|
+
Framework: [framework]
|
|
844
|
+
Output: docs/PROJECT_SETUP.md, docs/ONBOARDING.md
|
|
845
|
+
|
|
846
|
+
## Flow Context
|
|
847
|
+
```
|
|
848
|
+
Current Flow: project-setup
|
|
849
|
+
Last Command: pa:project-setup
|
|
850
|
+
Decision: [framework] + [backend] stack
|
|
851
|
+
Context: [project type] project initialized
|
|
852
|
+
Next Suggested: pa:feature "[first feature]"
|
|
853
|
+
Data: {"type": "[project type]", "framework": "[framework]", "backend": "[backend]", "packages": [...]}
|
|
854
|
+
```
|
|
855
|
+
```
|
|
856
|
+
|
|
857
|
+
### Flow Context Integration
|
|
858
|
+
|
|
859
|
+
After project setup completes, the next steps section offers:
|
|
860
|
+
|
|
861
|
+
```
|
|
862
|
+
🎯 Next steps:
|
|
863
|
+
1. Copy .env.example to .env
|
|
864
|
+
2. Add your config values
|
|
865
|
+
3. Run: [start command]
|
|
866
|
+
4. Start building: pa:feature "[First feature]"
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
When user runs pa:feature, it reads Flow Context and understands the tech stack:
|
|
870
|
+
|
|
871
|
+
```
|
|
872
|
+
📋 Project Context Loaded
|
|
873
|
+
|
|
874
|
+
Stack: [framework] + [backend]
|
|
875
|
+
Setup: [date]
|
|
876
|
+
|
|
877
|
+
Creating feature with this stack context.
|
|
878
|
+
```
|