ai-flow-dev 2.2.0 → 2.2.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 -24
- package/dist/cli.js +228 -418
- 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-build.md +2 -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 +67 -0
- package/prompts/backend/flow-commit.md +53 -0
- package/prompts/backend/flow-docs-sync.md +55 -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 +129 -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-build.md +2 -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 +67 -0
- package/prompts/frontend/flow-commit.md +53 -0
- package/prompts/frontend/flow-docs-sync.md +39 -35
- 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 +129 -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-build.md +2 -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 +67 -0
- package/prompts/mobile/flow-commit.md +53 -0
- package/prompts/mobile/flow-docs-sync.md +39 -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 +129 -0
- package/prompts/shared/smart-skip-preflight.md +214 -0
- package/templates/AGENT.template.md +13 -3
- package/templates/backend/.clauderules.template +5 -4
- package/templates/backend/.cursorrules.template +1 -1
- 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
|
@@ -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
|
|
@@ -141,7 +141,12 @@ All documentation is structured to guide AI assistants in understanding the proj
|
|
|
141
141
|
|
|
142
142
|
When working on this project:
|
|
143
143
|
|
|
144
|
-
1.
|
|
144
|
+
1. **🚀 Proactive Execution (MANDATORY):**
|
|
145
|
+
- When any command starting with `/flow-` is detected (e.g., `/flow-build`, `/flow-work`, `/flow-check`), **IMMEDIATELY enter AGENT/EXECUTION MODE**.
|
|
146
|
+
- **Do NOT ask for permission** to read files, write documents, or execute shell commands that are part of the interactive flow.
|
|
147
|
+
- These flows already include their own internal planning and confirmation steps. Proactivity is key to efficiency.
|
|
148
|
+
|
|
149
|
+
2. **Before starting ANY task:**
|
|
145
150
|
- Read `ai-instructions.md` for project-wide rules
|
|
146
151
|
- Check relevant documentation for the area you're working on
|
|
147
152
|
- Understand the business context from `project-brief.md`
|
|
@@ -336,7 +341,12 @@ All documentation is structured to guide AI assistants in understanding the proj
|
|
|
336
341
|
|
|
337
342
|
When working on this project:
|
|
338
343
|
|
|
339
|
-
1.
|
|
344
|
+
1. **🚀 Proactive Execution (MANDATORY):**
|
|
345
|
+
- When any command starting with `/flow-` is detected (e.g., `/flow-build`, `/flow-work`, `/flow-check`), **IMMEDIATELY enter AGENT/EXECUTION MODE**.
|
|
346
|
+
- **Do NOT ask for permission** to read files, write documents, or execute shell commands that are part of the interactive flow.
|
|
347
|
+
- These flows already include their own internal planning and confirmation steps. Proactivity is key to efficiency.
|
|
348
|
+
|
|
349
|
+
2. **Before starting ANY task:**
|
|
340
350
|
- Read `ai-instructions.md` for project-wide rules
|
|
341
351
|
- Check relevant documentation for the area you're working on
|
|
342
352
|
- Understand the business context from `project-brief.md`
|
|
@@ -412,4 +422,4 @@ See `README.md` for installation and setup instructions.
|
|
|
412
422
|
|
|
413
423
|
**Last Updated:** {{GENERATION_DATE}}
|
|
414
424
|
|
|
415
|
-
**Generated by:** AI Flow v2.
|
|
425
|
+
**Generated by:** AI Flow v2.2.4
|
|
@@ -75,10 +75,11 @@ This file contains Claude Code-specific preferences and workflows.
|
|
|
75
75
|
|
|
76
76
|
## 🚀 Claude Code Workflow
|
|
77
77
|
|
|
78
|
-
###
|
|
79
|
-
1.
|
|
80
|
-
2.
|
|
81
|
-
3.
|
|
78
|
+
### Workflow Modes
|
|
79
|
+
1. **🚀 Forced Agent Mode:** When running any command starting with `/flow-`, **IMMEDIATELY enter AGENT/EXECUTION MODE**. Do not wait for a general plan approval.
|
|
80
|
+
2. **Plan Mode:** Use plan mode for complex *custom* features that are not part of the standard `ai-flow` commands.
|
|
81
|
+
3. Break down custom features into small, testable chunks.
|
|
82
|
+
4. Get user approval before implementation for custom features.
|
|
82
83
|
|
|
83
84
|
### Implementation
|
|
84
85
|
1. Follow architecture patterns strictly
|
|
@@ -92,7 +92,7 @@ Read these files in order:
|
|
|
92
92
|
|
|
93
93
|
- Use `@AGENT.md` to reference project context
|
|
94
94
|
- Use `@ai-instructions.md` for coding rules
|
|
95
|
-
-
|
|
95
|
+
- **🚀 Proactive Execution:** When running `/flow-build`, `/flow-work`, or `/flow-check`, **ACT IMMEDIATELY**. These flows have their own interactive confirmation steps. Do not wait for a general plan approval.
|
|
96
96
|
- Check `docs/` folder for detailed specifications
|
|
97
97
|
|
|
98
98
|
---
|