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.
- package/README.md +13 -17
- package/dist/cli.js +8 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/prompts/backend/flow-build-phase-0.md +286 -4
- package/prompts/backend/flow-build-phase-1.md +19 -0
- package/prompts/backend/flow-build-phase-2.md +19 -0
- package/prompts/backend/flow-build-phase-3.md +19 -0
- package/prompts/backend/flow-build-phase-4.md +19 -0
- package/prompts/backend/flow-build-phase-5.md +19 -0
- package/prompts/backend/flow-build-phase-6.md +19 -0
- package/prompts/backend/flow-build-phase-7.md +19 -0
- package/prompts/backend/flow-build-phase-9.md +14 -0
- package/prompts/backend/flow-check-review.md +20 -0
- package/prompts/backend/flow-check-test.md +14 -0
- package/prompts/backend/flow-check.md +65 -0
- package/prompts/backend/flow-commit.md +51 -0
- package/prompts/backend/flow-docs-sync.md +53 -53
- package/prompts/backend/flow-work-feature.md +42 -0
- package/prompts/backend/flow-work-fix.md +33 -0
- package/prompts/backend/flow-work-refactor.md +32 -0
- package/prompts/backend/flow-work-resume.md +32 -0
- package/prompts/backend/flow-work.md +127 -0
- package/prompts/frontend/flow-build-phase-0.md +363 -35
- package/prompts/frontend/flow-build-phase-1.md +433 -404
- package/prompts/frontend/flow-build-phase-2.md +508 -872
- package/prompts/frontend/flow-build-phase-3.md +629 -562
- package/prompts/frontend/flow-build-phase-4.md +438 -382
- package/prompts/frontend/flow-build-phase-5.md +559 -362
- package/prompts/frontend/flow-build-phase-6.md +383 -452
- package/prompts/frontend/flow-build-phase-7.md +818 -392
- package/prompts/frontend/flow-build-phase-9.md +14 -0
- package/prompts/frontend/flow-check-review.md +20 -0
- package/prompts/frontend/flow-check-test.md +14 -0
- package/prompts/frontend/flow-check.md +65 -0
- package/prompts/frontend/flow-commit.md +51 -0
- package/prompts/frontend/flow-docs-sync.md +36 -34
- package/prompts/frontend/flow-work-feature.md +42 -0
- package/prompts/frontend/flow-work-fix.md +33 -0
- package/prompts/frontend/flow-work-refactor.md +32 -0
- package/prompts/frontend/flow-work-resume.md +32 -0
- package/prompts/frontend/flow-work.md +127 -0
- package/prompts/mobile/flow-build-phase-0.md +366 -37
- package/prompts/mobile/flow-build-phase-1.md +438 -493
- package/prompts/mobile/flow-build-phase-2.md +458 -464
- package/prompts/mobile/flow-build-phase-3.md +613 -487
- package/prompts/mobile/flow-build-phase-4.md +439 -258
- package/prompts/mobile/flow-build-phase-5.md +582 -250
- package/prompts/mobile/flow-build-phase-6.md +389 -359
- package/prompts/mobile/flow-build-phase-7.md +871 -285
- package/prompts/mobile/flow-build-phase-9.md +14 -0
- package/prompts/mobile/flow-check-review.md +20 -0
- package/prompts/mobile/flow-check-test.md +14 -0
- package/prompts/mobile/flow-check.md +65 -0
- package/prompts/mobile/flow-commit.md +51 -0
- package/prompts/mobile/flow-docs-sync.md +37 -40
- package/prompts/mobile/flow-work-feature.md +42 -0
- package/prompts/mobile/flow-work-fix.md +33 -0
- package/prompts/mobile/flow-work-refactor.md +32 -0
- package/prompts/mobile/flow-work-resume.md +32 -0
- package/prompts/mobile/flow-work.md +127 -0
- package/prompts/shared/smart-skip-preflight.md +214 -0
- package/prompts/backend/flow-dev-commit.md +0 -829
- package/prompts/backend/flow-dev-feature.md +0 -1948
- package/prompts/backend/flow-dev-fix.md +0 -952
- package/prompts/backend/flow-dev-refactor.md +0 -690
- package/prompts/backend/flow-dev-review.md +0 -372
- 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 (
|
|
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
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
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
|
-
- **
|
|
48
|
-
- **
|
|
49
|
-
- **Dependencies:**
|
|
50
|
-
- **Architecture:**
|
|
51
|
-
- **Configuration:** New environment
|
|
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
|
|
67
|
-
- docs/data-model.md (campo "
|
|
68
|
-
- ai-instructions.md (nueva dependencia "
|
|
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
|
|
188
|
-
- Actualizada secciΓ³n de
|
|
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 "
|
|
197
|
+
- Agregado campo "active" a estructura User
|
|
192
198
|
- Actualizado diagrama ER (mermaid)
|
|
193
199
|
|
|
194
200
|
π ai-instructions.md
|
|
195
|
-
- Agregada dependencia "
|
|
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
|
-
###
|
|
217
|
+
### Interface Detection (Agnostic)
|
|
212
218
|
|
|
213
|
-
**What triggers `docs/api.md`
|
|
219
|
+
**What triggers document update (e.g., `docs/api.md`, `README.md`):**
|
|
214
220
|
|
|
215
|
-
- New
|
|
216
|
-
-
|
|
217
|
-
-
|
|
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
|
|
224
|
-
- Use
|
|
225
|
-
- Maintain
|
|
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
|
-
###
|
|
231
|
+
### Data Structure Detection (Agnostic)
|
|
228
232
|
|
|
229
|
-
**What triggers `docs/data-model.md`
|
|
233
|
+
**What triggers document update (e.g., `docs/data-model.md`):**
|
|
230
234
|
|
|
231
|
-
- New
|
|
232
|
-
- New
|
|
233
|
-
-
|
|
234
|
-
-
|
|
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
|
-
-
|
|
241
|
-
-
|
|
242
|
-
-
|
|
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`
|
|
248
|
+
**What triggers update (e.g., `ai-instructions.md`, `package.json`):**
|
|
248
249
|
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
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
|
-
-
|
|
256
|
-
-
|
|
257
|
-
-
|
|
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
|
|
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 "
|
|
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.
|