@atlashub/smartstack-cli 1.1.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.
Files changed (144) hide show
  1. package/.documentation/agents.html +912 -0
  2. package/.documentation/apex.html +1014 -0
  3. package/.documentation/business-analyse.html +1074 -0
  4. package/.documentation/commands.html +676 -0
  5. package/.documentation/css/styles.css +2030 -0
  6. package/.documentation/efcore.html +2501 -0
  7. package/.documentation/gitflow.html +2053 -0
  8. package/.documentation/hooks.html +409 -0
  9. package/.documentation/index.html +319 -0
  10. package/.documentation/installation.html +458 -0
  11. package/.documentation/js/app.js +794 -0
  12. package/.documentation/test-web.html +509 -0
  13. package/README.md +90 -0
  14. package/config/default-config.json +86 -0
  15. package/config/settings.json +53 -0
  16. package/config/settings.local.example.json +16 -0
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.js +38198 -0
  19. package/dist/index.js.map +1 -0
  20. package/package.json +86 -0
  21. package/templates/agents/action.md +36 -0
  22. package/templates/agents/efcore/conflicts.md +57 -0
  23. package/templates/agents/efcore/db-deploy.md +51 -0
  24. package/templates/agents/efcore/db-reset.md +59 -0
  25. package/templates/agents/efcore/db-seed.md +56 -0
  26. package/templates/agents/efcore/db-status.md +43 -0
  27. package/templates/agents/efcore/migration.md +85 -0
  28. package/templates/agents/efcore/rebase-snapshot.md +62 -0
  29. package/templates/agents/efcore/scan.md +60 -0
  30. package/templates/agents/efcore/squash.md +67 -0
  31. package/templates/agents/explore-codebase.md +65 -0
  32. package/templates/agents/explore-docs.md +97 -0
  33. package/templates/agents/fix-grammar.md +49 -0
  34. package/templates/agents/gitflow/abort.md +45 -0
  35. package/templates/agents/gitflow/cleanup.md +85 -0
  36. package/templates/agents/gitflow/commit.md +40 -0
  37. package/templates/agents/gitflow/exec.md +48 -0
  38. package/templates/agents/gitflow/finish.md +92 -0
  39. package/templates/agents/gitflow/init.md +139 -0
  40. package/templates/agents/gitflow/merge.md +62 -0
  41. package/templates/agents/gitflow/plan.md +42 -0
  42. package/templates/agents/gitflow/pr.md +78 -0
  43. package/templates/agents/gitflow/review.md +49 -0
  44. package/templates/agents/gitflow/start.md +61 -0
  45. package/templates/agents/gitflow/status.md +32 -0
  46. package/templates/agents/snipper.md +36 -0
  47. package/templates/agents/websearch.md +46 -0
  48. package/templates/commands/_resources/formatting-guide.md +124 -0
  49. package/templates/commands/ai-prompt.md +315 -0
  50. package/templates/commands/apex/1-analyze.md +100 -0
  51. package/templates/commands/apex/2-plan.md +145 -0
  52. package/templates/commands/apex/3-execute.md +171 -0
  53. package/templates/commands/apex/4-examine.md +116 -0
  54. package/templates/commands/apex/5-tasks.md +209 -0
  55. package/templates/commands/apex.md +76 -0
  56. package/templates/commands/application/create.md +362 -0
  57. package/templates/commands/application/templates-backend.md +463 -0
  58. package/templates/commands/application/templates-frontend.md +517 -0
  59. package/templates/commands/application/templates-i18n.md +478 -0
  60. package/templates/commands/application/templates-seed.md +362 -0
  61. package/templates/commands/application.md +303 -0
  62. package/templates/commands/business-analyse/1-init.md +269 -0
  63. package/templates/commands/business-analyse/2-discover.md +520 -0
  64. package/templates/commands/business-analyse/3-analyse.md +408 -0
  65. package/templates/commands/business-analyse/4-specify.md +598 -0
  66. package/templates/commands/business-analyse/5-validate.md +326 -0
  67. package/templates/commands/business-analyse/6-handoff.md +746 -0
  68. package/templates/commands/business-analyse/7-doc-html.md +602 -0
  69. package/templates/commands/business-analyse/bug.md +325 -0
  70. package/templates/commands/business-analyse/change-request.md +368 -0
  71. package/templates/commands/business-analyse/hotfix.md +200 -0
  72. package/templates/commands/business-analyse.md +559 -0
  73. package/templates/commands/controller/create.md +216 -0
  74. package/templates/commands/controller/postman-templates.md +528 -0
  75. package/templates/commands/controller/templates.md +600 -0
  76. package/templates/commands/controller.md +278 -0
  77. package/templates/commands/debug.md +95 -0
  78. package/templates/commands/documentation/module.md +202 -0
  79. package/templates/commands/documentation/templates.md +432 -0
  80. package/templates/commands/documentation.md +190 -0
  81. package/templates/commands/efcore/_env-check.md +153 -0
  82. package/templates/commands/efcore/conflicts.md +269 -0
  83. package/templates/commands/efcore/db-deploy.md +193 -0
  84. package/templates/commands/efcore/db-reset.md +426 -0
  85. package/templates/commands/efcore/db-seed.md +326 -0
  86. package/templates/commands/efcore/db-status.md +214 -0
  87. package/templates/commands/efcore/migration.md +388 -0
  88. package/templates/commands/efcore/rebase-snapshot.md +264 -0
  89. package/templates/commands/efcore/scan.md +202 -0
  90. package/templates/commands/efcore/squash.md +298 -0
  91. package/templates/commands/efcore.md +176 -0
  92. package/templates/commands/epct.md +69 -0
  93. package/templates/commands/explain.md +186 -0
  94. package/templates/commands/explore.md +45 -0
  95. package/templates/commands/feature-full.md +267 -0
  96. package/templates/commands/gitflow/1-init.md +1038 -0
  97. package/templates/commands/gitflow/10-start.md +768 -0
  98. package/templates/commands/gitflow/11-finish.md +323 -0
  99. package/templates/commands/gitflow/12-cleanup.md +276 -0
  100. package/templates/commands/gitflow/13-sync.md +216 -0
  101. package/templates/commands/gitflow/14-rebase.md +251 -0
  102. package/templates/commands/gitflow/2-status.md +167 -0
  103. package/templates/commands/gitflow/3-commit.md +194 -0
  104. package/templates/commands/gitflow/4-plan.md +145 -0
  105. package/templates/commands/gitflow/5-exec.md +147 -0
  106. package/templates/commands/gitflow/6-abort.md +344 -0
  107. package/templates/commands/gitflow/7-pull-request.md +226 -0
  108. package/templates/commands/gitflow/8-review.md +176 -0
  109. package/templates/commands/gitflow/9-merge.md +224 -0
  110. package/templates/commands/gitflow.md +128 -0
  111. package/templates/commands/implement.md +663 -0
  112. package/templates/commands/notification.md +129 -0
  113. package/templates/commands/oneshot.md +57 -0
  114. package/templates/commands/quick-search.md +72 -0
  115. package/templates/commands/review.md +106 -0
  116. package/templates/commands/utils/test-web-config.md +160 -0
  117. package/templates/commands/utils/test-web.md +151 -0
  118. package/templates/commands/workflow.md +193 -0
  119. package/templates/gitflow/config.json +138 -0
  120. package/templates/hooks/ef-migration-check.md +139 -0
  121. package/templates/hooks/hooks.json +15 -0
  122. package/templates/skills/ai-prompt/SKILL.md +778 -0
  123. package/templates/skills/application/SKILL.md +563 -0
  124. package/templates/skills/application/templates-backend.md +450 -0
  125. package/templates/skills/application/templates-frontend.md +531 -0
  126. package/templates/skills/application/templates-i18n.md +520 -0
  127. package/templates/skills/application/templates-seed.md +647 -0
  128. package/templates/skills/business-analyse/SKILL.md +191 -0
  129. package/templates/skills/business-analyse/questionnaire.md +283 -0
  130. package/templates/skills/business-analyse/templates-frd.md +477 -0
  131. package/templates/skills/business-analyse/templates-react.md +580 -0
  132. package/templates/skills/controller/SKILL.md +240 -0
  133. package/templates/skills/controller/postman-templates.md +614 -0
  134. package/templates/skills/controller/templates.md +1468 -0
  135. package/templates/skills/documentation/SKILL.md +133 -0
  136. package/templates/skills/documentation/templates.md +476 -0
  137. package/templates/skills/feature-full/SKILL.md +838 -0
  138. package/templates/skills/notification/SKILL.md +555 -0
  139. package/templates/skills/ui-components/SKILL.md +870 -0
  140. package/templates/skills/workflow/SKILL.md +582 -0
  141. package/templates/test-web/api-health.json +38 -0
  142. package/templates/test-web/minimal.json +19 -0
  143. package/templates/test-web/npm-package.json +46 -0
  144. package/templates/test-web/seo-check.json +54 -0
@@ -0,0 +1,432 @@
1
+ # Templates de Documentation
2
+
3
+ ## Template User Module
4
+
5
+ ```tsx
6
+ // web/smartstack-web/src/pages/docs/user/{context}/{ModuleName}DocPage.tsx
7
+
8
+ import { Link } from 'react-router-dom';
9
+ import { useTranslation } from 'react-i18next';
10
+ import { ArrowRight, ChevronRight, CheckCircle, AlertTriangle } from 'lucide-react';
11
+
12
+ // MOCK DATA - Données fictives pour illustrer l'interface
13
+ const mockData = {
14
+ items: [
15
+ { id: 1, name: 'Item 1', status: 'active', value: 125 },
16
+ { id: 2, name: 'Item 2', status: 'pending', value: 89 },
17
+ ],
18
+ stats: { total: 256, active: 180, pending: 52, warning: 24 },
19
+ };
20
+
21
+ export function {ModuleName}DocPage() {
22
+ const { t } = useTranslation('docs');
23
+
24
+ return (
25
+ <div className="space-y-8">
26
+ {/* 1. BREADCRUMB */}
27
+ <div className="flex items-center gap-2 text-sm text-[var(--text-secondary)]">
28
+ <Link to="/docs" className="hover:text-[var(--color-primary-600)]">
29
+ {t('breadcrumb.documentation')}
30
+ </Link>
31
+ <span>/</span>
32
+ <Link to="/docs/user" className="hover:text-[var(--color-primary-600)]">
33
+ {t('breadcrumb.user')}
34
+ </Link>
35
+ <span>/</span>
36
+ <span>{t('breadcrumb.moduleName')}</span>
37
+ </div>
38
+
39
+ {/* 2. HEADER */}
40
+ <div>
41
+ <h1 className="text-3xl font-bold mb-4 flex items-center gap-3">
42
+ <IconName className="w-8 h-8 text-[var(--color-primary-600)]" />
43
+ {t('module.moduleName.title')}
44
+ </h1>
45
+ <p className="text-lg text-[var(--text-secondary)]">
46
+ {t('module.moduleName.subtitle')}
47
+ </p>
48
+ </div>
49
+
50
+ {/* 3. TABLE DES MATIÈRES */}
51
+ <div className="card p-4">
52
+ <h2 className="font-semibold mb-3">{t('common.tableOfContents')}</h2>
53
+ <nav className="grid grid-cols-2 md:grid-cols-3 gap-2">
54
+ {['introduction', 'access', 'overview', 'features', 'faq', 'api'].map((section) => (
55
+ <a key={section} href={`#${section}`} className="flex items-center gap-2 p-2 rounded hover:bg-[var(--bg-secondary)]">
56
+ <ChevronRight className="w-4 h-4 text-[var(--color-primary-600)]" />
57
+ {t(`module.moduleName.sections.${section}.title`)}
58
+ </a>
59
+ ))}
60
+ </nav>
61
+ </div>
62
+
63
+ {/* 4. SECTIONS NUMÉROTÉES */}
64
+ <section id="introduction" className="scroll-mt-4">
65
+ <h2 className="text-xl font-semibold mb-4 flex items-center gap-2">
66
+ <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm font-bold">1</span>
67
+ {t('module.moduleName.sections.introduction.title')}
68
+ </h2>
69
+ <div className="card p-6">
70
+ {/* Contenu de la section */}
71
+ </div>
72
+ </section>
73
+
74
+ {/* 5. MAQUETTE UI AVEC MOCK DATA */}
75
+ <section id="overview" className="scroll-mt-4">
76
+ <div className="card p-6">
77
+ <div className="border-2 border-dashed border-[var(--border-color)] rounded-lg p-4">
78
+ <div className="text-xs text-[var(--text-tertiary)] mb-4 text-center">
79
+ {t('common.mockupPreview')}
80
+ </div>
81
+ {/* Stats Cards */}
82
+ <div className="grid grid-cols-2 md:grid-cols-4 gap-4">
83
+ <div className="p-4 rounded-lg bg-[var(--bg-secondary)] text-center">
84
+ <div className="text-2xl font-bold text-[var(--color-primary-600)]">{mockData.stats.total}</div>
85
+ <div className="text-sm text-[var(--text-secondary)]">{t('common.total')}</div>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ </section>
91
+
92
+ {/* 6. FAQ */}
93
+ <section id="faq" className="scroll-mt-4">
94
+ <div className="space-y-4">
95
+ {[1, 2, 3].map((i) => (
96
+ <div key={i} className="card p-4">
97
+ <h3 className="font-medium mb-2">{t(`module.moduleName.faq.q${i}.question`)}</h3>
98
+ <p className="text-sm text-[var(--text-secondary)]">{t(`module.moduleName.faq.q${i}.answer`)}</p>
99
+ </div>
100
+ ))}
101
+ </div>
102
+ </section>
103
+
104
+ {/* 7. NAVIGATION FOOTER */}
105
+ <div className="flex justify-between pt-6 border-t border-[var(--border-color)]">
106
+ <Link to="/docs/user/previous" className="flex items-center gap-2 text-[var(--text-secondary)] hover:text-[var(--color-primary-600)]">
107
+ <ArrowRight className="w-4 h-4 rotate-180" />
108
+ {t('nav.previous')}
109
+ </Link>
110
+ <Link to="/docs/user/next" className="flex items-center gap-2 text-[var(--color-primary-600)]">
111
+ {t('nav.next')}
112
+ <ArrowRight className="w-4 h-4" />
113
+ </Link>
114
+ </div>
115
+ </div>
116
+ );
117
+ }
118
+ ```
119
+
120
+ ## Template Developer Tool
121
+
122
+ ```tsx
123
+ // web/smartstack-web/src/pages/docs/developer/tools/{ToolName}Page.tsx
124
+
125
+ import { Link } from 'react-router-dom';
126
+ import { useTranslation } from 'react-i18next';
127
+ import { Terminal, CheckCircle, Copy, ExternalLink } from 'lucide-react';
128
+ import { useState } from 'react';
129
+
130
+ function CodeBlock({ code, language = 'bash' }: { code: string; language?: string }) {
131
+ const [copied, setCopied] = useState(false);
132
+ const handleCopy = () => {
133
+ navigator.clipboard.writeText(code);
134
+ setCopied(true);
135
+ setTimeout(() => setCopied(false), 2000);
136
+ };
137
+
138
+ return (
139
+ <div className="relative group">
140
+ <pre className="bg-[var(--bg-tertiary)] p-4 rounded-lg overflow-x-auto text-sm font-mono">
141
+ <code>{code}</code>
142
+ </pre>
143
+ <button onClick={handleCopy} className="absolute top-2 right-2 p-2 rounded bg-[var(--bg-secondary)] opacity-0 group-hover:opacity-100">
144
+ {copied ? <CheckCircle className="w-4 h-4 text-green-500" /> : <Copy className="w-4 h-4" />}
145
+ </button>
146
+ </div>
147
+ );
148
+ }
149
+
150
+ export function {ToolName}Page() {
151
+ const { t } = useTranslation('docs');
152
+
153
+ return (
154
+ <div className="space-y-8">
155
+ {/* Breadcrumb */}
156
+ <div className="flex items-center gap-2 text-sm text-[var(--text-secondary)]">
157
+ <Link to="/docs">Documentation</Link>
158
+ <span>/</span>
159
+ <Link to="/docs/developer">Developer</Link>
160
+ <span>/</span>
161
+ <Link to="/docs/developer/tools">Tools</Link>
162
+ <span>/</span>
163
+ <span>{t('developer.tools.toolName.title')}</span>
164
+ </div>
165
+
166
+ {/* Header avec badges */}
167
+ <div>
168
+ <h1 className="text-3xl font-bold mb-4 flex items-center gap-3">
169
+ <Terminal className="w-8 h-8 text-[var(--color-primary-600)]" />
170
+ {t('developer.tools.toolName.title')}
171
+ </h1>
172
+ <div className="flex gap-2 mt-4">
173
+ <span className="px-3 py-1 rounded-full bg-green-500/10 text-green-600 text-sm">Gratuit</span>
174
+ <span className="px-3 py-1 rounded-full bg-blue-500/10 text-blue-600 text-sm">.NET</span>
175
+ </div>
176
+ </div>
177
+
178
+ {/* Sections: Prérequis, Installation, Configuration, Usage, CI/CD */}
179
+ <section id="installation">
180
+ <h2 className="text-xl font-semibold mb-4">Installation</h2>
181
+ <CodeBlock code="dotnet add package ToolName" />
182
+ </section>
183
+
184
+ {/* Liens externes */}
185
+ <div className="card p-4 bg-blue-500/5 border border-blue-500/20">
186
+ <div className="flex items-center gap-2 mb-2">
187
+ <ExternalLink className="w-4 h-4 text-blue-600" />
188
+ <span className="font-medium">Ressources</span>
189
+ </div>
190
+ <div className="flex gap-4">
191
+ <a href="#" className="text-blue-600 hover:underline text-sm">Documentation officielle</a>
192
+ <a href="#" className="text-blue-600 hover:underline text-sm">GitHub</a>
193
+ </div>
194
+ </div>
195
+ </div>
196
+ );
197
+ }
198
+ ```
199
+
200
+ ## Template Database Schema (avec MCD en HTML)
201
+
202
+ ```tsx
203
+ // web/smartstack-web/src/pages/docs/developer/database/{SchemaName}SchemaPage.tsx
204
+
205
+ import { Link } from 'react-router-dom';
206
+ import { Database, Table, Key, Link2, ArrowRight } from 'lucide-react';
207
+
208
+ const schemaData = {
209
+ name: 'schema_name',
210
+ tables: [
211
+ {
212
+ name: 'TableName',
213
+ columns: [
214
+ { name: 'Id', type: 'UNIQUEIDENTIFIER', isPK: true, isFK: false, required: true, description: 'Identifiant unique' },
215
+ { name: 'ForeignId', type: 'UNIQUEIDENTIFIER', isPK: false, isFK: true, fkTable: 'OtherTable', required: true, description: 'Référence vers OtherTable' },
216
+ ],
217
+ relations: [
218
+ { type: '1:N', target: 'ChildTable', description: 'Une entrée a plusieurs enfants' },
219
+ ]
220
+ },
221
+ ]
222
+ };
223
+
224
+ // Composant pour afficher une table dans le diagramme MCD
225
+ function McdTableCard({ table, schema }: { table: typeof schemaData.tables[0]; schema: string }) {
226
+ return (
227
+ <div className="card p-4 min-w-[200px]">
228
+ <div className="flex items-center gap-2 mb-3 pb-2 border-b border-[var(--border-color)]">
229
+ <Table className="w-4 h-4 text-[var(--color-primary-600)]" />
230
+ <span className="font-semibold">{schema}.{table.name}</span>
231
+ </div>
232
+ <div className="space-y-1 text-sm">
233
+ {table.columns.map((col) => (
234
+ <div key={col.name} className="flex items-center gap-2">
235
+ {col.isPK && <Key className="w-3 h-3 text-amber-500" />}
236
+ {col.isFK && <Link2 className="w-3 h-3 text-blue-500" />}
237
+ {!col.isPK && !col.isFK && <span className="w-3" />}
238
+ <span className={`font-mono text-xs ${col.isPK ? 'font-bold' : ''}`}>
239
+ {col.name}
240
+ </span>
241
+ {col.required && <span className="text-red-500">*</span>}
242
+ </div>
243
+ ))}
244
+ </div>
245
+ </div>
246
+ );
247
+ }
248
+
249
+ // Composant pour afficher une relation entre tables
250
+ function McdRelation({ from, to, type, description }: { from: string; to: string; type: string; description: string }) {
251
+ return (
252
+ <div className="flex items-center gap-4 py-2">
253
+ <span className="font-mono text-sm bg-[var(--bg-secondary)] px-2 py-1 rounded">{from}</span>
254
+ <div className="flex items-center gap-2">
255
+ <div className="w-8 h-0.5 bg-[var(--border-color)]" />
256
+ <span className="px-2 py-0.5 rounded bg-purple-500/10 text-purple-600 text-xs font-medium">{type}</span>
257
+ <ArrowRight className="w-4 h-4 text-[var(--text-tertiary)]" />
258
+ </div>
259
+ <span className="font-mono text-sm bg-[var(--bg-secondary)] px-2 py-1 rounded">{to}</span>
260
+ <span className="text-sm text-[var(--text-secondary)]">{description}</span>
261
+ </div>
262
+ );
263
+ }
264
+
265
+ export function {SchemaName}SchemaPage() {
266
+ return (
267
+ <div className="space-y-8">
268
+ {/* Section MCD - Diagramme HTML */}
269
+ <section id="mcd">
270
+ <h2 className="text-xl font-semibold mb-4 flex items-center gap-2">
271
+ <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm font-bold">1</span>
272
+ Modèle Conceptuel de Données (MCD)
273
+ </h2>
274
+ <div className="card p-6">
275
+ {/* Diagramme visuel des tables */}
276
+ <div className="flex flex-wrap gap-6 justify-center mb-8">
277
+ {schemaData.tables.map((table) => (
278
+ <McdTableCard key={table.name} table={table} schema={schemaData.name} />
279
+ ))}
280
+ </div>
281
+
282
+ {/* Relations entre tables */}
283
+ <div className="border-t border-[var(--border-color)] pt-4">
284
+ <h4 className="font-medium mb-3 text-sm text-[var(--text-secondary)]">Relations</h4>
285
+ <div className="space-y-2">
286
+ {schemaData.tables.flatMap((table) =>
287
+ table.relations.map((rel, idx) => (
288
+ <McdRelation
289
+ key={`${table.name}-${idx}`}
290
+ from={table.name}
291
+ to={rel.target}
292
+ type={rel.type}
293
+ description={rel.description}
294
+ />
295
+ ))
296
+ )}
297
+ </div>
298
+ </div>
299
+
300
+ {/* Légende */}
301
+ <div className="mt-6 pt-4 border-t border-[var(--border-color)] flex flex-wrap gap-4 text-xs text-[var(--text-secondary)]">
302
+ <div className="flex items-center gap-1">
303
+ <Key className="w-3 h-3 text-amber-500" /> PK = Clé primaire
304
+ </div>
305
+ <div className="flex items-center gap-1">
306
+ <Link2 className="w-3 h-3 text-blue-500" /> FK = Clé étrangère
307
+ </div>
308
+ <div className="flex items-center gap-1">
309
+ <span className="text-red-500">*</span> = Obligatoire
310
+ </div>
311
+ </div>
312
+ </div>
313
+ </section>
314
+
315
+ {/* Section Tables détaillées */}
316
+ <section id="tables">
317
+ <h2 className="text-xl font-semibold mb-4 flex items-center gap-2">
318
+ <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm font-bold">2</span>
319
+ Tables détaillées
320
+ </h2>
321
+ {schemaData.tables.map((table) => (
322
+ <div key={table.name} className="card p-6 mb-4">
323
+ <h3 className="font-semibold flex items-center gap-2 mb-4">
324
+ <Table className="w-5 h-5 text-[var(--color-primary-600)]" />
325
+ {schemaData.name}.{table.name}
326
+ </h3>
327
+ <div className="overflow-x-auto">
328
+ <table className="w-full text-sm">
329
+ <thead>
330
+ <tr className="bg-[var(--bg-secondary)]">
331
+ <th className="text-left py-2 px-3 rounded-tl-lg">Colonne</th>
332
+ <th className="text-left py-2 px-3">Type SQL</th>
333
+ <th className="text-left py-2 px-3">Clés</th>
334
+ <th className="text-left py-2 px-3 rounded-tr-lg">Description</th>
335
+ </tr>
336
+ </thead>
337
+ <tbody>
338
+ {table.columns.map((col, idx) => (
339
+ <tr key={col.name} className={idx % 2 === 1 ? 'bg-[var(--bg-secondary)]/50' : ''}>
340
+ <td className="py-2 px-3 font-mono text-sm">
341
+ {col.name}
342
+ {col.required && <span className="text-red-500 ml-1">*</span>}
343
+ </td>
344
+ <td className="py-2 px-3 text-[var(--text-secondary)]">{col.type}</td>
345
+ <td className="py-2 px-3">
346
+ {col.isPK && (
347
+ <span className="inline-flex items-center gap-1 px-2 py-0.5 rounded bg-amber-500/10 text-amber-600 text-xs mr-1">
348
+ <Key className="w-3 h-3" /> PK
349
+ </span>
350
+ )}
351
+ {col.isFK && (
352
+ <span className="inline-flex items-center gap-1 px-2 py-0.5 rounded bg-blue-500/10 text-blue-600 text-xs">
353
+ <Link2 className="w-3 h-3" /> FK
354
+ </span>
355
+ )}
356
+ </td>
357
+ <td className="py-2 px-3 text-[var(--text-secondary)]">{col.description}</td>
358
+ </tr>
359
+ ))}
360
+ </tbody>
361
+ </table>
362
+ </div>
363
+
364
+ {/* Relations de cette table */}
365
+ {table.relations.length > 0 && (
366
+ <div className="mt-4 pt-4 border-t border-[var(--border-color)]">
367
+ <h4 className="font-medium mb-2 text-sm">Relations</h4>
368
+ <div className="flex flex-wrap gap-2">
369
+ {table.relations.map((rel, idx) => (
370
+ <div key={idx} className="flex items-center gap-2 px-3 py-1 rounded-lg bg-[var(--bg-secondary)] text-sm">
371
+ <span className="font-mono text-[var(--color-primary-600)]">{rel.type}</span>
372
+ <ArrowRight className="w-4 h-4 text-[var(--text-tertiary)]" />
373
+ <span>{rel.target}</span>
374
+ </div>
375
+ ))}
376
+ </div>
377
+ </div>
378
+ )}
379
+ </div>
380
+ ))}
381
+ </section>
382
+ </div>
383
+ );
384
+ }
385
+ ```
386
+
387
+ ## Patterns Réutilisables
388
+
389
+ ### Stats Cards
390
+ ```tsx
391
+ <div className="grid grid-cols-2 md:grid-cols-4 gap-4">
392
+ <div className="p-4 rounded-lg bg-[var(--bg-secondary)] text-center">
393
+ <div className="text-2xl font-bold text-[var(--color-primary-600)]">{value}</div>
394
+ <div className="text-sm text-[var(--text-secondary)]">{label}</div>
395
+ </div>
396
+ </div>
397
+ ```
398
+
399
+ ### Badges de statut
400
+ ```tsx
401
+ const statusColors = {
402
+ active: 'bg-green-500/10 text-green-600',
403
+ pending: 'bg-yellow-500/10 text-yellow-600',
404
+ error: 'bg-red-500/10 text-red-600',
405
+ };
406
+
407
+ <span className={`px-2 py-1 rounded text-xs ${statusColors[status]}`}>{status}</span>
408
+ ```
409
+
410
+ ### Section numérotée
411
+ ```tsx
412
+ <section id="section-id" className="scroll-mt-4">
413
+ <h2 className="text-xl font-semibold mb-4 flex items-center gap-2">
414
+ <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm font-bold">
415
+ {number}
416
+ </span>
417
+ {title}
418
+ </h2>
419
+ <div className="card p-6">{children}</div>
420
+ </section>
421
+ ```
422
+
423
+ ### Alert/Info Box
424
+ ```tsx
425
+ <div className="p-4 rounded-lg bg-amber-500/10 border border-amber-500/20 flex items-start gap-3">
426
+ <AlertTriangle className="w-5 h-5 text-amber-600 flex-shrink-0" />
427
+ <div>
428
+ <div className="font-medium text-amber-600">Attention</div>
429
+ <p className="text-sm text-[var(--text-secondary)]">{message}</p>
430
+ </div>
431
+ </div>
432
+ ```
@@ -0,0 +1,190 @@
1
+ # /documentation - Skill Documentation SmartStack
2
+
3
+ > **Synergie Skill/Commande:**
4
+ > - **Skill** (`.claude/skills/documentation/`) → Invocation automatique par Claude
5
+ > - **Commande** (`/documentation:module`) → Invocation manuelle par l'utilisateur
6
+ > - Templates partagés dans `.claude/skills/documentation/templates.md`
7
+
8
+ ---
9
+
10
+ ## ARGUMENTS
11
+
12
+ ```
13
+ /documentation:module <type> <target>
14
+ ```
15
+
16
+ | Variable | Extraction | Valeurs |
17
+ |----------|------------|---------|
18
+ | `$TYPE` | Premier mot | `user` \| `developer` \| `database` \| `testing` |
19
+ | `$TARGET` | Reste de la ligne | Nom du module, outil, ou schéma |
20
+
21
+ ---
22
+
23
+ ## QUAND CE SKILL S'ACTIVE
24
+
25
+ Claude invoque automatiquement ce skill quand il détecte :
26
+
27
+ | Déclencheur | Exemple |
28
+ |-------------|---------|
29
+ | Demande explicite | "Documente le module CRM" |
30
+ | Mention de documentation | "Il faudrait créer la doc pour..." |
31
+ | Après implémentation | "La feature est terminée, génère la doc" |
32
+ | Question sur structure | "Comment est organisée la documentation ?" |
33
+ | Mots-clés | "MCD", "schéma", "diagramme", "documenter" |
34
+
35
+ ---
36
+
37
+ ## TYPES DE DOCUMENTATION
38
+
39
+ | Type | Description | Sortie |
40
+ |------|-------------|--------|
41
+ | `user` | Module utilisateur avec maquettes UI | `docs/user/{context}/{Module}DocPage.tsx` |
42
+ | `developer` | Guide d'outil de développement | `docs/developer/tools/{Tool}Page.tsx` |
43
+ | `database` | Schéma avec diagramme MCD | `docs/developer/database/{Schema}SchemaPage.tsx` |
44
+ | `testing` | Outil de test | `docs/developer/testing/{Tool}TestingPage.tsx` |
45
+
46
+ ---
47
+
48
+ ## RÈGLES ABSOLUES
49
+
50
+ 1. **JAMAIS** de texte en dur → `useTranslation('docs')`
51
+ 2. **JAMAIS** d'ASCII art → composants React/HTML pour MCD
52
+ 3. **TOUJOURS** lire les sources existantes avant de générer
53
+ 4. **TOUJOURS** demander confirmation avant de créer les fichiers
54
+ 5. **TOUJOURS** mettre à jour App.tsx et les index parents
55
+
56
+ ---
57
+
58
+ ## WORKFLOW
59
+
60
+ ### ÉTAPE 1: PARSING DES ARGUMENTS
61
+
62
+ ```
63
+ EXTRAIRE $TYPE = premier mot des arguments
64
+ EXTRAIRE $TARGET = reste des arguments
65
+
66
+ SI $TYPE absent OU non reconnu → AskUserQuestion
67
+ SI $TARGET absent → AskUserQuestion
68
+ ```
69
+
70
+ ### ÉTAPE 2: ANALYSE (selon $TYPE)
71
+
72
+ #### SI $TYPE == "user"
73
+
74
+ | Action | Commande |
75
+ |--------|----------|
76
+ | Trouver le module | `Grep "code.*$TARGET" src/.../Navigation/` |
77
+ | Composants React | `Glob "web/.../pages/**/*$TARGET*"` |
78
+ | Permissions | `Grep "$TARGET" src/.../Permissions.cs` |
79
+ | Endpoints API | `Grep "$TARGET" src/.../Controllers/` |
80
+
81
+ #### SI $TYPE == "database"
82
+
83
+ | Action | Commande |
84
+ |--------|----------|
85
+ | Tables du schéma | `Read ApplicationDbContextModelSnapshot.cs` |
86
+ | Configurations | `Glob "Persistence/Configurations/$TARGET/*.cs"` |
87
+ | Entités Domain | `Glob "Domain/Entities/$TARGET/*.cs"` |
88
+
89
+ #### SI $TYPE == "developer" ou "testing"
90
+
91
+ | Action | Commande |
92
+ |--------|----------|
93
+ | Doc existante | `Glob "pages/docs/developer/**/*$TARGET*"` |
94
+ | Fichiers config | `Glob "**/$TARGET*.{json,yaml}"` |
95
+ | Doc officielle | `WebSearch` |
96
+
97
+ ### ÉTAPE 3: CONFIRMATION UTILISATEUR
98
+
99
+ ```typescript
100
+ AskUserQuestion({
101
+ questions: [{
102
+ header: "Détail",
103
+ question: "Quel niveau de détail pour '$TARGET' ?",
104
+ options: [
105
+ { label: "Complet (Recommended)", description: "Toutes sections" },
106
+ { label: "Standard", description: "Sections principales" },
107
+ { label: "Minimal", description: "Référence rapide" }
108
+ ]
109
+ }]
110
+ })
111
+ ```
112
+
113
+ ### ÉTAPE 4: GÉNÉRATION
114
+
115
+ | $TYPE | Fichier | Chemin |
116
+ |-------|---------|--------|
117
+ | `user` | `{Module}DocPage.tsx` | `pages/docs/user/{context}/` |
118
+ | `developer` | `{Tool}Page.tsx` | `pages/docs/developer/tools/` |
119
+ | `database` | `{Schema}SchemaPage.tsx` | `pages/docs/developer/database/` |
120
+ | `testing` | `{Tool}TestingPage.tsx` | `pages/docs/developer/testing/` |
121
+
122
+ **Fichiers à créer/modifier:**
123
+ 1. Page React (utiliser template de `templates.md`)
124
+ 2. Traductions EN → `i18n/locales/en/docs.json`
125
+ 3. Traductions FR → `i18n/locales/fr/docs.json`
126
+ 4. Route → `App.tsx`
127
+ 5. Index parent → lien de navigation
128
+
129
+ ### ÉTAPE 5: INTÉGRATION
130
+
131
+ ```typescript
132
+ // App.tsx
133
+ import { {Name}DocPage } from '@/pages/docs/{path}/{Name}DocPage';
134
+ <Route path="{slug}" element={<{Name}DocPage />} />
135
+ ```
136
+
137
+ ### ÉTAPE 6: RÉSUMÉ FINAL
138
+
139
+ Afficher:
140
+ - ✅ Fichiers créés (chemins cliquables)
141
+ - 🔗 URL: `/docs/{path}/{slug}`
142
+ - 📝 Prochaines étapes
143
+
144
+ ---
145
+
146
+ ## OUTILS DEVELOPER DISPONIBLES
147
+
148
+ | Catégorie | Outils |
149
+ |-----------|--------|
150
+ | Environnement Local | Docker Compose, MailDev, VS Code, Variables d'env |
151
+ | Tests API | Postman, REST Client, Swagger/OpenAPI |
152
+ | Tests E2E | Microsoft Playwright, Inspector, Trace Viewer |
153
+ | Tests Charge | NBomber (.NET), k6, Azure Load Testing |
154
+ | Tests Sécurité | OWASP ZAP, Security Code Scan, Snyk, OWASP ASVS |
155
+
156
+ ---
157
+
158
+ ## SOURCES DE DONNÉES
159
+
160
+ | Donnée | Source |
161
+ |--------|--------|
162
+ | Tables DB | `ApplicationDbContextModelSnapshot.cs` |
163
+ | Configurations | `Persistence/Configurations/{schema}/*.cs` |
164
+ | Permissions | `Domain/Authorization/Permissions.cs` |
165
+ | Routes | `App.tsx` |
166
+ | Traductions | `i18n/locales/*/docs.json` |
167
+ | Doc outils | WebSearch |
168
+
169
+ ---
170
+
171
+ ## STRUCTURE i18n
172
+
173
+ ```json
174
+ {
175
+ "breadcrumb": { "documentation": "...", "user": "...", "developer": "..." },
176
+ "common": { "tableOfContents": "...", "externalResources": "..." },
177
+ "user": { "{module}": { "title": "...", "sections": {...} } },
178
+ "developer": { "tools": {...}, "database": {...} }
179
+ }
180
+ ```
181
+
182
+ ---
183
+
184
+ ## CONTRAINTES
185
+
186
+ - Variables CSS: `var(--text-primary)`, `var(--bg-secondary)`, `var(--color-primary-600)`
187
+ - Responsive: `grid-cols-1 md:grid-cols-2 lg:grid-cols-3`
188
+ - Icônes: `lucide-react` uniquement
189
+ - Liens externes: avec `<ExternalLink />` icon
190
+ - MCD: composants React/HTML (JAMAIS ASCII)