@atlashub/smartstack-cli 4.74.0 → 4.76.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/dist/index.js +152 -31
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +14 -3
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/agents/ba-reader.md +17 -15
- package/templates/agents/ba-writer.md +49 -51
- package/templates/skills/apex/SKILL.md +2 -2
- package/templates/skills/apex/_shared.md +1 -1
- package/templates/skills/apex/references/checks/backend-checks.sh +21 -7
- package/templates/skills/apex/references/checks/frontend-checks.sh +26 -0
- package/templates/skills/apex/references/checks/infrastructure-checks.sh +47 -10
- package/templates/skills/apex/references/checks/seed-checks.sh +47 -7
- package/templates/skills/apex/references/core-seed-data.md +20 -18
- package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +3 -0
- package/templates/skills/apex/references/post-checks.md +23 -3
- package/templates/skills/apex/references/smartstack-api.md +4 -4
- package/templates/skills/apex/references/smartstack-frontend.md +54 -8
- package/templates/skills/apex/references/smartstack-layers.md +6 -6
- package/templates/skills/apex/steps/step-00-init.md +75 -1
- package/templates/skills/apex/steps/step-03-execute.md +16 -4
- package/templates/skills/apex/steps/step-03b-layer1-seed.md +65 -6
- package/templates/skills/apex/steps/step-03c-layer2-backend.md +50 -5
- package/templates/skills/apex/steps/step-03d-layer3-frontend.md +226 -4
- package/templates/skills/apex/steps/step-04-examine.md +163 -0
- package/templates/skills/apex-verify/SKILL.md +110 -0
- package/templates/skills/apex-verify/references/audit-rules.md +50 -0
- package/templates/skills/apex-verify/steps/step-00-init.md +119 -0
- package/templates/skills/apex-verify/steps/step-01-nav-audit.md +92 -0
- package/templates/skills/apex-verify/steps/step-02-crud-audit.md +127 -0
- package/templates/skills/apex-verify/steps/step-03-perm-audit.md +119 -0
- package/templates/skills/apex-verify/steps/step-04-route-audit.md +98 -0
- package/templates/skills/apex-verify/steps/step-05-report.md +110 -0
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +3 -0
- package/templates/skills/application/templates-frontend.md +2 -2
- package/templates/skills/business-analyse/SKILL.md +17 -3
- package/templates/skills/business-analyse/_shared.md +64 -0
- package/templates/skills/business-analyse/patterns/suggestion-catalog.md +34 -26
- package/templates/skills/business-analyse/questionnaire/01-context.md +13 -9
- package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +20 -27
- package/templates/skills/business-analyse/questionnaire.md +86 -9
- package/templates/skills/business-analyse/references/03-json-schemas.md +221 -0
- package/templates/skills/business-analyse/references/03-post-check-validation.md +208 -0
- package/templates/skills/business-analyse/references/03-smartstack-entity-guards.md +32 -0
- package/templates/skills/business-analyse/references/04-cross-module-validation.md +95 -0
- package/templates/skills/business-analyse/references/04-file-allocation.md +162 -0
- package/templates/skills/business-analyse/references/04-naming-audit-checks.md +174 -0
- package/templates/skills/business-analyse/references/04-semantic-validation-matrix.md +118 -0
- package/templates/skills/business-analyse/references/canonical-json-formats.md +7 -3
- package/templates/skills/business-analyse/references/domain-research-playbook.md +234 -0
- package/templates/skills/business-analyse/references/entity-sourcing-presentation.md +166 -0
- package/templates/skills/business-analyse/references/init-resume-logic.md +70 -0
- package/templates/skills/business-analyse/references/module-completeness-challenge.md +174 -0
- package/templates/skills/business-analyse/references/multi-app-detection.md +149 -0
- package/templates/skills/business-analyse/references/portal-classification.md +52 -0
- package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
- package/templates/skills/business-analyse/references/validation-checklist.md +35 -6
- package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +50 -6
- package/templates/skills/business-analyse/steps/step-00-init.md +22 -190
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +365 -269
- package/templates/skills/business-analyse/steps/step-02-structure.md +98 -20
- package/templates/skills/business-analyse/steps/step-03-specify.md +810 -229
- package/templates/skills/business-analyse/steps/step-04-consolidate.md +509 -278
- package/templates/skills/business-analyse-design/SKILL.md +10 -0
- package/templates/skills/business-analyse-design/references/screens-post-check.md +221 -0
- package/templates/skills/business-analyse-design/references/screens-type-mapping.md +138 -0
- package/templates/skills/business-analyse-design/references/smartcomponents-templates.md +225 -0
- package/templates/skills/{business-analyse → business-analyse-design}/references/spec-auto-inference.md +117 -117
- package/templates/skills/business-analyse-design/steps/step-01-screens.md +36 -162
- package/templates/skills/business-analyse-design/steps/step-02-wireframes.md +8 -7
- package/templates/skills/business-analyse-design/steps/step-03-navigation.md +89 -42
- package/templates/skills/business-analyse-develop/references/compact-loop.md +9 -0
- package/templates/skills/business-analyse-develop/references/handoff-quality-gate.md +132 -0
- package/templates/skills/business-analyse-develop/references/prd-v3-transformation.md +326 -0
- package/templates/skills/business-analyse-develop/references/report-reconciliation.md +140 -0
- package/templates/skills/business-analyse-develop/references/report-template.md +142 -0
- package/templates/skills/business-analyse-develop/steps/step-01-task.md +5 -177
- package/templates/skills/business-analyse-develop/steps/step-02-execute.md +17 -4
- package/templates/skills/business-analyse-develop/steps/step-03-commit.md +6 -2
- package/templates/skills/business-analyse-develop/steps/step-04-check.md +6 -0
- package/templates/skills/business-analyse-develop/steps/step-05-report.md +3 -269
- package/templates/skills/business-analyse-handoff/SKILL.md +10 -0
- package/templates/skills/business-analyse-handoff/references/agent-handoff-transform-prompt.md +211 -0
- package/templates/skills/business-analyse-handoff/references/context-isolation-pattern.md +47 -0
- package/templates/skills/business-analyse-handoff/references/handoff-file-inventory.md +49 -0
- package/templates/skills/business-analyse-handoff/references/handoff-global-validation.md +142 -0
- package/templates/skills/business-analyse-handoff/references/prd-validation-checks.md +125 -0
- package/templates/skills/business-analyse-handoff/references/project-index-update.md +98 -0
- package/templates/skills/business-analyse-handoff/steps/step-01-transform.md +9 -160
- package/templates/skills/business-analyse-handoff/steps/step-02-export.md +10 -99
- package/templates/skills/business-analyse-html/SKILL.md +10 -0
- package/templates/skills/business-analyse-html/html/ba-interactive.html +504 -97
- package/templates/skills/business-analyse-html/html/src/scripts/01-data-init.js +79 -2
- package/templates/skills/business-analyse-html/html/src/scripts/02-navigation.js +6 -46
- package/templates/skills/business-analyse-html/html/src/scripts/05-render-specs.js +80 -11
- package/templates/skills/business-analyse-html/html/src/scripts/06-render-consolidation.js +2 -2
- package/templates/skills/business-analyse-html/html/src/scripts/06-render-mockups.js +94 -36
- package/templates/skills/business-analyse-html/html/src/scripts/12-render-diagrams.js +162 -0
- package/templates/skills/business-analyse-html/html/src/styles/10-diagrams.css +73 -0
- package/templates/skills/business-analyse-html/html/src/template.html +2 -0
- package/templates/skills/business-analyse-html/references/02-embedded-artifacts-building.md +144 -0
- package/templates/skills/business-analyse-html/references/02-feature-data-building.md +143 -0
- package/templates/skills/business-analyse-html/references/02-mapping-tables.md +442 -0
- package/templates/skills/business-analyse-html/references/02-normalization-helpers.md +139 -0
- package/templates/skills/business-analyse-html/references/02-screen-format-detection.md +283 -0
- package/templates/skills/business-analyse-html/references/02-self-check-validation.md +199 -0
- package/templates/skills/business-analyse-html/references/data-build.md +24 -1
- package/templates/skills/business-analyse-html/references/data-mapping.md +119 -17
- package/templates/skills/business-analyse-html/steps/step-02-build-data.md +18 -555
- package/templates/skills/business-analyse-html/steps/step-04-verify.md +92 -3
- package/templates/skills/business-analyse-quick/SKILL.md +807 -0
- package/templates/skills/{sketch → business-analyse-quick}/references/domain-heuristics.md +59 -3
- package/templates/skills/business-analyse-quick/references/prd-schema.md +268 -0
- package/templates/skills/business-analyse-review/SKILL.md +10 -0
- package/templates/skills/business-analyse-review/references/review-data-mapping.md +6 -0
- package/templates/skills/business-analyse-status/SKILL.md +8 -0
- package/templates/skills/dev-start/SKILL.md +143 -307
- package/templates/skills/efcore/SKILL.md +13 -0
- package/templates/skills/sketch/SKILL.md +15 -153
- package/templates/skills/ui-components/SKILL.md +1 -1
- package/templates/skills/ui-components/patterns/data-table.md +1 -1
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
# Specification: Auto-Inference Rules
|
|
2
|
-
|
|
3
|
-
> Reference for step-03-specify.md — convention/override depth auto-generation from entity definitions.
|
|
4
|
-
|
|
5
|
-
## Entity Attribute → SmartTable Column
|
|
6
|
-
|
|
7
|
-
| Attribute Type | Column Format | Sortable | Filterable | Notes |
|
|
8
|
-
|---|---|---|---|---|
|
|
9
|
-
| string + unique | text | yes | yes | clickAction: navigate:detail |
|
|
10
|
-
| string | text | yes | yes | — |
|
|
11
|
-
| enum / status | badge | yes | yes (multi-select) | colorMap from lifeCycles if exists |
|
|
12
|
-
| FK:Entity | text (join .name) | yes | yes (EntityLookup) | Display related entity name, filter via searchable EntityLookup |
|
|
13
|
-
| decimal | currency | yes | no | — |
|
|
14
|
-
| int | number | yes | no | — |
|
|
15
|
-
| datetime | date-relative | yes | yes (date-range) | — |
|
|
16
|
-
| bool | boolean | yes | yes (toggle) | — |
|
|
17
|
-
| text (long) | — | no | no | Hidden in table, visible in detail |
|
|
18
|
-
|
|
19
|
-
## Entity Attribute → SmartForm Field
|
|
20
|
-
|
|
21
|
-
| Attribute Type | Component | Required from | Notes |
|
|
22
|
-
|---|---|---|---|
|
|
23
|
-
| string | Input | entity.required | — |
|
|
24
|
-
| string (multiline) | TextArea | entity.required | rows: 4 |
|
|
25
|
-
| enum | Select | entity.required | source: enum name |
|
|
26
|
-
| FK:Entity | EntityLookup | entity.required | source: target entity, searchable. Component: `@/components/ui/EntityLookup`. NEVER plain text input for FK Guid fields. Backend API MUST support `?search=` param. See `smartstack-frontend.md` section 6. |
|
|
27
|
-
| FK:User (person role) | `EntityLookup` | entity.required | searchable dropdown searching Users by name + email. `<EntityLookup apiEndpoint="/api/administration/users" mapOption={(user) => ({id: user.id, label: `${user.firstName} ${user.lastName}`, sublabel: user.email})} />` |
|
|
28
|
-
| decimal | NumberInput | entity.required | — |
|
|
29
|
-
| int | NumberInput | entity.required | — |
|
|
30
|
-
| datetime | DatePicker | entity.required | — |
|
|
31
|
-
| bool | Toggle | — | default: false |
|
|
32
|
-
|
|
33
|
-
## Auto-Generated UI Components by featureType
|
|
34
|
-
|
|
35
|
-
> **RULE:** Sections are functional, not CRUD-based. `create`/`edit` are separate pages with own URL routes (`/create` and `/:id/edit`). `detail` is a tabbed page reached from `list`.
|
|
36
|
-
|
|
37
|
-
| featureType | Sections (functional) | permissionMode | List page includes | Form pages | Detail page tabs |
|
|
38
|
-
|---|---|---|---|---|---|
|
|
39
|
-
| data-centric | list | `crud` | grid, filters, create button | `/create` page, `/:id/edit` page | Infos, {relations} |
|
|
40
|
-
| data-centric | (detail — implicit) | `inherit` | — | — | — |
|
|
41
|
-
| workflow | list | `crud` | grid, filters, create button | `/create` page, `/:id/edit` page | Infos, {relations}, Historique |
|
|
42
|
-
| workflow | approve | `custom:approve,reject` | — | — | — |
|
|
43
|
-
| integration | list | `crud` | grid, filters, config button | `/create` page, `/:id/edit` page | Infos, Config, Logs |
|
|
44
|
-
| reporting | dashboard | `read-only` | — | — | — |
|
|
45
|
-
| full-module | list | `crud` | grid, filters, create button | `/create` page, `/:id/edit` page | Infos, {relations}, Historique |
|
|
46
|
-
| full-module | dashboard | `read-only` | — | — | — |
|
|
47
|
-
|
|
48
|
-
> **RULE:** `detail` is NEVER a section with its own permission set. It is always `sectionType: view`, `permissionMode: inherit`. Detail pages inherit permissions from their parent module.
|
|
49
|
-
|
|
50
|
-
## Component Generation Rules
|
|
51
|
-
|
|
52
|
-
1. **list section:** SmartTable with all non-long-text attributes as columns, actions = [view, edit, delete], defaultSort = { createdAt, desc }. Create button navigates to `/create` page. Edit action navigates to `/:id/edit` page.
|
|
53
|
-
2. **create page (`/create` route):** SmartForm (full page) with all writable attributes as fields, component inferred from type. Back button + form + submit. NEVER a modal.
|
|
54
|
-
3. **edit page (`/:id/edit` route):** Same form as create but pre-filled with entity data. Full page with back button. NEVER a modal or inline toggle.
|
|
55
|
-
4. **detail page (from list click):** TabPanel with: Info tab (all attributes read-only + edit button navigating to `/:id/edit`), relation tabs (child SmartTable for each 1:N relationship), History tab (if auditable). See "Detail Page Tab Auto-Inference" below for exact rules.
|
|
56
|
-
5. **dashboard section:** Trigger 3d (dashboard specification)
|
|
57
|
-
|
|
58
|
-
## Detail Page Tab Auto-Inference
|
|
59
|
-
|
|
60
|
-
> **RULE:** Every module with a `list` section MUST have a companion detail page. Tabs are inferred from multiple sources.
|
|
61
|
-
|
|
62
|
-
### Tab sources (merged in order)
|
|
63
|
-
|
|
64
|
-
| Priority | Source | Tabs generated |
|
|
65
|
-
|----------|--------|----------------|
|
|
66
|
-
| 1 | `coverageMatrix[].detailTabs` (from cadrage) | Exact tab names as specified by client |
|
|
67
|
-
| 2 | Entity `relationships[]` where `type = "1:N"` | One tab per child relationship (SmartTable) |
|
|
68
|
-
| 3 | Entity has `lifeCycles[]` | History tab (Timeline) |
|
|
69
|
-
| 4 | Always present | Info tab (first position) |
|
|
70
|
-
|
|
71
|
-
### Merge algorithm
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
detailTabs = []
|
|
75
|
-
|
|
76
|
-
# 1. Always add Info tab first
|
|
77
|
-
detailTabs.push({ code: "info", label: "Informations", content: DetailCard })
|
|
78
|
-
|
|
79
|
-
# 2. If cadrage specified detailTabs, use those names
|
|
80
|
-
IF coverageMatrix[module].detailTabs EXISTS:
|
|
81
|
-
FOR EACH tabName IN detailTabs:
|
|
82
|
-
IF tabName matches a 1:N relationship entity → SmartTable tab
|
|
83
|
-
ELIF tabName == "Historique"/"History" → Timeline tab
|
|
84
|
-
ELSE → custom DetailCard tab (contents TBD in step-03)
|
|
85
|
-
|
|
86
|
-
# 3. If no cadrage tabs, auto-infer from relationships
|
|
87
|
-
ELSE:
|
|
88
|
-
FOR EACH rel IN entity.relationships WHERE rel.type == "1:N":
|
|
89
|
-
detailTabs.push({ code: rel.target (kebab-case), label: rel.target (plural), content: SmartTable })
|
|
90
|
-
|
|
91
|
-
# 4. Add History tab if auditable
|
|
92
|
-
IF entity has lifeCycles:
|
|
93
|
-
detailTabs.push({ code: "history", label: "Historique", content: Timeline })
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Detail section auto-generation
|
|
97
|
-
|
|
98
|
-
When auto-generating the detail section, create:
|
|
99
|
-
- `specification.sections[]` entry with `code: "detail"`, `navigation: "hidden"`, route `/{app}/{module}/:id`
|
|
100
|
-
- `specification.uiWireframes[]` entry with `section: "detail"` and ASCII mockup showing all tabs
|
|
101
|
-
- Resources: `{module}-detail-header` (DetailHeader), `{module}-detail-tabs` (TabPanel), `{module}-info-card` (DetailCard), one `{module}-{relation}-grid` per relation tab, `{module}-history` (Timeline if auditable)
|
|
102
|
-
|
|
103
|
-
### Detail page navigation wiring
|
|
104
|
-
|
|
105
|
-
The detail page is NOT a sidebar entry. Navigation is handled by:
|
|
106
|
-
- **From list**: row click action `navigate:detail` → `/{app}/{module}/{id}`
|
|
107
|
-
- **Back button**: detail header → `/{app}/{module}`
|
|
108
|
-
- **Route registration**: route MUST be registered in frontend routing with `:id` parameter
|
|
109
|
-
|
|
110
|
-
## Status/Lifecycle Enhancement
|
|
111
|
-
|
|
112
|
-
If entity has a status/enum field AND lifeCycles exists:
|
|
113
|
-
- list section: status column gets `format: badge`, `colorMap: stateMachine:{Entity}`
|
|
114
|
-
- list section: rowActions get `showWhen` conditions based on state machine transitions
|
|
115
|
-
- detail section: add StatusBadge resource + transition action buttons
|
|
116
|
-
|
|
117
|
-
Write auto-generated sections to `specification.sections[]` via `ba-writer.enrichSection()`
|
|
1
|
+
# Specification: Auto-Inference Rules
|
|
2
|
+
|
|
3
|
+
> Reference for step-03-specify.md — convention/override depth auto-generation from entity definitions.
|
|
4
|
+
|
|
5
|
+
## Entity Attribute → SmartTable Column
|
|
6
|
+
|
|
7
|
+
| Attribute Type | Column Format | Sortable | Filterable | Notes |
|
|
8
|
+
|---|---|---|---|---|
|
|
9
|
+
| string + unique | text | yes | yes | clickAction: navigate:detail |
|
|
10
|
+
| string | text | yes | yes | — |
|
|
11
|
+
| enum / status | badge | yes | yes (multi-select) | colorMap from lifeCycles if exists |
|
|
12
|
+
| FK:Entity | text (join .name) | yes | yes (EntityLookup) | Display related entity name, filter via searchable EntityLookup |
|
|
13
|
+
| decimal | currency | yes | no | — |
|
|
14
|
+
| int | number | yes | no | — |
|
|
15
|
+
| datetime | date-relative | yes | yes (date-range) | — |
|
|
16
|
+
| bool | boolean | yes | yes (toggle) | — |
|
|
17
|
+
| text (long) | — | no | no | Hidden in table, visible in detail |
|
|
18
|
+
|
|
19
|
+
## Entity Attribute → SmartForm Field
|
|
20
|
+
|
|
21
|
+
| Attribute Type | Component | Required from | Notes |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| string | Input | entity.required | — |
|
|
24
|
+
| string (multiline) | TextArea | entity.required | rows: 4 |
|
|
25
|
+
| enum | Select | entity.required | source: enum name |
|
|
26
|
+
| FK:Entity | EntityLookup | entity.required | source: target entity, searchable. Component: `@/components/ui/EntityLookup`. NEVER plain text input for FK Guid fields. Backend API MUST support `?search=` param. See `smartstack-frontend.md` section 6. |
|
|
27
|
+
| FK:User (person role) | `EntityLookup` | entity.required | searchable dropdown searching Users by name + email. `<EntityLookup apiEndpoint="/api/administration/users" mapOption={(user) => ({id: user.id, label: `${user.firstName} ${user.lastName}`, sublabel: user.email})} />` |
|
|
28
|
+
| decimal | NumberInput | entity.required | — |
|
|
29
|
+
| int | NumberInput | entity.required | — |
|
|
30
|
+
| datetime | DatePicker | entity.required | — |
|
|
31
|
+
| bool | Toggle | — | default: false |
|
|
32
|
+
|
|
33
|
+
## Auto-Generated UI Components by featureType
|
|
34
|
+
|
|
35
|
+
> **RULE:** Sections are functional, not CRUD-based. `create`/`edit` are separate pages with own URL routes (`/create` and `/:id/edit`). `detail` is a tabbed page reached from `list`.
|
|
36
|
+
|
|
37
|
+
| featureType | Sections (functional) | permissionMode | List page includes | Form pages | Detail page tabs |
|
|
38
|
+
|---|---|---|---|---|---|
|
|
39
|
+
| data-centric | list | `crud` | grid, filters, create button | `/create` page, `/:id/edit` page | Infos, {relations} |
|
|
40
|
+
| data-centric | (detail — implicit) | `inherit` | — | — | — |
|
|
41
|
+
| workflow | list | `crud` | grid, filters, create button | `/create` page, `/:id/edit` page | Infos, {relations}, Historique |
|
|
42
|
+
| workflow | approve | `custom:approve,reject` | — | — | — |
|
|
43
|
+
| integration | list | `crud` | grid, filters, config button | `/create` page, `/:id/edit` page | Infos, Config, Logs |
|
|
44
|
+
| reporting | dashboard | `read-only` | — | — | — |
|
|
45
|
+
| full-module | list | `crud` | grid, filters, create button | `/create` page, `/:id/edit` page | Infos, {relations}, Historique |
|
|
46
|
+
| full-module | dashboard | `read-only` | — | — | — |
|
|
47
|
+
|
|
48
|
+
> **RULE:** `detail` is NEVER a section with its own permission set. It is always `sectionType: view`, `permissionMode: inherit`. Detail pages inherit permissions from their parent module.
|
|
49
|
+
|
|
50
|
+
## Component Generation Rules
|
|
51
|
+
|
|
52
|
+
1. **list section:** SmartTable with all non-long-text attributes as columns, actions = [view, edit, delete], defaultSort = { createdAt, desc }. Create button navigates to `/create` page. Edit action navigates to `/:id/edit` page.
|
|
53
|
+
2. **create page (`/create` route):** SmartForm (full page) with all writable attributes as fields, component inferred from type. Back button + form + submit. NEVER a modal.
|
|
54
|
+
3. **edit page (`/:id/edit` route):** Same form as create but pre-filled with entity data. Full page with back button. NEVER a modal or inline toggle.
|
|
55
|
+
4. **detail page (from list click):** TabPanel with: Info tab (all attributes read-only + edit button navigating to `/:id/edit`), relation tabs (child SmartTable for each 1:N relationship), History tab (if auditable). See "Detail Page Tab Auto-Inference" below for exact rules.
|
|
56
|
+
5. **dashboard section:** Trigger 3d (dashboard specification)
|
|
57
|
+
|
|
58
|
+
## Detail Page Tab Auto-Inference
|
|
59
|
+
|
|
60
|
+
> **RULE:** Every module with a `list` section MUST have a companion detail page. Tabs are inferred from multiple sources.
|
|
61
|
+
|
|
62
|
+
### Tab sources (merged in order)
|
|
63
|
+
|
|
64
|
+
| Priority | Source | Tabs generated |
|
|
65
|
+
|----------|--------|----------------|
|
|
66
|
+
| 1 | `coverageMatrix[].detailTabs` (from cadrage) | Exact tab names as specified by client |
|
|
67
|
+
| 2 | Entity `relationships[]` where `type = "1:N"` | One tab per child relationship (SmartTable) |
|
|
68
|
+
| 3 | Entity has `lifeCycles[]` | History tab (Timeline) |
|
|
69
|
+
| 4 | Always present | Info tab (first position) |
|
|
70
|
+
|
|
71
|
+
### Merge algorithm
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
detailTabs = []
|
|
75
|
+
|
|
76
|
+
# 1. Always add Info tab first
|
|
77
|
+
detailTabs.push({ code: "info", label: "Informations", content: DetailCard })
|
|
78
|
+
|
|
79
|
+
# 2. If cadrage specified detailTabs, use those names
|
|
80
|
+
IF coverageMatrix[module].detailTabs EXISTS:
|
|
81
|
+
FOR EACH tabName IN detailTabs:
|
|
82
|
+
IF tabName matches a 1:N relationship entity → SmartTable tab
|
|
83
|
+
ELIF tabName == "Historique"/"History" → Timeline tab
|
|
84
|
+
ELSE → custom DetailCard tab (contents TBD in step-03)
|
|
85
|
+
|
|
86
|
+
# 3. If no cadrage tabs, auto-infer from relationships
|
|
87
|
+
ELSE:
|
|
88
|
+
FOR EACH rel IN entity.relationships WHERE rel.type == "1:N":
|
|
89
|
+
detailTabs.push({ code: rel.target (kebab-case), label: rel.target (plural), content: SmartTable })
|
|
90
|
+
|
|
91
|
+
# 4. Add History tab if auditable
|
|
92
|
+
IF entity has lifeCycles:
|
|
93
|
+
detailTabs.push({ code: "history", label: "Historique", content: Timeline })
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Detail section auto-generation
|
|
97
|
+
|
|
98
|
+
When auto-generating the detail section, create:
|
|
99
|
+
- `specification.sections[]` entry with `code: "detail"`, `navigation: "hidden"`, route `/{app}/{module}/:id`
|
|
100
|
+
- `specification.uiWireframes[]` entry with `section: "detail"` and ASCII mockup showing all tabs
|
|
101
|
+
- Resources: `{module}-detail-header` (DetailHeader), `{module}-detail-tabs` (TabPanel), `{module}-info-card` (DetailCard), one `{module}-{relation}-grid` per relation tab, `{module}-history` (Timeline if auditable)
|
|
102
|
+
|
|
103
|
+
### Detail page navigation wiring
|
|
104
|
+
|
|
105
|
+
The detail page is NOT a sidebar entry. Navigation is handled by:
|
|
106
|
+
- **From list**: row click action `navigate:detail` → `/{app}/{module}/{id}`
|
|
107
|
+
- **Back button**: detail header → `/{app}/{module}`
|
|
108
|
+
- **Route registration**: route MUST be registered in frontend routing with `:id` parameter
|
|
109
|
+
|
|
110
|
+
## Status/Lifecycle Enhancement
|
|
111
|
+
|
|
112
|
+
If entity has a status/enum field AND lifeCycles exists:
|
|
113
|
+
- list section: status column gets `format: badge`, `colorMap: stateMachine:{Entity}`
|
|
114
|
+
- list section: rowActions get `showWhen` conditions based on state machine transitions
|
|
115
|
+
- detail section: add StatusBadge resource + transition action buttons
|
|
116
|
+
|
|
117
|
+
Write auto-generated sections to `specification.sections[]` via `ba-writer.enrichSection()`
|
|
@@ -9,7 +9,7 @@ next_step: steps/step-02-wireframes.md
|
|
|
9
9
|
|
|
10
10
|
## Objective
|
|
11
11
|
|
|
12
|
-
For each module, define all sections and resources with detailed interface specifications: SmartTable columns, SmartForm fields with types, SmartDashboard KPIs, SmartKanban columns.
|
|
12
|
+
For each module, define all sections and resources with detailed interface specifications: SmartTable columns, SmartForm fields with types, SmartDashboard KPIs, SmartKanban columns, SmartFilter filters, SmartCard layouts.
|
|
13
13
|
|
|
14
14
|
## Context Recovery
|
|
15
15
|
|
|
@@ -54,180 +54,54 @@ Load via ba-reader:
|
|
|
54
54
|
|
|
55
55
|
For each module, transform anticipatedSections into detailed screen specs.
|
|
56
56
|
|
|
57
|
-
**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"type": "SmartTable",
|
|
62
|
-
"label": "Grille des {entity-plural}",
|
|
63
|
-
"columns": [
|
|
64
|
-
{ "field": "code", "label": "Code", "type": "text", "sortable": true, "width": "100px" },
|
|
65
|
-
{ "field": "fullName", "label": "Nom", "type": "text", "sortable": true },
|
|
66
|
-
{ "field": "department.name", "label": "Departement", "type": "lookup", "filterable": true },
|
|
67
|
-
{ "field": "status", "label": "Statut", "type": "badge", "filterable": true, "options": ["Active", "Inactive"] }
|
|
68
|
-
],
|
|
69
|
-
"actions": ["create", "edit", "delete", "export"],
|
|
70
|
-
"filters": [
|
|
71
|
-
{ "field": "department", "type": "select", "label": "Departement" },
|
|
72
|
-
{ "field": "status", "type": "select", "label": "Statut" }
|
|
73
|
-
],
|
|
74
|
-
"permission": "{AppCode}.{ModuleCode}.Read",
|
|
75
|
-
"rowActions": ["edit", "view-detail"],
|
|
76
|
-
"defaultSort": { "field": "code", "direction": "asc" },
|
|
77
|
-
"pageSize": 25
|
|
78
|
-
}
|
|
79
|
-
```
|
|
57
|
+
> **SmartComponent templates & canonical output format:**
|
|
58
|
+
> Load: `/references/smartcomponents-templates.md`
|
|
59
|
+
> - All SmartComponent JSON examples (SmartTable, SmartForm, SmartDashboard, SmartKanban, SmartFilter, SmartCard)
|
|
60
|
+
> - Canonical screens.json output format with `sections[]` wrapper
|
|
80
61
|
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"code": "{entity}-form",
|
|
85
|
-
"type": "SmartForm",
|
|
86
|
-
"label": "Fiche {entity}",
|
|
87
|
-
"tabs": [
|
|
88
|
-
{
|
|
89
|
-
"label": "Informations",
|
|
90
|
-
"fields": [
|
|
91
|
-
{ "field": "firstName", "label": "Prenom", "type": "text", "required": true, "col": 6 },
|
|
92
|
-
{ "field": "lastName", "label": "Nom", "type": "text", "required": true, "col": 6 },
|
|
93
|
-
{ "field": "email", "label": "Email", "type": "email", "required": true, "validation": "unique" },
|
|
94
|
-
{ "field": "department", "label": "Departement", "type": "lookup", "entity": "Department", "required": true },
|
|
95
|
-
{ "field": "status", "label": "Statut", "type": "select", "options": ["Active", "Inactive"], "readonly": "onCreate" }
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"label": "Contrats",
|
|
100
|
-
"type": "subtable",
|
|
101
|
-
"entity": "Contract",
|
|
102
|
-
"columns": ["contractType", "startDate", "endDate", "status"]
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
"permission": "{AppCode}.{ModuleCode}.Update"
|
|
106
|
-
}
|
|
107
|
-
```
|
|
62
|
+
### 3. Column/Field Type Mapping & Business Rules
|
|
108
63
|
|
|
109
|
-
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"code": "{module}-dashboard",
|
|
113
|
-
"type": "SmartDashboard",
|
|
114
|
-
"label": "Tableau de bord {module}",
|
|
115
|
-
"kpis": [
|
|
116
|
-
{ "label": "Total actifs", "value": "count(status=Active)", "icon": "users", "color": "primary" },
|
|
117
|
-
{ "label": "En conge", "value": "count(status=OnLeave)", "icon": "calendar", "color": "warning" }
|
|
118
|
-
],
|
|
119
|
-
"charts": [
|
|
120
|
-
{ "type": "pie", "label": "Repartition par departement", "dataSource": "employees", "groupBy": "department" },
|
|
121
|
-
{ "type": "bar", "label": "Evolution des effectifs", "dataSource": "employees", "groupBy": "hireDate.year" }
|
|
122
|
-
],
|
|
123
|
-
"permission": "{AppCode}.{ModuleCode}.Read"
|
|
124
|
-
}
|
|
125
|
-
```
|
|
64
|
+
Map entity attribute types to UI component types and apply business rules for computed fields, lookups, and workflows.
|
|
126
65
|
|
|
127
|
-
**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
{ "value": "Submitted", "label": "Soumis", "color": "blue" },
|
|
137
|
-
{ "value": "Approved", "label": "Approuve", "color": "green" }
|
|
138
|
-
],
|
|
139
|
-
"cardFields": ["code", "assignee", "dueDate"],
|
|
140
|
-
"permission": "{AppCode}.{ModuleCode}.Read"
|
|
141
|
-
}
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### 3. Column/Field Type Mapping
|
|
145
|
-
|
|
146
|
-
Map entity attribute types to UI component types:
|
|
147
|
-
|
|
148
|
-
| Entity type | SmartTable type | SmartForm type |
|
|
149
|
-
|-------------|----------------|----------------|
|
|
150
|
-
| `string` | `text` | `text` |
|
|
151
|
-
| `int`, `decimal` | `number` | `number` |
|
|
152
|
-
| `date` | `date` | `datepicker` |
|
|
153
|
-
| `datetime` | `datetime` | `datetimepicker` |
|
|
154
|
-
| `bool` | `boolean` | `checkbox` |
|
|
155
|
-
| `enum` | `badge` | `select` |
|
|
156
|
-
| `guid` (FK) | `lookup` | `lookup` |
|
|
157
|
-
| `text` (long) | `text` (truncated) | `textarea` |
|
|
66
|
+
> **Type mapping, readonly rules, computed attribute handling, lookup detection, and workflow auto-detection:**
|
|
67
|
+
> Load: `/references/screens-type-mapping.md`
|
|
68
|
+
> - Column/field type mapping table
|
|
69
|
+
> - Computed attribute rules (readonly on edit, absent on create)
|
|
70
|
+
> - Readonly field rules (boolean only, no string values)
|
|
71
|
+
> - SmartForm section location rules (list vs detail)
|
|
72
|
+
> - Lookup field entity requirement (SmartForm + SmartFilter)
|
|
73
|
+
> - SmartKanban auto-detection rule for workflow entities (status enum >= 3 options)
|
|
74
|
+
> - SmartFilter mandatory rule for list sections with SmartTable
|
|
158
75
|
|
|
159
76
|
### 4. Write screens.json
|
|
160
77
|
|
|
161
|
-
For each module, write via ba-writer:
|
|
78
|
+
For each module, write via ba-writer using the canonical `sections[]` format:
|
|
162
79
|
|
|
163
|
-
> **CANONICAL FORMAT (MANDATORY):** screens.json MUST use the `sections[]` wrapper
|
|
164
|
-
>
|
|
165
|
-
> Each section MUST have a `resources[]` array with typed resource objects (SmartTable, SmartForm, etc.).
|
|
166
|
-
> The flat `screens[]` format (one object per screen with componentType at top level) is **DEPRECATED**.
|
|
80
|
+
> **CANONICAL FORMAT (MANDATORY):** screens.json MUST use the `sections[]` wrapper with `sectionCode`, `sectionLabel`, and `resources[]`.
|
|
81
|
+
> The flat `screens[]` format is **DEPRECATED**.
|
|
167
82
|
> All downstream consumers (business-analyse-html, business-analyse-handoff, business-analyse-develop) expect `sections[]`.
|
|
83
|
+
>
|
|
84
|
+
> Load full format with examples: `/references/smartcomponents-templates.md`
|
|
168
85
|
|
|
169
|
-
|
|
170
|
-
{
|
|
171
|
-
"sections": [
|
|
172
|
-
{
|
|
173
|
-
"sectionCode": "list",
|
|
174
|
-
"sectionLabel": "Liste des employes",
|
|
175
|
-
"resources": [
|
|
176
|
-
{
|
|
177
|
-
"code": "employees-grid",
|
|
178
|
-
"type": "SmartTable",
|
|
179
|
-
"label": "Grille des employes",
|
|
180
|
-
"columns": [ /* ... */ ],
|
|
181
|
-
"filters": [ /* ... */ ],
|
|
182
|
-
"actions": ["create", "export"],
|
|
183
|
-
"permission": "HumanResources.Employees.Read"
|
|
184
|
-
}
|
|
185
|
-
]
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"sectionCode": "detail",
|
|
189
|
-
"sectionLabel": "Fiche employe",
|
|
190
|
-
"resources": [
|
|
191
|
-
{
|
|
192
|
-
"code": "employee-form",
|
|
193
|
-
"type": "SmartForm",
|
|
194
|
-
"label": "Fiche employe",
|
|
195
|
-
"tabs": [ /* ... */ ],
|
|
196
|
-
"actions": ["save", "cancel"],
|
|
197
|
-
"permission": "HumanResources.Employees.Update"
|
|
198
|
-
}
|
|
199
|
-
]
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
"sectionCode": "dashboard",
|
|
203
|
-
"sectionLabel": "Tableau de bord",
|
|
204
|
-
"resources": [
|
|
205
|
-
{
|
|
206
|
-
"code": "employees-dashboard",
|
|
207
|
-
"type": "SmartDashboard",
|
|
208
|
-
"label": "Tableau de bord RH",
|
|
209
|
-
"kpis": [ /* ... */ ],
|
|
210
|
-
"charts": [ /* ... */ ],
|
|
211
|
-
"permission": "HumanResources.Employees.Read"
|
|
212
|
-
}
|
|
213
|
-
]
|
|
214
|
-
}
|
|
215
|
-
]
|
|
216
|
-
}
|
|
217
|
-
```
|
|
86
|
+
Update `index.json` with screens.json hash and status.
|
|
218
87
|
|
|
219
|
-
|
|
220
|
-
> Resource `type` must be one of: `SmartTable`, `SmartForm`, `SmartDashboard`, `SmartKanban`, `SmartCard`, `SmartFilter`.
|
|
88
|
+
## Validation Summary
|
|
221
89
|
|
|
222
|
-
|
|
90
|
+
Run POST-CHECK validation after writing ALL screens.json files:
|
|
223
91
|
|
|
224
|
-
|
|
92
|
+
> Load: `/references/screens-post-check.md`
|
|
93
|
+
> - Complete validation script (10 checks: 8 BLOCKING + 2 WARNING)
|
|
94
|
+
> - CHECK 1: Section resources (at least 1 per section)
|
|
95
|
+
> - CHECK 2-3: Entity + permission references
|
|
96
|
+
> - CHECK 4-5: SmartTable/SmartForm attribute references
|
|
97
|
+
> - CHECK 6: Lookup field entity requirement
|
|
98
|
+
> - CHECK 7: Computed attribute readonly handling
|
|
99
|
+
> - CHECK 8: SmartFilter lookup entity requirement
|
|
100
|
+
> - CHECK 9: SmartFilter mandatory for list sections with SmartTable
|
|
101
|
+
> - CHECK 10: SmartKanban auto-detection for workflow entities
|
|
225
102
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
- [ ] Every SmartForm field references a valid entity attribute
|
|
229
|
-
- [ ] Every section has at least one resource
|
|
230
|
-
- [ ] Every module has at least one section
|
|
103
|
+
**BLOCKING** errors must be fixed before proceeding to step-02.
|
|
104
|
+
**WARNING** errors should be reviewed but do not block progress.
|
|
231
105
|
|
|
232
106
|
## Transition
|
|
233
107
|
|
|
@@ -29,8 +29,6 @@ For each resource in each section, generate a wireframe object:
|
|
|
29
29
|
**SmartTable wireframe:**
|
|
30
30
|
```json
|
|
31
31
|
{
|
|
32
|
-
"screen": "{sectionCode}-{resourceCode}",
|
|
33
|
-
"section": "{sectionCode}",
|
|
34
32
|
"mockupFormat": "ascii",
|
|
35
33
|
"mockup": "+----------------------------------------------------------+\n| [Departement v] [Statut v] [+ Nouveau employe] |\n+------+----------------+---------------+--------+---------+\n| Code | Nom complet | Departement | Statut | Actions |\n+------+----------------+---------------+--------+---------+\n| E001 | Dupont Marie | RH | Actif | [E] [S] |\n| E002 | Martin Pierre | IT | Conge | [E] [S] |\n+------+----------------+---------------+--------+---------+\n| << 1 2 3 ... 10 >> 25 par page |\n+----------------------------------------------------------+",
|
|
36
34
|
"elements": ["FilterBar", "DataGrid", "Pagination", "ActionButtons"],
|
|
@@ -52,8 +50,6 @@ For each resource in each section, generate a wireframe object:
|
|
|
52
50
|
**SmartForm wireframe:**
|
|
53
51
|
```json
|
|
54
52
|
{
|
|
55
|
-
"screen": "{sectionCode}-{resourceCode}",
|
|
56
|
-
"section": "{sectionCode}",
|
|
57
53
|
"mockupFormat": "ascii",
|
|
58
54
|
"mockup": "+----------------------------------------------------------+\n| Fiche Employe [Sauvegarder] |\n+----------------------------------------------------------+\n| [Informations] [Contrats] [Documents] |\n+----------------------------------------------------------+\n| Prenom: [_______________] Nom: [_______________] |\n| Email: [_______________] Tel: [_______________] |\n| Departement: [Selectionnez v ] Poste: [_____________] |\n| Date embauche: [__ /__ /____] Statut: [Actif v] |\n+----------------------------------------------------------+",
|
|
59
55
|
"elements": ["TabBar", "FormFields", "SaveButton"],
|
|
@@ -74,8 +70,6 @@ For each resource in each section, generate a wireframe object:
|
|
|
74
70
|
**SmartDashboard wireframe:**
|
|
75
71
|
```json
|
|
76
72
|
{
|
|
77
|
-
"screen": "{sectionCode}-{resourceCode}",
|
|
78
|
-
"section": "{sectionCode}",
|
|
79
73
|
"mockupFormat": "ascii",
|
|
80
74
|
"mockup": "+----------------------------------------------------------+\n| Tableau de bord RH |\n+-------------+-------------+-------------+----------------+\n| Total actifs| En conge | Nouveaux | Taux rotation |\n| 156 | 12 | 8 | 3.2% |\n+-------------+-------------+-------------+----------------+\n| [Repartition par dept (pie)] [Evolution effectifs (bar)]|\n+----------------------------------------------------------+",
|
|
81
75
|
"elements": ["KPICards", "PieChart", "BarChart"],
|
|
@@ -109,7 +103,6 @@ For each module, update screens.json to embed wireframes at the resource level:
|
|
|
109
103
|
"type": "SmartTable",
|
|
110
104
|
"columns": [ /* ... */ ],
|
|
111
105
|
"wireframe": {
|
|
112
|
-
"screen": "list-employees-grid",
|
|
113
106
|
"mockupFormat": "ascii",
|
|
114
107
|
"mockup": "...",
|
|
115
108
|
"elements": [...],
|
|
@@ -141,6 +134,13 @@ Write via ba-writer for each module. Update index.json hashes.
|
|
|
141
134
|
| `layout` | object | Layout type and regions |
|
|
142
135
|
| `permissionsRequired` | string[] | Permission paths needed |
|
|
143
136
|
|
|
137
|
+
> **INTERDICTION:** `componentMapping` MUST use the canonical object format:
|
|
138
|
+
> ```json
|
|
139
|
+
> [{ "wireframeElement": "FilterBar", "reactComponent": "SmartFilter" }]
|
|
140
|
+
> ```
|
|
141
|
+
> The shorthand `[{ "FilterBar": "SmartFilter" }]` is **NOT valid** and will break downstream consumers.
|
|
142
|
+
> Each entry MUST have both `wireframeElement` and `reactComponent` keys.
|
|
143
|
+
|
|
144
144
|
## Validation
|
|
145
145
|
|
|
146
146
|
- [ ] Every resource has a wireframe object
|
|
@@ -148,6 +148,7 @@ Write via ba-writer for each module. Update index.json hashes.
|
|
|
148
148
|
- [ ] Every wireframe has `elements[]` and `componentMapping[]`
|
|
149
149
|
- [ ] Wireframe `permissionsRequired` references valid permission paths
|
|
150
150
|
- [ ] All wireframes have `mockupFormat` set ("ascii" or "html")
|
|
151
|
+
- [ ] Every `componentMapping` entry uses canonical format (`wireframeElement` + `reactComponent` keys, no shorthand)
|
|
151
152
|
|
|
152
153
|
## Transition
|
|
153
154
|
|