ai-flow-dev 2.2.1 → 2.4.0

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 +50 -10
  2. package/dist/cli.js +221 -417
  3. package/dist/cli.js.map +1 -1
  4. package/package.json +1 -1
  5. package/prompts/backend/flow-build-phase-0.md +2 -2
  6. package/prompts/backend/flow-build-phase-10.md +11 -11
  7. package/prompts/backend/flow-build-phase-9.md +4 -4
  8. package/prompts/backend/flow-build.md +2 -0
  9. package/prompts/backend/flow-check.md +2 -0
  10. package/prompts/backend/flow-commit.md +2 -0
  11. package/prompts/backend/flow-docs-sync.md +2 -0
  12. package/prompts/backend/flow-work-feature.md +24 -18
  13. package/prompts/backend/flow-work-fix.md +14 -11
  14. package/prompts/backend/flow-work-refactor.md +20 -14
  15. package/prompts/backend/flow-work-resume.md +11 -9
  16. package/prompts/backend/flow-work.md +313 -27
  17. package/prompts/frontend/flow-build-phase-0.md +2 -2
  18. package/prompts/frontend/flow-build-phase-10.md +3 -3
  19. package/prompts/frontend/flow-build-phase-9.md +1 -1
  20. package/prompts/frontend/flow-build.md +2 -0
  21. package/prompts/frontend/flow-check.md +2 -0
  22. package/prompts/frontend/flow-commit.md +2 -0
  23. package/prompts/frontend/flow-docs-sync.md +3 -1
  24. package/prompts/frontend/flow-work-feature.md +24 -18
  25. package/prompts/frontend/flow-work-fix.md +14 -11
  26. package/prompts/frontend/flow-work-refactor.md +20 -14
  27. package/prompts/frontend/flow-work-resume.md +11 -9
  28. package/prompts/frontend/flow-work.md +313 -27
  29. package/prompts/mobile/flow-build-phase-0.md +2 -2
  30. package/prompts/mobile/flow-build-phase-10.md +2 -2
  31. package/prompts/mobile/flow-build-phase-9.md +1 -1
  32. package/prompts/mobile/flow-build.md +2 -0
  33. package/prompts/mobile/flow-check.md +2 -0
  34. package/prompts/mobile/flow-commit.md +2 -0
  35. package/prompts/mobile/flow-docs-sync.md +2 -0
  36. package/prompts/mobile/flow-work-feature.md +24 -18
  37. package/prompts/mobile/flow-work-fix.md +14 -11
  38. package/prompts/mobile/flow-work-refactor.md +20 -14
  39. package/prompts/mobile/flow-work-resume.md +11 -9
  40. package/prompts/mobile/flow-work.md +313 -27
  41. package/templates/AGENT.template.md +13 -3
  42. package/templates/backend/.clauderules.template +5 -4
  43. package/templates/backend/.cursorrules.template +1 -1
  44. package/templates/work.template.md +47 -0
@@ -8,6 +8,8 @@ description: Central Orchestrator for Feature, Refactor, and Fix workflows
8
8
 
9
9
  Your mission is to orchestrate development tasks through an interactive workflow when the user executes `/flow-work`.
10
10
 
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
+
11
13
  ---
12
14
  ## Command: `/flow-work`
13
15
 
@@ -27,36 +29,72 @@ Provide a single, intelligent entry point for all development work (New Features
27
29
 
28
30
  | Input Pattern | Mode | Source / Action |
29
31
  |---------------|------|-----------------|
30
- | `HU-\d{3}-\d{3}` | `USER_STORY` | Load from `docs/user-stories/**/HU-XXX-XXX.md` |
32
+ | `HU-\d{3}-\d{3}` | `USER_STORY` | Load from `planning/user-stories/**/HU-XXX-XXX.md` |
31
33
  | `EP-\d{3}` | `EPIC` | Analyze/List User Stories for Epic `EP-XXX` |
32
34
  | `T\d{3}(-T\d{3})?` | `TASKS` | Target specific task or range (e.g., `T025-T030`) |
33
35
  | `HU-XXX-XXX TXXX-TXXX`| `STORY_TASKS` | Targeted tasks within a specific User Story |
34
- | Matches `docs/roadmap.md` | `ROADMAP_FEATURE`| Extract section from `docs/roadmap.md` (Partial matches allowed) |
36
+ | Matches `planning/roadmap.md` | `ROADMAP_FEATURE`| Extract section from `planning/roadmap.md` (Partial matches allowed) |
35
37
  | "refactor", "move", "extract" | `REFACTOR` | Use `flow-work-refactor.md` |
36
38
  | "fix", "bug", "error", "falla" | `FIX` | Detect complexity (Quick vs Complex) |
37
39
  | "implement", "create", "new" | `FEATURE` | Use `flow-work-feature.md` |
38
- | No arguments | `RESUME` | Search for paused work in `specs/ai-flow/work/` |
40
+ | No arguments | `RESUME` | Search for paused work in `.ai-flow/work/` |
39
41
 
40
42
  **2. Detection Logic Details:**
41
- - **USER_STORY / EPIC**: Load metadata from `docs/user-stories/` or `docs/roadmap.md`.
42
- - **ROADMAP_FEATURE**: Fuzzy search in `docs/roadmap.md` for titles like "User Management" or "Feature 2.2".
43
+ - **USER_STORY / EPIC**: Load metadata from `planning/user-stories/` or `planning/roadmap.md`.
44
+ - **ROADMAP_FEATURE**: Fuzzy search in `planning/roadmap.md` for titles like "User Management" or "Feature 2.2".
43
45
  - **TASK RANGES**: If `T025-T030` is provided, find the parent Story or Feature in current context or roadmap.
44
46
  - **SIMPLE FIX**: Affects 1 file, obvious cause, <10 lines fix. → Use `flow-work-fix.md` (Quick).
45
47
  - **COMPLEX FIX**: Multi-file, architectural, performance/security. → Use `flow-work-fix.md` (Deep).
46
48
 
47
49
  ---
48
- ## Phase 1: Interactive Analysis
50
+ ## Phase 1: Analysis & Refinement
49
51
 
50
52
  **1. Context Loading (Multi-Source):**
53
+
51
54
  **CRITICAL**: Regardless of whether a `USER_STORY` ID or a `ROADMAP_FEATURE` name is provided, you MUST attempt to load context from **BOTH** sources:
52
- - **`docs/roadmap.md`**: To understand high-level scope, epic relationships, and technical dependencies.
53
- - **`docs/user-stories/**/HU-XXX-XXX.md`**: To get granular details (Acceptance Criteria, Gherkin Scenarios, QA cases).
55
+ - **`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).
57
+
58
+ **2. Detail Level Detection (if Manual input):**
59
+
60
+ IF input is manual description (not HU/Roadmap):
61
+
62
+ ```python
63
+ detail_level = analyze_description(input)
64
+
65
+ # Criteria for HIGH detail (Feature):
66
+ # - Mentions technology/method (JWT, OAuth, bcrypt, etc.)
67
+ # - Describes flow (registration, login, CRUD, etc.)
68
+ # - Includes technical constraints (hashing, tokens, validation, etc.)
69
+
70
+ # Criteria for HIGH detail (Refactor):
71
+ # - Describes what to extract/move
72
+ # - Mentions destination (file/class)
73
+ # - References pattern to follow
74
+
75
+ # Criteria for HIGH detail (Fix):
76
+ # - Describes symptom (error 500, crash, null pointer, etc.)
77
+ # - Mentions probable cause
78
+ # - Suggests fix approach
79
+ ```
54
80
 
55
- **2. Interactive Questions:**
56
- - IF both sources provide 100% clarity: Skip questions.
57
- - IF there is missing info or ambiguity: Ask 3-5 key questions with **Multiple Choice Options** and **Defaults (marked with ⭐)**.
81
+ **3. Interactive Refinement (Conditional):**
58
82
 
59
- **Example Interaction:**
83
+ **IF detail_level == "HIGH":**
84
+ - Skip refinement questions
85
+ - Proceed directly to Phase 2 (Planning)
86
+ - Show: "✅ Sufficient detail detected. Proceeding with planning..."
87
+
88
+ **IF detail_level == "MEDIUM":**
89
+ - Ask 1-2 targeted questions (only missing items)
90
+ - Use Multiple Choice with defaults (⭐)
91
+
92
+ **IF detail_level == "LOW":**
93
+ - Full refinement flow (3-5 questions)
94
+ - Use Multiple Choice with defaults (⭐)
95
+ - Focus on: approach, scope, constraints, priorities
96
+
97
+ **Example Interaction (LOW detail):**
60
98
  > 📝 I need to clarify some details for this feature:
61
99
  > 1. What authentication provider should we use? [default: A]
62
100
  > A) JWT (Local) ⭐
@@ -66,19 +104,235 @@ Provide a single, intelligent entry point for all development work (New Features
66
104
  > 2. Should we implement audit logs for this? [default: B]
67
105
  > A) Yes
68
106
  > B) No ⭐
107
+ >
108
+ > Your answers (or Enter for defaults): _
109
+
110
+ **4. Refined Objective Generation (if Manual):**
111
+
112
+ After refinement, generate clear objective statement:
113
+ ```
114
+ ✅ Refined Objective:
115
+
116
+ [Clear 1-2 paragraph description of WHAT will be implemented]
117
+
118
+ **Scope**:
119
+ - [List in-scope items]
120
+
121
+ **Out of Scope**:
122
+ - [List out-of-scope items]
123
+
124
+ Is this correct? (Yes/Edit/Cancel): _
125
+ ```
126
+
127
+ **5. Documentation Compliance Check:**
128
+
129
+ Read relevant documentation:
130
+ - `ai-instructions.md` (NEVER/ALWAYS rules)
131
+ - `docs/architecture.md` (patterns, structure)
132
+ - `docs/code-standards.md` (naming, quality)
133
+ - IF auth/security: `specs/security.md`
134
+ - IF database: `docs/data-model.md`
135
+ - IF API: `docs/api.md`
136
+
137
+ Compare refined objective against documentation:
138
+
139
+ **IF deviation detected:**
140
+ ```
141
+ 🚨 POTENTIAL DEVIATION
142
+
143
+ From [document]:
144
+ ❌ NEVER: [rule being violated]
145
+ ✅ ALWAYS: [rule being ignored]
146
+
147
+ Your request: [conflicting part]
148
+
149
+ Options:
150
+ A) Modify request to align with documentation
151
+ B) Proceed with deviation (requires justification)
152
+ C) Cancel
153
+
154
+ Your choice: _
155
+ ```
156
+
157
+ **IF user chooses B (Override):**
158
+ ```
159
+ ⚠️ OVERRIDE CONFIRMATION
160
+
161
+ You are implementing something that deviates from:
162
+ - [list violated documents/rules]
163
+
164
+ Type "I UNDERSTAND THE RISKS" to proceed: _
165
+
166
+ Provide justification: _
167
+ ```
69
168
 
70
169
  ---
71
170
  ## Phase 2: Planning & Documentation
72
171
 
73
- 1. **`spec.md`**: Generate/Update in `specs/ai-flow/work/[task-name]/spec.md`.
74
- - Ask for user approval.
75
- 2. **`plan.md`**: Generate technical approach and task list.
76
- - Assign Feature Number (NNN).
77
- - Story Points estimation (Fibonacci).
78
- - Phase organization.
79
- - Ask for user approval.
80
- 3. **`task.md`**: Generate the checklist of tactical tasks.
81
- 4. **`status.json`**: Initialize/Update metadata (progress, branch, validation state).
172
+ **1. Read Required Documentation (MANDATORY)**
173
+
174
+ Before generating work.md, read relevant documentation:
175
+ - `ai-instructions.md` Extract NEVER/ALWAYS rules
176
+ - `docs/architecture.md` Identify layer, pattern, file structure
177
+ - `docs/code-standards.md` → Extract naming conventions, quality rules
178
+ - IF touching database: `docs/data-model.md`
179
+ - IF auth/security: `specs/security.md`
180
+ - IF creating/modifying API: `docs/api.md`
181
+ - IF tests required: `docs/testing.md`
182
+
183
+ **2. Analyze Existing Codebase (MANDATORY)**
184
+
185
+ Find similar features/patterns in codebase:
186
+ - Identify existing files to use as reference (e.g., ProductService.ts for UserService.ts)
187
+ - Check naming conventions in actual code
188
+ - Verify architectural consistency
189
+ - Look for reusable components/services
190
+
191
+ **3. Generate work.md**
192
+
193
+ Create single consolidated file: `.ai-flow/work/[task-name]/work.md`
194
+
195
+ **Structure** (~30-40 lines):
196
+
197
+ ```markdown
198
+ # [Type]: [Feature Name]
199
+
200
+ ## Context
201
+ **Source**: HU-001-002 | Roadmap 2.3 | Manual [+ DEVIATION if override]
202
+ **SP**: 5 | **Branch**: feature/user-auth | **Deps**: None
203
+
204
+ ## Objective
205
+ [1-2 clear paragraphs describing WHAT will be implemented]
206
+
207
+ ## Documentation Constraints
208
+ **Read**: ai-instructions.md, architecture.md, code-standards.md, [security.md]
209
+
210
+ **Key Rules**:
211
+ - ✅ ALWAYS: [List specific rules that apply]
212
+ - ❌ NEVER: [List specific prohibitions]
213
+ - 📐 Pattern: [Architectural pattern from docs]
214
+ - 📁 Location: [File structure from architecture.md]
215
+
216
+ ## Approach
217
+ **Layer**: [Data | Business Logic | API | UI]
218
+ **Files**: [List files to create/modify]
219
+ **Reference**: [Existing file to follow as pattern]
220
+
221
+ **Phases**:
222
+ 1. [Phase 1 description]
223
+ 2. [Phase 2 description]
224
+ 3. [Phase 3 description]
225
+ 4. [Phase 4 description]
226
+
227
+ ## Tasks
228
+ [SEE TASK GENERATION LOGIC BELOW]
229
+
230
+ ## Validation
231
+ - [ ] All NEVER/ALWAYS rules followed
232
+ - [ ] Tests pass (coverage per docs/testing.md)
233
+ - [ ] No hardcoded secrets
234
+ - [ ] Follows existing patterns
235
+ - [ ] [Add specific validations based on type]
236
+ ```
237
+
238
+ **Task Generation Logic:**
239
+
240
+ **IF source is User Story:**
241
+ ```python
242
+ tasks = read_user_story_tasks()
243
+ if tasks.are_detailed(): # Has: path, constraints, SP, deps
244
+ work_md.tasks = """
245
+ **Source**: planning/user-stories/EP-XXX/HU-XXX-XXX.md
246
+
247
+ Tasks already detailed in User Story (see linked file).
248
+
249
+ **Summary**: [N] tasks, [X] SP total
250
+ - [Brief phase breakdown]
251
+ """
252
+ else:
253
+ work_md.tasks = generate_detailed_tasks()
254
+ ```
255
+
256
+ **IF source is Roadmap:**
257
+ ```python
258
+ feature = read_roadmap_feature()
259
+ if feature.has_detailed_tasks():
260
+ work_md.tasks = """
261
+ **Source**: planning/roadmap.md Feature X.X
262
+
263
+ Tasks already detailed in Roadmap (see linked file).
264
+
265
+ **Summary**: [N] tasks, [X] SP total
266
+ """
267
+ else:
268
+ work_md.tasks = generate_detailed_tasks()
269
+ ```
270
+
271
+ **IF source is Manual OR tasks need expansion:**
272
+
273
+ Generate detailed tasks with this format:
274
+ ```markdown
275
+ ## Tasks
276
+ **Source**: Manual | Roadmap X.X (expanded) | HU-XXX-XXX (expanded)
277
+
278
+ - [ ] T001 [D] Create User entity → src/entities/User.ts • 1 SP
279
+ - Follow Product.ts pattern, hash passwords (bcrypt)
280
+ - [ ] T002 [L] UserService.register() → src/services/ • 2 SP
281
+ - Validate email, hash password, return JWT (deps: T001)
282
+ - [ ] T003 [A] POST /users/register → src/controllers/ • 1 SP
283
+ - Return 201, rate limit, follow api.md (deps: T002)
284
+ - [ ] T004 [T] Unit tests → tests/services/ • 2 SP
285
+ - 80% coverage, edge cases (deps: T002)
286
+ ```
287
+
288
+ **Task Detail Requirements:**
289
+ - Specific file path
290
+ - Pattern/reference to follow
291
+ - Key constraints from docs
292
+ - Dependencies (if applicable)
293
+ - Story Points
294
+
295
+ **4. Generate status.json**
296
+
297
+ Create: `.ai-flow/work/[task-name]/status.json`
298
+
299
+ ```json
300
+ {
301
+ "type": "feature|refactor|fix",
302
+ "source": "HU-001-002|roadmap-2.3|manual",
303
+ "deviation": false,
304
+ "progress": {
305
+ "totalTasks": 4,
306
+ "completedTasks": 0,
307
+ "percentage": 0
308
+ },
309
+ "git": {
310
+ "branchName": "feature/user-auth",
311
+ "commits": []
312
+ },
313
+ "timestamps": {
314
+ "created": "2025-12-22T23:00:00-03:00",
315
+ "lastUpdated": "2025-12-22T23:00:00-03:00"
316
+ },
317
+ "validation": {
318
+ "tests": { "executed": false },
319
+ "lint": { "executed": false }
320
+ }
321
+ }
322
+ ```
323
+
324
+ **5. User Approval**
325
+
326
+ Show work.md for review:
327
+ ```
328
+ 📄 Generated: .ai-flow/work/[task-name]/work.md
329
+
330
+ Review work.md? (Yes/Edit/No): _
331
+ ```
332
+
333
+ - **Yes**: Proceed to Phase 3
334
+ - **Edit**: Allow user to modify work.md, then re-read
335
+ - **No**: Cancel workflow
82
336
 
83
337
  ---
84
338
  ## Phase 3: Execution (Branch Creation)
@@ -92,24 +346,56 @@ Provide a single, intelligent entry point for all development work (New Features
92
346
  2. **Execute**: `git checkout -b [branch-name]`.
93
347
  3. **Update `status.json`**: Record branch name and start timestamp.
94
348
  4. **Implementation**: Proceed according to the selected mode (Auto, Phase-by-phase, Task-by-task).
349
+ - Follow tasks in `work.md`
350
+ - Update task checkboxes as completed
351
+ - Update `status.json` progress
95
352
 
96
353
  ---
97
354
  ## Phase 4: Finalization & Archiving
98
355
 
99
- **When all tasks in `task.md` are complete (✅) and validated:**
356
+ **When all tasks in `work.md` are complete (✅) and validated:**
357
+
358
+ 1. **Update Source Documentation (Automatic - ALWAYS UPDATE BOTH IF BOTH EXIST)**:
359
+
360
+ **Step 1a: Check and Update User Story (if exists)**
361
+ - Look for User Story reference in `status.json` or work context
362
+ - IF User Story `HU-XXX-XXX` exists:
363
+ - Read `planning/user-stories/EP-XXX/HU-XXX-XXX.md`
364
+ - Mark ALL DoD checklist items as complete: `- [ ]` → `- [x]`
365
+ - Add completion timestamp comment: `<!-- Completed: YYYY-MM-DD HH:MM -->`
366
+ - Save file
367
+
368
+ **Step 1b: Check and Update Roadmap (if exists)**
369
+ - Look for Feature reference in `status.json` or work context
370
+ - IF Feature exists in `planning/roadmap.md`:
371
+ - Read `planning/roadmap.md`
372
+ - Find the Feature section by name/number
373
+ - Mark Feature checkbox as complete: `- [ ]` → `- [x]`
374
+ - Save file
375
+
376
+ **Step 1c: Show Completion Summary**
377
+ - IF both updated: "✅ Updated roadmap.md (Feature X.X) AND HU-XXX-XXX.md (Y/Y DoD items)"
378
+ - IF only roadmap: "✅ Updated roadmap.md (Feature X.X)"
379
+ - IF only user story: "✅ Updated HU-XXX-XXX.md (Y/Y DoD items)"
380
+ - IF neither exists: "⚠️ No roadmap or user story found to update"
381
+
382
+ **Error Handling:**
383
+ - If file doesn't exist: Log warning, continue with other file
384
+ - If checkbox not found: Log warning with helpful message, continue
385
+ - Never fail the entire finalization due to documentation update errors
100
386
 
101
- 1. **Sugerir Próximos Pasos**:
387
+ 2. **Sugerir Próximos Pasos**:
102
388
  - **`/flow-check`**: Ejecutar tests y revisión de código combinada.
103
389
  - **`/flow-docs-sync`**: Sincronizar la documentación técnica.
104
390
  - **`/flow-commit`**: Crear commits atómicos.
105
391
 
106
- 2. **Proceso de Archivado (Automático tras aprobación)**:
392
+ 3. **Proceso de Archivado (Automático tras aprobación)**:
107
393
  - Una vez el usuario confirma que el trabajo está listo para ser cerrado:
108
- - **Mover**: `specs/ai-flow/work/[task-name]/` → `specs/ai-flow/archive/YYYY-MM/[task-name]/`.
394
+ - **Mover**: `.ai-flow/work/[task-name]/` → `.ai-flow/archive/YYYY-MM/[task-name]/`.
109
395
  - **Actualizar `status.json`**: Cambiar `status` a `"COMPLETED"` y registrar `timestamps.completed`.
110
396
  - **Cleanup**: Mantener limpia la carpeta `work` para que `/flow-work` detecte solo tareas activas.
111
397
 
112
- 3. **Resumen Final**:
398
+ 4. **Resumen Final**:
113
399
  - Mostrar estadísticas finales de tiempo, archivos y cobertura antes de archivar.
114
400
 
115
401
  ---
@@ -121,7 +407,7 @@ Provide a single, intelligent entry point for all development work (New Features
121
407
  - Detailed Refactor logic → `@flow-work-refactor.md`
122
408
  - Detailed Fix logic → `@flow-work-fix.md`
123
409
  - Resume logic → `@flow-work-resume.md`
124
- - **State Persistence**: Always read/write to `specs/ai-flow/work/[name]/status.json` to maintain state across sessions.
410
+ - **State Persistence**: Always read/write to `.ai-flow/work/[name]/status.json` to maintain state across sessions.
125
411
 
126
412
  ---
127
413
  **BEGIN EXECUTION when user runs `/flow-work [args]`**
@@ -322,7 +322,7 @@ C) Cancel /flow-build (fix manually first)
322
322
  "reason": "Final documentation complete and up-to-date"
323
323
  },
324
324
  "phase9": {
325
- "file": "docs/roadmap.md",
325
+ "file": "planning/roadmap.md",
326
326
  "exists": false,
327
327
  "consistencyScore": 0,
328
328
  "recommendation": "SKIP",
@@ -330,7 +330,7 @@ C) Cancel /flow-build (fix manually first)
330
330
  "reason": "Project already implemented - roadmap not needed for existing code"
331
331
  },
332
332
  "phase10": {
333
- "file": "docs/user-stories/",
333
+ "file": "planning/user-stories/",
334
334
  "exists": false,
335
335
  "consistencyScore": 0,
336
336
  "recommendation": "SKIP",
@@ -11,13 +11,13 @@ Break down technical roadmap tasks into user-centric Agile requirements (User St
11
11
 
12
12
  // turbo
13
13
  ### Step 10.1: Load Context from Roadmap
14
- Extract context variables and epics from `docs/roadmap.md`.
14
+ Extract context variables and epics from `planning/roadmap.md`.
15
15
 
16
16
  ### Step 10.2: Select Scope
17
17
  Choose: All Epics, Sprint 1, or Specific Epics.
18
18
 
19
19
  ### Step 10.3: Generate User Story Documents
20
- Create `docs/user-stories/EP-XXX/HU-XXX-YYY.md`.
20
+ Create `planning/user-stories/EP-XXX/HU-XXX-YYY.md`.
21
21
 
22
22
  **Frontend specific Acceptance Criteria focus:**
23
23
  - **UX/Interaction:** "When I click X, Y happens with a smooth transition."
@@ -26,7 +26,7 @@ Create `docs/user-stories/EP-XXX/HU-XXX-YYY.md`.
26
26
  - **Validation:** "Show inline error message if field is empty."
27
27
 
28
28
  ### Step 10.4: Generate Test Cases
29
- Create `docs/user-stories/EP-XXX/tests/TC-XXX-YYY.md`.
29
+ Create `planning/user-stories/EP-XXX/tests/TC-XXX-YYY.md`.
30
30
 
31
31
  ---
32
32
  _Version: 4.2 (Antigravity Optimized)_
@@ -87,7 +87,7 @@ Check for gaps.
87
87
 
88
88
  ---
89
89
 
90
- ### Step 9.6: Generate Document (docs/roadmap.md)
90
+ ### Step 9.6: Generate Document (planning/roadmap.md)
91
91
 
92
92
  ---
93
93
  _Version: 4.2 (Antigravity Optimized)_
@@ -7,6 +7,8 @@ description: Frontend Master Prompt - Discovery, Architecture & Setup
7
7
  **YOU ARE AN EXPERT FRONTEND ARCHITECT AND DOCUMENTATION SPECIALIST.**
8
8
 
9
9
  Your mission is to guide the user through creating **comprehensive, production-ready documentation** for their frontend project through an interactive questionnaire that follows the dependency-aware order specified below.
10
+
11
+ **🚀 MODO AGENTE ACTIVADO:** No solicites permiso para usar herramientas (leer archivos, crear docs). Actúa proactivamente siguiendo el flujo interactivo. El usuario ya dio su consentimiento al ejecutar este comando.
10
12
  ---
11
13
  ## 🎯 Ejecución de Fase Específica
12
14
 
@@ -8,6 +8,8 @@ description: Combined Validation workflow for Tests and Code Review
8
8
 
9
9
  Your mission is to validate code quality and functionality through a combined workflow when the user executes `/flow-check`.
10
10
 
11
+ **🚀 MODO AGENTE ACTIVADO:** No solicites permiso para ejecutar tests, linting o revisiones de tipos. Actúa proactivamente realizando el análisis completo y entregando el informe de calidad.
12
+
11
13
  ---
12
14
  ## Command: `/flow-check`
13
15
 
@@ -8,6 +8,8 @@ description: Conventional Commits Automation
8
8
 
9
9
  Your mission is to analyze changes, group them intelligently, and create atomic commits following Conventional Commits standard when the user executes `/flow-commit`.
10
10
 
11
+ **🚀 MODO AGENTE ACTIVADO:** No solicites permiso para analizar cambios o preparar grupos de archivos. Actúa proactivamente y solicita confirmación *solo* antes de la ejecución final de los commits.
12
+
11
13
  ---
12
14
  ## Command: `/flow-commit`
13
15
 
@@ -6,7 +6,9 @@ description: Documentation Sync & Update Flow
6
6
 
7
7
  **YOU ARE AN EXPERT FRONTEND ARCHITECT AND DOCUMENTATION SPECIALIST.**
8
8
 
9
- Your mission is to detect changes in the frontend codebase and update the project documentation automatically when the user executes `/flow-docs-sync`.
9
+ Your mission is to detect changes in the codebase and update the project documentation automatically when the user executes `/flow-docs-sync`.
10
+
11
+ **🚀 MODO AGENTE ACTIVADO:** No solicites permiso para ejecutar comandos turbo de análisis (ls, cat, etc.). Actúa proactivamente analizando los cambios y solicitando confirmación *solo* antes de escribir las actualizaciones finales en los documentos.
10
12
  ---
11
13
  ## Command: `/flow-docs-sync`
12
14
 
@@ -9,33 +9,39 @@ This file contains the detailed execution logic for implementing new features, i
9
9
  ---
10
10
  ## 🚀 Feature Implementation Flow
11
11
 
12
- ### 1. Specification (auto-skip if User Story)
13
- - Extract requirements from User Story or Roadmap.
14
- - If interactive, ask clarification questions (Multiple Choice).
15
- - Save to `specs/ai-flow/work/[feature]/spec.md`.
12
+ ### 1. Context Analysis (auto-skip if User Story with detailed tasks)
13
+ - Extract requirements from User Story or Roadmap
14
+ - If User Story has detailed tasks: Skip to work.md generation
15
+ - If Roadmap or Manual: Analyze and refine
16
+ - Read relevant documentation (ai-instructions.md, architecture.md, etc.)
16
17
 
17
- ### 2. Technical Planning
18
- - Analyze codebase for patterns.
19
- - Generate `plan.md` with Fibonacci estimation.
20
- - Organize tasks into layers (Data, Logic, API, Test, Docs).
21
- - **User Confirmation Required.**
18
+ ### 2. work.md Generation
19
+ - Generate consolidated work.md (see Phase 2 in flow-work.md)
20
+ - Include: Context, Objective, Constraints, Approach, Tasks, Validation
21
+ - **User Confirmation Required**
22
22
 
23
23
  ### 3. Progressive Implementation
24
24
  Choose mode:
25
- - **Auto**: Complete all tasks without pausing.
26
- - **Phase-by-phase**: Pause and validate after each phase.
27
- - **Task-by-task**: Pause after each task.
25
+ - **Auto**: Complete all tasks without pausing
26
+ - **Phase-by-phase**: Pause and validate after each phase
27
+ - **Task-by-task**: Pause after each task
28
+
29
+ Follow tasks in `work.md`:
30
+ - Update checkboxes as completed
31
+ - Update `status.json` progress
32
+ - Follow patterns and constraints specified
28
33
 
29
34
  ### 4. Definition of Done (DoD)
30
- - If HU mode: Validate against Gherkin scenarios.
31
- - Run tests and linting.
32
- - Perform security check.
35
+ - If HU mode: Validate against Gherkin scenarios
36
+ - Run tests and linting
37
+ - Perform security check
38
+ - **Update completion status** in source documents (see Phase 4 Step 1 in flow-work.md)
33
39
 
34
40
  ---
35
41
  ## 🌿 Git Branching Strategy
36
- - Generate slug from name.
37
- - Execute `git checkout -b feature/[slug]`.
38
- - Maintain `status.json` with commit history.
42
+ - Generate slug from name
43
+ - Execute `git checkout -b feature/[slug]`
44
+ - Maintain `status.json` with commit history
39
45
 
40
46
  ---
41
47
  ## 📦 status.json Persistence
@@ -10,23 +10,26 @@ This file contains the detailed execution logic for bug fixes, imported by `@flo
10
10
  ## 🔧 Bug Fix Workflow
11
11
 
12
12
  ### 1. Classification
13
- - **QUICK**: 1 file, obvious cause (typo, null check).
14
- - **COMPLEX**: Multiple files, investigation needed.
13
+ - **QUICK**: 1 file, obvious cause (typo, null check)
14
+ - **COMPLEX**: Multiple files, investigation needed
15
15
 
16
- ### 2. Deep Analysis (Complex Fix)
17
- - Create work directory.
18
- - Document root cause in `analysis.md`.
19
- - Map side effects.
16
+ ### 2. Analysis & work.md Generation
17
+ - **QUICK**: Minimal work.md (objective + 1-2 tasks)
18
+ - **COMPLEX**: Full work.md with root cause analysis
19
+ - Document root cause in Objective section
20
+ - Map side effects in Approach section
21
+ - Generate detailed tasks
20
22
 
21
23
  ### 3. Implementation
22
- - **Test-First Approach**: Add a failing test case that reproduces the bug before fixing it.
23
- - Apply the fix.
24
- - Verify tests pass.
24
+ - **Test-First Approach**: Add failing test that reproduces bug
25
+ - Apply the fix following work.md tasks
26
+ - Verify tests pass
27
+ - **Update completion status** if fix was tracked in roadmap/user stories (see Phase 4 Step 1 in flow-work.md)
25
28
 
26
29
  ---
27
30
  ## 🌿 Git Branching Strategy
28
- - **QUICK**: Usually work on current branch.
29
- - **COMPLEX**: Execute `git checkout -b fix/[slug]`.
31
+ - **QUICK**: Usually work on current branch
32
+ - **COMPLEX**: Execute `git checkout -b fix/[slug]`
30
33
 
31
34
  ---
32
35
  ## 📦 status.json Persistence
@@ -9,23 +9,29 @@ This file contains the detailed execution logic for code refactoring, imported b
9
9
  ---
10
10
  ## 🔄 Refactoring Workflow
11
11
 
12
- ### 1. Scope Identification
13
- - Map affected files and dependencies.
14
- - Confirm no behavior change is expected.
15
- - Validate against architecture patterns.
16
-
17
- ### 2. Implementation Strategy
18
- - Use `plan.md` to map extraction/renaming/moving steps.
19
- - Set "No behavior change" as the primary constraint.
20
-
21
- ### 3. Execution & Safety
22
- - Update imports and references across the codebase.
23
- - **Critical**: Existing tests must pass without modification (unless test itself is refactored).
24
- - Run `/flow-check` to verify no regressions.
12
+ ### 1. Scope Identification & work.md Generation
13
+ - Map affected files and dependencies
14
+ - Confirm no behavior change expected
15
+ - Validate against architecture patterns
16
+ - Generate work.md with:
17
+ - Clear scope (what to extract/move/rename)
18
+ - Affected files list
19
+ - Step-by-step tasks
20
+ - "No behavior change" constraint
21
+
22
+ ### 2. Implementation
23
+ - Follow work.md tasks sequentially
24
+ - Update imports and references across codebase
25
+ - **Critical**: Existing tests must pass without modification (unless test itself is refactored)
26
+
27
+ ### 3. Validation
28
+ - Run `/flow-check` to verify no regressions
29
+ - Confirm all tests pass
30
+ - **Update completion status** if refactor was tracked in roadmap/user stories (see Phase 4 Step 1 in flow-work.md)
25
31
 
26
32
  ---
27
33
  ## 🌿 Git Branching Strategy
28
- - Execute `git checkout -b refactor/[slug]`.
34
+ - Execute `git checkout -b refactor/[slug]`
29
35
 
30
36
  ---
31
37
  ## 📦 status.json Persistence