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
@@ -0,0 +1,214 @@
1
+ # Smart Skip Pre-Flight Check (Shared Template)
2
+
3
+ ## 🔍 Pre-Flight Check Logic
4
+
5
+ **This section is automatically included in Phases 1-7 to enable smart skip functionality.**
6
+
7
+ ### How It Works
8
+
9
+ 1. **Read audit data** from Phase 0: `.ai-flow/cache/audit-data.json`
10
+ 2. **Check consistency score** for the current phase
11
+ 3. **Execute appropriate scenario** based on score
12
+
13
+ ---
14
+
15
+ ## Execution Flow
16
+
17
+ ```javascript
18
+ // Read audit data from Phase 0
19
+ const auditData = readJSON('.ai-flow/cache/audit-data.json');
20
+ const phaseData = auditData?.phases?.[currentPhase];
21
+
22
+ if (phaseData?.exists) {
23
+ // Documentation exists, check consistency
24
+ if (phaseData.consistencyScore >= 95) {
25
+ executeScenarioA(); // SKIP
26
+ } else if (phaseData.consistencyScore >= 80) {
27
+ executeScenarioB(); // HYBRID
28
+ } else {
29
+ executeScenarioC(); // FULL
30
+ }
31
+ } else {
32
+ // No existing docs, proceed with full phase
33
+ executeScenarioC();
34
+ }
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Scenario A: High Confidence (≥95%) - SKIP
40
+
41
+ **Display format:**
42
+
43
+ ```
44
+ ---
45
+ ✅ [PHASE NAME] ALREADY DOCUMENTED
46
+
47
+ File: [target-file]
48
+ Consistency: [score]%
49
+ Status: Complete documentation
50
+
51
+ Documented Information:
52
+ ✅ [Key item 1]
53
+ ✅ [Key item 2]
54
+ ✅ [Key item 3]
55
+ ...
56
+
57
+ ---
58
+
59
+ Use existing documentation? (Y/n) ⭐
60
+ > _
61
+ ```
62
+
63
+ **User Actions:**
64
+ - **Y**: Skip to next phase
65
+ - **n**: Proceed with full phase questionnaire
66
+
67
+ ---
68
+
69
+ ## Scenario B: Medium Confidence (80-94%) - HYBRID
70
+
71
+ **Display format:**
72
+
73
+ ```
74
+ ---
75
+ 📚 [PHASE NAME] PARTIALLY DOCUMENTED
76
+
77
+ File: [target-file]
78
+ Consistency: [score]%
79
+ Status: Most information present, some gaps
80
+
81
+ Documented:
82
+ ✅ [Item 1]
83
+ ✅ [Item 2]
84
+
85
+ Missing:
86
+ ❌ [Gap 1]
87
+ ❌ [Gap 2]
88
+
89
+ ---
90
+
91
+ Options:
92
+ A) Answer only [N] missing questions ⭐
93
+ B) Re-answer everything (full phase)
94
+ C) Skip entirely (use docs as-is)
95
+
96
+ > _
97
+ ```
98
+
99
+ **User Actions:**
100
+ - **A**: Ask only missing questions, merge with existing docs
101
+ - **B**: Full phase questionnaire
102
+ - **C**: Skip with warning
103
+
104
+ ---
105
+
106
+ ## Scenario C: Low Confidence (<80%) or No Docs - FULL PHASE
107
+
108
+ **Display format:**
109
+
110
+ ```
111
+ ---
112
+ ⚠️ [PHASE NAME] NEEDS DOCUMENTATION
113
+
114
+ Reason: [target-file] is outdated or missing
115
+ Consistency: [score]% (or N/A if file doesn't exist)
116
+
117
+ Issues detected:
118
+ ❌ [Issue 1]
119
+ ❌ [Issue 2]
120
+
121
+ Recommendation: Complete full phase questionnaire
122
+
123
+ Proceeding with full phase...
124
+ [Continue to first question]
125
+ ```
126
+
127
+ ---
128
+
129
+ ## Phase-Specific Configuration
130
+
131
+ Each phase references this template with specific parameters:
132
+
133
+ ### Phase 1: Discovery & Business
134
+ - **Target File**: `project-brief.md`
135
+ - **Phase Name**: "BUSINESS CONTEXT"
136
+ - **Key Items**: Project name, description, users, objectives, system type, features, scope, constraints, metrics, business flows
137
+ - **Typical Gaps**: Business objectives, success metrics, constraints
138
+
139
+ ### Phase 2: Data Architecture
140
+ - **Target File**: `docs/data-model.md`
141
+ - **Phase Name**: "DATA ARCHITECTURE"
142
+ - **Key Items**: Entities, relationships, data patterns, indexes
143
+ - **Typical Gaps**: Missing entities, undocumented relationships, missing fields
144
+
145
+ ### Phase 3: System Architecture
146
+ - **Target File**: `docs/architecture.md`
147
+ - **Phase Name**: "SYSTEM ARCHITECTURE"
148
+ - **Key Items**: Framework, architecture pattern, API style, database, caching, background jobs, integrations
149
+ - **Typical Gaps**: API versioning, rate limiting, caching strategy
150
+
151
+ ### Phase 4: Security & Authentication
152
+ - **Target File**: `specs/security.md`
153
+ - **Phase Name**: "SECURITY & AUTHENTICATION"
154
+ - **Key Items**: Auth strategy, encryption, security patterns, compliance
155
+ - **Typical Gaps**: Compliance requirements, audit logging, security policies
156
+
157
+ ### Phase 5: Code Standards
158
+ - **Target File**: `docs/code-standards.md`
159
+ - **Phase Name**: "CODE STANDARDS"
160
+ - **Key Items**: Linters, formatters, naming conventions, code review process
161
+ - **Typical Gaps**: Team-specific conventions, code review workflow
162
+
163
+ ### Phase 6: Testing Strategy
164
+ - **Target File**: `docs/testing.md`
165
+ - **Phase Name**: "TESTING STRATEGY"
166
+ - **Key Items**: Test framework, coverage targets, test types, CI/CD integration
167
+ - **Typical Gaps**: E2E strategy, load testing, performance testing
168
+
169
+ ### Phase 7: Operations & Deployment
170
+ - **Target File**: `docs/deployment.md`
171
+ - **Phase Name**: "OPERATIONS & DEPLOYMENT"
172
+ - **Key Items**: CI/CD pipeline, deployment platform, monitoring, logging
173
+ - **Typical Gaps**: Incident runbooks, disaster recovery, scaling strategy
174
+
175
+ ---
176
+
177
+ ## Usage in Phase Prompts
178
+
179
+ **In each phase prompt (1-7), add this reference:**
180
+
181
+ ```markdown
182
+ ## 🔍 Pre-Flight Check (Smart Skip Logic)
183
+
184
+ > 📎 **Reference:** See [prompts/shared/smart-skip-preflight.md](../shared/smart-skip-preflight.md) for the complete smart skip logic.
185
+
186
+ **Execute Pre-Flight Check for this phase:**
187
+
188
+ - **Phase**: [Phase Number]
189
+ - **Target File**: [file path]
190
+ - **Phase Name**: [display name]
191
+
192
+ [Proceed with appropriate scenario based on audit data]
193
+
194
+ ---
195
+
196
+ ## Phase [N] Questions (Full Mode)
197
+
198
+ [Continue with phase-specific questions...]
199
+ ```
200
+
201
+ ---
202
+
203
+ ## Benefits of This Approach
204
+
205
+ ✅ **DRY Principle**: Single source of truth for skip logic
206
+ ✅ **Easy Maintenance**: Update once, applies to all phases
207
+ ✅ **Consistency**: Same UX across all phases
208
+ ✅ **Reduced File Size**: Each phase prompt is ~100 lines shorter
209
+ ✅ **Clear Separation**: Logic vs content
210
+
211
+ ---
212
+
213
+ **Last Updated:** 2025-12-22
214
+ **Version:** 1.0