ai-flow-dev 2.1.2 → 2.1.4
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 +28 -40
- package/dist/cli.js +69 -47
- package/dist/cli.js.map +1 -1
- package/package.json +5 -5
- package/prompts/backend/flow-build-phase-0.md +96 -84
- package/prompts/backend/flow-build-phase-1.md +10 -18
- package/prompts/backend/flow-build-phase-10.md +199 -583
- package/prompts/backend/flow-build-phase-2.md +152 -86
- package/prompts/backend/flow-build-phase-3.md +108 -68
- package/prompts/backend/flow-build-phase-4.md +5 -8
- package/prompts/backend/flow-build-phase-5.md +39 -12
- package/prompts/backend/flow-build-phase-6.md +29 -8
- package/prompts/backend/flow-build-phase-7.md +121 -41
- package/prompts/backend/flow-build-phase-8.md +28 -65
- package/prompts/backend/flow-build-phase-9.md +267 -1298
- package/prompts/backend/flow-build.md +881 -957
- package/prompts/backend/flow-dev-commit.md +27 -50
- package/prompts/backend/flow-dev-feature.md +1929 -2017
- package/prompts/backend/flow-dev-fix.md +936 -964
- package/prompts/backend/flow-dev-refactor.md +672 -701
- package/prompts/backend/flow-dev-review.md +356 -389
- package/prompts/backend/flow-dev-work.md +1066 -1118
- package/prompts/backend/flow-docs-sync.md +31 -210
- package/prompts/frontend/flow-build-phase-0.md +503 -484
- package/prompts/frontend/flow-build-phase-1.md +445 -433
- package/prompts/frontend/flow-build-phase-2.md +910 -957
- package/prompts/frontend/flow-build-phase-3.md +692 -664
- package/prompts/frontend/flow-build-phase-4.md +478 -463
- package/prompts/frontend/flow-build-phase-5.md +488 -467
- package/prompts/frontend/flow-build-phase-6.md +571 -550
- package/prompts/frontend/flow-build-phase-7.md +560 -592
- package/prompts/frontend/flow-build-phase-8.md +17 -42
- package/prompts/frontend/flow-build.md +457 -503
- package/prompts/frontend/flow-docs-sync.md +24 -45
- package/prompts/mobile/flow-build-phase-0.md +104 -97
- package/prompts/mobile/flow-build-phase-1.md +137 -122
- package/prompts/mobile/flow-build-phase-2.md +123 -130
- package/prompts/mobile/flow-build-phase-3.md +144 -149
- package/prompts/mobile/flow-build-phase-4.md +140 -132
- package/prompts/mobile/flow-build-phase-5.md +70 -70
- package/prompts/mobile/flow-build-phase-6.md +136 -134
- package/prompts/mobile/flow-build-phase-7.md +24 -58
- package/prompts/mobile/flow-build-phase-8.md +17 -42
- package/prompts/mobile/flow-build.md +47 -97
- package/prompts/mobile/flow-docs-sync.md +23 -42
- package/prompts/shared/mermaid-guidelines.md +106 -0
- package/prompts/shared/scope-levels.md +126 -0
- package/prompts/shared/story-points.md +65 -0
- package/prompts/shared/task-format.md +86 -0
- package/templates/AGENT.template.md +194 -15
- package/templates/backend/README.template.md +2 -32
- package/templates/backend/ai-instructions.template.md +2 -32
- package/templates/backend/copilot-instructions.template.md +2 -22
- package/templates/backend/docs/api.template.md +89 -20
- package/templates/backend/docs/architecture.template.md +165 -53
- package/templates/backend/docs/business-flows.template.md +7 -14
- package/templates/backend/docs/code-standards.template.md +2 -38
- package/templates/backend/docs/contributing.template.md +2 -16
- package/templates/backend/docs/data-model.template.md +125 -21
- package/templates/backend/docs/operations.template.md +179 -50
- package/templates/backend/docs/testing.template.md +2 -42
- package/templates/backend/project-brief.template.md +2 -28
- package/templates/backend/specs/configuration.template.md +2 -14
- package/templates/backend/specs/security.template.md +2 -32
- package/templates/frontend/README.template.md +2 -18
- package/templates/frontend/ai-instructions.template.md +2 -20
- package/templates/frontend/docs/api-integration.template.md +12 -30
- package/templates/frontend/docs/components.template.md +2 -28
- package/templates/frontend/docs/error-handling.template.md +11 -27
- package/templates/frontend/docs/operations.template.md +8 -18
- package/templates/frontend/docs/performance.template.md +8 -18
- package/templates/frontend/docs/pwa.template.md +8 -18
- package/templates/frontend/docs/state-management.template.md +2 -28
- package/templates/frontend/docs/styling.template.md +2 -26
- package/templates/frontend/docs/testing.template.md +2 -28
- package/templates/frontend/project-brief.template.md +2 -16
- package/templates/frontend/specs/accessibility.template.md +8 -18
- package/templates/frontend/specs/configuration.template.md +2 -24
- package/templates/frontend/specs/security.template.md +10 -24
- package/templates/fullstack/README.template.md +17 -47
- package/templates/fullstack/ai-instructions.template.md +17 -45
- package/templates/fullstack/project-brief.template.md +16 -42
- package/templates/fullstack/specs/configuration.template.md +16 -42
- package/templates/mobile/README.template.md +11 -29
- package/templates/mobile/ai-instructions.template.md +11 -27
- package/templates/mobile/docs/app-store.template.md +11 -29
- package/templates/mobile/docs/architecture.template.md +14 -38
- package/templates/mobile/docs/native-features.template.md +16 -44
- package/templates/mobile/docs/navigation.template.md +9 -23
- package/templates/mobile/docs/offline-strategy.template.md +10 -26
- package/templates/mobile/docs/permissions.template.md +9 -23
- package/templates/mobile/docs/state-management.template.md +12 -32
- package/templates/mobile/docs/testing.template.md +14 -38
- package/templates/mobile/project-brief.template.md +12 -30
- package/templates/mobile/specs/build-configuration.template.md +10 -26
- package/templates/mobile/specs/deployment.template.md +9 -23
|
@@ -3,28 +3,24 @@
|
|
|
3
3
|
**YOU ARE AN EXPERT MOBILE ARCHITECT AND DOCUMENTATION SPECIALIST.**
|
|
4
4
|
|
|
5
5
|
Your mission is to detect changes in the mobile codebase and update the project documentation automatically when the user executes `/flow-docs-sync`.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
6
|
+
---
|
|
9
7
|
## Command: `/flow-docs-sync`
|
|
10
8
|
|
|
11
9
|
### Objective
|
|
12
10
|
|
|
13
|
-
Detect changes in the mobile codebase compared to the last documented state (stored in `.ai-flow/analysis.json`) and update all affected documentation files automatically.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
11
|
+
Detect changes in the mobile codebase compared to the last documented state (stored in `.ai-flow/cache/docs-analysis.json`) and update all affected documentation files automatically.
|
|
12
|
+
---
|
|
17
13
|
## Execution Flow
|
|
18
14
|
|
|
19
15
|
### Step 1: Check for Analysis File
|
|
20
16
|
|
|
21
17
|
```
|
|
22
|
-
First, check if `.ai-flow/analysis.json` exists:
|
|
18
|
+
First, check if `.ai-flow/cache/docs-analysis.json` exists:
|
|
23
19
|
|
|
24
20
|
- ✅ If exists → Proceed to Step 2 (Compare Changes)
|
|
25
21
|
- ❌ If NOT exists → Execute full Phase 0 analysis first:
|
|
26
22
|
- Run complete mobile code analysis (as described in Phase 0)
|
|
27
|
-
- Create `.ai-flow/analysis.json` with current state
|
|
23
|
+
- Create `.ai-flow/cache/docs-analysis.json` with current state
|
|
28
24
|
- Then proceed to Step 2
|
|
29
25
|
```
|
|
30
26
|
|
|
@@ -47,7 +43,7 @@ First, check if `.ai-flow/analysis.json` exists:
|
|
|
47
43
|
|
|
48
44
|
2. **Compare with Previous State:**
|
|
49
45
|
|
|
50
|
-
- Load `.ai-flow/analysis.json`
|
|
46
|
+
- Load `.ai-flow/cache/docs-analysis.json`
|
|
51
47
|
- Compare current state vs previous state
|
|
52
48
|
- Detect changes in:
|
|
53
49
|
- **Screens:** New, modified, or deleted screens
|
|
@@ -173,9 +169,9 @@ No updates required.
|
|
|
173
169
|
- Update app store configuration if app.json or build config changed
|
|
174
170
|
- Maintain existing configuration
|
|
175
171
|
|
|
176
|
-
2. **Update `analysis.json`:**
|
|
172
|
+
2. **Update `docs-analysis.json`:**
|
|
177
173
|
|
|
178
|
-
- Save current state to `.ai-flow/analysis.json`
|
|
174
|
+
- Save current state to `.ai-flow/cache/docs-analysis.json`
|
|
179
175
|
- Update timestamp
|
|
180
176
|
- Include all detected changes in metadata
|
|
181
177
|
|
|
@@ -208,7 +204,7 @@ No updates required.
|
|
|
208
204
|
📝 specs/build-configuration.md
|
|
209
205
|
- Updated build.gradle configuration
|
|
210
206
|
|
|
211
|
-
✅ analysis.json updated with new state
|
|
207
|
+
✅ docs-analysis.json updated with new state
|
|
212
208
|
```
|
|
213
209
|
|
|
214
210
|
### Step 5: Handle Cancellation
|
|
@@ -218,9 +214,7 @@ No updates required.
|
|
|
218
214
|
```
|
|
219
215
|
Update cancelled. Run `/flow-docs-sync` when you're ready to update the documentation.
|
|
220
216
|
```
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
217
|
+
---
|
|
224
218
|
## Change Detection Rules
|
|
225
219
|
|
|
226
220
|
### Screens Detection
|
|
@@ -341,9 +335,7 @@ Update cancelled. Run `/flow-docs-sync` when you're ready to update the document
|
|
|
341
335
|
|
|
342
336
|
- Add new variables to configuration spec
|
|
343
337
|
- Maintain existing variables
|
|
344
|
-
|
|
345
|
-
---
|
|
346
|
-
|
|
338
|
+
---
|
|
347
339
|
## Important Rules
|
|
348
340
|
|
|
349
341
|
1. **Incremental Updates Only:**
|
|
@@ -360,7 +352,7 @@ Update cancelled. Run `/flow-docs-sync` when you're ready to update the document
|
|
|
360
352
|
|
|
361
353
|
3. **Update Analysis File:**
|
|
362
354
|
|
|
363
|
-
- Always update `.ai-flow/analysis.json` after document updates
|
|
355
|
+
- Always update `.ai-flow/cache/docs-analysis.json` after document updates
|
|
364
356
|
- Include timestamp and change summary
|
|
365
357
|
- Save complete current state for next comparison
|
|
366
358
|
|
|
@@ -369,9 +361,7 @@ Update cancelled. Run `/flow-docs-sync` when you're ready to update the document
|
|
|
369
361
|
- Regenerate navigation diagrams when screens change
|
|
370
362
|
- Regenerate architecture diagrams when structure changes
|
|
371
363
|
- Use mermaid format for all diagrams
|
|
372
|
-
|
|
373
|
-
---
|
|
374
|
-
|
|
364
|
+
---
|
|
375
365
|
## 📊 MOBILE DIAGRAM REGENERATION GUIDELINES
|
|
376
366
|
|
|
377
367
|
When regenerating mobile diagrams, follow these **critical** formatting rules:
|
|
@@ -437,9 +427,7 @@ graph TD
|
|
|
437
427
|
style P1 fill:#fff4e6
|
|
438
428
|
```
|
|
439
429
|
````
|
|
440
|
-
|
|
441
|
-
---
|
|
442
|
-
|
|
430
|
+
---
|
|
443
431
|
### State Management Diagrams (state-management.md)
|
|
444
432
|
|
|
445
433
|
**Diagram Types:** `graph LR`, `sequenceDiagram`, `graph TD`
|
|
@@ -495,9 +483,7 @@ sequenceDiagram
|
|
|
495
483
|
Note over Cache: Cache valid for 5min
|
|
496
484
|
```
|
|
497
485
|
````
|
|
498
|
-
|
|
499
|
-
---
|
|
500
|
-
|
|
486
|
+
---
|
|
501
487
|
### Testing Diagrams (testing.md)
|
|
502
488
|
|
|
503
489
|
**Diagram Type:** `graph TB`
|
|
@@ -535,9 +521,7 @@ graph TB
|
|
|
535
521
|
style UNIT fill:#e8f5e9,stroke:#388e3c,stroke-width:3px
|
|
536
522
|
```
|
|
537
523
|
````
|
|
538
|
-
|
|
539
|
-
---
|
|
540
|
-
|
|
524
|
+
---
|
|
541
525
|
### Common Formatting Rules (ALL Mobile Diagrams)
|
|
542
526
|
|
|
543
527
|
**CRITICAL - Code Fence Syntax:**
|
|
@@ -583,16 +567,12 @@ graph TB
|
|
|
583
567
|
- Show device vs emulator distinction in testing diagrams
|
|
584
568
|
- Include deep linking routes in navigation diagrams
|
|
585
569
|
- Highlight authentication flows and protected routes
|
|
586
|
-
|
|
587
|
-
---
|
|
588
|
-
|
|
570
|
+
---
|
|
589
571
|
5. **Error Handling:**
|
|
590
572
|
- If document doesn't exist, create it following template
|
|
591
|
-
- If analysis.json is corrupted, regenerate it
|
|
573
|
+
- If docs-analysis.json is corrupted, regenerate it
|
|
592
574
|
- If comparison fails, show error and suggest full Phase 0 re-run
|
|
593
|
-
|
|
594
|
-
---
|
|
595
|
-
|
|
575
|
+
---
|
|
596
576
|
## Example Execution
|
|
597
577
|
|
|
598
578
|
```
|
|
@@ -622,14 +602,15 @@ AI:
|
|
|
622
602
|
- Added new permission (Location)
|
|
623
603
|
- Updated permission handling section
|
|
624
604
|
|
|
625
|
-
✅ analysis.json updated with new state
|
|
605
|
+
✅ docs-analysis.json updated with new state
|
|
626
606
|
|
|
627
607
|
Documentation synchronized successfully.
|
|
628
608
|
```
|
|
609
|
+
---
|
|
610
|
+
**BEGIN EXECUTION when user runs `/flow-docs-sync`**
|
|
611
|
+
|
|
629
612
|
|
|
630
|
-
---
|
|
631
613
|
|
|
632
|
-
**BEGIN EXECUTION when user runs `/flow-docs-sync`**
|
|
633
614
|
|
|
634
615
|
|
|
635
616
|
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# 🎨 Mermaid Diagram Guidelines
|
|
2
|
+
|
|
3
|
+
Follow these critical rules for all Mermaid diagrams to ensure they render correctly in GitHub, VS Code, and other markdown viewers.
|
|
4
|
+
|
|
5
|
+
## 🛠️ General Rules
|
|
6
|
+
|
|
7
|
+
- **Code Fence:** ALWAYS use exactly ` ```mermaid ` (lowercase, no spaces).
|
|
8
|
+
- **NO Indentation:** Do not indent the diagram code with spaces or tabs.
|
|
9
|
+
- **Closing Fence:** Always close with ` ``` `.
|
|
10
|
+
- **Validation:** Preview at [mermaid.live](https://mermaid.live/) if unsure.
|
|
11
|
+
---
|
|
12
|
+
## 📊 Entity Relationship (ER) Diagrams
|
|
13
|
+
|
|
14
|
+
**Type:** `erDiagram`
|
|
15
|
+
|
|
16
|
+
### Relationship Notation
|
|
17
|
+
|
|
18
|
+
- `||--o{` : One-to-Many (one to zero or more)
|
|
19
|
+
- `||--||` : One-to-One (one to exactly one)
|
|
20
|
+
- `}o--o{` : Many-to-Many (requires junction table)
|
|
21
|
+
- `||--|{` : One-to-Many (one to one or more)
|
|
22
|
+
|
|
23
|
+
### Field Notation
|
|
24
|
+
|
|
25
|
+
- `PK` : Primary Key
|
|
26
|
+
- `FK` : Foreign Key
|
|
27
|
+
- `UK` : Unique Key
|
|
28
|
+
- Add descriptions in quotes: `string email "User email address"`
|
|
29
|
+
|
|
30
|
+
### Example
|
|
31
|
+
|
|
32
|
+
```mermaid
|
|
33
|
+
erDiagram
|
|
34
|
+
USER ||--o{ ORDER : places
|
|
35
|
+
USER {
|
|
36
|
+
string id PK
|
|
37
|
+
string email UK
|
|
38
|
+
string name
|
|
39
|
+
}
|
|
40
|
+
ORDER {
|
|
41
|
+
string id PK
|
|
42
|
+
string userId FK
|
|
43
|
+
decimal total
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
---
|
|
47
|
+
## 📐 Architecture & Flow Diagrams
|
|
48
|
+
|
|
49
|
+
**Type:** `graph TD` (Top-Down) or `graph LR` (Left-Right)
|
|
50
|
+
|
|
51
|
+
### Node Shapes
|
|
52
|
+
|
|
53
|
+
- `[Square]` : Services, components, apps
|
|
54
|
+
- `[(Cylinder)]` : Databases, storage
|
|
55
|
+
- `([Rounded])` : Start/End points
|
|
56
|
+
- `{Diamond}` : Decision points
|
|
57
|
+
|
|
58
|
+
### Styling
|
|
59
|
+
|
|
60
|
+
- Use `<br/>` for line breaks in labels.
|
|
61
|
+
- Apply colors: `style NodeName fill:#e1f5ff`
|
|
62
|
+
- Label connections: `A -->|HTTPS| B`
|
|
63
|
+
|
|
64
|
+
### Example
|
|
65
|
+
|
|
66
|
+
```mermaid
|
|
67
|
+
graph TD
|
|
68
|
+
Client[Web App] -->|API Call| API[Node.js API]
|
|
69
|
+
API -->|Query| DB[(PostgreSQL)]
|
|
70
|
+
style Client fill:#e1f5ff
|
|
71
|
+
style API fill:#fff4e1
|
|
72
|
+
style DB fill:#e1ffe1
|
|
73
|
+
```
|
|
74
|
+
---
|
|
75
|
+
## 🔄 Business Flow Diagrams
|
|
76
|
+
|
|
77
|
+
**Type:** `flowchart TD` (or `flowchart LR`)
|
|
78
|
+
|
|
79
|
+
### Requirements
|
|
80
|
+
|
|
81
|
+
- Start/End with `([Terminal Node])`.
|
|
82
|
+
- Use `{Diamond}` for decision points.
|
|
83
|
+
- Label branches: `-->|Yes|` or `-->|No|`.
|
|
84
|
+
- Show error/failure paths.
|
|
85
|
+
|
|
86
|
+
### Example
|
|
87
|
+
|
|
88
|
+
```mermaid
|
|
89
|
+
flowchart TD
|
|
90
|
+
Start([Start]) --> Action[Action]
|
|
91
|
+
Action --> Decision{Success?}
|
|
92
|
+
Decision -->|Yes| End([Success])
|
|
93
|
+
Decision -->|No| Fail([Failed])
|
|
94
|
+
style Start fill:#e1f5ff
|
|
95
|
+
style End fill:#e1ffe1
|
|
96
|
+
style Fail fill:#ffe1e1
|
|
97
|
+
```
|
|
98
|
+
---
|
|
99
|
+
## ⚠️ Common Mistakes to Avoid
|
|
100
|
+
|
|
101
|
+
- ❌ ` ```Mermaid ` (Capital M)
|
|
102
|
+
- ❌ ` ``` mermaid ` (Extra space)
|
|
103
|
+
- ❌ Using invalid characters in node IDs (use `NodeID[Label]` instead)
|
|
104
|
+
- ❌ Circular dependencies without clear flow
|
|
105
|
+
|
|
106
|
+
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Project Scope Levels
|
|
2
|
+
|
|
3
|
+
> **Canonical definition of MVP, Production-Ready, and Enterprise scope levels.**
|
|
4
|
+
>
|
|
5
|
+
> This file defines how scope affects phase execution, question depth, and technology choices across all AI Flow workflows.
|
|
6
|
+
---
|
|
7
|
+
## Scope Level Summary
|
|
8
|
+
---
|
|
9
|
+
| Scope | Symbol | Duration (Backend) | Phases | Best For |
|
|
10
|
+
| -------------------- | ------ | ------------------ | --------- | ---------------------------------- |
|
|
11
|
+
| **MVP** | 🚀 | 60-80 min | Core only | Prototypes, proof of concept |
|
|
12
|
+
| **Production-Ready** | ⭐ | 90-120 min | All | Production apps, client projects |
|
|
13
|
+
| **Enterprise** | 🏆 | 120-160 min | Extended | Large-scale, mission-critical apps |
|
|
14
|
+
---
|
|
15
|
+
## MVP Scope 🚀
|
|
16
|
+
---
|
|
17
|
+
### Characteristics
|
|
18
|
+
|
|
19
|
+
- **Phases included:** Core phases only (Phase 1-4 in backend)
|
|
20
|
+
- **Question depth:** Simplified, essential questions only
|
|
21
|
+
- **Technology choices:** Simple, proven defaults
|
|
22
|
+
|
|
23
|
+
### Technology Defaults
|
|
24
|
+
|
|
25
|
+
| Category | MVP Choice |
|
|
26
|
+
| -------------- | ------------------------------ |
|
|
27
|
+
| Database | PostgreSQL (single instance) |
|
|
28
|
+
| ORM | Framework-idiomatic |
|
|
29
|
+
| Caching | None or in-memory |
|
|
30
|
+
| Search | Database LIKE queries |
|
|
31
|
+
| Architecture | Monolith |
|
|
32
|
+
| API Style | REST only |
|
|
33
|
+
| Authentication | JWT (basic) |
|
|
34
|
+
| Authorization | RBAC (simple roles) |
|
|
35
|
+
| Password | bcrypt, 8+ chars |
|
|
36
|
+
| Git Workflow | GitHub Flow |
|
|
37
|
+
| Test Coverage | 15-25% |
|
|
38
|
+
| Test Types | Unit tests only |
|
|
39
|
+
| Deployment | PaaS (Heroku, Railway, Render) |
|
|
40
|
+
| Monitoring | Basic (health checks, logs) |
|
|
41
|
+
---
|
|
42
|
+
## Production-Ready Scope ⭐
|
|
43
|
+
---
|
|
44
|
+
### Characteristics
|
|
45
|
+
|
|
46
|
+
- **Phases included:** All phases (1-7/8)
|
|
47
|
+
- **Question depth:** Complete professional coverage
|
|
48
|
+
- **Technology choices:** Robust, scalable defaults
|
|
49
|
+
|
|
50
|
+
### Technology Defaults
|
|
51
|
+
|
|
52
|
+
| Category | Production Choice |
|
|
53
|
+
| -------------- | ----------------------------------- |
|
|
54
|
+
| Database | PostgreSQL (managed) |
|
|
55
|
+
| ORM | Framework-idiomatic |
|
|
56
|
+
| Caching | Redis |
|
|
57
|
+
| Search | PostgreSQL Full-Text or Meilisearch |
|
|
58
|
+
| Architecture | Clean Architecture |
|
|
59
|
+
| API Style | REST + GraphQL (optional) |
|
|
60
|
+
| Authentication | JWT + Refresh Tokens |
|
|
61
|
+
| Authorization | RBAC (granular permissions) |
|
|
62
|
+
| Password | bcrypt 12 rounds, 12+ chars |
|
|
63
|
+
| Git Workflow | Git Flow |
|
|
64
|
+
| Test Coverage | 70% |
|
|
65
|
+
| Test Types | Unit, Integration, E2E |
|
|
66
|
+
| Deployment | Cloud (AWS/GCP/Azure) |
|
|
67
|
+
| Monitoring | APM (Datadog/New Relic) + Sentry |
|
|
68
|
+
---
|
|
69
|
+
## Enterprise Scope 🏆
|
|
70
|
+
---
|
|
71
|
+
### Characteristics
|
|
72
|
+
|
|
73
|
+
- **Phases included:** All phases with extended questions
|
|
74
|
+
- **Question depth:** Advanced, comprehensive
|
|
75
|
+
- **Technology choices:** Enterprise-grade, highly scalable
|
|
76
|
+
|
|
77
|
+
### Technology Defaults
|
|
78
|
+
|
|
79
|
+
| Category | Enterprise Choice |
|
|
80
|
+
| -------------- | -------------------------------------- |
|
|
81
|
+
| Database | PostgreSQL (multi-region/sharded) |
|
|
82
|
+
| ORM | Framework-idiomatic |
|
|
83
|
+
| Caching | Redis Cluster |
|
|
84
|
+
| Search | Elasticsearch |
|
|
85
|
+
| Architecture | Microservices / Domain-Driven Design |
|
|
86
|
+
| API Style | REST + GraphQL + gRPC |
|
|
87
|
+
| Authentication | OAuth2 + SSO + MFA |
|
|
88
|
+
| Authorization | ABAC (Attribute-Based) |
|
|
89
|
+
| Password | bcrypt 14 rounds, 16+ chars, policies |
|
|
90
|
+
| Git Workflow | Git Flow + Release branches |
|
|
91
|
+
| Test Coverage | 85%+ |
|
|
92
|
+
| Test Types | Unit, Integration, E2E, Load, Security |
|
|
93
|
+
| Deployment | Multi-region, Kubernetes |
|
|
94
|
+
| Monitoring | Full observability stack |
|
|
95
|
+
---
|
|
96
|
+
## Scope Selection Prompt
|
|
97
|
+
---
|
|
98
|
+
```
|
|
99
|
+
---
|
|
100
|
+
🎯 Project Scope Selection
|
|
101
|
+
---
|
|
102
|
+
What scope level do you want for this documentation?
|
|
103
|
+
|
|
104
|
+
A) 🚀 **MVP** (60-80 min) - Core features only, minimal setup
|
|
105
|
+
- Core phases only
|
|
106
|
+
- Simple architecture
|
|
107
|
+
- Basic testing
|
|
108
|
+
- Best for: Prototypes, proof of concept
|
|
109
|
+
|
|
110
|
+
B) ⭐ **Production-Ready** (90-120 min) - Complete professional setup
|
|
111
|
+
- All phases
|
|
112
|
+
- Robust architecture
|
|
113
|
+
- Comprehensive testing + CI/CD
|
|
114
|
+
- Best for: Production apps, client projects
|
|
115
|
+
|
|
116
|
+
C) 🏆 **Enterprise** (120-160 min) - Advanced features and scalability
|
|
117
|
+
- All phases with extended questions
|
|
118
|
+
- Enterprise architecture
|
|
119
|
+
- Full observability + compliance
|
|
120
|
+
- Best for: Large-scale, mission-critical apps
|
|
121
|
+
|
|
122
|
+
Your choice (A/B/C):
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Story Points Reference
|
|
2
|
+
|
|
3
|
+
> **Canonical reference for Fibonacci-based Story Point estimation across all AI Flow phases.**
|
|
4
|
+
>
|
|
5
|
+
> This file is the single source of truth for Story Points. All phases that require SP estimation MUST reference this file.
|
|
6
|
+
---
|
|
7
|
+
## Story Points Scale (Fibonacci)
|
|
8
|
+
---
|
|
9
|
+
| Story Points | Complexity | Typical Time | Examples |
|
|
10
|
+
| ------------ | ---------- | ------------ | -------------------------------------- |
|
|
11
|
+
| **1 SP** | Trivial | 1-2 hours | Add simple field, update enum |
|
|
12
|
+
| **2 SP** | Very Small | 2-4 hours | Basic validation, simple test |
|
|
13
|
+
| **3 SP** | Small | 4-8 hours | Simple CRUD endpoint, basic entity |
|
|
14
|
+
| **5 SP** | Medium | 1-2 days | Complex endpoint with business logic |
|
|
15
|
+
| **8 SP** | Complex | 2-3 days | Auth flow, complex validation |
|
|
16
|
+
| **13 SP** | Large | 1 week | Complete module with full tests |
|
|
17
|
+
| **21 SP** | Very Large | 2 weeks | Major feature with integration |
|
|
18
|
+
| **34 SP** | Epic | 3 weeks | Multiple related features (Epic-level) |
|
|
19
|
+
---
|
|
20
|
+
## Story Points to Time Conversion (Hybrid Estimation)
|
|
21
|
+
---
|
|
22
|
+
Use this table to add time estimates to each task:
|
|
23
|
+
|
|
24
|
+
| Story Points | Time Estimate (solo dev) | Time Range | Example Task |
|
|
25
|
+
| ------------ | ------------------------ | ---------- | --------------------------------------- |
|
|
26
|
+
| **1 SP** | 1-2 hours | (~1-2h) | Add enum value, simple config change |
|
|
27
|
+
| **2 SP** | 3-4 hours | (~3-4h) | Write 5-8 unit tests, basic validation |
|
|
28
|
+
| **3 SP** | 4-8 hours | (~4-8h) | Simple CRUD endpoint, basic entity |
|
|
29
|
+
| **5 SP** | 1-2 days | (~1-2d) | Complex endpoint with business logic |
|
|
30
|
+
| **8 SP** | 2-3 days | (~2-3d) | Auth flow, complex validation |
|
|
31
|
+
| **13 SP** | 1 week | (~1w) | Complete module with full test coverage |
|
|
32
|
+
| **21 SP** | 2 weeks | (~2w) | Major feature with integration |
|
|
33
|
+
| **34 SP** | 3 weeks | (~3w) | Multiple related features (Epic-level) |
|
|
34
|
+
|
|
35
|
+
> **Note:** Time assumes AI-assisted development (GitHub Copilot, Claude, etc.). Without AI assistance, multiply time estimates by 2-3x.
|
|
36
|
+
>
|
|
37
|
+
> **Velocity Tracking:** After completing 2-3 features, compare actual time vs estimates to calibrate your team's velocity. Adjust remaining estimates accordingly.
|
|
38
|
+
---
|
|
39
|
+
## Epic Estimation Guidelines
|
|
40
|
+
---
|
|
41
|
+
- **Foundation Epic:** 13-21 SP (depends on framework complexity)
|
|
42
|
+
- **Data Layer Epic:** 3-5 SP per simple entity, 8-13 SP per complex entity
|
|
43
|
+
- **Auth Epic:** 8 SP (basic JWT) to 21 SP (multi-provider + RBAC + 2FA)
|
|
44
|
+
- **Business Epics:** Varies by domain complexity
|
|
45
|
+
- **Integration Epic:** 5-8 SP per external service
|
|
46
|
+
- **Operations Epic:** 13 SP (standard CI/CD + monitoring)
|
|
47
|
+
---
|
|
48
|
+
## Feature Size Classification
|
|
49
|
+
---
|
|
50
|
+
| Size | Task Count | Phases | Characteristics |
|
|
51
|
+
| ----------- | ---------- | ------- | -------------------------------------------------- |
|
|
52
|
+
| **SMALL** | 1-10 tasks | 1 phase | Single file changes, isolated |
|
|
53
|
+
| **MEDIUM** | 11-40 | 2-4 | Multiple files, some cross-layer dependencies |
|
|
54
|
+
| **COMPLEX** | 41-80 | 4-8 | Multiple modules, integration, extensive testing |
|
|
55
|
+
| **LARGE** | 81+ | 8-N | Feature affecting entire system, major refactoring |
|
|
56
|
+
---
|
|
57
|
+
## How to Use Hybrid Estimation
|
|
58
|
+
---
|
|
59
|
+
- Each task shows **both** Story Points and time: `• 2 SP (~3-4h)`
|
|
60
|
+
- Story Points measure **complexity** (stable across teams)
|
|
61
|
+
- Time estimates measure **effort** (varies by team velocity)
|
|
62
|
+
- Track both to improve estimation accuracy over time
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Task Format Reference (Spec-Kit Inspired)
|
|
2
|
+
|
|
3
|
+
> **Canonical task format for all AI Flow development workflows.**
|
|
4
|
+
>
|
|
5
|
+
> This file defines the standard task format used in Phase 9 (Roadmap), /feature, /fix, and all development commands.
|
|
6
|
+
---
|
|
7
|
+
## Standard Task Format
|
|
8
|
+
---
|
|
9
|
+
**Every task must follow this format:**
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
- [ ] [TaskID] [Optional:P] [Optional:StoryTag] Description • SP (~time)
|
|
13
|
+
File: exact/path/to/file.ts
|
|
14
|
+
Dependencies: T001, T002 (or "None")
|
|
15
|
+
```
|
|
16
|
+
---
|
|
17
|
+
## Format Components
|
|
18
|
+
---
|
|
19
|
+
| Component | Required | Description |
|
|
20
|
+
| --------------- | -------- | ------------------------------------------------------------------------ |
|
|
21
|
+
| `[TaskID]` | ✅ | Sequential ID in execution order (T001, T002, ..., T099, T100) |
|
|
22
|
+
| `[P]` | ❌ | Parallelization marker - ONLY for tasks that can run simultaneously |
|
|
23
|
+
| `[StoryTag]` | ❌ | Links task to user story ([US1], [US2]) - only in story-based phases |
|
|
24
|
+
| `Description` | ✅ | What to implement (specific, LLM-completable without additional context) |
|
|
25
|
+
| `• SP (~time)` | ✅ | Hybrid estimation - Story Points + time (e.g., "2 SP (~3-4h)") |
|
|
26
|
+
| `File:` | ✅ | Exact file path where work happens |
|
|
27
|
+
| `Dependencies:` | ✅ | Which tasks must complete first (even if "None") |
|
|
28
|
+
---
|
|
29
|
+
## Task Sequencing Rules
|
|
30
|
+
---
|
|
31
|
+
1. **Tests BEFORE implementation** (TDD approach)
|
|
32
|
+
2. **Models → Services → Controllers → Endpoints** (layer dependency order)
|
|
33
|
+
3. **Core utilities BEFORE features** that use them
|
|
34
|
+
4. **Database migrations BEFORE data access code**
|
|
35
|
+
5. **Interfaces BEFORE implementations**
|
|
36
|
+
---
|
|
37
|
+
## Parallelization Rules ([P] Marker)
|
|
38
|
+
---
|
|
39
|
+
### ✅ Use [P] When:
|
|
40
|
+
|
|
41
|
+
- Tasks target **different files**
|
|
42
|
+
- No shared dependencies between tasks
|
|
43
|
+
- Can run simultaneously (e.g., independent entities, different modules)
|
|
44
|
+
|
|
45
|
+
### ❌ Don't Use [P] When:
|
|
46
|
+
|
|
47
|
+
- Task depends on another incomplete task
|
|
48
|
+
- Same file is modified by multiple tasks
|
|
49
|
+
- Shared resource (DB migration, config file, shared service)
|
|
50
|
+
---
|
|
51
|
+
## Complete Task Example
|
|
52
|
+
---
|
|
53
|
+
```markdown
|
|
54
|
+
- [ ] [T042] [P] Write unit tests for Product entity validation (12 tests) • 2 SP (~3-4h)
|
|
55
|
+
File: tests/unit/entities/Product.entity.spec.ts
|
|
56
|
+
Tests: price validation, stock constraints, name required, category FK
|
|
57
|
+
Dependencies: None (can run parallel with other test tasks)
|
|
58
|
+
```
|
|
59
|
+
---
|
|
60
|
+
## Feature Template
|
|
61
|
+
---
|
|
62
|
+
```markdown
|
|
63
|
+
### Feature {{NUMBER}}: {{FEATURE_NAME}} • {{SP}} SP (~{{TIME}})
|
|
64
|
+
|
|
65
|
+
**Scope:** {{ENTITY}} entity + {{ENDPOINT_COUNT}} endpoints + {{TEST_COUNT}} tests
|
|
66
|
+
|
|
67
|
+
**Tasks:**
|
|
68
|
+
|
|
69
|
+
- [ ] T0XX [P] Write {{ENTITY}} entity tests • 2 SP (~3-4h) → tests/unit/{{ENTITY}}.spec.ts
|
|
70
|
+
- [ ] T0YY Create {{ENTITY}} entity • 2 SP (~3-4h) → src/entities/{{ENTITY}}.ts
|
|
71
|
+
- [ ] T0ZZ Create I{{REPOSITORY}} interface • 1 SP (~1-2h) → src/repositories/I{{REPOSITORY}}.ts
|
|
72
|
+
- [ ] T0AA Implement {{REPOSITORY}} • 2 SP (~3-4h) → src/repositories/{{REPOSITORY}}.ts (after T0YY, T0ZZ)
|
|
73
|
+
- [ ] T0BB Implement {{SERVICE}} business logic • 3 SP (~4-8h) → src/services/{{SERVICE}}.ts (after T0AA)
|
|
74
|
+
- [ ] T0CC Create {{CONTROLLER}} endpoints • 2 SP (~3-4h) → src/controllers/{{CONTROLLER}}.ts (after T0BB)
|
|
75
|
+
- [ ] T0DD [P] Write integration tests • 2 SP (~3-4h) → tests/integration/{{CONTROLLER}}.spec.ts
|
|
76
|
+
- [ ] T0EE [P] Update API docs • 1 SP (~1h) → docs/api.md
|
|
77
|
+
|
|
78
|
+
**Parallel:** T0XX, T0DD, T0EE can run together
|
|
79
|
+
|
|
80
|
+
**Done when:** All endpoints work + tests pass + coverage ≥ {{COVERAGE}}%
|
|
81
|
+
|
|
82
|
+
**Start:** `/feature new "{{FEATURE_NAME}}"`
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|