@atlashub/smartstack-cli 2.1.0 → 2.3.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/business-analyse.html +1503 -1058
- package/dist/index.js +92 -55
- package/dist/index.js.map +1 -1
- package/package.json +10 -7
- package/templates/agents/ba-reader.md +250 -0
- package/templates/agents/ba-writer.md +210 -0
- package/templates/agents/docs-context-reader.md +51 -33
- package/templates/skills/_shared.md +2 -0
- package/templates/skills/business-analyse/SKILL.md +120 -108
- package/templates/skills/business-analyse/_shared.md +136 -146
- package/templates/skills/business-analyse/patterns/suggestion-catalog.md +478 -0
- package/templates/skills/business-analyse/questionnaire/01-context.md +3 -15
- package/templates/skills/business-analyse/questionnaire/03-scope.md +7 -7
- package/templates/skills/business-analyse/questionnaire/08-performance.md +7 -21
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +0 -13
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +0 -13
- package/templates/skills/business-analyse/questionnaire/12-migration.md +1 -1
- package/templates/skills/business-analyse/questionnaire.md +72 -76
- package/templates/skills/business-analyse/react/components.md +317 -154
- package/templates/skills/business-analyse/react/i18n-template.md +167 -106
- package/templates/skills/business-analyse/react/schema.md +474 -107
- package/templates/skills/business-analyse/schemas/feature-schema.json +860 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +395 -285
- package/templates/skills/business-analyse/steps/step-01-analyse.md +523 -0
- package/templates/skills/business-analyse/steps/step-02-specify.md +899 -0
- package/templates/skills/business-analyse/steps/step-03-validate.md +1009 -0
- package/templates/skills/business-analyse/steps/step-04-handoff.md +1802 -0
- package/templates/skills/business-analyse/templates/tpl-handoff.md +49 -64
- package/templates/skills/business-analyse/steps/step-01-discover.md +0 -737
- package/templates/skills/business-analyse/steps/step-02-analyse.md +0 -299
- package/templates/skills/business-analyse/steps/step-03-specify.md +0 -472
- package/templates/skills/business-analyse/steps/step-04-validate.md +0 -335
- package/templates/skills/business-analyse/steps/step-05-handoff.md +0 -741
- package/templates/skills/business-analyse/steps/step-06-doc-html.md +0 -320
- package/templates/skills/business-analyse/templates/00-context.md +0 -105
- package/templates/skills/business-analyse/templates/tpl-brd.md +0 -97
- package/templates/skills/business-analyse/templates/tpl-discovery.md +0 -78
- package/templates/skills/business-analyse/tracking/change-template.md +0 -30
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: step-03-specify
|
|
3
|
-
description: Specification phase - FRD with use cases, requirements, permissions
|
|
4
|
-
next_step: steps/step-04-validate.md
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## YOUR TASK:
|
|
8
|
-
|
|
9
|
-
Create comprehensive Functional Requirements Document (FRD) with:
|
|
10
|
-
- Use Cases (UC-XXX)
|
|
11
|
-
- Functional Requirements (FR-XXX)
|
|
12
|
-
- Permission matrix
|
|
13
|
-
- UI wireframes
|
|
14
|
-
- Gherkin scenarios
|
|
15
|
-
|
|
16
|
-
> **ULTRATHINK MODE:**
|
|
17
|
-
> - Each UC must be atomic and testable
|
|
18
|
-
> - FR must trace back to BR
|
|
19
|
-
> - Permissions must follow SmartStack convention
|
|
20
|
-
> - No ambiguity in scenarios
|
|
21
|
-
|
|
22
|
-
## EXECUTION SEQUENCE:
|
|
23
|
-
|
|
24
|
-
### 1. Read Current State
|
|
25
|
-
|
|
26
|
-
Read `{output_dir}/00-context.md` to restore state variables.
|
|
27
|
-
Read `{output_dir}/2-business-requirements.md` for business rules.
|
|
28
|
-
|
|
29
|
-
Update progress: `03-specify` -> "In Progress"
|
|
30
|
-
|
|
31
|
-
**Read digest from previous step:**
|
|
32
|
-
Read `{output_dir}/digest-02.md` for compressed context from previous step.
|
|
33
|
-
**DO NOT read full output files** unless in resume mode (`-r`).
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
### 2. Load FRD Template
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
Read: templates/tpl-frd.md # ~150 lines (UC + FR + permissions sections)
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
This template contains ONLY the FRD structure.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
### 3. Define Actors and Permissions
|
|
48
|
-
|
|
49
|
-
From BRD stakeholders, map to system actors:
|
|
50
|
-
|
|
51
|
-
| Actor | Description | Permission base |
|
|
52
|
-
|-------|-------------|-----------------|
|
|
53
|
-
| Admin | Full access | `business.{app}.{module}.*` |
|
|
54
|
-
| Manager | Read + Create + Update | `business.{app}.{module}.read,create,update` |
|
|
55
|
-
| User | Read + Create | `business.{app}.{module}.read,create` |
|
|
56
|
-
| ReadOnly | View only | `business.{app}.{module}.read` |
|
|
57
|
-
|
|
58
|
-
**Permission format:** `business.{application_name}.{module_name}.{action}`
|
|
59
|
-
|
|
60
|
-
Actions:
|
|
61
|
-
- `.read` - View data
|
|
62
|
-
- `.create` - Create new entries
|
|
63
|
-
- `.update` - Modify existing
|
|
64
|
-
- `.delete` - Remove entries
|
|
65
|
-
- `.export` - Export data
|
|
66
|
-
- `.import` - Import data
|
|
67
|
-
- `.admin` - Administrative functions
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
### 4. Create Use Cases
|
|
72
|
-
|
|
73
|
-
For each major functionality, create UC:
|
|
74
|
-
|
|
75
|
-
```markdown
|
|
76
|
-
### UC-001: {Use Case Name}
|
|
77
|
-
|
|
78
|
-
| Attribute | Value |
|
|
79
|
-
|-----------|-------|
|
|
80
|
-
| **ID** | UC-001 |
|
|
81
|
-
| **Name** | {Name} |
|
|
82
|
-
| **Primary Actor** | {Role} |
|
|
83
|
-
| **Preconditions** | {required conditions} |
|
|
84
|
-
| **Postconditions** | {final state} |
|
|
85
|
-
| **Permission** | `business.{app}.{module}.{action}` |
|
|
86
|
-
|
|
87
|
-
**Main Scenario:**
|
|
88
|
-
1. The user {action}
|
|
89
|
-
2. The system {response}
|
|
90
|
-
3. The user {action}
|
|
91
|
-
4. The system {response}
|
|
92
|
-
|
|
93
|
-
**Alternative Scenarios:**
|
|
94
|
-
|
|
95
|
-
| # | Condition | Steps |
|
|
96
|
-
|---|-----------|-------|
|
|
97
|
-
| 3a | {condition} | 3a.1 {action}, 3a.2 {action} |
|
|
98
|
-
|
|
99
|
-
**Error Scenarios:**
|
|
100
|
-
|
|
101
|
-
| # | Error | Message | Action |
|
|
102
|
-
|---|-------|---------|--------|
|
|
103
|
-
| E1 | {error} | {user message} | {behavior} |
|
|
104
|
-
|
|
105
|
-
**Associated Rules:** BR-001, BR-002
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
**ULTRATHINK checkpoint:**
|
|
109
|
-
- Each UC maps to at least one BR?
|
|
110
|
-
- All actors from BRD have UCs?
|
|
111
|
-
- Error scenarios complete?
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
### 5. Define Functional Requirements
|
|
116
|
-
|
|
117
|
-
For each BR, create corresponding FR:
|
|
118
|
-
|
|
119
|
-
| ID | Requirement | Linked UC | Priority |
|
|
120
|
-
|----|-------------|-----------|----------|
|
|
121
|
-
| FR-001 | The system MUST... | UC-001 | Must |
|
|
122
|
-
| FR-002 | The system SHOULD... | UC-001 | Should |
|
|
123
|
-
| FR-003 | The system COULD... | UC-002 | Could |
|
|
124
|
-
|
|
125
|
-
**Detailed FR specification:**
|
|
126
|
-
|
|
127
|
-
```markdown
|
|
128
|
-
### FR-001: {Requirement Name}
|
|
129
|
-
|
|
130
|
-
**Statement:** The system MUST {specific action}
|
|
131
|
-
|
|
132
|
-
**Acceptance Criteria:**
|
|
133
|
-
- [ ] {Measurable criterion 1}
|
|
134
|
-
- [ ] {Measurable criterion 2}
|
|
135
|
-
- [ ] {Measurable criterion 3}
|
|
136
|
-
|
|
137
|
-
**Associated Rules:** BR-001, BR-002
|
|
138
|
-
**Use Cases:** UC-001
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
**Priority mapping:**
|
|
142
|
-
- Must = FR-0XX (000-099)
|
|
143
|
-
- Should = FR-1XX (100-199)
|
|
144
|
-
- Could = FR-2XX (200-299)
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
### 6. Design Permission Matrix
|
|
149
|
-
|
|
150
|
-
**Role-Permission Matrix:**
|
|
151
|
-
|
|
152
|
-
| Permission | Admin | Manager | User | ReadOnly |
|
|
153
|
-
|------------|-------|---------|------|----------|
|
|
154
|
-
| `business.{app}.{module}.read` | X | X | X | X |
|
|
155
|
-
| `business.{app}.{module}.create` | X | X | X | - |
|
|
156
|
-
| `business.{app}.{module}.update` | X | X | - | - |
|
|
157
|
-
| `business.{app}.{module}.delete` | X | - | - | - |
|
|
158
|
-
| `business.{app}.{module}.export` | X | X | - | - |
|
|
159
|
-
|
|
160
|
-
**Endpoint-Permission Mapping:**
|
|
161
|
-
|
|
162
|
-
| Endpoint | Method | Required Permission |
|
|
163
|
-
|----------|--------|-------------------|
|
|
164
|
-
| `/api/business/{module}` | GET | `.read` |
|
|
165
|
-
| `/api/business/{module}` | POST | `.create` |
|
|
166
|
-
| `/api/business/{module}/{id}` | GET | `.read` |
|
|
167
|
-
| `/api/business/{module}/{id}` | PUT | `.update` |
|
|
168
|
-
| `/api/business/{module}/{id}` | DELETE | `.delete` |
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
### 6b. Specify Navigation Hierarchy & SeedData Requirements
|
|
173
|
-
|
|
174
|
-
> **CRITICAL:** Every new feature requires navigation entries and seed data to be functional.
|
|
175
|
-
> Without these, the module will be invisible and permissions will block all access (403).
|
|
176
|
-
|
|
177
|
-
**Navigation hierarchy for this feature:**
|
|
178
|
-
|
|
179
|
-
```markdown
|
|
180
|
-
### Navigation Hierarchy
|
|
181
|
-
|
|
182
|
-
| Level | Code | Label (EN) | Label (FR) | Route | Icon | New? |
|
|
183
|
-
|-------|------|-----------|-----------|-------|------|------|
|
|
184
|
-
| Context | business | Business | Métier | /business | Briefcase | Existing/New |
|
|
185
|
-
| Application | {application_name} | {App Label EN} | {App Label FR} | /business/{app} | {Icon} | Existing/New |
|
|
186
|
-
| Module | {module_name} | {Module Label EN} | {Module Label FR} | /business/{app}/{module} | {Icon} | **NEW** |
|
|
187
|
-
| Section (opt.) | {section} | {Section Label EN} | {Section Label FR} | /business/{app}/{module}/{section} | {Icon} | **NEW** |
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
> **Rule:** Only create entries marked "New". Existing entries are reused from the database.
|
|
191
|
-
> Provide labels in 4 languages: FR, EN, IT, DE.
|
|
192
|
-
|
|
193
|
-
**Permission hierarchy for this module:**
|
|
194
|
-
|
|
195
|
-
```markdown
|
|
196
|
-
### Permission Hierarchy (HasData seeds)
|
|
197
|
-
|
|
198
|
-
| Permission Path | Level | Action | Description |
|
|
199
|
-
|----------------|-------|--------|-------------|
|
|
200
|
-
| `business.{app}.{module}.*` | Module | Wildcard | Full module access |
|
|
201
|
-
| `business.{app}.{module}.read` | Module | Read | View list and details |
|
|
202
|
-
| `business.{app}.{module}.create` | Module | Create | Create new entries |
|
|
203
|
-
| `business.{app}.{module}.update` | Module | Update | Modify existing |
|
|
204
|
-
| `business.{app}.{module}.delete` | Module | Delete | Remove entries |
|
|
205
|
-
| `business.{app}.{module}.export` | Module | Execute | Export data (if needed) |
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**Role-Permission assignments (default matrix):**
|
|
209
|
-
|
|
210
|
-
| Permission | {App} Admin | {App} Manager | {App} Contributor | {App} Viewer |
|
|
211
|
-
|------------|-------------|---------------|-------------------|--------------|
|
|
212
|
-
| `*.{module}.*` | X | - | - | - |
|
|
213
|
-
| `*.{module}.read` | - | X | X | X |
|
|
214
|
-
| `*.{module}.create` | - | X | X | - |
|
|
215
|
-
| `*.{module}.update` | - | X | X | - |
|
|
216
|
-
| `*.{module}.delete` | - | - | - | - |
|
|
217
|
-
| `*.{module}.export` | - | X | - | - |
|
|
218
|
-
|
|
219
|
-
> **Note:** Admin gets wildcard (includes all actions). SuperAdmin inherits via `*` wildcard.
|
|
220
|
-
|
|
221
|
-
**SeedData files to create/modify:**
|
|
222
|
-
|
|
223
|
-
> **5 mandatory files** for every new module (4 EF Core HasData + 1 Application code):
|
|
224
|
-
|
|
225
|
-
| # | File | Layer | Action | Content |
|
|
226
|
-
|---|------|-------|--------|---------|
|
|
227
|
-
| 1 | `NavigationModuleConfiguration.cs` | Infrastructure (HasData) | Add entry | Module in `nav_Modules` |
|
|
228
|
-
| 2 | `NavigationTranslationConfiguration.cs` | Infrastructure (HasData) | Add entries | 4 translations (fr, en, it, de) per nav entity |
|
|
229
|
-
| 3 | `PermissionConfiguration.cs` | Infrastructure (HasData) | Add entries | All permissions listed above |
|
|
230
|
-
| 4 | `Permissions.cs` | Application (code) | Add static class | Compile-time constants for `[RequirePermission]` |
|
|
231
|
-
| 5 | `RolePermissionConfiguration.cs` | Infrastructure (HasData) | Add entries | Role→Permission for {App} Admin, {App} Manager, {App} Contributor, {App} Viewer |
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
### 7. Create UI Wireframes
|
|
236
|
-
|
|
237
|
-
**Main screen wireframe:**
|
|
238
|
-
|
|
239
|
-
```
|
|
240
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
241
|
-
│ [Logo] {Module Name} [User] [Menu] │
|
|
242
|
-
├─────────────────────────────────────────────────────────────┤
|
|
243
|
-
│ │
|
|
244
|
-
│ ┌─────────────────────────────────────────────────────┐ │
|
|
245
|
-
│ │ FILTERS │ │
|
|
246
|
-
│ │ [Field 1 ▼] [Field 2 ▼] [Search] │ │
|
|
247
|
-
│ └─────────────────────────────────────────────────────┘ │
|
|
248
|
-
│ │
|
|
249
|
-
│ ┌─────────────────────────────────────────────────────┐ │
|
|
250
|
-
│ │ DATA TABLE │ │
|
|
251
|
-
│ │ ┌────────┬────────┬────────┬─────────┐ │ │
|
|
252
|
-
│ │ │ Col 1 │ Col 2 │ Col 3 │ Actions │ │ │
|
|
253
|
-
│ │ ├────────┼────────┼────────┼─────────┤ │ │
|
|
254
|
-
│ │ │ data │ data │ data │ [E] [D] │ │ │
|
|
255
|
-
│ │ └────────┴────────┴────────┴─────────┘ │ │
|
|
256
|
-
│ └─────────────────────────────────────────────────────┘ │
|
|
257
|
-
│ │
|
|
258
|
-
│ [+ New] (if .create) [< Prev] [Next >] │
|
|
259
|
-
└─────────────────────────────────────────────────────────────┘
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
**UI Elements description:**
|
|
263
|
-
|
|
264
|
-
| Element | Type | Behavior | Permission |
|
|
265
|
-
|---------|------|----------|------------|
|
|
266
|
-
| [+ New] | Button | Opens create modal | `.create` |
|
|
267
|
-
| [E] | Icon | Opens edit modal | `.update` |
|
|
268
|
-
| [D] | Icon | Confirm + delete | `.delete` |
|
|
269
|
-
|
|
270
|
-
---
|
|
271
|
-
|
|
272
|
-
### 8. Write Gherkin Scenarios
|
|
273
|
-
|
|
274
|
-
```gherkin
|
|
275
|
-
Feature: {feature_id} {feature_description}
|
|
276
|
-
|
|
277
|
-
Background:
|
|
278
|
-
Given the system is configured with test data
|
|
279
|
-
And the permission system is active
|
|
280
|
-
|
|
281
|
-
@permission @403
|
|
282
|
-
Scenario: User without permission cannot create
|
|
283
|
-
Given I am logged in as "user@test.com" with role "ReadOnly"
|
|
284
|
-
When I send POST to "/api/business/{module}"
|
|
285
|
-
Then the response status should be 403
|
|
286
|
-
And the response should contain "Permission denied"
|
|
287
|
-
|
|
288
|
-
@happy-path
|
|
289
|
-
Scenario: Admin creates new item
|
|
290
|
-
Given I am logged in as "admin@test.com" with role "Admin"
|
|
291
|
-
And I have permission "business.{app}.{module}.create"
|
|
292
|
-
When I send POST to "/api/business/{module}" with:
|
|
293
|
-
| field1 | value1 |
|
|
294
|
-
| field2 | value2 |
|
|
295
|
-
Then the response status should be 201
|
|
296
|
-
And the response should contain "id"
|
|
297
|
-
|
|
298
|
-
@validation
|
|
299
|
-
Scenario: Validation error on required field
|
|
300
|
-
Given I am logged in with permission "business.{app}.{module}.create"
|
|
301
|
-
When I send POST to "/api/business/{module}" with:
|
|
302
|
-
| field1 | |
|
|
303
|
-
Then the response status should be 400
|
|
304
|
-
And the response should contain "field1 is required"
|
|
305
|
-
|
|
306
|
-
@business-rule @BR-001
|
|
307
|
-
Scenario: {BR-001 scenario}
|
|
308
|
-
Given {precondition}
|
|
309
|
-
When {action}
|
|
310
|
-
Then {expected result per BR-001}
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
---
|
|
314
|
-
|
|
315
|
-
### 9. Define Validations and Messages
|
|
316
|
-
|
|
317
|
-
**Field validations:**
|
|
318
|
-
|
|
319
|
-
| Field | Rule | Error Message (i18n key) |
|
|
320
|
-
|-------|------|--------------------------|
|
|
321
|
-
| {field} | Required | `{module}.errors.{field}Required` |
|
|
322
|
-
| {field} | MaxLength(100) | `{module}.errors.{field}TooLong` |
|
|
323
|
-
| email | Email format | `{module}.errors.invalidEmail` |
|
|
324
|
-
|
|
325
|
-
**System messages:**
|
|
326
|
-
|
|
327
|
-
| Code | Type | Message (i18n key) |
|
|
328
|
-
|------|------|-------------------|
|
|
329
|
-
| MSG-001 | Success | `{module}.messages.created` |
|
|
330
|
-
| MSG-002 | Success | `{module}.messages.updated` |
|
|
331
|
-
| MSG-003 | Success | `{module}.messages.deleted` |
|
|
332
|
-
| MSG-004 | Error | `{module}.errors.notFound` |
|
|
333
|
-
| MSG-005 | Error | `{module}.errors.permissionDenied` |
|
|
334
|
-
|
|
335
|
-
---
|
|
336
|
-
|
|
337
|
-
### 9b. Data Lifecycle & Cross-Module Specification (CONDITIONAL)
|
|
338
|
-
|
|
339
|
-
**Load ONLY if categories 11-13 were collected in discovery.**
|
|
340
|
-
|
|
341
|
-
#### If data lifecycle data collected (category 11):
|
|
342
|
-
|
|
343
|
-
| Entity | Retention Period | Archive Strategy | GDPR Impact | Base Class |
|
|
344
|
-
|--------|-----------------|-----------------|-------------|------------|
|
|
345
|
-
| {entity} | {duration} | {Archive/Purge/Anonymize} | {Yes/No + detail} | {SoftDeletableEntity/AuditableEntity} |
|
|
346
|
-
|
|
347
|
-
**State transitions:**
|
|
348
|
-
|
|
349
|
-
| Entity | States | Immutable After |
|
|
350
|
-
|--------|--------|-----------------|
|
|
351
|
-
| {entity} | {Draft -> Active -> Archived -> Deleted} | {state or "None"} |
|
|
352
|
-
|
|
353
|
-
#### If migration data collected (category 12):
|
|
354
|
-
|
|
355
|
-
| Source | Format | Volume | Quality Issues | Strategy |
|
|
356
|
-
|--------|--------|--------|----------------|----------|
|
|
357
|
-
| {source} | {Excel/CSV/DB/API} | {volume} | {issues} | {Big-bang/Progressive/Parallel} |
|
|
358
|
-
|
|
359
|
-
**Rollback plan:** {strategy from Q12.8}
|
|
360
|
-
|
|
361
|
-
#### If cross-module impact collected (category 13):
|
|
362
|
-
|
|
363
|
-
| Existing Module | Interaction Type | Shared Data | Impact on Existing |
|
|
364
|
-
|-----------------|-----------------|-------------|-------------------|
|
|
365
|
-
| {module} | {FK/Event/Query/Navigation} | {entities/data} | {None/Minor/Major} |
|
|
366
|
-
|
|
367
|
-
**MediatR events to create:**
|
|
368
|
-
|
|
369
|
-
| Event | Trigger | Consumers |
|
|
370
|
-
|-------|---------|-----------|
|
|
371
|
-
| {Entity}CreatedNotification | After create | {list of consuming modules} |
|
|
372
|
-
|
|
373
|
-
---
|
|
374
|
-
|
|
375
|
-
### 10. Compile FRD Document
|
|
376
|
-
|
|
377
|
-
Assemble complete FRD using template structure.
|
|
378
|
-
|
|
379
|
-
---
|
|
380
|
-
|
|
381
|
-
### 10b. Generate Context Digest
|
|
382
|
-
|
|
383
|
-
**Write digest to:** `{output_dir}/digest-03.md`
|
|
384
|
-
|
|
385
|
-
```markdown
|
|
386
|
-
# Digest: Step 03 - Specify
|
|
387
|
-
|
|
388
|
-
## Changes
|
|
389
|
-
- {output_dir}/3-functional-specification.md: FRD created
|
|
390
|
-
|
|
391
|
-
## Decisions
|
|
392
|
-
- {count} use cases defined
|
|
393
|
-
- {count} functional requirements (Must: X, Should: Y, Could: Z)
|
|
394
|
-
- Permission matrix: {count} permissions for {count} roles
|
|
395
|
-
|
|
396
|
-
## Findings
|
|
397
|
-
- Gherkin scenarios: {count}
|
|
398
|
-
- i18n keys: {count}
|
|
399
|
-
- UI wireframes: {count}
|
|
400
|
-
|
|
401
|
-
## State Updates
|
|
402
|
-
| Variable | New Value |
|
|
403
|
-
|----------|-----------|
|
|
404
|
-
| uc_count | {count} |
|
|
405
|
-
| fr_count | {count} |
|
|
406
|
-
| permission_count | {count} |
|
|
407
|
-
| scenario_count | {count} |
|
|
408
|
-
|
|
409
|
-
## For Next Step
|
|
410
|
-
- Completeness checklist ready for validation
|
|
411
|
-
- All BR->FR traces established
|
|
412
|
-
- Permission matrix finalized
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
---
|
|
416
|
-
|
|
417
|
-
### 11. Save Output
|
|
418
|
-
|
|
419
|
-
Write to: `{output_dir}/3-functional-specification.md`
|
|
420
|
-
|
|
421
|
-
Update `00-context.md`:
|
|
422
|
-
- Progress: `03-specify` -> "Complete"
|
|
423
|
-
- Add UC count, FR count, permission count
|
|
424
|
-
|
|
425
|
-
---
|
|
426
|
-
|
|
427
|
-
### 12. Display Summary and Load Next Step
|
|
428
|
-
|
|
429
|
-
**Display:**
|
|
430
|
-
|
|
431
|
-
| Field | Value |
|
|
432
|
-
|-------|-------|
|
|
433
|
-
| Step | SPECIFICATION |
|
|
434
|
-
| Feature | {feature_id} |
|
|
435
|
-
| Status | Complete |
|
|
436
|
-
| Use Cases | {UC count} |
|
|
437
|
-
| Requirements | {FR count} (Must: X, Should: Y, Could: Z) |
|
|
438
|
-
| Permissions | {permission count} |
|
|
439
|
-
| Gherkin scenarios | {scenario count} |
|
|
440
|
-
| Output | {output_dir}/3-functional-specification.md |
|
|
441
|
-
| Next | step-04-validate (Validation Gate) |
|
|
442
|
-
|
|
443
|
-
**Load next step:**
|
|
444
|
-
```
|
|
445
|
-
Read and execute: steps/step-04-validate.md
|
|
446
|
-
```
|
|
447
|
-
|
|
448
|
-
---
|
|
449
|
-
|
|
450
|
-
## OUTPUT FORMAT:
|
|
451
|
-
|
|
452
|
-
This step produces:
|
|
453
|
-
- `{output_dir}/3-functional-specification.md` (created)
|
|
454
|
-
- `{output_dir}/00-context.md` (updated)
|
|
455
|
-
|
|
456
|
-
Template loaded: **~150 lines** (vs 477 lines full file)
|
|
457
|
-
|
|
458
|
-
## ERROR HANDLING:
|
|
459
|
-
|
|
460
|
-
**If permission path format is invalid:**
|
|
461
|
-
1. Validate with MCP: `mcp__smartstack__validate_conventions`
|
|
462
|
-
2. If MCP unavailable: validate manually against pattern `business.{app}.{module}.{action}`
|
|
463
|
-
3. Fix and re-generate permission matrix
|
|
464
|
-
|
|
465
|
-
**If BR has no corresponding FR:**
|
|
466
|
-
1. Flag unmapped BR-IDs
|
|
467
|
-
2. Create placeholder FR with "To be specified"
|
|
468
|
-
3. Add to validation checklist for step-04
|
|
469
|
-
|
|
470
|
-
## NEXT STEP:
|
|
471
|
-
|
|
472
|
-
After completion, proceed to `steps/step-04-validate.md`
|