@atlashub/smartstack-cli 2.7.1 → 2.7.3

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.
@@ -222,7 +222,75 @@ If a feature is in mustHave → it MUST have at least one UC in the correspondin
222
222
 
223
223
  ### 10. Write Cadrage to Feature.json
224
224
 
225
- Use ba-writer to enrich master feature.json:
225
+ Use ba-writer to enrich master feature.json. **Follow the STRUCTURE CARDS below exactly.**
226
+
227
+ > **STRUCTURE CARD: cadrage.stakeholders[]**
228
+ > ```json
229
+ > {
230
+ > "role": "Fleet Manager",
231
+ > "function": "Manages daily fleet operations",
232
+ > "involvement": "decision-maker",
233
+ > "tasks": ["Monitor vehicles", "Approve repairs", "Export reports"],
234
+ > "frequency": "Daily",
235
+ > "painPoints": ["Manual tracking in spreadsheets", "No real-time visibility"]
236
+ > }
237
+ > ```
238
+ > **MANDATORY fields:** `role`, `function`, `involvement`, `tasks`
239
+ > **involvement values:** `approver`, `decision-maker`, `consulted`, `informed`, `end-user`
240
+ > **FORBIDDEN fields:** Do NOT use `expertise`, `systemRole`, `description` (use `function` instead).
241
+
242
+ > **STRUCTURE CARD: cadrage.applicationRoles[]**
243
+ > ```json
244
+ > {
245
+ > "role": "{App} Admin",
246
+ > "description": "Full access to all modules",
247
+ > "level": "admin",
248
+ > "permissionPattern": "business.{app}.*"
249
+ > }
250
+ > ```
251
+ > **MANDATORY fields:** `role`, `level`, `permissionPattern`
252
+ > **level values:** `admin`, `manager`, `contributor`, `viewer`
253
+ > **FORBIDDEN fields:** Do NOT use `permissions` (use `permissionPattern`), `isDefault`.
254
+
255
+ > **STRUCTURE CARD: cadrage.risks[]**
256
+ > ```json
257
+ > {
258
+ > "id": "RISK-001",
259
+ > "type": "business|technical|organizational",
260
+ > "description": "CSV data may contain duplicates and errors",
261
+ > "probability": "high|medium|low",
262
+ > "impact": "high|medium|low",
263
+ > "priority": "critical|medium|low",
264
+ > "mitigation": "Data cleaning phase before import, detailed error reports"
265
+ > }
266
+ > ```
267
+ > **MANDATORY fields:** `id` (pattern: RISK-NNN), `type`, `description`, `mitigation`
268
+ > **FORBIDDEN fields:** Do NOT use `risk` (name), `severity`. Use `id` + `description` + `priority`.
269
+
270
+ > **STRUCTURE CARD: cadrage.acceptanceCriteria[]**
271
+ > ```json
272
+ > { "id": "AC-001", "criterion": "All must-have features delivered and tested", "validated": false }
273
+ > ```
274
+ > **MANDATORY:** This section must NOT be omitted.
275
+
276
+ > **STRUCTURE CARD: cadrage.coverageMatrix[]**
277
+ > ```json
278
+ > {
279
+ > "item": "User management with CRUD",
280
+ > "category": "mustHave|shouldHave|couldHave|outOfScope|implicit",
281
+ > "module": "Users",
282
+ > "ucRef": "UC-UM-001",
283
+ > "notes": "Foundation module, must be implemented first"
284
+ > }
285
+ > ```
286
+ > **MANDATORY fields:** `item`, `category`, `module`
287
+ > **category values:** `mustHave`, `shouldHave`, `couldHave`, `outOfScope`, `implicit` (camelCase)
288
+ > **FORBIDDEN fields:** Do NOT use `id`, `feature`, `priority`. Use `item` + `category`.
289
+
290
+ > **STRUCTURE CARD: cadrage.codebaseContext** — Must be a string, NOT an object.
291
+ > ```json
292
+ > "codebaseContext": "Greenfield project, no existing entities. SmartStack 2.1.0 with Extensions DbContext."
293
+ > ```
226
294
 
227
295
  ```
228
296
  ba-writer.enrichSection({
@@ -233,18 +301,18 @@ ba-writer.enrichSection({
233
301
  asIs: {Q1.2 answer},
234
302
  toBe: {Q1.3 answer},
235
303
  trigger: {Q1.4 answer},
236
- stakeholders: [{mapped from Q2.x answers}],
304
+ stakeholders: [{mapped from Q2.x — use STRUCTURE CARD format}],
237
305
  globalScope: {
238
306
  mustHave: [{from Q3.x}],
239
307
  shouldHave: [{from Q3.x}],
240
308
  couldHave: [{from Q3.x}],
241
309
  outOfScope: [{from Q3.x}]
242
310
  },
243
- applicationRoles: [{from section 6}],
244
- risks: [{from section 8}],
245
- acceptanceCriteria: [{derived from scope}],
246
- coverageMatrix: [{from section 9}],
247
- codebaseContext: {codebase_context}
311
+ applicationRoles: [{from section 6 — use STRUCTURE CARD format}],
312
+ risks: [{from section 8 — use STRUCTURE CARD format}],
313
+ acceptanceCriteria: [{derived from scope — use STRUCTURE CARD format}],
314
+ coverageMatrix: [{from section 9 — use STRUCTURE CARD format}],
315
+ codebaseContext: "{string summary of codebase findings}"
248
316
  }
249
317
  })
250
318
 
@@ -54,16 +54,27 @@ For each mustHave/shouldHave scope item:
54
54
  - "Does the codebase already have modules that should be extended vs. created new?"
55
55
 
56
56
  **For each module, determine:**
57
- ```json
58
- {
59
- "code": "PascalCase module name",
60
- "description": "1-2 sentence description",
61
- "featureType": "data-centric | integration | ui-centric | workflow | reporting | full-module",
62
- "entities": ["Anticipated entity names"],
63
- "priority": "must | should | could",
64
- "estimatedComplexity": "simple | medium | complex"
65
- }
66
- ```
57
+
58
+ > **STRUCTURE CARD: modules[]** — Field names are EXACT. Include ALL fields below.
59
+ > ```json
60
+ > {
61
+ > "code": "PascalCase",
62
+ > "description": "1-2 sentence description",
63
+ > "featureType": "data-centric|integration|ui-centric|workflow|reporting|full-module",
64
+ > "dependencies": ["OtherModule"],
65
+ > "dependents": ["DependentModule"],
66
+ > "status": "pending",
67
+ > "featureJsonPath": null,
68
+ > "priority": "must|should|could",
69
+ > "sortOrder": 0,
70
+ > "entities": ["Anticipated entity names"],
71
+ > "estimatedComplexity": "simple|medium|complex"
72
+ > }
73
+ > ```
74
+ > **MANDATORY fields:** `code`, `description`, `featureType`, `dependencies`, `dependents`, `status`, `priority`, `sortOrder`, `entities`, `estimatedComplexity`
75
+ > **status:** Always `"pending"` at creation (updated to `"in-progress"` → `"specified"` → `"validated"` by step-03/04)
76
+ > **sortOrder:** Integer from topological sort (0 = foundation layer)
77
+ > **featureJsonPath:** Set to null at creation; updated to actual path when module feature.json is created in step-03
67
78
 
68
79
  **Complexity estimation rules:**
69
80
  | Criteria | Simple | Medium | Complex |