@atlashub/smartstack-cli 3.37.0 → 3.38.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 +16 -24
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +201 -256
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/scripts/extract-api-endpoints.ts +5 -5
- package/scripts/generate-doc-with-mock-ui.ts +10 -17
- package/templates/agents/ba-reader.md +9 -9
- package/templates/agents/ba-writer.md +12 -15
- package/templates/agents/code-reviewer.md +1 -1
- package/templates/agents/docs-context-reader.md +1 -1
- package/templates/agents/gitflow/merge.md +0 -4
- package/templates/agents/gitflow/pr.md +0 -4
- package/templates/agents/gitflow/start.md +30 -5
- package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +20 -20
- package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +16 -24
- package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +2 -2
- package/templates/skills/_resources/mcp-validate-documentation-spec.md +3 -3
- package/templates/skills/_shared.md +15 -17
- package/templates/skills/ai-prompt/SKILL.md +1 -1
- package/templates/skills/ai-prompt/steps/step-00-init.md +47 -0
- package/templates/skills/apex/SKILL.md +3 -4
- package/templates/skills/apex/_shared.md +10 -20
- package/templates/skills/apex/references/analysis-methods.md +141 -0
- package/templates/skills/apex/references/challenge-questions.md +1 -21
- package/templates/skills/apex/references/core-seed-data.md +35 -57
- package/templates/skills/apex/references/examine-build-validation.md +87 -0
- package/templates/skills/apex/references/execution-frontend-gates.md +177 -0
- package/templates/skills/apex/references/execution-frontend-patterns.md +105 -0
- package/templates/skills/apex/references/execution-layer1-rules.md +96 -0
- package/templates/skills/apex/references/initialization-challenge-flow.md +110 -0
- package/templates/skills/apex/references/planning-layer-mapping.md +151 -0
- package/templates/skills/apex/references/post-checks.md +145 -40
- package/templates/skills/apex/references/smartstack-api.md +35 -51
- package/templates/skills/apex/references/smartstack-frontend.md +17 -17
- package/templates/skills/apex/references/smartstack-layers.md +38 -62
- package/templates/skills/apex/steps/step-00-init.md +14 -26
- package/templates/skills/apex/steps/step-01-analyze.md +10 -143
- package/templates/skills/apex/steps/step-02-plan.md +10 -92
- package/templates/skills/apex/steps/step-03-execute.md +47 -249
- package/templates/skills/apex/steps/step-04-examine.md +14 -78
- package/templates/skills/apex/steps/step-05-deep-review.md +2 -2
- package/templates/skills/apex/steps/step-08-run-tests.md +2 -0
- package/templates/skills/application/SKILL.md +6 -7
- package/templates/skills/application/references/backend-controller-hierarchy.md +16 -16
- package/templates/skills/application/references/backend-seeding-and-dto-output.md +83 -0
- package/templates/skills/application/references/backend-table-prefix-mapping.md +79 -0
- package/templates/skills/application/references/backend-verification.md +1 -1
- package/templates/skills/application/references/frontend-i18n-and-output.md +67 -0
- package/templates/skills/application/references/frontend-route-naming.md +117 -0
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +107 -0
- package/templates/skills/application/references/frontend-verification.md +12 -12
- package/templates/skills/application/references/init-parameter-detection.md +120 -0
- package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +5 -6
- package/templates/skills/application/references/provider-template.md +2 -6
- package/templates/skills/application/references/roles-client-project-handling.md +55 -0
- package/templates/skills/application/references/roles-fallback-procedure.md +149 -0
- package/templates/skills/application/references/test-coverage-requirements.md +213 -0
- package/templates/skills/application/references/test-frontend.md +3 -3
- package/templates/skills/application/steps/step-00-init.md +11 -141
- package/templates/skills/application/steps/step-01-navigation.md +3 -3
- package/templates/skills/application/steps/step-02-permissions.md +4 -4
- package/templates/skills/application/steps/step-03-roles.md +18 -175
- package/templates/skills/application/steps/step-03b-provider.md +1 -2
- package/templates/skills/application/steps/step-04-backend.md +19 -110
- package/templates/skills/application/steps/step-05-frontend.md +17 -143
- package/templates/skills/application/steps/step-06-migration.md +12 -60
- package/templates/skills/application/steps/step-07-tests.md +9 -76
- package/templates/skills/application/templates-backend.md +29 -27
- package/templates/skills/application/templates-frontend.md +48 -48
- package/templates/skills/application/templates-seed.md +57 -131
- package/templates/skills/business-analyse/SKILL.md +27 -30
- package/templates/skills/business-analyse/_architecture.md +6 -6
- package/templates/skills/business-analyse/_shared.md +60 -88
- package/templates/skills/business-analyse/questionnaire/04-data.md +3 -3
- package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +1 -1
- package/templates/skills/business-analyse/react/application-viewer.md +12 -12
- package/templates/skills/business-analyse/react/components.md +8 -12
- package/templates/skills/business-analyse/react/schema.md +11 -11
- package/templates/skills/business-analyse/references/agent-module-prompt.md +2 -3
- package/templates/skills/business-analyse/references/analysis-semantic-checks.md +190 -0
- package/templates/skills/business-analyse/references/cache-warming-strategy.md +2 -2
- package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +41 -0
- package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +74 -0
- package/templates/skills/business-analyse/references/cadrage-shared-modules.md +69 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +1 -1
- package/templates/skills/business-analyse/references/compilation-structure-cards.md +297 -0
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
- package/templates/skills/business-analyse/references/deploy-modes.md +5 -5
- package/templates/skills/business-analyse/references/detection-strategies.md +7 -7
- package/templates/skills/business-analyse/references/handoff-file-templates.md +14 -22
- package/templates/skills/business-analyse/references/handoff-mappings.md +4 -4
- package/templates/skills/business-analyse/references/handoff-seeddata-generation.md +312 -0
- package/templates/skills/business-analyse/references/init-schema-deployment.md +3 -3
- package/templates/skills/business-analyse/references/naming-conventions.md +22 -24
- package/templates/skills/business-analyse/references/prd-generation.md +2 -2
- package/templates/skills/business-analyse/references/review-data-mapping.md +2 -2
- package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
- package/templates/skills/business-analyse/references/spec-auto-inference.md +3 -3
- package/templates/skills/business-analyse/references/team-orchestration.md +49 -6
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
- package/templates/skills/business-analyse/references/ui-resource-cards.md +18 -18
- package/templates/skills/business-analyse/references/validate-incremental-html.md +2 -2
- package/templates/skills/business-analyse/references/validation-checklist.md +2 -2
- package/templates/skills/business-analyse/schemas/application-schema.json +4 -5
- package/templates/skills/business-analyse/schemas/project-schema.json +1 -6
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -3
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +4 -4
- package/templates/skills/business-analyse/steps/step-00-init.md +8 -17
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +35 -198
- package/templates/skills/business-analyse/steps/step-01b-applications.md +16 -20
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +1 -1
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +4 -4
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +1 -1
- package/templates/skills/business-analyse/steps/step-03b-ui.md +4 -4
- package/templates/skills/business-analyse/steps/step-03c-compile.md +66 -140
- package/templates/skills/business-analyse/steps/step-03d-validate.md +2 -2
- package/templates/skills/business-analyse/steps/step-04a-collect.md +2 -2
- package/templates/skills/business-analyse/steps/step-04b-analyze.md +42 -160
- package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +74 -104
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +13 -11
- package/templates/skills/business-analyse/steps/step-06-review.md +3 -3
- package/templates/skills/business-analyse/templates/tpl-frd.md +13 -13
- package/templates/skills/business-analyse/templates/tpl-handoff.md +12 -12
- package/templates/skills/business-analyse/templates-frd.md +25 -25
- package/templates/skills/business-analyse/templates-react.md +15 -21
- package/templates/skills/controller/SKILL.md +1 -1
- package/templates/skills/controller/postman-templates.md +1 -1
- package/templates/skills/controller/references/controller-code-templates.md +2 -2
- package/templates/skills/controller/references/mcp-scaffold-workflow.md +209 -0
- package/templates/skills/controller/references/permission-sync-templates.md +13 -16
- package/templates/skills/controller/steps/step-00-init.md +11 -11
- package/templates/skills/controller/steps/step-03-generate.md +64 -103
- package/templates/skills/controller/templates.md +67 -71
- package/templates/skills/debug/SKILL.md +13 -218
- package/templates/skills/debug/steps/step-00-init.md +57 -0
- package/templates/skills/debug/steps/step-01-analyze.md +219 -0
- package/templates/skills/debug/steps/step-02-resolve.md +85 -0
- package/templates/skills/documentation/SKILL.md +49 -345
- package/templates/skills/documentation/data-schema.md +11 -8
- package/templates/skills/documentation/steps/step-00-init.md +70 -0
- package/templates/skills/documentation/steps/step-01-scan.md +113 -0
- package/templates/skills/documentation/steps/step-02-generate.md +231 -0
- package/templates/skills/documentation/steps/step-03-validate.md +238 -0
- package/templates/skills/documentation/templates.md +480 -322
- package/templates/skills/efcore/references/both-contexts.md +32 -0
- package/templates/skills/efcore/references/database-operations.md +67 -0
- package/templates/skills/efcore/references/destructive-operations.md +38 -0
- package/templates/skills/efcore/references/reset-operations.md +81 -0
- package/templates/skills/efcore/references/seed-methods.md +86 -0
- package/templates/skills/efcore/references/shared-init-functions.md +250 -0
- package/templates/skills/efcore/references/sql-objects-injection.md +61 -0
- package/templates/skills/efcore/references/troubleshooting.md +81 -0
- package/templates/skills/efcore/steps/db/step-deploy.md +1 -32
- package/templates/skills/efcore/steps/db/step-reset.md +7 -103
- package/templates/skills/efcore/steps/db/step-seed.md +10 -132
- package/templates/skills/efcore/steps/db/step-status.md +5 -44
- package/templates/skills/efcore/steps/migration/step-03-validate.md +8 -62
- package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +1 -57
- package/templates/skills/efcore/steps/shared/step-00-init.md +11 -254
- package/templates/skills/efcore/steps/squash/step-03-create.md +1 -58
- package/templates/skills/feature-full/SKILL.md +1 -1
- package/templates/skills/feature-full/steps/step-00-init.md +57 -0
- package/templates/skills/feature-full/steps/step-01-implementation.md +1 -1
- package/templates/skills/gitflow/SKILL.md +1 -1
- package/templates/skills/gitflow/_shared.md +23 -0
- package/templates/skills/gitflow/references/commit-message-generation.md +58 -0
- package/templates/skills/gitflow/references/commit-migration-validation.md +49 -0
- package/templates/skills/gitflow/references/finish-cleanup.md +51 -0
- package/templates/skills/gitflow/references/finish-version-bumping.md +45 -0
- package/templates/skills/gitflow/references/init-environment-detection.md +41 -0
- package/templates/skills/gitflow/references/init-questions.md +185 -0
- package/templates/skills/gitflow/references/init-structure-creation.md +71 -0
- package/templates/skills/gitflow/references/init-version-detection.md +21 -0
- package/templates/skills/gitflow/references/init-workspace-detection.md +43 -0
- package/templates/skills/gitflow/references/merge-ci-status.md +36 -0
- package/templates/skills/gitflow/references/merge-execution.md +62 -0
- package/templates/skills/gitflow/references/merge-pr-context.md +76 -0
- package/templates/skills/gitflow/references/pr-build-checks.md +60 -0
- package/templates/skills/gitflow/references/pr-generation.md +58 -0
- package/templates/skills/gitflow/references/start-branch-normalization.md +28 -0
- package/templates/skills/gitflow/references/start-worktree-creation.md +50 -0
- package/templates/skills/gitflow/references/sync-push-verify.md +44 -0
- package/templates/skills/gitflow/references/sync-rebase-conflicts.md +38 -0
- package/templates/skills/gitflow/steps/step-commit.md +12 -91
- package/templates/skills/gitflow/steps/step-finish.md +15 -159
- package/templates/skills/gitflow/steps/step-init.md +24 -326
- package/templates/skills/gitflow/steps/step-merge.md +17 -176
- package/templates/skills/gitflow/steps/step-pr.md +10 -116
- package/templates/skills/gitflow/steps/step-start.md +16 -109
- package/templates/skills/gitflow/steps/step-sync.md +6 -69
- package/templates/skills/ralph-loop/SKILL.md +6 -0
- package/templates/skills/ralph-loop/references/category-completeness.md +185 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
- package/templates/skills/ralph-loop/references/init-resume-recovery.md +127 -0
- package/templates/skills/ralph-loop/references/module-transition.md +151 -0
- package/templates/skills/ralph-loop/references/multi-module-queue.md +171 -0
- package/templates/skills/ralph-loop/references/parallel-execution.md +246 -0
- package/templates/skills/ralph-loop/references/task-transform-legacy.md +6 -9
- package/templates/skills/ralph-loop/references/team-orchestration.md +45 -3
- package/templates/skills/ralph-loop/steps/step-00-init.md +36 -109
- package/templates/skills/ralph-loop/steps/step-01-task.md +15 -163
- package/templates/skills/ralph-loop/steps/step-02-execute.md +8 -154
- package/templates/skills/ralph-loop/steps/step-04-check.md +21 -73
- package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
- package/templates/skills/review-code/references/smartstack-conventions.md +11 -11
- package/templates/skills/validate-feature/references/api-smoke-tests.md +140 -0
- package/templates/skills/validate-feature/references/db-validation-checks.md +180 -0
- package/templates/skills/validate-feature/steps/step-01-compile.md +5 -2
- package/templates/skills/validate-feature/steps/step-04-api-smoke.md +34 -145
- package/templates/skills/validate-feature/steps/step-05-db-validation.md +74 -260
- package/templates/skills/workflow/SKILL.md +1 -1
- package/templates/skills/workflow/steps/step-00-init.md +57 -0
|
@@ -12,7 +12,7 @@ Execute business analysis workflows. This skill produces feature.json files prog
|
|
|
12
12
|
2. **Update** — delta changes on an existing application or module
|
|
13
13
|
3. **Multi-application project** — when a project spans multiple independent applications (e.g., HR Management + Employee Self-Service)
|
|
14
14
|
|
|
15
|
-
The skill auto-detects which use case applies by scanning existing features in `docs/
|
|
15
|
+
The skill auto-detects which use case applies by scanning existing features in `docs/{app}/` and `docs/business-analyse/`.
|
|
16
16
|
|
|
17
17
|
**Architecture highlights:**
|
|
18
18
|
- Conditional context loading: each step loads only the shared files it needs (~54% context reduction)
|
|
@@ -42,7 +42,7 @@ The skill auto-detects which use case applies by scanning existing features in `
|
|
|
42
42
|
| `-review` | Mode review — lit `ba-review.json`, cree une nouvelle version avec les corrections appliquees |
|
|
43
43
|
|
|
44
44
|
Step-00 handles detection automatically:
|
|
45
|
-
- **New vs Update**: scans `docs
|
|
45
|
+
- **New vs Update**: scans `docs/` for existing applications
|
|
46
46
|
- **Single vs Multi-app**: multi-app detection in step-01, application identity confirmed in step-01b (always)
|
|
47
47
|
- **Single vs Multi-module**: determined during step-02 decomposition
|
|
48
48
|
- **Language**: detected from config or asked once
|
|
@@ -57,15 +57,15 @@ Step-00 handles detection automatically:
|
|
|
57
57
|
docs/
|
|
58
58
|
business-analyse/v{X.Y}/
|
|
59
59
|
feature.json # PROJECT-level master (only if multi-app: applications, dependencies)
|
|
60
|
-
{
|
|
60
|
+
{app}/
|
|
61
61
|
index.json # BA manifest (auto-updated at handoff, consumed by web app viewer)
|
|
62
|
-
|
|
62
|
+
business-analyse/v{X.Y}/
|
|
63
63
|
feature.json # APPLICATION-level master (modules, dependencies, roles)
|
|
64
64
|
ba-interactive.html # Client-facing interactive review document (deployed at handoff)
|
|
65
65
|
{app}/{module}/business-analyse/v{X.Y}/
|
|
66
66
|
feature.json # MODULE-level detail (entities, UC, FR, permissions, mockups)
|
|
67
67
|
```
|
|
68
|
-
> In standalone mode (single app), the project-level file is NOT created
|
|
68
|
+
> In standalone mode (single app), the project-level file is NOT created.
|
|
69
69
|
|
|
70
70
|
**Ralph Loop files (generated by step-05):**
|
|
71
71
|
```
|
|
@@ -75,25 +75,24 @@ docs/
|
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
**Documentation integrated in SmartStack app:**
|
|
78
|
-
- Application view: `/docs/
|
|
79
|
-
- Module view: `/docs/
|
|
78
|
+
- Application view: `/docs/{app}` (module overview, dependency graph, roles)
|
|
79
|
+
- Module view: `/docs/{app}/{module}` (full specification, mockups)
|
|
80
80
|
|
|
81
81
|
**No intermediate markdown files - all state in feature.json**
|
|
82
82
|
</output_structure>
|
|
83
83
|
|
|
84
84
|
<navigation_hierarchy>
|
|
85
|
-
**SmartStack uses a
|
|
85
|
+
**SmartStack uses a 4-level navigation structure mapped to database tables:**
|
|
86
86
|
|
|
87
87
|
| Level | Entity | Table DB | Created in Step | Description |
|
|
88
88
|
|-------|--------|----------|-----------------|-------------|
|
|
89
|
-
| 1 |
|
|
90
|
-
| 2 |
|
|
91
|
-
| 3 |
|
|
92
|
-
| 4 | **
|
|
93
|
-
| 5 | **Resource** | **`core.nav_Resources`** | **03b-03c** | **React component (SmartTable, SmartForm, Chart, KpiCard, etc.)** |
|
|
89
|
+
| 1 | Application | `core.nav_Applications` | 00-01 | Top-level application (e.g., "HumanResources") |
|
|
90
|
+
| 2 | Module | `core.nav_Modules` | 02 | Functional module (e.g., "Employees", "TimeManagement") |
|
|
91
|
+
| 3 | **Section** | **`core.nav_Sections`** | **03a-03c** | **Page within module (e.g., "list", "detail", "dashboard")** |
|
|
92
|
+
| 4 | **Resource** | **`core.nav_Resources`** | **03b-03c** | **React component (SmartTable, SmartForm, Chart, KpiCard, etc.)** |
|
|
94
93
|
|
|
95
94
|
**Hierarchical relationship:**
|
|
96
|
-
-
|
|
95
|
+
- Application → Module → **Section** → **Resource**
|
|
97
96
|
- Each Section MUST have ≥1 Resource
|
|
98
97
|
- Each Section corresponds to 1 React page route
|
|
99
98
|
- Each Resource corresponds to 1 SmartStack UI component
|
|
@@ -104,11 +103,11 @@ The `specification.seedDataCore` contains **9 mandatory arrays** for database se
|
|
|
104
103
|
|
|
105
104
|
| Array | Table | Source | Description |
|
|
106
105
|
|-------|-------|--------|-------------|
|
|
107
|
-
| `navigationApplications` | `core.nav_Applications` | Manual (step-03c) | Application entry (Level
|
|
106
|
+
| `navigationApplications` | `core.nav_Applications` | Manual (step-03c) | Application entry (Level 1) — created ONCE per application |
|
|
108
107
|
| `applicationRoles` | `core.auth_Roles` | Manual (step-03c) | Application-scoped roles (admin, manager, contributor, viewer) |
|
|
109
|
-
| `navigationModules` | `core.nav_Modules` | Manual (step-03c) | Module entry (Level
|
|
110
|
-
| **`navigationSections`** | **`core.nav_Sections`** | **Derived from `specification.sections[]`** | **Section entries (Level
|
|
111
|
-
| **`navigationResources`** | **`core.nav_Resources`** | **Derived from `specification.sections[].resources[]`** | **Resource entries (Level
|
|
108
|
+
| `navigationModules` | `core.nav_Modules` | Manual (step-03c) | Module entry (Level 2) |
|
|
109
|
+
| **`navigationSections`** | **`core.nav_Sections`** | **Derived from `specification.sections[]`** | **Section entries (Level 3)** |
|
|
110
|
+
| **`navigationResources`** | **`core.nav_Resources`** | **Derived from `specification.sections[].resources[]`** | **Resource entries (Level 4)** |
|
|
112
111
|
| `navigationTranslations` | `core.nav_Translations` | Manual (i18n) | Multi-language labels |
|
|
113
112
|
| `permissions` | `core.Permissions` | Manual (step-03c) | Permission definitions ({path, action, description}) |
|
|
114
113
|
| `rolePermissions` | `core.RolePermissions` | Manual (step-03c) | Role-permission mappings |
|
|
@@ -119,13 +118,13 @@ The `specification.seedDataCore` contains **9 mandatory arrays** for database se
|
|
|
119
118
|
- `navigationResources` = transform `specification.sections[].resources[]` → flatten to { code, type, entity, parentCode, permission }
|
|
120
119
|
|
|
121
120
|
**Example:**
|
|
122
|
-
- Module: `Employees` (Level
|
|
123
|
-
- Section: `list` (Level
|
|
124
|
-
- Resource: `employees-grid` (SmartTable) (Level
|
|
125
|
-
- Resource: `status-filter` (FilterBar) (Level
|
|
126
|
-
- Section: `detail` (Level
|
|
127
|
-
- Resource: `employee-card` (DetailCard) (Level
|
|
128
|
-
- Resource: `contract-history` (SmartTable) (Level
|
|
121
|
+
- Module: `Employees` (Level 2)
|
|
122
|
+
- Section: `list` (Level 3) → contains resources:
|
|
123
|
+
- Resource: `employees-grid` (SmartTable) (Level 4)
|
|
124
|
+
- Resource: `status-filter` (FilterBar) (Level 4)
|
|
125
|
+
- Section: `detail` (Level 3) → contains resources:
|
|
126
|
+
- Resource: `employee-card` (DetailCard) (Level 4)
|
|
127
|
+
- Resource: `contract-history` (SmartTable) (Level 4)
|
|
129
128
|
|
|
130
129
|
</navigation_hierarchy>
|
|
131
130
|
|
|
@@ -144,7 +143,7 @@ When step-00 detects that the description matches an existing application:
|
|
|
144
143
|
**Step-00 routing (auto-detection):**
|
|
145
144
|
|
|
146
145
|
1. Read `{feature_description}`
|
|
147
|
-
2. Scan `docs
|
|
146
|
+
2. Scan `docs/` for existing applications
|
|
148
147
|
3. If match found → ask user: "New application" or "Update {app}" ?
|
|
149
148
|
4. If no match → new application
|
|
150
149
|
5. Create master feature.json and proceed to step-01
|
|
@@ -188,10 +187,9 @@ When step-00 detects that the description matches an existing application:
|
|
|
188
187
|
| `{application_name}` | string | Target application name |
|
|
189
188
|
| `{module_name}` | string | Target module name |
|
|
190
189
|
| `{project_id}` | string | Project identifier (e.g., `PROJ-001`) — only in multi-app mode |
|
|
191
|
-
| `{context}` | string | "business" (default), "platform", or "personal" per application |
|
|
192
190
|
| `{workflow_mode}` | string | "project" (multi-app), "application" (single-app multi-module), or "module" (single) |
|
|
193
191
|
| `{analysisMode}` | string | Always "interactive" — analysis phase is always interactive with the user |
|
|
194
|
-
| `{docs_dir}` | string | `docs/
|
|
192
|
+
| `{docs_dir}` | string | `docs/{app}/{module}/business-analyse/v{X.Y}/` |
|
|
195
193
|
|
|
196
194
|
</state_variables>
|
|
197
195
|
|
|
@@ -281,7 +279,6 @@ Load ONLY relevant categories based on feature type:
|
|
|
281
279
|
- **Use ba-writer agent** for all JSON writes
|
|
282
280
|
- **Use ba-reader agent** for all JSON reads
|
|
283
281
|
- **Follow next_step directive** at end of each step
|
|
284
|
-
- **Context:** business-only in standalone mode; business/platform/personal per-application in project mode
|
|
285
282
|
- **Use parallel agents** for codebase exploration
|
|
286
283
|
- **Team mode** (2+ modules): After step-02, load `references/team-orchestration.md` and follow team protocol
|
|
287
284
|
- **Inline mode** (1 module): Classic sequential execution, no team
|
|
@@ -326,5 +323,5 @@ Load ONLY relevant categories based on feature type:
|
|
|
326
323
|
- Cross-module consolidation passed (step-04)
|
|
327
324
|
- Development handoff ready for `/ralph-loop`
|
|
328
325
|
- Ralph Loop prd.json generated (per module or consolidated)
|
|
329
|
-
- All outputs renderable by SmartStack app viewer at `/docs/
|
|
326
|
+
- All outputs renderable by SmartStack app viewer at `/docs/{app}/`
|
|
330
327
|
</success_criteria>
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
| **Domain** | `{Project}.Domain/Business/{Application}/{Module}/` | `Domain/Business/Operations/FreeBicke/FreeBicke.cs` |
|
|
64
64
|
| **Application/DTOs** | `{Project}.Application/Business/{Application}/{Module}/DTOs/` | `Application/Business/Operations/FreeBicke/DTOs/FreeBickeDto.cs` |
|
|
65
65
|
| **Application/Interfaces** | `{Project}.Application/Common/Interfaces/` | `Application/Common/Interfaces/IFreeBickeService.cs` |
|
|
66
|
-
| **Infrastructure/Config** | `{Project}.Infrastructure/Persistence/Configurations/{
|
|
67
|
-
| **Infrastructure/Services** | `{Project}.Infrastructure/Services/{
|
|
68
|
-
| **Infrastructure/SeedData** | `{Project}.Infrastructure/Persistence/Seeding/Data/{
|
|
66
|
+
| **Infrastructure/Config** | `{Project}.Infrastructure/Persistence/Configurations/{Application}/{Module}/` | `Configurations/Operations/FreeBicke/FreeBickeConfiguration.cs` |
|
|
67
|
+
| **Infrastructure/Services** | `{Project}.Infrastructure/Services/{Application}/{Module}/` | `Services/Operations/FreeBicke/FreeBickeService.cs` |
|
|
68
|
+
| **Infrastructure/SeedData** | `{Project}.Infrastructure/Persistence/Seeding/Data/{Application}/{Module}/` | `Seeding/Data/Operations/FreeBicke/FreeBickeSeedData.cs` |
|
|
69
69
|
| **API/Controllers** | `{Project}.Api/Controllers/Business/{Application}/` | `Controllers/Business/Operations/FreeBickeController.cs` |
|
|
70
|
-
| **Frontend/Pages** | `web/src/pages/
|
|
70
|
+
| **Frontend/Pages** | `web/src/pages/{application}/{module}/` | `pages/operations/freebicke/page.tsx` |
|
|
71
71
|
| **Frontend/i18n** | `web/src/i18n/locales/{lang}/{module}.json` | `locales/fr/freebicke.json` |
|
|
72
72
|
|
|
73
73
|
> **IMPORTANT :** Chaque module a son **propre sous-dossier** dans chaque couche. Ne JAMAIS mettre tous les fichiers a la racine d'une couche.
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
|
|
91
91
|
| Role | Permissions | Description |
|
|
92
92
|
|------|-------------|-------------|
|
|
93
|
-
| **{App} Admin** | `{
|
|
93
|
+
| **{App} Admin** | `{app}.*` (wildcard) | Acces complet a l'application |
|
|
94
94
|
| **{App} Manager** | `read`, `create`, `update`, `assign` | Gestion complete sans suppression |
|
|
95
95
|
| **{App} Contributor** | `read`, `create`, `update` | Contribution active |
|
|
96
96
|
| **{App} Viewer** | `read` uniquement | Consultation seule |
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
| Contrainte | Detail |
|
|
105
105
|
|------------|--------|
|
|
106
106
|
| **Multi-tenant** | `TenantId` sur toute entite metier, isolation automatique |
|
|
107
|
-
| **RBAC** | Permissions `
|
|
107
|
+
| **RBAC** | Permissions `{app}.{module}.{action}`, HasData pattern |
|
|
108
108
|
| **CQRS** | Commands (write) et Queries (read) separes via MediatR |
|
|
109
109
|
| **Validation** | FluentValidation pour toute commande |
|
|
110
110
|
| **i18n** | 4 langues obligatoires (fr, en, it, de) |
|
|
@@ -29,8 +29,8 @@ All BA outputs are stored in up to **three levels** of feature.json, enriched pr
|
|
|
29
29
|
> **Backward compatibility:** If only 1 application is identified, the project level is NOT created. The application-level feature.json remains the master (current behavior).
|
|
30
30
|
|
|
31
31
|
### Application-Level (Master)
|
|
32
|
-
**Path:** `docs/{
|
|
33
|
-
**Schema:** `docs/{
|
|
32
|
+
**Path:** `docs/{app}/business-analyse/v{X.Y}/feature.json`
|
|
33
|
+
**Schema:** `docs/{app}/business-analyse/schemas/application-schema.json` (deployed to project by step-00)
|
|
34
34
|
**$schema:** `"../schemas/application-schema.json"` (relative in feature.json)
|
|
35
35
|
|
|
36
36
|
| Step | Section enriched | Status after |
|
|
@@ -42,11 +42,9 @@ All BA outputs are stored in up to **three levels** of feature.json, enriched pr
|
|
|
42
42
|
| 04-consolidation | consolidation | consolidated |
|
|
43
43
|
| 05-handoff | (per-module handoff) | handed-off |
|
|
44
44
|
|
|
45
|
-
> **{context}** = `business` (default) | `platform` | `personal` — determined per application. In standalone mode, always `business`.
|
|
46
|
-
|
|
47
45
|
### Module-Level (Per Module)
|
|
48
|
-
**Path:** `docs/{
|
|
49
|
-
**Schema:** `docs/{
|
|
46
|
+
**Path:** `docs/{app}/{module}/business-analyse/v{X.Y}/feature.json`
|
|
47
|
+
**Schema:** `docs/{app}/business-analyse/schemas/feature-schema.json` (deployed to project by step-00)
|
|
50
48
|
**$schema:** `"../../../business-analyse/schemas/feature-schema.json"` (relative in feature.json)
|
|
51
49
|
|
|
52
50
|
| Step | Section enriched | Status after |
|
|
@@ -61,7 +59,7 @@ All BA outputs are stored in up to **three levels** of feature.json, enriched pr
|
|
|
61
59
|
- **ba-writer**: Writes/updates feature.json (create, enrichSection, updateStatus, createVersion, createApplicationFeature, createProjectFeature, enrichApplicationRegistry, advanceModuleLoop, advanceApplicationLoop)
|
|
62
60
|
- **ba-reader**: Reads feature.json (findFeature, findProjectFeature, readSection, answerQuestion, getSummaryForSkill, readApplicationContext, getCompletedModulesSummary, getCompletedApplicationsSummary)
|
|
63
61
|
|
|
64
|
-
**Schemas:** Deployed to project at `docs/{
|
|
62
|
+
**Schemas:** Deployed to project at `docs/{app}/business-analyse/schemas/` (10 files, including project-schema.json). Source: `schemas/` in skill directory. Every feature.json includes `$schema` relative reference.
|
|
65
63
|
|
|
66
64
|
### Workflow Modes
|
|
67
65
|
|
|
@@ -73,35 +71,34 @@ All BA outputs are stored in up to **three levels** of feature.json, enriched pr
|
|
|
73
71
|
|
|
74
72
|
---
|
|
75
73
|
|
|
76
|
-
##
|
|
74
|
+
## 4-Level Navigation Hierarchy (SmartStack)
|
|
77
75
|
|
|
78
76
|
> **This is the structuring principle of the entire BA workflow.**
|
|
79
77
|
|
|
80
78
|
The BA aligns with the SmartStack navigation hierarchy:
|
|
81
79
|
|
|
82
80
|
```
|
|
83
|
-
Level 1:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Level 4: Section (approve) ← sidebar nav (workflow)
|
|
81
|
+
Level 1: Application (Sales)
|
|
82
|
+
Level 2: Module (Customers)
|
|
83
|
+
Level 3: Section (list) ← sidebar nav
|
|
84
|
+
Level 4: Resource (customer-grid)
|
|
85
|
+
Level 4: Resource (customer-filters)
|
|
86
|
+
Level 3: Section (detail) [hidden] ← reached by row click, route :id
|
|
87
|
+
Level 4: Resource (customer-detail-header)
|
|
88
|
+
Level 4: Resource (customer-detail-tabs)
|
|
89
|
+
Level 4: Resource (customer-info-card)
|
|
90
|
+
Level 4: Resource (customer-orders-grid) ← relation tab
|
|
91
|
+
Level 4: Resource (customer-history) ← audit tab
|
|
92
|
+
Level 2: Module (Orders)
|
|
93
|
+
Level 3: Section (list) ← sidebar nav
|
|
94
|
+
Level 3: Section (detail) [hidden] ← reached by row click
|
|
95
|
+
Level 3: Section (approve) ← sidebar nav (workflow)
|
|
99
96
|
```
|
|
100
97
|
|
|
101
|
-
**CRITICAL — Application identification (Level
|
|
98
|
+
**CRITICAL — Application identification (Level 1):**
|
|
102
99
|
The application is formally identified in step-01b (ALWAYS, even for single-app mode):
|
|
103
100
|
- Code: PascalCase (e.g., "HumanResources")
|
|
104
|
-
- Route: kebab-case (e.g., "/
|
|
101
|
+
- Route: kebab-case (e.g., "/human-resources")
|
|
105
102
|
- Icon: Lucide icon name
|
|
106
103
|
- Sort order: position in navigation
|
|
107
104
|
This creates the `seedDataCore.navigationApplications` entry that links modules to their parent application.
|
|
@@ -109,24 +106,24 @@ The `seedDataCore.applicationRoles` entries are also built from `cadrage.applica
|
|
|
109
106
|
|
|
110
107
|
| BA Phase | Levels treated | What is defined |
|
|
111
108
|
|----------|---------------|-----------------|
|
|
112
|
-
| Cadrage (step-01) |
|
|
109
|
+
| Cadrage (step-01) | Application | Problem, stakeholders, scope, application-level roles |
|
|
113
110
|
| Decomposition (step-02) | Modules | Module list, dependencies, processing order |
|
|
114
|
-
| Specification (step-03) | Module
|
|
111
|
+
| Specification (step-03) | Module → Sections → Resources (levels 2-3-4) | Entities, BR, UC, permissions, ASCII/SVG mockups per section |
|
|
115
112
|
| Consolidation (step-04) | Cross-module | Interactions, permission coherence, E2E flows |
|
|
116
113
|
| Handoff (step-05) | All levels | Implementation mapping, prd.json |
|
|
117
114
|
|
|
118
115
|
### Route patterns
|
|
119
116
|
```
|
|
120
|
-
/
|
|
121
|
-
/
|
|
122
|
-
/
|
|
117
|
+
/{application}/{module} ← list section (= module route, NO /list suffix)
|
|
118
|
+
/{application}/{module}/:id ← detail page (= module route + /:id, NO /detail prefix)
|
|
119
|
+
/{application}/{module}/{section} ← other sidebar sections (dashboard, approve, import, etc.)
|
|
123
120
|
```
|
|
124
121
|
|
|
125
122
|
**Detail page routing:**
|
|
126
123
|
- The detail page uses a parameterized route with `:id`
|
|
127
124
|
- It is NOT registered as a sidebar navigation entry (`navigation: "hidden"`)
|
|
128
125
|
- It is reached by clicking a row in the `list` section (action: `navigate:detail`)
|
|
129
|
-
- The back button navigates to `/
|
|
126
|
+
- The back button navigates to `/{application}/{module}`
|
|
130
127
|
- Route MUST be registered in frontend routing (App.tsx) alongside the list route
|
|
131
128
|
|
|
132
129
|
> **ROUTE SPECIAL CASES (list and detail sections):**
|
|
@@ -165,29 +162,6 @@ The `seedDataCore.applicationRoles` entries are also built from `cadrage.applica
|
|
|
165
162
|
|
|
166
163
|
---
|
|
167
164
|
|
|
168
|
-
## Business Context Validation
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
validate_business_context(context, workflow_mode):
|
|
172
|
-
IF workflow_mode === "project" THEN
|
|
173
|
-
// In project mode, applications can target any context
|
|
174
|
-
IF context IN ['business', 'platform', 'personal'] THEN
|
|
175
|
-
RETURN true
|
|
176
|
-
END IF
|
|
177
|
-
ERROR "Invalid context '${context}'. Allowed: business, platform, personal"
|
|
178
|
-
RETURN false
|
|
179
|
-
ELSE
|
|
180
|
-
// In standalone mode, only business context is allowed
|
|
181
|
-
IF context IN ['platform', 'personal', 'system'] THEN
|
|
182
|
-
ERROR "BA restricted to 'business' context in standalone mode. Use multi-application project mode for other contexts."
|
|
183
|
-
RETURN false
|
|
184
|
-
END IF
|
|
185
|
-
RETURN true
|
|
186
|
-
END IF
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**CRITICAL:** In standalone mode (single application), BA works ONLY for the `business` context. In project mode (multi-application), each application can target `business`, `platform`, or `personal` contexts.
|
|
190
|
-
|
|
191
165
|
---
|
|
192
166
|
|
|
193
167
|
## Feature Directory Structure
|
|
@@ -199,35 +173,34 @@ docs/
|
|
|
199
173
|
project-schema.json
|
|
200
174
|
v1.0/
|
|
201
175
|
feature.json <- PROJECT master ($schema: ../schemas/project-schema.json)
|
|
202
|
-
{
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
feature.json <- MODULE detail
|
|
176
|
+
{application}/
|
|
177
|
+
business-analyse/
|
|
178
|
+
schemas/ <- JSON SCHEMAS (deployed by step-00)
|
|
179
|
+
feature-schema.json
|
|
180
|
+
application-schema.json
|
|
181
|
+
project-schema.json
|
|
182
|
+
sections/
|
|
183
|
+
analysis-schema.json
|
|
184
|
+
discovery-schema.json
|
|
185
|
+
handoff-schema.json
|
|
186
|
+
metadata-schema.json
|
|
187
|
+
specification-schema.json
|
|
188
|
+
validation-schema.json
|
|
189
|
+
shared/
|
|
190
|
+
common-defs.json
|
|
191
|
+
v1.0/
|
|
192
|
+
feature.json <- APPLICATION master ($schema: ../schemas/application-schema.json)
|
|
193
|
+
{module1}/
|
|
194
|
+
business-analyse/
|
|
195
|
+
v1.0/
|
|
196
|
+
feature.json <- MODULE detail ($schema: ../../../business-analyse/schemas/feature-schema.json)
|
|
197
|
+
{module2}/
|
|
198
|
+
business-analyse/
|
|
199
|
+
v1.0/
|
|
200
|
+
feature.json <- MODULE detail
|
|
228
201
|
```
|
|
229
202
|
|
|
230
|
-
> In standalone mode (single app),
|
|
203
|
+
> In standalone mode (single app), the project-level directory is NOT created.
|
|
231
204
|
|
|
232
205
|
**Ralph Loop Integration (generated by step-05):**
|
|
233
206
|
|
|
@@ -263,12 +236,12 @@ generate_project_id():
|
|
|
263
236
|
|
|
264
237
|
| Level | Format | Example |
|
|
265
238
|
|-------|--------|---------|
|
|
266
|
-
| Module | `{
|
|
267
|
-
| Section | `{
|
|
239
|
+
| Module | `{app}.{module}.{action}` | `human-resources.employees.read` |
|
|
240
|
+
| Section | `{app}.{module}.{section}.{action}` | `human-resources.employees.departments.read` |
|
|
268
241
|
|
|
269
242
|
> **Rule:** Use module-level permissions for standard CRUD. Use section-level permissions only when a section requires distinct access control (e.g., dashboard, approve, import).
|
|
270
243
|
>
|
|
271
|
-
> **CRITICAL — All segments use kebab-case:** Multi-word codes MUST have hyphens. `human-resources`, NOT `humanresources`. Matches NavRoute convention. SmartStack.app ref: `
|
|
244
|
+
> **CRITICAL — All segments use kebab-case:** Multi-word codes MUST have hyphens. `human-resources`, NOT `humanresources`. Matches NavRoute convention. SmartStack.app ref: `support-client.my-tickets.read`
|
|
272
245
|
|
|
273
246
|
| Action | Permission | Usage |
|
|
274
247
|
|--------|------------|-------|
|
|
@@ -297,8 +270,8 @@ generate_project_id():
|
|
|
297
270
|
|
|
298
271
|
| Type | Path |
|
|
299
272
|
|------|------|
|
|
300
|
-
| BA Feature | `docs/
|
|
301
|
-
| User Guide | `docs/
|
|
273
|
+
| BA Feature | `docs/{app}/{module}/business-analyse/v{X.Y}/feature.json` |
|
|
274
|
+
| User Guide | `docs/{app}/{module}/user-guide/v{X.Y}/guide.json` |
|
|
302
275
|
| i18n | `web/smartstack-web/src/i18n/locales/{lang}/` |
|
|
303
276
|
|
|
304
277
|
---
|
|
@@ -397,7 +370,6 @@ Le champ `language` dans `feature.json.metadata.language` definit la langue :
|
|
|
397
370
|
{
|
|
398
371
|
"project": "{Name}",
|
|
399
372
|
"lastFeatureId": 0,
|
|
400
|
-
"context": "business",
|
|
401
373
|
"language": "fr",
|
|
402
374
|
"standards": ["BABOK-v3", "IEEE-830"],
|
|
403
375
|
"contact": "support@atlshub.ch"
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
>
|
|
46
46
|
> | Concept | ❌ Wrong (entity attribute) | ✅ Correct (RBAC) |
|
|
47
47
|
> |---------|---------------------------|-------------------|
|
|
48
|
-
> | User role | `User.Role` property | Permission set `
|
|
48
|
+
> | User role | `User.Role` property | Permission set `{app}.{module}.*` |
|
|
49
49
|
> | Access level | `User.AccessLevel` enum | Permission matrix per role |
|
|
50
|
-
> | Is admin | `User.IsAdmin` boolean | `
|
|
51
|
-
> | Can edit | `User.CanEdit` boolean | `
|
|
50
|
+
> | Is admin | `User.IsAdmin` boolean | `{app}.{module}.admin` permission |
|
|
51
|
+
> | Can edit | `User.CanEdit` boolean | `{app}.{module}.update` permission |
|
|
52
52
|
>
|
|
53
53
|
> When Q4.2 asks for "important attributes", **exclude** any role/permission/access concept.
|
|
54
54
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
| Event notification | MediatR notification | `OrderCreatedNotification` |
|
|
35
35
|
| Cross-module query | Read-only DTO from other module | `IClientQueryService` |
|
|
36
36
|
| Navigation link | Menu entry in NavRoute | `business/{app}/{module}` |
|
|
37
|
-
| Shared permission | Permission hierarchy | `
|
|
37
|
+
| Shared permission | Permission hierarchy | `{app}.*` covers all modules |
|
|
38
38
|
|
|
39
39
|
## Elicitation Guide
|
|
40
40
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Application-Level Business Analyse Viewer
|
|
2
2
|
|
|
3
3
|
> **Usage:** React component for application-level BA documentation within SmartStack web app
|
|
4
|
-
> **Route:** `/docs/
|
|
5
|
-
> **Data source:** `docs/
|
|
6
|
-
> **Linked to:** Module viewers at `/docs/
|
|
4
|
+
> **Route:** `/docs/{app}` (application overview)
|
|
5
|
+
> **Data source:** `docs/{app}/business-analyse/v{X.Y}/feature.json` (scope: "application")
|
|
6
|
+
> **Linked to:** Module viewers at `/docs/{app}/{module}`
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -23,7 +23,7 @@ interface ApplicationAnalyseViewerProps {
|
|
|
23
23
|
```typescript
|
|
24
24
|
// In app router configuration
|
|
25
25
|
{
|
|
26
|
-
path: '/docs
|
|
26
|
+
path: '/docs/:app',
|
|
27
27
|
component: ApplicationAnalyseViewer,
|
|
28
28
|
exact: true
|
|
29
29
|
}
|
|
@@ -88,7 +88,7 @@ Grid/cards layout showing all modules:
|
|
|
88
88
|
└─────────────────────┘ └─────────────────────┘
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
Each card links to the module viewer: `/docs/
|
|
91
|
+
Each card links to the module viewer: `/docs/{app}/{module}`
|
|
92
92
|
|
|
93
93
|
Status colors:
|
|
94
94
|
- ✓ Specified (green)
|
|
@@ -141,10 +141,10 @@ Per-Module Permission Paths:
|
|
|
141
141
|
┌──────────────┬──────────────────────────────────────────┐
|
|
142
142
|
│ Module │ Permission Paths │
|
|
143
143
|
├──────────────┼──────────────────────────────────────────┤
|
|
144
|
-
│ Customers │
|
|
145
|
-
│ Products │
|
|
146
|
-
│ Orders │
|
|
147
|
-
│ Invoices │
|
|
144
|
+
│ Customers │ sales.customers.{read|create|…} │
|
|
145
|
+
│ Products │ sales.products.{read|create|…} │
|
|
146
|
+
│ Orders │ sales.orders.{read|create|…} │
|
|
147
|
+
│ Invoices │ sales.invoices.{read|create|…} │
|
|
148
148
|
└──────────────┴──────────────────────────────────────────┘
|
|
149
149
|
```
|
|
150
150
|
|
|
@@ -198,14 +198,14 @@ Cross-module permission matrix display.
|
|
|
198
198
|
## Data Loading
|
|
199
199
|
|
|
200
200
|
```typescript
|
|
201
|
-
import type { ApplicationFeatureJson } from '../types/
|
|
201
|
+
import type { ApplicationFeatureJson } from '../types/docs';
|
|
202
202
|
|
|
203
203
|
export async function loadApplicationFeature(
|
|
204
204
|
app: string,
|
|
205
205
|
version: string
|
|
206
206
|
): Promise<ApplicationFeatureJson> {
|
|
207
207
|
const response = await fetch(
|
|
208
|
-
`/docs
|
|
208
|
+
`/docs/${app}/business-analyse/v${version}/feature.json`
|
|
209
209
|
);
|
|
210
210
|
return response.json();
|
|
211
211
|
}
|
|
@@ -214,7 +214,7 @@ export async function listApplicationVersions(
|
|
|
214
214
|
app: string
|
|
215
215
|
): Promise<string[]> {
|
|
216
216
|
const response = await fetch(
|
|
217
|
-
`/api/docs
|
|
217
|
+
`/api/docs/${app}/business-analyse/versions`
|
|
218
218
|
);
|
|
219
219
|
return response.json();
|
|
220
220
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> **Usage:** React component that renders feature.json directly
|
|
4
4
|
> **Loaded in:** step-05b-deploy.md
|
|
5
|
-
> **Data source (module):** `docs/
|
|
6
|
-
> **Data source (application):** `docs/
|
|
5
|
+
> **Data source (module):** `docs/{app}/{module}/business-analyse/v{X.Y}/feature.json`
|
|
6
|
+
> **Data source (application):** `docs/{app}/business-analyse/v{X.Y}/feature.json`
|
|
7
7
|
> **Related:** `react/application-viewer.md` for application-level view
|
|
8
8
|
> **Context7:** /facebook/react, /lucide-icons/lucide-react
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
## BusinessAnalyseViewer Component
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
// web/smartstack-web/src/pages/docs/
|
|
15
|
+
// web/smartstack-web/src/pages/docs/[app]/[module]/BusinessAnalyseViewer.tsx
|
|
16
16
|
|
|
17
17
|
import { useState, useEffect } from 'react';
|
|
18
18
|
import { Link, useParams } from 'react-router-dom';
|
|
@@ -33,8 +33,8 @@ import {
|
|
|
33
33
|
BookOpen,
|
|
34
34
|
Target
|
|
35
35
|
} from 'lucide-react';
|
|
36
|
-
import type { FeatureJson, FeatureStatus } from '@/types/
|
|
37
|
-
import { loadFeature, listVersions } from '@/services/
|
|
36
|
+
import type { FeatureJson, FeatureStatus } from '@/types/docs';
|
|
37
|
+
import { loadFeature, listVersions } from '@/services/docs';
|
|
38
38
|
|
|
39
39
|
// Status Badge Component (supports both module and application statuses)
|
|
40
40
|
function StatusBadge({ status }: { status: FeatureStatus }) {
|
|
@@ -173,11 +173,7 @@ export function BusinessAnalyseViewer() {
|
|
|
173
173
|
{t('breadcrumb.docs', 'Documentation')}
|
|
174
174
|
</Link>
|
|
175
175
|
<span>/</span>
|
|
176
|
-
<Link to=
|
|
177
|
-
{t('breadcrumb.business', 'Business')}
|
|
178
|
-
</Link>
|
|
179
|
-
<span>/</span>
|
|
180
|
-
<Link to={`/docs/business/${app}`} className="hover:text-[var(--color-primary-600)]">
|
|
176
|
+
<Link to={`/docs/${app}`} className="hover:text-[var(--color-primary-600)]">
|
|
181
177
|
{feature.metadata.application}
|
|
182
178
|
</Link>
|
|
183
179
|
<span>/</span>
|
|
@@ -535,14 +531,14 @@ export function BusinessAnalyseViewer() {
|
|
|
535
531
|
{/* Navigation Footer */}
|
|
536
532
|
<div className="flex justify-between pt-6 border-t border-[var(--border-color)]">
|
|
537
533
|
<Link
|
|
538
|
-
to={`/docs
|
|
534
|
+
to={`/docs/${app}`}
|
|
539
535
|
className="flex items-center gap-2 text-[var(--text-secondary)] hover:text-[var(--color-primary-600)]"
|
|
540
536
|
>
|
|
541
537
|
<ArrowRight className="w-4 h-4 rotate-180" />
|
|
542
538
|
{t('nav.backToApp', 'Back to Application')}
|
|
543
539
|
</Link>
|
|
544
540
|
<Link
|
|
545
|
-
to="/docs
|
|
541
|
+
to="/docs"
|
|
546
542
|
className="flex items-center gap-2 text-[var(--color-primary-600)]"
|
|
547
543
|
>
|
|
548
544
|
{t('nav.allModules', 'All Modules')}
|