ai-flow-dev 2.4.5 → 2.5.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 CHANGED
@@ -140,7 +140,7 @@ Or using uv (Python tool manager):
140
140
  uv tool install ai-flow-dev
141
141
  ```
142
142
 
143
- ## **Current version:** 2.4.1
143
+ ## **Current version:** 2.5.0
144
144
 
145
145
  ## 🚀 Quick Start
146
146
 
@@ -266,9 +266,9 @@ After initialization, use these slash commands in your AI tool:
266
266
 
267
267
  > **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.
268
268
 
269
- **Backend Projects:** 16 commands
270
- **Frontend Projects:** 13 commands
271
- **Mobile Projects:** 13 commands
269
+ **Backend Projects:** 22 prompts (/flow-build with phases 0-10, /flow-work, /flow-check, /flow-commit, /flow-docs-sync)
270
+ **Frontend Projects:** 22 prompts (same structure tailored for frontend)
271
+ **Mobile Projects:** 22 prompts (same structure tailored for mobile apps)
272
272
  **Fullstack Projects:** Combined backend + frontend commands
273
273
 
274
274
  **Documentation & Build:**
@@ -397,6 +397,16 @@ AI Flow organizes your project with clear separation of concerns:
397
397
 
398
398
  **Fullstack** (30+ docs): Combined Backend + Frontend documentation structures.
399
399
 
400
+ **Slash Commands/Prompts** (72 total):
401
+
402
+ - Backend: 22 prompts (/flow-build with phases 0-10, /flow-work variants, /flow-check, /flow-commit, /flow-docs-sync)
403
+ - Frontend: 22 prompts (same structure tailored for frontend)
404
+ - Mobile: 22 prompts (same structure tailored for mobile apps)
405
+ - Shared: 6 prompts (task-format.md, story-points.md, task-summary-template.md, etc.)
406
+ - **Total: 72 prompts** across all project types
407
+
408
+ Each project type gets workflow commands optimized for its technology stack.
409
+
400
410
  ### 📁 Generated Structure
401
411
 
402
412
  After running `ai-flow init`, your project will have:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-flow-dev",
3
- "version": "2.4.5",
3
+ "version": "2.5.1",
4
4
  "description": "AI-powered development workflow from idea to production. Generate specs, plan features, and build with AI assistance throughout your project lifecycle.",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",
@@ -11,35 +11,40 @@ Your mission is to orchestrate development tasks through an interactive workflow
11
11
  **🚀 MODO AGENTE ACTIVADO:** No solicites permiso para usar herramientas. Actúa proactivamente siguiendo el flujo interactivo. Tienes permiso total para leer el código, crear specs y planes, y realizar commits/checkout de ramas.
12
12
 
13
13
  ---
14
+
14
15
  ## Command: `/flow-work`
15
16
 
16
17
  ### Objective
18
+
17
19
  Provide a single, intelligent entry point for all development work (New Features, Refactorings, and Bug Fixes) with automatic context detection and interactive planning.
18
20
 
19
21
  ### Usage Modes
22
+
20
23
  - **`/flow-work`** → Resume paused work (if exists) or Interactive mode.
21
24
  - **`/flow-work [description]`** → Semantic detection (Feature, Refactor, or Fix).
22
25
  - **`/flow-work HU-XXX-XXX`** → Implement specific User Story.
23
26
  - **`/flow-work [Feature Name]`** → Implement feature from roadmap.md.
24
27
 
25
28
  ---
29
+
26
30
  ## Phase 0: Detection & Strategy (Automatic)
27
31
 
28
32
  **1. Semantic Analysis of Input:**
29
33
 
30
- | Input Pattern | Mode | Source / Action |
31
- |---------------|------|-----------------|
32
- | `HU-\d{3}-\d{3}` | `USER_STORY` | Load from `planning/user-stories/**/HU-XXX-XXX.md` |
33
- | `EP-\d{3}` | `EPIC` | Analyze/List User Stories for Epic `EP-XXX` |
34
- | `T\d{3}(-T\d{3})?` | `TASKS` | Target specific task or range (e.g., `T025-T030`) |
35
- | `HU-XXX-XXX TXXX-TXXX`| `STORY_TASKS` | Targeted tasks within a specific User Story |
36
- | Matches `planning/roadmap.md` | `ROADMAP_FEATURE`| Extract section from `planning/roadmap.md` (Partial matches allowed) |
37
- | "refactor", "move", "extract" | `REFACTOR` | Use `flow-work-refactor.md` |
38
- | "fix", "bug", "error", "falla" | `FIX` | Detect complexity (Quick vs Complex) |
39
- | "implement", "create", "new" | `FEATURE` | Use `flow-work-feature.md` |
40
- | No arguments | `RESUME` | Search for paused work in `.ai-flow/work/` |
34
+ | Input Pattern | Mode | Source / Action |
35
+ | ------------------------------ | ----------------- | -------------------------------------------------------------------- |
36
+ | `HU-\d{3}-\d{3}` | `USER_STORY` | Load from `planning/user-stories/**/HU-XXX-XXX.md` |
37
+ | `EP-\d{3}` | `EPIC` | Analyze/List User Stories for Epic `EP-XXX` |
38
+ | `T\d{3}(-T\d{3})?` | `TASKS` | Target specific task or range (e.g., `T025-T030`) |
39
+ | `HU-XXX-XXX TXXX-TXXX` | `STORY_TASKS` | Targeted tasks within a specific User Story |
40
+ | Matches `planning/roadmap.md` | `ROADMAP_FEATURE` | Extract section from `planning/roadmap.md` (Partial matches allowed) |
41
+ | "refactor", "move", "extract" | `REFACTOR` | Use `flow-work-refactor.md` |
42
+ | "fix", "bug", "error", "falla" | `FIX` | Detect complexity (Quick vs Complex) |
43
+ | "implement", "create", "new" | `FEATURE` | Use `flow-work-feature.md` |
44
+ | No arguments | `RESUME` | Search for paused work in `.ai-flow/work/` |
41
45
 
42
46
  **2. Detection Logic Details:**
47
+
43
48
  - **USER_STORY / EPIC**: Load metadata from `planning/user-stories/` or `planning/roadmap.md`.
44
49
  - **ROADMAP_FEATURE**: Fuzzy search in `planning/roadmap.md` for titles like "User Management" or "Feature 2.2".
45
50
  - **TASK RANGES**: If `T025-T030` is provided, find the parent Story or Feature in current context or roadmap.
@@ -47,13 +52,15 @@ Provide a single, intelligent entry point for all development work (New Features
47
52
  - **COMPLEX FIX**: Multi-file, architectural, performance/security. → Use `flow-work-fix.md` (Deep).
48
53
 
49
54
  ---
55
+
50
56
  ## Phase 1: Analysis & Refinement
51
57
 
52
58
  **1. Context Loading (Multi-Source):**
53
59
 
54
60
  **CRITICAL**: Regardless of whether a `USER_STORY` ID or a `ROADMAP_FEATURE` name is provided, you MUST attempt to load context from **BOTH** sources:
61
+
55
62
  - **`planning/roadmap.md`**: To understand high-level scope, epic relationships, and technical dependencies.
56
- - **`planning/user-stories/**/HU-XXX-XXX.md`**: To get granular details (Acceptance Criteria, Gherkin Scenarios, QA cases).
63
+ - **`planning/user-stories/**/HU-XXX-XXX.md`\*\*: To get granular details (Acceptance Criteria, Gherkin Scenarios, QA cases).
57
64
 
58
65
  **2. Detail Level Detection (if Manual input):**
59
66
 
@@ -81,35 +88,40 @@ detail_level = analyze_description(input)
81
88
  **3. Interactive Refinement (Conditional):**
82
89
 
83
90
  **IF detail_level == "HIGH":**
91
+
84
92
  - Skip refinement questions
85
93
  - Proceed directly to Phase 2 (Planning)
86
94
  - Show: "✅ Sufficient detail detected. Proceeding with planning..."
87
95
 
88
96
  **IF detail_level == "MEDIUM":**
97
+
89
98
  - Ask 1-2 targeted questions (only missing items)
90
99
  - Use Multiple Choice with defaults (⭐)
91
100
 
92
101
  **IF detail_level == "LOW":**
102
+
93
103
  - Full refinement flow (3-5 questions)
94
104
  - Use Multiple Choice with defaults (⭐)
95
105
  - Focus on: approach, scope, constraints, priorities
96
106
 
97
107
  **Example Interaction (LOW detail):**
108
+
98
109
  > 📝 I need to clarify some details for this feature:
110
+ >
99
111
  > 1. What authentication provider should we use? [default: A]
100
112
  > A) JWT (Local) ⭐
101
113
  > B) OAuth2 (Google/GitHub)
102
114
  > C) Firebase Auth
103
- >
104
115
  > 2. Should we implement audit logs for this? [default: B]
105
116
  > A) Yes
106
117
  > B) No ⭐
107
118
  >
108
- > Your answers (or Enter for defaults): _
119
+ > Your answers (or Enter for defaults): \_
109
120
 
110
121
  **4. Refined Objective Generation (if Manual):**
111
122
 
112
123
  After refinement, generate clear objective statement:
124
+
113
125
  ```
114
126
  ✅ Refined Objective:
115
127
 
@@ -127,6 +139,7 @@ Is this correct? (Yes/Edit/Cancel): _
127
139
  **5. Documentation Compliance Check:**
128
140
 
129
141
  Read relevant documentation:
142
+
130
143
  - `ai-instructions.md` (NEVER/ALWAYS rules)
131
144
  - `docs/architecture.md` (patterns, structure)
132
145
  - `docs/code-standards.md` (naming, quality)
@@ -137,6 +150,7 @@ Read relevant documentation:
137
150
  Compare refined objective against documentation:
138
151
 
139
152
  **IF deviation detected:**
153
+
140
154
  ```
141
155
  🚨 POTENTIAL DEVIATION
142
156
 
@@ -155,6 +169,7 @@ Your choice: _
155
169
  ```
156
170
 
157
171
  **IF user chooses B (Override):**
172
+
158
173
  ```
159
174
  ⚠️ OVERRIDE CONFIRMATION
160
175
 
@@ -167,11 +182,13 @@ Provide justification: _
167
182
  ```
168
183
 
169
184
  ---
185
+
170
186
  ## Phase 2: Planning & Documentation
171
187
 
172
188
  **1. Read Required Documentation (MANDATORY)**
173
189
 
174
190
  Before generating work.md, read relevant documentation:
191
+
175
192
  - `ai-instructions.md` → Extract NEVER/ALWAYS rules
176
193
  - `docs/architecture.md` → Identify layer, pattern, file structure
177
194
  - `docs/code-standards.md` → Extract naming conventions, quality rules
@@ -183,6 +200,7 @@ Before generating work.md, read relevant documentation:
183
200
  **2. Analyze Existing Codebase (MANDATORY)**
184
201
 
185
202
  Find similar features/patterns in codebase:
203
+
186
204
  - Identify existing files to use as reference (e.g., ProductService.ts for UserService.ts)
187
205
  - Check naming conventions in actual code
188
206
  - Verify architectural consistency
@@ -198,36 +216,44 @@ Create single consolidated file: `.ai-flow/work/[task-name]/work.md`
198
216
  # [Type]: [Feature Name]
199
217
 
200
218
  ## Context
219
+
201
220
  **Source**: HU-001-002 | Roadmap 2.3 | Manual [+ DEVIATION if override]
202
221
  **SP**: 5 | **Branch**: feature/user-auth | **Deps**: None
203
222
 
204
223
  ## Objective
224
+
205
225
  [1-2 clear paragraphs describing WHAT will be implemented]
206
226
 
207
227
  ## Documentation Constraints
228
+
208
229
  **Read**: ai-instructions.md, architecture.md, code-standards.md, [security.md]
209
230
 
210
231
  **Key Rules**:
232
+
211
233
  - ✅ ALWAYS: [List specific rules that apply]
212
234
  - ❌ NEVER: [List specific prohibitions]
213
235
  - 📐 Pattern: [Architectural pattern from docs]
214
236
  - 📁 Location: [File structure from architecture.md]
215
237
 
216
238
  ## Approach
239
+
217
240
  **Layer**: [Data | Business Logic | API | UI]
218
241
  **Files**: [List files to create/modify]
219
242
  **Reference**: [Existing file to follow as pattern]
220
243
 
221
244
  **Phases**:
245
+
222
246
  1. [Phase 1 description]
223
247
  2. [Phase 2 description]
224
248
  3. [Phase 3 description]
225
249
  4. [Phase 4 description]
226
250
 
227
251
  ## Tasks
252
+
228
253
  [SEE TASK GENERATION LOGIC BELOW]
229
254
 
230
255
  ## Validation
256
+
231
257
  - [ ] All NEVER/ALWAYS rules followed
232
258
  - [ ] Tests pass (coverage per docs/testing.md)
233
259
  - [ ] No hardcoded secrets
@@ -238,6 +264,7 @@ Create single consolidated file: `.ai-flow/work/[task-name]/work.md`
238
264
  **Task Generation Logic:**
239
265
 
240
266
  **IF source is User Story:**
267
+
241
268
  ```python
242
269
  tasks = read_user_story_tasks()
243
270
  if tasks.are_detailed(): # Has: path, constraints, SP, deps
@@ -254,6 +281,7 @@ else:
254
281
  ```
255
282
 
256
283
  **IF source is Roadmap:**
284
+
257
285
  ```python
258
286
  feature = read_roadmap_feature()
259
287
  if feature.has_detailed_tasks():
@@ -271,8 +299,10 @@ else:
271
299
  **IF source is Manual OR tasks need expansion:**
272
300
 
273
301
  Generate detailed tasks with this format:
302
+
274
303
  ```markdown
275
304
  ## Tasks
305
+
276
306
  **Source**: Manual | Roadmap X.X (expanded) | HU-XXX-XXX (expanded)
277
307
 
278
308
  - [ ] T001 [D] Create User entity → src/entities/User.ts • 1 SP
@@ -286,6 +316,7 @@ Generate detailed tasks with this format:
286
316
  ```
287
317
 
288
318
  **Task Detail Requirements:**
319
+
289
320
  - Specific file path
290
321
  - Pattern/reference to follow
291
322
  - Key constraints from docs
@@ -324,6 +355,7 @@ Create: `.ai-flow/work/[task-name]/status.json`
324
355
  **5. User Approval**
325
356
 
326
357
  Show work.md for review:
358
+
327
359
  ```
328
360
  📄 Generated: .ai-flow/work/[task-name]/work.md
329
361
 
@@ -335,6 +367,7 @@ Review work.md? (Yes/Edit/No): _
335
367
  - **No**: Cancel workflow
336
368
 
337
369
  ---
370
+
338
371
  ## Phase 3: Execution (Branch Creation)
339
372
 
340
373
  **Upon confirmation to start implementation:**
@@ -351,12 +384,13 @@ Review work.md? (Yes/Edit/No): _
351
384
  - Update `status.json` progress
352
385
 
353
386
  ---
387
+
354
388
  ## Phase 4: Finalization & Archiving
355
389
 
356
390
  **When all tasks in `work.md` are complete (✅) and validated:**
357
391
 
358
392
  1. **Update Source Documentation (Automatic - ALWAYS UPDATE BOTH IF BOTH EXIST)**:
359
-
393
+
360
394
  **Step 1a: Check and Update User Story (if exists)**
361
395
  - Look for User Story reference in `status.json` or work context
362
396
  - IF User Story `HU-XXX-XXX` exists:
@@ -364,7 +398,7 @@ Review work.md? (Yes/Edit/No): _
364
398
  - Mark ALL DoD checklist items as complete: `- [ ]` → `- [x]`
365
399
  - Add completion timestamp comment: `<!-- Completed: YYYY-MM-DD HH:MM -->`
366
400
  - Save file
367
-
401
+
368
402
  **Step 1b: Check and Update Roadmap (if exists)**
369
403
  - Look for Feature reference in `status.json` or work context
370
404
  - IF Feature exists in `planning/roadmap.md`:
@@ -372,13 +406,13 @@ Review work.md? (Yes/Edit/No): _
372
406
  - Find the Feature section by name/number
373
407
  - Mark Feature checkbox as complete: `- [ ]` → `- [x]`
374
408
  - Save file
375
-
409
+
376
410
  **Step 1c: Show Completion Summary**
377
411
  - IF both updated: "✅ Updated roadmap.md (Feature X.X) AND HU-XXX-XXX.md (Y/Y DoD items)"
378
412
  - IF only roadmap: "✅ Updated roadmap.md (Feature X.X)"
379
413
  - IF only user story: "✅ Updated HU-XXX-XXX.md (Y/Y DoD items)"
380
414
  - IF neither exists: "⚠️ No roadmap or user story found to update"
381
-
415
+
382
416
  **Error Handling:**
383
417
  - If file doesn't exist: Log warning, continue with other file
384
418
  - If checkbox not found: Log warning with helpful message, continue
@@ -412,11 +446,58 @@ Review work.md? (Yes/Edit/No): _
412
446
  - **Eliminar carpeta**: Remover `.ai-flow/work/[task-name]/` completa (incluye `work.md` y `status.json`).
413
447
  - **Cleanup**: Mantener limpia la carpeta `work` para que `/flow-work` detecte solo tareas activas.
414
448
 
415
- 4. **Resumen Final**:
416
- - Mostrar estadísticas finales: duración total (en minutos), commits realizados, tasks completadas, validación exitosa.
417
- - Ejemplo: `"✅ Archivado: 125 min, 8/8 tasks, 3 commits, validación ✓"`
449
+ 4. **Generar Resumen Universal para Sistema de Tickets (Automático)**:
450
+
451
+ Después del archivado, generar un resumen completo compatible con ClickUp, Jira, Linear, Asana, Trello, GitHub Projects, Azure DevOps, y cualquier sistema de gestión de tareas.
452
+
453
+ **Template Source**: `.ai-flow/prompts/shared/task-summary-template.md`
454
+
455
+ **Instrucciones**:
456
+ 1. Leer el template completo desde `.ai-flow/prompts/shared/task-summary-template.md`
457
+ 2. Extraer datos de las fuentes especificadas en el template:
458
+ - `status.json` (type, timestamps, commits, validation, branch)
459
+ - `work.md` (objective, tasks, story points)
460
+ - `analytics.jsonl` (última línea: duración, sp, commits)
461
+ - `TECH-DEBT.md` (si existe antes de eliminar)
462
+ - Git commands (`git diff --stat`, `git log --oneline`, etc.)
463
+ 3. Aplicar inferencia automática según reglas del template:
464
+ - Tags/Labels (Backend, API, Security, etc.)
465
+ - Prioridad (Critical, High, Medium, Low)
466
+ - Scope (módulo principal afectado)
467
+ - Impacto (UX, Security, Performance, Maintainability)
468
+ 4. Poblar todos los campos del template con datos reales
469
+ 5. Mostrar el resumen completo formateado listo para copiar/pegar
470
+
471
+ **Nota**: El template es modular y puede actualizarse independientemente sin modificar este archivo.
472
+
473
+ 5. **Presentación de Resultados**:
474
+
475
+ Mostrar resumen del template `.ai-flow/prompts/shared/task-summary-template.md` seguido de:
476
+
477
+ ```
478
+ ---
479
+
480
+ 📋 Copiar el resumen de arriba a tu sistema de tickets
481
+ (ClickUp, Jira, Linear, Asana, Trello, GitHub Projects, etc.)
482
+
483
+ ---
484
+ ```
485
+
486
+ Luego preguntar al usuario:
487
+
488
+ ```
489
+ ¿Deseas hacer push al remoto?
490
+
491
+ git push origin [branch-name]
492
+
493
+ (y/n): _
494
+ ```
495
+
496
+ - Si responde **y**: Ejecutar `git push origin [branch-name]` y mostrar resultado
497
+ - Si responde **n**: Terminar con mensaje "✅ Trabajo completado. Push pendiente."
418
498
 
419
499
  ---
500
+
420
501
  ## Orchestration Rules
421
502
 
422
503
  - **DRY Logic**: This file handles the high-level orchestration.
@@ -428,4 +509,5 @@ Review work.md? (Yes/Edit/No): _
428
509
  - **State Persistence**: Always read/write to `.ai-flow/work/[name]/status.json` to maintain state across sessions.
429
510
 
430
511
  ---
512
+
431
513
  **BEGIN EXECUTION when user runs `/flow-work [args]`**