ai-flow-dev 1.3.0 → 2.0.1

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.
Files changed (44) hide show
  1. package/README.md +97 -30
  2. package/dist/cli.js +94 -110
  3. package/dist/cli.js.map +1 -1
  4. package/package.json +6 -2
  5. package/prompts/backend/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +5 -3
  6. package/prompts/backend/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +36 -41
  7. package/prompts/backend/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +80 -68
  8. package/prompts/backend/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +82 -61
  9. package/prompts/backend/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +10 -9
  10. package/prompts/backend/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +8 -7
  11. package/prompts/backend/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +5 -3
  12. package/prompts/backend/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +410 -543
  13. package/prompts/backend/{flow-bootstrap-phase-9.md → flow-build-phase-9.md} +472 -91
  14. package/prompts/backend/{flow-bootstrap.md → flow-build.md} +212 -140
  15. package/prompts/backend/flow-dev-feature.md +447 -68
  16. package/prompts/backend/flow-dev-fix.md +81 -8
  17. package/prompts/backend/flow-docs-sync.md +2 -1
  18. package/prompts/frontend/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +3 -2
  19. package/prompts/frontend/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +2 -1
  20. package/prompts/frontend/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +2 -1
  21. package/prompts/frontend/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +2 -1
  22. package/prompts/frontend/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +4 -2
  23. package/prompts/frontend/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +2 -1
  24. package/prompts/frontend/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +2 -1
  25. package/prompts/frontend/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +238 -22
  26. package/prompts/frontend/{flow-bootstrap.md → flow-build.md} +108 -25
  27. package/prompts/frontend/flow-docs-sync.md +3 -2
  28. package/prompts/mobile/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +3 -2
  29. package/prompts/mobile/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +2 -1
  30. package/prompts/mobile/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +2 -1
  31. package/prompts/mobile/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +2 -1
  32. package/prompts/mobile/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +2 -1
  33. package/prompts/mobile/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +2 -1
  34. package/prompts/mobile/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +2 -1
  35. package/prompts/mobile/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +249 -23
  36. package/prompts/mobile/{flow-bootstrap.md → flow-build.md} +107 -26
  37. package/prompts/mobile/flow-docs-sync.md +3 -2
  38. package/templates/{mobile/AGENT.template.md → AGENT.template.md} +2 -17
  39. package/templates/backend/.clauderules.template +1 -1
  40. package/templates/backend/.cursorrules.template +1 -1
  41. package/templates/shared/AGENT.template.md +0 -252
  42. /package/prompts/backend/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +0 -0
  43. /package/prompts/frontend/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +0 -0
  44. /package/prompts/mobile/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +0 -0
package/README.md CHANGED
@@ -10,7 +10,7 @@ AI Flow is an interactive CLI that creates comprehensive professional documentat
10
10
 
11
11
  **Key Features:**
12
12
 
13
- - 🚀 Complete professional documentation (Backend: 17 docs, Frontend: 15 docs, Mobile: 14 docs, Fullstack: 4+ docs)
13
+ - 🚀 Complete professional documentation (Backend: 17 docs, Frontend: 15 docs, Mobile: 13 docs, Fullstack: 4+ docs)
14
14
  - ⚡ **Two modes:** Interactive (90-120 min, full control) or Smart Auto-Suggest (15-25 min, 6 questions)
15
15
  - 🌍 Universal support - 12 languages, 60+ frameworks, 35+ ORMs (98% coverage)
16
16
  - 🤖 Multi-AI support with slash commands
@@ -24,7 +24,7 @@ AI Flow is an interactive CLI that creates comprehensive professional documentat
24
24
  ```bash
25
25
  npm install -g ai-flow-dev
26
26
  ai-flow init .
27
- # Then open your AI tool and run: /flow-bootstrap
27
+ # Then open your AI tool and run: /flow-build
28
28
  ```
29
29
 
30
30
  📚 **[Complete Guide →](GETTING-STARTED.md)**
@@ -37,7 +37,7 @@ Transforma tu idea en un proyecto listo para producción y documentado para IA e
37
37
 
38
38
  **Características:**
39
39
 
40
- - 🚀 Documentación profesional completa (Backend: 17 docs, Frontend: 15 docs, Mobile: 14 docs, Fullstack: 4+ docs)
40
+ - 🚀 Documentación profesional completa (Backend: 17 docs, Frontend: 15 docs, Mobile: 13 docs, Fullstack: 4+ docs)
41
41
  - ⚡ **Dos modos:** Interactivo (90-120 min, control total) o Auto-Sugerido (15-25 min, 6 preguntas)
42
42
  - 🌍 Soporte universal - 12 lenguajes, 60+ frameworks, 35+ ORMs
43
43
  - 🤖 Compatible con Claude, Copilot, Cursor, Gemini
@@ -51,7 +51,7 @@ Transforma tu idea en un proyecto listo para producción y documentado para IA e
51
51
  ```bash
52
52
  npm install -g ai-flow-dev
53
53
  ai-flow init .
54
- # Luego en tu herramienta IA: /flow-bootstrap
54
+ # Luego en tu herramienta IA: /flow-build
55
55
  ```
56
56
 
57
57
  📚 **[Guía Completa →](GETTING-STARTED.md)**
@@ -63,7 +63,7 @@ ai-flow init .
63
63
  Transforme sua ideia em um projeto pronto para produção e documentado para IA em minutos.
64
64
  **Características:**
65
65
 
66
- - 🚀 Documentação profissional completa (Backend: 17, Frontend: 15, Mobile: 14, Fullstack: 4+ docs)
66
+ - 🚀 Documentação profissional completa (Backend: 17, Frontend: 15, Mobile: 13, Fullstack: 4+ docs)
67
67
  - ⚡ **Dois modos:** Interativo (90-120 min, controle total) ou Auto-Sugestão (15-25 min, 6 perguntas)
68
68
  - 🌍 Suporte universal - 12 linguagens, 60+ frameworks, 35+ ORMs
69
69
  - 🤖 Compatível com Claude, Copilot, Cursor, Gemini
@@ -78,7 +78,7 @@ Transforme sua ideia em um projeto pronto para produção e documentado para IA
78
78
  ```bash
79
79
  npm install -g ai-flow-dev
80
80
  ai-flow init .
81
- # Em seguida, na sua ferramenta de IA: /flow-bootstrap
81
+ # Em seguida, na sua ferramenta de IA: /flow-build
82
82
  ```
83
83
 
84
84
  📚 **[Guia Completo →](GETTING-STARTED.md)**
@@ -103,13 +103,13 @@ The result is interconnected documentation that guides AI assistants and human d
103
103
 
104
104
  - 🌍 **Universal Support** - 12 languages, 60+ frameworks, 35+ ORMs (98% coverage)
105
105
  - 🤖 **AI-Agnostic** - Claude, Copilot, Cursor, Gemini, any AI tool
106
- - 📚 **Professional Documentation** - Backend: 17, Frontend: 15, Mobile: 14, Fullstack: 4+ docs
106
+ - 📚 **Professional Documentation** - Backend: 17, Frontend: 15, Mobile: 13, Fullstack: 4+ docs
107
107
  - ⚡ **Two Questionnaire Modes:**
108
108
  - **Interactive Mode:** Full control, 71 questions (90-120 min)
109
109
  - **Smart Auto-Suggest:** Only 6 critical questions, AI suggests best practices (15-25 min)
110
110
  - 🔍 **Smart 3-Layer Detection** - Analyzes existing projects in 15s-5min
111
111
  - 💾 **Intelligent Caching** - 0 seconds on re-runs with no changes
112
- - 💡 **Slash Commands** - Easy execution with `/flow-bootstrap`, `/flow-dev-feature`, `/flow-dev-fix`
112
+ - 💡 **Slash Commands** - Easy execution with `/flow-build`, `/flow-dev-feature`, `/flow-dev-fix`
113
113
  - ⏱️ **Time Efficient** - Save 10-20 hours per project
114
114
 
115
115
  ---
@@ -133,7 +133,7 @@ Or using uv (Python tool manager):
133
133
  uv tool install ai-flow-dev
134
134
  ```
135
135
 
136
- **Current version:** 1.1.1
136
+ **Current version:** 2.0.0
137
137
 
138
138
  ---
139
139
 
@@ -148,7 +148,7 @@ cd my-awesome-project
148
148
  ai-flow init .
149
149
 
150
150
  # 3. Open your AI tool and run:
151
- /flow-bootstrap
151
+ /flow-build
152
152
  ```
153
153
 
154
154
  That's it! The AI will guide you through an interactive questionnaire to generate all documentation.
@@ -166,6 +166,20 @@ ai-flow --version # Show version
166
166
  ai-flow --help # Show help
167
167
  ```
168
168
 
169
+ **Example `check` output:**
170
+
171
+ ```bash
172
+ $ ai-flow check
173
+
174
+ ✓ .ai-flow/core/config.json found
175
+ ✓ AI tools configured: claude
176
+ ✓ Project type: backend
177
+ ✓ Documentation complete: 17 files
178
+ ✓ Slash commands installed: .claude/commands/
179
+
180
+ ✅ All checks passed! Your project is ready for AI-assisted development.
181
+ ```
182
+
169
183
  ### Common Flags
170
184
 
171
185
  ```bash
@@ -245,34 +259,52 @@ Each tool gets:
245
259
 
246
260
  After initialization, use these slash commands in your AI tool:
247
261
 
262
+ > **Note:** Command prefix may vary by AI tool. Examples use `/flow-` (GitHub Copilot), but Claude may use `/` alone, Cursor may use `@`, etc. Check your tool's documentation.
263
+
248
264
  **Backend Projects:** 17 commands
249
- **Frontend/Mobile Projects:** 11 commands (bootstrap + docs-sync)
265
+ **Frontend/Mobile Projects:** 2 commands (build + docs-sync)
250
266
  **Fullstack Projects:** Combined backend + frontend commands
251
267
 
252
- **Documentation & Bootstrap:**
253
-
254
- - `/flow-bootstrap` - Full 9-phase project bootstrap (includes docs + setup + roadmap)
255
- - `/flow-bootstrap-phase-0` - Context discovery (existing projects)
256
- - `/flow-bootstrap-phase-1` - Business requirements
257
- - `/flow-bootstrap-phase-2` - Data architecture
258
- - `/flow-bootstrap-phase-3` - Technical architecture
259
- - `/flow-bootstrap-phase-4` - Security & compliance
260
- - `/flow-bootstrap-phase-5` - Code standards
261
- - `/flow-bootstrap-phase-6` - Testing strategy
262
- - `/flow-bootstrap-phase-7` - Deployment & operations
263
- - `/flow-bootstrap-phase-8` - Project setup & final documentation
264
- - `/flow-bootstrap-phase-9` - Implementation roadmap with Story Points (Backend only, optional)
268
+ **Documentation & Build:**
269
+
270
+ - `/flow-build` - Flujo completo: todas las fases en orden (9 fases backend, 8 frontend/mobile)
271
+ - `/flow-build fase N` - Ejecutar fase específica (ver lista de fases abajo)
265
272
  - `/flow-docs-sync` - Update documentation when code changes
266
273
 
274
+ **Fases disponibles (Backend):**
275
+
276
+ - `/flow-build fase 0` - Context Discovery (solo proyectos existentes)
277
+ - `/flow-build fase 1` - Discovery & Business
278
+ - `/flow-build fase 2` - Data Architecture
279
+ - `/flow-build fase 3` - System Architecture
280
+ - `/flow-build fase 4` - Security & Authentication
281
+ - `/flow-build fase 5` - Code Standards
282
+ - `/flow-build fase 6` - Testing Strategy
283
+ - `/flow-build fase 7` - Operations & Deployment
284
+ - `/flow-build fase 8` - Project Setup & Final Documentation
285
+ - `/flow-build fase 9` - Implementation Roadmap (opcional)
286
+
287
+ **Fases disponibles (Frontend/Mobile):**
288
+
289
+ - `/flow-build fase 0` - Context Discovery (solo proyectos existentes)
290
+ - `/flow-build fase 1` - Discovery & UX / Platform Selection
291
+ - `/flow-build fase 2` - Components & Framework / Navigation
292
+ - `/flow-build fase 3` - State Management
293
+ - `/flow-build fase 4` - Styling & Design / Permissions
294
+ - `/flow-build fase 5` - Code Standards
295
+ - `/flow-build fase 6` - Testing Strategy
296
+ - `/flow-build fase 7` - Performance & Deployment / Store Deployment
297
+ - `/flow-build fase 8` - Project Setup & Final Documentation
298
+
267
299
  **Workflows (Backend only):**
268
300
 
269
301
  - `/flow-dev-feature` - Create/modify features (15-20 min)
270
302
  - `/flow-dev-fix` - Fix bugs (3-15 min, adaptive)
271
303
  - `/flow-dev-work` - Manage work in progress
272
304
  - `/flow-dev-review` - Multi-aspect code review (5 min)
273
- - `/flow-dev-refactor-quick` - Quick refactorings (3-5 min)
305
+ - `/flow-dev-refactor` - Quick refactorings (3-5 min)
274
306
 
275
- > **Note:** Frontend and Mobile projects include bootstrap commands (`/flow-bootstrap`, phases, `/flow-docs-sync`) but not workflow commands.
307
+ > **Note:** Frontend and Mobile projects include build commands (`/flow-build`, phases, `/flow-docs-sync`) but not workflow commands.
276
308
 
277
309
  **📚 See [GETTING-STARTED.md](GETTING-STARTED.md) for complete command reference**
278
310
 
@@ -304,13 +336,48 @@ After initialization, use these slash commands in your AI tool:
304
336
 
305
337
  ## 🎯 Generated Documentation
306
338
 
307
- **Backend** (17 docs): AGENT.md, ai-instructions.md, copilot-instructions.md (for GitHub Copilot), project-brief.md, README.md, 9 technical docs, 2 specs, .env.example, .clauderules, .cursorrules
339
+ **Backend** (14 docs): AGENT.md, ai-instructions.md, copilot-instructions.md, project-brief.md, README.md, plus 8 technical docs and 2 specs
340
+
341
+ **Frontend** (15 docs): AGENT.md, ai-instructions.md, project-brief.md, README.md, plus 8 technical docs and 3 specs
342
+
343
+ **Mobile** (13 docs): AGENT.md, ai-instructions.md, project-brief.md, README.md, plus 7 technical docs and 2 specs
344
+
345
+ **Fullstack** (4 docs): AGENT.md, ai-instructions.md, project-brief.md, README.md
308
346
 
309
- **Frontend** (15 docs): AGENT.md, ai-instructions.md, project-brief.md, README.md, 9 technical docs, 3 specs
347
+ ### 📁 Generated Structure
348
+
349
+ After running `ai-flow init`, your project will have:
350
+
351
+ ```
352
+ project-root/
353
+ ├── AGENT.md # Universal AI entry point (all tools)
354
+ ├── README.md # Project documentation
355
+ ├── docs/ # Technical documentation
356
+ │ ├── architecture.md
357
+ │ ├── api.md # (Backend only)
358
+ │ ├── database.md # (Backend only)
359
+ │ ├── deployment.md
360
+ │ ├── security.md
361
+ │ └── ...
362
+ ├── specs/ # Specifications
363
+ │ ├── features.md
364
+ │ ├── requirements.md
365
+ │ └── ...
366
+ ├── .ai-flow/ # Internal metadata
367
+ │ └── core/
368
+ │ └── config.json # AI Flow configuration
369
+ ├── .github/prompts/ # GitHub Copilot commands
370
+ ├── .claude/commands/ # Claude commands (if selected)
371
+ ├── .cursor/commands/ # Cursor commands (if selected)
372
+ ├── .gemini/commands/ # Gemini commands (if selected)
373
+ └── ... (your project files)
374
+ ```
310
375
 
311
- **Mobile** (14 docs): AGENT.md, ai-instructions.md, project-brief.md, README.md, 8 technical docs, 2 specs
376
+ **Key locations:**
312
377
 
313
- **Fullstack** (4+ docs): ai-instructions.md, project-brief.md, README.md, configuration spec + inherits from backend/frontend as needed
378
+ - Documentation lives at **project root** (`docs/`, `specs/`, `AGENT.md`)
379
+ - `.ai-flow/` is internal metadata (don't edit manually)
380
+ - Slash commands are tool-specific (`.github/prompts/`, `.claude/commands/`, etc.)
314
381
 
315
382
  ---
316
383
 
package/dist/cli.js CHANGED
@@ -79,9 +79,7 @@ async function selectAITool(providedTool) {
79
79
  console.log(chalk.yellow('Available options: claude, cursor, copilot, gemini, all'));
80
80
  process.exit(EXIT.INVALID_ARGS);
81
81
  }
82
- return providedTool === 'all'
83
- ? ['claude', 'cursor', 'copilot', 'gemini']
84
- : [providedTool];
82
+ return providedTool === 'all' ? ['claude', 'cursor', 'copilot', 'gemini'] : [providedTool];
85
83
  }
86
84
  // Display banner
87
85
  console.log('\n');
@@ -145,9 +143,7 @@ async function selectAITool(providedTool) {
145
143
  default: 1,
146
144
  },
147
145
  ]);
148
- return selectedTool === 'all'
149
- ? ['claude', 'cursor', 'copilot', 'gemini']
150
- : [selectedTool];
146
+ return selectedTool === 'all' ? ['claude', 'cursor', 'copilot', 'gemini'] : [selectedTool];
151
147
  }
152
148
  async function selectProjectType(providedType) {
153
149
  // v1.4.0: Backend, Frontend, Fullstack, and Mobile supported
@@ -170,7 +166,7 @@ async function selectProjectType(providedType) {
170
166
  {
171
167
  type: 'rawlist',
172
168
  name: 'projectType',
173
- message: 'What type of project are you bootstrapping?',
169
+ message: 'What type of project are you building?',
174
170
  choices: [
175
171
  { name: '🔧 Backend API/Service', value: 'backend' },
176
172
  { name: '🎨 Frontend Application', value: 'frontend' },
@@ -239,18 +235,27 @@ async function renderTemplates(targetPath, projectData, projectType = 'backend',
239
235
  if (stat.isDirectory()) {
240
236
  files = files.concat(await walk(fullPath));
241
237
  }
242
- else if (entry.endsWith('.template.md') ||
243
- entry.endsWith('.template')) {
238
+ else if (entry.endsWith('.template.md') || entry.endsWith('.template')) {
244
239
  files.push(fullPath);
245
240
  }
246
241
  }
247
242
  return files;
248
243
  };
249
- // Collect template files from shared and project-type-specific directories
244
+ // Collect template files from project-type-specific directories
250
245
  const templateSources = [];
251
- // Always include shared templates (e.g., AGENT.md)
252
- const sharedSource = path.join(ROOT_DIR, 'templates', 'shared');
253
- templateSources.push({ source: sharedSource, base: sharedSource });
246
+ // Always include root templates (AGENT.template.md)
247
+ const rootTemplatesSource = path.join(ROOT_DIR, 'templates');
248
+ const processedFiles = new Map();
249
+ // Only scan root level files (not subdirectories)
250
+ const allRootItems = await fs.readdir(rootTemplatesSource);
251
+ for (const item of allRootItems) {
252
+ const fullPath = path.join(rootTemplatesSource, item);
253
+ const stat = await fs.stat(fullPath);
254
+ if (stat.isFile() && item.endsWith('.template.md')) {
255
+ const relPath = item.replace('.template.md', '.md').replace('.template', '');
256
+ processedFiles.set(relPath, { file: fullPath, base: rootTemplatesSource });
257
+ }
258
+ }
254
259
  // Include project-type-specific templates
255
260
  if (projectType === 'backend') {
256
261
  const backendSource = path.join(ROOT_DIR, 'templates', 'backend');
@@ -285,8 +290,7 @@ async function renderTemplates(targetPath, projectData, projectType = 'backend',
285
290
  templateSources.push({ source: mobileSource, base: mobileSource });
286
291
  }
287
292
  // Walk all source directories and collect template files
288
- // For fullstack, use a Map to track processed files (priority: fullstack > backend > frontend)
289
- const processedFiles = new Map();
293
+ // For fullstack, use a Map to track processed files (priority: root > fullstack > backend > frontend)
290
294
  for (const { source, base } of templateSources) {
291
295
  const files = await walk(source);
292
296
  for (const file of files) {
@@ -304,15 +308,11 @@ async function renderTemplates(targetPath, projectData, projectType = 'backend',
304
308
  for (const [relPath, { file: templateFile }] of processedFiles) {
305
309
  // Skip AI tool-specific config files if the tool is not selected
306
310
  const fileName = path.basename(relPath);
307
- if (fileName === '.clauderules' &&
308
- !aiTools.includes('claude') &&
309
- !aiTools.includes('all')) {
311
+ if (fileName === '.clauderules' && !aiTools.includes('claude') && !aiTools.includes('all')) {
310
312
  logVerbose(`Skipping ${relPath} (Claude not selected)`, verbose);
311
313
  continue;
312
314
  }
313
- if (fileName === '.cursorrules' &&
314
- !aiTools.includes('cursor') &&
315
- !aiTools.includes('all')) {
315
+ if (fileName === '.cursorrules' && !aiTools.includes('cursor') && !aiTools.includes('all')) {
316
316
  logVerbose(`Skipping ${relPath} (Cursor not selected)`, verbose);
317
317
  continue;
318
318
  }
@@ -378,8 +378,8 @@ async function setupSlashCommands(targetPath, aiTools, projectType = 'backend',
378
378
  for (const { dir, prefix } of promptSources) {
379
379
  const promptsSource = path.join(ROOT_DIR, 'prompts', dir);
380
380
  const allFiles = await fs.readdir(promptsSource);
381
- // Filter all markdown files (all prompts are valid slash commands)
382
- const files = allFiles.filter((file) => file.endsWith('.md'));
381
+ // Filter markdown files, excluding flow-build-phase-*.md (they are loaded by flow-build.md)
382
+ const files = allFiles.filter((file) => file.endsWith('.md') && !file.match(/^flow-build-phase-\d+.*\.md$/));
383
383
  for (const tool of aiTools) {
384
384
  if (tool === 'copilot') {
385
385
  // Copilot: prompts in .github/prompts with .prompt.md suffix
@@ -391,9 +391,7 @@ async function setupSlashCommands(targetPath, aiTools, projectType = 'backend',
391
391
  for (const file of files) {
392
392
  const srcFile = path.join(promptsSource, file);
393
393
  const base = file.replace(/\.md$/, '');
394
- const destName = prefix
395
- ? `${prefix}${base}.prompt.md`
396
- : `${base}.prompt.md`;
394
+ const destName = prefix ? `${prefix}${base}.prompt.md` : `${base}.prompt.md`;
397
395
  const destFile = path.join(promptsTarget, destName);
398
396
  if (!dryRun)
399
397
  await fs.copyFile(srcFile, destFile);
@@ -493,16 +491,15 @@ async function initializeProject(targetPath, aiTool, projectType, projectName, p
493
491
  process.exit(EXIT.INVALID_ARGS);
494
492
  }
495
493
  let finalProjectName = projectName;
496
- let finalProjectDescription = projectDescription || 'TBD - Run /flow-bootstrap to define';
494
+ let finalProjectDescription = projectDescription || 'TBD - Run /flow-build to define';
497
495
  if (!finalProjectName) {
498
496
  const answers = await inquirer.prompt([
499
497
  {
500
498
  type: 'input',
501
499
  name: 'projectName',
502
- message: 'Project name (you can refine it in /bootstrap):',
500
+ message: 'Project name (you can refine it in /flow-build):',
503
501
  default: inferredName,
504
- validate: (input) => isValidName(input) ||
505
- 'Enter 2-100 chars: letters, numbers, space, - _ .',
502
+ validate: (input) => isValidName(input) || 'Enter 2-100 chars: letters, numbers, space, - _ .',
506
503
  },
507
504
  ]);
508
505
  finalProjectName = answers.projectName;
@@ -528,110 +525,97 @@ async function initializeProject(targetPath, aiTool, projectType, projectName, p
528
525
  if (selectedProjectType === 'fullstack') {
529
526
  if (aiTools.includes('claude')) {
530
527
  console.log(chalk.cyan(' 1. Open Claude Code'));
531
- console.log(chalk.cyan(' 2. Run: /backend-flow-bootstrap (for backend documentation)'));
532
- console.log(chalk.cyan(' 3. Run: /frontend-flow-bootstrap (for frontend documentation)'));
533
- console.log(chalk.gray(' Each will guide you through 7 phases\n'));
528
+ console.log(chalk.cyan(' 2. Run: /backend-flow-build (for backend documentation)'));
529
+ console.log(chalk.cyan(' 3. Run: /frontend-flow-build (for frontend documentation)'));
530
+ console.log(chalk.gray(' Each will guide you through 9 phases\n'));
534
531
  }
535
532
  else if (aiTools.includes('cursor')) {
536
533
  console.log(chalk.cyan(' 1. Open Cursor'));
537
- console.log(chalk.cyan(' 2. Run: /backend-flow-bootstrap (for backend documentation)'));
538
- console.log(chalk.cyan(' 3. Run: /frontend-flow-bootstrap (for frontend documentation)'));
539
- console.log(chalk.gray(' Each will guide you through 7 phases\n'));
534
+ console.log(chalk.cyan(' 2. Run: /backend-flow-build (for backend documentation)'));
535
+ console.log(chalk.cyan(' 3. Run: /frontend-flow-build (for frontend documentation)'));
536
+ console.log(chalk.gray(' Each will guide you through 9 phases\n'));
540
537
  }
541
538
  else {
542
539
  console.log(chalk.cyan(` 1. Open your AI tool (${toolsText})`));
543
- console.log(chalk.cyan(' 2. Run: /backend-flow-bootstrap (for backend documentation)'));
544
- console.log(chalk.cyan(' 3. Run: /frontend-flow-bootstrap (for frontend documentation)'));
545
- console.log(chalk.gray(' Each will guide you through 7 phases\n'));
540
+ console.log(chalk.cyan(' 2. Run: /backend-flow-build (for backend documentation)'));
541
+ console.log(chalk.cyan(' 3. Run: /frontend-flow-build (for frontend documentation)'));
542
+ console.log(chalk.gray(' Each will guide you through 9 phases\n'));
546
543
  }
547
544
  console.log(chalk.white('Available slash commands:'));
548
545
  console.log(chalk.gray(' Backend commands:'));
549
- console.log(chalk.gray(' /backend-flow-bootstrap - Backend 7-phase documentation generation'));
550
- console.log(chalk.gray(' /backend-flow-bootstrap-phase-0-context - Backend context discovery'));
551
- console.log(chalk.gray(' /backend-flow-bootstrap-phase-1-business - Backend discovery & business'));
552
- console.log(chalk.gray(' /backend-flow-bootstrap-phase-2-data - Backend data architecture'));
553
- console.log(chalk.gray(' /backend-flow-bootstrap-phase-3-architecture - Backend system architecture'));
554
- console.log(chalk.gray(' /backend-flow-bootstrap-phase-4-security - Backend security & auth'));
555
- console.log(chalk.gray(' /backend-flow-bootstrap-phase-5-standards - Backend code standards'));
556
- console.log(chalk.gray(' /backend-flow-bootstrap-phase-6-testing - Backend testing'));
557
- console.log(chalk.gray(' /backend-flow-bootstrap-phase-7-operations - Backend operations + tools'));
558
- console.log(chalk.gray(' /backend-flow-docs-sync - Update backend documentation\n'));
546
+ console.log(chalk.gray(' /backend-flow-build - Flujo completo (9 fases en orden)'));
547
+ console.log(chalk.gray(' /backend-flow-build fase N - Fase específica (0-9)'));
548
+ console.log(chalk.gray(' /backend-flow-docs-sync - Update backend documentation\n'));
559
549
  console.log(chalk.gray(' Frontend commands:'));
560
- console.log(chalk.gray(' /frontend-flow-bootstrap - Frontend 7-phase documentation generation'));
561
- console.log(chalk.gray(' /frontend-flow-bootstrap-phase-0-context - Frontend context discovery'));
562
- console.log(chalk.gray(' /frontend-flow-bootstrap-phase-1-discovery - Frontend discovery & UX'));
563
- console.log(chalk.gray(' /frontend-flow-bootstrap-phase-2-components - Frontend components & framework'));
564
- console.log(chalk.gray(' /frontend-flow-bootstrap-phase-3-state - Frontend state management'));
565
- console.log(chalk.gray(' /frontend-flow-bootstrap-phase-4-styling - Frontend styling & design'));
566
- console.log(chalk.gray(' /frontend-flow-bootstrap-phase-5-standards - Frontend code standards'));
567
- console.log(chalk.gray(' /frontend-flow-bootstrap-phase-6-testing - Frontend testing'));
568
- console.log(chalk.gray(' /frontend-flow-bootstrap-phase-7-deployment - Frontend deployment'));
569
- console.log(chalk.gray(' /frontend-flow-docs-sync - Update frontend documentation\n'));
550
+ console.log(chalk.gray(' /frontend-flow-build - Flujo completo (8 fases en orden)'));
551
+ console.log(chalk.gray(' /frontend-flow-build fase N - Fase específica (0-8)'));
552
+ console.log(chalk.gray(' /frontend-flow-docs-sync - Update frontend documentation\n'));
570
553
  }
571
554
  else if (selectedProjectType === 'mobile') {
572
555
  if (aiTools.includes('claude')) {
573
556
  console.log(chalk.cyan(' 1. Open Claude Code'));
574
- console.log(chalk.cyan(' 2. Run: /bootstrap'));
575
- console.log(chalk.gray(' This will start the 7-phase interactive setup\n'));
557
+ console.log(chalk.cyan(' 2. Run: /flow-build'));
558
+ console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
576
559
  }
577
560
  else if (aiTools.includes('cursor')) {
578
561
  console.log(chalk.cyan(' 1. Open Cursor'));
579
- console.log(chalk.cyan(' 2. Run: /bootstrap'));
580
- console.log(chalk.gray(' This will start the 7-phase interactive setup\n'));
562
+ console.log(chalk.cyan(' 2. Run: /flow-build'));
563
+ console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
581
564
  }
582
565
  else {
583
566
  console.log(chalk.cyan(` 1. Open your AI tool (${toolsText})`));
584
- console.log(chalk.cyan(' 2. Run: /bootstrap'));
585
- console.log(chalk.gray(' This will start the 7-phase interactive setup\n'));
567
+ console.log(chalk.cyan(' 2. Run: /flow-build'));
568
+ console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
586
569
  }
587
570
  console.log(chalk.white('Available slash commands:'));
588
- console.log(chalk.gray(' /flow-bootstrap - Full 7-phase documentation generation'));
589
- console.log(chalk.gray(' /flow-bootstrap-phase-0-context - Context Discovery (existing projects)'));
590
- console.log(chalk.gray(' /flow-bootstrap-phase-1-platform - Platform & Framework Selection'));
591
- console.log(chalk.gray(' /flow-bootstrap-phase-2-navigation - Navigation & Architecture'));
592
- console.log(chalk.gray(' /flow-bootstrap-phase-3-state - State & Data Management'));
593
- console.log(chalk.gray(' /flow-bootstrap-phase-4-permissions - Permissions & Native Features'));
594
- console.log(chalk.gray(' /flow-bootstrap-phase-5-standards - Code Standards'));
595
- console.log(chalk.gray(' /flow-bootstrap-phase-6-testing - Testing Strategy'));
596
- console.log(chalk.gray(' /flow-bootstrap-phase-7-deployment - Store Deployment'));
597
- console.log(chalk.gray(' /flow-docs-sync - Update documentation when code changes\n'));
571
+ console.log(chalk.gray(' /flow-build - Flujo completo (8 fases en orden)'));
572
+ console.log(chalk.gray(' /flow-build fase N - Fase específica (0-8: Discovery, Platform, Navigation, State, Permissions, Standards, Testing, Deployment)'));
573
+ console.log(chalk.gray(' /flow-docs-sync - Update documentation when code changes\n'));
598
574
  }
599
575
  else {
600
576
  if (aiTools.includes('claude')) {
601
577
  console.log(chalk.cyan(' 1. Open Claude Code'));
602
- console.log(chalk.cyan(' 2. Run: /bootstrap'));
603
- console.log(chalk.gray(' This will start the 7-phase interactive setup\n'));
578
+ console.log(chalk.cyan(' 2. Run: /flow-build'));
579
+ console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
604
580
  }
605
581
  else if (aiTools.includes('cursor')) {
606
582
  console.log(chalk.cyan(' 1. Open Cursor'));
607
- console.log(chalk.cyan(' 2. Run: /bootstrap'));
608
- console.log(chalk.gray(' This will start the 7-phase interactive setup\n'));
583
+ console.log(chalk.cyan(' 2. Run: /flow-build'));
584
+ console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
609
585
  }
610
586
  else {
611
587
  console.log(chalk.cyan(` 1. Open your AI tool (${toolsText})`));
612
- console.log(chalk.cyan(' 2. Run: /bootstrap'));
613
- console.log(chalk.gray(' This will start the 7-phase interactive setup\n'));
588
+ console.log(chalk.cyan(' 2. Run: /flow-build'));
589
+ console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
614
590
  }
615
591
  console.log(chalk.white('Available slash commands:'));
616
- console.log(chalk.gray(' /flow-bootstrap - Full 7-phase documentation generation'));
617
- console.log(chalk.gray(' /flow-bootstrap-phase-0-context - Context Discovery (existing projects)'));
592
+ console.log(chalk.gray(' /flow-build - Flujo completo (todas las fases en orden)'));
593
+ console.log(chalk.gray(' /flow-build fase N - Fase específica (ver lista de fases abajo)'));
594
+ console.log(chalk.gray(' /flow-docs-sync - Update documentation when code changes\n'));
618
595
  if (selectedProjectType === 'backend') {
619
- console.log(chalk.gray(' /flow-bootstrap-phase-1-business - Discovery & Business'));
620
- console.log(chalk.gray(' /flow-bootstrap-phase-2-data - Data Architecture'));
621
- console.log(chalk.gray(' /flow-bootstrap-phase-3-architecture - System Architecture'));
622
- console.log(chalk.gray(' /flow-bootstrap-phase-4-security - Security & Auth'));
623
- console.log(chalk.gray(' /flow-bootstrap-phase-5-standards - Code Standards'));
624
- console.log(chalk.gray(' /flow-bootstrap-phase-6-testing - Testing'));
625
- console.log(chalk.gray(' /flow-bootstrap-phase-7-operations - Operations + Tools'));
596
+ console.log(chalk.gray('\n Fases disponibles (Backend):'));
597
+ console.log(chalk.gray(' fase 0: Context Discovery (proyectos existentes)'));
598
+ console.log(chalk.gray(' fase 1: Discovery & Business'));
599
+ console.log(chalk.gray(' fase 2: Data Architecture'));
600
+ console.log(chalk.gray(' fase 3: System Architecture'));
601
+ console.log(chalk.gray(' fase 4: Security & Auth'));
602
+ console.log(chalk.gray(' fase 5: Code Standards'));
603
+ console.log(chalk.gray(' fase 6: Testing'));
604
+ console.log(chalk.gray(' fase 7: Operations + Tools'));
605
+ console.log(chalk.gray(' fase 8: Project Setup & Final Docs'));
606
+ console.log(chalk.gray(' fase 9: Implementation Roadmap (opcional)'));
626
607
  }
627
608
  else {
628
- console.log(chalk.gray(' /flow-bootstrap-phase-1-discovery - Discovery & UX'));
629
- console.log(chalk.gray(' /flow-bootstrap-phase-2-components - Components & Framework'));
630
- console.log(chalk.gray(' /flow-bootstrap-phase-3-state - State Management'));
631
- console.log(chalk.gray(' /flow-bootstrap-phase-4-styling - Styling & Design'));
632
- console.log(chalk.gray(' /flow-bootstrap-phase-5-standards - Code Standards'));
633
- console.log(chalk.gray(' /flow-bootstrap-phase-6-testing - Testing'));
634
- console.log(chalk.gray(' /flow-bootstrap-phase-7-deployment - Deployment'));
609
+ console.log(chalk.gray('\n Fases disponibles (Frontend):'));
610
+ console.log(chalk.gray(' fase 0: Context Discovery (proyectos existentes)'));
611
+ console.log(chalk.gray(' fase 1: Discovery & UX'));
612
+ console.log(chalk.gray(' fase 2: Components & Framework'));
613
+ console.log(chalk.gray(' fase 3: State Management'));
614
+ console.log(chalk.gray(' fase 4: Styling & Design'));
615
+ console.log(chalk.gray(' fase 5: Code Standards'));
616
+ console.log(chalk.gray(' fase 6: Testing'));
617
+ console.log(chalk.gray(' fase 7: Deployment'));
618
+ console.log(chalk.gray(' fase 8: Project Setup & Final Docs'));
635
619
  }
636
620
  console.log(chalk.gray(' /flow-docs-sync - Update documentation when code changes\n'));
637
621
  }
@@ -649,7 +633,7 @@ async function initializeProject(targetPath, aiTool, projectType, projectName, p
649
633
  program
650
634
  .name('ai-flow')
651
635
  .description('AI-powered development workflow from idea to production. Generate specs, plan features, and build with AI assistance.')
652
- .version('1.3.0');
636
+ .version('2.0.1');
653
637
  program
654
638
  .command('init')
655
639
  .description('Initialize AI Flow in current directory')
@@ -703,51 +687,51 @@ program
703
687
  console.log(chalk.gray(` Working Dir: ${process.cwd()}`));
704
688
  // Show correct prompts path based on project type
705
689
  if (projectType === 'fullstack') {
706
- const backendPromptsPath = path.join(process.cwd(), '.ai-flow', 'prompts', 'backend', 'bootstrap.md');
707
- const frontendPromptsPath = path.join(process.cwd(), '.ai-flow', 'prompts', 'frontend', 'bootstrap.md');
690
+ const backendPromptsPath = path.join(process.cwd(), '.ai-flow', 'prompts', 'backend', 'flow-build.md');
691
+ const frontendPromptsPath = path.join(process.cwd(), '.ai-flow', 'prompts', 'frontend', 'flow-build.md');
708
692
  console.log(chalk.gray(` Backend Prompts: ${backendPromptsPath}`));
709
693
  console.log(chalk.gray(` Frontend Prompts: ${frontendPromptsPath}`));
710
694
  }
711
695
  else {
712
- const promptsPath = path.join(process.cwd(), '.ai-flow', 'prompts', projectType, 'bootstrap.md');
696
+ const promptsPath = path.join(process.cwd(), '.ai-flow', 'prompts', projectType, 'flow-build.md');
713
697
  console.log(chalk.gray(` Prompts: ${promptsPath}`));
714
698
  }
715
699
  console.log(chalk.white('\nNext steps:'));
716
700
  if (projectType === 'fullstack') {
717
701
  if (config.aiTools.includes('claude')) {
718
702
  console.log(chalk.cyan(' 1. Open Claude Code'));
719
- console.log(chalk.cyan(' 2. Run: /backend-flow-bootstrap (for backend documentation)'));
720
- console.log(chalk.cyan(' 3. Run: /frontend-flow-bootstrap (for frontend documentation)'));
703
+ console.log(chalk.cyan(' 2. Run: /backend-flow-build (for backend documentation)'));
704
+ console.log(chalk.cyan(' 3. Run: /frontend-flow-build (for frontend documentation)'));
721
705
  }
722
706
  else if (config.aiTools.includes('cursor')) {
723
707
  console.log(chalk.cyan(' 1. Open Cursor'));
724
- console.log(chalk.cyan(' 2. Run: /backend-flow-bootstrap (for backend documentation)'));
725
- console.log(chalk.cyan(' 3. Run: /frontend-flow-bootstrap (for frontend documentation)'));
708
+ console.log(chalk.cyan(' 2. Run: /backend-flow-build (for backend documentation)'));
709
+ console.log(chalk.cyan(' 3. Run: /frontend-flow-build (for frontend documentation)'));
726
710
  }
727
711
  else {
728
712
  const toolsText = config.aiTools.length === 1
729
713
  ? config.aiTools[0]
730
714
  : `${config.aiTools.slice(0, -1).join(', ')} and ${config.aiTools[config.aiTools.length - 1]}`;
731
715
  console.log(chalk.cyan(` 1. Open your AI tool (${toolsText})`));
732
- console.log(chalk.cyan(' 2. Run: /backend-flow-bootstrap (for backend documentation)'));
733
- console.log(chalk.cyan(' 3. Run: /frontend-flow-bootstrap (for frontend documentation)'));
716
+ console.log(chalk.cyan(' 2. Run: /backend-flow-build (for backend documentation)'));
717
+ console.log(chalk.cyan(' 3. Run: /frontend-flow-build (for frontend documentation)'));
734
718
  }
735
719
  }
736
720
  else {
737
721
  if (config.aiTools.includes('claude')) {
738
722
  console.log(chalk.cyan(' 1. Open Claude Code'));
739
- console.log(chalk.cyan(' 2. Run: /bootstrap'));
723
+ console.log(chalk.cyan(' 2. Run: /flow-build'));
740
724
  }
741
725
  else if (config.aiTools.includes('cursor')) {
742
726
  console.log(chalk.cyan(' 1. Open Cursor'));
743
- console.log(chalk.cyan(' 2. Run: /bootstrap'));
727
+ console.log(chalk.cyan(' 2. Run: /flow-build'));
744
728
  }
745
729
  else {
746
730
  const toolsText = config.aiTools.length === 1
747
731
  ? config.aiTools[0]
748
732
  : `${config.aiTools.slice(0, -1).join(', ')} and ${config.aiTools[config.aiTools.length - 1]}`;
749
733
  console.log(chalk.cyan(` 1. Open your AI tool (${toolsText})`));
750
- console.log(chalk.cyan(' 2. Run: /bootstrap'));
734
+ console.log(chalk.cyan(' 2. Run: /flow-build'));
751
735
  }
752
736
  }
753
737
  }