@atlashub/smartstack-cli 2.2.0 → 2.4.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/.documentation/cli-commands.html +1 -1
- package/.documentation/init.html +1 -1
- package/.documentation/installation.html +1 -1
- package/dist/index.js +76 -47
- package/dist/index.js.map +1 -1
- package/package.json +10 -7
- package/templates/agents/ba-reader.md +114 -9
- package/templates/agents/ba-writer.md +108 -27
- package/templates/agents/mcp-healthcheck.md +1 -1
- package/templates/ralph/README.md +1 -1
- package/templates/ralph/ralph.config.yaml +1 -1
- package/templates/skills/_shared.md +60 -0
- package/templates/skills/application/steps/step-00-init.md +32 -8
- package/templates/skills/business-analyse/SKILL.md +65 -42
- package/templates/skills/business-analyse/_shared.md +161 -51
- package/templates/skills/business-analyse/questionnaire/00-application.md +166 -0
- package/templates/skills/business-analyse/questionnaire/03-scope.md +7 -7
- package/templates/skills/business-analyse/questionnaire/12-migration.md +1 -1
- package/templates/skills/business-analyse/questionnaire.md +63 -19
- package/templates/skills/business-analyse/react/application-viewer.md +242 -0
- package/templates/skills/business-analyse/react/components.md +60 -8
- package/templates/skills/business-analyse/react/schema.md +413 -34
- package/templates/skills/business-analyse/schemas/application-schema.json +389 -0
- package/templates/skills/business-analyse/schemas/feature-schema.json +287 -46
- package/templates/skills/business-analyse/steps/step-00-init.md +110 -44
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +259 -0
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +282 -0
- package/templates/skills/business-analyse/steps/step-03-specify.md +489 -0
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +336 -0
- package/templates/skills/business-analyse/steps/step-05-handoff.md +1119 -0
- package/templates/skills/business-analyse/templates/tpl-handoff.md +11 -2
- package/templates/skills/mcp/SKILL.md +2 -2
- package/templates/skills/business-analyse/steps/step-01-analyse.md +0 -505
- package/templates/skills/business-analyse/steps/step-02-specify.md +0 -833
- package/templates/skills/business-analyse/steps/step-03-validate.md +0 -862
- package/templates/skills/business-analyse/steps/step-04-handoff.md +0 -1593
|
@@ -55,4 +55,4 @@
|
|
|
55
55
|
| "On saisira tout à la main" | **Migration non planifiée** | Si > 100 enregistrements, l'import automatisé est indispensable |
|
|
56
56
|
| Pas de validation post-migration | **Données non vérifiées** | Prévoir un rapport de migration : importés / rejetés / à corriger |
|
|
57
57
|
| Aucun rollback plan | **Risque de perte de données** | Toujours faire un backup avant migration + possibilité de rollback |
|
|
58
|
-
| "On migrera plus tard" | **Dette technique** | Si la migration est nécessaire, la planifier dès
|
|
58
|
+
| "On migrera plus tard" | **Dette technique** | Si la migration est nécessaire, la planifier dès le départ même si simplifiée |
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Elicitation Questionnaire - Business Analysis
|
|
2
2
|
|
|
3
|
-
> **Usage:** Structured questions for step-01-
|
|
3
|
+
> **Usage:** Structured questions for step-01-cadrage and step-03-specify
|
|
4
4
|
> **Standard:** BABOK v3 - Elicitation Techniques (VibeCoding-focused)
|
|
5
5
|
> **Model:** OPUS with ULTRATHINK
|
|
6
|
-
> **Total:** ~
|
|
6
|
+
> **Total:** ~68 targeted questions (dev-relevant only)
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -30,6 +30,42 @@
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## Category 0: Application Identity (8 questions)
|
|
34
|
+
|
|
35
|
+
> **Loaded when:** workflow.mode = "application" (multi-module)
|
|
36
|
+
> **Phase:** step-01-cadrage (before core questionnaires)
|
|
37
|
+
> **File:** `questionnaire/00-application.md`
|
|
38
|
+
|
|
39
|
+
### 0.1 Application Identity
|
|
40
|
+
|
|
41
|
+
| # | Question | Answer Type |
|
|
42
|
+
|---|----------|-------------|
|
|
43
|
+
| Q0.1 | Quel est le nom de l'application ? | PascalCase identifier |
|
|
44
|
+
| Q0.2 | En 1-2 phrases, quel est l'objectif principal ? | Free text |
|
|
45
|
+
|
|
46
|
+
### 0.2 Module Landscape
|
|
47
|
+
|
|
48
|
+
| # | Question | Answer Type |
|
|
49
|
+
|---|----------|-------------|
|
|
50
|
+
| Q0.3 | Combien de domaines fonctionnels distincts identifiez-vous ? | Number + names |
|
|
51
|
+
| Q0.4 | Lesquels sont indispensables pour la première version ? | List (must-haves) |
|
|
52
|
+
|
|
53
|
+
### 0.3 Application Roles
|
|
54
|
+
|
|
55
|
+
| # | Question | Answer Type |
|
|
56
|
+
|---|----------|-------------|
|
|
57
|
+
| Q0.5 | Les 4 rôles standards (Admin, Manager, Contributor, Viewer) conviennent-ils ? | Yes/Customize |
|
|
58
|
+
| Q0.6 | Certains rôles sont-ils spécifiques à certains modules ? | Per-role restrictions |
|
|
59
|
+
|
|
60
|
+
### 0.4 Cross-Module Expectations
|
|
61
|
+
|
|
62
|
+
| # | Question | Answer Type |
|
|
63
|
+
|---|----------|-------------|
|
|
64
|
+
| Q0.7 | Quels processus métier traversent plusieurs modules ? | List of E2E flows |
|
|
65
|
+
| Q0.8 | Quel rôle par défaut pour les nouveaux utilisateurs ? | Role selection |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
33
69
|
## Category 1: Business Context (4 questions)
|
|
34
70
|
|
|
35
71
|
### 1.1 Fundamental Need
|
|
@@ -237,13 +273,20 @@
|
|
|
237
273
|
|
|
238
274
|
## Questionnaire Usage
|
|
239
275
|
|
|
240
|
-
###
|
|
276
|
+
### Phase Mapping
|
|
277
|
+
|
|
278
|
+
| Phase | Categories Used |
|
|
279
|
+
|-------|----------------|
|
|
280
|
+
| step-01-cadrage | 00 (if app mode), 01, 02, 03, + conditionals (05, 06, 08, 09, 10) |
|
|
281
|
+
| step-03-specify (per module) | 04, 07, 11, 12, 13 (loaded per module) |
|
|
282
|
+
|
|
283
|
+
### Cadrage Phase
|
|
241
284
|
|
|
242
|
-
1. **Start:** Begin with Category 1 (Business Context)
|
|
285
|
+
1. **Start:** Begin with Category 0 (if application mode), then Category 1 (Business Context)
|
|
243
286
|
2. **Adapt:** Skip questions not relevant to the context
|
|
244
287
|
3. **Deepen:** Ask follow-up questions on vague answers
|
|
245
288
|
4. **Challenge:** Don't accept "we'll see later" on Must-Have
|
|
246
|
-
5. **Batch:** Present 3-
|
|
289
|
+
5. **Batch:** Present 3-4 questions per interaction (AskUserQuestion)
|
|
247
290
|
|
|
248
291
|
### Follow-up Questions
|
|
249
292
|
|
|
@@ -263,17 +306,18 @@ Each question kept passes this test:
|
|
|
263
306
|
|
|
264
307
|
## Summary
|
|
265
308
|
|
|
266
|
-
| Category | Questions | Focus |
|
|
267
|
-
|
|
268
|
-
|
|
|
269
|
-
|
|
|
270
|
-
|
|
|
271
|
-
|
|
|
272
|
-
|
|
|
273
|
-
|
|
|
274
|
-
|
|
|
275
|
-
|
|
|
276
|
-
|
|
|
277
|
-
|
|
|
278
|
-
|
|
|
279
|
-
|
|
|
309
|
+
| Category | Questions | Phase | Focus |
|
|
310
|
+
|----------|-----------|-------|-------|
|
|
311
|
+
| 0. Application Identity | 8 | step-01 (app mode) | Application name, modules, roles |
|
|
312
|
+
| 1. Business Context | 4 | step-01 | Problem + AS-IS/TO-BE |
|
|
313
|
+
| 2. Stakeholders | 8 | step-01 | Roles + needs |
|
|
314
|
+
| 3. Functional Scope | 8 | step-01 | MoSCoW + flows |
|
|
315
|
+
| 4. Data | 8 | step-03 (per module) | Entities + rules |
|
|
316
|
+
| 5. Integrations | 8 | step-01 (conditional) | Systems + flows |
|
|
317
|
+
| 6. Security | 8 | step-01 (conditional) | Permissions + restrictions |
|
|
318
|
+
| 7. UI | 8 | step-03 (per module) | Screens + experience |
|
|
319
|
+
| 8. Performance | 4 | step-01 (conditional) | Response time + tests |
|
|
320
|
+
| 9. Constraints | 4 | step-01 (conditional) | Tech stack + deps |
|
|
321
|
+
| 10. Documentation | 4 | step-01 (conditional) | User + tech docs |
|
|
322
|
+
| **Total Core** | **72** | | |
|
|
323
|
+
| 11-13 (conditional) | ~24 | step-03 (per module) | Lifecycle, migration, cross-module |
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Application-Level Business Analyse Viewer
|
|
2
|
+
|
|
3
|
+
> **Usage:** React component for application-level BA documentation within SmartStack web app
|
|
4
|
+
> **Route:** `/docs/business/{app}` (application overview)
|
|
5
|
+
> **Data source:** `docs/business/{app}/business-analyse/v{X.Y}/feature.json` (scope: "application")
|
|
6
|
+
> **Linked to:** Module viewers at `/docs/business/{app}/{module}`
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Component: ApplicationAnalyseViewer
|
|
11
|
+
|
|
12
|
+
### Props
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
interface ApplicationAnalyseViewerProps {
|
|
16
|
+
app: string; // Application code
|
|
17
|
+
version?: string; // Version to display (default: latest)
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Route Registration
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
// In app router configuration
|
|
25
|
+
{
|
|
26
|
+
path: '/docs/business/:app',
|
|
27
|
+
component: ApplicationAnalyseViewer,
|
|
28
|
+
exact: true
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Layout
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
┌─────────────────────────────────────────────────────────┐
|
|
36
|
+
│ 📋 Business Analyse: {app_name} v{version} │
|
|
37
|
+
│ Status: {status_badge} │
|
|
38
|
+
├─────────────────────────────────────────────────────────┤
|
|
39
|
+
│ │
|
|
40
|
+
│ ┌─ Tabs ──────────────────────────────────────────┐ │
|
|
41
|
+
│ │ [Cadrage] [Modules] [Dépendances] [Permissions] │ │
|
|
42
|
+
│ └─────────────────────────────────────────────────┘ │
|
|
43
|
+
│ │
|
|
44
|
+
│ {Tab Content} │
|
|
45
|
+
│ │
|
|
46
|
+
├─────────────────────────────────────────────────────────┤
|
|
47
|
+
│ Module Progress │
|
|
48
|
+
│ ┌──────────┬──────────┬──────────┬──────────┐ │
|
|
49
|
+
│ │Customers │ Products │ Orders │ Invoices │ │
|
|
50
|
+
│ │ ✓ done │ ✓ done │ ● active │ ○ pending│ │
|
|
51
|
+
│ └──────────┴──────────┴──────────┴──────────┘ │
|
|
52
|
+
└─────────────────────────────────────────────────────────┘
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Tab: Cadrage (Framing)
|
|
56
|
+
|
|
57
|
+
Displays the application-level framing:
|
|
58
|
+
|
|
59
|
+
| Section | Data Source | Display |
|
|
60
|
+
|---------|------------|---------|
|
|
61
|
+
| Problem | cadrage.problem | Text block |
|
|
62
|
+
| AS-IS | cadrage.asIs | Text block |
|
|
63
|
+
| TO-BE | cadrage.toBe | Text block |
|
|
64
|
+
| Stakeholders | cadrage.stakeholders | Table: role, description, frequency |
|
|
65
|
+
| Global Scope | cadrage.globalScope | MoSCoW badges: Must/Should/Could/Out |
|
|
66
|
+
| Risks | cadrage.risks | Severity-colored cards |
|
|
67
|
+
|
|
68
|
+
### Tab: Modules
|
|
69
|
+
|
|
70
|
+
Grid/cards layout showing all modules:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
┌─────────────────────┐ ┌─────────────────────┐
|
|
74
|
+
│ 📦 Customers │ │ 📦 Products │
|
|
75
|
+
│ Status: ✓ Specified │ │ Status: ✓ Specified │
|
|
76
|
+
│ Entities: 3 │ │ Entities: 2 │
|
|
77
|
+
│ BRs: 5 │ │ BRs: 3 │
|
|
78
|
+
│ Complexity: medium │ │ Complexity: simple │
|
|
79
|
+
│ [View Details →] │ │ [View Details →] │
|
|
80
|
+
└─────────────────────┘ └─────────────────────┘
|
|
81
|
+
┌─────────────────────┐ ┌─────────────────────┐
|
|
82
|
+
│ 📦 Orders │ │ 📦 Invoices │
|
|
83
|
+
│ Status: ● Active │ │ Status: ○ Pending │
|
|
84
|
+
│ Entities: 2 │ │ Entities: ~3 │
|
|
85
|
+
│ BRs: ~8 │ │ BRs: ~5 │
|
|
86
|
+
│ Complexity: complex │ │ Complexity: medium │
|
|
87
|
+
│ [View Details →] │ │ [View Details →] │
|
|
88
|
+
└─────────────────────┘ └─────────────────────┘
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Each card links to the module viewer: `/docs/business/{app}/{module}`
|
|
92
|
+
|
|
93
|
+
Status colors:
|
|
94
|
+
- ✓ Specified (green)
|
|
95
|
+
- ● In Progress (blue/animated)
|
|
96
|
+
- ○ Pending (gray)
|
|
97
|
+
- ✗ Error (red)
|
|
98
|
+
|
|
99
|
+
### Tab: Dépendances (Dependency Graph)
|
|
100
|
+
|
|
101
|
+
Interactive SVG/Canvas dependency graph:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
┌────────────┐ ┌────────────┐
|
|
105
|
+
│ Customers │────▶│ Orders │────▶┌────────────┐
|
|
106
|
+
└────────────┘ └────────────┘ │ Invoices │
|
|
107
|
+
┌────────────┐ │ └────────────┘
|
|
108
|
+
│ Products │─────────┘
|
|
109
|
+
└────────────┘
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Implementation options:
|
|
113
|
+
1. **Simple:** ASCII-rendered with `<pre>` (from dependencyGraph)
|
|
114
|
+
2. **Interactive:** SVG with zoom/pan using a lightweight library (e.g., dagre-d3 or vis.js)
|
|
115
|
+
|
|
116
|
+
Features:
|
|
117
|
+
- Nodes = modules, colored by status
|
|
118
|
+
- Edges = dependencies, labeled with type (FK, Event, Shared)
|
|
119
|
+
- Click on module → navigate to module viewer
|
|
120
|
+
- Layers/groups visualized (foundation → dependent)
|
|
121
|
+
|
|
122
|
+
### Tab: Permissions
|
|
123
|
+
|
|
124
|
+
Cross-module permission overview:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
┌──────────────────────────────────────────────────────────┐
|
|
128
|
+
│ Application Roles │
|
|
129
|
+
├──────────┬───────────┬──────────────┬───────────────────┤
|
|
130
|
+
│ Role │ Level │ Permissions │ Modules │
|
|
131
|
+
├──────────┼───────────┼──────────────┼───────────────────┤
|
|
132
|
+
│ Admin │ admin │ *.* (all) │ All │
|
|
133
|
+
│ Manager │ manager │ read,create, │ All │
|
|
134
|
+
│ │ │ update,assign│ │
|
|
135
|
+
│ Contrib. │ contrib. │ read,create, │ All │
|
|
136
|
+
│ │ │ update │ │
|
|
137
|
+
│ Viewer │ viewer │ read │ All │
|
|
138
|
+
└──────────┴───────────┴──────────────┴───────────────────┘
|
|
139
|
+
|
|
140
|
+
Per-Module Permission Paths:
|
|
141
|
+
┌──────────────┬──────────────────────────────────────────┐
|
|
142
|
+
│ Module │ Permission Paths │
|
|
143
|
+
├──────────────┼──────────────────────────────────────────┤
|
|
144
|
+
│ Customers │ business.sales.customers.{read|create|…} │
|
|
145
|
+
│ Products │ business.sales.products.{read|create|…} │
|
|
146
|
+
│ Orders │ business.sales.orders.{read|create|…} │
|
|
147
|
+
│ Invoices │ business.sales.invoices.{read|create|…} │
|
|
148
|
+
└──────────────┴──────────────────────────────────────────┘
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Module Progress Bar
|
|
152
|
+
|
|
153
|
+
Bottom section showing linear progress through modules:
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
interface ModuleProgressProps {
|
|
157
|
+
modules: Array<{
|
|
158
|
+
code: string;
|
|
159
|
+
status: 'pending' | 'in-progress' | 'specified' | 'validated';
|
|
160
|
+
isCurrent: boolean;
|
|
161
|
+
}>;
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Rendered as a horizontal stepper/progress bar with clickable module names.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Sub-Components
|
|
170
|
+
|
|
171
|
+
### ApplicationStatusBadge
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
const statusColors = {
|
|
175
|
+
'draft': 'gray',
|
|
176
|
+
'framed': 'blue',
|
|
177
|
+
'decomposed': 'indigo',
|
|
178
|
+
'specified': 'purple',
|
|
179
|
+
'consolidated': 'orange',
|
|
180
|
+
'handed-off': 'green'
|
|
181
|
+
};
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### ModuleCard
|
|
185
|
+
|
|
186
|
+
Compact card for the Modules tab grid.
|
|
187
|
+
|
|
188
|
+
### DependencyGraph
|
|
189
|
+
|
|
190
|
+
SVG-based or ASCII-rendered dependency visualization.
|
|
191
|
+
|
|
192
|
+
### PermissionOverview
|
|
193
|
+
|
|
194
|
+
Cross-module permission matrix display.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Data Loading
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
import type { ApplicationFeatureJson } from '../types/business-analyse';
|
|
202
|
+
|
|
203
|
+
export async function loadApplicationFeature(
|
|
204
|
+
app: string,
|
|
205
|
+
version: string
|
|
206
|
+
): Promise<ApplicationFeatureJson> {
|
|
207
|
+
const response = await fetch(
|
|
208
|
+
`/docs/business/${app}/business-analyse/v${version}/feature.json`
|
|
209
|
+
);
|
|
210
|
+
return response.json();
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export async function listApplicationVersions(
|
|
214
|
+
app: string
|
|
215
|
+
): Promise<string[]> {
|
|
216
|
+
const response = await fetch(
|
|
217
|
+
`/api/docs/business/${app}/business-analyse/versions`
|
|
218
|
+
);
|
|
219
|
+
return response.json();
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Navigation Between Levels
|
|
226
|
+
|
|
227
|
+
| From | To | Action |
|
|
228
|
+
|------|----|--------|
|
|
229
|
+
| Application overview | Module viewer | Click module card or "View Details" link |
|
|
230
|
+
| Module viewer | Application overview | Breadcrumb: `{App} > {Module}` → click `{App}` |
|
|
231
|
+
| Module viewer | Next module | "Module suivant →" button (from module progress) |
|
|
232
|
+
| Module viewer | Previous module | "← Module précédent" button |
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Consolidation View (when consolidated)
|
|
237
|
+
|
|
238
|
+
After consolidation (status = "consolidated" or "handed-off"), additional sections appear:
|
|
239
|
+
|
|
240
|
+
- **Cross-Module Interactions:** Table showing FK refs, events, shared entities
|
|
241
|
+
- **E2E Flows:** Visual flow diagrams from consolidation.e2eFlows
|
|
242
|
+
- **Global Risk Assessment:** Risk dashboard with color-coded indicators
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# React Components - Business Analyse Viewer
|
|
2
2
|
|
|
3
3
|
> **Usage:** React component that renders feature.json directly
|
|
4
|
-
> **Loaded in:** step-
|
|
5
|
-
> **Data source:** `docs/business/{app}/{module}/business-analyse/v{X.Y}/feature.json`
|
|
4
|
+
> **Loaded in:** step-05-handoff.md
|
|
5
|
+
> **Data source (module):** `docs/business/{app}/{module}/business-analyse/v{X.Y}/feature.json`
|
|
6
|
+
> **Data source (application):** `docs/business/{app}/business-analyse/v{X.Y}/feature.json`
|
|
7
|
+
> **Related:** `react/application-viewer.md` for application-level view
|
|
6
8
|
> **Context7:** /facebook/react, /lucide-icons/lucide-react
|
|
7
9
|
|
|
8
10
|
---
|
|
@@ -34,16 +36,19 @@ import {
|
|
|
34
36
|
import type { FeatureJson, FeatureStatus } from '@/types/business-analyse';
|
|
35
37
|
import { loadFeature, listVersions } from '@/services/businessAnalyse';
|
|
36
38
|
|
|
37
|
-
// Status Badge Component
|
|
39
|
+
// Status Badge Component (supports both module and application statuses)
|
|
38
40
|
function StatusBadge({ status }: { status: FeatureStatus }) {
|
|
39
41
|
const config: Record<FeatureStatus, { color: string; label: string }> = {
|
|
40
42
|
'draft': { color: 'bg-gray-500/10 text-gray-600', label: 'Draft' },
|
|
43
|
+
'framed': { color: 'bg-sky-500/10 text-sky-600', label: 'Framed' },
|
|
41
44
|
'analysed': { color: 'bg-blue-500/10 text-blue-600', label: 'Analysed' },
|
|
45
|
+
'decomposed': { color: 'bg-indigo-500/10 text-indigo-600', label: 'Decomposed' },
|
|
42
46
|
'specified': { color: 'bg-yellow-500/10 text-yellow-600', label: 'Specified' },
|
|
47
|
+
'consolidated': { color: 'bg-orange-500/10 text-orange-600', label: 'Consolidated' },
|
|
43
48
|
'approved': { color: 'bg-green-500/10 text-green-600', label: 'Approved' },
|
|
44
49
|
'handed-off': { color: 'bg-purple-500/10 text-purple-600', label: 'Handed Off' }
|
|
45
50
|
};
|
|
46
|
-
const { color, label } = config[status];
|
|
51
|
+
const { color, label } = config[status] || { color: 'bg-gray-500/10 text-gray-600', label: status };
|
|
47
52
|
return (
|
|
48
53
|
<span className={`px-2 py-0.5 rounded text-xs font-medium ${color}`}>
|
|
49
54
|
{label}
|
|
@@ -155,6 +160,7 @@ export function BusinessAnalyseViewer() {
|
|
|
155
160
|
{ key: 'useCases', label: t('sections.useCases', 'Use Cases'), icon: Users },
|
|
156
161
|
{ key: 'permissions', label: t('sections.permissions', 'Permissions'), icon: Shield },
|
|
157
162
|
{ key: 'api', label: t('sections.api', 'API Endpoints'), icon: Zap },
|
|
163
|
+
{ key: 'wireframes', label: t('sections.wireframes', 'Wireframes'), icon: Layout },
|
|
158
164
|
{ key: 'suggestions', label: t('sections.suggestions', 'Suggestions'), icon: BookOpen },
|
|
159
165
|
{ key: 'changelog', label: t('sections.changelog', 'Changelog'), icon: GitBranch }
|
|
160
166
|
];
|
|
@@ -433,9 +439,55 @@ export function BusinessAnalyseViewer() {
|
|
|
433
439
|
</div>
|
|
434
440
|
</NumberedSection>
|
|
435
441
|
|
|
436
|
-
{/* Section 7:
|
|
442
|
+
{/* Section 7: Wireframes & Mockups */}
|
|
443
|
+
{feature.specification.wireframes?.length > 0 && (
|
|
444
|
+
<NumberedSection number={7} title="Wireframes & Mockups" icon={Layout}>
|
|
445
|
+
<div className="space-y-6">
|
|
446
|
+
{feature.specification.wireframes.map((wf) => (
|
|
447
|
+
<div key={wf.screen} className="border border-[var(--border-color)] rounded-lg p-4">
|
|
448
|
+
<div className="flex items-center justify-between mb-3">
|
|
449
|
+
<h3 className="font-semibold flex items-center gap-2">
|
|
450
|
+
{wf.screen}
|
|
451
|
+
{wf.section && (
|
|
452
|
+
<span className="px-2 py-0.5 rounded bg-[var(--bg-secondary)] text-xs text-[var(--text-secondary)]">
|
|
453
|
+
Section: {wf.section}
|
|
454
|
+
</span>
|
|
455
|
+
)}
|
|
456
|
+
</h3>
|
|
457
|
+
<div className="flex gap-1">
|
|
458
|
+
{wf.permissionsRequired?.map((perm) => (
|
|
459
|
+
<code key={perm} className="px-2 py-0.5 rounded bg-amber-500/10 text-amber-600 text-xs">
|
|
460
|
+
{perm}
|
|
461
|
+
</code>
|
|
462
|
+
))}
|
|
463
|
+
</div>
|
|
464
|
+
</div>
|
|
465
|
+
<p className="text-sm text-[var(--text-secondary)] mb-3">{wf.description}</p>
|
|
466
|
+
{/* Render mockup based on format */}
|
|
467
|
+
{wf.mockup && (
|
|
468
|
+
<div className="bg-[var(--bg-secondary)] rounded-lg p-4 overflow-x-auto">
|
|
469
|
+
{wf.mockupFormat === 'svg' ? (
|
|
470
|
+
<div dangerouslySetInnerHTML={{ __html: wf.mockup }} />
|
|
471
|
+
) : (
|
|
472
|
+
<pre className="text-xs font-mono whitespace-pre leading-relaxed">
|
|
473
|
+
{wf.mockup}
|
|
474
|
+
</pre>
|
|
475
|
+
)}
|
|
476
|
+
</div>
|
|
477
|
+
)}
|
|
478
|
+
<div className="flex gap-4 mt-3 text-xs text-[var(--text-secondary)]">
|
|
479
|
+
<span>Elements: {wf.elements.join(', ')}</span>
|
|
480
|
+
<span>Actions: {wf.actions.join(', ')}</span>
|
|
481
|
+
</div>
|
|
482
|
+
</div>
|
|
483
|
+
))}
|
|
484
|
+
</div>
|
|
485
|
+
</NumberedSection>
|
|
486
|
+
)}
|
|
487
|
+
|
|
488
|
+
{/* Section 8: Suggestions */}
|
|
437
489
|
{feature.suggestions.length > 0 && (
|
|
438
|
-
<NumberedSection number={
|
|
490
|
+
<NumberedSection number={8} title={sections[7].label} icon={BookOpen}>
|
|
439
491
|
<div className="space-y-2">
|
|
440
492
|
{feature.suggestions.map((s) => (
|
|
441
493
|
<div key={s.code} className={`flex items-center justify-between p-3 rounded-lg border ${
|
|
@@ -461,8 +513,8 @@ export function BusinessAnalyseViewer() {
|
|
|
461
513
|
</NumberedSection>
|
|
462
514
|
)}
|
|
463
515
|
|
|
464
|
-
{/* Section
|
|
465
|
-
<NumberedSection number={
|
|
516
|
+
{/* Section 9: Changelog */}
|
|
517
|
+
<NumberedSection number={9} title={sections[8].label} icon={GitBranch}>
|
|
466
518
|
<div className="space-y-3">
|
|
467
519
|
{feature.changelog.map((entry) => (
|
|
468
520
|
<div key={entry.version} className="border-l-2 border-[var(--color-primary-600)] pl-4">
|