ai-flow-dev 1.4.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.
- package/README.md +97 -30
- package/dist/cli.js +79 -104
- package/dist/cli.js.map +1 -1
- package/package.json +6 -2
- package/prompts/backend/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +5 -3
- package/prompts/backend/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +36 -41
- package/prompts/backend/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +80 -68
- package/prompts/backend/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +82 -61
- package/prompts/backend/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +10 -9
- package/prompts/backend/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +8 -7
- package/prompts/backend/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +5 -3
- package/prompts/backend/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +248 -30
- package/prompts/backend/{flow-bootstrap-phase-9.md → flow-build-phase-9.md} +97 -99
- package/prompts/backend/{flow-bootstrap.md → flow-build.md} +105 -34
- package/prompts/backend/flow-docs-sync.md +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +3 -2
- package/prompts/frontend/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +4 -2
- package/prompts/frontend/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +238 -22
- package/prompts/frontend/{flow-bootstrap.md → flow-build.md} +108 -25
- package/prompts/frontend/flow-docs-sync.md +3 -2
- package/prompts/mobile/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +3 -2
- package/prompts/mobile/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +249 -23
- package/prompts/mobile/{flow-bootstrap.md → flow-build.md} +107 -26
- package/prompts/mobile/flow-docs-sync.md +3 -2
- package/templates/AGENT.template.md +1 -17
- package/templates/backend/.clauderules.template +1 -1
- package/templates/backend/.cursorrules.template +1 -1
- /package/prompts/backend/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +0 -0
- /package/prompts/frontend/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +0 -0
- /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:
|
|
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-
|
|
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:
|
|
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-
|
|
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:
|
|
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-
|
|
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:
|
|
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-
|
|
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:**
|
|
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-
|
|
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:**
|
|
265
|
+
**Frontend/Mobile Projects:** 2 commands (build + docs-sync)
|
|
250
266
|
**Fullstack Projects:** Combined backend + frontend commands
|
|
251
267
|
|
|
252
|
-
**Documentation &
|
|
253
|
-
|
|
254
|
-
- `/flow-
|
|
255
|
-
- `/flow-
|
|
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
|
|
305
|
+
- `/flow-dev-refactor` - Quick refactorings (3-5 min)
|
|
274
306
|
|
|
275
|
-
> **Note:** Frontend and Mobile projects include
|
|
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** (
|
|
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
|
-
|
|
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
|
-
**
|
|
376
|
+
**Key locations:**
|
|
312
377
|
|
|
313
|
-
**
|
|
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
|
|
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,8 +235,7 @@ 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
|
}
|
|
@@ -313,15 +308,11 @@ async function renderTemplates(targetPath, projectData, projectType = 'backend',
|
|
|
313
308
|
for (const [relPath, { file: templateFile }] of processedFiles) {
|
|
314
309
|
// Skip AI tool-specific config files if the tool is not selected
|
|
315
310
|
const fileName = path.basename(relPath);
|
|
316
|
-
if (fileName === '.clauderules' &&
|
|
317
|
-
!aiTools.includes('claude') &&
|
|
318
|
-
!aiTools.includes('all')) {
|
|
311
|
+
if (fileName === '.clauderules' && !aiTools.includes('claude') && !aiTools.includes('all')) {
|
|
319
312
|
logVerbose(`Skipping ${relPath} (Claude not selected)`, verbose);
|
|
320
313
|
continue;
|
|
321
314
|
}
|
|
322
|
-
if (fileName === '.cursorrules' &&
|
|
323
|
-
!aiTools.includes('cursor') &&
|
|
324
|
-
!aiTools.includes('all')) {
|
|
315
|
+
if (fileName === '.cursorrules' && !aiTools.includes('cursor') && !aiTools.includes('all')) {
|
|
325
316
|
logVerbose(`Skipping ${relPath} (Cursor not selected)`, verbose);
|
|
326
317
|
continue;
|
|
327
318
|
}
|
|
@@ -387,8 +378,8 @@ async function setupSlashCommands(targetPath, aiTools, projectType = 'backend',
|
|
|
387
378
|
for (const { dir, prefix } of promptSources) {
|
|
388
379
|
const promptsSource = path.join(ROOT_DIR, 'prompts', dir);
|
|
389
380
|
const allFiles = await fs.readdir(promptsSource);
|
|
390
|
-
// Filter
|
|
391
|
-
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$/));
|
|
392
383
|
for (const tool of aiTools) {
|
|
393
384
|
if (tool === 'copilot') {
|
|
394
385
|
// Copilot: prompts in .github/prompts with .prompt.md suffix
|
|
@@ -400,9 +391,7 @@ async function setupSlashCommands(targetPath, aiTools, projectType = 'backend',
|
|
|
400
391
|
for (const file of files) {
|
|
401
392
|
const srcFile = path.join(promptsSource, file);
|
|
402
393
|
const base = file.replace(/\.md$/, '');
|
|
403
|
-
const destName = prefix
|
|
404
|
-
? `${prefix}${base}.prompt.md`
|
|
405
|
-
: `${base}.prompt.md`;
|
|
394
|
+
const destName = prefix ? `${prefix}${base}.prompt.md` : `${base}.prompt.md`;
|
|
406
395
|
const destFile = path.join(promptsTarget, destName);
|
|
407
396
|
if (!dryRun)
|
|
408
397
|
await fs.copyFile(srcFile, destFile);
|
|
@@ -502,16 +491,15 @@ async function initializeProject(targetPath, aiTool, projectType, projectName, p
|
|
|
502
491
|
process.exit(EXIT.INVALID_ARGS);
|
|
503
492
|
}
|
|
504
493
|
let finalProjectName = projectName;
|
|
505
|
-
let finalProjectDescription = projectDescription || 'TBD - Run /flow-
|
|
494
|
+
let finalProjectDescription = projectDescription || 'TBD - Run /flow-build to define';
|
|
506
495
|
if (!finalProjectName) {
|
|
507
496
|
const answers = await inquirer.prompt([
|
|
508
497
|
{
|
|
509
498
|
type: 'input',
|
|
510
499
|
name: 'projectName',
|
|
511
|
-
message: 'Project name (you can refine it in /
|
|
500
|
+
message: 'Project name (you can refine it in /flow-build):',
|
|
512
501
|
default: inferredName,
|
|
513
|
-
validate: (input) => isValidName(input) ||
|
|
514
|
-
'Enter 2-100 chars: letters, numbers, space, - _ .',
|
|
502
|
+
validate: (input) => isValidName(input) || 'Enter 2-100 chars: letters, numbers, space, - _ .',
|
|
515
503
|
},
|
|
516
504
|
]);
|
|
517
505
|
finalProjectName = answers.projectName;
|
|
@@ -537,110 +525,97 @@ async function initializeProject(targetPath, aiTool, projectType, projectName, p
|
|
|
537
525
|
if (selectedProjectType === 'fullstack') {
|
|
538
526
|
if (aiTools.includes('claude')) {
|
|
539
527
|
console.log(chalk.cyan(' 1. Open Claude Code'));
|
|
540
|
-
console.log(chalk.cyan(' 2. Run: /backend-flow-
|
|
541
|
-
console.log(chalk.cyan(' 3. Run: /frontend-flow-
|
|
542
|
-
console.log(chalk.gray(' Each will guide you through
|
|
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'));
|
|
543
531
|
}
|
|
544
532
|
else if (aiTools.includes('cursor')) {
|
|
545
533
|
console.log(chalk.cyan(' 1. Open Cursor'));
|
|
546
|
-
console.log(chalk.cyan(' 2. Run: /backend-flow-
|
|
547
|
-
console.log(chalk.cyan(' 3. Run: /frontend-flow-
|
|
548
|
-
console.log(chalk.gray(' Each will guide you through
|
|
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'));
|
|
549
537
|
}
|
|
550
538
|
else {
|
|
551
539
|
console.log(chalk.cyan(` 1. Open your AI tool (${toolsText})`));
|
|
552
|
-
console.log(chalk.cyan(' 2. Run: /backend-flow-
|
|
553
|
-
console.log(chalk.cyan(' 3. Run: /frontend-flow-
|
|
554
|
-
console.log(chalk.gray(' Each will guide you through
|
|
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'));
|
|
555
543
|
}
|
|
556
544
|
console.log(chalk.white('Available slash commands:'));
|
|
557
545
|
console.log(chalk.gray(' Backend commands:'));
|
|
558
|
-
console.log(chalk.gray(' /backend-flow-
|
|
559
|
-
console.log(chalk.gray(' /backend-flow-
|
|
560
|
-
console.log(chalk.gray(' /backend-flow-
|
|
561
|
-
console.log(chalk.gray(' /backend-flow-bootstrap-phase-2-data - Backend data architecture'));
|
|
562
|
-
console.log(chalk.gray(' /backend-flow-bootstrap-phase-3-architecture - Backend system architecture'));
|
|
563
|
-
console.log(chalk.gray(' /backend-flow-bootstrap-phase-4-security - Backend security & auth'));
|
|
564
|
-
console.log(chalk.gray(' /backend-flow-bootstrap-phase-5-standards - Backend code standards'));
|
|
565
|
-
console.log(chalk.gray(' /backend-flow-bootstrap-phase-6-testing - Backend testing'));
|
|
566
|
-
console.log(chalk.gray(' /backend-flow-bootstrap-phase-7-operations - Backend operations + tools'));
|
|
567
|
-
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'));
|
|
568
549
|
console.log(chalk.gray(' Frontend commands:'));
|
|
569
|
-
console.log(chalk.gray(' /frontend-flow-
|
|
570
|
-
console.log(chalk.gray(' /frontend-flow-
|
|
571
|
-
console.log(chalk.gray(' /frontend-flow-
|
|
572
|
-
console.log(chalk.gray(' /frontend-flow-bootstrap-phase-2-components - Frontend components & framework'));
|
|
573
|
-
console.log(chalk.gray(' /frontend-flow-bootstrap-phase-3-state - Frontend state management'));
|
|
574
|
-
console.log(chalk.gray(' /frontend-flow-bootstrap-phase-4-styling - Frontend styling & design'));
|
|
575
|
-
console.log(chalk.gray(' /frontend-flow-bootstrap-phase-5-standards - Frontend code standards'));
|
|
576
|
-
console.log(chalk.gray(' /frontend-flow-bootstrap-phase-6-testing - Frontend testing'));
|
|
577
|
-
console.log(chalk.gray(' /frontend-flow-bootstrap-phase-7-deployment - Frontend deployment'));
|
|
578
|
-
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'));
|
|
579
553
|
}
|
|
580
554
|
else if (selectedProjectType === 'mobile') {
|
|
581
555
|
if (aiTools.includes('claude')) {
|
|
582
556
|
console.log(chalk.cyan(' 1. Open Claude Code'));
|
|
583
|
-
console.log(chalk.cyan(' 2. Run: /
|
|
584
|
-
console.log(chalk.gray(' This will start the
|
|
557
|
+
console.log(chalk.cyan(' 2. Run: /flow-build'));
|
|
558
|
+
console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
|
|
585
559
|
}
|
|
586
560
|
else if (aiTools.includes('cursor')) {
|
|
587
561
|
console.log(chalk.cyan(' 1. Open Cursor'));
|
|
588
|
-
console.log(chalk.cyan(' 2. Run: /
|
|
589
|
-
console.log(chalk.gray(' This will start the
|
|
562
|
+
console.log(chalk.cyan(' 2. Run: /flow-build'));
|
|
563
|
+
console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
|
|
590
564
|
}
|
|
591
565
|
else {
|
|
592
566
|
console.log(chalk.cyan(` 1. Open your AI tool (${toolsText})`));
|
|
593
|
-
console.log(chalk.cyan(' 2. Run: /
|
|
594
|
-
console.log(chalk.gray(' This will start the
|
|
567
|
+
console.log(chalk.cyan(' 2. Run: /flow-build'));
|
|
568
|
+
console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
|
|
595
569
|
}
|
|
596
570
|
console.log(chalk.white('Available slash commands:'));
|
|
597
|
-
console.log(chalk.gray(' /flow-
|
|
598
|
-
console.log(chalk.gray(' /flow-
|
|
599
|
-
console.log(chalk.gray(' /flow-
|
|
600
|
-
console.log(chalk.gray(' /flow-bootstrap-phase-2-navigation - Navigation & Architecture'));
|
|
601
|
-
console.log(chalk.gray(' /flow-bootstrap-phase-3-state - State & Data Management'));
|
|
602
|
-
console.log(chalk.gray(' /flow-bootstrap-phase-4-permissions - Permissions & Native Features'));
|
|
603
|
-
console.log(chalk.gray(' /flow-bootstrap-phase-5-standards - Code Standards'));
|
|
604
|
-
console.log(chalk.gray(' /flow-bootstrap-phase-6-testing - Testing Strategy'));
|
|
605
|
-
console.log(chalk.gray(' /flow-bootstrap-phase-7-deployment - Store Deployment'));
|
|
606
|
-
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'));
|
|
607
574
|
}
|
|
608
575
|
else {
|
|
609
576
|
if (aiTools.includes('claude')) {
|
|
610
577
|
console.log(chalk.cyan(' 1. Open Claude Code'));
|
|
611
|
-
console.log(chalk.cyan(' 2. Run: /
|
|
612
|
-
console.log(chalk.gray(' This will start the
|
|
578
|
+
console.log(chalk.cyan(' 2. Run: /flow-build'));
|
|
579
|
+
console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
|
|
613
580
|
}
|
|
614
581
|
else if (aiTools.includes('cursor')) {
|
|
615
582
|
console.log(chalk.cyan(' 1. Open Cursor'));
|
|
616
|
-
console.log(chalk.cyan(' 2. Run: /
|
|
617
|
-
console.log(chalk.gray(' This will start the
|
|
583
|
+
console.log(chalk.cyan(' 2. Run: /flow-build'));
|
|
584
|
+
console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
|
|
618
585
|
}
|
|
619
586
|
else {
|
|
620
587
|
console.log(chalk.cyan(` 1. Open your AI tool (${toolsText})`));
|
|
621
|
-
console.log(chalk.cyan(' 2. Run: /
|
|
622
|
-
console.log(chalk.gray(' This will start the
|
|
588
|
+
console.log(chalk.cyan(' 2. Run: /flow-build'));
|
|
589
|
+
console.log(chalk.gray(' This will start the 9-phase interactive setup\n'));
|
|
623
590
|
}
|
|
624
591
|
console.log(chalk.white('Available slash commands:'));
|
|
625
|
-
console.log(chalk.gray(' /flow-
|
|
626
|
-
console.log(chalk.gray(' /flow-
|
|
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'));
|
|
627
595
|
if (selectedProjectType === 'backend') {
|
|
628
|
-
console.log(chalk.gray('
|
|
629
|
-
console.log(chalk.gray('
|
|
630
|
-
console.log(chalk.gray('
|
|
631
|
-
console.log(chalk.gray('
|
|
632
|
-
console.log(chalk.gray('
|
|
633
|
-
console.log(chalk.gray('
|
|
634
|
-
console.log(chalk.gray('
|
|
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)'));
|
|
635
607
|
}
|
|
636
608
|
else {
|
|
637
|
-
console.log(chalk.gray('
|
|
638
|
-
console.log(chalk.gray('
|
|
639
|
-
console.log(chalk.gray('
|
|
640
|
-
console.log(chalk.gray('
|
|
641
|
-
console.log(chalk.gray('
|
|
642
|
-
console.log(chalk.gray('
|
|
643
|
-
console.log(chalk.gray('
|
|
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'));
|
|
644
619
|
}
|
|
645
620
|
console.log(chalk.gray(' /flow-docs-sync - Update documentation when code changes\n'));
|
|
646
621
|
}
|
|
@@ -658,7 +633,7 @@ async function initializeProject(targetPath, aiTool, projectType, projectName, p
|
|
|
658
633
|
program
|
|
659
634
|
.name('ai-flow')
|
|
660
635
|
.description('AI-powered development workflow from idea to production. Generate specs, plan features, and build with AI assistance.')
|
|
661
|
-
.version('
|
|
636
|
+
.version('2.0.1');
|
|
662
637
|
program
|
|
663
638
|
.command('init')
|
|
664
639
|
.description('Initialize AI Flow in current directory')
|
|
@@ -712,51 +687,51 @@ program
|
|
|
712
687
|
console.log(chalk.gray(` Working Dir: ${process.cwd()}`));
|
|
713
688
|
// Show correct prompts path based on project type
|
|
714
689
|
if (projectType === 'fullstack') {
|
|
715
|
-
const backendPromptsPath = path.join(process.cwd(), '.ai-flow', 'prompts', 'backend', '
|
|
716
|
-
const frontendPromptsPath = path.join(process.cwd(), '.ai-flow', 'prompts', 'frontend', '
|
|
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');
|
|
717
692
|
console.log(chalk.gray(` Backend Prompts: ${backendPromptsPath}`));
|
|
718
693
|
console.log(chalk.gray(` Frontend Prompts: ${frontendPromptsPath}`));
|
|
719
694
|
}
|
|
720
695
|
else {
|
|
721
|
-
const promptsPath = path.join(process.cwd(), '.ai-flow', 'prompts', projectType, '
|
|
696
|
+
const promptsPath = path.join(process.cwd(), '.ai-flow', 'prompts', projectType, 'flow-build.md');
|
|
722
697
|
console.log(chalk.gray(` Prompts: ${promptsPath}`));
|
|
723
698
|
}
|
|
724
699
|
console.log(chalk.white('\nNext steps:'));
|
|
725
700
|
if (projectType === 'fullstack') {
|
|
726
701
|
if (config.aiTools.includes('claude')) {
|
|
727
702
|
console.log(chalk.cyan(' 1. Open Claude Code'));
|
|
728
|
-
console.log(chalk.cyan(' 2. Run: /backend-flow-
|
|
729
|
-
console.log(chalk.cyan(' 3. Run: /frontend-flow-
|
|
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)'));
|
|
730
705
|
}
|
|
731
706
|
else if (config.aiTools.includes('cursor')) {
|
|
732
707
|
console.log(chalk.cyan(' 1. Open Cursor'));
|
|
733
|
-
console.log(chalk.cyan(' 2. Run: /backend-flow-
|
|
734
|
-
console.log(chalk.cyan(' 3. Run: /frontend-flow-
|
|
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)'));
|
|
735
710
|
}
|
|
736
711
|
else {
|
|
737
712
|
const toolsText = config.aiTools.length === 1
|
|
738
713
|
? config.aiTools[0]
|
|
739
714
|
: `${config.aiTools.slice(0, -1).join(', ')} and ${config.aiTools[config.aiTools.length - 1]}`;
|
|
740
715
|
console.log(chalk.cyan(` 1. Open your AI tool (${toolsText})`));
|
|
741
|
-
console.log(chalk.cyan(' 2. Run: /backend-flow-
|
|
742
|
-
console.log(chalk.cyan(' 3. Run: /frontend-flow-
|
|
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)'));
|
|
743
718
|
}
|
|
744
719
|
}
|
|
745
720
|
else {
|
|
746
721
|
if (config.aiTools.includes('claude')) {
|
|
747
722
|
console.log(chalk.cyan(' 1. Open Claude Code'));
|
|
748
|
-
console.log(chalk.cyan(' 2. Run: /
|
|
723
|
+
console.log(chalk.cyan(' 2. Run: /flow-build'));
|
|
749
724
|
}
|
|
750
725
|
else if (config.aiTools.includes('cursor')) {
|
|
751
726
|
console.log(chalk.cyan(' 1. Open Cursor'));
|
|
752
|
-
console.log(chalk.cyan(' 2. Run: /
|
|
727
|
+
console.log(chalk.cyan(' 2. Run: /flow-build'));
|
|
753
728
|
}
|
|
754
729
|
else {
|
|
755
730
|
const toolsText = config.aiTools.length === 1
|
|
756
731
|
? config.aiTools[0]
|
|
757
732
|
: `${config.aiTools.slice(0, -1).join(', ')} and ${config.aiTools[config.aiTools.length - 1]}`;
|
|
758
733
|
console.log(chalk.cyan(` 1. Open your AI tool (${toolsText})`));
|
|
759
|
-
console.log(chalk.cyan(' 2. Run: /
|
|
734
|
+
console.log(chalk.cyan(' 2. Run: /flow-build'));
|
|
760
735
|
}
|
|
761
736
|
}
|
|
762
737
|
}
|