ai-flow-dev 2.2.0 β†’ 2.2.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 (68) hide show
  1. package/README.md +13 -17
  2. package/dist/cli.js +8 -2
  3. package/dist/cli.js.map +1 -1
  4. package/package.json +1 -1
  5. package/prompts/backend/flow-build-phase-0.md +286 -4
  6. package/prompts/backend/flow-build-phase-1.md +19 -0
  7. package/prompts/backend/flow-build-phase-2.md +19 -0
  8. package/prompts/backend/flow-build-phase-3.md +19 -0
  9. package/prompts/backend/flow-build-phase-4.md +19 -0
  10. package/prompts/backend/flow-build-phase-5.md +19 -0
  11. package/prompts/backend/flow-build-phase-6.md +19 -0
  12. package/prompts/backend/flow-build-phase-7.md +19 -0
  13. package/prompts/backend/flow-build-phase-9.md +14 -0
  14. package/prompts/backend/flow-check-review.md +20 -0
  15. package/prompts/backend/flow-check-test.md +14 -0
  16. package/prompts/backend/flow-check.md +65 -0
  17. package/prompts/backend/flow-commit.md +51 -0
  18. package/prompts/backend/flow-docs-sync.md +53 -53
  19. package/prompts/backend/flow-work-feature.md +42 -0
  20. package/prompts/backend/flow-work-fix.md +33 -0
  21. package/prompts/backend/flow-work-refactor.md +32 -0
  22. package/prompts/backend/flow-work-resume.md +32 -0
  23. package/prompts/backend/flow-work.md +127 -0
  24. package/prompts/frontend/flow-build-phase-0.md +363 -35
  25. package/prompts/frontend/flow-build-phase-1.md +433 -404
  26. package/prompts/frontend/flow-build-phase-2.md +508 -872
  27. package/prompts/frontend/flow-build-phase-3.md +629 -562
  28. package/prompts/frontend/flow-build-phase-4.md +438 -382
  29. package/prompts/frontend/flow-build-phase-5.md +559 -362
  30. package/prompts/frontend/flow-build-phase-6.md +383 -452
  31. package/prompts/frontend/flow-build-phase-7.md +818 -392
  32. package/prompts/frontend/flow-build-phase-9.md +14 -0
  33. package/prompts/frontend/flow-check-review.md +20 -0
  34. package/prompts/frontend/flow-check-test.md +14 -0
  35. package/prompts/frontend/flow-check.md +65 -0
  36. package/prompts/frontend/flow-commit.md +51 -0
  37. package/prompts/frontend/flow-docs-sync.md +36 -34
  38. package/prompts/frontend/flow-work-feature.md +42 -0
  39. package/prompts/frontend/flow-work-fix.md +33 -0
  40. package/prompts/frontend/flow-work-refactor.md +32 -0
  41. package/prompts/frontend/flow-work-resume.md +32 -0
  42. package/prompts/frontend/flow-work.md +127 -0
  43. package/prompts/mobile/flow-build-phase-0.md +366 -37
  44. package/prompts/mobile/flow-build-phase-1.md +438 -493
  45. package/prompts/mobile/flow-build-phase-2.md +458 -464
  46. package/prompts/mobile/flow-build-phase-3.md +613 -487
  47. package/prompts/mobile/flow-build-phase-4.md +439 -258
  48. package/prompts/mobile/flow-build-phase-5.md +582 -250
  49. package/prompts/mobile/flow-build-phase-6.md +389 -359
  50. package/prompts/mobile/flow-build-phase-7.md +871 -285
  51. package/prompts/mobile/flow-build-phase-9.md +14 -0
  52. package/prompts/mobile/flow-check-review.md +20 -0
  53. package/prompts/mobile/flow-check-test.md +14 -0
  54. package/prompts/mobile/flow-check.md +65 -0
  55. package/prompts/mobile/flow-commit.md +51 -0
  56. package/prompts/mobile/flow-docs-sync.md +37 -40
  57. package/prompts/mobile/flow-work-feature.md +42 -0
  58. package/prompts/mobile/flow-work-fix.md +33 -0
  59. package/prompts/mobile/flow-work-refactor.md +32 -0
  60. package/prompts/mobile/flow-work-resume.md +32 -0
  61. package/prompts/mobile/flow-work.md +127 -0
  62. package/prompts/shared/smart-skip-preflight.md +214 -0
  63. package/prompts/backend/flow-dev-commit.md +0 -829
  64. package/prompts/backend/flow-dev-feature.md +0 -1948
  65. package/prompts/backend/flow-dev-fix.md +0 -952
  66. package/prompts/backend/flow-dev-refactor.md +0 -690
  67. package/prompts/backend/flow-dev-review.md +0 -372
  68. package/prompts/backend/flow-dev-work.md +0 -1081
@@ -12,6 +12,25 @@
12
12
 
13
13
  Define security policies, authentication, authorization, and compliance requirements.
14
14
 
15
+ ---
16
+
17
+ ## πŸ” Pre-Flight Check (Smart Skip Logic)
18
+
19
+ > πŸ“Ž **Reference:** See [prompts/shared/smart-skip-preflight.md](../shared/smart-skip-preflight.md) for the complete smart skip logic.
20
+
21
+ **Execute Pre-Flight Check for Phase 4:**
22
+
23
+ - **Target File**: `specs/security.md`
24
+ - **Phase Name**: "SECURITY & AUTHENTICATION"
25
+ - **Key Items**: Auth strategy, encryption, security patterns, compliance
26
+ - **Typical Gaps**: Compliance requirements, audit logging, security policies
27
+
28
+ **Proceed with appropriate scenario based on audit data from `.ai-flow/cache/audit-data.json`**
29
+
30
+ ---
31
+
32
+ ## Phase 4 Questions (Full Mode)
33
+
15
34
  **4.1 Authentication Method**
16
35
 
17
36
  ```
@@ -12,6 +12,25 @@
12
12
 
13
13
  Establish code quality rules, naming conventions, and development practices.
14
14
 
15
+ ---
16
+
17
+ ## πŸ” Pre-Flight Check (Smart Skip Logic)
18
+
19
+ > πŸ“Ž **Reference:** See [prompts/shared/smart-skip-preflight.md](../shared/smart-skip-preflight.md) for the complete smart skip logic.
20
+
21
+ **Execute Pre-Flight Check for Phase 5:**
22
+
23
+ - **Target File**: `docs/code-standards.md`
24
+ - **Phase Name**: "CODE STANDARDS"
25
+ - **Key Items**: Linters, formatters, naming conventions, code review process
26
+ - **Typical Gaps**: Team-specific conventions, code review workflow
27
+
28
+ **Proceed with appropriate scenario based on audit data from `.ai-flow/cache/audit-data.json`**
29
+
30
+ ---
31
+
32
+ ## Phase 5 Questions (Full Mode)
33
+
15
34
  **5.1 Code Style & Formatting**
16
35
 
17
36
  ```
@@ -18,6 +18,25 @@ Define testing approach, tools, and quality gates.
18
18
 
19
19
  **🚨 Important: All projects require basic testing. Scope determines depth, not whether to test.**
20
20
 
21
+ ---
22
+
23
+ ## πŸ” Pre-Flight Check (Smart Skip Logic)
24
+
25
+ > πŸ“Ž **Reference:** See [prompts/shared/smart-skip-preflight.md](../shared/smart-skip-preflight.md) for the complete smart skip logic.
26
+
27
+ **Execute Pre-Flight Check for Phase 6:**
28
+
29
+ - **Target File**: `docs/testing.md`
30
+ - **Phase Name**: "TESTING STRATEGY"
31
+ - **Key Items**: Test framework, coverage targets, test types, CI/CD integration
32
+ - **Typical Gaps**: E2E strategy, load testing, performance testing
33
+
34
+ **Proceed with appropriate scenario based on audit data from `.ai-flow/cache/audit-data.json`**
35
+
36
+ ---
37
+
38
+ ## Phase 6 Questions (Full Mode)
39
+
21
40
  **6.1 Testing Framework**
22
41
 
23
42
  ```
@@ -12,6 +12,25 @@
12
12
 
13
13
  Define deployment, monitoring, and operational practices.
14
14
 
15
+ ---
16
+
17
+ ## πŸ” Pre-Flight Check (Smart Skip Logic)
18
+
19
+ > πŸ“Ž **Reference:** See [prompts/shared/smart-skip-preflight.md](../shared/smart-skip-preflight.md) for the complete smart skip logic.
20
+
21
+ **Execute Pre-Flight Check for Phase 7:**
22
+
23
+ - **Target File**: `docs/deployment.md`
24
+ - **Phase Name**: "OPERATIONS & DEPLOYMENT"
25
+ - **Key Items**: CI/CD pipeline, deployment platform, monitoring, logging
26
+ - **Typical Gaps**: Incident runbooks, disaster recovery, scaling strategy
27
+
28
+ **Proceed with appropriate scenario based on audit data from `.ai-flow/cache/audit-data.json`**
29
+
30
+ ---
31
+
32
+ ## Phase 7 Questions (Full Mode)
33
+
15
34
  **7.1 Deployment Environment**
16
35
 
17
36
  ```
@@ -298,6 +298,20 @@ COVERAGE VALIDATION
298
298
 
299
299
  ### Step 9.6: Generate Document (5-10 min)
300
300
 
301
+ ## Architectural Markers Key
302
+
303
+ | Marker | Name | Description |
304
+ |--------|------|-------------|
305
+ | **[I]** | Infrastructure | Technical setup, configuration, and core utilities |
306
+ | **[E]** | Entity | Database models and schema definitions |
307
+ | **[R]** | Repository | Data access layer (Prisma ORM) |
308
+ | **[S]** | Service | Business logic and use cases |
309
+ | **[C]** | Controller | API endpoints and request handling |
310
+ | **[T]** | Tests | Unit, integration, and E2E testing |
311
+ | **[D]** | Documentation | Technical and API documentation |
312
+
313
+ ---
314
+
301
315
  **Write `docs/roadmap.md` with this structure:**
302
316
 
303
317
  ```markdown
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: Internal logic for Code Review within flow-check
3
+ ---
4
+
5
+ # AI Flow - Review Logic
6
+
7
+ Performs professional multi-aspect code review.
8
+
9
+ ---
10
+ ## πŸ” Review Aspects
11
+ 1. **Security**: OWASP patterns, secrets, auth.
12
+ 2. **Performance**: N+1, leaks, async blocking.
13
+ 3. **Tests**: Edge cases, quality, coverage.
14
+ 4. **Architecture**: SOLID, DRY, Patterns.
15
+ 5. **Quality**: Naming, complexity, linting.
16
+
17
+ ---
18
+ ## πŸ“Š Reporting
19
+ - Prioritize: πŸ”΄ Critical, 🟑 Warning, 🟒 Suggestion.
20
+ - Save report to `.ai-flow/reviews/`.
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: Internal logic for Testing within flow-check
3
+ ---
4
+
5
+ # AI Flow - Testing Logic
6
+
7
+ Executes automated tests and analyzes results.
8
+
9
+ ---
10
+ ## πŸ§ͺ Test Flow
11
+ 1. Identify project test runner (detected from `package.json`, etc.).
12
+ 2. Execute full suite or targeted tests.
13
+ 3. Parse results (Passing/Failing/Coverage).
14
+ 4. Update `status.json` validation section.
@@ -0,0 +1,65 @@
1
+ ---
2
+ description: Combined Validation workflow for Tests and Code Review
3
+ ---
4
+
5
+ # AI Flow - Unified Check Workflow
6
+
7
+ **YOU ARE AN EXPERT QUALITY ASSURANCE AND CODE REVIEW SPECIALIST.**
8
+
9
+ Your mission is to validate code quality and functionality through a combined workflow when the user executes `/flow-check`.
10
+
11
+ ---
12
+ ## Command: `/flow-check`
13
+
14
+ ### Objective
15
+ Provide a comprehensive validation suite including automated tests and professional code review in a single, prioritized report.
16
+
17
+ ---
18
+ ## Workflow: 3 Stages
19
+
20
+ ### Stage 1: Automated Testing & Analysis
21
+ - **Tests**: Execute `npm test` (or project equivalent).
22
+ - **Lint**: Execute linting rules.
23
+ - **Types**: Execute type checking (`tsc`).
24
+ - **Update `status.json`**: Record results in `validation` section.
25
+
26
+ ### Stage 2: Professional Code Review
27
+ Analyze changes from 5 perspectives:
28
+ 1. **πŸ”’ Security**: SQLi, XSS, Secrets, Auth patterns.
29
+ 2. **⚑ Performance**: N+1 queries, memory leaks, blocking ops.
30
+ 3. **πŸ§ͺ Testing**: Coverage, edge cases, test quality.
31
+ 4. **πŸ“ Architecture**: SOLID, DRY, Coupling.
32
+ 5. **🎨 Code Quality**: Naming, complexity, consistency.
33
+
34
+ ### Stage 3: Summary Report
35
+ Generate a prioritized report:
36
+ - πŸ”΄ **Critical Issues**: Fix immediately.
37
+ - 🟑 **Warnings**: Fix before merge.
38
+ - 🟒 **Suggestions**: Improvement opportunities.
39
+
40
+ ---
41
+ ## Integration with `status.json`
42
+
43
+ Automatically update the `validation` section:
44
+ ```json
45
+ "validation": {
46
+ "tests": { "executed": true, "passed": true, "summary": "X/Y passed" },
47
+ "lint": { "executed": true, "passed": true },
48
+ "typeCheck": { "executed": true, "passed": true }
49
+ }
50
+ ```
51
+
52
+ And update the `finalChecklist`:
53
+ ```json
54
+ "finalChecklist": {
55
+ "testsComplete": true
56
+ }
57
+ ```
58
+
59
+ ---
60
+ ## Delegation
61
+ - Detailed Test execution β†’ `@flow-check-test.md`
62
+ - Detailed Review logic β†’ `@flow-check-review.md`
63
+
64
+ ---
65
+ **BEGIN EXECUTION when user runs `/flow-check`**
@@ -0,0 +1,51 @@
1
+ ---
2
+ description: Conventional Commits Automation
3
+ ---
4
+
5
+ # AI Flow - Commit Automation
6
+
7
+ **YOU ARE AN EXPERT GIT WORKFLOW SPECIALIST.**
8
+
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
+
11
+ ---
12
+ ## Command: `/flow-commit`
13
+
14
+ ### Objective
15
+ Automate commit creation with:
16
+ - **Intelligent grouping** by functional relationship.
17
+ - **Conventional Commits** compliance (type, scope, description).
18
+ - **Atomic commits** (one logical change per commit).
19
+
20
+ ---
21
+ ## Workflow: 4 Steps
22
+
23
+ ### Step 1: Detect Changes
24
+ - Modified files (unstaged/staged).
25
+ - **Untracked files** (`git status --porcelain`).
26
+ - Deleted files.
27
+
28
+ ### Step 2: Intelligent Grouping
29
+ Group files by:
30
+ - **Feature Complete**: Entity + Service + Controller + Tests + Docs.
31
+ - **Refactoring**: Helper + Tests + Usages.
32
+ - **Configuration**: Docker, Env, CI/CD.
33
+ - **Independent Tests/Docs**.
34
+
35
+ ### Step 3: Create Commits
36
+ 1. Generate Conventional Commit message.
37
+ 2. `git add [files] && git commit -m "[message]"`.
38
+ 3. **Wait for user confirmation.**
39
+
40
+ ### Step 4: Summary & Push
41
+ - Show `git log` of new commits.
42
+ - Suggest `git push origin [branch]`.
43
+
44
+ ---
45
+ ## Integration with `status.json`
46
+ - Update `git.commits` array.
47
+ - Set `git.uncommittedChanges: false` when done.
48
+ - Update `finalChecklist.committed: true`.
49
+
50
+ ---
51
+ **BEGIN EXECUTION when user runs `/flow-commit`**
@@ -18,37 +18,43 @@ Detect changes in the codebase compared to the last documented state (stored in
18
18
 
19
19
  ### Step 1: Check for Analysis File
20
20
 
21
+ // turbo
22
+ ```bash
23
+ cat .ai-flow/cache/docs-analysis.json
21
24
  ```
22
- First, check if `.ai-flow/cache/docs-analysis.json` exists:
23
25
 
24
26
  - βœ… If exists β†’ Proceed to Step 2 (Compare Changes)
25
27
  - ❌ If NOT exists β†’ Execute full Phase 0 analysis first:
26
- - Run complete code analysis (as described in Phase 0)
28
+ - Run complete code analysis (Project Discovery)
27
29
  - Create `.ai-flow/cache/docs-analysis.json` with current state
28
30
  - Then proceed to Step 2
29
- ```
30
31
 
31
32
  ### Step 2: Detect Changes
32
33
 
33
34
  **Reuse Phase 0 Analysis Logic:**
34
35
 
35
36
  1. **Perform Current Code Analysis:**
36
- - Execute the same analysis as Phase 0 (section 0.1):
37
- - File structure analysis
38
- - AST-based code parsing (endpoints, entities, dependencies)
39
- - Database schema analysis
40
- - Pattern detection
37
+ - Execute project-wide discovery using cross-platform commands:
38
+ // turbo
39
+ ```bash
40
+ ls -R . --exclude-standard
41
+ ```
42
+ - Analyze current state for:
43
+ - File structure and major modules
44
+ - Interface definitions (API endpoints, CLI commands, RPC methods)
45
+ - Data structures (Models, Entities, Schemas)
46
+ - Core dependencies and configuration
41
47
  - Generate current state snapshot
42
48
 
43
49
  2. **Compare with Previous State:**
44
50
  - Load `.ai-flow/cache/docs-analysis.json`
45
51
  - Compare current state vs previous state
46
52
  - Detect changes in:
47
- - **Endpoints:** New, modified, or deleted endpoints
48
- - **Entities:** New fields, relationships, or deleted entities
49
- - **Dependencies:** New libraries, updated versions
50
- - **Architecture:** New modules, changed patterns
51
- - **Configuration:** New environment variables, external services
53
+ - **Interfaces:** New, modified, or deleted "entry points" (API, CLI, etc.)
54
+ - **Data Forms:** New, modified, or deleted core data structures/entities
55
+ - **Dependencies:** Manifest changes (version bumps, new packages)
56
+ - **Architecture:** Structural changes (new modules, moved folders)
57
+ - **Configuration:** New environment keys or external integrations
52
58
 
53
59
  3. **Generate Change Report:**
54
60
  - Categorize changes by type
@@ -63,9 +69,9 @@ First, check if `.ai-flow/cache/docs-analysis.json` exists:
63
69
  πŸ“Š CAMBIOS DETECTADOS:
64
70
 
65
71
  πŸ”΄ Documentos que requieren actualizaciΓ³n:
66
- - docs/api.md (3 nuevos endpoints en UsersController)
67
- - docs/data-model.md (campo "email" agregado a User)
68
- - ai-instructions.md (nueva dependencia "@nestjs/swagger")
72
+ - docs/api.md (3 nuevas rutas en AuthModule)
73
+ - docs/data-model.md (campo "active" agregado a User)
74
+ - ai-instructions.md (nueva dependencia "zod")
69
75
 
70
76
  ⚠️ Cambios moderados detectados:
71
77
  - docs/architecture.md (cambio en estructura de carpetas)
@@ -184,15 +190,15 @@ No se requiere ninguna actualizaciΓ³n.
184
190
  βœ… DOCUMENTACIΓ“N ACTUALIZADA:
185
191
 
186
192
  πŸ“ docs/api.md
187
- - Agregados 3 nuevos endpoints de UsersController
188
- - Actualizada secciΓ³n de autenticaciΓ³n
193
+ - Agregados 3 nuevos puntos de entrada (AuthModule)
194
+ - Actualizada secciΓ³n de seguridad
189
195
 
190
196
  πŸ“ docs/data-model.md
191
- - Agregado campo "email" a entidad User
197
+ - Agregado campo "active" a estructura User
192
198
  - Actualizado diagrama ER (mermaid)
193
199
 
194
200
  πŸ“ ai-instructions.md
195
- - Agregada dependencia "@nestjs/swagger"
201
+ - Agregada dependencia "zod"
196
202
  - Actualizada secciΓ³n de herramientas
197
203
 
198
204
  βœ… docs-analysis.json actualizado con nuevo estado
@@ -208,54 +214,48 @@ ActualizaciΓ³n cancelada. Ejecuta `/flow-docs-sync` cuando estΓ©s listo para act
208
214
  ---
209
215
  ## Change Detection Rules
210
216
 
211
- ### Endpoints Detection
217
+ ### Interface Detection (Agnostic)
212
218
 
213
- **What triggers `docs/api.md` update:**
219
+ **What triggers document update (e.g., `docs/api.md`, `README.md`):**
214
220
 
215
- - New `@Controller()`, `@Get()`, `@Post()`, `@Put()`, `@Delete()`, `@Patch()` decorators
216
- - New `app.get()`, `app.post()`, `router.get()`, etc. (Express)
217
- - New `@app.get()`, `@app.post()`, `@router.get()` (FastAPI)
218
- - Modified route paths or methods
219
- - Deleted endpoints
221
+ - New interface markers (e.g., Decorators like `@Get`, Route definitions like `app.get`, or exported public functions)
222
+ - Modified interface paths, methods, or naming
223
+ - Deleted interfaces
220
224
 
221
225
  **How to update:**
222
226
 
223
- - Add new endpoints following existing API conventions from Phase 3
224
- - Use same format, authentication, pagination rules as existing endpoints
225
- - Maintain all existing endpoints unchanged
227
+ - Add new interfaces following the established patterns in the project
228
+ - Use consistent formatting for parameters, responses, and security
229
+ - Maintain existing documentation for unchanged segments
226
230
 
227
- ### Entities Detection
231
+ ### Data Structure Detection (Agnostic)
228
232
 
229
- **What triggers `docs/data-model.md` update:**
233
+ **What triggers document update (e.g., `docs/data-model.md`):**
230
234
 
231
- - New `@Entity()` classes (TypeORM)
232
- - New `model` definitions (Prisma)
233
- - New `@Column()` fields
234
- - New relationships (`@OneToMany`, `@ManyToOne`, etc.)
235
- - Modified field types or constraints
236
- - Deleted entities or fields
235
+ - New schema definitions (e.g., `class User`, `struct User`, `type User`)
236
+ - New ORM/ODM mappings (e.g., Prisma models, SQL tables, NoSQL schemas)
237
+ - Field changes (additions, deletions, type modifications)
238
+ - Relationship changes (Associations, Foreign Keys, Embedded docs)
237
239
 
238
240
  **How to update:**
239
241
 
240
- - Add new entities to entity catalog
241
- - Update entity definitions with new fields
242
- - Update ER diagram (mermaid) to include new relationships
243
- - Maintain all existing entities unchanged
242
+ - Update data structure catalog with new definitions
243
+ - Refresh ER diagrams (Mermaid) to reflect new relationships
244
+ - Preserve documentation for unchanged structures
244
245
 
245
- ### Dependencies Detection
246
+ ### Dependencies Detection (Agnostic)
246
247
 
247
- **What triggers `ai-instructions.md` update:**
248
+ **What triggers update (e.g., `ai-instructions.md`, `package.json`):**
248
249
 
249
- - New entries in `package.json` / `requirements.txt` / `pom.xml` / etc.
250
- - Updated version numbers
251
- - New framework or ORM
250
+ - Changes in dependency manifests (package.json, requirements.txt, go.mod, pom.xml, etc.)
251
+ - Significant version updates (+Major or +Minor depending on project)
252
+ - Changes in build systems or package managers
252
253
 
253
254
  **How to update:**
254
255
 
255
- - Add to dependencies section
256
- - Update version information
257
- - Add to tools/libraries list if significant
258
- - Maintain all existing dependencies
256
+ - Update the tech stack or libraries section
257
+ - Link to new requirements if necessary
258
+ - Maintain information about stable core dependencies
259
259
 
260
260
  ### Architecture Detection
261
261
 
@@ -334,11 +334,11 @@ AI:
334
334
  βœ… DOCUMENTACIΓ“N ACTUALIZADA:
335
335
 
336
336
  πŸ“ docs/api.md
337
- - Agregados 2 nuevos endpoints de UsersController (POST/DELETE /users/:id/avatar)
337
+ - Agregados 2 nuevos puntos de entrada (Update/Delete Profile)
338
338
  - Mantenida toda la documentaciΓ³n existente
339
339
 
340
340
  πŸ“ docs/data-model.md
341
- - Agregado campo "avatarUrl" (String, nullable) a entidad User
341
+ - Agregado campo "display_name" (String, nullable) a estructura User
342
342
  - Actualizado diagrama ER (mermaid) con nuevo campo
343
343
 
344
344
  βœ… docs-analysis.json actualizado con nuevo estado
@@ -0,0 +1,42 @@
1
+ ---
2
+ description: Internal logic for Feature implementation within flow-work
3
+ ---
4
+
5
+ # AI Flow - Feature Logic
6
+
7
+ This file contains the detailed execution logic for implementing new features, imported by `@flow-work.md`.
8
+
9
+ ---
10
+ ## πŸš€ Feature Implementation Flow
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`.
16
+
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.**
22
+
23
+ ### 3. Progressive Implementation
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.
28
+
29
+ ### 4. Definition of Done (DoD)
30
+ - If HU mode: Validate against Gherkin scenarios.
31
+ - Run tests and linting.
32
+ - Perform security check.
33
+
34
+ ---
35
+ ## 🌿 Git Branching Strategy
36
+ - Generate slug from name.
37
+ - Execute `git checkout -b feature/[slug]`.
38
+ - Maintain `status.json` with commit history.
39
+
40
+ ---
41
+ ## πŸ“¦ status.json Persistence
42
+ Ensure `progress`, `git`, and `metadata` sections are always updated.
@@ -0,0 +1,33 @@
1
+ ---
2
+ description: Internal logic for Bug Fixes within flow-work
3
+ ---
4
+
5
+ # AI Flow - Fix Logic
6
+
7
+ This file contains the detailed execution logic for bug fixes, imported by `@flow-work.md`.
8
+
9
+ ---
10
+ ## πŸ”§ Bug Fix Workflow
11
+
12
+ ### 1. Classification
13
+ - **QUICK**: 1 file, obvious cause (typo, null check).
14
+ - **COMPLEX**: Multiple files, investigation needed.
15
+
16
+ ### 2. Deep Analysis (Complex Fix)
17
+ - Create work directory.
18
+ - Document root cause in `analysis.md`.
19
+ - Map side effects.
20
+
21
+ ### 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.
25
+
26
+ ---
27
+ ## 🌿 Git Branching Strategy
28
+ - **QUICK**: Usually work on current branch.
29
+ - **COMPLEX**: Execute `git checkout -b fix/[slug]`.
30
+
31
+ ---
32
+ ## πŸ“¦ status.json Persistence
33
+ Track root cause details and verification test status.
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: Internal logic for Refactor implementation within flow-work
3
+ ---
4
+
5
+ # AI Flow - Refactor Logic
6
+
7
+ This file contains the detailed execution logic for code refactoring, imported by `@flow-work.md`.
8
+
9
+ ---
10
+ ## πŸ”„ Refactoring Workflow
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.
25
+
26
+ ---
27
+ ## 🌿 Git Branching Strategy
28
+ - Execute `git checkout -b refactor/[slug]`.
29
+
30
+ ---
31
+ ## πŸ“¦ status.json Persistence
32
+ Track `percentage` of updated occurrences and updated file paths.
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: Internal logic for Resuming work within flow-work
3
+ ---
4
+
5
+ # AI Flow - Resume Logic
6
+
7
+ This file contains the logic for detecting and resuming paused work items, imported by `@flow-work.md`.
8
+
9
+ ---
10
+ ## ⏸️ Resume Workflow
11
+
12
+ ### 1. Work Detection
13
+ - Scan `specs/ai-flow/work/` for any directories.
14
+ - Group by type and last updated timestamp.
15
+
16
+ ### 2. Selection Menu
17
+ - Show active tasks with percentage and current branch.
18
+ - Identify current Git branch and match with work items (⭐⭐ marker).
19
+
20
+ ### 3. Context Restoration
21
+ - Load `spec.md`, `plan.md`, `task.md`, and `status.json`.
22
+ - Verify Git branch:
23
+ - If mismatch: Prompt to switch to `git.branchName`.
24
+ - Identify the first incomplete task in `task.md`.
25
+
26
+ ### 4. Implementation Continuation
27
+ - Resume with the previously saved `implementationMode`.
28
+ - Continue execution from where it was paused.
29
+
30
+ ---
31
+ ## πŸ“¦ status.json Persistence
32
+ Update `timestamps.lastUpdated` upon resuming.