ai-flow-dev 1.0.2 → 1.0.3

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 CHANGED
@@ -129,7 +129,7 @@ Or using uv (Python tool manager):
129
129
  uv tool install ai-flow-dev
130
130
  ```
131
131
 
132
- **Current version:** 1.0.2
132
+ **Current version:** 1.0.3
133
133
 
134
134
  ---
135
135
 
package/dist/cli.js CHANGED
@@ -679,7 +679,7 @@ async function initializeProject(targetPath, aiTool, projectType, projectName, p
679
679
  program
680
680
  .name('ai-flow')
681
681
  .description('AI-powered development workflow from idea to production. Generate specs, plan features, and build with AI assistance.')
682
- .version('1.0.2');
682
+ .version('1.0.3');
683
683
  program
684
684
  .command('init')
685
685
  .description('Initialize AI Flow in current directory')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-flow-dev",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "AI-powered development workflow from idea to production. Generate specs, plan features, and build with AI assistance throughout your project lifecycle.",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -26,9 +26,9 @@ Before executing this command, ensure:
26
26
 
27
27
  ---
28
28
 
29
- ## Workflow: 2 Steps
29
+ ## Workflow: 3 Steps
30
30
 
31
- ### Step 1: Read Documentation (1 minute - automatic)
31
+ ### Step 1: Read Documentation & Prepare Directory (1-2 minutes)
32
32
 
33
33
  **Read `ai-instructions.md` to identify:**
34
34
 
@@ -36,6 +36,25 @@ Before executing this command, ensure:
36
36
  - Framework and version (if any)
37
37
  - Package manager preference
38
38
 
39
+ **Check for conflicting files:**
40
+
41
+ Most framework CLIs fail if they detect existing files like `README.md`, `package.json`, `.gitignore`, etc.
42
+
43
+ **Strategy: Temporary move → Initialize → Merge back**
44
+
45
+ ```bash
46
+ # 1. Create temporary backup
47
+ mkdir -p .ai-flow/temp-backup
48
+
49
+ # 2. Move AI Flow documentation temporarily (NOT deletion)
50
+ mv README.md .ai-flow/temp-backup/ 2>/dev/null || true
51
+ mv package.json .ai-flow/temp-backup/ 2>/dev/null || true
52
+ mv tsconfig.json .ai-flow/temp-backup/ 2>/dev/null || true
53
+ mv .gitignore .ai-flow/temp-backup/ 2>/dev/null || true
54
+
55
+ # 3. Keep .ai-flow/ directory intact with all documentation
56
+ ```
57
+
39
58
  **Display summary:**
40
59
 
41
60
  ```
@@ -49,8 +68,10 @@ Before executing this command, ensure:
49
68
 
50
69
  Target Directory: {{PWD}}
51
70
 
52
- ⚠️ IMPORTANT: This will initialize the project in the CURRENT directory.
53
- No subdirectories will be created.
71
+ ⚠️ IMPORTANT:
72
+ Files temporarily moved to .ai-flow/temp-backup/
73
+ • Will merge AI Flow docs with framework files after init
74
+ • .ai-flow/ directory preserved with all documentation
54
75
 
55
76
  Continue? (Y/n)
56
77
  ```
@@ -74,7 +95,7 @@ Please specify the framework to use:
74
95
 
75
96
  ```
76
97
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
- 🏗️ Step 2/2: Initialize Project
98
+ 🏗️ Step 2/3: Initialize Project
78
99
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
79
100
  ```
80
101
 
@@ -82,8 +103,9 @@ Please specify the framework to use:
82
103
 
83
104
  1. ✅ **Initialize in current directory** (use `.` when the CLI supports it)
84
105
  2. ✅ **Use official CLI tools** (don't create manual folder structures)
85
- 3. **DO NOT create subdirectories** (no `mkdir project-name`)
86
- 4. ❌ **DO NOT create manual file structures**
106
+ 3. **Directory must be clean** (backup existing files first if needed)
107
+ 4. ❌ **DO NOT create subdirectories** (no `mkdir project-name`)
108
+ 5. ❌ **DO NOT create manual file structures**
87
109
 
88
110
  ---
89
111
 
@@ -196,6 +218,61 @@ unzip -o project.zip && rm project.zip
196
218
 
197
219
  ---
198
220
 
221
+ +### Step 3: Merge AI Flow Documentation with Framework Files (2-3 minutes)
222
+
223
+ After framework initialization completes, intelligently merge the documentation:
224
+
225
+ **3.1 README Strategy:**
226
+
227
+ ```bash
228
+ # 1. Rename framework README to preserve it
229
+ mv README.md docs/README.framework.md
230
+
231
+ # 2. Use AI Flow README as main (already linked to all docs)
232
+ # The README from ai-flow init already references:
233
+ # - ai-instructions.md
234
+ # - project-brief.md
235
+ # - All specs/ and docs/ files
236
+ # Keep it as the main README.md (it's in .ai-flow/temp-backup/)
237
+
238
+ # 3. Copy back AI Flow README
239
+ cp .ai-flow/temp-backup/README.md .
240
+ ```
241
+
242
+ **3.2 Merge package.json (if applicable):**
243
+
244
+ ```bash
245
+ # For Node.js projects only:
246
+ # Framework created package.json with scripts, dependencies
247
+
248
+ # Strategy: Keep framework package.json, add AI Flow metadata
249
+ # Read both files and merge:
250
+ # - Keep framework: scripts, dependencies, devDependencies
251
+ # - Add from AI Flow backup: name, description, keywords, author
252
+ ```
253
+
254
+ **3.3 Merge tsconfig.json/config files:**
255
+
256
+ ```bash
257
+ # Keep framework configuration (optimized for the framework)
258
+ # AI Flow backup likely didn't have project-specific config anyway
259
+ ```
260
+
261
+ **3.4 Merge .gitignore:**
262
+
263
+ ```bash
264
+ # Combine both .gitignore files
265
+ cat .gitignore .ai-flow/temp-backup/.gitignore | sort -u > .gitignore.merged
266
+ mv .gitignore.merged .gitignore
267
+ ```
268
+
269
+ **3.5 Clean up temp backup:**
270
+
271
+ ```bash
272
+ # Remove temporary backup (already merged)
273
+ rm -rf .ai-flow/temp-backup
274
+ ```
275
+
199
276
  **Success Output:**
200
277
 
201
278
  ```
@@ -208,12 +285,19 @@ unzip -o project.zip && rm project.zip
208
285
  Generated structure:
209
286
  {{LIST_KEY_FILES}}
210
287
 
288
+ 📋 Documentation merged:
289
+ ✅ README.md (AI Flow - links to all docs)
290
+ ✅ docs/README.framework.md (Framework reference)
291
+ ✅ package.json (Framework + AI Flow metadata)
292
+ ✅ .gitignore (Combined rules)
293
+
211
294
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
212
295
 
213
296
  Next steps:
214
- 1. Review generated files
215
- 2. Run /flow-project-roadmap to plan implementation
216
- 3. Start development with /feature commands
297
+ 1. Review merged files (README.md is your main entry point)
298
+ 2. Check docs/README.framework.md for framework-specific setup
299
+ 3. Run /flow-project-roadmap to plan implementation
300
+ 4. Start development with /feature commands
217
301
  ```
218
302
 
219
303
  ---