@atlashub/smartstack-cli 1.33.0 → 1.35.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/installation.html +60 -38
- package/dist/index.js +1098 -582
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/docs-context-reader.md +125 -0
- package/templates/agents/docs-sync-checker.md +122 -0
- package/templates/hooks/docs-drift-check.md +97 -0
- package/templates/skills/_resources/context-digest-template.md +53 -0
- package/templates/skills/_resources/doc-context-cache.md +62 -0
- package/templates/skills/_resources/docs-manifest-schema.md +157 -0
- package/templates/skills/_resources/mcp-validate-documentation-spec.md +183 -0
- package/templates/skills/_shared.md +8 -0
- package/templates/skills/apex/SKILL.md +6 -0
- package/templates/skills/apex/steps/step-00-init.md +9 -0
- package/templates/skills/apex/steps/step-01-analyze.md +36 -0
- package/templates/skills/apex/steps/step-02-plan.md +38 -0
- package/templates/skills/apex/steps/step-03-execute.md +39 -0
- package/templates/skills/apex/steps/step-04-validate.md +31 -1
- package/templates/skills/apex/steps/step-04b-doc-sync.md +162 -0
- package/templates/skills/apex/steps/step-05-examine.md +7 -0
- package/templates/skills/apex/templates/04b-doc-sync.md +31 -0
- package/templates/skills/apex/templates/context-digest.md +35 -0
- package/templates/skills/business-analyse/SKILL.md +18 -5
- package/templates/skills/business-analyse/_shared.md +306 -4
- package/templates/skills/business-analyse/questionnaire/01-context.md +21 -6
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +34 -0
- package/templates/skills/business-analyse/questionnaire/03-scope.md +23 -0
- package/templates/skills/business-analyse/questionnaire/04-data.md +44 -0
- package/templates/skills/business-analyse/questionnaire/05-integrations.md +29 -7
- package/templates/skills/business-analyse/questionnaire/06-security.md +28 -0
- package/templates/skills/business-analyse/questionnaire/07-ui.md +32 -7
- package/templates/skills/business-analyse/questionnaire/08-performance.md +21 -0
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +29 -6
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +27 -6
- package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +59 -0
- package/templates/skills/business-analyse/questionnaire/12-migration.md +58 -0
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +69 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +110 -16
- package/templates/skills/business-analyse/steps/step-01-discover.md +530 -85
- package/templates/skills/business-analyse/steps/step-02-analyse.md +81 -25
- package/templates/skills/business-analyse/steps/step-03-specify.md +116 -24
- package/templates/skills/business-analyse/steps/step-04-validate.md +107 -33
- package/templates/skills/business-analyse/steps/step-05-handoff.md +256 -33
- package/templates/skills/business-analyse/steps/step-06-doc-html.md +84 -25
- package/templates/skills/business-analyse/templates/{frd-handoff.md → tpl-handoff.md} +18 -4
- package/templates/skills/business-analyse/templates-frd.md +19 -5
- package/templates/skills/business-analyse/tracking/change-template.md +30 -0
- package/templates/skills/documentation/SKILL.md +68 -31
- package/templates/skills/documentation/data-schema.md +198 -0
- package/templates/skills/documentation/templates.md +30 -1
- package/templates/skills/gitflow/steps/step-init.md +268 -20
- package/templates/skills/gitflow/templates/config.json +7 -0
- package/templates/skills/ralph-loop/SKILL.md +3 -0
- /package/templates/skills/business-analyse/templates/{frd-brd.md → tpl-brd.md} +0 -0
- /package/templates/skills/business-analyse/templates/{frd-discovery.md → tpl-discovery.md} +0 -0
- /package/templates/skills/business-analyse/templates/{frd-spec.md → tpl-frd.md} +0 -0
|
@@ -8,14 +8,17 @@ description: |
|
|
|
8
8
|
- User wants to document a module, table, tool, or test
|
|
9
9
|
- After implementing a feature to generate its documentation
|
|
10
10
|
Types: user module, developer tools, database ERD, testing tools
|
|
11
|
+
argument-hint: "<module-name> [--type user|developer|database|testing|update]"
|
|
11
12
|
---
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
<objective>
|
|
15
|
+
Generate and maintain technical documentation integrated into SmartStack web app.
|
|
16
|
+
Works in synergy with the `/documentation:module` command.
|
|
16
17
|
|
|
17
18
|
**Reference:** [_shared.md](../_shared.md) for architecture, i18n
|
|
19
|
+
</objective>
|
|
18
20
|
|
|
21
|
+
<quick_start>
|
|
19
22
|
## WHEN THIS SKILL ACTIVATES
|
|
20
23
|
|
|
21
24
|
Claude automatically invokes this skill when it detects:
|
|
@@ -27,9 +30,33 @@ Claude automatically invokes this skill when it detects:
|
|
|
27
30
|
| After implementation | "The feature is done, generate the doc" |
|
|
28
31
|
| Structure question | "How is the documentation organized?" |
|
|
29
32
|
| Keywords | "ERD", "schema", "diagram", "document" |
|
|
33
|
+
| **Update request** | "Update the doc", "refresh documentation", "doc is outdated" |
|
|
34
|
+
| **Drift detected** | "The SLA documentation is stale" |
|
|
35
|
+
</quick_start>
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
<parameters>
|
|
38
|
+
## DOCUMENTATION TYPES
|
|
39
|
+
|
|
40
|
+
| Type | Description | Output |
|
|
41
|
+
|------|-------------|--------|
|
|
42
|
+
| `user` | User module (data-driven) | `docs/business/{app}/{module}/frd-data.ts` + `index.tsx` |
|
|
43
|
+
| `developer` | Development tool guide | `docs/developer/tools/{Tool}Page.tsx` |
|
|
44
|
+
| `database` | Schema with ERD diagram | `docs/developer/database/{Schema}SchemaPage.tsx` |
|
|
45
|
+
| `testing` | Testing tool | `docs/developer/testing/{Tool}TestingPage.tsx` |
|
|
46
|
+
| `update` | Update existing documentation | Updates `frd-data.ts` + i18n FR |
|
|
47
|
+
|
|
48
|
+
### Available Developer tools
|
|
49
|
+
|
|
50
|
+
| Category | Tools |
|
|
51
|
+
|----------|-------|
|
|
52
|
+
| Local Environment | Docker Compose, MailDev, VS Code, Environment variables |
|
|
53
|
+
| API Testing | Postman, REST Client, Swagger/OpenAPI |
|
|
54
|
+
| E2E Testing | Microsoft Playwright, Inspector, Trace Viewer |
|
|
55
|
+
| Load Testing | NBomber (.NET), k6, Azure Load Testing |
|
|
56
|
+
| Security Testing | OWASP ZAP, Security Code Scan, Snyk, OWASP ASVS |
|
|
57
|
+
</parameters>
|
|
32
58
|
|
|
59
|
+
<workflow>
|
|
33
60
|
## AUTOMATIC WORKFLOW
|
|
34
61
|
|
|
35
62
|
### STEP 1: TYPE DETECTION
|
|
@@ -53,40 +80,35 @@ Identify the specific name:
|
|
|
53
80
|
|
|
54
81
|
### STEP 3: EXECUTION
|
|
55
82
|
|
|
56
|
-
|
|
83
|
+
**For NEW documentation (type = user|developer|database|testing):**
|
|
57
84
|
|
|
58
|
-
|
|
59
|
-
TYPE = detected type (user|developer|database|testing)
|
|
60
|
-
TARGET = extracted target
|
|
85
|
+
Follow the data-driven workflow from [templates.md](templates.md):
|
|
61
86
|
|
|
62
|
-
|
|
87
|
+
```
|
|
88
|
+
1. Read source data (FRD, BRD, code patterns)
|
|
89
|
+
2. Generate frd-data.ts (data file, ~50 lines)
|
|
90
|
+
3. Generate index.tsx (page wrapper, ~10 lines)
|
|
91
|
+
4. Generate i18n FR file (source language only)
|
|
92
|
+
5. Update docs-manifest.json
|
|
93
|
+
6. Update App.tsx routing and parent indexes
|
|
63
94
|
```
|
|
64
95
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## QUICK REFERENCE
|
|
68
|
-
|
|
69
|
-
### Documentation types
|
|
70
|
-
|
|
71
|
-
| Type | Description | Output |
|
|
72
|
-
|------|-------------|--------|
|
|
73
|
-
| `user` | User module with UI mockups | `docs/user/{context}/{Module}DocPage.tsx` |
|
|
74
|
-
| `developer` | Development tool guide | `docs/developer/tools/{Tool}Page.tsx` |
|
|
75
|
-
| `database` | Schema with ERD diagram | `docs/developer/database/{Schema}SchemaPage.tsx` |
|
|
76
|
-
| `testing` | Testing tool | `docs/developer/testing/{Tool}TestingPage.tsx` |
|
|
77
|
-
|
|
78
|
-
### Available Developer tools
|
|
96
|
+
**For UPDATE documentation (type = update):**
|
|
79
97
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
98
|
+
```
|
|
99
|
+
1. Read docs-manifest.json → find target module
|
|
100
|
+
2. Invoke docs-context-reader agent → get current doc state
|
|
101
|
+
3. Identify code changes since last doc update (git diff)
|
|
102
|
+
4. Map changes to documentation sections (see data-schema.md)
|
|
103
|
+
5. Update frd-data.ts with new/modified data
|
|
104
|
+
6. Update i18n FR file if labels changed
|
|
105
|
+
7. Update docs-manifest.json timestamps
|
|
106
|
+
```
|
|
87
107
|
|
|
88
|
-
|
|
108
|
+
> **i18n simplifié:** Seul FR (source) est généré. EN/IT/DE sont déférés à un pipeline de traduction séparé.
|
|
109
|
+
</workflow>
|
|
89
110
|
|
|
111
|
+
<execution_rules>
|
|
90
112
|
## ABSOLUTE RULES
|
|
91
113
|
|
|
92
114
|
1. **NEVER** hardcoded text → `useTranslation('docs')`
|
|
@@ -95,6 +117,17 @@ TARGET = extracted target
|
|
|
95
117
|
4. **ALWAYS** confirm before creating
|
|
96
118
|
5. **ALWAYS** update App.tsx and parent indexes
|
|
97
119
|
6. **ALWAYS** add module in `UserIndexPage.tsx` (IF type == `user`)
|
|
120
|
+
</execution_rules>
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
<success_criteria>
|
|
125
|
+
- Documentation page renders correctly in React app
|
|
126
|
+
- i18n files created for all 4 languages (FR, EN, IT, DE)
|
|
127
|
+
- Route registered in App.tsx
|
|
128
|
+
- docs-manifest.json updated
|
|
129
|
+
- Module appears in UserIndexPage (if type = user)
|
|
130
|
+
</success_criteria>
|
|
98
131
|
|
|
99
132
|
---
|
|
100
133
|
|
|
@@ -131,4 +164,8 @@ TARGET = extracted target
|
|
|
131
164
|
## ASSOCIATED FILES
|
|
132
165
|
|
|
133
166
|
- **React Templates:** [templates.md](templates.md)
|
|
167
|
+
- **Data Schema:** [data-schema.md](data-schema.md)
|
|
168
|
+
- **FrdDocRenderer:** `web/smartstack-web/src/components/docs/FrdDocRenderer.tsx`
|
|
169
|
+
- **Types:** `web/smartstack-web/src/components/docs/types.ts`
|
|
170
|
+
- **Manifest Schema:** `_resources/docs-manifest-schema.md`
|
|
134
171
|
- **Complete Command:** `.claude/commands/documentation-module.md`
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Documentation Data Schema
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This file describes how to generate `frd-data.ts` files for the `FrdDocRenderer` shared component.
|
|
6
|
+
Instead of generating full TSX components (~250 lines) per module, generate only the data (~50 lines).
|
|
7
|
+
|
|
8
|
+
## FrdData Interface Reference
|
|
9
|
+
|
|
10
|
+
The full TypeScript interface is in `web/smartstack-web/src/components/docs/types.ts`.
|
|
11
|
+
|
|
12
|
+
## Data Extraction Mapping
|
|
13
|
+
|
|
14
|
+
### From FRD (3-functional-specification.md)
|
|
15
|
+
|
|
16
|
+
| FRD Section | FrdData Field | Extraction |
|
|
17
|
+
|-------------|---------------|------------|
|
|
18
|
+
| Section 1: Overview | `overview.objective` | Functional objective text |
|
|
19
|
+
| Section 1: Overview | `overview.problem` | Problem statement |
|
|
20
|
+
| Section 1: Overview | `overview.solution` | Solution statement |
|
|
21
|
+
| Section 2: Use Cases | `useCases[]` | UC-XXX entries (id, name, actor, description, permission, priority) |
|
|
22
|
+
| Section 3: Functional Requirements | `features[]` | FR-XXX entries grouped as features |
|
|
23
|
+
| Section 5: Permission Matrix | `permissions[]` | Role-permission entries |
|
|
24
|
+
| Section 6: Gherkin Scenarios | (used for test data, not doc) | - |
|
|
25
|
+
| Section 7: Validations | `businessRules[]` | BR-XXX from BRD cross-referenced |
|
|
26
|
+
|
|
27
|
+
### From BRD (2-business-requirements.md)
|
|
28
|
+
|
|
29
|
+
| BRD Section | FrdData Field | Extraction |
|
|
30
|
+
|-------------|---------------|------------|
|
|
31
|
+
| Section 2: Business Objectives | `overview.stats` | Count objectives |
|
|
32
|
+
| Section 3: Business Rules | `businessRules[]` | BR-XXX entries (id, name, category, statement) |
|
|
33
|
+
| Section 6: Integrations | `technicalRef` | Integration notes |
|
|
34
|
+
|
|
35
|
+
### From Handoff (4-development-handoff.md)
|
|
36
|
+
|
|
37
|
+
| Handoff Section | FrdData Field | Extraction |
|
|
38
|
+
|-----------------|---------------|------------|
|
|
39
|
+
| Section 3: Files to Create | `technicalRef.entityNames` | Entity names |
|
|
40
|
+
| Section 6: API Endpoints | `apiEndpoints[]` | Endpoint entries |
|
|
41
|
+
| Section 1: Quick Context | `technicalRef.permissionBase` | Permission base path |
|
|
42
|
+
| Section 1: Quick Context | `technicalRef.controllerRoute` | Controller route |
|
|
43
|
+
|
|
44
|
+
### Generated/Inferred Fields
|
|
45
|
+
|
|
46
|
+
| Field | Source |
|
|
47
|
+
|-------|--------|
|
|
48
|
+
| `featureId` | From 00-context.md state |
|
|
49
|
+
| `moduleName` | From 00-context.md state |
|
|
50
|
+
| `applicationName` | From 00-context.md state |
|
|
51
|
+
| `version` | "1.0" (initial) |
|
|
52
|
+
| `benefits[]` | Inferred from BRD objectives or i18n |
|
|
53
|
+
| `beforeAfter` | Inferred from discovery problem/solution |
|
|
54
|
+
| `steps[]` | Inferred from use cases main scenario |
|
|
55
|
+
| `faq[]` | Inferred from discovery open questions |
|
|
56
|
+
| `screenshots` | Convention: `/assets/docs/{module}/step-{N}.png` |
|
|
57
|
+
|
|
58
|
+
## Generated File Structure
|
|
59
|
+
|
|
60
|
+
### frd-data.ts (per module, ~50-80 lines)
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
// web/smartstack-web/src/pages/docs/business/{app}/{module}/frd-data.ts
|
|
64
|
+
import type { FrdData } from '@/components/docs';
|
|
65
|
+
|
|
66
|
+
export const frdData: FrdData = {
|
|
67
|
+
featureId: 'FEAT-001',
|
|
68
|
+
moduleName: 'Sla',
|
|
69
|
+
applicationName: 'Support',
|
|
70
|
+
version: '1.0',
|
|
71
|
+
|
|
72
|
+
overview: {
|
|
73
|
+
objective: 'docs.support.sla.overview.objective',
|
|
74
|
+
problem: 'docs.support.sla.overview.problem',
|
|
75
|
+
solution: 'docs.support.sla.overview.solution',
|
|
76
|
+
stats: { useCases: 4, businessRules: 6, permissions: 5, endpoints: 5 },
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
useCases: [
|
|
80
|
+
{ id: 'UC-001', name: 'Create SLA', actor: 'Admin', description: '...', permission: 'business.support.sla.create', priority: 'Must' },
|
|
81
|
+
// ...
|
|
82
|
+
],
|
|
83
|
+
|
|
84
|
+
benefits: [
|
|
85
|
+
{ icon: 'time', titleKey: 'docs.support.sla.benefits.time.title', value: '-70%', descriptionKey: 'docs.support.sla.benefits.time.description' },
|
|
86
|
+
{ icon: 'quality', titleKey: 'docs.support.sla.benefits.quality.title', value: '+95%', descriptionKey: 'docs.support.sla.benefits.quality.description' },
|
|
87
|
+
{ icon: 'roi', titleKey: 'docs.support.sla.benefits.roi.title', value: '3x', descriptionKey: 'docs.support.sla.benefits.roi.description' },
|
|
88
|
+
],
|
|
89
|
+
|
|
90
|
+
beforeAfter: {
|
|
91
|
+
beforeItems: ['Manual SLA tracking', 'No escalation alerts', 'No compliance visibility', 'Scattered data'],
|
|
92
|
+
afterItems: ['Automated SLA monitoring', 'Real-time escalation', 'Compliance dashboard', 'Centralized metrics'],
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
features: [
|
|
96
|
+
{ id: 'F-001', title: 'SLA Configuration', description: '...', example: '...' },
|
|
97
|
+
// ...
|
|
98
|
+
],
|
|
99
|
+
|
|
100
|
+
steps: [
|
|
101
|
+
{ number: 1, title: 'Navigate to SLA module', description: '...', screenshotKey: 'step1' },
|
|
102
|
+
{ number: 2, title: 'Create SLA policy', description: '...', screenshotKey: 'step2' },
|
|
103
|
+
// ...
|
|
104
|
+
],
|
|
105
|
+
|
|
106
|
+
faq: [
|
|
107
|
+
{ questionKey: 'docs.support.sla.faq.1.question', answerKey: 'docs.support.sla.faq.1.answer' },
|
|
108
|
+
// ...
|
|
109
|
+
],
|
|
110
|
+
|
|
111
|
+
businessRules: [
|
|
112
|
+
{ id: 'BR-001', name: 'SLA Time Calculation', category: 'Calculation', statement: '...' },
|
|
113
|
+
// ...
|
|
114
|
+
],
|
|
115
|
+
|
|
116
|
+
permissions: [
|
|
117
|
+
{ path: 'business.support.sla.read', description: 'View SLA policies', roles: ['Admin', 'Manager', 'User', 'ReadOnly'] },
|
|
118
|
+
{ path: 'business.support.sla.create', description: 'Create SLA policies', roles: ['Admin', 'Manager'] },
|
|
119
|
+
// ...
|
|
120
|
+
],
|
|
121
|
+
|
|
122
|
+
apiEndpoints: [
|
|
123
|
+
{ method: 'GET', path: '/api/business/sla', handler: 'GetAllSlaQuery', permission: '.read' },
|
|
124
|
+
{ method: 'POST', path: '/api/business/sla', handler: 'CreateSlaCommand', permission: '.create' },
|
|
125
|
+
// ...
|
|
126
|
+
],
|
|
127
|
+
|
|
128
|
+
screenshots: {
|
|
129
|
+
step1: '/assets/docs/sla/step-1.png',
|
|
130
|
+
step2: '/assets/docs/sla/step-2.png',
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
technicalRef: {
|
|
134
|
+
permissionBase: 'business.support.sla',
|
|
135
|
+
controllerRoute: 'business.support.sla',
|
|
136
|
+
entityNames: ['Sla', 'SlaPolicy', 'SlaEscalation'],
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Page wrapper (per module, ~10 lines)
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
// web/smartstack-web/src/pages/docs/business/{app}/{module}/index.tsx
|
|
145
|
+
import { FrdDocRenderer } from '@/components/docs';
|
|
146
|
+
import { frdData } from './frd-data';
|
|
147
|
+
|
|
148
|
+
export default function {Module}DocPage() {
|
|
149
|
+
return (
|
|
150
|
+
<FrdDocRenderer
|
|
151
|
+
data={frdData}
|
|
152
|
+
backPath="/docs/business/{app}"
|
|
153
|
+
backLabel="nav.backToApp"
|
|
154
|
+
/>
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### i18n file (FR source, ~30 lines)
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
// web/smartstack-web/src/i18n/locales/fr/docs-{app}-{module}.json
|
|
163
|
+
{
|
|
164
|
+
"support": {
|
|
165
|
+
"sla": {
|
|
166
|
+
"overview": {
|
|
167
|
+
"objective": "Gestion des niveaux de service (SLA)",
|
|
168
|
+
"problem": "Les engagements de service ne sont pas suivis, les escalades sont manuelles",
|
|
169
|
+
"solution": "Monitoring automatique des SLA avec alertes et escalades configurables"
|
|
170
|
+
},
|
|
171
|
+
"benefits": {
|
|
172
|
+
"time": { "title": "Temps économisé", "description": "Réduction de 70% du temps de suivi manuel" },
|
|
173
|
+
"quality": { "title": "Fiabilité", "description": "95% des SLA respectés grâce au monitoring" },
|
|
174
|
+
"roi": { "title": "ROI", "description": "Retour sur investissement en 3 mois" }
|
|
175
|
+
},
|
|
176
|
+
"faq": {
|
|
177
|
+
"1": {
|
|
178
|
+
"question": "Dois-je configurer chaque SLA manuellement ?",
|
|
179
|
+
"answer": "Non, des templates prédéfinis sont disponibles pour les cas courants."
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
> **Note:** Seul FR est généré. EN/IT/DE sont marqués comme "deferred" et générés par un pipeline de traduction séparé.
|
|
188
|
+
|
|
189
|
+
## Screenshot Convention
|
|
190
|
+
|
|
191
|
+
| Key | Path | Description |
|
|
192
|
+
|-----|------|-------------|
|
|
193
|
+
| `step{N}` | `/assets/docs/{module}/step-{N}.png` | Step-by-step guide screenshots |
|
|
194
|
+
| `overview` | `/assets/docs/{module}/overview.png` | Module overview screenshot |
|
|
195
|
+
| `dashboard` | `/assets/docs/{module}/dashboard.png` | Dashboard view |
|
|
196
|
+
|
|
197
|
+
Screenshots are added manually or via Playwright E2E tests.
|
|
198
|
+
The `FrdDocRenderer` shows a "Screenshot à venir" placeholder when the image file is not found.
|
|
@@ -22,7 +22,36 @@ Chaque documentation de module DOIT inclure ces sections dans cet ordre:
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## Data-Driven Approach (Recommended)
|
|
26
|
+
|
|
27
|
+
> **Principe:** Au lieu de générer un composant TSX complet (~250 lignes) par module,
|
|
28
|
+
> générer uniquement un fichier de DONNÉES (`frd-data.ts`, ~50 lignes) + un wrapper minimal.
|
|
29
|
+
> Le rendu est assuré par le composant partagé `FrdDocRenderer` dans `web/.../components/docs/`.
|
|
30
|
+
|
|
31
|
+
### Fichiers à générer par module
|
|
32
|
+
|
|
33
|
+
**1. Data file** (`frd-data.ts`) : Voir [data-schema.md](data-schema.md) pour le mapping complet.
|
|
34
|
+
|
|
35
|
+
**2. Page wrapper** (`index.tsx`, ~10 lignes) :
|
|
36
|
+
```tsx
|
|
37
|
+
import { FrdDocRenderer } from '@/components/docs';
|
|
38
|
+
import { frdData } from './frd-data';
|
|
39
|
+
|
|
40
|
+
export default function {ModuleName}DocPage() {
|
|
41
|
+
return <FrdDocRenderer data={frdData} backPath="/docs/business/{app}" />;
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**3. i18n FR uniquement** : Générer la langue source (FR). EN/IT/DE sont déférés.
|
|
46
|
+
|
|
47
|
+
> **Screenshots:** Chemins conventionnels `/assets/docs/{module}/step-{N}.png`.
|
|
48
|
+
> Le renderer affiche un placeholder "Screenshot à venir" si l'image n'existe pas.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Legacy: Template TSX Complet (référence)
|
|
53
|
+
|
|
54
|
+
> **Déprécié:** Conservé pour référence. Utilisez l'approche data-driven ci-dessus.
|
|
26
55
|
|
|
27
56
|
```tsx
|
|
28
57
|
// web/smartstack-web/src/pages/docs/user/{ModuleName}DocPage.tsx
|