@atlashub/smartstack-cli 1.13.2 → 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
@@ -0,0 +1,53 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "repository": {
4
+ "name": "",
5
+ "defaultBranch": "main",
6
+ "remoteUrl": ""
7
+ },
8
+ "git": {
9
+ "provider": "github",
10
+ "branches": {
11
+ "main": "main",
12
+ "develop": "develop"
13
+ },
14
+ "prefixes": {
15
+ "feature": "feature/",
16
+ "release": "release/",
17
+ "hotfix": "hotfix/"
18
+ }
19
+ },
20
+ "worktrees": {
21
+ "enabled": true,
22
+ "mode": "organized",
23
+ "structure": {
24
+ "features": "../features",
25
+ "releases": "../releases",
26
+ "hotfixes": "../hotfixes"
27
+ }
28
+ },
29
+ "versioning": {
30
+ "strategy": "semver",
31
+ "current": "0.1.0",
32
+ "tagPrefix": "v",
33
+ "sources": ["csproj", "package.json", "VERSION"]
34
+ },
35
+ "efcore": {
36
+ "enabled": true,
37
+ "validateOnCommit": true,
38
+ "blockDestructive": true,
39
+ "migrationNaming": "{context}_v{version}_{sequence}_{Description}"
40
+ },
41
+ "workflow": {
42
+ "push": {
43
+ "afterCommit": "worktree"
44
+ },
45
+ "pr": {
46
+ "autoLabels": true,
47
+ "requireReview": true
48
+ }
49
+ },
50
+ "language": {
51
+ "code": "en"
52
+ }
53
+ }
@@ -1,29 +1,29 @@
1
1
  ---
2
2
  name: notification
3
3
  description: |
4
- Integre le systeme de notifications SmartStack dans le developpement.
5
- Utiliser ce skill quand:
6
- - L'utilisateur veut envoyer des notifications depuis une feature
7
- - L'utilisateur mentionne "notifier", "alerte", "notification", "in-app"
8
- - Creation d'un module qui necessite des notifications utilisateur
9
- - Integration SignalR pour real-time
10
- Types: In-App, Email (via Workflow), Push (futur)
4
+ Integrates SmartStack notification system into development.
5
+ Use this skill when:
6
+ - User wants to send notifications from a feature
7
+ - User mentions "notify", "alert", "notification", "in-app"
8
+ - Creating a module that requires user notifications
9
+ - SignalR integration for real-time
10
+ Types: In-App, Email (via Workflow), Push (future)
11
11
  ---
12
12
 
13
13
  # Skill Notification SmartStack
14
14
 
15
15
  > **Architecture:** In-App (DB + SignalR) + Email (via Workflows)
16
16
 
17
- **Référence:** [_shared.md](../_shared.md) pour services communs
17
+ **Reference:** [_shared.md](../_shared.md) for common services
18
18
 
19
- ## QUAND CE SKILL S'ACTIVE
19
+ ## WHEN THIS SKILL ACTIVATES
20
20
 
21
- | Declencheur | Exemple |
22
- |-------------|---------|
23
- | Demande explicite | "Notifie l'utilisateur quand un ticket est cree" |
24
- | Event-driven | "Quand le SLA expire, prevenir l'utilisateur" |
25
- | Real-time | "Afficher en temps reel les nouvelles notifications" |
26
- | Mots-cles | "notifier", "alerte", "SignalR", "real-time" |
21
+ | Trigger | Example |
22
+ |---------|---------|
23
+ | Explicit request | "Notify the user when a ticket is created" |
24
+ | Event-driven | "When SLA expires, alert the user" |
25
+ | Real-time | "Display new notifications in real-time" |
26
+ | Keywords | "notify", "alert", "SignalR", "real-time" |
27
27
 
28
28
  ## FLOW
29
29
 
@@ -35,7 +35,7 @@ DB (store) + SignalR Hub (real-time)
35
35
  Frontend: useSignalR() → NotificationBell
36
36
  ```
37
37
 
38
- ## TYPES DE NOTIFICATION
38
+ ## NOTIFICATION TYPES
39
39
 
40
40
  | Type | Usage |
41
41
  |------|-------|
@@ -44,46 +44,46 @@ Frontend: useSignalR() → NotificationBell
44
44
  | `SystemAnnouncement` | Global |
45
45
  | `SlaWarning/ResponseBreached/ResolutionBreached` | SLA |
46
46
 
47
- ### Ajouter un Nouveau Type
47
+ ### Add a New Type
48
48
  ```csharp
49
49
  // 1. Domain/Support/Enums/NotificationType.cs
50
50
  public enum NotificationType { ..., $NEW_TYPE = XX }
51
51
 
52
- // 2. Utilisation
52
+ // 2. Usage
53
53
  await _notificationService.SendNotificationAsync(userId, NotificationType.$NEW_TYPE, title, message,
54
54
  relatedEntityType: "Entity", relatedEntityId: id, actionUrl: "/path");
55
55
  ```
56
56
 
57
57
  ## WORKFLOW INTEGRATION
58
58
 
59
- ### 1. Identifier le Besoin
59
+ ### 1. Identify the Need
60
60
  | Question | Action |
61
61
  |----------|--------|
62
- | Real-time ? | → In-App + SignalR |
63
- | Email ? | → Workflow + EmailTemplate |
64
- | Entite liee ? | → relatedEntityType/Id |
65
- | Navigation ? | → actionUrl |
62
+ | Real-time? | → In-App + SignalR |
63
+ | Email? | → Workflow + EmailTemplate |
64
+ | Related entity? | → relatedEntityType/Id |
65
+ | Navigation? | → actionUrl |
66
66
 
67
- ### 2. Envoi de Notification
67
+ ### 2. Send Notification
68
68
  ```csharp
69
69
  // Simple
70
70
  await _notificationService.SendNotificationAsync(userId, NotificationType.TicketCreated,
71
- "Nouveau ticket", $"Ticket #{ticket.Number} cree", ct);
71
+ "New ticket", $"Ticket #{ticket.Number} created", ct);
72
72
 
73
- // Avec entite liee
73
+ // With related entity
74
74
  await _notificationService.SendNotificationAsync(userId, NotificationType.TicketAssigned,
75
- "Ticket assigne", message,
75
+ "Ticket assigned", message,
76
76
  relatedEntityType: "Ticket", relatedEntityId: ticket.Id,
77
77
  actionUrl: $"/support/tickets/{ticket.Id}", ct);
78
78
 
79
- // Multi-utilisateurs
79
+ // Multi-user
80
80
  await _notificationService.SendNotificationsAsync(userIds, type, title, message, ct);
81
81
 
82
- // Par role
82
+ // By role
83
83
  await _notificationService.SendNotificationToRoleAsync("Admin", type, title, message, ct);
84
84
  ```
85
85
 
86
- ### 3. Preferences Utilisateur
86
+ ### 3. User Preferences
87
87
  ```csharp
88
88
  var (shouldEmail, shouldInApp, shouldPush) = await _notificationService.ShouldNotifyAsync(userId, type);
89
89
  if (shouldInApp) await _notificationService.SendNotificationAsync(...);
@@ -112,12 +112,12 @@ notificationsApi.delete(id) / deleteAll()
112
112
 
113
113
  ### NotificationBell Component
114
114
  ```tsx
115
- <NotificationBell /> // Gere useSignalR, badge unreadCount, dropdown
115
+ <NotificationBell /> // Manages useSignalR, badge unreadCount, dropdown
116
116
  ```
117
117
 
118
- ## PATTERNS AVANCES
118
+ ## ADVANCED PATTERNS
119
119
 
120
- ### SLA Warning (Job Hangfire)
120
+ ### SLA Warning (Hangfire Job)
121
121
  ```csharp
122
122
  var tickets = await _context.Tickets
123
123
  .Where(t => t.SlaDeadline <= DateTime.UtcNow.AddMinutes(30) && !t.SlaWarningNotificationSent)
@@ -128,39 +128,39 @@ foreach (var ticket in tickets) {
128
128
  }
129
129
  ```
130
130
 
131
- ### Notification Groupee
131
+ ### Grouped Notification
132
132
  ```csharp
133
133
  if (entities.Count == 1) await SendSingle(...);
134
- else await SendBatch($"{entities.Count} nouveaux elements", ...);
134
+ else await SendBatch($"{entities.Count} new elements", ...);
135
135
  ```
136
136
 
137
137
  ## CHECKLIST
138
138
 
139
139
  ```
140
- Type notification identifie (existant ou nouveau enum)
141
- □ INotificationService injecte
142
- Envoi avec: userId, type, title, message, relatedEntityType?, relatedEntityId?, actionUrl?
143
- □ Frontend: useSignalR configure, toast/UI sur reception
144
- Si email: workflow configure
140
+ Notification type identified (existing or new enum)
141
+ □ INotificationService injected
142
+ Send with: userId, type, title, message, relatedEntityType?, relatedEntityId?, actionUrl?
143
+ □ Frontend: useSignalR configured, toast/UI on receipt
144
+ If email: workflow configured
145
145
  ```
146
146
 
147
- ## REGLES ABSOLUES
147
+ ## ABSOLUTE RULES
148
148
 
149
149
  | DO | DON'T |
150
150
  |----|-------|
151
- | INotificationService | Acces DB direct |
152
- | NotificationType enum | Types hardcodes |
153
- | relatedEntityType/Id + actionUrl | Notifications sans contexte |
154
- | Respecter preferences utilisateur | Spam notifications |
155
- | CancellationToken | Messages hardcodes (utiliser i18n) |
151
+ | INotificationService | Direct DB access |
152
+ | NotificationType enum | Hardcoded types |
153
+ | relatedEntityType/Id + actionUrl | Notifications without context |
154
+ | Respect user preferences | Spam notifications |
155
+ | CancellationToken | Hardcoded messages (use i18n) |
156
156
 
157
- ## FICHIERS CLES
157
+ ## KEY FILES
158
158
 
159
- | Fichier | Role |
160
- |---------|------|
161
- | `Domain/Support/Notification.cs` | Entite |
159
+ | File | Role |
160
+ |------|------|
161
+ | `Domain/Support/Notification.cs` | Entity |
162
162
  | `Domain/Support/Enums/NotificationType.cs` | Types |
163
163
  | `Application/Common/Interfaces/INotificationService.cs` | Interface |
164
164
  | `Infrastructure/Services/SignalR/NotificationHubService.cs` | Real-time |
165
- | `web/src/hooks/useSignalR.ts` | Hook frontend |
165
+ | `web/src/hooks/useSignalR.ts` | Frontend hook |
166
166
  | `web/src/components/notifications/NotificationBell.tsx` | UI |
@@ -0,0 +1,228 @@
1
+ ---
2
+ name: ralph-loop
3
+ description: Iterative AI development loop with MCP validation, progress tracking, and completion promises.
4
+ argument-hint: "[-m N] [-c TEXT] [-v] <task description>"
5
+ ---
6
+
7
+ <objective>
8
+ Execute the Ralph Weegund technique - an iterative development methodology where the same prompt is fed repeatedly until completion. Uses progressive step loading with MCP validation and progress persistence.
9
+ </objective>
10
+
11
+ <quick_start>
12
+ **Basic usage:**
13
+
14
+ ```bash
15
+ /ralph-loop implement user authentication
16
+ ```
17
+
18
+ **With completion promise:**
19
+
20
+ ```bash
21
+ /ralph-loop -c "COMPLETE" refactor the cache layer
22
+ ```
23
+
24
+ **With max iterations:**
25
+
26
+ ```bash
27
+ /ralph-loop -m 20 -c "TESTS PASS" add comprehensive tests
28
+ ```
29
+
30
+ **Verbose mode:**
31
+
32
+ ```bash
33
+ /ralph-loop -v -c "DONE" fix all linting errors
34
+ ```
35
+
36
+ **Flags:**
37
+
38
+ - `-m N` (max): Maximum iterations before auto-stop
39
+ - `-c TEXT` (complete): Completion promise text
40
+ - `-v` (verbose): Detailed logging
41
+
42
+ See `<parameters>` for complete flag list.
43
+ </quick_start>
44
+
45
+ <parameters>
46
+
47
+ <flags>
48
+ **Flags:**
49
+ | Short | Long | Description |
50
+ |-------|------|-------------|
51
+ | `-m N` | `--max-iterations N` | Maximum iterations (default: 50) |
52
+ | `-c TEXT` | `--completion-promise TEXT` | Text that signals completion |
53
+ | `-v` | `--verbose` | Enable detailed logging |
54
+ | `-r` | `--resume` | Resume from previous state |
55
+ </flags>
56
+
57
+ <examples>
58
+ ```bash
59
+ # Basic loop
60
+ /ralph-loop implement feature X
61
+
62
+ # With completion signal
63
+ /ralph-loop -c "ALL TESTS PASS" fix failing tests
64
+
65
+ # Limited iterations with completion
66
+ /ralph-loop -m 10 -c "REFACTOR COMPLETE" clean up auth module
67
+
68
+ # Resume previous loop
69
+ /ralph-loop -r
70
+
71
+ # Verbose mode
72
+ /ralph-loop -v -m 25 -c "DONE" implement CRUD for products
73
+ ```
74
+ </examples>
75
+
76
+ <parsing_rules>
77
+ **Argument parsing:**
78
+
79
+ 1. `-m N` or `--max-iterations N` -> `{max_iterations}` = N
80
+ 2. `-c TEXT` or `--completion-promise TEXT` -> `{completion_promise}` = TEXT
81
+ 3. `-v` or `--verbose` -> `{verbose_mode}` = true
82
+ 4. `-r` or `--resume` -> `{resume_mode}` = true
83
+ 5. Remainder -> `{task_description}`
84
+ </parsing_rules>
85
+
86
+ </parameters>
87
+
88
+ <ralph_concept>
89
+ **Core concept:**
90
+
91
+ The same prompt is fed to Claude repeatedly. The "self-referential" aspect comes from Claude seeing its own previous work in files and git history.
92
+
93
+ **Each iteration:**
94
+ 1. Claude receives the SAME prompt
95
+ 2. Works on the task, modifying files
96
+ 3. Checks completion criteria
97
+ 4. If not complete: saves progress, iteration count increments
98
+ 5. Claude sees previous work in the files
99
+ 6. Iteratively improves until completion promise is output
100
+
101
+ **Completion signal:**
102
+ ```
103
+ <promise>{completion_promise}</promise>
104
+ ```
105
+
106
+ The loop only stops when this exact tag is output or max iterations reached.
107
+ </ralph_concept>
108
+
109
+ <workflow>
110
+ **Standard flow:**
111
+ 1. Parse flags and task description
112
+ 2. Verify MCP servers are available (MANDATORY)
113
+ 3. Initialize .ralph/ structure and state files
114
+ 4. Load current task from prd.json (or create initial tasks)
115
+ 5. Execute ONE task per iteration
116
+ 6. Commit changes, update progress
117
+ 7. Check completion criteria
118
+ 8. If complete: generate final report
119
+ </workflow>
120
+
121
+ <state_variables>
122
+ **Persist throughout all steps:**
123
+
124
+ | Variable | Type | Description |
125
+ |----------|------|-------------|
126
+ | `{task_description}` | string | The prompt/task to execute |
127
+ | `{max_iterations}` | number | Maximum iterations allowed |
128
+ | `{completion_promise}` | string | Text that signals completion |
129
+ | `{verbose_mode}` | boolean | Enable detailed logging |
130
+ | `{resume_mode}` | boolean | Resume from previous state |
131
+ | `{current_iteration}` | number | Current iteration count |
132
+ | `{tasks_completed}` | number | Number of tasks completed |
133
+ | `{tasks_total}` | number | Total tasks in prd.json |
134
+
135
+ </state_variables>
136
+
137
+ <mcp_requirements>
138
+ **MANDATORY MCP Validation:**
139
+
140
+ Before ANY work, verify MCP servers:
141
+
142
+ 1. **SmartStack MCP** - `mcp__smartstack__validate_conventions`
143
+ 2. **Context7 MCP** - `mcp__plugin_context7_context7__resolve-library-id`
144
+
145
+ **If ANY MCP unavailable:**
146
+ - DO NOT proceed
147
+ - Log failure to `.ralph/logs/`
148
+ - Output error message
149
+ - Suggest: `smartstack check-mcp`
150
+
151
+ **Throughout work, use:**
152
+ - `mcp__smartstack__validate_conventions` - Before commits
153
+ - `mcp__smartstack__check_migrations` - Before EF Core changes
154
+ - `mcp__smartstack__scaffold_extension` - For code generation
155
+ </mcp_requirements>
156
+
157
+ <entry_point>
158
+
159
+ **FIRST ACTION:** Load `steps/step-00-init.md`
160
+
161
+ </entry_point>
162
+
163
+ <step_files>
164
+ **Progressive loading - only load current step:**
165
+
166
+ | Step | File | Purpose |
167
+ |------|------|---------|
168
+ | 00 | `steps/step-00-init.md` | Parse args, verify MCP, initialize state |
169
+ | 01 | `steps/step-01-task.md` | Load current task from prd.json |
170
+ | 02 | `steps/step-02-execute.md` | Execute ONE task |
171
+ | 03 | `steps/step-03-commit.md` | Commit, update prd.json/progress.txt |
172
+ | 04 | `steps/step-04-check.md` | Check completion, decide next action |
173
+ | 05 | `steps/step-05-report.md` | Generate final report |
174
+
175
+ </step_files>
176
+
177
+ <file_structure>
178
+ **Ralph creates these files:**
179
+
180
+ ```
181
+ .ralph/
182
+ ├── prd.json # Task list with status
183
+ ├── progress.txt # Persistent memory between iterations
184
+ ├── logs/
185
+ │ └── {timestamp}.log
186
+ └── reports/
187
+ └── {feature-name}.md
188
+ ```
189
+
190
+ **prd.json structure:**
191
+ ```json
192
+ {
193
+ "feature": "{task_description}",
194
+ "created": "2024-01-01T00:00:00Z",
195
+ "max_iterations": 50,
196
+ "completion_promise": "COMPLETE",
197
+ "tasks": [
198
+ { "id": 1, "description": "Task 1", "passes": false },
199
+ { "id": 2, "description": "Task 2", "passes": false }
200
+ ]
201
+ }
202
+ ```
203
+ </file_structure>
204
+
205
+ <execution_rules>
206
+
207
+ - **Load one step at a time** - Only load the current step file
208
+ - **VERIFY MCP FIRST** - Never skip MCP validation
209
+ - **ONE TASK PER ITERATION** - Don't batch tasks
210
+ - **COMMIT AFTER EACH TASK** - Atomic progress
211
+ - **UPDATE progress.txt** - Persist learnings
212
+ - **NEVER fake completion** - Only output promise when truly done
213
+ </execution_rules>
214
+
215
+ <success_criteria>
216
+
217
+ - All tasks in prd.json have `passes: true`
218
+ - MCP validations pass
219
+ - Git commits atomic per task
220
+ - Completion promise output when genuinely complete
221
+ - Final report generated in `.ralph/reports/`
222
+ </success_criteria>
223
+
224
+ <available_commands>
225
+ **Related commands:**
226
+ - `/ralph-loop:cancel-ralph` - Cancel active loop
227
+ - `/ralph-loop:help` - Show documentation
228
+ </available_commands>
@@ -0,0 +1,201 @@
1
+ ---
2
+ name: step-00-init
3
+ description: Initialize Ralph loop - parse args, verify MCP, setup state
4
+ next_step: steps/step-01-task.md
5
+ ---
6
+
7
+ # Step 0: Initialization
8
+
9
+ ## MANDATORY EXECUTION RULES:
10
+
11
+ - NEVER skip MCP verification
12
+ - ALWAYS parse ALL flags before any other action
13
+ - ONLY check for resume if -r flag is set
14
+ - YOU ARE AN INITIALIZER, not an executor
15
+ - FORBIDDEN to load step-01 until init is complete
16
+
17
+ ## YOUR TASK:
18
+
19
+ Initialize the Ralph loop by parsing flags, verifying MCP availability, and setting up the execution environment.
20
+
21
+ ---
22
+
23
+ <defaults>
24
+ ## Default Configuration
25
+
26
+ ```yaml
27
+ max_iterations: 50
28
+ completion_promise: null
29
+ verbose_mode: false
30
+ resume_mode: false
31
+ current_iteration: 1
32
+ ```
33
+ </defaults>
34
+
35
+ ---
36
+
37
+ ## EXECUTION SEQUENCE:
38
+
39
+ ### 1. Parse Flags and Input
40
+
41
+ **Step 1: Load defaults from config above**
42
+
43
+ ```
44
+ {max_iterations} = 50
45
+ {completion_promise} = null
46
+ {verbose_mode} = false
47
+ {resume_mode} = false
48
+ {current_iteration} = 1
49
+ ```
50
+
51
+ **Step 2: Parse user input and override defaults:**
52
+
53
+ ```
54
+ Flags:
55
+ -m N or --max-iterations N -> {max_iterations} = N
56
+ -c TEXT or --completion-promise TEXT -> {completion_promise} = TEXT
57
+ -v or --verbose -> {verbose_mode} = true
58
+ -r or --resume -> {resume_mode} = true
59
+
60
+ Remainder -> {task_description}
61
+ ```
62
+
63
+ ### 2. Verify MCP Servers (MANDATORY)
64
+
65
+ **CRITICAL: Do NOT proceed without MCP verification!**
66
+
67
+ **Check SmartStack MCP:**
68
+ ```
69
+ mcp__smartstack__validate_conventions:
70
+ checks: ["all"]
71
+ (just to verify connectivity)
72
+ ```
73
+
74
+ **Check Context7 MCP:**
75
+ ```
76
+ mcp__plugin_context7_context7__resolve-library-id:
77
+ libraryName: "test"
78
+ query: "connectivity check"
79
+ (just to verify connectivity)
80
+ ```
81
+
82
+ **If ANY MCP fails:**
83
+ ```
84
+ ╔══════════════════════════════════════════════════════════════════╗
85
+ ║ ❌ MCP SERVER UNAVAILABLE ║
86
+ ╠══════════════════════════════════════════════════════════════════╣
87
+ ║ Server: {failed_server} ║
88
+ ║ Status: Connection failed ║
89
+ ╠══════════════════════════════════════════════════════════════════╣
90
+ ║ RALPH CANNOT PROCEED WITHOUT MCP ║
91
+ ║ ║
92
+ ║ Troubleshooting: ║
93
+ ║ 1. Run: smartstack check-mcp ║
94
+ ║ 2. Restart Claude Code ║
95
+ ║ 3. Check MCP server configuration ║
96
+ ╚══════════════════════════════════════════════════════════════════╝
97
+
98
+ STOP - Do not proceed.
99
+ ```
100
+
101
+ ### 3. Check Resume Mode
102
+
103
+ **If {resume_mode} = true:**
104
+
105
+ 1. Check for existing `.ralph/prd.json`
106
+ 2. If found:
107
+ - Read prd.json to restore state
108
+ - Read progress.txt for context
109
+ - Set {current_iteration} from state
110
+ - Continue to step-01
111
+ 3. If not found:
112
+ - Error: "No active Ralph loop to resume"
113
+ - Ask user to start new loop
114
+
115
+ ### 4. Initialize .ralph/ Structure
116
+
117
+ **Create directory structure:**
118
+
119
+ ```
120
+ .ralph/
121
+ ├── prd.json # Will be created in step-01
122
+ ├── progress.txt # Will be created in step-01
123
+ ├── logs/
124
+ └── reports/
125
+ ```
126
+
127
+ **Commands:**
128
+ ```bash
129
+ mkdir -p .ralph/logs
130
+ mkdir -p .ralph/reports
131
+ ```
132
+
133
+ ### 5. Validate Completion Promise
134
+
135
+ **If {completion_promise} is null:**
136
+
137
+ ```yaml
138
+ AskUserQuestion:
139
+ header: "Promise"
140
+ question: "What text should signal completion?"
141
+ options:
142
+ - label: "COMPLETE"
143
+ description: "Standard completion signal"
144
+ - label: "ALL TESTS PASS"
145
+ description: "For test-focused tasks"
146
+ - label: "DONE"
147
+ description: "Simple completion"
148
+ - label: "Custom..."
149
+ description: "Specify custom text"
150
+ ```
151
+
152
+ ### 6. Log Initialization
153
+
154
+ **If {verbose_mode} = true:**
155
+
156
+ Write to `.ralph/logs/{timestamp}.log`:
157
+ ```
158
+ [{timestamp}] RALPH LOOP INITIALIZED
159
+ Task: {task_description}
160
+ Max iterations: {max_iterations}
161
+ Completion promise: {completion_promise}
162
+ MCP Status: SmartStack ✅, Context7 ✅
163
+ ```
164
+
165
+ ### 7. Show Summary and Proceed
166
+
167
+ **Always show COMPACT summary:**
168
+
169
+ ```
170
+ ╔══════════════════════════════════════════════════════════════════╗
171
+ ║ RALPH LOOP INITIALIZED ║
172
+ ╠══════════════════════════════════════════════════════════════════╣
173
+ ║ Task: {task_description} ║
174
+ ║ Max iterations: {max_iterations} ║
175
+ ║ Completion: <promise>{completion_promise}</promise> ║
176
+ ║ MCP: ✅ Ready ║
177
+ ╠══════════════════════════════════════════════════════════════════╣
178
+ ║ Files: ║
179
+ ║ - .ralph/prd.json (tasks) ║
180
+ ║ - .ralph/progress.txt (memory) ║
181
+ ╚══════════════════════════════════════════════════════════════════╝
182
+
183
+ -> Loading tasks...
184
+ ```
185
+
186
+ **Then proceed directly to step-01-task.md**
187
+
188
+ ---
189
+
190
+ ## SUCCESS METRICS:
191
+
192
+ - All flags correctly parsed
193
+ - MCP servers verified and available
194
+ - .ralph/ directory structure created
195
+ - Completion promise defined
196
+ - Output is COMPACT
197
+ - Proceeded to step-01 immediately after summary
198
+
199
+ ## NEXT STEP:
200
+
201
+ After showing initialization summary, always proceed directly to `./step-01-task.md`