@atlashub/smartstack-cli 1.1.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.
Files changed (144) hide show
  1. package/.documentation/agents.html +912 -0
  2. package/.documentation/apex.html +1014 -0
  3. package/.documentation/business-analyse.html +1074 -0
  4. package/.documentation/commands.html +676 -0
  5. package/.documentation/css/styles.css +2030 -0
  6. package/.documentation/efcore.html +2501 -0
  7. package/.documentation/gitflow.html +2053 -0
  8. package/.documentation/hooks.html +409 -0
  9. package/.documentation/index.html +319 -0
  10. package/.documentation/installation.html +458 -0
  11. package/.documentation/js/app.js +794 -0
  12. package/.documentation/test-web.html +509 -0
  13. package/README.md +90 -0
  14. package/config/default-config.json +86 -0
  15. package/config/settings.json +53 -0
  16. package/config/settings.local.example.json +16 -0
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.js +38198 -0
  19. package/dist/index.js.map +1 -0
  20. package/package.json +86 -0
  21. package/templates/agents/action.md +36 -0
  22. package/templates/agents/efcore/conflicts.md +57 -0
  23. package/templates/agents/efcore/db-deploy.md +51 -0
  24. package/templates/agents/efcore/db-reset.md +59 -0
  25. package/templates/agents/efcore/db-seed.md +56 -0
  26. package/templates/agents/efcore/db-status.md +43 -0
  27. package/templates/agents/efcore/migration.md +85 -0
  28. package/templates/agents/efcore/rebase-snapshot.md +62 -0
  29. package/templates/agents/efcore/scan.md +60 -0
  30. package/templates/agents/efcore/squash.md +67 -0
  31. package/templates/agents/explore-codebase.md +65 -0
  32. package/templates/agents/explore-docs.md +97 -0
  33. package/templates/agents/fix-grammar.md +49 -0
  34. package/templates/agents/gitflow/abort.md +45 -0
  35. package/templates/agents/gitflow/cleanup.md +85 -0
  36. package/templates/agents/gitflow/commit.md +40 -0
  37. package/templates/agents/gitflow/exec.md +48 -0
  38. package/templates/agents/gitflow/finish.md +92 -0
  39. package/templates/agents/gitflow/init.md +139 -0
  40. package/templates/agents/gitflow/merge.md +62 -0
  41. package/templates/agents/gitflow/plan.md +42 -0
  42. package/templates/agents/gitflow/pr.md +78 -0
  43. package/templates/agents/gitflow/review.md +49 -0
  44. package/templates/agents/gitflow/start.md +61 -0
  45. package/templates/agents/gitflow/status.md +32 -0
  46. package/templates/agents/snipper.md +36 -0
  47. package/templates/agents/websearch.md +46 -0
  48. package/templates/commands/_resources/formatting-guide.md +124 -0
  49. package/templates/commands/ai-prompt.md +315 -0
  50. package/templates/commands/apex/1-analyze.md +100 -0
  51. package/templates/commands/apex/2-plan.md +145 -0
  52. package/templates/commands/apex/3-execute.md +171 -0
  53. package/templates/commands/apex/4-examine.md +116 -0
  54. package/templates/commands/apex/5-tasks.md +209 -0
  55. package/templates/commands/apex.md +76 -0
  56. package/templates/commands/application/create.md +362 -0
  57. package/templates/commands/application/templates-backend.md +463 -0
  58. package/templates/commands/application/templates-frontend.md +517 -0
  59. package/templates/commands/application/templates-i18n.md +478 -0
  60. package/templates/commands/application/templates-seed.md +362 -0
  61. package/templates/commands/application.md +303 -0
  62. package/templates/commands/business-analyse/1-init.md +269 -0
  63. package/templates/commands/business-analyse/2-discover.md +520 -0
  64. package/templates/commands/business-analyse/3-analyse.md +408 -0
  65. package/templates/commands/business-analyse/4-specify.md +598 -0
  66. package/templates/commands/business-analyse/5-validate.md +326 -0
  67. package/templates/commands/business-analyse/6-handoff.md +746 -0
  68. package/templates/commands/business-analyse/7-doc-html.md +602 -0
  69. package/templates/commands/business-analyse/bug.md +325 -0
  70. package/templates/commands/business-analyse/change-request.md +368 -0
  71. package/templates/commands/business-analyse/hotfix.md +200 -0
  72. package/templates/commands/business-analyse.md +559 -0
  73. package/templates/commands/controller/create.md +216 -0
  74. package/templates/commands/controller/postman-templates.md +528 -0
  75. package/templates/commands/controller/templates.md +600 -0
  76. package/templates/commands/controller.md +278 -0
  77. package/templates/commands/debug.md +95 -0
  78. package/templates/commands/documentation/module.md +202 -0
  79. package/templates/commands/documentation/templates.md +432 -0
  80. package/templates/commands/documentation.md +190 -0
  81. package/templates/commands/efcore/_env-check.md +153 -0
  82. package/templates/commands/efcore/conflicts.md +269 -0
  83. package/templates/commands/efcore/db-deploy.md +193 -0
  84. package/templates/commands/efcore/db-reset.md +426 -0
  85. package/templates/commands/efcore/db-seed.md +326 -0
  86. package/templates/commands/efcore/db-status.md +214 -0
  87. package/templates/commands/efcore/migration.md +388 -0
  88. package/templates/commands/efcore/rebase-snapshot.md +264 -0
  89. package/templates/commands/efcore/scan.md +202 -0
  90. package/templates/commands/efcore/squash.md +298 -0
  91. package/templates/commands/efcore.md +176 -0
  92. package/templates/commands/epct.md +69 -0
  93. package/templates/commands/explain.md +186 -0
  94. package/templates/commands/explore.md +45 -0
  95. package/templates/commands/feature-full.md +267 -0
  96. package/templates/commands/gitflow/1-init.md +1038 -0
  97. package/templates/commands/gitflow/10-start.md +768 -0
  98. package/templates/commands/gitflow/11-finish.md +323 -0
  99. package/templates/commands/gitflow/12-cleanup.md +276 -0
  100. package/templates/commands/gitflow/13-sync.md +216 -0
  101. package/templates/commands/gitflow/14-rebase.md +251 -0
  102. package/templates/commands/gitflow/2-status.md +167 -0
  103. package/templates/commands/gitflow/3-commit.md +194 -0
  104. package/templates/commands/gitflow/4-plan.md +145 -0
  105. package/templates/commands/gitflow/5-exec.md +147 -0
  106. package/templates/commands/gitflow/6-abort.md +344 -0
  107. package/templates/commands/gitflow/7-pull-request.md +226 -0
  108. package/templates/commands/gitflow/8-review.md +176 -0
  109. package/templates/commands/gitflow/9-merge.md +224 -0
  110. package/templates/commands/gitflow.md +128 -0
  111. package/templates/commands/implement.md +663 -0
  112. package/templates/commands/notification.md +129 -0
  113. package/templates/commands/oneshot.md +57 -0
  114. package/templates/commands/quick-search.md +72 -0
  115. package/templates/commands/review.md +106 -0
  116. package/templates/commands/utils/test-web-config.md +160 -0
  117. package/templates/commands/utils/test-web.md +151 -0
  118. package/templates/commands/workflow.md +193 -0
  119. package/templates/gitflow/config.json +138 -0
  120. package/templates/hooks/ef-migration-check.md +139 -0
  121. package/templates/hooks/hooks.json +15 -0
  122. package/templates/skills/ai-prompt/SKILL.md +778 -0
  123. package/templates/skills/application/SKILL.md +563 -0
  124. package/templates/skills/application/templates-backend.md +450 -0
  125. package/templates/skills/application/templates-frontend.md +531 -0
  126. package/templates/skills/application/templates-i18n.md +520 -0
  127. package/templates/skills/application/templates-seed.md +647 -0
  128. package/templates/skills/business-analyse/SKILL.md +191 -0
  129. package/templates/skills/business-analyse/questionnaire.md +283 -0
  130. package/templates/skills/business-analyse/templates-frd.md +477 -0
  131. package/templates/skills/business-analyse/templates-react.md +580 -0
  132. package/templates/skills/controller/SKILL.md +240 -0
  133. package/templates/skills/controller/postman-templates.md +614 -0
  134. package/templates/skills/controller/templates.md +1468 -0
  135. package/templates/skills/documentation/SKILL.md +133 -0
  136. package/templates/skills/documentation/templates.md +476 -0
  137. package/templates/skills/feature-full/SKILL.md +838 -0
  138. package/templates/skills/notification/SKILL.md +555 -0
  139. package/templates/skills/ui-components/SKILL.md +870 -0
  140. package/templates/skills/workflow/SKILL.md +582 -0
  141. package/templates/test-web/api-health.json +38 -0
  142. package/templates/test-web/minimal.json +19 -0
  143. package/templates/test-web/npm-package.json +46 -0
  144. package/templates/test-web/seo-check.json +54 -0
@@ -0,0 +1,176 @@
1
+ ---
2
+ description: Phase 8 - Review Pull Request with checklist and suggestions
3
+ agent: gitflow-review
4
+ model: haiku
5
+ ---
6
+
7
+ # Phase 8: REVIEW - Review PR avec checklist
8
+
9
+ Tu es expert code review .NET/EF Core. Analyse la PR et fournis feedback structure.
10
+
11
+ **Argument:** `$ARGUMENTS` = numero PR ou URL (requis)
12
+
13
+ ---
14
+
15
+ ## Chargement PR
16
+
17
+ ```bash
18
+ # Recuperer infos PR
19
+ gh pr view {number} --json title,body,files,commits,reviews,checks
20
+
21
+ # Recuperer diff
22
+ gh pr diff {number}
23
+ ```
24
+
25
+ ---
26
+
27
+ ## Checklist Review
28
+
29
+ ### 1. Code Quality
30
+
31
+ | Check | Critere | Poids |
32
+ |-------|---------|-------|
33
+ | Lisibilite | Noms clairs, structure logique | HIGH |
34
+ | DRY | Pas de duplication | MEDIUM |
35
+ | SOLID | Principes respectes | MEDIUM |
36
+ | Complexite | Methodes < 20 lignes, cyclomatic < 10 | LOW |
37
+
38
+ ### 2. Patterns .NET
39
+
40
+ | Check | Validation |
41
+ |-------|------------|
42
+ | Async/Await | Pas de `.Result` ou `.Wait()` |
43
+ | Dependency Injection | Pas de `new Service()` |
44
+ | Null handling | `?.` ou `??` ou `required` |
45
+ | Exceptions | Specifiques, pas `catch (Exception)` |
46
+
47
+ ### 3. EF Core (si migrations)
48
+
49
+ | Check | Validation | Severite |
50
+ |-------|------------|----------|
51
+ | 3 fichiers | Migration + Designer + ModelSnapshot | BLOQUANT |
52
+ | Naming | Convention `{Date}_{Description}` | WARNING |
53
+ | Down() | Methode Down implementee | WARNING |
54
+ | Indexes | Sur colonnes FK et filtres frequents | INFO |
55
+ | Data loss | Pas de DropColumn sans backup | BLOQUANT |
56
+
57
+ ### 4. Tests
58
+
59
+ | Check | Critere |
60
+ |-------|---------|
61
+ | Coverage | Nouveau code couvert |
62
+ | Naming | `{Method}_Should_{Behavior}_When_{Condition}` |
63
+ | Arrange/Act/Assert | Structure claire |
64
+ | Mocks | Pas de dependances reelles |
65
+
66
+ ### 5. Security
67
+
68
+ | Check | Pattern a detecter | Severite |
69
+ |-------|-------------------|----------|
70
+ | Secrets | `password`, `apikey`, `secret` hardcodes | BLOQUANT |
71
+ | SQL Injection | String concat dans queries | BLOQUANT |
72
+ | XSS | `@Html.Raw()` sans sanitization | HIGH |
73
+ | Auth | `[AllowAnonymous]` sur endpoints sensibles | HIGH |
74
+
75
+ ---
76
+
77
+ ## Analyse automatique
78
+
79
+ ### Fichiers a examiner en priorite
80
+
81
+ | Priorite | Type | Raison |
82
+ |----------|------|--------|
83
+ | 1 | `*Migration*.cs` | Impact base de donnees |
84
+ | 2 | `*Controller*.cs` | Surface d'attaque |
85
+ | 3 | `*Service*.cs` | Logique metier |
86
+ | 4 | `*.razor` | UI et securite XSS |
87
+ | 5 | Tests | Qualite couverture |
88
+
89
+ ### Metriques
90
+
91
+ ```
92
+ METRIQUES PR
93
+ ────────────────────────────────
94
+ Fichiers: {count} (+{added}/-{removed})
95
+ Commits: {count}
96
+ Insertions: +{lines}
97
+ Deletions: -{lines}
98
+
99
+ Ratio tests: {test_files}/{total_files}
100
+ ────────────────────────────────
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Output Review
106
+
107
+ ### Format
108
+
109
+ ```
110
+ CODE REVIEW - PR #{number}
111
+ ════════════════════════════════════════
112
+
113
+ RESUME: {APPROVE | CHANGES_REQUESTED | COMMENT}
114
+
115
+ BLOQUANTS ({count}):
116
+ 🔴 [{file}:{line}] {description}
117
+ Suggestion: {fix}
118
+
119
+ WARNINGS ({count}):
120
+ 🟡 [{file}:{line}] {description}
121
+ Suggestion: {fix}
122
+
123
+ SUGGESTIONS ({count}):
124
+ 🟢 [{file}:{line}] {description}
125
+
126
+ POINTS POSITIFS:
127
+ ✨ {ce qui est bien fait}
128
+
129
+ ════════════════════════════════════════
130
+ ```
131
+
132
+ ### Soumission review
133
+
134
+ ```bash
135
+ # Approve
136
+ gh pr review {number} --approve --body "{comments}"
137
+
138
+ # Request changes
139
+ gh pr review {number} --request-changes --body "{comments}"
140
+
141
+ # Comment only
142
+ gh pr review {number} --comment --body "{comments}"
143
+ ```
144
+
145
+ ---
146
+
147
+ ## Resume
148
+
149
+ ```
150
+ REVIEW COMPLETE
151
+ ────────────────────────────────
152
+ PR: #{number}
153
+ Status: {APPROVED|CHANGES_REQUESTED|COMMENTED}
154
+
155
+ Issues:
156
+ Bloquants: {count}
157
+ Warnings: {count}
158
+ Suggestions: {count}
159
+
160
+ EF Core: {OK|ISSUES|N/A}
161
+ Tests: {COVERED|MISSING|N/A}
162
+ Security: {OK|ISSUES}
163
+ ────────────────────────────────
164
+ Prochain: /gitflow:9-merge #{number}
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Modes
170
+
171
+ | Commande | Action |
172
+ |----------|--------|
173
+ | `/gitflow:8-review 123` | Review PR #123 |
174
+ | `/gitflow:8-review --security` | Focus securite |
175
+ | `/gitflow:8-review --ef-core` | Focus migrations |
176
+ | `/gitflow:8-review --quick` | Checklist rapide |
@@ -0,0 +1,224 @@
1
+ ---
2
+ description: Phase 9 - Merge Pull Request with all checks validated
3
+ agent: gitflow-merge
4
+ model: sonnet
5
+ ---
6
+
7
+ # Phase 9: MERGE - Merge PR avec validation complete
8
+
9
+ Tu es expert GitFlow. Execute le merge avec tous les checks de securite.
10
+
11
+ **Argument:** `$ARGUMENTS` = numero PR (requis)
12
+
13
+ ---
14
+
15
+ ## Pre-merge checks
16
+
17
+ ### 1. Status PR
18
+
19
+ ```bash
20
+ gh pr view {number} --json state,mergeable,mergeStateStatus,reviews,checks
21
+ ```
22
+
23
+ | Check | Requis | Action si echec |
24
+ |-------|--------|-----------------|
25
+ | State = OPEN | OUI | "PR deja mergee ou fermee" |
26
+ | Mergeable = true | OUI | "Resoudre conflits d'abord" |
27
+ | MergeStateStatus = CLEAN | OUI | Attendre CI ou resoudre |
28
+
29
+ ### 2. Reviews
30
+
31
+ | Check | Condition | Action |
32
+ |-------|-----------|--------|
33
+ | Min approvals | Config: `minReviewers` | Attendre reviews |
34
+ | No changes requested | Aucun "Request changes" actif | Resoudre feedback |
35
+ | Required reviewers | Si configure | Verifier presence |
36
+
37
+ ```bash
38
+ # Verifier reviews
39
+ gh pr view {number} --json reviews --jq '.reviews[] | select(.state=="APPROVED")'
40
+ ```
41
+
42
+ ### 3. CI/CD Checks
43
+
44
+ ```bash
45
+ gh pr checks {number}
46
+ ```
47
+
48
+ | Status | Action |
49
+ |--------|--------|
50
+ | Tous ✓ | Continuer |
51
+ | En cours | Attendre |
52
+ | Echec | BLOQUER - afficher details |
53
+
54
+ ### 4. Branch Protection
55
+
56
+ | Rule | Verification |
57
+ |------|--------------|
58
+ | Up-to-date | `git rev-list --count HEAD..origin/{base}` = 0 |
59
+ | Linear history | Si requis, rebase avant merge |
60
+ | Signed commits | Si requis, verifier signatures |
61
+
62
+ ---
63
+
64
+ ## EF Core Pre-merge (si applicable)
65
+
66
+ ### Validation migrations
67
+
68
+ ```bash
69
+ # Lister migrations dans la PR
70
+ git diff origin/{base}...HEAD --name-only | grep -E "Migrations/.*\.cs$"
71
+ ```
72
+
73
+ | Check | Validation | Bloquant |
74
+ |-------|------------|----------|
75
+ | Sync ModelSnapshot | Pas de conflit avec develop | OUI |
76
+ | Build migrations | `dotnet ef migrations script` OK | OUI |
77
+ | Pas de data loss | Scan DropTable/DropColumn | WARNING |
78
+
79
+ ### Si conflit ModelSnapshot detecte
80
+
81
+ ```
82
+ ⚠️ CONFLIT MODELSNAPSHOT DETECTE
83
+ ────────────────────────────────
84
+ Le ModelSnapshot a diverge de develop.
85
+
86
+ Options:
87
+ 1. Rebase + recreer migration (recommande)
88
+ 2. Merge manuel (risque)
89
+
90
+ Commande recommandee:
91
+ git rebase origin/develop
92
+ dotnet ef migrations remove
93
+ dotnet ef migrations add {MigrationName}
94
+ ────────────────────────────────
95
+ ```
96
+
97
+ ---
98
+
99
+ ## Execution Merge
100
+
101
+ ### Strategie selon type
102
+
103
+ | Type branche | Merge strategy | Options |
104
+ |--------------|----------------|---------|
105
+ | `feature/*` | Squash | `--squash` |
106
+ | `hotfix/*` | Merge commit | `--merge` |
107
+ | `release/*` | Merge commit | `--merge` |
108
+
109
+ ### Commande
110
+
111
+ ```bash
112
+ # Squash (feature)
113
+ gh pr merge {number} --squash --delete-branch
114
+
115
+ # Merge commit (hotfix/release)
116
+ gh pr merge {number} --merge --delete-branch
117
+ ```
118
+
119
+ ### Options supplementaires
120
+
121
+ | Option | Condition | Action |
122
+ |--------|-----------|--------|
123
+ | `--auto` | CI en cours | Merge auto quand vert |
124
+ | `--delete-branch` | Config autoDeleteBranch | Supprimer branche source |
125
+ | `--admin` | Override protections | DANGEREUX - confirmation requise |
126
+
127
+ ---
128
+
129
+ ## Post-merge actions
130
+
131
+ ### 1. Versioning (si release/hotfix)
132
+
133
+ ```bash
134
+ # Lire version actuelle
135
+ VERSION=$(cat package.json | jq -r '.version')
136
+
137
+ # Creer tag
138
+ git tag -a "v$VERSION" -m "Release v$VERSION"
139
+ git push origin "v$VERSION"
140
+ ```
141
+
142
+ ### 2. Changelog (optionnel)
143
+
144
+ ```bash
145
+ # Ajouter entree CHANGELOG
146
+ echo "## v$VERSION - $(date +%Y-%m-%d)" >> CHANGELOG.md
147
+ gh pr view {number} --json title,body >> CHANGELOG.md
148
+ ```
149
+
150
+ ### 3. Notifications (si configure)
151
+
152
+ | Canal | Message |
153
+ |-------|---------|
154
+ | Slack | "PR #{number} merged to {base}" |
155
+ | Teams | Idem |
156
+ | Email | Idem |
157
+
158
+ ### 4. Cleanup
159
+
160
+ ```bash
161
+ # Supprimer branche locale
162
+ git branch -d {branch}
163
+
164
+ # Fetch et prune
165
+ git fetch --prune
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Resume
171
+
172
+ ```
173
+ MERGE COMPLETE
174
+ ════════════════════════════════════════
175
+ PR: #{number}
176
+ Titre: {title}
177
+ Base: {base}
178
+ Strategy: {squash|merge}
179
+
180
+ Checks passes:
181
+ ✓ Reviews: {count} approvals
182
+ ✓ CI: All green
183
+ ✓ Conflicts: None
184
+ ✓ EF Core: {OK|N/A}
185
+
186
+ Post-merge:
187
+ ✓ Branch deleted: {branch}
188
+ ✓ Tag created: {tag|N/A}
189
+
190
+ ════════════════════════════════════════
191
+ ```
192
+
193
+ ---
194
+
195
+ ## Erreurs et recovery
196
+
197
+ | Erreur | Cause | Solution |
198
+ |--------|-------|----------|
199
+ | "Not mergeable" | Conflits | `git rebase origin/{base}` |
200
+ | "Checks failing" | CI rouge | Corriger et re-push |
201
+ | "Review required" | Pas d'approval | Demander review |
202
+ | "Branch protected" | Rules non respectees | Verifier requirements |
203
+
204
+ ### Rollback si probleme post-merge
205
+
206
+ ```bash
207
+ # Identifier commit merge
208
+ MERGE_COMMIT=$(git log --merges -1 --format="%H")
209
+
210
+ # Revert
211
+ git revert -m 1 $MERGE_COMMIT
212
+ git push origin {base}
213
+ ```
214
+
215
+ ---
216
+
217
+ ## Modes
218
+
219
+ | Commande | Action |
220
+ |----------|--------|
221
+ | `/gitflow:9-merge 123` | Merge PR #123 |
222
+ | `/gitflow:9-merge 123 --auto` | Merge auto quand CI vert |
223
+ | `/gitflow:9-merge 123 --dry-run` | Simulation |
224
+ | `/gitflow:9-merge 123 --admin` | Override protections (danger) |
@@ -0,0 +1,128 @@
1
+ ---
2
+ description: GitFlow workflow with versioning and EF Core migration management
3
+ ---
4
+
5
+ # GitFlow Workflow
6
+
7
+ You are a GitFlow and EF Core expert. Manage branch workflow and migrations for .NET projects.
8
+
9
+ **ULTRA THINK before each phase.** Display the heading: `# 1. INIT`, `# 2. STATUS`, etc.
10
+
11
+ ---
12
+
13
+ ## Overview
14
+
15
+ ```
16
+ ┌─────────────────────────────────────────┐
17
+ │ GITFLOW WORKFLOW │
18
+ └─────────────────────────────────────────┘
19
+
20
+ 10. START ──────────────────────────────────────────────────────┐
21
+ │ │
22
+ ▼ │
23
+ feature/* ──3.COMMIT──► 13.SYNC ──► 14.REBASE ──► 7.PR ──► develop
24
+ │ │ │ │
25
+ │ │ │ │
26
+ 10. START (release) ───────┼────────────┼───────────────────────┤
27
+ │ │ │ │
28
+ ▼ ▼ ▼ │
29
+ release/* ──3.COMMIT──► 13.SYNC ──► 7.PR(main) ──► 11.FINISH ──► main + tag
30
+ │ │
31
+ └───────────────── merge back ◄─────────────────┘
32
+
33
+ 10. START (hotfix) ──────────────────────────────────────┤
34
+ │ │
35
+ ▼ │
36
+ hotfix/* ──3.COMMIT──► 13.SYNC ──► 7.PR(main) ──► 11.FINISH ──► main + tag
37
+ │ │
38
+ └───────────────── merge back ◄─────────────────┘
39
+
40
+ 6. ABORT ◄── (rollback if problem)
41
+
42
+ 12. CLEANUP ◄── (audit worktrees from main/develop)
43
+ ```
44
+
45
+ ## Phases
46
+
47
+ | # | Command | When | Action |
48
+ |---|---------|------|--------|
49
+ | 1 | `/gitflow:1-init` | Initial setup | Config + Branches + Versioning |
50
+ | 2 | `/gitflow:2-status` | Before action | Complete state + remote sync |
51
+ | 3 | `/gitflow:3-commit` | After changes | EF Core validation |
52
+ | 4 | `/gitflow:4-plan` | Before merge | Detailed plan |
53
+ | 5 | `/gitflow:5-exec` | Execute | Merge + Tag + Version |
54
+ | 6 | `/gitflow:6-abort` | Problem | Rollback + cleanup worktree |
55
+ | 7 | `/gitflow:7-pull-request` | Feature ready | Create PR + checks |
56
+ | 8 | `/gitflow:8-review` | Review PR | Checklist + feedback |
57
+ | 9 | `/gitflow:9-merge` | PR approved | Merge + post-actions |
58
+ | 10 | `/gitflow:10-start` | New branch | Create feature/release/hotfix |
59
+ | 11 | `/gitflow:11-finish` | After merge | Tag + merge back + cleanup worktree |
60
+ | 12 | `/gitflow:12-cleanup` | Maintenance | Audit + cleanup worktrees |
61
+ | 13 | `/gitflow:13-sync` | Desync detected | Push/Pull with remote |
62
+ | 14 | `/gitflow:14-rebase` | Behind develop | Rebase on base branch |
63
+
64
+ ## Typical Workflow
65
+
66
+ ```bash
67
+ # 1. Start a feature
68
+ /gitflow:10-start feature my-feature
69
+
70
+ # 2. Develop + commit
71
+ /gitflow:3-commit
72
+
73
+ # 3. Sync with remote (push/pull)
74
+ /gitflow:13-sync
75
+
76
+ # 4. Rebase on develop (if behind)
77
+ /gitflow:14-rebase
78
+
79
+ # 5. Create PR to develop
80
+ /gitflow:7-pull-request
81
+
82
+ # 6. Review and merge
83
+ /gitflow:8-review {PR}
84
+ /gitflow:9-merge {PR}
85
+
86
+ # 7. For release: finalize (tag + merge back + auto cleanup)
87
+ /gitflow:11-finish
88
+
89
+ # 8. Maintenance: audit and cleanup (from main or develop)
90
+ /gitflow:12-cleanup
91
+ ```
92
+
93
+ ## Worktree Cleanup
94
+
95
+ Worktree cleanup is handled automatically and manually:
96
+
97
+ | Mode | Trigger | Scope |
98
+ |------|---------|-------|
99
+ | **Automatic** | `/gitflow:11-finish` | Worktree of finalized branch |
100
+ | **Automatic** | `/gitflow:6-abort --branch` | Worktree of abandoned branch |
101
+ | **Manual** | `/gitflow:12-cleanup` | Complete audit (orphaned + stale) |
102
+
103
+ **Note:** `/gitflow:12-cleanup` must be executed from `main` or `develop` only.
104
+
105
+ ## Versioning (.NET)
106
+
107
+ **Sources (priority):** csproj → Directory.Build.props → AssemblyInfo → VERSION → git-tag
108
+
109
+ **Auto-increment:**
110
+ - feature → minor (1.2.0 → 1.3.0)
111
+ - hotfix → patch (1.2.0 → 1.2.1)
112
+ - release → confirmation
113
+
114
+ ## EF Core Rules
115
+
116
+ 1. **1 migration/feature** - Recreate, don't accumulate
117
+ 2. **3 required files** - Migration + Designer + ModelSnapshot
118
+ 3. **Sync before merge** - Rebase on develop
119
+ 4. **ModelSnapshot conflict** - Accept theirs + Recreate
120
+ 5. **Release** - Idempotent SQL script
121
+
122
+ ## Priority
123
+
124
+ **Safety > Correctness > Speed**
125
+
126
+ ---
127
+
128
+ User: $ARGUMENTS