@atlashub/smartstack-cli 1.13.2 → 1.14.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 (210) hide show
  1. package/.documentation/agents.html +1 -1
  2. package/.documentation/apex.html +1 -1
  3. package/.documentation/business-analyse.html +1 -1
  4. package/.documentation/cli-commands.html +3 -3
  5. package/.documentation/commands.html +1 -1
  6. package/.documentation/efcore.html +1 -1
  7. package/.documentation/gitflow.html +1 -1
  8. package/.documentation/hooks.html +1 -1
  9. package/.documentation/index.html +1 -1
  10. package/.documentation/init.html +3 -3
  11. package/.documentation/installation.html +1001 -352
  12. package/.documentation/ralph-loop.html +1 -1
  13. package/.documentation/test-web.html +1 -1
  14. package/README.md +88 -20
  15. package/dist/index.js +276 -85
  16. package/dist/index.js.map +1 -1
  17. package/package.json +1 -1
  18. package/templates/agents/code-reviewer.md +163 -0
  19. package/templates/agents/efcore/db-deploy.md +25 -7
  20. package/templates/agents/efcore/db-reset.md +31 -10
  21. package/templates/agents/efcore/db-status.md +22 -5
  22. package/templates/agents/efcore/migration.md +69 -19
  23. package/templates/agents/gitflow/cleanup.md +8 -1
  24. package/templates/agents/gitflow/commit.md +7 -5
  25. package/templates/agents/gitflow/finish.md +6 -4
  26. package/templates/agents/gitflow/pr.md +8 -1
  27. package/templates/agents/gitflow/start.md +1 -1
  28. package/templates/commands/check-version.md +267 -0
  29. package/templates/commands/efcore/_shared.md +30 -1
  30. package/templates/commands/efcore/db-reset.md +18 -6
  31. package/templates/commands/gitflow/OPTIMIZATIONS.md +206 -0
  32. package/templates/commands/refactor.md +164 -0
  33. package/templates/project/DependencyInjection.Application.cs.template +25 -0
  34. package/templates/project/DependencyInjection.Infrastructure.cs.template +61 -0
  35. package/templates/project/DesignTimeExtensionsDbContextFactory.cs.template +70 -0
  36. package/templates/project/ExampleEntity.cs.template +116 -0
  37. package/templates/project/ExampleEntityConfiguration.cs.template +64 -0
  38. package/templates/project/ExampleService.cs.template +146 -0
  39. package/templates/project/ExtensionsDbContext.cs.template +41 -0
  40. package/templates/project/IExtensionsDbContext.cs.template +22 -0
  41. package/templates/project/Program.cs.template +47 -0
  42. package/templates/project/README.md +79 -0
  43. package/templates/ralph/README.md +10 -8
  44. package/templates/ralph/ralph.config.yaml +2 -2
  45. package/templates/skills/_shared.md +44 -44
  46. package/templates/skills/ai-prompt/SKILL.md +55 -55
  47. package/templates/skills/apex/SKILL.md +235 -0
  48. package/templates/skills/apex/steps/step-00-init.md +203 -0
  49. package/templates/skills/apex/steps/step-01-analyze.md +210 -0
  50. package/templates/skills/apex/steps/step-02-plan.md +217 -0
  51. package/templates/skills/apex/steps/step-03-execute.md +178 -0
  52. package/templates/skills/apex/steps/step-04-validate.md +217 -0
  53. package/templates/skills/apex/steps/step-05-examine.md +207 -0
  54. package/templates/skills/apex/steps/step-06-resolve.md +181 -0
  55. package/templates/skills/apex/steps/step-07-tests.md +206 -0
  56. package/templates/skills/apex/steps/step-08-run-tests.md +207 -0
  57. package/templates/skills/apex/templates/00-context.md +46 -0
  58. package/templates/skills/apex/templates/01-analyze.md +63 -0
  59. package/templates/skills/apex/templates/02-plan.md +63 -0
  60. package/templates/skills/apex/templates/03-execute.md +34 -0
  61. package/templates/skills/apex/templates/04-validate.md +61 -0
  62. package/templates/skills/apex/templates/05-examine.md +58 -0
  63. package/templates/skills/apex/templates/06-resolve.md +39 -0
  64. package/templates/skills/apex/templates/07-tests.md +56 -0
  65. package/templates/skills/apex/templates/08-run-tests.md +41 -0
  66. package/templates/skills/apex/templates/README.md +69 -0
  67. package/templates/skills/application/SKILL.md +50 -50
  68. package/templates/skills/application/templates-backend.md +25 -25
  69. package/templates/skills/application/templates-frontend.md +43 -43
  70. package/templates/skills/application/templates-i18n.md +29 -29
  71. package/templates/skills/application/templates-seed.md +77 -77
  72. package/templates/skills/business-analyse/SKILL.md +223 -0
  73. package/templates/skills/business-analyse/_shared.md +258 -0
  74. package/templates/skills/business-analyse/questionnaire/01-context.md +33 -0
  75. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +35 -0
  76. package/templates/skills/business-analyse/questionnaire/03-scope.md +35 -0
  77. package/templates/skills/business-analyse/questionnaire/04-data.md +36 -0
  78. package/templates/skills/business-analyse/questionnaire/05-integrations.md +36 -0
  79. package/templates/skills/business-analyse/questionnaire/06-security.md +40 -0
  80. package/templates/skills/business-analyse/questionnaire/07-ui.md +36 -0
  81. package/templates/skills/business-analyse/questionnaire/08-performance.md +35 -0
  82. package/templates/skills/business-analyse/questionnaire/09-constraints.md +35 -0
  83. package/templates/skills/business-analyse/questionnaire/10-documentation.md +35 -0
  84. package/templates/skills/business-analyse/questionnaire.md +177 -177
  85. package/templates/skills/business-analyse/react/components.md +340 -0
  86. package/templates/skills/business-analyse/react/i18n-template.md +245 -0
  87. package/templates/skills/business-analyse/react/schema.md +151 -0
  88. package/templates/skills/business-analyse/steps/step-00-init.md +293 -0
  89. package/templates/skills/business-analyse/steps/step-01-discover.md +267 -0
  90. package/templates/skills/business-analyse/steps/step-02-analyse.md +243 -0
  91. package/templates/skills/business-analyse/steps/step-03-specify.md +317 -0
  92. package/templates/skills/business-analyse/steps/step-04-validate.md +239 -0
  93. package/templates/skills/business-analyse/steps/step-05-handoff.md +336 -0
  94. package/templates/skills/business-analyse/steps/step-06-doc-html.md +261 -0
  95. package/templates/skills/business-analyse/templates/00-context.md +105 -0
  96. package/templates/skills/business-analyse/templates/frd-brd.md +97 -0
  97. package/templates/skills/business-analyse/templates/frd-discovery.md +78 -0
  98. package/templates/skills/business-analyse/templates/frd-handoff.md +118 -0
  99. package/templates/skills/business-analyse/templates/frd-spec.md +168 -0
  100. package/templates/skills/business-analyse/templates-frd.md +217 -217
  101. package/templates/skills/business-analyse/templates-react.md +26 -26
  102. package/templates/skills/controller/SKILL.md +141 -92
  103. package/templates/skills/controller/postman-templates.md +15 -15
  104. package/templates/skills/controller/steps/step-00-init.md +191 -0
  105. package/templates/skills/controller/steps/step-01-analyze.md +146 -0
  106. package/templates/skills/controller/steps/step-02-plan.md +176 -0
  107. package/templates/skills/controller/steps/step-03-generate.md +219 -0
  108. package/templates/skills/controller/steps/step-04-perms.md +219 -0
  109. package/templates/skills/controller/steps/step-05-validate.md +107 -0
  110. package/templates/skills/controller/templates.md +77 -77
  111. package/templates/skills/documentation/SKILL.md +79 -79
  112. package/templates/skills/feature-full/SKILL.md +38 -38
  113. package/templates/skills/gitflow/SKILL.md +277 -0
  114. package/templates/{commands → skills}/gitflow/_shared.md +20 -20
  115. package/templates/skills/gitflow/phases/abort.md +173 -0
  116. package/templates/skills/gitflow/phases/cleanup.md +226 -0
  117. package/templates/skills/gitflow/phases/status.md +178 -0
  118. package/templates/skills/gitflow/steps/step-commit.md +255 -0
  119. package/templates/skills/gitflow/steps/step-finish.md +255 -0
  120. package/templates/skills/gitflow/steps/step-init.md +209 -0
  121. package/templates/skills/gitflow/steps/step-merge.md +225 -0
  122. package/templates/skills/gitflow/steps/step-plan.md +208 -0
  123. package/templates/skills/gitflow/steps/step-pr.md +235 -0
  124. package/templates/skills/gitflow/steps/step-start.md +234 -0
  125. package/templates/skills/gitflow/steps/step-sync.md +200 -0
  126. package/templates/skills/gitflow/templates/config.json +53 -0
  127. package/templates/skills/notification/SKILL.md +51 -51
  128. package/templates/skills/ralph-loop/SKILL.md +228 -0
  129. package/templates/skills/ralph-loop/steps/step-00-init.md +201 -0
  130. package/templates/skills/ralph-loop/steps/step-01-task.md +169 -0
  131. package/templates/skills/ralph-loop/steps/step-02-execute.md +173 -0
  132. package/templates/skills/ralph-loop/steps/step-03-commit.md +170 -0
  133. package/templates/skills/ralph-loop/steps/step-04-check.md +162 -0
  134. package/templates/skills/ralph-loop/steps/step-05-report.md +181 -0
  135. package/templates/skills/review-code/SKILL.md +219 -0
  136. package/templates/skills/review-code/references/clean-code-principles.md +140 -0
  137. package/templates/skills/review-code/references/code-quality-metrics.md +174 -0
  138. package/templates/skills/review-code/references/feedback-patterns.md +149 -0
  139. package/templates/skills/review-code/references/security-checklist.md +127 -0
  140. package/templates/skills/ui-components/SKILL.md +54 -54
  141. package/templates/skills/workflow/SKILL.md +46 -46
  142. package/templates/commands/ai-prompt.md +0 -315
  143. package/templates/commands/apex/1-analyze.md +0 -100
  144. package/templates/commands/apex/2-plan.md +0 -145
  145. package/templates/commands/apex/3-execute.md +0 -171
  146. package/templates/commands/apex/4-examine.md +0 -116
  147. package/templates/commands/apex/5-tasks.md +0 -209
  148. package/templates/commands/apex.md +0 -76
  149. package/templates/commands/application/create.md +0 -362
  150. package/templates/commands/application/templates-backend.md +0 -463
  151. package/templates/commands/application/templates-frontend.md +0 -517
  152. package/templates/commands/application/templates-i18n.md +0 -478
  153. package/templates/commands/application/templates-seed.md +0 -362
  154. package/templates/commands/application.md +0 -303
  155. package/templates/commands/business-analyse/0-orchestrate.md +0 -156
  156. package/templates/commands/business-analyse/1-init.md +0 -99
  157. package/templates/commands/business-analyse/2-discover.md +0 -143
  158. package/templates/commands/business-analyse/3-analyse.md +0 -106
  159. package/templates/commands/business-analyse/4-specify.md +0 -133
  160. package/templates/commands/business-analyse/5-validate.md +0 -132
  161. package/templates/commands/business-analyse/6-handoff.md +0 -157
  162. package/templates/commands/business-analyse/7-doc-html.md +0 -103
  163. package/templates/commands/business-analyse/_shared.md +0 -176
  164. package/templates/commands/business-analyse/bug.md +0 -118
  165. package/templates/commands/business-analyse/change-request.md +0 -144
  166. package/templates/commands/business-analyse/hotfix.md +0 -116
  167. package/templates/commands/business-analyse.md +0 -121
  168. package/templates/commands/controller/create.md +0 -216
  169. package/templates/commands/controller/postman-templates.md +0 -528
  170. package/templates/commands/controller/templates.md +0 -600
  171. package/templates/commands/controller.md +0 -337
  172. package/templates/commands/create/agent.md +0 -138
  173. package/templates/commands/create/command.md +0 -166
  174. package/templates/commands/create/hook.md +0 -234
  175. package/templates/commands/create/plugin.md +0 -329
  176. package/templates/commands/create/project.md +0 -508
  177. package/templates/commands/create/skill.md +0 -199
  178. package/templates/commands/create.md +0 -220
  179. package/templates/commands/documentation/module.md +0 -202
  180. package/templates/commands/documentation/templates.md +0 -432
  181. package/templates/commands/documentation.md +0 -190
  182. package/templates/commands/epct.md +0 -69
  183. package/templates/commands/explain.md +0 -186
  184. package/templates/commands/feature-full.md +0 -267
  185. package/templates/commands/gitflow/1-init.md +0 -188
  186. package/templates/commands/gitflow/10-start.md +0 -190
  187. package/templates/commands/gitflow/11-finish.md +0 -382
  188. package/templates/commands/gitflow/12-cleanup.md +0 -103
  189. package/templates/commands/gitflow/13-sync.md +0 -216
  190. package/templates/commands/gitflow/14-rebase.md +0 -251
  191. package/templates/commands/gitflow/2-status.md +0 -122
  192. package/templates/commands/gitflow/3-commit.md +0 -209
  193. package/templates/commands/gitflow/4-plan.md +0 -174
  194. package/templates/commands/gitflow/5-exec.md +0 -202
  195. package/templates/commands/gitflow/6-abort.md +0 -121
  196. package/templates/commands/gitflow/7-pull-request.md +0 -176
  197. package/templates/commands/gitflow/8-review.md +0 -113
  198. package/templates/commands/gitflow/9-merge.md +0 -157
  199. package/templates/commands/gitflow.md +0 -128
  200. package/templates/commands/implement.md +0 -663
  201. package/templates/commands/init.md +0 -567
  202. package/templates/commands/mcp-integration.md +0 -330
  203. package/templates/commands/notification.md +0 -129
  204. package/templates/commands/oneshot.md +0 -57
  205. package/templates/commands/quickstart.md +0 -154
  206. package/templates/commands/ralph-loop/cancel-ralph.md +0 -18
  207. package/templates/commands/ralph-loop/help.md +0 -126
  208. package/templates/commands/ralph-loop/ralph-loop.md +0 -120
  209. package/templates/commands/review.md +0 -106
  210. package/templates/commands/workflow.md +0 -193
@@ -1,432 +0,0 @@
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
- ```
@@ -1,190 +0,0 @@
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)
@@ -1,69 +0,0 @@
1
- ---
2
- description: Systematic implementation using Explore-Plan-Code-Test methodology
3
- ---
4
-
5
- You are a systematic implementation specialist. Follow the EPCT workflow rigorously for every task.
6
-
7
- **You need to always ULTRA THINK.**
8
-
9
- ## 1. EXPLORE
10
-
11
- **Goal**: Find all relevant files for implementation
12
-
13
- - Launch **parallel subagents** to search codebase (`explore-codebase` agent is good for that)
14
- - Launch **parallel subagents** to gather online information (`websearch` agent is good for that)
15
- - Find files to use as **examples** or **edit targets**
16
- - Return relevant file paths and useful context
17
- - **CRITICAL**: Think deeply before starting agents - know exactly what to search for
18
- - Use multiple agents to search across different areas
19
-
20
- ## 2. PLAN
21
-
22
- **Goal**: Create detailed implementation strategy
23
-
24
- - Write comprehensive implementation plan including:
25
- - Core functionality changes
26
- - Test coverage requirements
27
- - Lookbook components if needed
28
- - Documentation updates
29
- - **STOP and ASK** user if anything remains unclear
30
-
31
- ## 3. CODE
32
-
33
- **Goal**: Implement following existing patterns
34
-
35
- - Follow existing codebase style:
36
- - Prefer clear variable/method names over comments
37
- - Match existing patterns and conventions
38
- - **CRITICAL RULES**:
39
- - Stay **STRICTLY IN SCOPE** - change only what's needed
40
- - NO comments unless absolutely necessary
41
- - Run autoformatting scripts when done
42
- - Fix reasonable linter warnings
43
-
44
- ## 4. TEST
45
-
46
- **Goal**: Verify your changes work correctly
47
-
48
- - **First check package.json** for available scripts:
49
- - Look for: `lint`, `typecheck`, `test`, `format`, `build`
50
- - Run relevant commands like `npm run lint`, `npm run typecheck`
51
- - Run **ONLY tests related to your feature** using subagents
52
- - **STAY IN SCOPE**: Don't run entire test suite, just tests that match your changes
53
- - For major UX changes:
54
- - Create test checklist for affected features only
55
- - Use browser agent to verify specific functionality
56
- - **CRITICAL**: Code must pass linting and type checks
57
- - If tests fail: **return to PLAN phase** and rethink approach
58
-
59
- ## Execution Rules
60
-
61
- - Use parallel execution for speed
62
- - Think deeply at each phase transition
63
- - Never exceed task boundaries
64
- - Follow repo standards for tests/docs/components
65
- - Test ONLY what you changed
66
-
67
- ## Priority
68
-
69
- Correctness > Completeness > Speed. Each phase must be thorough before proceeding.