ai-flow-dev 2.5.1 → 2.5.2

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.
@@ -8,46 +8,112 @@ description: Conventional Commits Automation
8
8
 
9
9
  Your mission is to analyze changes, group them intelligently, and create atomic commits following Conventional Commits standard when the user executes `/flow-commit`.
10
10
 
11
- **🚀 MODO AGENTE ACTIVADO:** No solicites permiso para analizar cambios o preparar grupos de archivos. Actúa proactivamente y solicita confirmación *solo* antes de la ejecución final de los commits.
11
+ **🚀 MODO AGENTE ACTIVADO:** No solicites permiso para analizar cambios o preparar grupos de archivos. Actúa proactivamente y solicita confirmación _solo_ antes de la ejecución final de los commits.
12
12
 
13
13
  ---
14
+
14
15
  ## Command: `/flow-commit`
15
16
 
16
17
  ### Objective
18
+
17
19
  Automate commit creation with:
20
+
18
21
  - **Intelligent grouping** by functional relationship.
19
22
  - **Conventional Commits** compliance (type, scope, description).
20
23
  - **Atomic commits** (one logical change per commit).
21
24
 
22
25
  ---
23
- ## Workflow: 4 Steps
26
+
27
+ ## Workflow: 5 Steps
28
+
29
+ ### Step 0: Branch Protection Check
30
+
31
+ **🛡️ CRITICAL VALIDATION** - Execute BEFORE any commit operation:
32
+
33
+ ```bash
34
+ git branch --show-current
35
+ ```
36
+
37
+ **Protected branches:** `main`, `master`, `develop`, `development`
38
+
39
+ **If current branch is protected:**
40
+
41
+ 1. **Inform user:**
42
+
43
+ ```
44
+ ⚠️ Working on protected branch '[branch-name]'.
45
+ Creating a new branch for your changes...
46
+ ```
47
+
48
+ 2. **Analyze changes** to determine branch type:
49
+
50
+ ```bash
51
+ git status --porcelain
52
+ git diff --stat
53
+ ```
54
+
55
+ - If changes include features/new components → `feature/`
56
+ - If changes are fixes/bug corrections → `fix/`
57
+ - If changes are refactoring/styling → `refactor/`
58
+ - If configuration/dependencies → `chore/`
59
+
60
+ 3. **Generate branch name:**
61
+ - Extract meaningful slug from changed files or content
62
+ - Format: `[type]/[descriptive-slug]`
63
+ - Example: `feature/add-user-dashboard`, `fix/button-click-handler`
64
+
65
+ 4. **Create and switch to new branch:**
66
+
67
+ ```bash
68
+ git checkout -b [type]/[slug]
69
+ ```
70
+
71
+ 5. **Confirm to user:**
72
+
73
+ ```
74
+ ✅ Created and switched to branch '[branch-name]'
75
+ Proceeding with commit workflow...
76
+ ```
77
+
78
+ 6. **Continue to Step 1**
79
+
80
+ **If branch is NOT protected:** Continue to Step 1.
24
81
 
25
82
  ### Step 1: Detect Changes
83
+
26
84
  - Modified files (unstaged/staged).
27
85
  - **Untracked files** (`git status --porcelain`).
28
86
  - Deleted files.
29
87
 
30
88
  ### Step 2: Intelligent Grouping
89
+
31
90
  Group files by:
91
+
32
92
  - **Feature Complete**: Entity + Service + Controller + Tests + Docs.
33
93
  - **Refactoring**: Helper + Tests + Usages.
34
94
  - **Configuration**: Docker, Env, CI/CD.
35
95
  - **Independent Tests/Docs**.
36
96
 
37
97
  ### Step 3: Create Commits
98
+
38
99
  1. Generate Conventional Commit message.
39
100
  2. `git add [files] && git commit -m "[message]"`.
40
101
  3. **Wait for user confirmation.**
41
102
 
42
- ### Step 4: Summary & Push
103
+ ### Step 5: Summary & Push
104
+
43
105
  - Show `git log` of new commits.
44
106
  - Suggest `git push origin [branch]`.
107
+ - **NEVER suggest push to protected branches** (main, master, develop, development).
45
108
 
46
109
  ---
110
+
47
111
  ## Integration with `status.json`
112
+
48
113
  - Update `git.commits` array.
49
114
  - Set `git.uncommittedChanges: false` when done.
50
115
  - Update `finalChecklist.committed: true`.
51
116
 
52
117
  ---
118
+
53
119
  **BEGIN EXECUTION when user runs `/flow-commit`**
@@ -7,42 +7,55 @@ description: Internal logic for Feature implementation within flow-work
7
7
  This file contains the detailed execution logic for implementing new features, imported by `@flow-work.md`.
8
8
 
9
9
  ---
10
+
10
11
  ## 🚀 Feature Implementation Flow
11
12
 
12
13
  ### 1. Context Analysis (auto-skip if User Story with detailed tasks)
14
+
13
15
  - Extract requirements from User Story or Roadmap
14
16
  - If User Story has detailed tasks: Skip to work.md generation
15
17
  - If Roadmap or Manual: Analyze and refine
16
18
  - Read relevant documentation (ai-instructions.md, architecture.md, etc.)
17
19
 
18
20
  ### 2. work.md Generation
21
+
19
22
  - Generate consolidated work.md (see Phase 2 in flow-work.md)
20
23
  - Include: Context, Objective, Constraints, Approach, Tasks, Validation
21
24
  - **User Confirmation Required**
22
25
 
23
26
  ### 3. Progressive Implementation
27
+
24
28
  Choose mode:
29
+
25
30
  - **Auto**: Complete all tasks without pausing
26
31
  - **Phase-by-phase**: Pause and validate after each phase
27
32
  - **Task-by-task**: Pause after each task
28
33
 
29
34
  Follow tasks in `work.md`:
35
+
30
36
  - Update checkboxes as completed
31
37
  - Update `status.json` progress
32
38
  - Follow patterns and constraints specified
33
39
 
34
40
  ### 4. Definition of Done (DoD)
41
+
35
42
  - If HU mode: Validate against Gherkin scenarios
36
43
  - Run tests and linting
37
44
  - Perform security check
38
45
  - **Update completion status** in source documents (see Phase 4 in flow-work.md)
39
46
 
40
47
  ---
48
+
41
49
  ## 🌿 Git Branching Strategy
50
+
42
51
  - Generate slug from name
43
52
  - Execute `git checkout -b feature/[slug]`
53
+ - **Note:** Creating feature branches FROM `main`/`master`/`develop`/`development` is correct workflow
54
+ - **Never commit directly TO protected branches** - always work on feature branch
44
55
  - Maintain `status.json` with commit history
45
56
 
46
57
  ---
58
+
47
59
  ## 📦 status.json Persistence
60
+
48
61
  Ensure `progress`, `git`, and `metadata` sections are always updated.
@@ -29,7 +29,9 @@ This file contains the detailed execution logic for bug fixes, imported by `@flo
29
29
  ---
30
30
  ## 🌿 Git Branching Strategy
31
31
  - **QUICK**: Usually work on current branch
32
+ - ⚠️ **Exception:** If on protected branch (`main`, `master`, `develop`, `development`), create fix branch even for quick fixes
32
33
  - **COMPLEX**: Execute `git checkout -b fix/[slug]`
34
+ - **Never commit directly TO protected branches**
33
35
 
34
36
  ---
35
37
  ## 📦 status.json Persistence
@@ -7,9 +7,11 @@ description: Internal logic for Refactor implementation within flow-work
7
7
  This file contains the detailed execution logic for code refactoring, imported by `@flow-work.md`.
8
8
 
9
9
  ---
10
+
10
11
  ## 🔄 Refactoring Workflow
11
12
 
12
13
  ### 1. Scope Identification & work.md Generation
14
+
13
15
  - Map affected files and dependencies
14
16
  - Confirm no behavior change expected
15
17
  - Validate against architecture patterns
@@ -20,19 +22,27 @@ This file contains the detailed execution logic for code refactoring, imported b
20
22
  - "No behavior change" constraint
21
23
 
22
24
  ### 2. Implementation
25
+
23
26
  - Follow work.md tasks sequentially
24
27
  - Update imports and references across codebase
25
28
  - **Critical**: Existing tests must pass without modification (unless test itself is refactored)
26
29
 
27
30
  ### 3. Validation
31
+
28
32
  - Run `/flow-check` to verify no regressions
29
33
  - Confirm all tests pass
30
34
  - **Update completion status** if refactor was tracked in roadmap/user stories (see Phase 4 in flow-work.md)
31
35
 
32
36
  ---
37
+
33
38
  ## 🌿 Git Branching Strategy
39
+
34
40
  - Execute `git checkout -b refactor/[slug]`
41
+ - **Note:** Creating refactor branches FROM `main`/`master`/`develop`/`development` is correct
42
+ - **Never commit directly TO protected branches**
35
43
 
36
44
  ---
45
+
37
46
  ## 📦 status.json Persistence
47
+
38
48
  Track `percentage` of updated occurrences and updated file paths.