ai-flow-dev 2.2.4 β†’ 2.4.0

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
@@ -140,7 +140,7 @@ Or using uv (Python tool manager):
140
140
  uv tool install ai-flow-dev
141
141
  ```
142
142
 
143
- ## **Current version:** 2.2.4
143
+ ## **Current version:** 2.4.0
144
144
 
145
145
  ## πŸš€ Quick Start
146
146
 
@@ -310,13 +310,45 @@ After initialization, use these slash commands in your AI tool:
310
310
 
311
311
  **Workflows (All project types):**
312
312
 
313
- - `/flow-work` - **Unified orchestrator** for Features/Refactors/Fixes with smart detection
313
+ - `/flow-work` - **Unified orchestrator** for Features/Refactors/Fixes with smart detection, automatic completion tracking, and consolidated planning
314
314
  - `/flow-check` - **Combined validation**: Tests + Code Review in one command
315
315
  - `/flow-commit` - Automate commits with Conventional Commits (3-5 min)
316
316
  - `/flow-docs-sync` - **Sync documentation** when code changes occur
317
317
 
318
+ > **Note:** `/flow-work` automatically marks tasks as complete in `planning/roadmap.md` and user story DoD checklists when implementation finishes. It generates a consolidated `work.md` file for efficient planning and context management.
319
+
318
320
  ## **πŸ“š See [GETTING-STARTED.md](GETTING-STARTED.md) for complete command reference**
319
321
 
322
+ ---
323
+
324
+ ## πŸ“ Project Structure
325
+
326
+ AI Flow organizes your project with clear separation of concerns:
327
+
328
+ ### Documentation & Specifications
329
+
330
+ - **`docs/`** - Descriptive documentation (WHAT the project IS)
331
+ - `architecture.md` - System architecture and design patterns
332
+ - `data-model.md` - Entities, relationships, database schema
333
+ - `api.md` - Available endpoints and contracts
334
+ - `testing.md` - Testing strategy and guidelines
335
+
336
+ - **`specs/`** - Technical specifications (HOW to IMPLEMENT)
337
+ - `security.md` - Security rules and constraints (MUST/NEVER)
338
+ - `configuration.md` - Environment variables and settings
339
+
340
+ ### Planning & Requirements
341
+
342
+ - **`planning/`** - Requirements and roadmap (WHAT to DO)
343
+ - `roadmap.md` - Technical implementation roadmap with Story Points
344
+ - `user-stories/` - Agile user stories with acceptance criteria
345
+
346
+ ### Development State
347
+
348
+ - **`.ai-flow/`** - AI workflow state (temporary, can be gitignored)
349
+ - `work/` - Active development tasks
350
+ - `archive/` - Completed tasks (organized by month)
351
+
320
352
  ## πŸ’‘ How It Works
321
353
 
322
354
  1. **Smart Detection** - Analyzes existing projects in 3 layers (15s to 5min)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-flow-dev",
3
- "version": "2.2.4",
3
+ "version": "2.4.0",
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
  "type": "module",
6
6
  "main": "dist/cli.js",
@@ -322,7 +322,7 @@ C) Cancel /flow-build (fix manually first)
322
322
  "reason": "Final documentation complete and up-to-date"
323
323
  },
324
324
  "phase9": {
325
- "file": "docs/roadmap.md",
325
+ "file": "planning/roadmap.md",
326
326
  "exists": false,
327
327
  "consistencyScore": 0,
328
328
  "recommendation": "SKIP",
@@ -330,7 +330,7 @@ C) Cancel /flow-build (fix manually first)
330
330
  "reason": "Project already implemented - roadmap not needed for existing code"
331
331
  },
332
332
  "phase10": {
333
- "file": "docs/user-stories/",
333
+ "file": "planning/user-stories/",
334
334
  "exists": false,
335
335
  "consistencyScore": 0,
336
336
  "recommendation": "SKIP",
@@ -29,7 +29,7 @@ Break down technical roadmap tasks into user-centric Agile requirements (User St
29
29
  // turbo
30
30
  ### Step 10.1: Load Context from Roadmap
31
31
 
32
- **Extract from `docs/roadmap.md`:**
32
+ **Extract from `planning/roadmap.md`:**
33
33
 
34
34
  ```
35
35
  CONTEXT LOADED
@@ -66,7 +66,7 @@ SCOPE SELECTION
66
66
 
67
67
  ### Step 10.3: Generate User Story Documents
68
68
 
69
- **For each Feature in roadmap, create `docs/user-stories/EP-XXX/HU-XXX-YYY.md`:**
69
+ **For each Feature in roadmap, create `planning/user-stories/EP-XXX/HU-XXX-YYY.md`:**
70
70
 
71
71
  ```markdown
72
72
  # User Story: HU-{{EPIC}}-{{FEATURE}}
@@ -123,7 +123,7 @@ SCOPE SELECTION
123
123
 
124
124
  ## Tasks
125
125
 
126
- > Inherited from docs/roadmap.md Feature {{FEATURE_NUMBER}}
126
+ > Inherited from planning/roadmap.md Feature {{FEATURE_NUMBER}}
127
127
 
128
128
  {{TASKS_FROM_ROADMAP}}
129
129
 
@@ -169,7 +169,7 @@ SCOPE SELECTION
169
169
 
170
170
  ### Step 10.4: Generate Test Cases (Separate Files)
171
171
 
172
- **For each User Story, create `docs/user-stories/EP-XXX/tests/TC-XXX-YYY.md`:**
172
+ **For each User Story, create `planning/user-stories/EP-XXX/tests/TC-XXX-YYY.md`:**
173
173
 
174
174
  ```markdown
175
175
  # Test Cases: HU-{{EPIC}}-{{FEATURE}}
@@ -235,12 +235,12 @@ SCOPE SELECTION
235
235
 
236
236
  ### Step 10.5: Update Roadmap with Links
237
237
 
238
- **After generating, update `docs/roadmap.md`:**
238
+ **After generating, update `planning/roadmap.md`:**
239
239
 
240
240
  ```markdown
241
241
  ### Feature 1.1: {{FEATURE_NAME}} β€’ {{SP}} SP
242
242
 
243
- **User Story:** [HU-001-001](docs/user-stories/EP-001/HU-001-001.md)
243
+ **User Story:** [HU-001-001](planning/user-stories/EP-001/HU-001-001.md)
244
244
  **Status:** Not Started
245
245
 
246
246
  **Tasks:**
@@ -311,11 +311,11 @@ PHASE 10 COMPLETE
311
311
  β”œβ”€β”€ Generated: X User Stories
312
312
  β”œβ”€β”€ Total SP: X SP
313
313
  β”œβ”€β”€ Test Cases: X
314
- β”œβ”€β”€ Files: docs/user-stories/EP-XXX/
315
- └── Updated: docs/roadmap.md (added links)
314
+ β”œβ”€β”€ Files: planning/user-stories/EP-XXX/
315
+ └── Updated: planning/roadmap.md (added links)
316
316
 
317
317
  Next steps:
318
- 1. Review User Stories in docs/user-stories/
318
+ 1. Review User Stories in planning/user-stories/
319
319
  2. Start implementing: /flow-dev-feature HU-001-001
320
320
  3. Generate more: /flow-build fase 10 EP-XXX
321
321
  ```
@@ -326,8 +326,8 @@ Next steps:
326
326
 
327
327
  After Phase 10, generate/update:
328
328
 
329
- - `docs/user-stories/*.md` - Detailed Agile requirements
330
- - `docs/roadmap.md` - (updated with story links)
329
+ - `planning/user-stories/*.md` - Detailed Agile requirements
330
+ - `planning/roadmap.md` - (updated with story links)
331
331
 
332
332
  ---
333
333
 
@@ -312,7 +312,7 @@ COVERAGE VALIDATION
312
312
 
313
313
  ---
314
314
 
315
- **Write `docs/roadmap.md` with this structure:**
315
+ **Write `planning/roadmap.md` with this structure:**
316
316
 
317
317
  ```markdown
318
318
  # Implementation Roadmap: {{PROJECT_NAME}}
@@ -419,7 +419,7 @@ PHASE 9 COMPLETE
419
419
  β”œβ”€β”€ Coverage: 100% (all components have [E][R][S][C][T][D])
420
420
  └── Ready for: /flow-dev-feature
421
421
 
422
- Next: Open docs/roadmap.md and start with EP-000, or continue to Phase 10 for detailed User Stories.
422
+ Next: Open planning/roadmap.md and start with EP-000, or continue to Phase 10 for detailed User Stories.
423
423
 
424
424
  **OFFER PHASE 10:**
425
425
 
@@ -427,7 +427,7 @@ Next: Open docs/roadmap.md and start with EP-000, or continue to Phase 10 for de
427
427
  ---
428
428
  βœ… PHASE 9 COMPLETE: IMPLEMENTATION ROADMAP GENERATED
429
429
  ---
430
- 🎯 Roadmap created in docs/roadmap.md
430
+ 🎯 Roadmap created in planning/roadmap.md
431
431
  πŸ“Š Total Story Points: {{SP}}
432
432
  πŸ—οΈ Epics defined: {{EPICS_COUNT}}
433
433
  ---
@@ -462,7 +462,7 @@ Your choice (A/B): __
462
462
 
463
463
  After Phase 9, generate/update:
464
464
 
465
- - `docs/roadmap.md` - Technical implementation plan
465
+ - `planning/roadmap.md` - Technical implementation plan
466
466
 
467
467
  ---
468
468
 
@@ -9,33 +9,39 @@ This file contains the detailed execution logic for implementing new features, i
9
9
  ---
10
10
  ## πŸš€ Feature Implementation Flow
11
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`.
12
+ ### 1. Context Analysis (auto-skip if User Story with detailed tasks)
13
+ - Extract requirements from User Story or Roadmap
14
+ - If User Story has detailed tasks: Skip to work.md generation
15
+ - If Roadmap or Manual: Analyze and refine
16
+ - Read relevant documentation (ai-instructions.md, architecture.md, etc.)
16
17
 
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.**
18
+ ### 2. work.md Generation
19
+ - Generate consolidated work.md (see Phase 2 in flow-work.md)
20
+ - Include: Context, Objective, Constraints, Approach, Tasks, Validation
21
+ - **User Confirmation Required**
22
22
 
23
23
  ### 3. Progressive Implementation
24
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.
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
+ Follow tasks in `work.md`:
30
+ - Update checkboxes as completed
31
+ - Update `status.json` progress
32
+ - Follow patterns and constraints specified
28
33
 
29
34
  ### 4. Definition of Done (DoD)
30
- - If HU mode: Validate against Gherkin scenarios.
31
- - Run tests and linting.
32
- - Perform security check.
35
+ - If HU mode: Validate against Gherkin scenarios
36
+ - Run tests and linting
37
+ - Perform security check
38
+ - **Update completion status** in source documents (see Phase 4 Step 1 in flow-work.md)
33
39
 
34
40
  ---
35
41
  ## 🌿 Git Branching Strategy
36
- - Generate slug from name.
37
- - Execute `git checkout -b feature/[slug]`.
38
- - Maintain `status.json` with commit history.
42
+ - Generate slug from name
43
+ - Execute `git checkout -b feature/[slug]`
44
+ - Maintain `status.json` with commit history
39
45
 
40
46
  ---
41
47
  ## πŸ“¦ status.json Persistence
@@ -10,23 +10,26 @@ This file contains the detailed execution logic for bug fixes, imported by `@flo
10
10
  ## πŸ”§ Bug Fix Workflow
11
11
 
12
12
  ### 1. Classification
13
- - **QUICK**: 1 file, obvious cause (typo, null check).
14
- - **COMPLEX**: Multiple files, investigation needed.
13
+ - **QUICK**: 1 file, obvious cause (typo, null check)
14
+ - **COMPLEX**: Multiple files, investigation needed
15
15
 
16
- ### 2. Deep Analysis (Complex Fix)
17
- - Create work directory.
18
- - Document root cause in `analysis.md`.
19
- - Map side effects.
16
+ ### 2. Analysis & work.md Generation
17
+ - **QUICK**: Minimal work.md (objective + 1-2 tasks)
18
+ - **COMPLEX**: Full work.md with root cause analysis
19
+ - Document root cause in Objective section
20
+ - Map side effects in Approach section
21
+ - Generate detailed tasks
20
22
 
21
23
  ### 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.
24
+ - **Test-First Approach**: Add failing test that reproduces bug
25
+ - Apply the fix following work.md tasks
26
+ - Verify tests pass
27
+ - **Update completion status** if fix was tracked in roadmap/user stories (see Phase 4 Step 1 in flow-work.md)
25
28
 
26
29
  ---
27
30
  ## 🌿 Git Branching Strategy
28
- - **QUICK**: Usually work on current branch.
29
- - **COMPLEX**: Execute `git checkout -b fix/[slug]`.
31
+ - **QUICK**: Usually work on current branch
32
+ - **COMPLEX**: Execute `git checkout -b fix/[slug]`
30
33
 
31
34
  ---
32
35
  ## πŸ“¦ status.json Persistence
@@ -9,23 +9,29 @@ This file contains the detailed execution logic for code refactoring, imported b
9
9
  ---
10
10
  ## πŸ”„ Refactoring Workflow
11
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.
12
+ ### 1. Scope Identification & work.md Generation
13
+ - Map affected files and dependencies
14
+ - Confirm no behavior change expected
15
+ - Validate against architecture patterns
16
+ - Generate work.md with:
17
+ - Clear scope (what to extract/move/rename)
18
+ - Affected files list
19
+ - Step-by-step tasks
20
+ - "No behavior change" constraint
21
+
22
+ ### 2. Implementation
23
+ - Follow work.md tasks sequentially
24
+ - Update imports and references across codebase
25
+ - **Critical**: Existing tests must pass without modification (unless test itself is refactored)
26
+
27
+ ### 3. Validation
28
+ - Run `/flow-check` to verify no regressions
29
+ - Confirm all tests pass
30
+ - **Update completion status** if refactor was tracked in roadmap/user stories (see Phase 4 Step 1 in flow-work.md)
25
31
 
26
32
  ---
27
33
  ## 🌿 Git Branching Strategy
28
- - Execute `git checkout -b refactor/[slug]`.
34
+ - Execute `git checkout -b refactor/[slug]`
29
35
 
30
36
  ---
31
37
  ## πŸ“¦ status.json Persistence
@@ -10,22 +10,24 @@ This file contains the logic for detecting and resuming paused work items, impor
10
10
  ## ⏸️ Resume Workflow
11
11
 
12
12
  ### 1. Work Detection
13
- - Scan `specs/ai-flow/work/` for any directories.
14
- - Group by type and last updated timestamp.
13
+ - Scan `.ai-flow/work/` for any directories
14
+ - Group by type and last updated timestamp
15
15
 
16
16
  ### 2. Selection Menu
17
- - Show active tasks with percentage and current branch.
18
- - Identify current Git branch and match with work items (⭐⭐ marker).
17
+ - Show active tasks with percentage and current branch
18
+ - Identify current Git branch and match with work items (⭐⭐ marker)
19
19
 
20
20
  ### 3. Context Restoration
21
- - Load `spec.md`, `plan.md`, `task.md`, and `status.json`.
21
+ - Load `work.md` and `status.json`
22
22
  - Verify Git branch:
23
- - If mismatch: Prompt to switch to `git.branchName`.
24
- - Identify the first incomplete task in `task.md`.
23
+ - If mismatch: Prompt to switch to `git.branchName`
24
+ - Identify the first incomplete task in `work.md`
25
+ - Read Documentation Constraints section to refresh context
25
26
 
26
27
  ### 4. Implementation Continuation
27
- - Resume with the previously saved `implementationMode`.
28
- - Continue execution from where it was paused.
28
+ - Resume with the previously saved `implementationMode`
29
+ - Continue execution from where it was paused
30
+ - Follow remaining tasks in `work.md`
29
31
 
30
32
  ---
31
33
  ## πŸ“¦ status.json Persistence