@atlashub/smartstack-cli 1.34.0 → 1.36.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.
- package/.documentation/installation.html +56 -31
- package/dist/index.js +1098 -582
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/docs-context-reader.md +125 -0
- package/templates/agents/docs-sync-checker.md +122 -0
- package/templates/hooks/docs-drift-check.md +97 -0
- package/templates/skills/_resources/context-digest-template.md +53 -0
- package/templates/skills/_resources/doc-context-cache.md +62 -0
- package/templates/skills/_resources/docs-manifest-schema.md +157 -0
- package/templates/skills/_resources/mcp-validate-documentation-spec.md +183 -0
- package/templates/skills/_shared.md +15 -7
- package/templates/skills/apex/SKILL.md +6 -0
- package/templates/skills/apex/steps/step-00-init.md +9 -0
- package/templates/skills/apex/steps/step-01-analyze.md +36 -0
- package/templates/skills/apex/steps/step-02-plan.md +38 -0
- package/templates/skills/apex/steps/step-03-execute.md +39 -0
- package/templates/skills/apex/steps/step-04-validate.md +31 -1
- package/templates/skills/apex/steps/step-04b-doc-sync.md +162 -0
- package/templates/skills/apex/steps/step-05-examine.md +7 -0
- package/templates/skills/apex/templates/04b-doc-sync.md +31 -0
- package/templates/skills/apex/templates/context-digest.md +35 -0
- package/templates/skills/application/steps/step-04-backend.md +17 -17
- package/templates/skills/application/steps/step-05-frontend.md +4 -1
- package/templates/skills/application/templates-backend.md +8 -8
- package/templates/skills/application/templates-frontend.md +8 -8
- package/templates/skills/business-analyse/SKILL.md +18 -5
- package/templates/skills/business-analyse/_shared.md +306 -4
- package/templates/skills/business-analyse/questionnaire/01-context.md +21 -6
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +34 -0
- package/templates/skills/business-analyse/questionnaire/03-scope.md +23 -0
- package/templates/skills/business-analyse/questionnaire/04-data.md +44 -0
- package/templates/skills/business-analyse/questionnaire/05-integrations.md +29 -7
- package/templates/skills/business-analyse/questionnaire/06-security.md +28 -0
- package/templates/skills/business-analyse/questionnaire/07-ui.md +32 -7
- package/templates/skills/business-analyse/questionnaire/08-performance.md +21 -0
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +29 -6
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +27 -6
- package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +59 -0
- package/templates/skills/business-analyse/questionnaire/12-migration.md +58 -0
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +69 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +110 -16
- package/templates/skills/business-analyse/steps/step-01-discover.md +530 -85
- package/templates/skills/business-analyse/steps/step-02-analyse.md +81 -25
- package/templates/skills/business-analyse/steps/step-03-specify.md +116 -24
- package/templates/skills/business-analyse/steps/step-04-validate.md +107 -33
- package/templates/skills/business-analyse/steps/step-05-handoff.md +256 -33
- package/templates/skills/business-analyse/steps/step-06-doc-html.md +84 -25
- package/templates/skills/business-analyse/templates/{frd-handoff.md → tpl-handoff.md} +18 -4
- package/templates/skills/business-analyse/templates-frd.md +19 -5
- package/templates/skills/business-analyse/tracking/change-template.md +30 -0
- package/templates/skills/documentation/SKILL.md +68 -31
- package/templates/skills/documentation/data-schema.md +198 -0
- package/templates/skills/documentation/templates.md +30 -1
- package/templates/skills/gitflow/_shared.md +188 -53
- package/templates/skills/gitflow/phases/abort.md +28 -16
- package/templates/skills/gitflow/phases/cleanup.md +13 -9
- package/templates/skills/gitflow/phases/status.md +16 -17
- package/templates/skills/gitflow/steps/step-commit.md +11 -5
- package/templates/skills/gitflow/steps/step-finish.md +43 -33
- package/templates/skills/gitflow/steps/step-init.md +134 -2
- package/templates/skills/gitflow/steps/step-merge.md +24 -10
- package/templates/skills/gitflow/steps/step-pr.md +42 -28
- package/templates/skills/gitflow/steps/step-start.md +19 -13
- package/templates/skills/gitflow/templates/config.json +14 -4
- package/templates/skills/ralph-loop/SKILL.md +58 -9
- package/templates/skills/ralph-loop/steps/step-00-init.md +170 -30
- package/templates/skills/ralph-loop/steps/step-01-task.md +243 -40
- package/templates/skills/ralph-loop/steps/step-02-execute.md +142 -24
- package/templates/skills/ralph-loop/steps/step-03-commit.md +140 -36
- package/templates/skills/ralph-loop/steps/step-04-check.md +128 -44
- package/templates/skills/ralph-loop/steps/step-05-report.md +175 -88
- /package/templates/skills/business-analyse/templates/{frd-brd.md → tpl-brd.md} +0 -0
- /package/templates/skills/business-analyse/templates/{frd-discovery.md → tpl-discovery.md} +0 -0
- /package/templates/skills/business-analyse/templates/{frd-spec.md → tpl-frd.md} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Step 04b: Documentation Sync
|
|
2
|
+
|
|
3
|
+
**Task:** {{task_description}}
|
|
4
|
+
**Started:** {{timestamp}}
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Manifest Status
|
|
9
|
+
- **Found:** Yes | No
|
|
10
|
+
- **Modules in manifest:** {{count}}
|
|
11
|
+
|
|
12
|
+
## Affected Modules
|
|
13
|
+
|
|
14
|
+
| Module | Changed Files | Impacted Sections | Updated |
|
|
15
|
+
|--------|---------------|-------------------|---------|
|
|
16
|
+
|
|
17
|
+
## Documentation Updates
|
|
18
|
+
|
|
19
|
+
### Module: {{module_path}}
|
|
20
|
+
- **frd-data.ts:** Updated fields: {{fields}}
|
|
21
|
+
- **i18n FR:** {{updated|no_change}}
|
|
22
|
+
- **Manifest:** Status → synced
|
|
23
|
+
|
|
24
|
+
## Summary
|
|
25
|
+
|
|
26
|
+
- **Modules checked:** {{count}}
|
|
27
|
+
- **Modules updated:** {{count}}
|
|
28
|
+
- **Modules skipped:** {{count}} (no documentation)
|
|
29
|
+
- **Sections updated:** {{count}}
|
|
30
|
+
|
|
31
|
+
**Status:** Complete
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Context Digest Template
|
|
2
|
+
|
|
3
|
+
> This template defines the format for context digests generated between APEX steps.
|
|
4
|
+
> Each step produces a digest (max 50 lines) that replaces reading full output files.
|
|
5
|
+
|
|
6
|
+
## Digest Format
|
|
7
|
+
|
|
8
|
+
```markdown
|
|
9
|
+
# Digest: step-{NN}
|
|
10
|
+
|
|
11
|
+
## Changes ({count} files)
|
|
12
|
+
- `path/file.ts` - {brief description of what changed}
|
|
13
|
+
- `path/other.ts` - {brief description}
|
|
14
|
+
|
|
15
|
+
## Decisions
|
|
16
|
+
- {key architectural or implementation decision}
|
|
17
|
+
|
|
18
|
+
## Findings
|
|
19
|
+
- {issue or pattern identified}
|
|
20
|
+
|
|
21
|
+
## State Updates
|
|
22
|
+
- {variable}: {new_value}
|
|
23
|
+
|
|
24
|
+
## For Next Step
|
|
25
|
+
- {what the next step needs to know}
|
|
26
|
+
- {specific files to read if needed}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Rules
|
|
30
|
+
|
|
31
|
+
- **Max 50 lines** total
|
|
32
|
+
- **Paths only** for files (no content)
|
|
33
|
+
- **1 line per item** (no multi-line descriptions)
|
|
34
|
+
- **Skip empty sections** (if no decisions, omit Decisions)
|
|
35
|
+
- **Resume mode exception**: When resuming (`-r`), read full output files instead of digest
|
|
@@ -80,15 +80,15 @@ Args:
|
|
|
80
80
|
|
|
81
81
|
### 4. Parse MCP Response
|
|
82
82
|
|
|
83
|
-
The tool generates:
|
|
84
|
-
- `Domain/{EntityName}.cs` - Entity with BaseEntity
|
|
85
|
-
- `Infrastructure/Persistence/Configurations/{EntityName}Configuration.cs` - EF Config
|
|
86
|
-
- `Application/
|
|
87
|
-
- `
|
|
88
|
-
- `Api/Controllers/{EntityName}Controller.cs` - REST Controller
|
|
89
|
-
- `Application/DTOs/{EntityName}
|
|
90
|
-
- `Application/DTOs/Create{EntityName}Dto.cs` - Create request
|
|
91
|
-
- `Application/DTOs/Update{EntityName}Dto.cs` - Update request
|
|
83
|
+
The tool generates (paths organized by navRoute hierarchy `{context}.{application}.{module}`):
|
|
84
|
+
- `Domain/{Context}/{Application}/{Module}/{EntityName}.cs` - Entity with BaseEntity
|
|
85
|
+
- `Infrastructure/Persistence/Configurations/{Module}/{EntityName}Configuration.cs` - EF Config
|
|
86
|
+
- `Application/Common/Interfaces/I{EntityName}Service.cs` - Service Interface
|
|
87
|
+
- `Infrastructure/Services/{Module}/{EntityName}Service.cs` - Service Implementation
|
|
88
|
+
- `Api/Controllers/{Context}/{EntityName}Controller.cs` - REST Controller
|
|
89
|
+
- `Application/{Context}/{Application}/{Module}/DTOs/{EntityName}ResponseDto.cs` - Response DTO
|
|
90
|
+
- `Application/{Context}/{Application}/{Module}/DTOs/Create{EntityName}Dto.cs` - Create request
|
|
91
|
+
- `Application/{Context}/{Application}/{Module}/DTOs/Update{EntityName}Dto.cs` - Update request
|
|
92
92
|
|
|
93
93
|
### 5. Present Output to User
|
|
94
94
|
|
|
@@ -96,20 +96,20 @@ The tool generates:
|
|
|
96
96
|
## Backend Code Generated
|
|
97
97
|
|
|
98
98
|
### Domain Layer
|
|
99
|
-
- `Domain/{EntityName}.cs`
|
|
99
|
+
- `Domain/{Context}/{Application}/{Module}/{EntityName}.cs`
|
|
100
100
|
|
|
101
101
|
### Infrastructure Layer
|
|
102
|
-
- `Persistence/Configurations/{EntityName}Configuration.cs`
|
|
102
|
+
- `Persistence/Configurations/{Module}/{EntityName}Configuration.cs`
|
|
103
|
+
- `Services/{Module}/{EntityName}Service.cs`
|
|
103
104
|
|
|
104
105
|
### Application Layer
|
|
105
|
-
- `
|
|
106
|
-
- `
|
|
107
|
-
- `DTOs/{EntityName}Dto.cs`
|
|
108
|
-
- `DTOs/
|
|
109
|
-
- `DTOs/Update{EntityName}Dto.cs`
|
|
106
|
+
- `Common/Interfaces/I{EntityName}Service.cs`
|
|
107
|
+
- `{Context}/{Application}/{Module}/DTOs/{EntityName}ResponseDto.cs`
|
|
108
|
+
- `{Context}/{Application}/{Module}/DTOs/Create{EntityName}Dto.cs`
|
|
109
|
+
- `{Context}/{Application}/{Module}/DTOs/Update{EntityName}Dto.cs`
|
|
110
110
|
|
|
111
111
|
### API Layer
|
|
112
|
-
- `Controllers/{EntityName}Controller.cs`
|
|
112
|
+
- `Controllers/{Context}/{EntityName}Controller.cs`
|
|
113
113
|
- NavRoute: `{full_path}`
|
|
114
114
|
- Endpoints:
|
|
115
115
|
- GET /api/{code} - List all
|
|
@@ -129,9 +129,12 @@ Repeat for en, it, de with appropriate translations.
|
|
|
129
129
|
```markdown
|
|
130
130
|
## Frontend Code Generated
|
|
131
131
|
|
|
132
|
-
###
|
|
132
|
+
### Pages
|
|
133
133
|
- `pages/{context}/{application}/{module}/{EntityName}Page.tsx`
|
|
134
134
|
- `pages/{context}/{application}/{module}/{EntityName}ListView.tsx`
|
|
135
|
+
|
|
136
|
+
### Components
|
|
137
|
+
- `components/{context}/{module}/{EntityName}.tsx`
|
|
135
138
|
- `hooks/use{EntityName}.ts`
|
|
136
139
|
|
|
137
140
|
### API Client
|
|
@@ -49,7 +49,7 @@ public static class Erp
|
|
|
49
49
|
```csharp
|
|
50
50
|
// src/SmartStack.Application/Common/Interfaces/I{Module}Service.cs
|
|
51
51
|
|
|
52
|
-
using SmartStack.Application.$MODULE_PASCAL.
|
|
52
|
+
using SmartStack.Application.$CONTEXT_PASCAL.$APPLICATION_PASCAL.$MODULE_PASCAL.DTOs;
|
|
53
53
|
|
|
54
54
|
namespace SmartStack.Application.Common.Interfaces;
|
|
55
55
|
|
|
@@ -88,8 +88,8 @@ public interface I$MODULE_PASCALService
|
|
|
88
88
|
using Microsoft.EntityFrameworkCore;
|
|
89
89
|
using Microsoft.Extensions.Logging;
|
|
90
90
|
using SmartStack.Application.Common.Interfaces;
|
|
91
|
-
using SmartStack.Application.$MODULE_PASCAL.
|
|
92
|
-
using SmartStack.Domain.$MODULE_PASCAL;
|
|
91
|
+
using SmartStack.Application.$CONTEXT_PASCAL.$APPLICATION_PASCAL.$MODULE_PASCAL.DTOs;
|
|
92
|
+
using SmartStack.Domain.$CONTEXT_PASCAL.$APPLICATION_PASCAL.$MODULE_PASCAL;
|
|
93
93
|
|
|
94
94
|
namespace SmartStack.Infrastructure.Services.$MODULE_PASCAL;
|
|
95
95
|
|
|
@@ -269,9 +269,9 @@ public class $MODULE_PASCALService : I$MODULE_PASCALService
|
|
|
269
269
|
## TEMPLATE: DTOs
|
|
270
270
|
|
|
271
271
|
```csharp
|
|
272
|
-
// src/SmartStack.Application/$MODULE_PASCAL/
|
|
272
|
+
// src/SmartStack.Application/$CONTEXT_PASCAL/$APPLICATION_PASCAL/$MODULE_PASCAL/DTOs/$ENTITY_PASCALDto.cs
|
|
273
273
|
|
|
274
|
-
namespace SmartStack.Application.$MODULE_PASCAL.
|
|
274
|
+
namespace SmartStack.Application.$CONTEXT_PASCAL.$APPLICATION_PASCAL.$MODULE_PASCAL.DTOs;
|
|
275
275
|
|
|
276
276
|
public record $ENTITY_PASCALDto
|
|
277
277
|
{
|
|
@@ -310,11 +310,11 @@ public record $ENTITY_PASCALQueryParameters
|
|
|
310
310
|
## TEMPLATE: DOMAIN ENTITY
|
|
311
311
|
|
|
312
312
|
```csharp
|
|
313
|
-
// src/SmartStack.Domain/$MODULE_PASCAL/$ENTITY_PASCAL.cs
|
|
313
|
+
// src/SmartStack.Domain/$CONTEXT_PASCAL/$APPLICATION_PASCAL/$MODULE_PASCAL/$ENTITY_PASCAL.cs
|
|
314
314
|
|
|
315
315
|
using SmartStack.Domain.Common;
|
|
316
316
|
|
|
317
|
-
namespace SmartStack.Domain.$MODULE_PASCAL;
|
|
317
|
+
namespace SmartStack.Domain.$CONTEXT_PASCAL.$APPLICATION_PASCAL.$MODULE_PASCAL;
|
|
318
318
|
|
|
319
319
|
public class $ENTITY_PASCAL : BaseEntity
|
|
320
320
|
{
|
|
@@ -363,7 +363,7 @@ public class $ENTITY_PASCAL : BaseEntity
|
|
|
363
363
|
|
|
364
364
|
using Microsoft.EntityFrameworkCore;
|
|
365
365
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
366
|
-
using SmartStack.Domain.$MODULE_PASCAL;
|
|
366
|
+
using SmartStack.Domain.$CONTEXT_PASCAL.$APPLICATION_PASCAL.$MODULE_PASCAL;
|
|
367
367
|
|
|
368
368
|
namespace SmartStack.Infrastructure.Persistence.Configurations.$MODULE_PASCAL;
|
|
369
369
|
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
web/smartstack-web/src/
|
|
11
|
-
├── pages/$CONTEXT/$MODULE/
|
|
11
|
+
├── pages/$CONTEXT/$APPLICATION/$MODULE/
|
|
12
12
|
│ ├── $MODULE_PASCALPage.tsx # Main page (list)
|
|
13
13
|
│ ├── $MODULE_PASCALDetailPage.tsx # Detail page
|
|
14
14
|
│ └── Create$MODULE_PASCALPage.tsx # Create page
|
|
15
|
-
├── components/$MODULE/
|
|
15
|
+
├── components/$CONTEXT/$MODULE/
|
|
16
16
|
│ ├── $MODULE_PASCALListView.tsx # Reusable list component
|
|
17
17
|
│ ├── $MODULE_PASCALForm.tsx # CRUD form
|
|
18
18
|
│ └── $MODULE_PASCALFilters.tsx # Filters
|
|
@@ -35,10 +35,10 @@ web/smartstack-web/src/
|
|
|
35
35
|
## TEMPLATE: MAIN PAGE
|
|
36
36
|
|
|
37
37
|
```tsx
|
|
38
|
-
// pages/$CONTEXT/$MODULE/$MODULE_PASCALPage.tsx
|
|
38
|
+
// pages/$CONTEXT/$APPLICATION/$MODULE/$MODULE_PASCALPage.tsx
|
|
39
39
|
|
|
40
40
|
import { useTranslation } from 'react-i18next';
|
|
41
|
-
import { $MODULE_PASCALListView } from '@/components/$MODULE/$MODULE_PASCALListView';
|
|
41
|
+
import { $MODULE_PASCALListView } from '@/components/$CONTEXT/$MODULE/$MODULE_PASCALListView';
|
|
42
42
|
|
|
43
43
|
export function $MODULE_PASCALPage() {
|
|
44
44
|
const { t } = useTranslation(['$module', 'common']);
|
|
@@ -59,7 +59,7 @@ export function $MODULE_PASCALPage() {
|
|
|
59
59
|
## TEMPLATE: LIST VIEW (Reusable component)
|
|
60
60
|
|
|
61
61
|
```tsx
|
|
62
|
-
// components/$MODULE/$MODULE_PASCALListView.tsx
|
|
62
|
+
// components/$CONTEXT/$MODULE/$MODULE_PASCALListView.tsx
|
|
63
63
|
|
|
64
64
|
import { useState, useEffect } from 'react';
|
|
65
65
|
import { useNavigate } from 'react-router-dom';
|
|
@@ -491,9 +491,9 @@ React Router v7 **requires** nested routes for multi-module applications.
|
|
|
491
491
|
```tsx
|
|
492
492
|
// Add to App.tsx
|
|
493
493
|
|
|
494
|
-
import { $MODULE_PASCALPage } from '@/pages/$CONTEXT/$MODULE/$MODULE_PASCALPage';
|
|
495
|
-
import { $MODULE_PASCALDetailPage } from '@/pages/$CONTEXT/$MODULE/$MODULE_PASCALDetailPage';
|
|
496
|
-
import { Create$MODULE_PASCALPage } from '@/pages/$CONTEXT/$MODULE/Create$MODULE_PASCALPage';
|
|
494
|
+
import { $MODULE_PASCALPage } from '@/pages/$CONTEXT/$APPLICATION/$MODULE/$MODULE_PASCALPage';
|
|
495
|
+
import { $MODULE_PASCALDetailPage } from '@/pages/$CONTEXT/$APPLICATION/$MODULE/$MODULE_PASCALDetailPage';
|
|
496
|
+
import { Create$MODULE_PASCALPage } from '@/pages/$CONTEXT/$APPLICATION/$MODULE/Create$MODULE_PASCALPage';
|
|
497
497
|
|
|
498
498
|
// In routes - NESTED STRUCTURE
|
|
499
499
|
<Route path="$APPLICATION">
|
|
@@ -106,6 +106,15 @@ All outputs saved to PROJECT directory:
|
|
|
106
106
|
├── bugs/
|
|
107
107
|
└── hotfixes/
|
|
108
108
|
```
|
|
109
|
+
|
|
110
|
+
**Ralph Loop files (generated by step-05):**
|
|
111
|
+
```
|
|
112
|
+
.ralph/
|
|
113
|
+
├── prd.json # Task breakdown for /ralph-loop -r
|
|
114
|
+
├── progress.txt # Links to BA documents
|
|
115
|
+
├── logs/
|
|
116
|
+
└── reports/
|
|
117
|
+
```
|
|
109
118
|
</output_structure>
|
|
110
119
|
|
|
111
120
|
<resume_workflow>
|
|
@@ -187,6 +196,9 @@ Load ONLY relevant categories based on feature type:
|
|
|
187
196
|
| 08 | `questionnaire/08-performance.md` | If performance-critical |
|
|
188
197
|
| 09 | `questionnaire/09-constraints.md` | If constraints exist |
|
|
189
198
|
| 10 | `questionnaire/10-documentation.md` | If doc required |
|
|
199
|
+
| 11 | `questionnaire/11-data-lifecycle.md` | If data-centric or full module |
|
|
200
|
+
| 12 | `questionnaire/12-migration.md` | Always for new modules |
|
|
201
|
+
| 13 | `questionnaire/13-cross-module.md` | Always for new modules |
|
|
190
202
|
|
|
191
203
|
</questionnaire_files>
|
|
192
204
|
|
|
@@ -195,10 +207,10 @@ Load ONLY relevant categories based on feature type:
|
|
|
195
207
|
|
|
196
208
|
| Template | File | Used in step |
|
|
197
209
|
| -------- | ----------------------------- | ------------ |
|
|
198
|
-
| discovery | `templates/
|
|
199
|
-
| brd | `templates/
|
|
200
|
-
| frd | `templates/frd
|
|
201
|
-
| handoff | `templates/
|
|
210
|
+
| discovery | `templates/tpl-discovery.md` | 01 |
|
|
211
|
+
| brd | `templates/tpl-brd.md` | 02 |
|
|
212
|
+
| frd | `templates/tpl-frd.md` | 03 |
|
|
213
|
+
| handoff | `templates/tpl-handoff.md` | 05 |
|
|
202
214
|
|
|
203
215
|
</template_files>
|
|
204
216
|
|
|
@@ -218,6 +230,7 @@ Load ONLY relevant categories based on feature type:
|
|
|
218
230
|
- Each step loaded progressively (max 300-400 lines/step)
|
|
219
231
|
- All outputs saved to feature folder
|
|
220
232
|
- Validation gate passed (APPROVED)
|
|
221
|
-
- Development handoff ready for `/
|
|
233
|
+
- Development handoff ready for `/ralph-loop -r` (iterative) or `/feature-full` (one-shot)
|
|
234
|
+
- Ralph Loop prd.json generated with atomic task breakdown
|
|
222
235
|
- Clear completion summary with next steps
|
|
223
236
|
</success_criteria>
|
|
@@ -16,13 +16,13 @@ steps/step-00-init.md (parse flags, create state)
|
|
|
16
16
|
↓
|
|
17
17
|
steps/step-01-discover.md (charge questionnaire/XX.md on-demand)
|
|
18
18
|
↓
|
|
19
|
-
steps/step-02-analyse.md (charge templates/
|
|
19
|
+
steps/step-02-analyse.md (charge templates/tpl-brd.md)
|
|
20
20
|
↓
|
|
21
|
-
steps/step-03-specify.md (charge templates/frd
|
|
21
|
+
steps/step-03-specify.md (charge templates/tpl-frd.md)
|
|
22
22
|
↓
|
|
23
23
|
steps/step-04-validate.md (validation gate)
|
|
24
24
|
↓
|
|
25
|
-
steps/step-05-handoff.md (charge templates/
|
|
25
|
+
steps/step-05-handoff.md (charge templates/tpl-handoff.md)
|
|
26
26
|
↓
|
|
27
27
|
steps/step-06-doc-html.md (charge react/*.md on-demand)
|
|
28
28
|
```
|
|
@@ -46,6 +46,82 @@ validate_business_context(context):
|
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
49
|
+
## Architecture SmartStack (Référence BA)
|
|
50
|
+
|
|
51
|
+
> **Objectif :** Fournir le contexte architectural au BA pour des questions pertinentes et des recommandations alignées.
|
|
52
|
+
|
|
53
|
+
### 5 Couches (Clean Architecture)
|
|
54
|
+
|
|
55
|
+
| Couche | Projet | Contenu | Impact BA |
|
|
56
|
+
|--------|--------|---------|-----------|
|
|
57
|
+
| **Domain** | `SmartStack.Domain` | Entités, enums, interfaces | Entités identifiées en discovery |
|
|
58
|
+
| **Application** | `SmartStack.Application` | CQRS (Commands/Queries), validations, DTOs | Use cases de la spécification |
|
|
59
|
+
| **Infrastructure** | `SmartStack.Infrastructure` | EF Core, services externes, jobs | Intégrations et contraintes techniques |
|
|
60
|
+
| **API** | `SmartStack.API` | Controllers REST, permissions | Endpoints et sécurité |
|
|
61
|
+
| **Web** | `smartstack-web` | React 19, pages, composants | UI/UX et navigation |
|
|
62
|
+
|
|
63
|
+
### Hiérarchie de Navigation
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
Context (business) → Application (Sales) → Module (Orders) → Section (list/detail)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Route pattern : `/business/{application}/{module}/{section}`
|
|
70
|
+
|
|
71
|
+
### Classes de Base des Entités
|
|
72
|
+
|
|
73
|
+
| Classe | Champs auto-inclus | Quand utiliser |
|
|
74
|
+
|--------|--------------------|----------------|
|
|
75
|
+
| `Entity` | `Id` (Guid) | Entité simple sans audit |
|
|
76
|
+
| `AuditableEntity` | + `CreatedBy`, `CreatedDate`, `ModifiedBy`, `ModifiedDate` | **Défaut pour toute entité métier** |
|
|
77
|
+
| `SoftDeletableEntity` | + `IsDeleted`, `DeletedBy`, `DeletedDate` | Entité avec suppression logique |
|
|
78
|
+
| `HierarchicalEntity` | + `ParentId`, `Level`, `Path` | Arborescences (catégories, menus) |
|
|
79
|
+
|
|
80
|
+
> **IMPORTANT :** Ne JAMAIS proposer `CreatedBy`, `ModifiedBy`, `IsDeleted` comme champs explicites — ils sont AUTOMATIQUES via la classe de base.
|
|
81
|
+
|
|
82
|
+
### Services d'Intégration Disponibles
|
|
83
|
+
|
|
84
|
+
| Service | Interface | Quand le proposer |
|
|
85
|
+
|---------|-----------|-------------------|
|
|
86
|
+
| Notifications in-app | `INotificationService` | Alertes, événements, rappels |
|
|
87
|
+
| Workflow automatisé | `IWorkflowService` | Emails transactionnels, webhooks, actions chaînées |
|
|
88
|
+
| Complétion IA | `IAICompletionService` | Suggestions, classification, génération contenu |
|
|
89
|
+
| SignalR temps réel | `IHubContext<BusinessHub>` | Mises à jour en temps réel |
|
|
90
|
+
| Jobs planifiés | Hangfire `IBackgroundJobClient` | Traitements différés, purges, imports |
|
|
91
|
+
|
|
92
|
+
### Conventions Base de Données
|
|
93
|
+
|
|
94
|
+
| Aspect | Convention |
|
|
95
|
+
|--------|------------|
|
|
96
|
+
| Schema | `core` (socle) vs `ext` (extensions/métier) |
|
|
97
|
+
| Tables | PascalCase au pluriel (`Orders`, `OrderLines`) |
|
|
98
|
+
| FK | `{Entity}Id` (ex: `ClientId`, `OrderId`) |
|
|
99
|
+
| Index | `IX_{Table}_{Column}` |
|
|
100
|
+
| Migration | 1 migration par feature, nommée via MCP |
|
|
101
|
+
|
|
102
|
+
### Contraintes Non-Négociables
|
|
103
|
+
|
|
104
|
+
| Contrainte | Détail |
|
|
105
|
+
|------------|--------|
|
|
106
|
+
| **Multi-tenant** | `TenantId` sur toute entité métier, isolation automatique |
|
|
107
|
+
| **RBAC** | Permissions `business.{app}.{module}.{action}`, HasData pattern |
|
|
108
|
+
| **CQRS** | Commands (write) et Queries (read) séparés via MediatR |
|
|
109
|
+
| **Validation** | FluentValidation pour toute commande |
|
|
110
|
+
| **i18n** | 4 langues obligatoires (fr, en, it, de) |
|
|
111
|
+
| **Soft Delete** | Pas de DELETE physique sauf purge RGPD planifiée |
|
|
112
|
+
|
|
113
|
+
### Outils MCP Pertinents pour le BA
|
|
114
|
+
|
|
115
|
+
| Phase BA | Outil MCP | Usage |
|
|
116
|
+
|----------|-----------|-------|
|
|
117
|
+
| Pre-research (01) | `analyze_extension_points` | Découvrir modules/entités existants |
|
|
118
|
+
| Pre-research (01) | `api_docs` | Consulter la documentation API existante |
|
|
119
|
+
| Analyse (02) | `validate_conventions` | Vérifier les noms d'entités proposés |
|
|
120
|
+
| Spécification (03) | `generate_permissions` | Générer la matrice de permissions |
|
|
121
|
+
| Handoff (05) | `scaffold_extension` | Préparer le scaffolding |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
49
125
|
## Feature Directory Structure
|
|
50
126
|
|
|
51
127
|
```
|
|
@@ -65,10 +141,24 @@ validate_business_context(context):
|
|
|
65
141
|
├── 4-development-handoff.md
|
|
66
142
|
└── tracking/
|
|
67
143
|
├── changes/
|
|
144
|
+
│ └── CHANGE-NNN.md
|
|
68
145
|
├── bugs/
|
|
69
|
-
|
|
146
|
+
├── hotfixes/
|
|
147
|
+
└── docs-manifest-entry.json
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Ralph Loop Integration (generated by step-05):**
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
.ralph/
|
|
154
|
+
├── prd.json # Task breakdown derived from handoff (for /ralph-loop -r)
|
|
155
|
+
├── progress.txt # Links back to BA feature documents
|
|
156
|
+
├── logs/
|
|
157
|
+
└── reports/
|
|
70
158
|
```
|
|
71
159
|
|
|
160
|
+
> **Note:** `.ralph/prd.json` is generated by step-05-handoff from the file mapping, business rules, and test requirements. It provides an atomic task list following the SmartStack layer order (Domain -> Application -> Infrastructure -> API -> Frontend -> i18n -> Tests -> Validation).
|
|
161
|
+
|
|
72
162
|
---
|
|
73
163
|
|
|
74
164
|
## Feature ID Generation
|
|
@@ -97,6 +187,129 @@ generate_feature_id():
|
|
|
97
187
|
|
|
98
188
|
---
|
|
99
189
|
|
|
190
|
+
## Interactive Elicitation Protocol
|
|
191
|
+
|
|
192
|
+
> **RULE: ALL questions MUST be asked interactively using `AskUserQuestion`.**
|
|
193
|
+
> **NEVER dump a list of questions as text. ALWAYS use the tool.**
|
|
194
|
+
|
|
195
|
+
### Protocol
|
|
196
|
+
|
|
197
|
+
1. **Group questions by theme** — max 4 questions per `AskUserQuestion` call (tool limit)
|
|
198
|
+
2. **Propose predefined options** — for questions with predictable answers, provide 2-4 options
|
|
199
|
+
3. **The user can always choose "Other"** — the tool adds this automatically for free-text answers
|
|
200
|
+
4. **Process answers immediately** — apply ULTRATHINK + follow-ups before moving to next group
|
|
201
|
+
5. **Adapt next questions** — based on previous answers, skip irrelevant questions
|
|
202
|
+
|
|
203
|
+
### Batching Strategy
|
|
204
|
+
|
|
205
|
+
| Category | Questions | Batches |
|
|
206
|
+
|----------|-----------|---------|
|
|
207
|
+
| 01-context | Q1.1-Q1.8 | 2 calls (Q1.1-Q1.4 then Q1.5-Q1.8) |
|
|
208
|
+
| 02-stakeholders | Q2.1-Q2.8 | 2 calls (Q2.1-Q2.4 then Q2.5-Q2.8) |
|
|
209
|
+
| 03-scope | Q3.1-Q3.8 | 2 calls (Q3.1-Q3.4 then Q3.5-Q3.8) |
|
|
210
|
+
| 04-data | Q4.1-Q4.8 | 2 calls (Q4.1-Q4.4 then Q4.5-Q4.8) |
|
|
211
|
+
| 05-integrations | Q5.1-Q5.8 | 2 calls (Q5.1-Q5.4 then Q5.5-Q5.8) |
|
|
212
|
+
| 06-security | Q6.1-Q6.8 | 2 calls (Q6.1-Q6.4 then Q6.5-Q6.8) |
|
|
213
|
+
| 07-10 | Q7-Q10 | 1-2 calls each |
|
|
214
|
+
|
|
215
|
+
### AskUserQuestion Format
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
AskUserQuestion({
|
|
219
|
+
questions: [
|
|
220
|
+
{
|
|
221
|
+
question: "Quel problème métier ce module doit-il résoudre ?",
|
|
222
|
+
header: "Problème", // max 12 chars
|
|
223
|
+
options: [
|
|
224
|
+
{ label: "Processus manuel", description: "Automatiser un processus existant fait manuellement" },
|
|
225
|
+
{ label: "Données dispersées", description: "Centraliser des données éparpillées dans plusieurs outils" },
|
|
226
|
+
{ label: "Manque visibilité", description: "Obtenir des indicateurs et du suivi inexistants aujourd'hui" },
|
|
227
|
+
{ label: "Conformité", description: "Répondre à une obligation réglementaire ou de sécurité" }
|
|
228
|
+
],
|
|
229
|
+
multiSelect: false
|
|
230
|
+
},
|
|
231
|
+
// ... up to 4 questions per call
|
|
232
|
+
]
|
|
233
|
+
})
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### After Each Batch
|
|
237
|
+
|
|
238
|
+
1. **Evaluate answer quality** (see Answer Quality Indicators)
|
|
239
|
+
2. **If insufficient** → follow-up AskUserQuestion with targeted probes from the Elicitation Guide
|
|
240
|
+
3. **If solution-oriented** → reframe using Technique 1 before proceeding
|
|
241
|
+
4. **If sufficient/excellent** → record and move to next batch
|
|
242
|
+
5. **Summarize** what was understood before moving to the next category
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Elicitation Techniques
|
|
247
|
+
|
|
248
|
+
> **Loaded by:** step-01-discover (Opus ULTRATHINK)
|
|
249
|
+
> **Purpose:** Guide HOW to question, not just WHAT to ask.
|
|
250
|
+
|
|
251
|
+
### Technique 1: Solution → Problem Reframing
|
|
252
|
+
|
|
253
|
+
If the user describes a **solution** (button, field, screen, API), reframe as a **need**:
|
|
254
|
+
|
|
255
|
+
| User says | BA agent asks |
|
|
256
|
+
|-----------|---------------|
|
|
257
|
+
| "I need a Role dropdown on the User form" | "What problem are you trying to solve with different user access levels?" |
|
|
258
|
+
| "We need an export button" | "What do you do with the exported data? Who needs it and why?" |
|
|
259
|
+
| "Add a status field" | "What lifecycle does this entity go through? What triggers each transition?" |
|
|
260
|
+
|
|
261
|
+
### Technique 2: 5 Whys (Root Cause)
|
|
262
|
+
|
|
263
|
+
When the need seems superficial, chain up to 5 "Why?":
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
User: "We need to track user activity"
|
|
267
|
+
→ Why? "To know who modified what"
|
|
268
|
+
→ Why? "Because we had data integrity issues"
|
|
269
|
+
→ Why? "Because multiple people edit the same records"
|
|
270
|
+
→ ROOT CAUSE: Concurrent editing conflict → Need audit trail + optimistic locking
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Technique 3: Concrete Scenario Extraction
|
|
274
|
+
|
|
275
|
+
Never accept abstract descriptions. Always ask for **a real day-in-the-life scenario**:
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
"Walk me through a typical day: you arrive at the office,
|
|
279
|
+
you open the application — what is the FIRST thing you need to do?
|
|
280
|
+
Then what? What information do you look at? What decisions do you make?"
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Technique 4: Absence Test
|
|
284
|
+
|
|
285
|
+
Validate necessity by asking what happens WITHOUT:
|
|
286
|
+
|
|
287
|
+
```
|
|
288
|
+
"If this feature did NOT exist, what would you do instead?
|
|
289
|
+
How much time/money does the current workaround cost?"
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Technique 5: Completeness Probing
|
|
293
|
+
|
|
294
|
+
For every list answer, challenge completeness:
|
|
295
|
+
|
|
296
|
+
| Answer type | Probe |
|
|
297
|
+
|-------------|-------|
|
|
298
|
+
| "There are 3 user types" | "Are there external actors? Auditors? System admins? Automated processes?" |
|
|
299
|
+
| "The main flow is A→B→C" | "What if the user cancels at step B? What if step C fails? What if they go back to A?" |
|
|
300
|
+
| "Required fields: name, email" | "What uniqueness constraints? What format? What happens on duplicate?" |
|
|
301
|
+
|
|
302
|
+
### Answer Quality Indicators
|
|
303
|
+
|
|
304
|
+
| Quality | Signal | Action |
|
|
305
|
+
|---------|--------|--------|
|
|
306
|
+
| **Insufficient** | < 1 sentence, "I don't know", vague adjective | Apply technique 1-5, ask for concrete example |
|
|
307
|
+
| **Solution-oriented** | Contains UI/tech terms (button, field, API, database) | Apply technique 1 (reframe to problem) |
|
|
308
|
+
| **Sufficient** | Contains WHO, WHAT, WHY, concrete example | Proceed, note confidence level |
|
|
309
|
+
| **Excellent** | Includes edge cases, constraints, measurable criteria | Proceed, mark as "Confirmed" |
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
100
313
|
## ULTRATHINK
|
|
101
314
|
|
|
102
315
|
Behavioral mode for critical phases (01, 02, 03, 05):
|
|
@@ -107,11 +320,13 @@ ULTRATHINK MODE:
|
|
|
107
320
|
- Challenge EVERY assumption
|
|
108
321
|
- Anticipate UNEXPRESSED needs
|
|
109
322
|
- Validate completeness before output
|
|
323
|
+
- Apply Elicitation Techniques (see above)
|
|
110
324
|
|
|
111
325
|
DO NOT:
|
|
112
326
|
- Accept vague answers
|
|
113
327
|
- Skip question categories
|
|
114
328
|
- Assume stakeholder thought of everything
|
|
329
|
+
- Accept solutions without understanding the problem first
|
|
115
330
|
```
|
|
116
331
|
|
|
117
332
|
**DO NOT invoke** as a skill/tool - it is a thinking mode.
|
|
@@ -228,6 +443,47 @@ Example:
|
|
|
228
443
|
|
|
229
444
|
---
|
|
230
445
|
|
|
446
|
+
## Configuration Langue de Communication
|
|
447
|
+
|
|
448
|
+
> **Objectif :** La langue de communication avec le client est configurable.
|
|
449
|
+
> Toute interaction via `AskUserQuestion` (questions, options, reformulations, relances)
|
|
450
|
+
> doit être dans la langue configurée.
|
|
451
|
+
|
|
452
|
+
### Configuration
|
|
453
|
+
|
|
454
|
+
Le champ `language` dans `.business-analyse/config.json` définit la langue :
|
|
455
|
+
|
|
456
|
+
| Langue | Code | Défaut |
|
|
457
|
+
|--------|------|--------|
|
|
458
|
+
| Français | `fr` | **Oui** |
|
|
459
|
+
| English | `en` | Non |
|
|
460
|
+
| Italiano | `it` | Non |
|
|
461
|
+
| Deutsch | `de` | Non |
|
|
462
|
+
|
|
463
|
+
### Portée
|
|
464
|
+
|
|
465
|
+
| Élément | Adapté à la langue ? |
|
|
466
|
+
|---------|---------------------|
|
|
467
|
+
| Questions `AskUserQuestion` (labels, descriptions, options) | **OUI** — toujours dans `{language}` |
|
|
468
|
+
| Reformulations et résumés de catégorie | **OUI** — toujours dans `{language}` |
|
|
469
|
+
| Relances et follow-ups (Elicitation Guide) | **OUI** — traduire les probes à la volée |
|
|
470
|
+
| Documents générés (discovery, BRD, FRD, handoff) | **OUI** — rédigés dans `{language}` |
|
|
471
|
+
| Référence technique interne (patterns, architecture) | NON — reste en langue du fichier |
|
|
472
|
+
| Noms de code (entités, permissions, paths) | NON — toujours en anglais (convention SmartStack) |
|
|
473
|
+
|
|
474
|
+
### Règle
|
|
475
|
+
|
|
476
|
+
```
|
|
477
|
+
1. Lire {language} depuis 00-context.md (défaut: "fr")
|
|
478
|
+
2. Adapter TOUTE communication AskUserQuestion dans {language}
|
|
479
|
+
3. Les exemples de probes/relances dans les questionnaires sont en français
|
|
480
|
+
→ Si {language} ≠ "fr", les traduire à la volée
|
|
481
|
+
4. Les documents générés sont rédigés dans {language}
|
|
482
|
+
5. Le code, les noms d'entités et les paths restent TOUJOURS en anglais
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
231
487
|
## Config Template
|
|
232
488
|
|
|
233
489
|
```json
|
|
@@ -235,6 +491,7 @@ Example:
|
|
|
235
491
|
"project": "{Name}",
|
|
236
492
|
"lastFeatureId": 0,
|
|
237
493
|
"context": "business",
|
|
494
|
+
"language": "fr",
|
|
238
495
|
"standards": ["BABOK-v3", "IEEE-830"],
|
|
239
496
|
"contact": "support@atlshub.ch"
|
|
240
497
|
}
|
|
@@ -253,6 +510,51 @@ Example:
|
|
|
253
510
|
|
|
254
511
|
---
|
|
255
512
|
|
|
513
|
+
## Context Digest (Between Steps)
|
|
514
|
+
|
|
515
|
+
Each step produces a compressed digest file (max 50 lines) at completion to reduce token usage in the next step.
|
|
516
|
+
|
|
517
|
+
**File naming:** `{output_dir}/digest-{step_number}.md` (e.g., `digest-01.md`, `digest-02.md`)
|
|
518
|
+
|
|
519
|
+
| Section | Max Lines | Content |
|
|
520
|
+
|---------|-----------|---------|
|
|
521
|
+
| Changes | 10 | Files modified with brief description |
|
|
522
|
+
| Decisions | 10 | Key architectural decisions |
|
|
523
|
+
| Findings | 10 | Issues found, patterns identified |
|
|
524
|
+
| State | 5 | Updated state variables |
|
|
525
|
+
| Next | 5 | What the next step needs to know |
|
|
526
|
+
|
|
527
|
+
**Protocol:**
|
|
528
|
+
- **Generate:** Each step writes `digest-{step_number}.md` before completing
|
|
529
|
+
- **Read:** Next step reads `digest-{prev_step_number}.md` instead of full output files
|
|
530
|
+
- **Resume mode (`-r`):** Reads full output files directly (digest is for progressive loading only)
|
|
531
|
+
- **Step-00:** Does not read a digest (it is the first step)
|
|
532
|
+
- **Step-00:** Generates `digest-00.md` with initial state variables and configuration
|
|
533
|
+
|
|
534
|
+
**Template:**
|
|
535
|
+
```markdown
|
|
536
|
+
# Digest: Step {NN} - {Step Name}
|
|
537
|
+
|
|
538
|
+
## Changes
|
|
539
|
+
- {file}: {brief description}
|
|
540
|
+
|
|
541
|
+
## Decisions
|
|
542
|
+
- {decision and rationale}
|
|
543
|
+
|
|
544
|
+
## Findings
|
|
545
|
+
- {finding}
|
|
546
|
+
|
|
547
|
+
## State Updates
|
|
548
|
+
| Variable | New Value |
|
|
549
|
+
|----------|-----------|
|
|
550
|
+
| {var} | {value} |
|
|
551
|
+
|
|
552
|
+
## For Next Step
|
|
553
|
+
- {what the next step needs to know}
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
---
|
|
557
|
+
|
|
256
558
|
## Support
|
|
257
559
|
|
|
258
560
|
Contact: **support@atlshub.ch**
|