@atlashub/smartstack-cli 1.13.1 → 1.14.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 (210) hide show
  1. package/.documentation/agents.html +1 -1
  2. package/.documentation/apex.html +1 -1
  3. package/.documentation/business-analyse.html +1 -1
  4. package/.documentation/cli-commands.html +3 -3
  5. package/.documentation/commands.html +1 -1
  6. package/.documentation/efcore.html +1 -1
  7. package/.documentation/gitflow.html +1 -1
  8. package/.documentation/hooks.html +1 -1
  9. package/.documentation/index.html +1 -1
  10. package/.documentation/init.html +3 -3
  11. package/.documentation/installation.html +1001 -352
  12. package/.documentation/ralph-loop.html +1 -1
  13. package/.documentation/test-web.html +1 -1
  14. package/README.md +88 -20
  15. package/dist/index.js +276 -85
  16. package/dist/index.js.map +1 -1
  17. package/package.json +1 -1
  18. package/templates/agents/code-reviewer.md +163 -0
  19. package/templates/agents/efcore/db-deploy.md +25 -7
  20. package/templates/agents/efcore/db-reset.md +31 -10
  21. package/templates/agents/efcore/db-status.md +22 -5
  22. package/templates/agents/efcore/migration.md +69 -19
  23. package/templates/agents/gitflow/cleanup.md +8 -1
  24. package/templates/agents/gitflow/commit.md +7 -5
  25. package/templates/agents/gitflow/finish.md +6 -4
  26. package/templates/agents/gitflow/pr.md +8 -1
  27. package/templates/agents/gitflow/start.md +1 -1
  28. package/templates/commands/check-version.md +267 -0
  29. package/templates/commands/efcore/_shared.md +30 -1
  30. package/templates/commands/efcore/db-reset.md +18 -6
  31. package/templates/commands/gitflow/OPTIMIZATIONS.md +206 -0
  32. package/templates/commands/refactor.md +164 -0
  33. package/templates/project/DependencyInjection.Application.cs.template +25 -0
  34. package/templates/project/DependencyInjection.Infrastructure.cs.template +61 -0
  35. package/templates/project/DesignTimeExtensionsDbContextFactory.cs.template +70 -0
  36. package/templates/project/ExampleEntity.cs.template +116 -0
  37. package/templates/project/ExampleEntityConfiguration.cs.template +64 -0
  38. package/templates/project/ExampleService.cs.template +146 -0
  39. package/templates/project/ExtensionsDbContext.cs.template +41 -0
  40. package/templates/project/IExtensionsDbContext.cs.template +22 -0
  41. package/templates/project/Program.cs.template +47 -0
  42. package/templates/project/README.md +79 -0
  43. package/templates/ralph/README.md +10 -8
  44. package/templates/ralph/ralph.config.yaml +2 -2
  45. package/templates/skills/_shared.md +44 -44
  46. package/templates/skills/ai-prompt/SKILL.md +55 -55
  47. package/templates/skills/apex/SKILL.md +235 -0
  48. package/templates/skills/apex/steps/step-00-init.md +203 -0
  49. package/templates/skills/apex/steps/step-01-analyze.md +210 -0
  50. package/templates/skills/apex/steps/step-02-plan.md +217 -0
  51. package/templates/skills/apex/steps/step-03-execute.md +178 -0
  52. package/templates/skills/apex/steps/step-04-validate.md +217 -0
  53. package/templates/skills/apex/steps/step-05-examine.md +207 -0
  54. package/templates/skills/apex/steps/step-06-resolve.md +181 -0
  55. package/templates/skills/apex/steps/step-07-tests.md +206 -0
  56. package/templates/skills/apex/steps/step-08-run-tests.md +207 -0
  57. package/templates/skills/apex/templates/00-context.md +46 -0
  58. package/templates/skills/apex/templates/01-analyze.md +63 -0
  59. package/templates/skills/apex/templates/02-plan.md +63 -0
  60. package/templates/skills/apex/templates/03-execute.md +34 -0
  61. package/templates/skills/apex/templates/04-validate.md +61 -0
  62. package/templates/skills/apex/templates/05-examine.md +58 -0
  63. package/templates/skills/apex/templates/06-resolve.md +39 -0
  64. package/templates/skills/apex/templates/07-tests.md +56 -0
  65. package/templates/skills/apex/templates/08-run-tests.md +41 -0
  66. package/templates/skills/apex/templates/README.md +69 -0
  67. package/templates/skills/application/SKILL.md +50 -50
  68. package/templates/skills/application/templates-backend.md +25 -25
  69. package/templates/skills/application/templates-frontend.md +43 -43
  70. package/templates/skills/application/templates-i18n.md +29 -29
  71. package/templates/skills/application/templates-seed.md +77 -77
  72. package/templates/skills/business-analyse/SKILL.md +223 -0
  73. package/templates/skills/business-analyse/_shared.md +258 -0
  74. package/templates/skills/business-analyse/questionnaire/01-context.md +33 -0
  75. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +35 -0
  76. package/templates/skills/business-analyse/questionnaire/03-scope.md +35 -0
  77. package/templates/skills/business-analyse/questionnaire/04-data.md +36 -0
  78. package/templates/skills/business-analyse/questionnaire/05-integrations.md +36 -0
  79. package/templates/skills/business-analyse/questionnaire/06-security.md +40 -0
  80. package/templates/skills/business-analyse/questionnaire/07-ui.md +36 -0
  81. package/templates/skills/business-analyse/questionnaire/08-performance.md +35 -0
  82. package/templates/skills/business-analyse/questionnaire/09-constraints.md +35 -0
  83. package/templates/skills/business-analyse/questionnaire/10-documentation.md +35 -0
  84. package/templates/skills/business-analyse/questionnaire.md +177 -177
  85. package/templates/skills/business-analyse/react/components.md +340 -0
  86. package/templates/skills/business-analyse/react/i18n-template.md +245 -0
  87. package/templates/skills/business-analyse/react/schema.md +151 -0
  88. package/templates/skills/business-analyse/steps/step-00-init.md +293 -0
  89. package/templates/skills/business-analyse/steps/step-01-discover.md +267 -0
  90. package/templates/skills/business-analyse/steps/step-02-analyse.md +243 -0
  91. package/templates/skills/business-analyse/steps/step-03-specify.md +317 -0
  92. package/templates/skills/business-analyse/steps/step-04-validate.md +239 -0
  93. package/templates/skills/business-analyse/steps/step-05-handoff.md +336 -0
  94. package/templates/skills/business-analyse/steps/step-06-doc-html.md +261 -0
  95. package/templates/skills/business-analyse/templates/00-context.md +105 -0
  96. package/templates/skills/business-analyse/templates/frd-brd.md +97 -0
  97. package/templates/skills/business-analyse/templates/frd-discovery.md +78 -0
  98. package/templates/skills/business-analyse/templates/frd-handoff.md +118 -0
  99. package/templates/skills/business-analyse/templates/frd-spec.md +168 -0
  100. package/templates/skills/business-analyse/templates-frd.md +217 -217
  101. package/templates/skills/business-analyse/templates-react.md +26 -26
  102. package/templates/skills/controller/SKILL.md +141 -92
  103. package/templates/skills/controller/postman-templates.md +15 -15
  104. package/templates/skills/controller/steps/step-00-init.md +191 -0
  105. package/templates/skills/controller/steps/step-01-analyze.md +146 -0
  106. package/templates/skills/controller/steps/step-02-plan.md +176 -0
  107. package/templates/skills/controller/steps/step-03-generate.md +219 -0
  108. package/templates/skills/controller/steps/step-04-perms.md +219 -0
  109. package/templates/skills/controller/steps/step-05-validate.md +107 -0
  110. package/templates/skills/controller/templates.md +77 -77
  111. package/templates/skills/documentation/SKILL.md +79 -79
  112. package/templates/skills/feature-full/SKILL.md +38 -38
  113. package/templates/skills/gitflow/SKILL.md +277 -0
  114. package/templates/{commands → skills}/gitflow/_shared.md +20 -20
  115. package/templates/skills/gitflow/phases/abort.md +173 -0
  116. package/templates/skills/gitflow/phases/cleanup.md +226 -0
  117. package/templates/skills/gitflow/phases/status.md +178 -0
  118. package/templates/skills/gitflow/steps/step-commit.md +255 -0
  119. package/templates/skills/gitflow/steps/step-finish.md +255 -0
  120. package/templates/skills/gitflow/steps/step-init.md +209 -0
  121. package/templates/skills/gitflow/steps/step-merge.md +225 -0
  122. package/templates/skills/gitflow/steps/step-plan.md +208 -0
  123. package/templates/skills/gitflow/steps/step-pr.md +235 -0
  124. package/templates/skills/gitflow/steps/step-start.md +234 -0
  125. package/templates/skills/gitflow/steps/step-sync.md +200 -0
  126. package/templates/skills/gitflow/templates/config.json +53 -0
  127. package/templates/skills/notification/SKILL.md +51 -51
  128. package/templates/skills/ralph-loop/SKILL.md +228 -0
  129. package/templates/skills/ralph-loop/steps/step-00-init.md +201 -0
  130. package/templates/skills/ralph-loop/steps/step-01-task.md +169 -0
  131. package/templates/skills/ralph-loop/steps/step-02-execute.md +173 -0
  132. package/templates/skills/ralph-loop/steps/step-03-commit.md +170 -0
  133. package/templates/skills/ralph-loop/steps/step-04-check.md +162 -0
  134. package/templates/skills/ralph-loop/steps/step-05-report.md +181 -0
  135. package/templates/skills/review-code/SKILL.md +219 -0
  136. package/templates/skills/review-code/references/clean-code-principles.md +140 -0
  137. package/templates/skills/review-code/references/code-quality-metrics.md +174 -0
  138. package/templates/skills/review-code/references/feedback-patterns.md +149 -0
  139. package/templates/skills/review-code/references/security-checklist.md +127 -0
  140. package/templates/skills/ui-components/SKILL.md +54 -54
  141. package/templates/skills/workflow/SKILL.md +46 -46
  142. package/templates/commands/ai-prompt.md +0 -315
  143. package/templates/commands/apex/1-analyze.md +0 -100
  144. package/templates/commands/apex/2-plan.md +0 -145
  145. package/templates/commands/apex/3-execute.md +0 -171
  146. package/templates/commands/apex/4-examine.md +0 -116
  147. package/templates/commands/apex/5-tasks.md +0 -209
  148. package/templates/commands/apex.md +0 -76
  149. package/templates/commands/application/create.md +0 -362
  150. package/templates/commands/application/templates-backend.md +0 -463
  151. package/templates/commands/application/templates-frontend.md +0 -517
  152. package/templates/commands/application/templates-i18n.md +0 -478
  153. package/templates/commands/application/templates-seed.md +0 -362
  154. package/templates/commands/application.md +0 -303
  155. package/templates/commands/business-analyse/0-orchestrate.md +0 -156
  156. package/templates/commands/business-analyse/1-init.md +0 -99
  157. package/templates/commands/business-analyse/2-discover.md +0 -143
  158. package/templates/commands/business-analyse/3-analyse.md +0 -106
  159. package/templates/commands/business-analyse/4-specify.md +0 -133
  160. package/templates/commands/business-analyse/5-validate.md +0 -132
  161. package/templates/commands/business-analyse/6-handoff.md +0 -157
  162. package/templates/commands/business-analyse/7-doc-html.md +0 -103
  163. package/templates/commands/business-analyse/_shared.md +0 -176
  164. package/templates/commands/business-analyse/bug.md +0 -118
  165. package/templates/commands/business-analyse/change-request.md +0 -144
  166. package/templates/commands/business-analyse/hotfix.md +0 -116
  167. package/templates/commands/business-analyse.md +0 -121
  168. package/templates/commands/controller/create.md +0 -216
  169. package/templates/commands/controller/postman-templates.md +0 -528
  170. package/templates/commands/controller/templates.md +0 -600
  171. package/templates/commands/controller.md +0 -337
  172. package/templates/commands/create/agent.md +0 -138
  173. package/templates/commands/create/command.md +0 -166
  174. package/templates/commands/create/hook.md +0 -234
  175. package/templates/commands/create/plugin.md +0 -329
  176. package/templates/commands/create/project.md +0 -508
  177. package/templates/commands/create/skill.md +0 -199
  178. package/templates/commands/create.md +0 -220
  179. package/templates/commands/documentation/module.md +0 -202
  180. package/templates/commands/documentation/templates.md +0 -432
  181. package/templates/commands/documentation.md +0 -190
  182. package/templates/commands/epct.md +0 -69
  183. package/templates/commands/explain.md +0 -186
  184. package/templates/commands/feature-full.md +0 -267
  185. package/templates/commands/gitflow/1-init.md +0 -188
  186. package/templates/commands/gitflow/10-start.md +0 -190
  187. package/templates/commands/gitflow/11-finish.md +0 -382
  188. package/templates/commands/gitflow/12-cleanup.md +0 -103
  189. package/templates/commands/gitflow/13-sync.md +0 -216
  190. package/templates/commands/gitflow/14-rebase.md +0 -251
  191. package/templates/commands/gitflow/2-status.md +0 -122
  192. package/templates/commands/gitflow/3-commit.md +0 -209
  193. package/templates/commands/gitflow/4-plan.md +0 -174
  194. package/templates/commands/gitflow/5-exec.md +0 -202
  195. package/templates/commands/gitflow/6-abort.md +0 -121
  196. package/templates/commands/gitflow/7-pull-request.md +0 -176
  197. package/templates/commands/gitflow/8-review.md +0 -113
  198. package/templates/commands/gitflow/9-merge.md +0 -157
  199. package/templates/commands/gitflow.md +0 -128
  200. package/templates/commands/implement.md +0 -663
  201. package/templates/commands/init.md +0 -567
  202. package/templates/commands/mcp-integration.md +0 -330
  203. package/templates/commands/notification.md +0 -129
  204. package/templates/commands/oneshot.md +0 -57
  205. package/templates/commands/quickstart.md +0 -154
  206. package/templates/commands/ralph-loop/cancel-ralph.md +0 -18
  207. package/templates/commands/ralph-loop/help.md +0 -126
  208. package/templates/commands/ralph-loop/ralph-loop.md +0 -120
  209. package/templates/commands/review.md +0 -106
  210. package/templates/commands/workflow.md +0 -193
@@ -1,45 +1,45 @@
1
1
  ---
2
2
  name: feature-full
3
3
  description: |
4
- Cree une feature complete SmartStack avec toutes les integrations.
5
- Utiliser ce skill quand:
6
- - L'utilisateur veut creer une feature complete de A a Z
7
- - L'utilisateur mentionne "oneshot", "feature complete", "full-stack"
8
- - Creation d'un module avec notifications, workflows et/ou IA
9
- - Besoin d'une experience utilisateur complete
4
+ Creates a complete SmartStack feature with all integrations.
5
+ Use this skill when:
6
+ - User wants to create a complete feature from A to Z
7
+ - User mentions "oneshot", "complete feature", "full-stack"
8
+ - Creating a module with notifications, workflows and/or AI
9
+ - Need for complete user experience
10
10
  Scope: Domain → Application → Infrastructure → API → Web + Notifications + Workflows + AI
11
11
  ---
12
12
 
13
13
  # Skill Feature Full SmartStack
14
14
 
15
- > **OneShot Development:** Orchestre tous les skills pour une feature complete.
15
+ > **OneShot Development:** Orchestrates all skills for a complete feature.
16
16
 
17
- **Référence:** [_shared.md](../_shared.md) pour architecture, permissions, i18n
17
+ **Reference:** [_shared.md](../_shared.md) for architecture, permissions, i18n
18
18
 
19
- ## QUAND CE SKILL S'ACTIVE
19
+ ## WHEN THIS SKILL ACTIVATES
20
20
 
21
- | Declencheur | Exemple |
22
- |-------------|---------|
23
- | Feature complete | "Cree un module de gestion des produits" |
24
- | Full-stack | "Cree le backend et le frontend pour..." |
25
- | Integration | "Avec notifications et emails automatiques" |
21
+ | Trigger | Example |
22
+ |---------|---------|
23
+ | Complete feature | "Create a product management module" |
24
+ | Full-stack | "Create the backend and frontend for..." |
25
+ | Integration | "With notifications and automated emails" |
26
26
 
27
- ## FLOW COMPLET
27
+ ## COMPLETE FLOW
28
28
 
29
29
  ```
30
30
  DOMAIN → APPLICATION → INFRASTRUCTURE → API → WEB
31
31
  + NOTIFICATIONS + WORKFLOWS + AI
32
32
  ```
33
33
 
34
- ## WORKFLOW DE CREATION
34
+ ## CREATION WORKFLOW
35
35
 
36
- ### PHASE 1: ANALYSE
36
+ ### PHASE 1: ANALYSIS
37
37
 
38
38
  ```
39
- □ Module/fonctionnalite ?
40
- Entites ? Operations CRUD ? Regles metier ?
41
- □ Notifications requises ? Emails automatiques ? IA ?
42
- Affichage: Cards/Table/Kanban ? Permissions ?
39
+ □ Module/functionality?
40
+ Entities? CRUD operations? Business rules?
41
+ □ Notifications required? Automated emails? AI?
42
+ Display: Cards/Table/Kanban? Permissions?
43
43
  ```
44
44
 
45
45
  ### PHASE 2: DOMAIN
@@ -71,7 +71,7 @@ Task<{Entity}Dto> CreateAsync(Create{Entity}Request request, CancellationToken c
71
71
  public record {Entity}Dto(Guid Id, string Name, string Status, DateTime CreatedAt);
72
72
  public record Create{Entity}Request(string Name, string? Description);
73
73
 
74
- // Permissions.cs + PermissionConfiguration.cs (2 fichiers!)
74
+ // Permissions.cs + PermissionConfiguration.cs (2 files!)
75
75
  public const string View = "{context}.{area}.{module}.read";
76
76
  ```
77
77
 
@@ -82,13 +82,13 @@ public const string View = "{context}.{area}.{module}.read";
82
82
  builder.ToTable("{Entity}s", "{schema}");
83
83
  builder.Property(x => x.Name).HasMaxLength(200).IsRequired();
84
84
 
85
- // {Entity}Service.cs avec Notifications
85
+ // {Entity}Service.cs with Notifications
86
86
  public async Task<{Entity}Dto> CreateAsync(...) {
87
87
  var entity = {Entity}.Create(request.Name, _currentUser.Id);
88
88
  _context.{Entity}s.Add(entity);
89
89
  await _context.SaveChangesAsync(ct);
90
90
  await _notificationService.SendNotificationAsync(_currentUser.Id,
91
- NotificationType.{Entity}Created, "Cree", $"{entity.Name} cree",
91
+ NotificationType.{Entity}Created, "Created", $"{entity.Name} created",
92
92
  relatedEntityType: nameof({Entity}), relatedEntityId: entity.Id, ct);
93
93
  return MapToDto(entity);
94
94
  }
@@ -122,7 +122,7 @@ export const {module}Api = {
122
122
  create: (data) => apiClient.post<{Entity}Dto>('/{area}/{module}', data),
123
123
  };
124
124
 
125
- // use{Module}.ts avec SignalR
125
+ // use{Module}.ts with SignalR
126
126
  export function use{Module}() {
127
127
  const queryClient = useQueryClient();
128
128
  useSignalR({ onNotification: (n) => {
@@ -132,10 +132,10 @@ export function use{Module}() {
132
132
  return { create: createMutation.mutate, ... };
133
133
  }
134
134
 
135
- // {Module}Page.tsx avec EntityCard
136
- <EntityCard title={item.name} actions={[{ label: 'Voir', onClick: () => navigate(...) }]} />
135
+ // {Module}Page.tsx with EntityCard
136
+ <EntityCard title={item.name} actions={[{ label: 'View', onClick: () => navigate(...) }]} />
137
137
 
138
- // Routes (nested obligatoire)
138
+ // Routes (nested mandatory)
139
139
  <Route path="{area}"><Route path="{module}"><Route index element={<{Module}Page />} /></Route></Route>
140
140
  ```
141
141
 
@@ -161,21 +161,21 @@ var result = await _aiCompletionService.ExecutePromptByCodeWithValidationAsync<{
161
161
  "{entity}-analyzer", new Dictionary<string, object>{ ["name"] = entity.Name }, ct);
162
162
  ```
163
163
 
164
- ## CHECKLIST COMPLETE
164
+ ## COMPLETE CHECKLIST
165
165
 
166
166
  ### Backend
167
167
  ```
168
168
  □ Domain: Entity + Factory + Behaviors + Enum + IAuditableEntity
169
- □ Application: Interface + DTOs + Permissions (2 fichiers!)
169
+ □ Application: Interface + DTOs + Permissions (2 files!)
170
170
  □ Infrastructure: EF Config + Service + DI + DbSet + Migration
171
171
  □ API: Controller + Authorize + RequirePermission + ProducesResponseType
172
172
  ```
173
173
 
174
174
  ### Frontend
175
175
  ```
176
- □ {module}Api.ts + use{Module}.ts (avec SignalR) + {Module}Page.tsx + {Module}Form.tsx
176
+ □ {module}Api.ts + use{Module}.ts (with SignalR) + {Module}Page.tsx + {Module}Form.tsx
177
177
  □ i18n: fr, en, it, de
178
- Routes nested dans App.tsx
178
+ Nested routes in App.tsx
179
179
  ```
180
180
 
181
181
  ### Integrations
@@ -190,7 +190,7 @@ var result = await _aiCompletionService.ExecutePromptByCodeWithValidationAsync<{
190
190
  □ dotnet build + npm run build + npm run lint OK
191
191
  ```
192
192
 
193
- ## SKILLS ORCHESTRES
193
+ ## ORCHESTRATED SKILLS
194
194
 
195
195
  | Skill | Phase |
196
196
  |-------|-------|
@@ -202,12 +202,12 @@ var result = await _aiCompletionService.ExecutePromptByCodeWithValidationAsync<{
202
202
  | `/ui-components` | 6 |
203
203
  | `/efcore:migration` | 4 |
204
204
 
205
- ## REGLES ABSOLUES
205
+ ## ABSOLUTE RULES
206
206
 
207
207
  | DO | DON'T |
208
208
  |----|-------|
209
- | Architecture en couches | Acces DB direct frontend |
210
- | Factory Methods entites | Permissions strings hardcodees |
211
- | Permissions 2 fichiers | Routes plates |
212
- | Hooks SignalR | Skip i18n 4 langues |
209
+ | Layered architecture | Direct frontend DB access |
210
+ | Entity Factory Methods | Hardcoded permission strings |
211
+ | Permissions 2 files | Flat routes |
212
+ | SignalR hooks | Skip i18n 4 languages |
213
213
  | ProducesResponseType | Skip logging |
@@ -0,0 +1,277 @@
1
+ ---
2
+ name: gitflow
3
+ description: GitFlow workflow with versioning, worktrees, and EF Core migration management. Progressive step loading for minimal context usage.
4
+ argument-hint: "[-a] [-f|-r|-h] <action> [name]"
5
+ ---
6
+
7
+ <objective>
8
+ Execute GitFlow workflows with automatic versioning, worktree management, and EF Core migration validation. Uses progressive step loading to minimize context and maintain fresh state at each phase.
9
+ </objective>
10
+
11
+ <quick_start>
12
+ **Start a feature:**
13
+ ```bash
14
+ /gitflow start feature user-auth
15
+ /gitflow -f user-auth # Shorthand
16
+ ```
17
+
18
+ **Commit with EF Core validation:**
19
+ ```bash
20
+ /gitflow commit # Interactive
21
+ /gitflow -a commit "Add login" # Auto mode
22
+ ```
23
+
24
+ **Create PR and merge:**
25
+ ```bash
26
+ /gitflow pr # Create PR
27
+ /gitflow merge # Merge after approval
28
+ ```
29
+
30
+ **Complete workflow (feature):**
31
+ ```bash
32
+ /gitflow -a -f my-feature # Auto + feature mode
33
+ ```
34
+
35
+ **Flags:**
36
+ - `-a` (auto): Skip confirmations
37
+ - `-f` (feature): Feature workflow
38
+ - `-r` (release): Release workflow
39
+ - `-h` (hotfix): Hotfix workflow
40
+ - `-s` (status): Show status only
41
+ </quick_start>
42
+
43
+ <parameters>
44
+
45
+ <flags>
46
+ **Mode flags (mutually exclusive):**
47
+ | Short | Long | Description |
48
+ |-------|------|-------------|
49
+ | `-f` | `--feature` | Feature workflow (target: develop) |
50
+ | `-r` | `--release` | Release workflow (target: main, merge-back develop) |
51
+ | `-h` | `--hotfix` | Hotfix workflow (target: main, merge-back develop) |
52
+
53
+ **Behavior flags:**
54
+ | Short | Long | Description |
55
+ |-------|------|-------------|
56
+ | `-a` | `--auto` | Autonomous mode: skip confirmations |
57
+ | `-s` | `--status` | Status mode: show state only, no actions |
58
+ | `-v` | `--verbose` | Verbose output |
59
+ | `--dry-run` | | Preview actions without executing |
60
+
61
+ **Disable flags:**
62
+ | Short | Long | Description |
63
+ |-------|------|-------------|
64
+ | `-A` | `--no-auto` | Disable auto mode |
65
+ </flags>
66
+
67
+ <actions>
68
+ **Primary actions:**
69
+ | Action | Description | Step |
70
+ |--------|-------------|------|
71
+ | `init` | Initialize GitFlow config | step-init |
72
+ | `start` | Create new branch + worktree | step-start |
73
+ | `commit` | Commit with EF Core validation | step-commit |
74
+ | `sync` | Sync + rebase with remote | step-sync |
75
+ | `plan` | Generate integration plan | step-plan |
76
+ | `pr` | Create pull request | step-pr |
77
+ | `merge` | Merge PR after review | step-merge |
78
+ | `finish` | Finalize (tag + cleanup) | step-finish |
79
+
80
+ **Standalone phases:**
81
+ | Action | Description | Phase |
82
+ |--------|-------------|-------|
83
+ | `status` | Show complete state | phases/status |
84
+ | `abort` | Rollback/recovery | phases/abort |
85
+ | `cleanup` | Audit worktrees | phases/cleanup |
86
+ </actions>
87
+
88
+ <examples>
89
+ ```bash
90
+ # Initialize GitFlow
91
+ /gitflow init
92
+
93
+ # Start feature with worktree
94
+ /gitflow start feature payment-integration
95
+ /gitflow -f payment-integration # Shorthand
96
+
97
+ # Start release
98
+ /gitflow start release 2.0.0
99
+ /gitflow -r 2.0.0 # Shorthand
100
+
101
+ # Start hotfix
102
+ /gitflow start hotfix critical-fix
103
+ /gitflow -h critical-fix # Shorthand
104
+
105
+ # Commit (with EF Core validation)
106
+ /gitflow commit
107
+ /gitflow -a commit "Fix bug" # Auto mode
108
+
109
+ # Sync with remote
110
+ /gitflow sync
111
+
112
+ # Create PR
113
+ /gitflow pr
114
+
115
+ # Merge after review
116
+ /gitflow merge
117
+
118
+ # Finalize branch
119
+ /gitflow finish
120
+
121
+ # Status check
122
+ /gitflow status
123
+ /gitflow -s # Shorthand
124
+
125
+ # Abort/rollback
126
+ /gitflow abort
127
+ /gitflow abort --checkpoint # Restore from checkpoint
128
+
129
+ # Cleanup worktrees
130
+ /gitflow cleanup
131
+ /gitflow cleanup --dry-run # Preview only
132
+ ```
133
+ </examples>
134
+
135
+ </parameters>
136
+
137
+ <workflows>
138
+ ```
139
+ FEATURE WORKFLOW
140
+ ────────────────
141
+ start ──► commit* ──► sync ──► pr ──► merge ──► finish
142
+ │ (loop) │ │
143
+ └── worktree ────────┴── rebase? ────┴── squash merge
144
+
145
+ RELEASE WORKFLOW
146
+ ────────────────
147
+ start ──► commit* ──► sync ──► pr ──► merge ──► finish
148
+ │ (loop) (main) │ │
149
+ └── worktree ───────────────────────────── merge-back develop
150
+ + tag vX.Y.Z
151
+
152
+ HOTFIX WORKFLOW
153
+ ───────────────
154
+ start ──► commit* ──► sync ──► pr ──► merge ──► finish
155
+ │ (loop) (main) │ │
156
+ └── worktree ───────────────────────────── merge-back develop
157
+ + tag vX.Y.Z+1
158
+ ```
159
+ </workflows>
160
+
161
+ <state_variables>
162
+ **Persist throughout all steps:**
163
+
164
+ | Variable | Type | Description |
165
+ |----------|------|-------------|
166
+ | `{branch_type}` | string | feature, release, hotfix |
167
+ | `{branch_name}` | string | Full branch name (e.g., feature/user-auth) |
168
+ | `{base_branch}` | string | Target branch (develop or main) |
169
+ | `{worktree_path}` | string | Path to worktree directory |
170
+ | `{version_current}` | string | Current version (X.Y.Z) |
171
+ | `{version_next}` | string | Next version after merge |
172
+ | `{auto_mode}` | boolean | Skip confirmations |
173
+ | `{has_migrations}` | boolean | EF Core migrations detected |
174
+ | `{pr_number}` | number | PR number (after creation) |
175
+ | `{git_provider}` | string | github or azuredevops |
176
+
177
+ </state_variables>
178
+
179
+ <entry_point>
180
+
181
+ **ROUTING LOGIC:**
182
+
183
+ 1. Parse flags and action from input
184
+ 2. Route to appropriate step or phase:
185
+
186
+ | Input Pattern | Route To |
187
+ |---------------|----------|
188
+ | `init` | `steps/step-init.md` |
189
+ | `start {type} {name}` | `steps/step-start.md` |
190
+ | `-f {name}` | `steps/step-start.md` (type=feature) |
191
+ | `-r {name}` | `steps/step-start.md` (type=release) |
192
+ | `-h {name}` | `steps/step-start.md` (type=hotfix) |
193
+ | `commit [msg]` | `steps/step-commit.md` |
194
+ | `sync` | `steps/step-sync.md` |
195
+ | `plan` | `steps/step-plan.md` |
196
+ | `pr` | `steps/step-pr.md` |
197
+ | `merge` | `steps/step-merge.md` |
198
+ | `finish` | `steps/step-finish.md` |
199
+ | `status` or `-s` | `phases/status.md` |
200
+ | `abort` | `phases/abort.md` |
201
+ | `cleanup` | `phases/cleanup.md` |
202
+ | (no action, on feature/*) | `steps/step-commit.md` |
203
+
204
+ </entry_point>
205
+
206
+ <step_files>
207
+ **Progressive loading - only load current step:**
208
+
209
+ | Step | File | Purpose |
210
+ |------|------|---------|
211
+ | init | `steps/step-init.md` | Configure GitFlow, create branches |
212
+ | start | `steps/step-start.md` | Create branch + worktree |
213
+ | commit | `steps/step-commit.md` | Commit with EF Core validation |
214
+ | sync | `steps/step-sync.md` | Push/pull + rebase if behind |
215
+ | plan | `steps/step-plan.md` | Generate integration plan |
216
+ | pr | `steps/step-pr.md` | Create pull request |
217
+ | merge | `steps/step-merge.md` | Review checklist + merge |
218
+ | finish | `steps/step-finish.md` | Tag + cleanup + version |
219
+
220
+ **Standalone phases:**
221
+
222
+ | Phase | File | Purpose |
223
+ |-------|------|---------|
224
+ | status | `phases/status.md` | Complete state diagnostic |
225
+ | abort | `phases/abort.md` | Rollback and recovery |
226
+ | cleanup | `phases/cleanup.md` | Audit and remove orphan worktrees |
227
+
228
+ </step_files>
229
+
230
+ <efcore_rules>
231
+ **EF Core validation (MANDATORY):**
232
+
233
+ 1. **1 migration per feature** - Recreate, don't accumulate
234
+ 2. **3 required files** per migration:
235
+ - `{Migration}.cs`
236
+ - `{Migration}.Designer.cs`
237
+ - `{DbContext}ModelSnapshot.cs`
238
+ 3. **Sync before merge** - Rebase on base branch
239
+ 4. **ModelSnapshot conflict** - Accept theirs + Regenerate
240
+ 5. **Release** - Generate idempotent SQL script
241
+
242
+ **Blocking conditions:**
243
+ - Missing migration files → Block commit
244
+ - Snapshot divergence → Require `/efcore:rebase-snapshot`
245
+ - Destructive changes → Require confirmation
246
+ </efcore_rules>
247
+
248
+ <versioning>
249
+ **Source priority:** csproj → Directory.Build.props → VERSION file → git tag
250
+
251
+ **Auto-increment rules:**
252
+ | Branch Type | Version Change | Example |
253
+ |-------------|----------------|---------|
254
+ | feature | minor | 1.2.0 → 1.3.0 |
255
+ | hotfix | patch | 1.2.0 → 1.2.1 |
256
+ | release | as specified | 1.2.0 → 2.0.0 |
257
+ </versioning>
258
+
259
+ <execution_rules>
260
+
261
+ - **Load one step at a time** - Only load the current step file
262
+ - **ULTRA THINK** before each action
263
+ - **Persist state variables** across all steps
264
+ - **Follow next_step directive** at end of each step
265
+ - **NEVER skip EF Core validation** - migrations are critical
266
+ - **Safety > Correctness > Speed**
267
+ </execution_rules>
268
+
269
+ <success_criteria>
270
+
271
+ - Branch created with worktree (if start)
272
+ - All commits validated (EF Core)
273
+ - PR created with proper target
274
+ - Merge completed with correct strategy
275
+ - Tags created for releases/hotfixes
276
+ - Worktrees cleaned up after finish
277
+ </success_criteria>
@@ -1,12 +1,12 @@
1
- # GitFlow - Fonctions Partagées
1
+ # GitFlow - Shared Functions
2
2
 
3
- > **Usage:** Ce fichier contient les fonctions réutilisables. Référencer avec `{{REF:section_name}}` dans les autres fichiers.
3
+ > **Usage:** This file contains reusable functions. Reference with `{{REF:section_name}}` in other files.
4
4
 
5
5
  ---
6
6
 
7
7
  ## DETECT_PROVIDER
8
8
 
9
- Détecte GitHub ou Azure DevOps depuis le remote.
9
+ Detects GitHub or Azure DevOps from remote URL.
10
10
 
11
11
  ```bash
12
12
  detect_git_provider() {
@@ -31,7 +31,7 @@ detect_git_provider() {
31
31
 
32
32
  ## NORMALIZE_NAME
33
33
 
34
- Normalise un nom de branche (accents, espaces, caractères spéciaux).
34
+ Normalizes a branch name (accents, spaces, special characters).
35
35
 
36
36
  ```bash
37
37
  normalize_branch_name() {
@@ -47,7 +47,7 @@ normalize_branch_name() {
47
47
 
48
48
  ## DETECT_WORKTREE_MODE
49
49
 
50
- Détecte le mode worktree (organized, adjacent, none).
50
+ Detects worktree mode (organized, adjacent, none).
51
51
 
52
52
  ```bash
53
53
  detect_worktree_mode() {
@@ -69,7 +69,7 @@ detect_worktree_mode() {
69
69
 
70
70
  ## CLEANUP_WORKTREE
71
71
 
72
- Nettoie un worktree pour une branche donnée.
72
+ Cleans up a worktree for a given branch.
73
73
 
74
74
  ```bash
75
75
  cleanup_worktree_for_branch() {
@@ -81,7 +81,7 @@ cleanup_worktree_for_branch() {
81
81
  hotfix/*) WORKTREE_PATH="$WORKTREE_BASE/hotfixes/${BRANCH#hotfix/}" ;;
82
82
  esac
83
83
 
84
- # Mode organized
84
+ # Organized mode
85
85
  [ -d "../features" ] && case "$BRANCH" in
86
86
  feature/*) WORKTREE_PATH="../features/${BRANCH#feature/}" ;;
87
87
  release/*) WORKTREE_PATH="../releases/${BRANCH#release/}" ;;
@@ -91,7 +91,7 @@ cleanup_worktree_for_branch() {
91
91
  [ -d "$WORKTREE_PATH" ] && {
92
92
  git worktree remove "$WORKTREE_PATH" --force 2>/dev/null || rm -rf "$WORKTREE_PATH"
93
93
  git worktree prune
94
- echo "✓ Worktree nettoyé: $WORKTREE_PATH"
94
+ echo "✓ Worktree cleaned: $WORKTREE_PATH"
95
95
  }
96
96
  }
97
97
  ```
@@ -100,7 +100,7 @@ cleanup_worktree_for_branch() {
100
100
 
101
101
  ## SYNC_REMOTE
102
102
 
103
- Synchronise avec le remote et affiche l'état.
103
+ Syncs with remote and displays status.
104
104
 
105
105
  ```bash
106
106
  sync_with_remote() {
@@ -109,8 +109,8 @@ sync_with_remote() {
109
109
  local AHEAD=$(git rev-list --count origin/$BRANCH..HEAD 2>/dev/null || echo "0")
110
110
  local BEHIND=$(git rev-list --count HEAD..origin/$BRANCH 2>/dev/null || echo "0")
111
111
 
112
- [ "$BEHIND" -gt 0 ] && echo "⚠️ $BRANCH: $BEHIND commit(s) en retard"
113
- [ "$AHEAD" -gt 0 ] && echo "ℹ️ $BRANCH: $AHEAD commit(s) non poussé(s)"
112
+ [ "$BEHIND" -gt 0 ] && echo "⚠️ $BRANCH: $BEHIND commit(s) behind"
113
+ [ "$AHEAD" -gt 0 ] && echo "ℹ️ $BRANCH: $AHEAD commit(s) not pushed"
114
114
  }
115
115
  ```
116
116
 
@@ -118,14 +118,14 @@ sync_with_remote() {
118
118
 
119
119
  ## READ_GITFLOW_CONFIG
120
120
 
121
- Lit la configuration GitFlow.
121
+ Reads GitFlow configuration.
122
122
 
123
123
  ```bash
124
124
  read_gitflow_config() {
125
125
  local CONFIG_FILE=".claude/gitflow/config.json"
126
126
  [ ! -f "$CONFIG_FILE" ] && return 1
127
127
 
128
- # Variables exportées
128
+ # Exported variables
129
129
  GF_LANG=$(grep -oP '"code":\s*"\K[^"]+' "$CONFIG_FILE" | head -1)
130
130
  GF_WORKTREE_MODE=$(grep -oP '"mode":\s*"\K[^"]+' "$CONFIG_FILE" | head -1)
131
131
  GF_MAIN_BRANCH=$(grep -oP '"main":\s*"\K[^"]+' "$CONFIG_FILE" | head -1)
@@ -142,7 +142,7 @@ read_gitflow_config() {
142
142
 
143
143
  ## CONFIG_TEMPLATE
144
144
 
145
- Template JSON de configuration GitFlow (version minimale).
145
+ GitFlow configuration JSON template (minimal version).
146
146
 
147
147
  ```json
148
148
  {
@@ -150,20 +150,20 @@ Template JSON de configuration GitFlow (version minimale).
150
150
  "branches": { "main": "main", "develop": "develop" },
151
151
  "prefixes": { "feature": "feature/", "release": "release/", "hotfix": "hotfix/" },
152
152
  "worktrees": { "mode": "organized" },
153
- "language": { "code": "fr" }
153
+ "language": { "code": "en" }
154
154
  }
155
155
  ```
156
156
 
157
- **Options worktrees.mode:**
157
+ **worktrees.mode options:**
158
158
  - `organized`: `../features/`, `../releases/`, `../hotfixes/`
159
159
  - `adjacent`: `../worktrees/{type}/`
160
- - `disabled`: Pas de worktrees
160
+ - `disabled`: No worktrees
161
161
 
162
162
  ---
163
163
 
164
164
  ## PR_COMMANDS
165
165
 
166
- Commandes PR par provider.
166
+ PR commands by provider.
167
167
 
168
168
  ### GitHub
169
169
  ```bash
@@ -183,7 +183,7 @@ az repos pr update --id $NUMBER --status completed --squash true --delete-source
183
183
 
184
184
  ## OUTPUT_FORMAT
185
185
 
186
- Format de sortie standard (remplace ASCII art).
186
+ Standard output format (replaces ASCII art).
187
187
 
188
188
  ```bash
189
189
  output_header() { echo -e "\n## $1\n"; }
@@ -192,5 +192,5 @@ output_item() { echo "- $1"; }
192
192
  output_success() { echo "✓ $1"; }
193
193
  output_warning() { echo "⚠️ $1"; }
194
194
  output_error() { echo "❌ $1"; }
195
- output_next() { echo "→ Prochain: $1"; }
195
+ output_next() { echo "→ Next: $1"; }
196
196
  ```