@atlashub/smartstack-cli 1.13.2 → 1.14.1

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 (214) 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 +231 -236
  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 +1075 -351
  12. package/.documentation/ralph-loop.html +1 -1
  13. package/.documentation/test-web.html +1 -1
  14. package/README.md +88 -20
  15. package/config/default-config.json +10 -1
  16. package/dist/index.js +276 -85
  17. package/dist/index.js.map +1 -1
  18. package/package.json +1 -1
  19. package/templates/agents/code-reviewer.md +163 -0
  20. package/templates/agents/efcore/db-deploy.md +25 -7
  21. package/templates/agents/efcore/db-reset.md +31 -10
  22. package/templates/agents/efcore/db-status.md +22 -5
  23. package/templates/agents/efcore/migration.md +70 -20
  24. package/templates/agents/gitflow/cleanup.md +8 -1
  25. package/templates/agents/gitflow/commit.md +7 -5
  26. package/templates/agents/gitflow/finish.md +6 -4
  27. package/templates/agents/gitflow/pr.md +8 -1
  28. package/templates/agents/gitflow/start.md +1 -1
  29. package/templates/commands/check-version.md +267 -0
  30. package/templates/commands/efcore/_shared.md +31 -2
  31. package/templates/commands/efcore/db-reset.md +18 -6
  32. package/templates/commands/efcore/migration.md +1 -1
  33. package/templates/commands/efcore/rebase-snapshot.md +1 -1
  34. package/templates/commands/efcore/squash.md +1 -0
  35. package/templates/commands/refactor.md +164 -0
  36. package/templates/project/DependencyInjection.Application.cs.template +25 -0
  37. package/templates/project/DependencyInjection.Infrastructure.cs.template +61 -0
  38. package/templates/project/DesignTimeExtensionsDbContextFactory.cs.template +70 -0
  39. package/templates/project/ExampleEntity.cs.template +116 -0
  40. package/templates/project/ExampleEntityConfiguration.cs.template +64 -0
  41. package/templates/project/ExampleService.cs.template +146 -0
  42. package/templates/project/ExtensionsDbContext.cs.template +41 -0
  43. package/templates/project/IExtensionsDbContext.cs.template +22 -0
  44. package/templates/project/Program.cs.template +47 -0
  45. package/templates/project/README.md +79 -0
  46. package/templates/ralph/README.md +10 -8
  47. package/templates/ralph/ralph.config.yaml +2 -2
  48. package/templates/skills/_shared.md +44 -44
  49. package/templates/skills/ai-prompt/SKILL.md +55 -55
  50. package/templates/skills/apex/SKILL.md +235 -0
  51. package/templates/skills/apex/steps/step-00-init.md +203 -0
  52. package/templates/skills/apex/steps/step-01-analyze.md +210 -0
  53. package/templates/skills/apex/steps/step-02-plan.md +217 -0
  54. package/templates/skills/apex/steps/step-03-execute.md +178 -0
  55. package/templates/skills/apex/steps/step-04-validate.md +217 -0
  56. package/templates/skills/apex/steps/step-05-examine.md +207 -0
  57. package/templates/skills/apex/steps/step-06-resolve.md +181 -0
  58. package/templates/skills/apex/steps/step-07-tests.md +206 -0
  59. package/templates/skills/apex/steps/step-08-run-tests.md +207 -0
  60. package/templates/skills/apex/templates/00-context.md +46 -0
  61. package/templates/skills/apex/templates/01-analyze.md +63 -0
  62. package/templates/skills/apex/templates/02-plan.md +63 -0
  63. package/templates/skills/apex/templates/03-execute.md +34 -0
  64. package/templates/skills/apex/templates/04-validate.md +61 -0
  65. package/templates/skills/apex/templates/05-examine.md +58 -0
  66. package/templates/skills/apex/templates/06-resolve.md +39 -0
  67. package/templates/skills/apex/templates/07-tests.md +56 -0
  68. package/templates/skills/apex/templates/08-run-tests.md +41 -0
  69. package/templates/skills/apex/templates/README.md +69 -0
  70. package/templates/skills/application/SKILL.md +50 -50
  71. package/templates/skills/application/templates-backend.md +25 -25
  72. package/templates/skills/application/templates-frontend.md +43 -43
  73. package/templates/skills/application/templates-i18n.md +29 -29
  74. package/templates/skills/application/templates-seed.md +77 -77
  75. package/templates/skills/business-analyse/SKILL.md +223 -0
  76. package/templates/skills/business-analyse/_shared.md +258 -0
  77. package/templates/skills/business-analyse/questionnaire/01-context.md +33 -0
  78. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +35 -0
  79. package/templates/skills/business-analyse/questionnaire/03-scope.md +35 -0
  80. package/templates/skills/business-analyse/questionnaire/04-data.md +36 -0
  81. package/templates/skills/business-analyse/questionnaire/05-integrations.md +36 -0
  82. package/templates/skills/business-analyse/questionnaire/06-security.md +40 -0
  83. package/templates/skills/business-analyse/questionnaire/07-ui.md +36 -0
  84. package/templates/skills/business-analyse/questionnaire/08-performance.md +35 -0
  85. package/templates/skills/business-analyse/questionnaire/09-constraints.md +35 -0
  86. package/templates/skills/business-analyse/questionnaire/10-documentation.md +35 -0
  87. package/templates/skills/business-analyse/questionnaire.md +177 -177
  88. package/templates/skills/business-analyse/react/components.md +340 -0
  89. package/templates/skills/business-analyse/react/i18n-template.md +245 -0
  90. package/templates/skills/business-analyse/react/schema.md +151 -0
  91. package/templates/skills/business-analyse/steps/step-00-init.md +293 -0
  92. package/templates/skills/business-analyse/steps/step-01-discover.md +267 -0
  93. package/templates/skills/business-analyse/steps/step-02-analyse.md +243 -0
  94. package/templates/skills/business-analyse/steps/step-03-specify.md +317 -0
  95. package/templates/skills/business-analyse/steps/step-04-validate.md +239 -0
  96. package/templates/skills/business-analyse/steps/step-05-handoff.md +336 -0
  97. package/templates/skills/business-analyse/steps/step-06-doc-html.md +261 -0
  98. package/templates/skills/business-analyse/templates/00-context.md +105 -0
  99. package/templates/skills/business-analyse/templates/frd-brd.md +97 -0
  100. package/templates/skills/business-analyse/templates/frd-discovery.md +78 -0
  101. package/templates/skills/business-analyse/templates/frd-handoff.md +118 -0
  102. package/templates/skills/business-analyse/templates/frd-spec.md +168 -0
  103. package/templates/skills/business-analyse/templates-frd.md +217 -217
  104. package/templates/skills/business-analyse/templates-react.md +26 -26
  105. package/templates/skills/controller/SKILL.md +141 -92
  106. package/templates/skills/controller/postman-templates.md +15 -15
  107. package/templates/skills/controller/steps/step-00-init.md +191 -0
  108. package/templates/skills/controller/steps/step-01-analyze.md +146 -0
  109. package/templates/skills/controller/steps/step-02-plan.md +176 -0
  110. package/templates/skills/controller/steps/step-03-generate.md +219 -0
  111. package/templates/skills/controller/steps/step-04-perms.md +219 -0
  112. package/templates/skills/controller/steps/step-05-validate.md +107 -0
  113. package/templates/skills/controller/templates.md +77 -77
  114. package/templates/skills/documentation/SKILL.md +79 -79
  115. package/templates/skills/feature-full/SKILL.md +38 -38
  116. package/templates/skills/gitflow/SKILL.md +277 -0
  117. package/templates/{commands → skills}/gitflow/_shared.md +20 -20
  118. package/templates/skills/gitflow/phases/abort.md +173 -0
  119. package/templates/skills/gitflow/phases/cleanup.md +226 -0
  120. package/templates/skills/gitflow/phases/status.md +178 -0
  121. package/templates/skills/gitflow/steps/step-commit.md +255 -0
  122. package/templates/skills/gitflow/steps/step-finish.md +255 -0
  123. package/templates/skills/gitflow/steps/step-init.md +209 -0
  124. package/templates/skills/gitflow/steps/step-merge.md +225 -0
  125. package/templates/skills/gitflow/steps/step-plan.md +208 -0
  126. package/templates/skills/gitflow/steps/step-pr.md +235 -0
  127. package/templates/skills/gitflow/steps/step-start.md +334 -0
  128. package/templates/skills/gitflow/steps/step-sync.md +200 -0
  129. package/templates/skills/gitflow/templates/config.json +53 -0
  130. package/templates/skills/notification/SKILL.md +51 -51
  131. package/templates/skills/ralph-loop/SKILL.md +228 -0
  132. package/templates/skills/ralph-loop/steps/step-00-init.md +201 -0
  133. package/templates/skills/ralph-loop/steps/step-01-task.md +169 -0
  134. package/templates/skills/ralph-loop/steps/step-02-execute.md +173 -0
  135. package/templates/skills/ralph-loop/steps/step-03-commit.md +170 -0
  136. package/templates/skills/ralph-loop/steps/step-04-check.md +162 -0
  137. package/templates/skills/ralph-loop/steps/step-05-report.md +181 -0
  138. package/templates/skills/review-code/SKILL.md +219 -0
  139. package/templates/skills/review-code/references/clean-code-principles.md +140 -0
  140. package/templates/skills/review-code/references/code-quality-metrics.md +174 -0
  141. package/templates/skills/review-code/references/feedback-patterns.md +149 -0
  142. package/templates/skills/review-code/references/security-checklist.md +127 -0
  143. package/templates/skills/ui-components/SKILL.md +54 -54
  144. package/templates/skills/workflow/SKILL.md +46 -46
  145. package/templates/commands/ai-prompt.md +0 -315
  146. package/templates/commands/apex/1-analyze.md +0 -100
  147. package/templates/commands/apex/2-plan.md +0 -145
  148. package/templates/commands/apex/3-execute.md +0 -171
  149. package/templates/commands/apex/4-examine.md +0 -116
  150. package/templates/commands/apex/5-tasks.md +0 -209
  151. package/templates/commands/apex.md +0 -76
  152. package/templates/commands/application/create.md +0 -362
  153. package/templates/commands/application/templates-backend.md +0 -463
  154. package/templates/commands/application/templates-frontend.md +0 -517
  155. package/templates/commands/application/templates-i18n.md +0 -478
  156. package/templates/commands/application/templates-seed.md +0 -362
  157. package/templates/commands/application.md +0 -303
  158. package/templates/commands/business-analyse/0-orchestrate.md +0 -156
  159. package/templates/commands/business-analyse/1-init.md +0 -99
  160. package/templates/commands/business-analyse/2-discover.md +0 -143
  161. package/templates/commands/business-analyse/3-analyse.md +0 -106
  162. package/templates/commands/business-analyse/4-specify.md +0 -133
  163. package/templates/commands/business-analyse/5-validate.md +0 -132
  164. package/templates/commands/business-analyse/6-handoff.md +0 -157
  165. package/templates/commands/business-analyse/7-doc-html.md +0 -103
  166. package/templates/commands/business-analyse/_shared.md +0 -176
  167. package/templates/commands/business-analyse/bug.md +0 -118
  168. package/templates/commands/business-analyse/change-request.md +0 -144
  169. package/templates/commands/business-analyse/hotfix.md +0 -116
  170. package/templates/commands/business-analyse.md +0 -121
  171. package/templates/commands/controller/create.md +0 -216
  172. package/templates/commands/controller/postman-templates.md +0 -528
  173. package/templates/commands/controller/templates.md +0 -600
  174. package/templates/commands/controller.md +0 -337
  175. package/templates/commands/create/agent.md +0 -138
  176. package/templates/commands/create/command.md +0 -166
  177. package/templates/commands/create/hook.md +0 -234
  178. package/templates/commands/create/plugin.md +0 -329
  179. package/templates/commands/create/project.md +0 -508
  180. package/templates/commands/create/skill.md +0 -199
  181. package/templates/commands/create.md +0 -220
  182. package/templates/commands/documentation/module.md +0 -202
  183. package/templates/commands/documentation/templates.md +0 -432
  184. package/templates/commands/documentation.md +0 -190
  185. package/templates/commands/epct.md +0 -69
  186. package/templates/commands/explain.md +0 -186
  187. package/templates/commands/feature-full.md +0 -267
  188. package/templates/commands/gitflow/1-init.md +0 -188
  189. package/templates/commands/gitflow/10-start.md +0 -190
  190. package/templates/commands/gitflow/11-finish.md +0 -382
  191. package/templates/commands/gitflow/12-cleanup.md +0 -103
  192. package/templates/commands/gitflow/13-sync.md +0 -216
  193. package/templates/commands/gitflow/14-rebase.md +0 -251
  194. package/templates/commands/gitflow/2-status.md +0 -122
  195. package/templates/commands/gitflow/3-commit.md +0 -209
  196. package/templates/commands/gitflow/4-plan.md +0 -174
  197. package/templates/commands/gitflow/5-exec.md +0 -202
  198. package/templates/commands/gitflow/6-abort.md +0 -121
  199. package/templates/commands/gitflow/7-pull-request.md +0 -176
  200. package/templates/commands/gitflow/8-review.md +0 -113
  201. package/templates/commands/gitflow/9-merge.md +0 -157
  202. package/templates/commands/gitflow.md +0 -128
  203. package/templates/commands/implement.md +0 -663
  204. package/templates/commands/init.md +0 -567
  205. package/templates/commands/mcp-integration.md +0 -330
  206. package/templates/commands/notification.md +0 -129
  207. package/templates/commands/oneshot.md +0 -57
  208. package/templates/commands/quickstart.md +0 -154
  209. package/templates/commands/ralph-loop/cancel-ralph.md +0 -18
  210. package/templates/commands/ralph-loop/help.md +0 -126
  211. package/templates/commands/ralph-loop/ralph-loop.md +0 -120
  212. package/templates/commands/review.md +0 -106
  213. package/templates/commands/workflow.md +0 -193
  214. package/templates/gitflow/config.json +0 -138
@@ -1,29 +1,29 @@
1
- # Skills SmartStack - Fonctions Partagées
1
+ # Skills SmartStack - Shared Functions
2
2
 
3
- ## Stratégie Modèles
3
+ ## Model Strategy
4
4
 
5
- | Tâche | Modèle | Raison |
6
- |-------|--------|--------|
7
- | Génération code | **Sonnet** | Rapport qualité/coût optimal |
8
- | Audit sécurité | **Opus** | Analyse critique requise |
9
- | Validation finale | **Opus** | Décisions architecturales |
5
+ | Task | Model | Reason |
6
+ |------|-------|--------|
7
+ | Code generation | **Sonnet** | Optimal quality/cost ratio |
8
+ | Security audit | **Opus** | Critical analysis required |
9
+ | Final validation | **Opus** | Architectural decisions |
10
10
 
11
- ## Architecture SmartStack
11
+ ## SmartStack Architecture
12
12
 
13
13
  ```
14
14
  Domain → Application → Infrastructure → API → Web
15
15
  ```
16
16
 
17
17
  ### Layers
18
- | Layer | Responsabilité | Namespace |
19
- |-------|---------------|-----------|
20
- | Domain | Entités, ValueObjects | `SmartStack.Domain.{Context}` |
18
+ | Layer | Responsibility | Namespace |
19
+ |-------|-----------------|-----------|
20
+ | Domain | Entities, ValueObjects | `SmartStack.Domain.{Context}` |
21
21
  | Application | Services, DTOs, Interfaces | `SmartStack.Application.{Context}` |
22
- | Infrastructure | Implémentations, EF Core | `SmartStack.Infrastructure.{Context}` |
22
+ | Infrastructure | Implementations, EF Core | `SmartStack.Infrastructure.{Context}` |
23
23
  | API | Controllers, Middleware | `SmartStack.Api.Controllers.{Area}` |
24
24
  | Web | React components, pages | `src/pages/{context}/{app}/{module}` |
25
25
 
26
- ## Permissions (2 fichiers obligatoires)
26
+ ## Permissions (2 mandatory files)
27
27
 
28
28
  ### 1. Permissions.cs (Application layer)
29
29
  ```csharp
@@ -45,16 +45,16 @@ builder.HasData(
45
45
  );
46
46
  ```
47
47
 
48
- ## i18n (4 langues obligatoires)
48
+ ## i18n (4 mandatory languages)
49
49
 
50
- | Langue | Fichier | Code |
51
- |--------|---------|------|
52
- | Français | `fr.json` | `fr` |
50
+ | Language | File | Code |
51
+ |----------|------|------|
52
+ | French | `fr.json` | `fr` |
53
53
  | English | `en.json` | `en` |
54
- | Italiano | `it.json` | `it` |
55
- | Deutsch | `de.json` | `de` |
54
+ | Italian | `it.json` | `it` |
55
+ | German | `de.json` | `de` |
56
56
 
57
- ### Structure i18n
57
+ ### i18n Structure
58
58
  ```json
59
59
  {
60
60
  "{context}": {
@@ -70,48 +70,48 @@ builder.HasData(
70
70
  }
71
71
  ```
72
72
 
73
- ## Services Communs à Injecter
73
+ ## Common Services to Inject
74
74
 
75
75
  | Service | Usage |
76
76
  |---------|-------|
77
- | `IApplicationDbContext` | Accès DB |
78
- | `ICurrentUserService` | User courant |
77
+ | `IApplicationDbContext` | DB access |
78
+ | `ICurrentUserService` | Current user |
79
79
  | `ILogger<T>` | Logging |
80
80
  | `IMapper` | AutoMapper |
81
- | `IPermissionService` | Cache permissions |
81
+ | `IPermissionService` | Permission cache |
82
82
 
83
- ## Validation Sécurité
83
+ ## Security Validation
84
84
 
85
- ### Logs Critiques
86
- | Événement | Niveau |
87
- |-----------|--------|
88
- | Login échoué | `Critical` |
89
- | Permission refusée | `Critical` |
90
- | Compte verrouillé | `Critical` |
85
+ ### Critical Logs
86
+ | Event | Level |
87
+ |-------|-------|
88
+ | Failed login | `Critical` |
89
+ | Permission denied | `Critical` |
90
+ | Account locked | `Critical` |
91
91
  | Password change | `Warning` |
92
- | Suppression | `Warning` |
92
+ | Deletion | `Warning` |
93
93
 
94
- ### Protection Comptes Système
94
+ ### System Account Protection
95
95
  ```csharp
96
96
  if (entity.UserType == UserType.System || entity.UserType == UserType.LocalAdmin)
97
97
  return BadRequest(new { message = "Cannot modify system accounts" });
98
98
  ```
99
99
 
100
- ## Checklist Validation Commune
100
+ ## Common Validation Checklist
101
101
 
102
102
  ```
103
- □ Permissions créées (Permissions.cs + PermissionConfiguration.cs)
104
- Migration EF Core créée
105
- □ i18n 4 langues (fr, en, it, de)
106
- Tests unitaires
107
- Documentation API (ProducesResponseType)
103
+ □ Permissions created (Permissions.cs + PermissionConfiguration.cs)
104
+ □ EF Core migration created
105
+ □ i18n 4 languages (fr, en, it, de)
106
+ Unit tests
107
+ □ API documentation (ProducesResponseType)
108
108
  ```
109
109
 
110
- ## Références MCP Tools
110
+ ## MCP Tools References
111
111
 
112
112
  | Tool | Usage |
113
113
  |------|-------|
114
- | `mcp__smartstack__validate_conventions` | Validation conventions |
115
- | `mcp__smartstack__scaffold_extension` | Génération code |
116
- | `mcp__smartstack__check_migrations` | Vérification migrations |
117
- | `mcp__smartstack__scaffold_tests` | Génération tests |
114
+ | `mcp__smartstack__validate_conventions` | Validate conventions |
115
+ | `mcp__smartstack__scaffold_extension` | Code generation |
116
+ | `mcp__smartstack__check_migrations` | Check migrations |
117
+ | `mcp__smartstack__scaffold_tests` | Generate tests |
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: ai-prompt
3
3
  description: |
4
- Integre les capacites IA dans les features SmartStack.
5
- Utiliser ce skill quand:
6
- - L'utilisateur veut integrer l'IA dans une fonctionnalite
7
- - L'utilisateur mentionne "prompt", "GPT", "Claude", "IA", "AI"
8
- - Creation d'un assistant ou chatbot
9
- - Generation de contenu automatique
10
- - Validation de reponses IA avec schema
4
+ Integrates AI capabilities into SmartStack features.
5
+ Use this skill when:
6
+ - User wants to integrate AI into a feature
7
+ - User mentions "prompt", "GPT", "Claude", "IA", "AI"
8
+ - Creating an assistant or chatbot
9
+ - Automatic content generation
10
+ - AI response validation with schema
11
11
  Types: Prompt, OutputSchema, Provider, Model
12
12
  ---
13
13
 
@@ -16,19 +16,19 @@ description: |
16
16
  > **Architecture:** Prompt + Blocks → Provider + Model → Completion → Schema Validation
17
17
  > Multi-provider: OpenAI, Anthropic (Claude), Azure OpenAI, Google Gemini
18
18
 
19
- **Référence:** [_shared.md](../_shared.md) pour patterns communs
19
+ **Reference:** [_shared.md](../_shared.md) for common patterns
20
20
 
21
- ## QUAND CE SKILL S'ACTIVE
21
+ ## WHEN THIS SKILL ACTIVATES
22
22
 
23
- | Declencheur | Exemple |
24
- |-------------|---------|
25
- | Demande explicite | "Integre GPT pour generer des descriptions" |
26
- | Chatbot/Assistant | "Cree un assistant pour le support" |
27
- | Generation contenu | "Genere automatiquement des reponses" |
28
- | Analyse texte | "Analyse le sentiment des commentaires" |
29
- | Mots-cles | "prompt", "GPT", "Claude", "IA", "completion", "LLM" |
23
+ | Trigger | Example |
24
+ |---------|---------|
25
+ | Explicit request | "Integrate GPT to generate descriptions" |
26
+ | Chatbot/Assistant | "Create an assistant for support" |
27
+ | Content generation | "Auto-generate responses" |
28
+ | Text analysis | "Analyze the sentiment of comments" |
29
+ | Keywords | "prompt", "GPT", "Claude", "IA", "completion", "LLM" |
30
30
 
31
- ## FLOW IA
31
+ ## AI FLOW
32
32
 
33
33
  ```
34
34
  Feature → IAiCompletionService.ExecutePromptAsync()
@@ -38,7 +38,7 @@ Prompt + Blocks → Provider Instance → External API (OpenAI/Claude/Azure/Gemi
38
38
  AI Response → OutputSchema Validation → Typed Result<T>
39
39
  ```
40
40
 
41
- ## ENTITES PRINCIPALES
41
+ ## MAIN ENTITIES
42
42
 
43
43
  ### AiProvider & AiModel
44
44
  - **Providers:** OpenAI, Anthropic, Azure OpenAI, Google
@@ -46,7 +46,7 @@ AI Response → OutputSchema Validation → Typed Result<T>
46
46
  - Properties: Code, ContextWindow, MaxOutputTokens, InputCost, OutputCost, SupportsVision, SupportsStreaming
47
47
 
48
48
  ### AiProviderInstance
49
- Instance configurée: Code, Name, SystemContext, DefaultModel, MonthlyBudgetLimit, EncryptedApiKey
49
+ Configured instance: Code, Name, SystemContext, DefaultModel, MonthlyBudgetLimit, EncryptedApiKey
50
50
 
51
51
  ### Prompt & PromptBlock
52
52
  ```csharp
@@ -56,20 +56,20 @@ Instance configurée: Code, Name, SystemContext, DefaultModel, MonthlyBudgetLimi
56
56
  ```
57
57
 
58
58
  ### OutputSchema
59
- JSON Schema pour validation: Code, Name, JsonSchema, DotNetType
59
+ JSON Schema for validation: Code, Name, JsonSchema, DotNetType
60
60
 
61
61
  ## WORKFLOW INTEGRATION
62
62
 
63
- ### 1. Definir le Use Case
63
+ ### 1. Define the Use Case
64
64
  | Question | Impact |
65
65
  |----------|--------|
66
- | Type de contenu ? | Choix modele |
67
- | Reponse structuree ? | OutputSchema |
68
- | Multi-langue ? | Variables langue |
69
- | Budget limite ? | ProviderInstance |
70
- | Temps reel ? | Streaming |
66
+ | Content type? | Model choice |
67
+ | Structured response? | OutputSchema |
68
+ | Multi-language? | Language variables |
69
+ | Budget limited? | ProviderInstance |
70
+ | Real-time? | Streaming |
71
71
 
72
- ### 2. Creer le Prompt
72
+ ### 2. Create the Prompt
73
73
  ```csharp
74
74
  var promptId = await _promptService.CreatePromptAsync(new CreatePromptRequest
75
75
  {
@@ -90,7 +90,7 @@ var promptId = await _promptService.CreatePromptAsync(new CreatePromptRequest
90
90
  });
91
91
  ```
92
92
 
93
- ### 3. Definir OutputSchema (si reponse structuree)
93
+ ### 3. Define OutputSchema (if structured response)
94
94
  ```csharp
95
95
  var schemaId = await _schemaService.CreateAsync(new CreateSchemaRequest
96
96
  {
@@ -100,22 +100,22 @@ var schemaId = await _schemaService.CreateAsync(new CreateSchemaRequest
100
100
  });
101
101
  ```
102
102
 
103
- ### 4. Executer le Prompt
103
+ ### 4. Execute the Prompt
104
104
  ```csharp
105
- // Execution simple
105
+ // Simple execution
106
106
  var result = await _aiService.ExecutePromptAsync(promptId, new Dictionary<string, object>
107
107
  {
108
108
  ["ticketTitle"] = ticket.Title,
109
109
  ["ticketDescription"] = ticket.Description
110
110
  });
111
111
 
112
- // Avec validation typee
112
+ // With typed validation
113
113
  var typedResult = await _aiService.ExecutePromptWithValidationAsync<TicketAnalysisResult>(
114
114
  promptId, variables);
115
115
  if (typedResult.Success && typedResult.IsValid) { /* use typedResult.Data */ }
116
116
  ```
117
117
 
118
- ## SERVICES IA
118
+ ## AI SERVICES
119
119
 
120
120
  ### IAiCompletionService
121
121
  ```csharp
@@ -151,17 +151,17 @@ const { execute, loading, error, result } = useAiCompletion<T>(promptCode);
151
151
  const data = await execute(variables);
152
152
  ```
153
153
 
154
- ### Composant AiAssistantButton
154
+ ### Component AiAssistantButton
155
155
  ```tsx
156
156
  <AiAssistantButton
157
157
  promptCode="ticket-analyzer"
158
158
  variables={{ ticketTitle, ticketDescription }}
159
159
  onResult={(result) => handleAnalysis(result)}
160
- label="Analyser avec IA"
160
+ label="Analyze with AI"
161
161
  />
162
162
  ```
163
163
 
164
- ## PATTERNS AVANCES
164
+ ## ADVANCED PATTERNS
165
165
 
166
166
  ### Streaming Response
167
167
  ```typescript
@@ -180,32 +180,32 @@ foreach (var provider in providers.OrderBy(p => p.Priority)) {
180
180
  ## CHECKLIST
181
181
 
182
182
  ```
183
- □ Prompt cree (Code unique, Blocks, Variables, Version)
184
- □ OutputSchema si reponse structuree
185
- □ Service avec IAiCompletionService injecte
186
- Gestion erreurs + Logging (tokens, temps)
187
- □ Frontend: Hook/composant, Loading, Error handling
188
- □ ProviderInstance avec limite budget
189
- □ Tests: execution, variables, validation schema
183
+ □ Prompt created (unique Code, Blocks, Variables, Version)
184
+ □ OutputSchema if structured response
185
+ □ Service with IAiCompletionService injected
186
+ Error handling + Logging (tokens, time)
187
+ □ Frontend: Hook/component, Loading, Error handling
188
+ □ ProviderInstance with budget limit
189
+ □ Tests: execution, variables, schema validation
190
190
  ```
191
191
 
192
- ## REGLES ABSOLUES
192
+ ## ABSOLUTE RULES
193
193
 
194
194
  | DO | DON'T |
195
195
  |----|-------|
196
- | IAiCompletionService pour executions | Appels API directs |
197
- | OutputSchema pour reponses structurees | Reponses non validees |
198
- | Gestion erreurs (API down, quota) | Ignorer les limites tokens |
199
- | Logger executions (tokens, duree) | Hardcoder cles API |
200
- | Variables pour contenu dynamique | Exposer prompts systeme au frontend |
196
+ | IAiCompletionService for executions | Direct API calls |
197
+ | OutputSchema for structured responses | Unvalidated responses |
198
+ | Error handling (API down, quota) | Ignore token limits |
199
+ | Log executions (tokens, duration) | Hardcode API keys |
200
+ | Variables for dynamic content | Expose system prompts to frontend |
201
201
 
202
- ## FICHIERS CLES
202
+ ## KEY FILES
203
203
 
204
- | Fichier | Role |
205
- |---------|------|
206
- | `Domain/AI/Prompts/Prompt.cs` | Entite prompt |
204
+ | File | Role |
205
+ |------|------|
206
+ | `Domain/AI/Prompts/Prompt.cs` | Prompt entity |
207
207
  | `Domain/AI/Schemas/OutputSchema.cs` | Schema validation |
208
- | `Domain/AI/AiProviderInstance.cs` | Instance configuree |
209
- | `Application/Common/Interfaces/IAiCompletionService.cs` | Interface service |
208
+ | `Domain/AI/AiProviderInstance.cs` | Configured instance |
209
+ | `Application/Common/Interfaces/IAiCompletionService.cs` | Service interface |
210
210
  | `Infrastructure/Services/AI/AiCompletionService.cs` | Implementation |
211
- | `web/src/services/api/aiApi.ts` | API frontend |
211
+ | `web/src/services/api/aiApi.ts` | Frontend API |
@@ -0,0 +1,235 @@
1
+ ---
2
+ name: apex
3
+ description: Systematic implementation using APEX methodology (Analyze-Plan-Execute-eXamine) with progressive step loading and context refresh.
4
+ argument-hint: "[-a] [-x] [-s] [-t] [-e] [-i] [-b] [-pr] [-r <task-id>] <task description>"
5
+ ---
6
+
7
+ <objective>
8
+ Execute systematic implementation workflows using the APEX methodology. This skill uses progressive step loading to minimize context usage and maintain fresh context throughout the workflow.
9
+ </objective>
10
+
11
+ <quick_start>
12
+ **Basic usage:**
13
+
14
+ ```bash
15
+ /apex add authentication middleware
16
+ ```
17
+
18
+ **Recommended workflow (autonomous with save):**
19
+
20
+ ```bash
21
+ /apex -a -s implement user registration
22
+ ```
23
+
24
+ **With adversarial review:**
25
+
26
+ ```bash
27
+ /apex -a -x -s fix login bug
28
+ ```
29
+
30
+ **Flags:**
31
+
32
+ - `-a` (auto): Skip confirmations
33
+ - `-s` (save): Save outputs to `.claude/output/apex/`
34
+ - `-x` (examine): Include adversarial code review
35
+ - `-t` (test): Create and run tests
36
+ - `-e` (economy): No subagents, direct tool usage
37
+
38
+ See `<parameters>` for complete flag list.
39
+ </quick_start>
40
+
41
+ <parameters>
42
+
43
+ <flags>
44
+ **Enable flags (turn ON):**
45
+ | Short | Long | Description |
46
+ |-------|------|-------------|
47
+ | `-a` | `--auto` | Autonomous mode: skip confirmations, auto-approve plans |
48
+ | `-x` | `--examine` | Auto-examine mode: proceed to adversarial review |
49
+ | `-s` | `--save` | Save mode: output each step to `.claude/output/apex/` |
50
+ | `-t` | `--test` | Test mode: include test creation and runner steps |
51
+ | `-e` | `--economy` | Economy mode: no subagents, save tokens |
52
+ | `-r` | `--resume` | Resume mode: continue from a previous task |
53
+ | `-b` | `--branch` | Branch mode: verify not on main, create branch if needed |
54
+ | `-pr` | `--pull-request` | PR mode: create pull request at end (enables -b) |
55
+ | `-i` | `--interactive` | Interactive mode: configure flags via AskUserQuestion |
56
+
57
+ **Disable flags (turn OFF):**
58
+ | Short | Long | Description |
59
+ |-------|------|-------------|
60
+ | `-A` | `--no-auto` | Disable auto mode |
61
+ | `-X` | `--no-examine` | Disable examine mode |
62
+ | `-S` | `--no-save` | Disable save mode |
63
+ | `-T` | `--no-test` | Disable test mode |
64
+ | `-E` | `--no-economy` | Disable economy mode |
65
+ | `-B` | `--no-branch` | Disable branch mode |
66
+ | `-PR` | `--no-pull-request` | Disable PR mode |
67
+ </flags>
68
+
69
+ <examples>
70
+ ```bash
71
+ # Basic usage
72
+ /apex add auth middleware
73
+
74
+ # Autonomous mode (no confirmations)
75
+ /apex -a add auth middleware
76
+
77
+ # Save outputs for review
78
+ /apex -s add auth middleware
79
+
80
+ # With adversarial review
81
+ /apex -x add auth middleware
82
+
83
+ # Full autonomous with examine and save
84
+ /apex -a -x -s add auth middleware
85
+
86
+ # Include test creation and runner
87
+ /apex -t add auth middleware
88
+
89
+ # Resume a previous task
90
+ /apex -r 01-auth-middleware
91
+ /apex -r 01 # Partial match supported
92
+
93
+ # Combined flags
94
+ /apex -a -x -s -t add auth middleware
95
+
96
+ # Interactive mode (configure flags via menu)
97
+ /apex -i add auth middleware
98
+
99
+ # Economy mode (save tokens, no subagents)
100
+ /apex -e add auth middleware
101
+
102
+ # Branch mode (ensure not on main, create branch if needed)
103
+ /apex -b add auth middleware
104
+
105
+ # Create PR at end (automatically enables -b)
106
+ /apex -pr add auth middleware
107
+ /apex -a -pr add auth middleware # Auto + PR mode
108
+
109
+ # Full workflow: auto + examine + save + tests + PR
110
+ /apex -a -x -s -t -pr add auth middleware
111
+ ```
112
+ </examples>
113
+
114
+ <parsing_rules>
115
+ **Flag parsing:**
116
+
117
+ 1. Defaults loaded from `steps/step-00-init.md` `<defaults>` section
118
+ 2. Command-line flags override defaults
119
+ 3. Flags removed from input, remainder becomes `{task_description}`
120
+ 4. Task ID generated as `NN-kebab-case-description`
121
+ </parsing_rules>
122
+
123
+ </parameters>
124
+
125
+ <output_structure>
126
+ **When `{save_mode}` = true:**
127
+
128
+ All outputs saved to PROJECT directory:
129
+ ```
130
+ .claude/output/apex/{task-id}/
131
+ ├── 00-context.md # Params, user request, timestamp
132
+ ├── 01-analyze.md # Analysis findings
133
+ ├── 02-plan.md # Implementation plan
134
+ ├── 03-execute.md # Execution log
135
+ ├── 04-validate.md # Validation results
136
+ ├── 05-examine.md # Review findings (if -x)
137
+ ├── 06-resolve.md # Resolution log (if -x)
138
+ ├── 07-tests.md # Test creation (if -t)
139
+ ├── 08-run-tests.md # Test runner log (if -t)
140
+ └── 09-finish.md # PR creation (if -pr)
141
+ ```
142
+ </output_structure>
143
+
144
+ <resume_workflow>
145
+ **Resume mode (`-r {task-id}`):**
146
+
147
+ When provided, step-00 will:
148
+
149
+ 1. Locate the task folder in `.claude/output/apex/`
150
+ 2. Read `00-context.md` to restore state
151
+ 3. Find the last completed step
152
+ 4. Continue from the next step
153
+ </resume_workflow>
154
+
155
+ <workflow>
156
+ **Standard flow:**
157
+ 1. Parse flags and task description
158
+ 2. If `-r`: Execute resume workflow
159
+ 3. If `-s`: Create output folder and 00-context.md
160
+ 4. Load step-01-analyze.md -> gather context
161
+ 5. Load step-02-plan.md -> create strategy
162
+ 6. Load step-03-execute.md -> implement
163
+ 7. Load step-04-validate.md -> verify
164
+ 8. If `--test`: Load step-07-tests.md -> create tests
165
+ 9. If `--test`: Load step-08-run-tests.md -> run until green
166
+ 10. If `-x` or user requests: Load step-05-examine.md -> adversarial review
167
+ 11. If findings: Load step-06-resolve.md -> fix findings
168
+ 12. If `-pr`: Load step-09-finish.md -> create pull request
169
+ </workflow>
170
+
171
+ <state_variables>
172
+ **Persist throughout all steps:**
173
+
174
+ | Variable | Type | Description |
175
+ | ----------------------- | ------- | ------------------------------------------------------ |
176
+ | `{task_description}` | string | What to implement (flags removed) |
177
+ | `{feature_name}` | string | Kebab-case name (e.g., `add-auth-middleware`) |
178
+ | `{task_id}` | string | Full identifier (e.g., `01-add-auth-middleware`) |
179
+ | `{acceptance_criteria}` | list | Success criteria (inferred or explicit) |
180
+ | `{auto_mode}` | boolean | Skip confirmations |
181
+ | `{examine_mode}` | boolean | Auto-proceed to adversarial review |
182
+ | `{save_mode}` | boolean | Save outputs to .claude/output/apex/ |
183
+ | `{test_mode}` | boolean | Include test steps (07-08) |
184
+ | `{economy_mode}` | boolean | No subagents, direct tool usage only |
185
+ | `{branch_mode}` | boolean | Verify not on main, create branch if needed |
186
+ | `{pr_mode}` | boolean | Create pull request at end |
187
+ | `{interactive_mode}` | boolean | Configure flags interactively |
188
+ | `{resume_task}` | string | Task ID to resume (if -r provided) |
189
+ | `{output_dir}` | string | Full path to output directory |
190
+ | `{branch_name}` | string | Created branch name (if branch_mode) |
191
+
192
+ </state_variables>
193
+
194
+ <entry_point>
195
+
196
+ **FIRST ACTION:** Load `steps/step-00-init.md`
197
+
198
+ </entry_point>
199
+
200
+ <step_files>
201
+ **Progressive loading - only load current step:**
202
+
203
+ | Step | File | Purpose |
204
+ | ---- | ---------------------------- | ---------------------------------------------------- |
205
+ | 00 | `steps/step-00-init.md` | Parse flags, create output folder, initialize state |
206
+ | 01 | `steps/step-01-analyze.md` | Pure context gathering (what exists, not what to do) |
207
+ | 02 | `steps/step-02-plan.md` | File-by-file implementation strategy |
208
+ | 03 | `steps/step-03-execute.md` | Todo-driven implementation |
209
+ | 04 | `steps/step-04-validate.md` | Self-check and validation |
210
+ | 05 | `steps/step-05-examine.md` | Adversarial code review (optional) |
211
+ | 06 | `steps/step-06-resolve.md` | Finding resolution (optional) |
212
+ | 07 | `steps/step-07-tests.md` | Test analysis and creation (if --test) |
213
+ | 08 | `steps/step-08-run-tests.md` | Test runner loop until green (if --test) |
214
+ | 09 | `steps/step-09-finish.md` | Create pull request (if --pull-request) |
215
+
216
+ </step_files>
217
+
218
+ <execution_rules>
219
+
220
+ - **Load one step at a time** - Only load the current step file
221
+ - **ULTRA THINK** before major decisions
222
+ - **Persist state variables** across all steps
223
+ - **Follow next_step directive** at end of each step
224
+ - **Save outputs** if `{save_mode}` = true (write to step file)
225
+ - **Use parallel agents** for independent exploration tasks (unless economy_mode)
226
+ </execution_rules>
227
+
228
+ <success_criteria>
229
+
230
+ - Each step loaded progressively
231
+ - All validation checks passing
232
+ - Outputs saved if `{save_mode}` enabled
233
+ - Tests passing if `{test_mode}` enabled
234
+ - Clear completion summary provided
235
+ </success_criteria>