@atlashub/smartstack-cli 1.33.0 → 1.35.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 (56) hide show
  1. package/.documentation/installation.html +60 -38
  2. package/dist/index.js +1098 -582
  3. package/dist/index.js.map +1 -1
  4. package/package.json +1 -1
  5. package/templates/agents/docs-context-reader.md +125 -0
  6. package/templates/agents/docs-sync-checker.md +122 -0
  7. package/templates/hooks/docs-drift-check.md +97 -0
  8. package/templates/skills/_resources/context-digest-template.md +53 -0
  9. package/templates/skills/_resources/doc-context-cache.md +62 -0
  10. package/templates/skills/_resources/docs-manifest-schema.md +157 -0
  11. package/templates/skills/_resources/mcp-validate-documentation-spec.md +183 -0
  12. package/templates/skills/_shared.md +8 -0
  13. package/templates/skills/apex/SKILL.md +6 -0
  14. package/templates/skills/apex/steps/step-00-init.md +9 -0
  15. package/templates/skills/apex/steps/step-01-analyze.md +36 -0
  16. package/templates/skills/apex/steps/step-02-plan.md +38 -0
  17. package/templates/skills/apex/steps/step-03-execute.md +39 -0
  18. package/templates/skills/apex/steps/step-04-validate.md +31 -1
  19. package/templates/skills/apex/steps/step-04b-doc-sync.md +162 -0
  20. package/templates/skills/apex/steps/step-05-examine.md +7 -0
  21. package/templates/skills/apex/templates/04b-doc-sync.md +31 -0
  22. package/templates/skills/apex/templates/context-digest.md +35 -0
  23. package/templates/skills/business-analyse/SKILL.md +18 -5
  24. package/templates/skills/business-analyse/_shared.md +306 -4
  25. package/templates/skills/business-analyse/questionnaire/01-context.md +21 -6
  26. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +34 -0
  27. package/templates/skills/business-analyse/questionnaire/03-scope.md +23 -0
  28. package/templates/skills/business-analyse/questionnaire/04-data.md +44 -0
  29. package/templates/skills/business-analyse/questionnaire/05-integrations.md +29 -7
  30. package/templates/skills/business-analyse/questionnaire/06-security.md +28 -0
  31. package/templates/skills/business-analyse/questionnaire/07-ui.md +32 -7
  32. package/templates/skills/business-analyse/questionnaire/08-performance.md +21 -0
  33. package/templates/skills/business-analyse/questionnaire/09-constraints.md +29 -6
  34. package/templates/skills/business-analyse/questionnaire/10-documentation.md +27 -6
  35. package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +59 -0
  36. package/templates/skills/business-analyse/questionnaire/12-migration.md +58 -0
  37. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +69 -0
  38. package/templates/skills/business-analyse/steps/step-00-init.md +110 -16
  39. package/templates/skills/business-analyse/steps/step-01-discover.md +530 -85
  40. package/templates/skills/business-analyse/steps/step-02-analyse.md +81 -25
  41. package/templates/skills/business-analyse/steps/step-03-specify.md +116 -24
  42. package/templates/skills/business-analyse/steps/step-04-validate.md +107 -33
  43. package/templates/skills/business-analyse/steps/step-05-handoff.md +256 -33
  44. package/templates/skills/business-analyse/steps/step-06-doc-html.md +84 -25
  45. package/templates/skills/business-analyse/templates/{frd-handoff.md → tpl-handoff.md} +18 -4
  46. package/templates/skills/business-analyse/templates-frd.md +19 -5
  47. package/templates/skills/business-analyse/tracking/change-template.md +30 -0
  48. package/templates/skills/documentation/SKILL.md +68 -31
  49. package/templates/skills/documentation/data-schema.md +198 -0
  50. package/templates/skills/documentation/templates.md +30 -1
  51. package/templates/skills/gitflow/steps/step-init.md +268 -20
  52. package/templates/skills/gitflow/templates/config.json +7 -0
  53. package/templates/skills/ralph-loop/SKILL.md +3 -0
  54. /package/templates/skills/business-analyse/templates/{frd-brd.md → tpl-brd.md} +0 -0
  55. /package/templates/skills/business-analyse/templates/{frd-discovery.md → tpl-discovery.md} +0 -0
  56. /package/templates/skills/business-analyse/templates/{frd-spec.md → tpl-frd.md} +0 -0
@@ -16,7 +16,8 @@ Set up GitFlow configuration with bare repository, worktrees, and branches.
16
16
 
17
17
  ## MANDATORY QUESTIONS
18
18
 
19
- **⛔ ALWAYS ask these 3 questions, even if values can be auto-detected:**
19
+ **⛔ ALWAYS ask these 3 questions, even if values can be auto-detected.**
20
+ **⛔ ALWAYS detect workspace context (step 2) to show sibling projects.**
20
21
 
21
22
  | Question | Variable | Auto-detect from |
22
23
  |----------|----------|------------------|
@@ -24,6 +25,10 @@ Set up GitFlow configuration with bare repository, worktrees, and branches.
24
25
  | Root folder | `{ROOT_FOLDER}` | Parent of current directory |
25
26
  | Project name | `{PROJECT_NAME}` | Repo name from URL or folder |
26
27
 
28
+ **Multi-project principle:** Each repository has its OWN independent GitFlow config. Step 2 scans for sibling projects to provide context, not to share configuration.
29
+
30
+ **⛔ FOLLOW-UP RULE:** When a user selects a "Custom..." option (custom name, custom path, custom URL), that selection is just a CHOICE, not the actual value. You MUST immediately ask a follow-up question to capture the actual value. Never proceed with a blank or default value.
31
+
27
32
  ---
28
33
 
29
34
  ## EXECUTION SEQUENCE:
@@ -52,7 +57,51 @@ fi
52
57
  ALREADY_INITIALIZED=$([ -f ".claude/gitflow/config.json" ] && echo "true" || echo "false")
53
58
  ```
54
59
 
55
- ### 2. Handle Existing Configuration
60
+ ### 2. Detect Workspace (multi-project context)
61
+
62
+ **Scan the parent directory for sibling projects already using GitFlow:**
63
+
64
+ ```bash
65
+ WORKSPACE_DIR=$(dirname "$(pwd)")
66
+ SIBLING_PROJECTS=()
67
+
68
+ for dir in "$WORKSPACE_DIR"/*/; do
69
+ [ -d "$dir/.bare" ] || [ -d "$dir/01-Main" ] || [ -d "$dir/02-Develop" ] && {
70
+ PROJECT_NAME_SIBLING=$(basename "$dir")
71
+ SIBLING_PROJECTS+=("$PROJECT_NAME_SIBLING")
72
+ }
73
+ done
74
+ ```
75
+
76
+ **Display workspace context:**
77
+
78
+ ```
79
+ ┌─────────────────────────────────────────────────────────────┐
80
+ │ WORKSPACE: {WORKSPACE_DIR} │
81
+ ├─────────────────────────────────────────────────────────────┤
82
+ │ Each project has its OWN independent GitFlow configuration. │
83
+ │ This init configures only: {DETECTED_NAME} │
84
+ ├─────────────────────────────────────────────────────────────┤
85
+ {if SIBLING_PROJECTS not empty}
86
+ │ Existing GitFlow projects: │
87
+ │ {for each SIBLING} ✅ {SIBLING_NAME}/ │
88
+ │ ├── .bare/ 01-Main/ 02-Develop/ │
89
+ │ └── features/ releases/ hotfixes/ │
90
+ │ {end for} │
91
+ │ │
92
+ │ New project to initialize: │
93
+ │ ⬜ {DETECTED_NAME}/ │
94
+ │ └── (same structure will be created) │
95
+ {else}
96
+ │ No existing GitFlow projects detected. │
97
+ │ This will be the first project in this workspace. │
98
+ {endif}
99
+ └─────────────────────────────────────────────────────────────┘
100
+ ```
101
+
102
+ **Key principle:** GitFlow is **per-repository**. Each project has its own `config.json`, its own worktree structure, and its own version history. Projects do not share configuration.
103
+
104
+ ### 3. Handle Existing Configuration
56
105
 
57
106
  **If `ALREADY_INITIALIZED` = true:**
58
107
 
@@ -75,12 +124,12 @@ AskUserQuestion:
75
124
  ```
76
125
 
77
126
  **Handle choices:**
78
- - **Reconfigure**: Continue to step 3 (will ask all questions again)
127
+ - **Reconfigure**: Continue to step 4 (will ask all questions again)
79
128
  - **Repair**: Check directories, fix missing ones, exit
80
129
  - **View only**: Display config, exit
81
130
  - **Cancel**: Exit immediately
82
131
 
83
- ### 3. MANDATORY: Ask Repository URL
132
+ ### 4. MANDATORY: Ask Repository URL
84
133
 
85
134
  **⛔ ALWAYS ask, even if URL was detected:**
86
135
 
@@ -100,34 +149,83 @@ AskUserQuestion:
100
149
  multiSelect: false
101
150
  ```
102
151
 
103
- **If user selects "Enter GitHub URL" or "Enter Azure DevOps URL":**
104
- - Capture URL via "Other" input
152
+ **⛔ FOLLOW-UP: If user selects "Enter GitHub URL" or "Enter Azure DevOps URL":**
153
+
154
+ The selected option is just a choice, NOT the actual URL. You MUST ask a follow-up question:
155
+
156
+ ```yaml
157
+ AskUserQuestion:
158
+ - header: "URL"
159
+ question: "Enter the repository URL:"
160
+ options:
161
+ - label: "https://github.com/org/repo.git"
162
+ description: "Example GitHub format"
163
+ - label: "https://dev.azure.com/org/project/_git/repo"
164
+ description: "Example Azure DevOps format"
165
+ multiSelect: false
166
+ ```
167
+
168
+ The user will type the actual URL via "Other". Then:
105
169
  - Validate format
106
170
  - Update `{REPO_URL}` and `{GIT_PROVIDER}`
107
171
 
108
- ### 4. MANDATORY: Ask Root Folder
172
+ ### 5. MANDATORY: Ask Root Folder
173
+
174
+ **⛔ ALWAYS ask where to create THIS project's structure:**
175
+
176
+ **If sibling projects exist, show where it fits:**
109
177
 
110
- **⛔ ALWAYS ask where to create the project structure:**
178
+ ```
179
+ {WORKSPACE_DIR}/
180
+ ├── SmartStack.app/ ✅ (gitflow)
181
+ ├── SmartStack.mcp/ ✅ (gitflow)
182
+ ├── SmartStack.cli/ ✅ (gitflow)
183
+ └── NewProject/ ← THIS PROJECT
184
+ ├── .bare/
185
+ ├── 01-Main/
186
+ ├── 02-Develop/
187
+ ├── features/
188
+ ├── releases/
189
+ └── hotfixes/
190
+ ```
111
191
 
112
192
  ```yaml
113
193
  AskUserQuestion:
114
194
  - header: "Location"
115
- question: "Root folder for project? (All worktrees will be created here)"
195
+ question: "Root folder for THIS project? (worktrees will be created here)"
116
196
  options:
117
197
  - label: "Use parent folder (Recommended)"
118
- description: "{DETECTED_FOLDER}/"
198
+ description: "{DETECTED_FOLDER}/ - consistent with {#SIBLING_PROJECTS} sibling project(s)"
119
199
  - label: "Use current folder"
120
200
  description: "$(pwd)/ - Will create subfolders here"
121
- - label: "Enter custom path"
201
+ - label: "Custom path"
122
202
  description: "Specify a different location"
123
203
  multiSelect: false
124
204
  ```
125
205
 
126
- **Explain the structure that will be created:**
206
+ **⛔ FOLLOW-UP: If user selects "Custom path":**
207
+
208
+ You MUST ask a follow-up question to get the actual path:
209
+
210
+ ```yaml
211
+ AskUserQuestion:
212
+ - header: "Path"
213
+ question: "Enter the full path for the project root folder:"
214
+ options:
215
+ - label: "{DETECTED_FOLDER}/"
216
+ description: "Parent of current directory"
217
+ - label: "{WORKSPACE_DIR}/"
218
+ description: "Workspace root"
219
+ multiSelect: false
220
+ ```
221
+
222
+ The user will type the actual path via "Other". Validate the path exists or can be created.
223
+
224
+ **Explain the structure that will be created for this project:**
127
225
 
128
226
  ```
129
227
  {ROOT_FOLDER}/
130
- ├── .bare/ # Git bare repository
228
+ ├── .bare/ # Git bare repository (this repo only)
131
229
  ├── 01-Main/ # Worktree: main branch
132
230
  ├── 02-Develop/ # Worktree: develop branch
133
231
  ├── features/ # Feature branch worktrees
@@ -135,7 +233,7 @@ AskUserQuestion:
135
233
  └── hotfixes/ # Hotfix branch worktrees
136
234
  ```
137
235
 
138
- ### 5. MANDATORY: Ask Project Name
236
+ ### 6. MANDATORY: Ask Project Name
139
237
 
140
238
  **⛔ ALWAYS ask to confirm project name:**
141
239
 
@@ -146,12 +244,150 @@ AskUserQuestion:
146
244
  options:
147
245
  - label: "Use detected name (Recommended)"
148
246
  description: "Project: {DETECTED_NAME}"
149
- - label: "Enter custom name"
247
+ - label: "Custom name"
150
248
  description: "Specify a different project name"
151
249
  multiSelect: false
152
250
  ```
153
251
 
154
- ### 6. Ask Worktree Mode
252
+ **⛔ FOLLOW-UP: If user selects "Custom name":**
253
+
254
+ You MUST ask a follow-up question to get the actual name:
255
+
256
+ ```yaml
257
+ AskUserQuestion:
258
+ - header: "Name"
259
+ question: "Enter the project name:"
260
+ options:
261
+ - label: "{DETECTED_NAME}"
262
+ description: "Detected from repository"
263
+ - label: "{DETECTED_NAME}-v2"
264
+ description: "Variant of detected name"
265
+ multiSelect: false
266
+ ```
267
+
268
+ The user will type the actual name via "Other". Use this raw input for step 6b.
269
+
270
+ ### 6b. Normalize Project Name (INTELLIGENT)
271
+
272
+ **⛔ ALWAYS normalize, even if user chose the detected name.**
273
+
274
+ **Step 1: Parse input into words**
275
+
276
+ Split the raw input on any separator: spaces, hyphens, underscores, dots, camelCase boundaries.
277
+
278
+ | Raw input | Parsed words |
279
+ |-----------|-------------|
280
+ | `mon super projet` | `["mon", "super", "projet"]` |
281
+ | `gestion-des-stocks` | `["gestion", "des", "stocks"]` |
282
+ | `my_awesome_app` | `["my", "awesome", "app"]` |
283
+ | `SmartStack.App` | `["Smart", "Stack", "App"]` |
284
+ | `userManagement` | `["user", "Management"]` |
285
+
286
+ **Step 2: Language detection and spell check**
287
+
288
+ For EACH word, you MUST:
289
+ 1. **Detect the language** (French, English, or technical/proper noun)
290
+ 2. **Check spelling** - flag obvious typos
291
+ 3. **Suggest corrections** if misspelled
292
+
293
+ | Word | Language | Spelling | Suggestion |
294
+ |------|----------|----------|------------|
295
+ | `gestion` | FR | ✅ | - |
296
+ | `gestoin` | FR | ❌ typo | → `gestion` |
297
+ | `managment` | EN | ❌ typo | → `management` |
298
+ | `SmartStack` | Proper noun | ✅ | - |
299
+ | `auth` | EN (abbreviation) | ✅ | - |
300
+
301
+ **If typos detected**, ask the user BEFORE generating variants:
302
+
303
+ ```yaml
304
+ AskUserQuestion:
305
+ - header: "Spelling"
306
+ question: "Corrections detected. Accept?"
307
+ options:
308
+ - label: "Accept corrections (Recommended)"
309
+ description: "'gestoin' → 'gestion', 'managment' → 'management'"
310
+ - label: "Keep original"
311
+ description: "Use the name as typed"
312
+ multiSelect: false
313
+ ```
314
+
315
+ **Step 3: Generate all name variants**
316
+
317
+ From the cleaned words, generate ALL variants:
318
+
319
+ ```
320
+ ┌─────────────────────────────────────────────────────────────┐
321
+ │ PROJECT NAME VARIANTS │
322
+ │ Input: "gestion des stocks" │
323
+ ├─────────────────────────────────────────────────────────────┤
324
+ │ │
325
+ │ A) PascalCase.Dot → Gestion.Des.Stocks │
326
+ │ Best for: .NET namespace, C# project, folder name │
327
+ │ │
328
+ │ B) PascalCase → GestionDesStocks │
329
+ │ Best for: Class name, assembly name │
330
+ │ │
331
+ │ C) kebab-case → gestion-des-stocks │
332
+ │ Best for: Git repo, npm package, URL slug │
333
+ │ │
334
+ │ D) snake_case → gestion_des_stocks │
335
+ │ Best for: Database, Python, file system │
336
+ │ │
337
+ └─────────────────────────────────────────────────────────────┘
338
+ ```
339
+
340
+ **Step 4: Ask user to choose the PRIMARY format**
341
+
342
+ ```yaml
343
+ AskUserQuestion:
344
+ - header: "Format"
345
+ question: "Which format for the project name?"
346
+ options:
347
+ - label: "PascalCase.Dot (Recommended)"
348
+ description: "{PascalCase.Dot variant} - .NET convention"
349
+ - label: "PascalCase"
350
+ description: "{PascalCase variant} - single word"
351
+ - label: "kebab-case"
352
+ description: "{kebab-case variant} - git/npm convention"
353
+ - label: "snake_case"
354
+ description: "{snake_case variant} - database/python convention"
355
+ multiSelect: false
356
+ ```
357
+
358
+ **Step 5: Store all derived names**
359
+
360
+ Regardless of the chosen primary format, ALL variants are generated and stored:
361
+
362
+ ```json
363
+ {
364
+ "PROJECT_NAME": "{chosen format}",
365
+ "PROJECT_VARIANTS": {
366
+ "pascalCaseDot": "Gestion.Des.Stocks",
367
+ "pascalCase": "GestionDesStocks",
368
+ "kebabCase": "gestion-des-stocks",
369
+ "snakeCase": "gestion_des_stocks",
370
+ "displayName": "Gestion Des Stocks",
371
+ "words": ["gestion", "des", "stocks"],
372
+ "language": "fr"
373
+ }
374
+ }
375
+ ```
376
+
377
+ These variants are available for subsequent steps (repo name, namespace, folder, etc.).
378
+
379
+ **Real-world examples:**
380
+
381
+ | User types | PascalCase.Dot | kebab-case | PascalCase |
382
+ |-----------|---------------|------------|------------|
383
+ | `smart stack app` | `SmartStack.App` | `smart-stack-app` | `SmartStackApp` |
384
+ | `gestion-des-stocks` | `Gestion.Des.Stocks` | `gestion-des-stocks` | `GestionDesStocks` |
385
+ | `Mon Projet V2` | `Mon.Projet.V2` | `mon-projet-v2` | `MonProjetV2` |
386
+ | `user auth module` | `User.Auth.Module` | `user-auth-module` | `UserAuthModule` |
387
+ | `PROJET TEST` | `Projet.Test` | `projet-test` | `ProjetTest` |
388
+ | `e-commerce platform` | `ECommerce.Platform` | `e-commerce-platform` | `ECommercePlatform` |
389
+
390
+ ### 7. Ask Worktree Mode
155
391
 
156
392
  ```yaml
157
393
  AskUserQuestion:
@@ -167,7 +403,7 @@ AskUserQuestion:
167
403
  multiSelect: false
168
404
  ```
169
405
 
170
- ### 7. Create Directory Structure
406
+ ### 8. Create Directory Structure
171
407
 
172
408
  **⛔ Create the COMPLETE structure:**
173
409
 
@@ -207,7 +443,7 @@ DEVELOP_PATH=$([ "$WORKTREE_MODE" = "organized" ] && echo "02-Develop" || echo "
207
443
  mkdir -p "$DEVELOP_PATH/.claude/gitflow/{plans,logs,cache,backup}"
208
444
  ```
209
445
 
210
- ### 8. Create Configuration
446
+ ### 9. Create Configuration
211
447
 
212
448
  **Write `.claude/gitflow/config.json` in develop worktree:**
213
449
 
@@ -216,6 +452,13 @@ mkdir -p "$DEVELOP_PATH/.claude/gitflow/{plans,logs,cache,backup}"
216
452
  "version": "2.0.0",
217
453
  "repository": {
218
454
  "name": "{PROJECT_NAME}",
455
+ "nameVariants": {
456
+ "pascalCaseDot": "{PascalCase.Dot}",
457
+ "pascalCase": "{PascalCase}",
458
+ "kebabCase": "{kebab-case}",
459
+ "snakeCase": "{snake_case}",
460
+ "displayName": "{Display Name}"
461
+ },
219
462
  "rootFolder": "{ROOT_FOLDER}",
220
463
  "remoteUrl": "{REPO_URL}"
221
464
  },
@@ -265,7 +508,7 @@ mkdir -p "$DEVELOP_PATH/.claude/gitflow/{plans,logs,cache,backup}"
265
508
  }
266
509
  ```
267
510
 
268
- ### 9. Detect Version
511
+ ### 10. Detect Version
269
512
 
270
513
  ```bash
271
514
  # In develop worktree
@@ -280,7 +523,7 @@ VERSION=$(grep -oP '<Version>\K[^<]+' *.csproj 2>/dev/null | head -1)
280
523
  [ -z "$VERSION" ] && VERSION="0.1.0"
281
524
  ```
282
525
 
283
- ### 10. Summary
526
+ ### 11. Summary
284
527
 
285
528
  ```
286
529
  ╔══════════════════════════════════════════════════════════════════╗
@@ -300,6 +543,11 @@ VERSION=$(grep -oP '<Version>\K[^<]+' *.csproj 2>/dev/null | head -1)
300
543
  ║ ├── releases/ (release worktrees) ✅ ║
301
544
  ║ └── hotfixes/ (hotfix worktrees) ✅ ║
302
545
  ╠══════════════════════════════════════════════════════════════════╣
546
+ {if SIBLING_PROJECTS not empty}
547
+ ║ Workspace: {WORKSPACE_DIR} ║
548
+ ║ GitFlow projects: {#SIBLING_PROJECTS + 1} (including this one) ║
549
+ ╠══════════════════════════════════════════════════════════════════╣
550
+ {endif}
303
551
  ║ Config: 02-Develop/.claude/gitflow/config.json ║
304
552
  ╠══════════════════════════════════════════════════════════════════╣
305
553
  ║ NEXT: cd 02-Develop && /gitflow -f <feature-name> ║
@@ -2,6 +2,13 @@
2
2
  "version": "2.0.0",
3
3
  "repository": {
4
4
  "name": "",
5
+ "nameVariants": {
6
+ "pascalCaseDot": "",
7
+ "pascalCase": "",
8
+ "kebabCase": "",
9
+ "snakeCase": "",
10
+ "displayName": ""
11
+ },
5
12
  "defaultBranch": "main",
6
13
  "remoteUrl": ""
7
14
  },
@@ -194,12 +194,15 @@ Before ANY work, verify MCP servers:
194
194
  "created": "2024-01-01T00:00:00Z",
195
195
  "max_iterations": 50,
196
196
  "completion_promise": "COMPLETE",
197
+ "source": null,
197
198
  "tasks": [
198
199
  { "id": 1, "description": "Task 1", "passes": false },
199
200
  { "id": 2, "description": "Task 2", "passes": false }
200
201
  ]
201
202
  }
202
203
  ```
204
+
205
+ > **`source` field:** Optional path to the BA handoff document that generated this task list (set by `/business-analyse` step-05). When present, Ralph Loop can reference the handoff for detailed specifications. `null` when tasks are created directly by Ralph Loop.
203
206
  </file_structure>
204
207
 
205
208
  <execution_rules>