ddd-ts-kit 0.94.1 → 0.96.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 (731) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/README.fr.md +83 -21
  3. package/README.md +78 -22
  4. package/dist/build/rewrite-aliases.js +1 -1
  5. package/dist/build/rewrite-aliases.js.map +1 -1
  6. package/dist/check/canonical/stray-entry.js +7 -1
  7. package/dist/check/canonical/stray-entry.js.map +1 -1
  8. package/dist/check/configuration/config-inspection.d.ts.map +1 -1
  9. package/dist/check/configuration/config-inspection.js +2 -0
  10. package/dist/check/configuration/config-inspection.js.map +1 -1
  11. package/dist/check/configuration/context-tenancy.d.ts +10 -0
  12. package/dist/check/configuration/context-tenancy.d.ts.map +1 -0
  13. package/dist/check/configuration/context-tenancy.js +16 -0
  14. package/dist/check/configuration/context-tenancy.js.map +1 -0
  15. package/dist/check/errors/listed-codes.d.ts +1 -1
  16. package/dist/check/errors/listed-codes.d.ts.map +1 -1
  17. package/dist/check/errors/listed-codes.js +15 -3
  18. package/dist/check/errors/listed-codes.js.map +1 -1
  19. package/dist/check/explain/language-docs.js +1 -1
  20. package/dist/check/explain/language-docs.js.map +1 -1
  21. package/dist/check/explain/privacy-docs.js +1 -1
  22. package/dist/check/explain/privacy-docs.js.map +1 -1
  23. package/dist/check/explain/tenancy-docs.js +1 -1
  24. package/dist/check/explain/tenancy-docs.js.map +1 -1
  25. package/dist/check/explain/tree-docs.js +2 -2
  26. package/dist/check/explain/tree-docs.js.map +1 -1
  27. package/dist/check/fixtures/config-fixtures.d.ts.map +1 -1
  28. package/dist/check/fixtures/config-fixtures.js +13 -0
  29. package/dist/check/fixtures/config-fixtures.js.map +1 -1
  30. package/dist/check/fixtures/config.js +2 -1
  31. package/dist/check/fixtures/config.js.map +1 -1
  32. package/dist/check/fixtures/control-plane-fixtures.d.ts +4 -0
  33. package/dist/check/fixtures/control-plane-fixtures.d.ts.map +1 -0
  34. package/dist/check/fixtures/control-plane-fixtures.js +41 -0
  35. package/dist/check/fixtures/control-plane-fixtures.js.map +1 -0
  36. package/dist/check/fixtures/files-fixtures.js +2 -2
  37. package/dist/check/fixtures/files-fixtures.js.map +1 -1
  38. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  39. package/dist/check/fixtures/fixtures.js +2 -0
  40. package/dist/check/fixtures/fixtures.js.map +1 -1
  41. package/dist/check/fixtures/governance-fixtures.d.ts.map +1 -1
  42. package/dist/check/fixtures/governance-fixtures.js +15 -0
  43. package/dist/check/fixtures/governance-fixtures.js.map +1 -1
  44. package/dist/check/fixtures/language-fixtures.d.ts.map +1 -1
  45. package/dist/check/fixtures/language-fixtures.js +22 -0
  46. package/dist/check/fixtures/language-fixtures.js.map +1 -1
  47. package/dist/check/fixtures/privacy-fixtures.js +2 -2
  48. package/dist/check/fixtures/privacy-fixtures.js.map +1 -1
  49. package/dist/check/fixtures/shared-kernel-fixtures.d.ts +3 -0
  50. package/dist/check/fixtures/shared-kernel-fixtures.d.ts.map +1 -0
  51. package/dist/check/fixtures/shared-kernel-fixtures.js +60 -0
  52. package/dist/check/fixtures/shared-kernel-fixtures.js.map +1 -0
  53. package/dist/check/fixtures/shared-kernel-glossary.d.ts +7 -0
  54. package/dist/check/fixtures/shared-kernel-glossary.d.ts.map +1 -0
  55. package/dist/check/fixtures/shared-kernel-glossary.js +12 -0
  56. package/dist/check/fixtures/shared-kernel-glossary.js.map +1 -0
  57. package/dist/check/fixtures/standard-fixtures.d.ts.map +1 -1
  58. package/dist/check/fixtures/standard-fixtures.js +2 -0
  59. package/dist/check/fixtures/standard-fixtures.js.map +1 -1
  60. package/dist/check/fixtures/tenancy-adapters.d.ts +20 -0
  61. package/dist/check/fixtures/tenancy-adapters.d.ts.map +1 -0
  62. package/dist/check/fixtures/tenancy-adapters.js +10 -0
  63. package/dist/check/fixtures/tenancy-adapters.js.map +1 -0
  64. package/dist/check/fixtures/tenancy-bypass.d.ts +2 -21
  65. package/dist/check/fixtures/tenancy-bypass.d.ts.map +1 -1
  66. package/dist/check/fixtures/tenancy-bypass.js +2 -10
  67. package/dist/check/fixtures/tenancy-bypass.js.map +1 -1
  68. package/dist/check/fixtures/tenancy-fixtures.d.ts.map +1 -1
  69. package/dist/check/fixtures/tenancy-fixtures.js +2 -0
  70. package/dist/check/fixtures/tenancy-fixtures.js.map +1 -1
  71. package/dist/check/fixtures/tree-fixtures.d.ts.map +1 -1
  72. package/dist/check/fixtures/tree-fixtures.js +17 -0
  73. package/dist/check/fixtures/tree-fixtures.js.map +1 -1
  74. package/dist/check/fixtures/value-object-file-fixtures.d.ts.map +1 -1
  75. package/dist/check/fixtures/value-object-file-fixtures.js +2 -0
  76. package/dist/check/fixtures/value-object-file-fixtures.js.map +1 -1
  77. package/dist/check/language/add-glossary-rows.d.ts +1 -0
  78. package/dist/check/language/add-glossary-rows.d.ts.map +1 -1
  79. package/dist/check/language/add-glossary-rows.js +7 -2
  80. package/dist/check/language/add-glossary-rows.js.map +1 -1
  81. package/dist/check/language/glossaries.d.ts +8 -2
  82. package/dist/check/language/glossaries.d.ts.map +1 -1
  83. package/dist/check/language/glossaries.js +28 -18
  84. package/dist/check/language/glossaries.js.map +1 -1
  85. package/dist/check/language/held-by-glossary.d.ts +8 -0
  86. package/dist/check/language/held-by-glossary.d.ts.map +1 -0
  87. package/dist/check/language/held-by-glossary.js +19 -0
  88. package/dist/check/language/held-by-glossary.js.map +1 -0
  89. package/dist/check/language/technical-words-of.d.ts +9 -0
  90. package/dist/check/language/technical-words-of.d.ts.map +1 -0
  91. package/dist/check/language/technical-words-of.js +15 -0
  92. package/dist/check/language/technical-words-of.js.map +1 -0
  93. package/dist/check/privacy/prisma-columns-of.d.ts +5 -5
  94. package/dist/check/privacy/prisma-columns-of.d.ts.map +1 -1
  95. package/dist/check/privacy/prisma-columns-of.js +25 -12
  96. package/dist/check/privacy/prisma-columns-of.js.map +1 -1
  97. package/dist/check/project/beside-the-sources.js +1 -1
  98. package/dist/check/project/beside-the-sources.js.map +1 -1
  99. package/dist/check/project/git-ignored.d.ts +11 -0
  100. package/dist/check/project/git-ignored.d.ts.map +1 -0
  101. package/dist/check/project/git-ignored.js +26 -0
  102. package/dist/check/project/git-ignored.js.map +1 -0
  103. package/dist/check/project/load-loose-project.js +1 -1
  104. package/dist/check/project/load-loose-project.js.map +1 -1
  105. package/dist/check/project/load-project.d.ts.map +1 -1
  106. package/dist/check/project/load-project.js +13 -2
  107. package/dist/check/project/load-project.js.map +1 -1
  108. package/dist/check/project/locate.js +2 -1
  109. package/dist/check/project/locate.js.map +1 -1
  110. package/dist/check/project/walk-directory.d.ts +10 -2
  111. package/dist/check/project/walk-directory.d.ts.map +1 -1
  112. package/dist/check/project/walk-directory.js +9 -4
  113. package/dist/check/project/walk-directory.js.map +1 -1
  114. package/dist/check/rules/governance-recorded-deviation.js +14 -1
  115. package/dist/check/rules/governance-recorded-deviation.js.map +1 -1
  116. package/dist/check/rules/language-glossary-term.js +38 -18
  117. package/dist/check/rules/language-glossary-term.js.map +1 -1
  118. package/dist/check/rules/language-no-technical-name.d.ts.map +1 -1
  119. package/dist/check/rules/language-no-technical-name.js +9 -7
  120. package/dist/check/rules/language-no-technical-name.js.map +1 -1
  121. package/dist/check/rules/privacy-declared-field.d.ts +1 -1
  122. package/dist/check/rules/privacy-declared-field.js +1 -1
  123. package/dist/check/rules/tenancy-scoped-statement.d.ts.map +1 -1
  124. package/dist/check/rules/tenancy-scoped-statement.js +8 -6
  125. package/dist/check/rules/tenancy-scoped-statement.js.map +1 -1
  126. package/dist/cli-error.d.ts +3 -3
  127. package/dist/cli-error.d.ts.map +1 -1
  128. package/dist/cli-error.js +4 -3
  129. package/dist/cli-error.js.map +1 -1
  130. package/dist/commands/acceptance.js +6 -2
  131. package/dist/commands/acceptance.js.map +1 -1
  132. package/dist/commands/context-layout.d.ts.map +1 -1
  133. package/dist/commands/context-layout.js +3 -2
  134. package/dist/commands/context-layout.js.map +1 -1
  135. package/dist/commands/depcruise-config.d.ts.map +1 -1
  136. package/dist/commands/depcruise-config.js +13 -5
  137. package/dist/commands/depcruise-config.js.map +1 -1
  138. package/dist/commands/docs.d.ts.map +1 -1
  139. package/dist/commands/docs.js +2 -4
  140. package/dist/commands/docs.js.map +1 -1
  141. package/dist/commands/doctor.d.ts.map +1 -1
  142. package/dist/commands/doctor.js +2 -0
  143. package/dist/commands/doctor.js.map +1 -1
  144. package/dist/commands/generate.d.ts +4 -0
  145. package/dist/commands/generate.d.ts.map +1 -1
  146. package/dist/commands/generate.js +16 -6
  147. package/dist/commands/generate.js.map +1 -1
  148. package/dist/commands/init.d.ts.map +1 -1
  149. package/dist/commands/init.js +10 -2
  150. package/dist/commands/init.js.map +1 -1
  151. package/dist/commands/move-to-module.d.ts.map +1 -1
  152. package/dist/commands/move-to-module.js +3 -2
  153. package/dist/commands/move-to-module.js.map +1 -1
  154. package/dist/commands/plan-waves.d.ts +2 -1
  155. package/dist/commands/plan-waves.d.ts.map +1 -1
  156. package/dist/commands/plan-waves.js +28 -2
  157. package/dist/commands/plan-waves.js.map +1 -1
  158. package/dist/commands/print-report.d.ts +3 -3
  159. package/dist/commands/print-report.d.ts.map +1 -1
  160. package/dist/commands/print-report.js +10 -3
  161. package/dist/commands/print-report.js.map +1 -1
  162. package/dist/commands/sdk.js +1 -2
  163. package/dist/commands/sdk.js.map +1 -1
  164. package/dist/config/config.d.ts +7 -0
  165. package/dist/config/config.d.ts.map +1 -1
  166. package/dist/config/context-tenancies.d.ts +7 -0
  167. package/dist/config/context-tenancies.d.ts.map +1 -0
  168. package/dist/config/context-tenancies.js +7 -0
  169. package/dist/config/context-tenancies.js.map +1 -0
  170. package/dist/config/index.d.ts +2 -0
  171. package/dist/config/index.d.ts.map +1 -1
  172. package/dist/config/index.js +2 -0
  173. package/dist/config/index.js.map +1 -1
  174. package/dist/config/is-control-plane.d.ts +4 -0
  175. package/dist/config/is-control-plane.d.ts.map +1 -0
  176. package/dist/config/is-control-plane.js +5 -0
  177. package/dist/config/is-control-plane.js.map +1 -0
  178. package/dist/config/parse-context.d.ts.map +1 -1
  179. package/dist/config/parse-context.js +1 -0
  180. package/dist/config/parse-context.js.map +1 -1
  181. package/dist/config/serialize-config.js +1 -0
  182. package/dist/config/serialize-config.js.map +1 -1
  183. package/dist/dev/refresh-declarations.d.ts.map +1 -1
  184. package/dist/dev/refresh-declarations.js +2 -1
  185. package/dist/dev/refresh-declarations.js.map +1 -1
  186. package/dist/doctor/diagnose.d.ts +2 -1
  187. package/dist/doctor/diagnose.d.ts.map +1 -1
  188. package/dist/doctor/diagnose.js +4 -1
  189. package/dist/doctor/diagnose.js.map +1 -1
  190. package/dist/doctor/doctor-finding.d.ts +1 -1
  191. package/dist/doctor/doctor-finding.d.ts.map +1 -1
  192. package/dist/doctor/format-diagnosis.js +25 -2
  193. package/dist/doctor/format-diagnosis.js.map +1 -1
  194. package/dist/doctor/install-script-findings.d.ts +11 -0
  195. package/dist/doctor/install-script-findings.d.ts.map +1 -0
  196. package/dist/doctor/install-script-findings.js +86 -0
  197. package/dist/doctor/install-script-findings.js.map +1 -0
  198. package/dist/doctor/installed-from.d.ts +3 -0
  199. package/dist/doctor/installed-from.d.ts.map +1 -0
  200. package/dist/doctor/installed-from.js +15 -0
  201. package/dist/doctor/installed-from.js.map +1 -0
  202. package/dist/doctor/override-findings.d.ts.map +1 -1
  203. package/dist/doctor/override-findings.js +1 -11
  204. package/dist/doctor/override-findings.js.map +1 -1
  205. package/dist/doctor/permission-findings.d.ts.map +1 -1
  206. package/dist/doctor/permission-findings.js +15 -2
  207. package/dist/doctor/permission-findings.js.map +1 -1
  208. package/dist/generate/concept.d.ts +2 -2
  209. package/dist/generate/concept.js +3 -3
  210. package/dist/generate/concept.js.map +1 -1
  211. package/dist/generate/context-vars.d.ts +5 -2
  212. package/dist/generate/context-vars.d.ts.map +1 -1
  213. package/dist/generate/context-vars.js +6 -3
  214. package/dist/generate/context-vars.js.map +1 -1
  215. package/dist/generate/errors/codes-of-context.d.ts +1 -1
  216. package/dist/generate/errors/codes-of-context.d.ts.map +1 -1
  217. package/dist/generate/errors/codes-of-context.js +10 -2
  218. package/dist/generate/errors/codes-of-context.js.map +1 -1
  219. package/dist/generate/errors/refusal-class-name.d.ts +1 -1
  220. package/dist/generate/errors/refusal-class-name.d.ts.map +1 -1
  221. package/dist/generate/errors/refusal-class-name.js +2 -2
  222. package/dist/generate/errors/refusal-class-name.js.map +1 -1
  223. package/dist/generate/glossary-of.d.ts +5 -0
  224. package/dist/generate/glossary-of.d.ts.map +1 -0
  225. package/dist/generate/glossary-of.js +6 -0
  226. package/dist/generate/glossary-of.js.map +1 -0
  227. package/dist/generate/is-shared-kernel.d.ts +4 -0
  228. package/dist/generate/is-shared-kernel.d.ts.map +1 -0
  229. package/dist/generate/is-shared-kernel.js +5 -0
  230. package/dist/generate/is-shared-kernel.js.map +1 -0
  231. package/dist/generate/kind.d.ts +11 -6
  232. package/dist/generate/kind.d.ts.map +1 -1
  233. package/dist/generate/kinds/acceptance-kind.d.ts.map +1 -1
  234. package/dist/generate/kinds/acceptance-kind.js +1 -0
  235. package/dist/generate/kinds/acceptance-kind.js.map +1 -1
  236. package/dist/generate/kinds/acl-kind.d.ts.map +1 -1
  237. package/dist/generate/kinds/acl-kind.js +1 -0
  238. package/dist/generate/kinds/acl-kind.js.map +1 -1
  239. package/dist/generate/kinds/adapter-kind.d.ts.map +1 -1
  240. package/dist/generate/kinds/adapter-kind.js +57 -7
  241. package/dist/generate/kinds/adapter-kind.js.map +1 -1
  242. package/dist/generate/kinds/adr-kind.d.ts.map +1 -1
  243. package/dist/generate/kinds/adr-kind.js +1 -0
  244. package/dist/generate/kinds/adr-kind.js.map +1 -1
  245. package/dist/generate/kinds/aggregate-kind.d.ts.map +1 -1
  246. package/dist/generate/kinds/aggregate-kind.js +1 -0
  247. package/dist/generate/kinds/aggregate-kind.js.map +1 -1
  248. package/dist/generate/kinds/background-job-kind.d.ts.map +1 -1
  249. package/dist/generate/kinds/background-job-kind.js +1 -0
  250. package/dist/generate/kinds/background-job-kind.js.map +1 -1
  251. package/dist/generate/kinds/builder-kind.d.ts.map +1 -1
  252. package/dist/generate/kinds/builder-kind.js +1 -0
  253. package/dist/generate/kinds/builder-kind.js.map +1 -1
  254. package/dist/generate/kinds/command-kind.d.ts.map +1 -1
  255. package/dist/generate/kinds/command-kind.js +1 -0
  256. package/dist/generate/kinds/command-kind.js.map +1 -1
  257. package/dist/generate/kinds/context-kind.d.ts.map +1 -1
  258. package/dist/generate/kinds/context-kind.js +3 -1
  259. package/dist/generate/kinds/context-kind.js.map +1 -1
  260. package/dist/generate/kinds/context-request.d.ts +2 -0
  261. package/dist/generate/kinds/context-request.d.ts.map +1 -1
  262. package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
  263. package/dist/generate/kinds/declare-storage.js +19 -9
  264. package/dist/generate/kinds/declare-storage.js.map +1 -1
  265. package/dist/generate/kinds/domain-error-kind.d.ts.map +1 -1
  266. package/dist/generate/kinds/domain-error-kind.js +7 -4
  267. package/dist/generate/kinds/domain-error-kind.js.map +1 -1
  268. package/dist/generate/kinds/domain-event-kind.d.ts.map +1 -1
  269. package/dist/generate/kinds/domain-event-kind.js +1 -0
  270. package/dist/generate/kinds/domain-event-kind.js.map +1 -1
  271. package/dist/generate/kinds/domain-service-kind.d.ts.map +1 -1
  272. package/dist/generate/kinds/domain-service-kind.js +1 -0
  273. package/dist/generate/kinds/domain-service-kind.js.map +1 -1
  274. package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
  275. package/dist/generate/kinds/e2e-kind.js +1 -0
  276. package/dist/generate/kinds/e2e-kind.js.map +1 -1
  277. package/dist/generate/kinds/entity-kind.d.ts.map +1 -1
  278. package/dist/generate/kinds/entity-kind.js +1 -0
  279. package/dist/generate/kinds/entity-kind.js.map +1 -1
  280. package/dist/generate/kinds/erasure-handler-kind.d.ts.map +1 -1
  281. package/dist/generate/kinds/erasure-handler-kind.js +1 -0
  282. package/dist/generate/kinds/erasure-handler-kind.js.map +1 -1
  283. package/dist/generate/kinds/error-kind.d.ts.map +1 -1
  284. package/dist/generate/kinds/error-kind.js +6 -5
  285. package/dist/generate/kinds/error-kind.js.map +1 -1
  286. package/dist/generate/kinds/event-handler-kind.d.ts.map +1 -1
  287. package/dist/generate/kinds/event-handler-kind.js +1 -0
  288. package/dist/generate/kinds/event-handler-kind.js.map +1 -1
  289. package/dist/generate/kinds/extend-event-sourced-aggregate.d.ts +4 -2
  290. package/dist/generate/kinds/extend-event-sourced-aggregate.d.ts.map +1 -1
  291. package/dist/generate/kinds/extend-event-sourced-aggregate.js +45 -10
  292. package/dist/generate/kinds/extend-event-sourced-aggregate.js.map +1 -1
  293. package/dist/generate/kinds/file-upload-kind.d.ts.map +1 -1
  294. package/dist/generate/kinds/file-upload-kind.js +1 -0
  295. package/dist/generate/kinds/file-upload-kind.js.map +1 -1
  296. package/dist/generate/kinds/form-kind.d.ts.map +1 -1
  297. package/dist/generate/kinds/form-kind.js +1 -0
  298. package/dist/generate/kinds/form-kind.js.map +1 -1
  299. package/dist/generate/kinds/gateway-kind.d.ts.map +1 -1
  300. package/dist/generate/kinds/gateway-kind.js +1 -0
  301. package/dist/generate/kinds/gateway-kind.js.map +1 -1
  302. package/dist/generate/kinds/generate-context.d.ts.map +1 -1
  303. package/dist/generate/kinds/generate-context.js +14 -0
  304. package/dist/generate/kinds/generate-context.js.map +1 -1
  305. package/dist/generate/kinds/generate-repository.js +11 -7
  306. package/dist/generate/kinds/generate-repository.js.map +1 -1
  307. package/dist/generate/kinds/guard-kind.d.ts.map +1 -1
  308. package/dist/generate/kinds/guard-kind.js +1 -0
  309. package/dist/generate/kinds/guard-kind.js.map +1 -1
  310. package/dist/generate/kinds/integration-event-kind.d.ts.map +1 -1
  311. package/dist/generate/kinds/integration-event-kind.js +1 -0
  312. package/dist/generate/kinds/integration-event-kind.js.map +1 -1
  313. package/dist/generate/kinds/integration-handler-kind.d.ts.map +1 -1
  314. package/dist/generate/kinds/integration-handler-kind.js +1 -0
  315. package/dist/generate/kinds/integration-handler-kind.js.map +1 -1
  316. package/dist/generate/kinds/job-kind.d.ts.map +1 -1
  317. package/dist/generate/kinds/job-kind.js +1 -0
  318. package/dist/generate/kinds/job-kind.js.map +1 -1
  319. package/dist/generate/kinds/module-kind.d.ts.map +1 -1
  320. package/dist/generate/kinds/module-kind.js +1 -0
  321. package/dist/generate/kinds/module-kind.js.map +1 -1
  322. package/dist/generate/kinds/plan-vars.d.ts.map +1 -1
  323. package/dist/generate/kinds/plan-vars.js +5 -2
  324. package/dist/generate/kinds/plan-vars.js.map +1 -1
  325. package/dist/generate/kinds/policy-kind.d.ts.map +1 -1
  326. package/dist/generate/kinds/policy-kind.js +1 -0
  327. package/dist/generate/kinds/policy-kind.js.map +1 -1
  328. package/dist/generate/kinds/port-kind.d.ts.map +1 -1
  329. package/dist/generate/kinds/port-kind.js +4 -2
  330. package/dist/generate/kinds/port-kind.js.map +1 -1
  331. package/dist/generate/kinds/process-kind.d.ts.map +1 -1
  332. package/dist/generate/kinds/process-kind.js +1 -0
  333. package/dist/generate/kinds/process-kind.js.map +1 -1
  334. package/dist/generate/kinds/projection-kind.d.ts.map +1 -1
  335. package/dist/generate/kinds/projection-kind.js +4 -5
  336. package/dist/generate/kinds/projection-kind.js.map +1 -1
  337. package/dist/generate/kinds/property-kind.d.ts.map +1 -1
  338. package/dist/generate/kinds/property-kind.js +1 -0
  339. package/dist/generate/kinds/property-kind.js.map +1 -1
  340. package/dist/generate/kinds/query-kind.d.ts.map +1 -1
  341. package/dist/generate/kinds/query-kind.js +1 -0
  342. package/dist/generate/kinds/query-kind.js.map +1 -1
  343. package/dist/generate/kinds/repository-kind.d.ts.map +1 -1
  344. package/dist/generate/kinds/repository-kind.js +1 -0
  345. package/dist/generate/kinds/repository-kind.js.map +1 -1
  346. package/dist/generate/kinds/representation-kind.d.ts.map +1 -1
  347. package/dist/generate/kinds/representation-kind.js +1 -0
  348. package/dist/generate/kinds/representation-kind.js.map +1 -1
  349. package/dist/generate/kinds/route-group-kind.d.ts.map +1 -1
  350. package/dist/generate/kinds/route-group-kind.js +1 -0
  351. package/dist/generate/kinds/route-group-kind.js.map +1 -1
  352. package/dist/generate/kinds/route-kind.d.ts.map +1 -1
  353. package/dist/generate/kinds/route-kind.js +1 -0
  354. package/dist/generate/kinds/route-kind.js.map +1 -1
  355. package/dist/generate/kinds/schema-kind.d.ts.map +1 -1
  356. package/dist/generate/kinds/schema-kind.js +4 -9
  357. package/dist/generate/kinds/schema-kind.js.map +1 -1
  358. package/dist/generate/kinds/service-kind.d.ts.map +1 -1
  359. package/dist/generate/kinds/service-kind.js +1 -0
  360. package/dist/generate/kinds/service-kind.js.map +1 -1
  361. package/dist/generate/kinds/state-machine-kind.d.ts.map +1 -1
  362. package/dist/generate/kinds/state-machine-kind.js +1 -0
  363. package/dist/generate/kinds/state-machine-kind.js.map +1 -1
  364. package/dist/generate/kinds/test-world-kind.d.ts.map +1 -1
  365. package/dist/generate/kinds/test-world-kind.js +1 -0
  366. package/dist/generate/kinds/test-world-kind.js.map +1 -1
  367. package/dist/generate/kinds/value-object-kind.d.ts.map +1 -1
  368. package/dist/generate/kinds/value-object-kind.js +5 -4
  369. package/dist/generate/kinds/value-object-kind.js.map +1 -1
  370. package/dist/generate/kinds/vocabulary-kind.d.ts.map +1 -1
  371. package/dist/generate/kinds/vocabulary-kind.js +1 -0
  372. package/dist/generate/kinds/vocabulary-kind.js.map +1 -1
  373. package/dist/generate/kinds/worker-kind.d.ts.map +1 -1
  374. package/dist/generate/kinds/worker-kind.js +1 -0
  375. package/dist/generate/kinds/worker-kind.js.map +1 -1
  376. package/dist/generate/kinds-help.d.ts +2 -0
  377. package/dist/generate/kinds-help.d.ts.map +1 -1
  378. package/dist/generate/kinds-help.js +5 -2
  379. package/dist/generate/kinds-help.js.map +1 -1
  380. package/dist/generate/label.d.ts +4 -1
  381. package/dist/generate/label.d.ts.map +1 -1
  382. package/dist/generate/label.js +24 -3
  383. package/dist/generate/label.js.map +1 -1
  384. package/dist/generate/language-probe.d.ts +16 -0
  385. package/dist/generate/language-probe.d.ts.map +1 -0
  386. package/dist/generate/language-probe.js +2 -0
  387. package/dist/generate/language-probe.js.map +1 -0
  388. package/dist/generate/learn-terms.d.ts.map +1 -1
  389. package/dist/generate/learn-terms.js +7 -1
  390. package/dist/generate/learn-terms.js.map +1 -1
  391. package/dist/generate/open-scope.d.ts +7 -2
  392. package/dist/generate/open-scope.d.ts.map +1 -1
  393. package/dist/generate/open-scope.js +14 -2
  394. package/dist/generate/open-scope.js.map +1 -1
  395. package/dist/generate/parse-terms.d.ts +7 -1
  396. package/dist/generate/parse-terms.d.ts.map +1 -1
  397. package/dist/generate/parse-terms.js +14 -4
  398. package/dist/generate/parse-terms.js.map +1 -1
  399. package/dist/generate/place-generated-files.d.ts +2 -2
  400. package/dist/generate/place-generated-files.d.ts.map +1 -1
  401. package/dist/generate/place-generated-files.js +7 -7
  402. package/dist/generate/place-generated-files.js.map +1 -1
  403. package/dist/generate/refuse-shared-writes.d.ts +2 -2
  404. package/dist/generate/refuse-shared-writes.d.ts.map +1 -1
  405. package/dist/generate/refuse-shared-writes.js +25 -4
  406. package/dist/generate/refuse-shared-writes.js.map +1 -1
  407. package/dist/generate/shared-kernel-placement.d.ts +9 -0
  408. package/dist/generate/shared-kernel-placement.d.ts.map +1 -0
  409. package/dist/generate/shared-kernel-placement.js +20 -0
  410. package/dist/generate/shared-kernel-placement.js.map +1 -0
  411. package/dist/generate/shared-kernel-scope.d.ts +11 -0
  412. package/dist/generate/shared-kernel-scope.d.ts.map +1 -0
  413. package/dist/generate/shared-kernel-scope.js +12 -0
  414. package/dist/generate/shared-kernel-scope.js.map +1 -0
  415. package/dist/generate/shared-writes.d.ts.map +1 -1
  416. package/dist/generate/shared-writes.js +26 -2
  417. package/dist/generate/shared-writes.js.map +1 -1
  418. package/dist/generate/spoken-in-language.d.ts +4 -3
  419. package/dist/generate/spoken-in-language.d.ts.map +1 -1
  420. package/dist/generate/spoken-in-language.js +19 -14
  421. package/dist/generate/spoken-in-language.js.map +1 -1
  422. package/dist/generate/usage-of.d.ts +6 -0
  423. package/dist/generate/usage-of.d.ts.map +1 -0
  424. package/dist/generate/usage-of.js +7 -0
  425. package/dist/generate/usage-of.js.map +1 -0
  426. package/dist/generate/vars.d.ts.map +1 -1
  427. package/dist/generate/vars.js +9 -1
  428. package/dist/generate/vars.js.map +1 -1
  429. package/dist/help/notes.d.ts +1 -1
  430. package/dist/help/notes.d.ts.map +1 -1
  431. package/dist/help/notes.js +31 -8
  432. package/dist/help/notes.js.map +1 -1
  433. package/dist/help/reference-text.d.ts.map +1 -1
  434. package/dist/help/reference-text.js +2 -1
  435. package/dist/help/reference-text.js.map +1 -1
  436. package/dist/help/usage.d.ts +1 -1
  437. package/dist/help/usage.d.ts.map +1 -1
  438. package/dist/help/usage.js +1 -1
  439. package/dist/init/agent-permissions.d.ts +7 -0
  440. package/dist/init/agent-permissions.d.ts.map +1 -1
  441. package/dist/init/agent-permissions.js +19 -8
  442. package/dist/init/agent-permissions.js.map +1 -1
  443. package/dist/init/files/persistence-files.d.ts.map +1 -1
  444. package/dist/init/files/persistence-files.js +2 -1
  445. package/dist/init/files/persistence-files.js.map +1 -1
  446. package/dist/init/first-install-note.d.ts +9 -0
  447. package/dist/init/first-install-note.d.ts.map +1 -0
  448. package/dist/init/first-install-note.js +52 -0
  449. package/dist/init/first-install-note.js.map +1 -0
  450. package/dist/init/managed-settings-note.d.ts.map +1 -1
  451. package/dist/init/managed-settings-note.js +1 -0
  452. package/dist/init/managed-settings-note.js.map +1 -1
  453. package/dist/init/manifest/allow-builds-block.d.ts +3 -0
  454. package/dist/init/manifest/allow-builds-block.d.ts.map +1 -0
  455. package/dist/init/manifest/allow-builds-block.js +5 -0
  456. package/dist/init/manifest/allow-builds-block.js.map +1 -0
  457. package/dist/init/manifest/allow-builds-entries.d.ts +8 -0
  458. package/dist/init/manifest/allow-builds-entries.d.ts.map +1 -0
  459. package/dist/init/manifest/allow-builds-entries.js +8 -0
  460. package/dist/init/manifest/allow-builds-entries.js.map +1 -0
  461. package/dist/init/manifest/database-scripts.d.ts.map +1 -1
  462. package/dist/init/manifest/database-scripts.js +4 -2
  463. package/dist/init/manifest/database-scripts.js.map +1 -1
  464. package/dist/init/manifest/install-scripts-of.d.ts +18 -0
  465. package/dist/init/manifest/install-scripts-of.d.ts.map +1 -0
  466. package/dist/init/manifest/install-scripts-of.js +25 -0
  467. package/dist/init/manifest/install-scripts-of.js.map +1 -0
  468. package/dist/init/manifest/names-package.d.ts +3 -0
  469. package/dist/init/manifest/names-package.d.ts.map +1 -0
  470. package/dist/init/manifest/names-package.js +5 -0
  471. package/dist/init/manifest/names-package.js.map +1 -0
  472. package/dist/init/manifest/prisma-client-script.d.ts +3 -0
  473. package/dist/init/manifest/prisma-client-script.d.ts.map +1 -0
  474. package/dist/init/manifest/prisma-client-script.js +5 -0
  475. package/dist/init/manifest/prisma-client-script.js.map +1 -0
  476. package/dist/init/manifest/versions.js +24 -24
  477. package/dist/init/manifest/write-install-scripts.d.ts +10 -0
  478. package/dist/init/manifest/write-install-scripts.d.ts.map +1 -0
  479. package/dist/init/manifest/write-install-scripts.js +78 -0
  480. package/dist/init/manifest/write-install-scripts.js.map +1 -0
  481. package/dist/init/manifest/write-manifest.d.ts.map +1 -1
  482. package/dist/init/manifest/write-manifest.js +9 -1
  483. package/dist/init/manifest/write-manifest.js.map +1 -1
  484. package/dist/init/merge-sandbox.d.ts +3 -1
  485. package/dist/init/merge-sandbox.d.ts.map +1 -1
  486. package/dist/init/merge-sandbox.js +25 -7
  487. package/dist/init/merge-sandbox.js.map +1 -1
  488. package/dist/init/regulated-sandbox.d.ts +6 -4
  489. package/dist/init/regulated-sandbox.d.ts.map +1 -1
  490. package/dist/init/regulated-sandbox.js +11 -5
  491. package/dist/init/regulated-sandbox.js.map +1 -1
  492. package/dist/init/run-init.d.ts +2 -0
  493. package/dist/init/run-init.d.ts.map +1 -1
  494. package/dist/init/run-init.js +47 -7
  495. package/dist/init/run-init.js.map +1 -1
  496. package/dist/init/stack-sandbox.d.ts +9 -0
  497. package/dist/init/stack-sandbox.d.ts.map +1 -0
  498. package/dist/init/stack-sandbox.js +28 -0
  499. package/dist/init/stack-sandbox.js.map +1 -0
  500. package/dist/init/write-agent-settings.d.ts.map +1 -1
  501. package/dist/init/write-agent-settings.js +26 -16
  502. package/dist/init/write-agent-settings.js.map +1 -1
  503. package/dist/merge/abort-merge.d.ts.map +1 -1
  504. package/dist/merge/abort-merge.js +38 -6
  505. package/dist/merge/abort-merge.js.map +1 -1
  506. package/dist/merge/commit-merge.d.ts.map +1 -1
  507. package/dist/merge/commit-merge.js +1 -16
  508. package/dist/merge/commit-merge.js.map +1 -1
  509. package/dist/merge/continue-merge.d.ts.map +1 -1
  510. package/dist/merge/continue-merge.js +2 -0
  511. package/dist/merge/continue-merge.js.map +1 -1
  512. package/dist/merge/ensure-mergeable.d.ts.map +1 -1
  513. package/dist/merge/ensure-mergeable.js +15 -0
  514. package/dist/merge/ensure-mergeable.js.map +1 -1
  515. package/dist/merge/ensure-writable.d.ts +9 -0
  516. package/dist/merge/ensure-writable.d.ts.map +1 -0
  517. package/dist/merge/ensure-writable.js +51 -0
  518. package/dist/merge/ensure-writable.js.map +1 -0
  519. package/dist/merge/is-merge-path.d.ts +4 -0
  520. package/dist/merge/is-merge-path.d.ts.map +1 -0
  521. package/dist/merge/is-merge-path.js +18 -0
  522. package/dist/merge/is-merge-path.js.map +1 -0
  523. package/dist/merge/is-sandbox-mask.d.ts +4 -0
  524. package/dist/merge/is-sandbox-mask.d.ts.map +1 -0
  525. package/dist/merge/is-sandbox-mask.js +5 -0
  526. package/dist/merge/is-sandbox-mask.js.map +1 -0
  527. package/dist/merge/merge-trunk.d.ts.map +1 -1
  528. package/dist/merge/merge-trunk.js +4 -0
  529. package/dist/merge/merge-trunk.js.map +1 -1
  530. package/dist/merge/modified-since-staged.d.ts +4 -0
  531. package/dist/merge/modified-since-staged.d.ts.map +1 -0
  532. package/dist/merge/modified-since-staged.js +8 -0
  533. package/dist/merge/modified-since-staged.js.map +1 -0
  534. package/dist/merge/stage-rewritten.d.ts +8 -0
  535. package/dist/merge/stage-rewritten.d.ts.map +1 -0
  536. package/dist/merge/stage-rewritten.js +15 -0
  537. package/dist/merge/stage-rewritten.js.map +1 -0
  538. package/dist/naming/parse-concept-name.d.ts +5 -3
  539. package/dist/naming/parse-concept-name.d.ts.map +1 -1
  540. package/dist/naming/parse-concept-name.js +6 -10
  541. package/dist/naming/parse-concept-name.js.map +1 -1
  542. package/dist/plan/format-plan.d.ts +2 -1
  543. package/dist/plan/format-plan.d.ts.map +1 -1
  544. package/dist/plan/format-plan.js +20 -2
  545. package/dist/plan/format-plan.js.map +1 -1
  546. package/dist/plan/plan-waves.d.ts.map +1 -1
  547. package/dist/plan/plan-waves.js +2 -1
  548. package/dist/plan/plan-waves.js.map +1 -1
  549. package/dist/plan/planned-commands.d.ts +10 -0
  550. package/dist/plan/planned-commands.d.ts.map +1 -0
  551. package/dist/plan/planned-commands.js +13 -0
  552. package/dist/plan/planned-commands.js.map +1 -0
  553. package/dist/plan/planned-words.d.ts +27 -0
  554. package/dist/plan/planned-words.d.ts.map +1 -0
  555. package/dist/plan/planned-words.js +170 -0
  556. package/dist/plan/planned-words.js.map +1 -0
  557. package/dist/plan/wave-plan.d.ts +11 -1
  558. package/dist/plan/wave-plan.d.ts.map +1 -1
  559. package/dist/presets/apply-preset.d.ts.map +1 -1
  560. package/dist/presets/apply-preset.js +6 -4
  561. package/dist/presets/apply-preset.js.map +1 -1
  562. package/dist/presets/identity-preset.d.ts.map +1 -1
  563. package/dist/presets/identity-preset.js +1 -4
  564. package/dist/presets/identity-preset.js.map +1 -1
  565. package/dist/presets/lay-out-prisma-models.d.ts +4 -4
  566. package/dist/presets/lay-out-prisma-models.d.ts.map +1 -1
  567. package/dist/presets/lay-out-prisma-models.js +15 -12
  568. package/dist/presets/lay-out-prisma-models.js.map +1 -1
  569. package/dist/presets/outside-the-tenancy.d.ts +10 -0
  570. package/dist/presets/outside-the-tenancy.d.ts.map +1 -0
  571. package/dist/presets/outside-the-tenancy.js +31 -0
  572. package/dist/presets/outside-the-tenancy.js.map +1 -0
  573. package/dist/presets/preset-decision.d.ts +1 -1
  574. package/dist/presets/preset-decision.js +1 -1
  575. package/dist/presets/preset.d.ts +1 -1
  576. package/dist/prisma-schema/index.d.ts +11 -0
  577. package/dist/prisma-schema/index.d.ts.map +1 -0
  578. package/dist/prisma-schema/index.js +11 -0
  579. package/dist/prisma-schema/index.js.map +1 -0
  580. package/dist/prisma-schema/keeps-single-prisma-schema.d.ts +7 -0
  581. package/dist/prisma-schema/keeps-single-prisma-schema.d.ts.map +1 -0
  582. package/dist/prisma-schema/keeps-single-prisma-schema.js +11 -0
  583. package/dist/prisma-schema/keeps-single-prisma-schema.js.map +1 -0
  584. package/dist/prisma-schema/prisma-blocks.d.ts +9 -0
  585. package/dist/prisma-schema/prisma-blocks.d.ts.map +1 -0
  586. package/dist/prisma-schema/prisma-blocks.js +15 -0
  587. package/dist/prisma-schema/prisma-blocks.js.map +1 -0
  588. package/dist/prisma-schema/prisma-main-schema.d.ts +3 -0
  589. package/dist/prisma-schema/prisma-main-schema.d.ts.map +1 -0
  590. package/dist/prisma-schema/prisma-main-schema.js +4 -0
  591. package/dist/prisma-schema/prisma-main-schema.js.map +1 -0
  592. package/dist/prisma-schema/prisma-schema-folder.d.ts +3 -0
  593. package/dist/prisma-schema/prisma-schema-folder.d.ts.map +1 -0
  594. package/dist/prisma-schema/prisma-schema-folder.js +3 -0
  595. package/dist/prisma-schema/prisma-schema-folder.js.map +1 -0
  596. package/dist/prisma-schema/prisma-schema-of.d.ts +7 -0
  597. package/dist/prisma-schema/prisma-schema-of.d.ts.map +1 -0
  598. package/dist/prisma-schema/prisma-schema-of.js +10 -0
  599. package/dist/prisma-schema/prisma-schema-of.js.map +1 -0
  600. package/dist/prisma-schema/schema-at.d.ts +4 -0
  601. package/dist/prisma-schema/schema-at.d.ts.map +1 -0
  602. package/dist/prisma-schema/schema-at.js +5 -0
  603. package/dist/prisma-schema/schema-at.js.map +1 -0
  604. package/dist/prisma-schema/schema-of-context.d.ts +3 -0
  605. package/dist/prisma-schema/schema-of-context.d.ts.map +1 -0
  606. package/dist/prisma-schema/schema-of-context.js +5 -0
  607. package/dist/prisma-schema/schema-of-context.js.map +1 -0
  608. package/dist/prisma-schema/single-prisma-schema-found.d.ts +3 -0
  609. package/dist/prisma-schema/single-prisma-schema-found.d.ts.map +1 -0
  610. package/dist/prisma-schema/single-prisma-schema-found.js +7 -0
  611. package/dist/prisma-schema/single-prisma-schema-found.js.map +1 -0
  612. package/dist/prisma-schema/single-prisma-schema-steps.d.ts +6 -0
  613. package/dist/prisma-schema/single-prisma-schema-steps.d.ts.map +1 -0
  614. package/dist/prisma-schema/single-prisma-schema-steps.js +25 -0
  615. package/dist/prisma-schema/single-prisma-schema-steps.js.map +1 -0
  616. package/dist/prisma-schema/single-prisma-schema.d.ts +3 -0
  617. package/dist/prisma-schema/single-prisma-schema.d.ts.map +1 -0
  618. package/dist/prisma-schema/single-prisma-schema.js +3 -0
  619. package/dist/prisma-schema/single-prisma-schema.js.map +1 -0
  620. package/dist/progress/read-remaining.d.ts.map +1 -1
  621. package/dist/progress/read-remaining.js +49 -6
  622. package/dist/progress/read-remaining.js.map +1 -1
  623. package/dist/slice/plan-staging.d.ts +7 -4
  624. package/dist/slice/plan-staging.d.ts.map +1 -1
  625. package/dist/slice/plan-staging.js +23 -5
  626. package/dist/slice/plan-staging.js.map +1 -1
  627. package/dist/slice/staging-scope.d.ts +9 -0
  628. package/dist/slice/staging-scope.d.ts.map +1 -0
  629. package/dist/slice/staging-scope.js +2 -0
  630. package/dist/slice/staging-scope.js.map +1 -0
  631. package/dist/slice/storage-of-slice.d.ts +14 -0
  632. package/dist/slice/storage-of-slice.d.ts.map +1 -0
  633. package/dist/slice/storage-of-slice.js +79 -0
  634. package/dist/slice/storage-of-slice.js.map +1 -0
  635. package/dist/slice/verify-slice.d.ts.map +1 -1
  636. package/dist/slice/verify-slice.js +3 -1
  637. package/dist/slice/verify-slice.js.map +1 -1
  638. package/dist/stack/audit-vars.js +1 -1
  639. package/dist/stack/audit-vars.js.map +1 -1
  640. package/dist/version.d.ts +1 -1
  641. package/dist/version.js +1 -1
  642. package/dist/worker/briefing-of.d.ts.map +1 -1
  643. package/dist/worker/briefing-of.js +7 -0
  644. package/dist/worker/briefing-of.js.map +1 -1
  645. package/dist/worker/progress-of.d.ts.map +1 -1
  646. package/dist/worker/progress-of.js +4 -1
  647. package/dist/worker/progress-of.js.map +1 -1
  648. package/dist/workspace/cannot-write.d.ts +7 -0
  649. package/dist/workspace/cannot-write.d.ts.map +1 -0
  650. package/dist/workspace/cannot-write.js +36 -0
  651. package/dist/workspace/cannot-write.js.map +1 -0
  652. package/dist/workspace/error-code-of.d.ts +3 -0
  653. package/dist/workspace/error-code-of.d.ts.map +1 -0
  654. package/dist/workspace/error-code-of.js +5 -0
  655. package/dist/workspace/error-code-of.js.map +1 -0
  656. package/dist/workspace/exit-code-of.d.ts +6 -0
  657. package/dist/workspace/exit-code-of.d.ts.map +1 -0
  658. package/dist/workspace/exit-code-of.js +7 -0
  659. package/dist/workspace/exit-code-of.js.map +1 -0
  660. package/dist/workspace/index.d.ts +2 -0
  661. package/dist/workspace/index.d.ts.map +1 -1
  662. package/dist/workspace/index.js +2 -0
  663. package/dist/workspace/index.js.map +1 -1
  664. package/dist/workspace/is-file-or-absent.d.ts +3 -0
  665. package/dist/workspace/is-file-or-absent.d.ts.map +1 -0
  666. package/dist/workspace/is-file-or-absent.js +11 -0
  667. package/dist/workspace/is-file-or-absent.js.map +1 -0
  668. package/dist/workspace/prune-emptied.d.ts +3 -0
  669. package/dist/workspace/prune-emptied.d.ts.map +1 -0
  670. package/dist/workspace/prune-emptied.js +12 -0
  671. package/dist/workspace/prune-emptied.js.map +1 -0
  672. package/dist/workspace/tell-unwritable.d.ts +9 -0
  673. package/dist/workspace/tell-unwritable.d.ts.map +1 -0
  674. package/dist/workspace/tell-unwritable.js +10 -0
  675. package/dist/workspace/tell-unwritable.js.map +1 -0
  676. package/dist/workspace/workspace-report.d.ts +3 -0
  677. package/dist/workspace/workspace-report.d.ts.map +1 -1
  678. package/dist/workspace/workspace.d.ts +15 -4
  679. package/dist/workspace/workspace.d.ts.map +1 -1
  680. package/dist/workspace/workspace.js +47 -27
  681. package/dist/workspace/workspace.js.map +1 -1
  682. package/dist/workspace/write-if-allowed.d.ts +3 -0
  683. package/dist/workspace/write-if-allowed.d.ts.map +1 -0
  684. package/dist/workspace/write-if-allowed.js +20 -0
  685. package/dist/workspace/write-if-allowed.js.map +1 -0
  686. package/package.json +4 -4
  687. package/templates/adapter/simulated.declared.ts.tpl +7 -0
  688. package/templates/adapter/simulated.spec.ts.tpl +12 -0
  689. package/templates/adapter/simulated.ts.tpl +5 -0
  690. package/templates/adapter/simulated.wiring.tsyringe.tpl +5 -0
  691. package/templates/aggregate/event-sourced.aggregate.spec.ts.tpl +8 -0
  692. package/templates/context/CONTEXT.md.tpl +1 -1
  693. package/templates/init/README.md.tpl +1 -1
  694. package/templates/init/platform/audit/create-audit.ts.tpl +1 -1
  695. package/templates/init/platform/composition/compose-application.manual.ts.tpl +24 -17
  696. package/templates/init/platform/database/create-client.prisma.ts.tpl +1 -1
  697. package/templates/init/platform/database/open-test-database.prisma.ts.tpl +1 -1
  698. package/templates/init/platform/database/persistence-over.prisma.ts.tpl +2 -2
  699. package/templates/init/platform/database/prisma.config.ts.tpl +2 -1
  700. package/templates/init/platform/database/schema.prisma.tpl +3 -4
  701. package/templates/init/platform/event-sourcing/create-event-sourcing.ts.tpl +1 -1
  702. package/templates/init/pnpm-workspace.yaml +2 -5
  703. package/templates/init/rules/infrastructure.md.tpl +2 -1
  704. package/templates/pipeline/github/actions/setup/action.yml.tpl +1 -1
  705. package/templates/pipeline/gitlab/gitlab-ci.yml.tpl +1 -1
  706. package/templates/pipeline/package-scripts.json +1 -1
  707. package/templates/presets/identity/context/infrastructure/persistence/drizzle-account.repository.drizzle.ts.tpl +0 -3
  708. package/templates/presets/identity/context/infrastructure/persistence/drizzle-delegation.repository.drizzle.ts.tpl +0 -3
  709. package/templates/presets/identity/context/infrastructure/persistence/drizzle-invitation.repository.drizzle.ts.tpl +0 -3
  710. package/templates/presets/identity/context/infrastructure/persistence/drizzle-member.repository.drizzle.ts.tpl +0 -3
  711. package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation-tenant-directory.reader.drizzle.ts.tpl +0 -3
  712. package/templates/presets/identity/context/infrastructure/persistence/drizzle-organisation.repository.drizzle.ts.tpl +0 -3
  713. package/templates/presets/identity/context/infrastructure/persistence/drizzle-search-members-reader.repository.drizzle.ts.tpl +0 -3
  714. package/templates/presets/identity/context/infrastructure/persistence/knex-account.repository.knex.ts.tpl +0 -3
  715. package/templates/presets/identity/context/infrastructure/persistence/knex-delegation.repository.knex.ts.tpl +0 -3
  716. package/templates/presets/identity/context/infrastructure/persistence/knex-invitation.repository.knex.ts.tpl +0 -3
  717. package/templates/presets/identity/context/infrastructure/persistence/knex-member.repository.knex.ts.tpl +0 -3
  718. package/templates/presets/identity/context/infrastructure/persistence/knex-organisation-tenant-directory.reader.knex.ts.tpl +0 -3
  719. package/templates/presets/identity/context/infrastructure/persistence/knex-organisation.repository.knex.ts.tpl +0 -3
  720. package/templates/presets/identity/context/infrastructure/persistence/knex-search-members-reader.repository.knex.ts.tpl +0 -3
  721. package/templates/presets/identity/context/infrastructure/persistence/prisma-account.repository.prisma.ts.tpl +0 -3
  722. package/templates/presets/identity/context/infrastructure/persistence/prisma-delegation.repository.prisma.ts.tpl +0 -3
  723. package/templates/presets/identity/context/infrastructure/persistence/prisma-invitation.repository.prisma.ts.tpl +0 -3
  724. package/templates/presets/identity/context/infrastructure/persistence/prisma-member.repository.prisma.ts.tpl +0 -3
  725. package/templates/presets/identity/context/infrastructure/persistence/prisma-organisation-tenant-directory.reader.prisma.ts.tpl +0 -3
  726. package/templates/presets/identity/context/infrastructure/persistence/prisma-organisation.repository.prisma.ts.tpl +0 -3
  727. package/templates/presets/identity/context/infrastructure/persistence/prisma-search-members-reader.repository.prisma.ts.tpl +0 -3
  728. package/templates/presets/identity/decision.md.tpl +9 -6
  729. package/templates/presets/identity/design.md.tpl +4 -1
  730. package/templates/repository/prisma/schema.prisma.tpl +4 -0
  731. package/templates/shared-kernel/CONTEXT.md.tpl +16 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,82 @@ What each version changes for someone who uses the kit. The packages of `package
4
4
  together, under one version; the notes of each [GitHub release](https://github.com/gbourgeat/ddd-ts-kit/releases)
5
5
  list the pull requests behind it.
6
6
 
7
+ ## 0.96.0
8
+
9
+ **`plan-waves` replays the generator commands of the plan and refuses a name the glossary does not define, before a worker runs the row.** A plan whose rows use words the glossary of their context does not define, with no `--term`, was handed to workers as it was, and each of them was refused at the first command: on a plan of the incident-response example written by a small model, 71 of the 85 commands of one context. Once the rows can be ordered, `plan-waves` now replays their generator commands in a copy of the project, in the order of the waves, and reports, without waves and with exit 1, each name whose words the glossary of its context does not define (`undefined-word`) or that carries a technical word no term holds (`technical-word`), counting the `--term` of the row and of the rows it waits for, with the `--term` to add. The generator itself says which names a command introduces, so the check judges exactly what a worker would meet. The commands the generator refuses for another reason (a missing `--module`, an aggregate no row generates) are listed apart, without failing (`notReplayed` in `--json`). The `plan-slices` skill commits a plan only once `plan-waves` exits 0.
10
+
11
+ To move: run `npx ddd-ts-kit plan-waves` on a plan in progress, and add to its rows the `--term` it names.
12
+
13
+ **`merge-trunk` stops before it writes when the trunk changes a path the session cannot write, and no longer counts the sandbox's device nodes as uncommitted work.** In a Claude Code sandbox, a trunk that changed `.claude/settings.json` (mounted read-only) or a folder under an Edit deny rule left the worktree half merged, and the character devices the sandbox binds over denied paths made the cleanliness check refuse. Before the merge writes anything, `merge-trunk` now probes each path the trunk changes (the file, and its folder for the merge to create or remove it); when one is not writable it stops with nothing changed, names the paths and exits 3, the code `init` uses: the owner runs the same command from a terminal outside the sandbox. Untracked character devices are ignored by the cleanliness check; any other untracked or modified file still refuses. The `parallel-work` and `story` skills say that a merge of a trunk that changes the settings of the project is the owner's.
14
+
15
+ **`generate context` and `init --context` refuse a bounded context named `schema`, on every ORM.** On Prisma the models of a context live in `prisma/schema/<context>.prisma`, beside the main file `prisma/schema/schema.prisma` (the generator of the client, the datasource and the tables of the platform): a context named `schema` would have written its models into that shared file, which the guard already read as the file of no context. The name is refused before anything is written, with the reason and a name to use instead. It is refused on every ORM, not on Prisma alone: `init --force` moves a project to another ORM, and the word names the storage, not a capability of the business. `schema-registry` and other names that only hold the word are accepted.
16
+
17
+ **`init` run again on a Prisma project laid out before 0.95 keeps its one `prisma/schema.prisma`, says how to move it, and `generate repository` waits for the move.** On a project whose schema was the one `prisma/schema.prisma` of 0.94, `init` 0.95.0 wrote a fresh `prisma/schema/schema.prisma` beside it (a second generator and datasource), while `prisma.config.ts` still named the old file, and the `git mv` of the To move of 0.95.0 then failed on its target. While `prisma/schema.prisma` is there and `prisma/schema/schema.prisma` is not, `init` now writes neither `prisma/schema/schema.prisma` nor `prisma.config.ts`, keeps `db:client` on the one file (under `--force` too), and its notes give the steps of the move with each context of the project and the file its models go to. The move stays the team's: it parts the models by their `@@schema` and edits a config and a script the team may have changed. `generate repository` refuses to write the model of a context until the move, with the same steps: Prisma would not read `prisma/schema/<context>.prisma` while `prisma.config.ts` names the one file.
18
+
19
+ To move: the two To move lines of 0.95.0 now run in either order. A project that already ran `init` 0.95.0 deletes the `prisma/schema/` folder it wrote (it holds only that fresh `schema.prisma`) before `mkdir prisma/schema && git mv prisma/schema.prisma prisma/schema/schema.prisma`.
20
+
21
+ **`init` allows by name the install scripts the stack needs, the regulated profile pins them after the first install, and `doctor` reports one a bump left unreviewed.** `@prisma/engines` (under `--orm prisma`: it downloads the schema engine `prisma migrate` and `db:client` run) and `@confluentinc/kafka-javascript` (under `--broker kafka`: it downloads the prebuilt native client, or builds it, and the client does not load without it) go into `allowScripts` of `package.json` under npm and into `allowBuilds` of `pnpm-workspace.yaml` under pnpm. Under pnpm, the default package manager, nothing allowed them: pnpm 12 skipped both scripts at every install, so a project on Kafka had no native client (Prisma fetches its engine at first use). Under npm 11.19 the scripts ran, but every install listed them among the scripts not yet reviewed, which npm says a later release blocks. The entries are by name: npm accepts only a name or exact versions (it drops `^7.10.0` with a warning), and the versions are known once the install resolved the ranges. An entry the project has for one of these packages, a pin or a denial, is kept, even under `--force`, and a denial is said. The other install scripts an install lists (esbuild, `@swc/core`, `unrs-resolver`, `protobufjs`, `@parcel/watcher`, lefthook, the preinstall of `prisma`) are left to the team: the kit needs none of them. Under `--agent-profile regulated`, the notes of `init` ask the owner to pin both after the first install, `npm install-scripts approve @prisma/engines @confluentinc/kafka-javascript` turning each name into the installed version (under pnpm, `'<package>@<version>': true` in `allowBuilds`), and say that a bump of one of them then needs the same step once its new script was read. `doctor` reads the version installed against that list: `install-script <package>` is `missing` without an entry (`init` adds it), `other version` when only pins of other versions exist, with the `approve` and `rebuild` commands, both failing `--strict`, and `written otherwise` for a denial, which does not.
22
+
23
+ To move: run `npx ddd-ts-kit init` again on a project on Prisma or Kafka: it adds the two entries (a pnpm project with an `allowBuilds` block of its own is told what to add). Then, on pnpm, `pnpm rebuild @confluentinc/kafka-javascript @prisma/engines` runs the scripts the earlier installs skipped.
24
+
25
+ **`init --agent-profile regulated` and the sandbox guide now say that the `permissions.allow` rules of the project apply only in a workspace trusted on the machine.** A headless `claude -p` run in a workspace never trusted (a fresh clone in CI, a scripted agent run) ignores the `allow` entries of `.claude/settings.json` and prints `Ignoring N permissions.allow entries` on stderr, while `deny` and `ask` still apply; this was checked on Claude Code 2.1.311. The notes of `init` and `docs/guides/agent-sandbox.md` give the two ways to trust a workspace (open it once interactively, or `projects["<root>"].hasTrustDialogAccepted` in `~/.claude.json` of the account that runs it) and say that a git worktree uses the trust of its main checkout (Claude Code docs; not probed). `doctor` does not report the trust: it would have to open `~/.claude.json`, which also holds account data.
26
+
27
+ **A worker is no longer locked out because `verify-slice` regenerated the derived files.** `verify-slice` runs `regenerate` in the worktree of a worker, which rewrites the derived files outside its context (`clients/`, `docs/behaviour/`, `docs/context-map.md`, `openapi/`, `docs/integration/`). When the worker had run inline code in the same stretch (for example `verify-slice --json | node -e ...`), the guard read those files as its own writes outside the scope and refused every Bash and Edit call until the conductor restored them. The guard now leaves what `regenerate` rewrites out of the files it watches after inline code; any other file outside the scope still stops the worker. Workers still commit their derived files with the slice, as `parallel-work` says, and `merge-trunk` still takes the trunk's side and regenerates.
28
+
29
+ **The spec that `generate aggregate --event-sourced` writes uses the builder it is generated with, so the deadcode gate of the project stays green on the trunk.** The builder (`test/builders/<aggregate>.builder.ts`) was written with no importer: the generated spec built its aggregate through `create` and `givenEvents`, so `npm run deadcode` (knip) reported `Unused files` on the builder until a later row first used it. The spec now has a test that loads the aggregate through its builder (state of its birth, no event recorded), the way the state-stored spec already did. The state-stored aggregate needed no change: its spec built every case through its builder.
30
+
31
+ To move: nothing for a project already generated. Re-running the generator on a new aggregate writes the spec with the builder.
32
+
33
+ ## 0.95.0
34
+
35
+ **The bare project of a wide stack passes its lint.** With `--audit on` and a tenancy, `src/platform/event-sourcing/create-event-sourcing.ts` imported `ExecutionScope` without using it, an error of `@typescript-eslint/no-unused-vars`; it is imported only where it is used, without the audit. On a composition by hand (manual or Nest DI), `composeApplication` grew a line with each option, and with audit, Sentry, presentation, Nest routes, files over HTTP, an external broker, rate limiting and Redis it reached 31 lines, over the limit of `clean/function-size`: the boundary of the HTTP server is now built by a function of its own, `boundaryOf`, placed under it. To move: a project whose lint reports either finding drops the import, or moves the `httpBoundary({...})` literal of `composeApplication` into a function `boundaryOf(platform, options, presentation)` placed under it.
36
+
37
+ **`generate context` writes the three cells of each glossary row and the sentence of its classification.** `--term "<Term>=<meaning>|<not to be confused with>"` fills the "Not to be confused with" cell, on every generator that takes `--term`; a pipe is the one character a cell of the table cannot hold, so it never clashes with a meaning, and a second one is refused. `generate context --reason "<one sentence>"` writes the line under `## Classification` in place of its `TODO(domain)`. The `bootstrap` skill passes both, so the draft `docs/architecture/glossary.md` is deleted without losing a cell.
38
+
39
+ **Under a tenancy, the identity preset declares its context the control plane of the tenants instead of writing seven suppressions, and a fresh project prints the passing line its `AGENTS.md` names.** `generate context identity --preset identity` with `--tenancy shared-table` wrote a `ddd-ts-kit-disable-next-line tenancy/scoped-statement` in each of the seven adapters of the context, and `check` printed `0 errors, 0 warnings, 7 suppressions` where the guide of the project gives `0 suppressions` as the line of a pass. A context now says where it stands against the tenancy of the project: `"tenancy": "control-plane"` under `contexts.<name>` of `ddd-ts-kit.config.json`, for a context that decides who belongs to which tenant and whose tables belong to none. `tenancy/scoped-statement` does not judge its adapters, `generate repository` confines none of its repositories (unless `--tenant-scoped` is passed), `governance/recorded-deviation` asks for the entry `contexts.<name>.tenancy` of `deviations` with its decision record, and `config/valid` reports another value. The preset writes the key, the entry and its record `docs/adr/NNNN-<context>-is-the-control-plane-of-the-tenants.md`, and its adapters carry no suppression on Drizzle, Knex and Prisma (it is not written for TypeORM). The `persistence` skill says to declare such a context rather than suppress its statements.
40
+
41
+ To move, optional since the suppressions keep passing: in a project that ran the preset under a tenancy, add `"tenancy": "control-plane"` to the entry of the identity context under `contexts`, add `{ "what": "contexts.identity.tenancy", "adr": "0001", "reason": "The identity context is the control plane of the tenants: it decides who belongs to which, and its rows belong to none of them." }` to `deviations` (the number of the record the preset wrote), then remove the seven `ddd-ts-kit-disable-next-line tenancy/scoped-statement` lines of `src/contexts/identity/infrastructure/persistence/`. `check` then prints `0 suppressions`.
42
+
43
+ **`init` no longer stops midway when a sandbox protects a path: it writes every other file and gives the command to finish.** Under the sandbox of Claude Code, which the regulated profile turns on, the agent cannot write `.claude/settings.json` nor `.claude/hooks/`, and `init` stopped with `EEXIST` after part of its files, leaving a project that could not be verified. It now leaves out each file it cannot write, lists it under `unwritable` (and in `skipped`) of its report, a dry run included, and ends with a note that gives the same `init` to run from a terminal outside the sandbox: it writes the missing files and keeps the ones written. It exits with the new code 3, so that a script or an agent never reads a half-written project as done. A file the sandbox masks with a device is reported as unwritable, no longer as an existing file to keep. Every command that writes files (`generate`, `docs`, `sdk`, the moves) reports a protected path the same way and exits 3, and then deletes nothing, so that a move whose target is protected loses no file. The `bootstrap` skill hands the real `init` and `npm run hooks:install` to the owner in a sandboxed session: the agent runs the dry run and shows the command, the owner runs `init`, the agent resumes at `npm install`, and the owner installs the git hooks before the first commit.
44
+
45
+ **`generate --help` shows `[--module <module>]` on every kind that takes it, and the other kinds refuse `--module`.** In a context divided into modules of its model, the generator refuses a file of a layer written without `--module`, yet no kind showed the flag in its usage: an agent that read `generate --help --json` left it out. The usage line of the 31 kinds that write the files the modules divide (the model, the use cases, their routes, ports, adapters, gateways, policies, events, jobs and projections) now ends with `[--module <module>]`, `generate --help --json` gives `writesInModules` for each kind, and the note of `--module` says that a context with modules requires it. A kind that writes only what the context keeps aside or what lies outside the contexts (`builder`, `test-world`, `route-group`, `guard`, `schema`, `e2e`, `service`, `module`, `context`, `acceptance`, `worker`, `adr`) refuses `--module` instead of ignoring it: `generate service servicing --module ledger` was accepted with no effect, and `generate guard ... --module` wrote the spec of a guard kept at the level of the context into the module. The plan-slices and scaffold skills say which commands carry it.
46
+
47
+ To move: drop `--module` from a command of one of those twelve kinds, in a plan or a script.
48
+
49
+ **Under the sandbox of Claude Code, `docs:generate` and `acceptance --lock` write their files again, and the regulated profile lets the agent install the stack `init` chose.** The sandbox turns an `Edit` deny rule into a path no shell command writes, so the deny rules `init` wrote on the generated contracts and the lock of an acceptance (`Edit(./openapi/**)`, `Edit(./docs/integration/asyncapi.*)`, `Edit(./docs/integration/event-catalog.md)`, `Edit(./test/acceptance/*.acceptance.lock.json)`) made their own generators fail with `EROFS`. They are `ask` rules now, which keep the Edit tool off the files without reaching the sandbox; the guard of the plugin still refuses a hand edit of them, and now of the forms of `openapi/forms/` too. `init --agent-profile regulated` derives the sandbox from the stack: `sandbox.filesystem.allowWrite` holds the cache of the package manager (`~/.npm`, or the store and the cache of pnpm) and `~/.cache/prisma` under `--orm prisma`, and `sandbox.network.allowedDomains` gains `binaries.prisma.sh` under Prisma and `github.com` and `release-assets.githubusercontent.com` under `--broker kafka`, where the prebuilt binary of the Kafka client comes from. A list the project already holds gains the entries it lacks, and `doctor` names them. The notes of `init` say that the owner runs the first install outside the agent (a path missing when a session starts stays read-only for that session), that the Kafka client built from sources needs more than the sandbox allows, and that a sandbox the managed settings require ignores these entries of the project file, which then go into the managed settings. `docs/guides/agent-sandbox.md` says the same.
50
+
51
+ To move: run `npx ddd-ts-kit init` again. It takes the four deny rules out of `permissions.deny` and asks for them instead, and under the regulated profile it adds the paths and the hosts of the stack to the sandbox block. Then run the first install yourself, outside the agent.
52
+
53
+ **The guard no longer refuses `cd <worktree> && git add <verdict> && git commit`, nor `sed -n` on a verdict.** A command that names the lock of an acceptance or a verdict of the `acceptance-judge` agent was refused as soon as one of its programs was not a reader, so a chain that started with `cd` could not version a verdict, and `sed -n 1,30p` could not read one. `cd`, `pushd`, `popd`, `pwd`, `true` and `test` now touch nothing, and `sed` without `-i` (nor a script that writes with `w`, `W` or `e`), `awk` whose program writes nothing (no `>`, pipe, `system`, `@include` nor script file), `less` without a log file and `jq` read. A redirection to a file is still a write. The rules of a worker now follow `pushd` and `popd` as they follow `cd`, to judge where its commands write.
54
+
55
+ **Under Jest, `pending(...)` of `@ddd-ts-kit/testing/e2e` reads a failed assertion of `node:assert` as an assertion.** Jest runs a spec in a vm context, and `node:assert`, a core module, throws its `AssertionError` from the outer realm: it is not an instance of the `Error` the kit sees there, so `pending` stopped before it read its name, and a scenario waiting for its route, failing on `expectStatus` as expected, was reported as a broken scenario (`The scenario stops on AssertionError [ERR_ASSERTION]: ..., not on an assertion`). `pending` and `eventually` now read a failure by its shape (a string `name` and `message`), never by `instanceof Error`, and `expectRefusal` and `thenError` name the class of an error of another realm instead of printing it whole. A cycle of causes no longer makes `pending` loop.
56
+
57
+ **`ddd-ts-kit check` reads the source root as git sees it: an ignored folder or a dot-directory in a context is no longer reported by `tree/closed`.** The Claude Code sandbox leaves `.claude/.cc-writes/` in a folder where a command ran, and a context that held it failed `tree/closed` (and with it `check:arch` and `verify`) with a fix that offered to declare `.claude` as a module. The walk of the source root now leaves out the entries git ignores and no one tracks (a `.gitignore`, `.git/info/exclude`, the global excludes file of the machine), listed by one `git ls-files` call, and every dot-directory under the contexts directory. A tracked file is read even when an ignore pattern names it. Outside a git repository, or when the project sits in a folder its enclosing repository ignores, every entry is read as before, the dot-directories of the contexts left out. `tree/documented-paths` no longer reports a path of `docs/architecture` that goes through a dot-directory of a context either. What git ignores under the source root is no longer read by any rule of `check`, so a source the project keeps out of git is not judged either.
58
+
59
+ **`generate domain-event` on an event-sourced aggregate adds only what the aggregate and its codec lack.** Run on the birth event that `generate aggregate --event-sourced --birth <Event>` already wrote, it imported the event a second time and declared a second applier, and the aggregate no longer compiled; a second run on a later event did the same. Each piece (the member of the union of events, the entry of `appliers()`, the apply method, the import, the data type and the entry of the codec) is now added only when it is absent, in a context and in a module alike, so a command run twice leaves both files as they are.
60
+
61
+ **`todo` reads the markers of every kind of file, the Prisma schema included, and `verify-slice` stages the schema and the behaviour pages the generator wrote for the slice.** `ddd-ts-kit todo <context>` read only the TypeScript and Markdown files of the context: the `TODO(domain)` that `generate repository` leaves in `prisma/schema.prisma` (the columns of the new model) went unnoticed, and the row was committed with it. `todo` now reads the schema of Prisma, every file of `prisma/schema/`, a marker of `prisma/schema/<context>.prisma` under that context and another under the context whose database schema holds its model (`todo <context>` lists it), and, for the whole project, the migrations (`migrations/`, `prisma/migrations/`), the pages under `docs/` and the configuration at the root (`docker-compose.yml`, the config files of the ORMs, `ddd-ts-kit.config.json`), not the lockfiles. The other ORMs already wrote that marker in the tables file of the context, which `todo` read. `status`, `story-check` and the state of a worker count the same markers. `verify-slice` listed `prisma/schema.prisma` and `docs/behaviour/*` as left out, for a person to decide about, while the generator and `regenerate` had written them for the slice. It now stages the pages of `docs/behaviour/` (the page of the context, the application and the index, but not the page of another context), and the main Prisma file `prisma/schema/schema.prisma` when its one change since `HEAD` is the database schema of the context joining the datasource (the models are in `prisma/schema/<context>.prisma`, staged with the context), or the schema index of the platform (`<platformDir>/database/schema.ts`, for Drizzle, Knex and TypeORM) when every line changed there is the import of the tables file of the context. Any other change in the same file keeps it left out. The working migration of a Prisma worker (`prisma/migrations/<number>_working_<what>/migration.sql`) is staged like those of the other ORMs.
62
+
63
+ **A folder whose name starts with a dot under the contexts directory is never a context, nor a module.** The Claude Code sandbox leaves `.claude/.cc-writes` in a folder where a command wrote, and `ddd-ts-kit docs` wrote `docs/behaviour/.claude.md` for it, `list`, `status` and the other commands that walk the contexts read it as an undeclared context, and the ESLint plugin located its files in a context named `.claude`. The listing of the directories of a workspace now leaves out every name that starts with a dot, which covers the contexts and the modules of a context for all commands, and the location of a file by its path (CLI and ESLint plugin) no longer reads a dot folder as a context. `check` already left such a folder out of its walk.
64
+
65
+ **`merge-trunk --abort` works when the regeneration rewrote a file the merge had staged.** `merge-trunk --continue` now stages again the derived files (and the migrations, decision records, lockfile) its steps rewrite, so a `CONTEXT.md` the trunk changed is no longer left staged then modified, which made `git merge --abort` and `git reset --merge` fail with `Entry '...' not uptodate`. `--abort` also restores, and names, such a file when it was modified after staging; if any other tracked file was changed by hand, it refuses (exit 2) and says which, and discards nothing.
66
+
67
+ **`generate command --aggregate --local-only` names the repository to generate first, and plan-slices plans it.** A worker that runs a command on an aggregate with no repository is refused under `--local-only`, because the command would create the repository and write shared files (the schema index, the grants). The refusal listed those files and never said the cause. It now adds the exact command for the trunk, `ddd-ts-kit generate repository <context> <Aggregate>`, with no flag: it reads the aggregate and writes the event store adapter, with no table, when the aggregate is event-sourced. `generate aggregate` does not write the repository, by design: the repository is a row of the skeleton. The plan-slices and parallel-work skills now say that every aggregate a command row names has a skeleton row generating its repository (and `--event-sourced` on the aggregate when it is), which the command rows depend on.
68
+
69
+ **A name that says a term of the glossary passes the technical-word checks: `ScoringModel` once `Scoring model` is a row of CONTEXT.md.** The generator and `language/no-technical-name` refused every name carrying `Model`, `Data`, `Manager` and the other technical words, even when the business itself names the concept so: the scoring model of credit risk, a regulated object with its own validation and versioning, or the copy of data of the GDPR right of access. The team had to rename it to please the linter, and the code drifted from the words of the examiner. A technical word now passes when the words of the name around it say a whole term of the `## Ubiquitous language` table of the context, inflected or not: `Scoring model` holds `ScoringModel`, `ScoringModels` and `ScoringModelVersioned`, `Copy of data` holds `CopyOfData`, and `PricingModel` or `InvoiceData` are still refused. The generator and the checker judge the name with the same function. The refusal says how: use the business word, or, when the business does say it, define the term in CONTEXT.md, in the same command with `--term "Scoring model=<meaning>"`. A concept name ending with `Data` or `Info` is now refused by that one check, with its message, instead of the earlier "names a technical bucket"; the name of a port, a gateway, a policy, a route or a projection keeps the bucket check on its last word, which a term of the glossary lifts the same way. The clean-code and glossary skills say when to add such a row: when a domain expert uses the term, never to silence the rule.
70
+
71
+ **`generate adapter <context> <Port> --kind simulated` writes an adapter that answers in memory, for an environment whose outside system is simulated.** A sandbox, a demo or an environment kept for examiners had no supported way to run a port without its provider: the remote adapter threw "has no transport yet", and the fake of `test/fakes/` is test code that production code may not import. The new kind writes `infrastructure/external/simulated-<port>.adapter.ts` and its spec: a class of production code that answers as the outside system would, from records it keeps, through the translator of `infrastructure/anti-corruption/` when the system has one. It is bound to the port like the remote adapter, kind `external`, with no policy of its own (`--decorators` is refused): `@Adapter(<Port>, { kind: 'external' })` in the declared style, `builder.bind(<Port>).toClass(Simulated<Port>).as('external')` in an explicit module on tsyringe, a note that says what to instantiate where the context is wired by hand (manual, Nest). A port keeps one adapter: in the declared style a remote adapter is refused while a simulated one is declared, and the other way round, and the refusal says which file to remove. The import graph still refuses a fake of the tests imported by production code (`not-to-test`).
72
+
73
+ To move: a port whose remote adapter only throws while its provider is simulated: delete that adapter and its spec (and its binding in an explicit module), then run `npx ddd-ts-kit generate adapter <context> <Port> --kind simulated` and answer its operations the way the outside system would, as its fake does in the tests.
74
+
75
+ **`generate value-object`, `error` and `domain-error` write in the shared kernel, and its terms have a glossary the checks read.** `generate value-object shared-kernel Money --term "Money=<meaning>"` writes `src/shared-kernel/money.vo.ts` and its spec beside it, at the root of `sharedKernelDir`, as the tree lays the shared kernel out, and starts `src/shared-kernel/CONTEXT.md`, the glossary of the shared kernel, with the term. `generate error shared-kernel InvalidMoney forCents` writes the refusal of such a value at the same root, its code in `shared-kernel.codes.ts` (`SharedKernelCodes`) under `"stack.refusals": "named"`; `domain-error shared-kernel` does it under `classes`, and now takes `--term` as the other kinds do. `language/glossary-term` names the value objects (`*.vo.ts`) and, under `named` or `factories`, the refusals (`*.error.ts`) of the shared kernel after that glossary, and `errors/known-code` counts the codes the shared kernel lists. Any other kind given `shared-kernel` is refused with what the shared kernel holds and the contexts to use instead, where it said `Unknown context "shared-kernel"`. The three kinds now declare a shared write (`generate --help --json`): `--local-only` refuses them in the shared kernel, and a worker runs them in its own context. The guard refuses a new `*.vo.ts` or `*.error.ts` of the shared kernel written by hand, with the command that generates it.
76
+
77
+ To move: a project whose shared kernel holds a value object or, under `named` or `factories`, a refusal is now judged by `language/glossary-term`: write `src/shared-kernel/CONTEXT.md` with a `## Ubiquitous language` table that defines their words, or run the next `generate value-object shared-kernel ... --term` that creates it.
78
+
79
+ **On Prisma, each bounded context keeps its models in a file of its own, `prisma/schema/<context>.prisma`, which its worker changes with the mapper on its own branch.** A worker of `parallel-work` that added a state field to an aggregate needed a column, but `prisma/schema.prisma` held the models of every context and the guard refused it to the worker as a shared file: the conductor wrote the column on the trunk, where the mapper of the context had not changed, and the trunk failed to typecheck until the column was reverted. Drizzle, Knex and TypeORM already kept the tables of a context in its own `infrastructure/persistence/`; Prisma now does the same with its multi-file schema. `init --orm prisma` writes `prisma/schema/schema.prisma` (the generator of the client, the datasource and the tables of the platform: outbox, background jobs, process instances, event store, audit trail) and `prisma.config.ts` names the folder (`schema: './prisma/schema'`); `generate repository` writes the model in `prisma/schema/<context>.prisma`, started with the models region of the context, and adds the database schema of the context to the datasource on the first repository of the context only. The guard lets the worker of a context write `prisma/schema/<context>.prisma`, and refuses it the file of another context and `prisma/schema/schema.prisma`; `generate --local-only` treats it as a file of the context, `verify-slice` stages it with the slice (and the main file only when its one change is the context joining the datasource), and `todo <context>` lists its markers; `worker-scope` briefs the worker on Prisma that the models of its context are its own, a stored field changing its column and the mapper in one commit. The identity preset lays its models out in `prisma/schema/identity.prisma`, `privacy/declared-field` and `persistence/no-file-content` read every `.prisma` file of `prisma/schema/`, and `db:client` derives the schema of the tests from the folder (`prisma migrate diff --to-schema prisma/schema`).
80
+
81
+ To move: in a project on Prisma, `mkdir prisma/schema && git mv prisma/schema.prisma prisma/schema/schema.prisma`; in that file write the `output` of the generator one level up (`"../../generated/prisma"`), and move the models and enums of each context (those whose `@@schema` is the schema of the context) out of the `// ddd-ts-kit:models` region into `prisma/schema/<context>.prisma`, between a `// ddd-ts-kit:models` and a `// /ddd-ts-kit:models` line of their own, then remove the empty region from the main file. In `prisma.config.ts` set `schema: './prisma/schema'`, and in the `db:client` script of `package.json` replace `--to-schema prisma/schema.prisma` by `--to-schema prisma/schema`. Run `npm run db:client`: the tables are the same, so `npm run db:generate` finds no change and no migration is needed.
82
+
7
83
  ## 0.94.1
8
84
 
9
85
  **The glossary step finds the terms of the identity preset in the plugin, and every row of a context with modules passes `--module`.** The `glossary` skill sent an agent to `packages/cli/src/presets/identity-terms.ts`, a file of the repository of the kit: the package ships no source, and before the bootstrap a project has no CLI installed. The terms are now on a page beside the skill, `identity-preset.md`, kept equal to the rows the preset writes by a spec of the CLI. The `plan-slices` skill said that what the modules share stays at the level of the context, and a plan of a context with modules then left `--module` out of its policies, integration events and integration handlers, which the generator refuses there: it now says that every generator command of such a row carries `--module`, and that the generator keeps the shared files (codes, permissions, the schema of the database, route groups, fakes and builders) at the level of the context by itself.
package/README.fr.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [English](README.md) · **Français**
2
- <!-- translation-of: README.md sha256:1a299156421ce74c -->
2
+ <!-- translation-of: README.md sha256:84672fb8ed017c79 -->
3
3
 
4
4
  # ddd-ts-kit
5
5
 
@@ -49,7 +49,9 @@ Chaque commande accepte `--json` (sortie lisible par une machine, erreurs compri
49
49
  `--cwd <dir>`. Les commandes autres que `init` cherchent `ddd-ts-kit.config.json` dans le
50
50
  répertoire et ses parents. Codes de sortie : `0` succès, `1` violations, documentation périmée
51
51
  ou, sous `--strict`, un *commit* au-delà de ses limites, `2` mauvais usage (le message dit quoi
52
- faire).
52
+ faire), `3` une commande qui écrit des fichiers n'a pas pu en écrire certains là où elle tournait
53
+ (un chemin que protège le bac à sable d'un agent) : ils sont listés sous `unwritable`, tous les
54
+ autres fichiers sont écrits et aucun n'est supprimé.
53
55
 
54
56
  ## init
55
57
 
@@ -144,6 +146,22 @@ correctif, dans les `overrides` de `package.json` sous npm et de `pnpm-workspace
144
146
  qui ne lit rien de `package.json` : qs `^6.16.0`, que Stryker demande en 6.15.1 par
145
147
  `typed-rest-client`, et avec `--http nest` multer `^2.5.0`, que `@nestjs/platform-express`
146
148
  demande en 2.4.0. Un override que le projet pose déjà pour l'un d'eux est gardé, et signalé.
149
+ Les scripts d'installation dont la pile a besoin sont autorisés par leur nom : `@prisma/engines`
150
+ avec `--orm prisma` (il télécharge le moteur de schéma que lancent `prisma migrate` et
151
+ `db:client`) et `@confluentinc/kafka-javascript` avec `--broker kafka` (il télécharge le client
152
+ natif précompilé, ou le construit), dans `allowScripts` de `package.json` sous npm et dans
153
+ `allowBuilds` de `pnpm-workspace.yaml` sous pnpm. pnpm n'exécute aucun script de build d'une
154
+ dépendance qu'on ne lui nomme pas ; npm 11 liste chaque script d'installation absent
155
+ d'`allowScripts` comme pas encore relu, l'exécute encore en 11.19 avec un avertissement, et
156
+ annonce qu'une version ultérieure le bloquera. Par leur nom, parce que la version n'est connue
157
+ qu'une fois la plage résolue par l'installation, et que npm écarte une entrée écrite avec une
158
+ plage ; une équipe qui relit chaque version les épingle après la première installation
159
+ (`npm install-scripts approve <package>` change un nom en la version installée), ce que demande
160
+ le profil réglementé. Une entrée que le projet a pour l'un d'eux, une épingle ou un refus, est
161
+ gardée ; un refus est signalé. Les autres scripts d'installation qu'une installation liste
162
+ (esbuild, `@swc/core`, `unrs-resolver`, `protobufjs`, `@parcel/watcher`, lefthook, le
163
+ *preinstall* de `prisma`) ne sont pas nécessaires au kit : celui de lefthook installe les *hooks*
164
+ git, ce que fait `hooks:install`.
147
165
 
148
166
  **Pipelines.** Une *pull request* ou une *merge request* exécute les *specs* unitaires, les
149
167
  *specs* d'intégration et le lint des contextes que son changement atteint par la carte des
@@ -567,7 +585,7 @@ choix sont enregistrés sous `stack` dans la configuration, `docsUi`, `ci` et `l
567
585
  | `src/platform/auth/authorization/` | `create-authorizer.ts`, `authorization.ts` (`authorizationModule` avec tsyringe) ou `use-case-protection.ts` (la garde des bus câblés à la main), `access-policies.ts`, `role.ts` (les rôles que porte un identifiant, avec des rôles ou des attributs, ou dès qu'une garde en nomme un), `permissions.ts` (le registre de toutes les permissions, avec des relations ou un authorizer à vous), `signed-in-grants.ts` dès qu'un *preset* de contexte accorde à toute personne connectée, et avec `--audit off` `log-decisions.ts` (une entrée de journal par décision, identifiants et codes seulement) |
568
586
  | `src/platform/auth/<modèle>/` | `roles/roles.ts` (avec le rôle `system` que détient chaque acteur système) ; `attributes/attribute-policies.ts` ; `relationships/` : `relationship-schema.ts`, `create-tuple-store.ts` et sa *spec* de contrat, `relation-tuples.ts`, `relate-system-actors.ts` ; `custom/` : `custom-authorizer.ts` et sa *spec* `authorizerContract` |
569
587
  | `--representations negotiated`, `--forms on` | `src/platform/http/presentation-of.ts` (`Representations.standard()` avec `negotiated`, et `fieldDeciderOf` sur l'`Access` de l'application), décomposé dans la frontière HTTP et donné au script du contrat ; avec `--forms on`, `src/platform/http/with-forms.ts` ajoute `formRoutes` aux routes et `scripts/openapi.ts` écrit `openapi/forms/<operationId>.json`. Les deux sont la valeur par défaut avec une *stack* HTTP ; `json` et `off` les laissent de côté ([docs/CONFIG.fr.md](../../docs/CONFIG.fr.md)) |
570
- | `--audit on` | `src/platform/audit/` : `create-audit.ts` (le journal, le `onDecision` de l'autorisation, les refus des gardes à la frontière remis à la frontière HTTP comme `onGuardRefusal`, le *middleware* avant l'unité de travail, les événements d'intégration abonnés sous le nom de consommateur `audit`), `audited-events.ts` (le registre auquel `generate integration-event` ajoute), `audit.module.ts`, et avec une *stack* HTTP le côté lecture : `audit.permissions.ts` (`audit:trail.read`), puis dans `search-audit-entries/` : `search-audit-entries.query.ts`, son gestionnaire, `search-audit-entries.route.ts` ou `.controller.ts` (`GET /audit/entries` : pages par curseur, filtres `actorId`, `action`, `outcome`, `correlationId`), qui commence par le point d'entrée et prend ce qu'il reçoit et répond dans `audit-entries-parameters.ts`, `audit-entries-filter-of.ts`, `audit-entry-view.ts`, `audit-entry-view-of.ts` et `audit-outcomes.ts`. C'est une capacité de la plateforme, pas un contexte délimité : pas de modèle, une requête protégée sur le port `AuditReader`, bornée par le *tenant* de l'acteur (avec `--tenancy shared-table`, par le *tenant* du travail au moyen de `TenantAuditReader` : le personnel de la plateforme ne lit à travers les *tenants* qu'à l'intérieur de `acrossTenants`). Les refus d'un appelant sans identifiant de connexion ne sont pas enregistrés. Un *job* planifié est audité comme une requête HTTP : origine `schedule`, acteur `system:<context>.<job>`. Avec knex, les deux tables et leurs déclencheurs en ajout seul sont créés par la première migration ; avec drizzle, les tables sont dans `schema.ts` et `npm run db:generate` ajoute les instructions des déclencheurs à la migration qui crée les tables (`npm run db:audit-guard` les affiche pour une migration écrite à la main) ; avec prisma et typeorm, les tables sont des modèles de `prisma/schema.prisma` ou des entités de `schema.ts` (`auditPrismaModels`, `auditEntities` de `@ddd-ts-kit/audit`), écrites par `PrismaAuditTrail` et `TypeOrmAuditTrail`, et `npm run db:generate` (par `ddd-ts-kit prisma-generate` ou `typeorm-generate`) ajoute les instructions des déclencheurs à la migration qui crée les tables, `npm run db:audit-guard` les affichant pour une migration écrite à la main ; les bases de test installent ce garde ; avec `custom` ou sans ORM, le journal est un `InMemoryAuditTrail` derrière un `TODO(platform)`. Les bases de test laissent le schéma d'audit hors de `reset()`. Avec le journal en base et `--storage local` ou `s3`, `audit.module.ts` (ou la composition câblée à la main) enregistre `audit.archive` le premier jour de chaque mois à 04:00 UTC : les entrées de plus de douze mois entiers partent dans le stockage sous `audit-archives/`, vérifiées, relues et ancrées (`ArchiveAuditEntries`) ; avec `s3` il tourne sauf `JOB_AUDIT_ARCHIVE_ENABLED=false`, avec `local` seulement avec `JOB_AUDIT_ARCHIVE_ENABLED=true`, puisque l'archive supprime les entrées de la base et que le disque du serveur peut ne pas durer |
588
+ | `--audit on` | `src/platform/audit/` : `create-audit.ts` (le journal, le `onDecision` de l'autorisation, les refus des gardes à la frontière remis à la frontière HTTP comme `onGuardRefusal`, le *middleware* avant l'unité de travail, les événements d'intégration abonnés sous le nom de consommateur `audit`), `audited-events.ts` (le registre auquel `generate integration-event` ajoute), `audit.module.ts`, et avec une *stack* HTTP le côté lecture : `audit.permissions.ts` (`audit:trail.read`), puis dans `search-audit-entries/` : `search-audit-entries.query.ts`, son gestionnaire, `search-audit-entries.route.ts` ou `.controller.ts` (`GET /audit/entries` : pages par curseur, filtres `actorId`, `action`, `outcome`, `correlationId`), qui commence par le point d'entrée et prend ce qu'il reçoit et répond dans `audit-entries-parameters.ts`, `audit-entries-filter-of.ts`, `audit-entry-view.ts`, `audit-entry-view-of.ts` et `audit-outcomes.ts`. C'est une capacité de la plateforme, pas un contexte délimité : pas de modèle, une requête protégée sur le port `AuditReader`, bornée par le *tenant* de l'acteur (avec `--tenancy shared-table`, par le *tenant* du travail au moyen de `TenantAuditReader` : le personnel de la plateforme ne lit à travers les *tenants* qu'à l'intérieur de `acrossTenants`). Les refus d'un appelant sans identifiant de connexion ne sont pas enregistrés. Un *job* planifié est audité comme une requête HTTP : origine `schedule`, acteur `system:<context>.<job>`. Avec knex, les deux tables et leurs déclencheurs en ajout seul sont créés par la première migration ; avec drizzle, les tables sont dans `schema.ts` et `npm run db:generate` ajoute les instructions des déclencheurs à la migration qui crée les tables (`npm run db:audit-guard` les affiche pour une migration écrite à la main) ; avec prisma et typeorm, les tables sont des modèles de `prisma/schema/schema.prisma` ou des entités de `schema.ts` (`auditPrismaModels`, `auditEntities` de `@ddd-ts-kit/audit`), écrites par `PrismaAuditTrail` et `TypeOrmAuditTrail`, et `npm run db:generate` (par `ddd-ts-kit prisma-generate` ou `typeorm-generate`) ajoute les instructions des déclencheurs à la migration qui crée les tables, `npm run db:audit-guard` les affichant pour une migration écrite à la main ; les bases de test installent ce garde ; avec `custom` ou sans ORM, le journal est un `InMemoryAuditTrail` derrière un `TODO(platform)`. Les bases de test laissent le schéma d'audit hors de `reset()`. Avec le journal en base et `--storage local` ou `s3`, `audit.module.ts` (ou la composition câblée à la main) enregistre `audit.archive` le premier jour de chaque mois à 04:00 UTC : les entrées de plus de douze mois entiers partent dans le stockage sous `audit-archives/`, vérifiées, relues et ancrées (`ArchiveAuditEntries`) ; avec `s3` il tourne sauf `JOB_AUDIT_ARCHIVE_ENABLED=false`, avec `local` seulement avec `JOB_AUDIT_ARCHIVE_ENABLED=true`, puisque l'archive supprime les entrées de la base et que le disque du serveur peut ne pas durer |
571
589
  | `--event-sourcing on` | enregistré comme `stack.eventSourcing`, `off` sauf demande : `Persistence` gagne `eventSourcing` (`create<Orm>EventSourcing` dans le schéma `event_store`, dont le fichier de schéma déclare les cinq tables ; les stores en mémoire avec `--orm none`), et `src/platform/event-sourcing/` : `create-event-sourcing.ts` (`EventSourcing` : les stores, le `SubjectKeyStore` enveloppé par `auditedSubjectKeys` avec `--audit on`, et le `PersonalDataCipher` par-dessus) et, avec tsyringe, `event-sourcing.module.ts` (lie `EventStore`, `SnapshotStore`, `CheckpointStore`, `SubjectKeyStore` et `PersonalDataCipher`, pour qu'un adaptateur de *repository* *event-sourced* les nomme dans son constructeur ; la `Platform` câblée à la main les porte comme `platform.eventSourcing`) ; `platform-test.module.ts` lie les stores en mémoire, pour qu'une *spec* de gestionnaire d'un agrégat *event-sourced* n'ait besoin d'aucun *fake*. `generate aggregate --event-sourced` est refusé sans lui, avec le `init --force --event-sourcing on` à lancer. Refusé avec `--orm custom` : l'event store du kit tourne sur PostgreSQL par les quatre paquets d'ORM |
572
590
  | `--privacy on` | enregistré comme `stack.privacy`, `on` quand il y a un ORM : `src/platform/privacy/`, avec `data-subject-copies.ts` et `data-subject-exports.ts` (les ports, ou les adaptateurs à la main, des contextes qui étendent `PersonalDataErasure` et `PersonalDataExport`, entre marqueurs ; `generate repository --personal` y liste l'effacement et l'export d'un contexte), `run-erasure.ts` (`runErasure(subject, { operator, correlationId, tenants? })` : un contexte d'exécution d'origine `cli` avec l'opérateur pour acteur, la clé de la personne quand le projet a un event store, puis `eraseDataSubject` du kernel sur les copies, `inEachTenant` avec `--tenancy shared-table`, puis `privacy.data-subject.erased` publié par l'outbox, une fois par *tenant*) et `run-export.ts` (`runExport(subject, { operator, correlationId, tenants? })` : `exportDataSubject` du kernel sur les exports, chacun enveloppé par `auditedPersonalDataExport` avec `--audit on`, `recordsInEachTenant` avec `--tenancy shared-table`, un `PersonalDataExportDocument` daté), et les deux scripts ci-dessous. `docs/privacy/register.md`, le registre des données personnelles que `ddd-ts-kit docs` tient (voir `docs` plus bas). Un projet sans donnée personnelle prend `--privacy off` et ne paie rien. Aucune commande HTTP n'efface encore : les deux scripts sont les points d'entrée |
573
591
  | `--tenancy shared-table` | enregistré comme `stack.tenancy` ; les quatre ORM. Chaque `generate repository` est cloisonné par *tenant* (comme `--tenant-scoped`), au moyen de `tenantTable` et `ownTenantTable` (Knex), de `tenantCondition` et `ownTenantCondition` (Drizzle), de `tenantWhere` et `ownTenantWhere` (Prisma, TypeORM) ; l'outbox garde le *tenant* de chaque événement (`createOutboxTables(knex, { tenant: true })` et le `tenant: true` de `KnexOutboxStore`, `tenantOutboxTable`, le champ `tenantId` du modèle Prisma et le `tenant: true` de `PrismaOutboxStore`, `outboxEntity({ tenant: true })`), si bien que les consommateurs s'exécutent dans ce *tenant* ; `tenancy/scoped-statement` juge les adaptateurs. La sécurité au niveau des lignes, un schéma par *tenant* et une base par *tenant* sont refusés, avec ce qu'il faut câbler à la main ([Multitenance](../../docs/concepts/multitenancy.fr.md)) |
@@ -579,7 +597,7 @@ choix sont enregistrés sous `stack` dans la configuration, `docsUi`, `ci` et `l
579
597
  | `--storage local\|s3` | enregistré comme `stack.storage` : où vit le contenu des fichiers, jamais dans la base de données. `src/platform/config/read-files.ts` et `src/platform/files/open-files.ts`, un par choix : `local`, un répertoire en développement (`FILES_DIRECTORY`, `.data/files`) et les liens signés servis par l'application sous `/files` (`FILES_PUBLIC_URL` et `FILES_SIGNING_SECRET` requises en production) ; `s3`, un bucket de n'importe quel fournisseur du protocole S3 au moyen de `@ddd-ts-kit/s3` (les variables `S3_*`, MinIO dans la stack compose) ; la mémoire du processus dans les tests et les outils, dans les deux cas. Avec `--di tsyringe` : `files/bind-files.ts`, `files/files.module.ts` et `files/staging-uploads.ts` ; en câblage manuel, `files/create-files.ts` ; avec une *stack* HTTP, `files/file-routes.ts`. Ils lient `FileStorage`, `FileKeys`, `FileScanner` et `FileStaging`, enregistrent la purge horaire des fichiers en attente et mettent en attente le fichier que porte une commande avant sa transaction ; `generate file-upload` en a besoin. `--storage none` n'écrit rien de tout cela ([Stockage de fichiers](../../docs/concepts/file-storage.fr.md)) |
580
598
  | `src/platform/events/` | `event-provider.ts` (`bus`, `forConsumer(name)`, `start()`, `close()`), `in-process-events.ts`, et pour `--broker` `create-event-provider.ts` : `RabbitMqEventBus` (`AMQP_URL`), `KafkaEventBus` (`KAFKA_BROKERS`, avec `aggregate-key-of.ts` pour l'ordre par agrégat), `NatsEventBus` (`NATS_URL`) ou `RedisStreamsEventBus` de `@ddd-ts-kit/redis/event-bus` (`REDIS_URL` : Redis, Dragonfly ou Valkey), chacun avec un abonné par contexte consommateur (`forConsumer`), `assertTopology` au démarrage, son adresse validée et un service compose avec un contrôle de santé ; ou `custom-event-bus.ts` avec sa *spec* `eventBusContract`. `start-outbox-relay.ts` avec l'outbox. `--broker redis` avec `--cache redis` fait un seul serveur et un seul service compose, `cache` ; seul, le service s'appelle `streams` |
581
599
  | `src/platform/database/` | `persistence.ts` (`interface Persistence` : unité de travail, magasins de l'outbox et des événements traités du *package* de l'ORM, la poignée de stockage), `open-persistence.ts`, `persistence-over.ts`, `inert-persistence.ts`, la connexion (`connect-to-database.ts`, `create-client.ts` ou `create-data-source.ts`), `schema.ts` (`MESSAGING_SCHEMA`, le schéma de ce que le kit stocke pour l'application), `open-test-database.ts` (PostgreSQL dans le processus, ou le serveur nommé par une URL ; avec Vitest chaque *spec* ouvre une copie du cluster que `test/support/test-database-template.ts`, la mise en place globale de l'exécution, initialise une fois, et y crée ses tables ; avec drizzle depuis `table-statements.ts`, le SQL des tables de `schema.ts`, puisque drizzle-kit écrit des migrations, pas des tables, ses index uniques compris), `persistence.contract.spec.ts` (les stores de l'outbox, des événements traités, des *jobs* et des processus tels que la plateforme les branche, tenus aux contrats de `@ddd-ts-kit/testing` avec ce que la pile active : le *tenant* sous `--tenancy`, l'unité de travail). La classe de stockage qu'un adaptateur de *repository* nomme dans sa liste de dépendances : `database.ts` avec drizzle et prisma (`abstract class Database extends` le type de contexte du *package* de l'ORM), `KnexContext` de `@ddd-ts-kit/knex`, `TypeOrmContext` de `@ddd-ts-kit/typeorm` |
582
- | outillage des migrations | `drizzle.config.ts`, `knexfile.js` et `migrations/00000000000000_initial.js`, `prisma/schema.prisma` et `prisma.config.ts`, ou `data-source.ts` |
600
+ | outillage des migrations | `drizzle.config.ts`, `knexfile.js` et `migrations/00000000000000_initial.js`, `prisma/schema/schema.prisma` (le client, la datasource et les tables de la plateforme ; `generate repository` ajoute le fichier de chaque contexte, `prisma/schema/<context>.prisma`) et `prisma.config.ts`, ou `data-source.ts`. Un projet qui garde le seul `prisma/schema.prisma` des versions antérieures à 0.95 le garde avec son `prisma.config.ts` et son `db:client`, même sous `--force` : `init` n'écrit rien sous `prisma/schema/`, ses notes donnent les étapes du déplacement en nommant les contextes du projet, et `generate repository` refuse jusqu'au déplacement |
583
601
  | `scripts/openapi.ts`, `scripts/events.ts` | écrivent `openapi/openapi.yaml` (un fichier par document de `openapi.documents`), `docs/integration/asyncapi.yaml` et `docs/integration/event-catalog.md`, en JSON sous `openapi.format: json` ; `--check` échoue sur une différence |
584
602
  | `scripts/privacy-erase.ts`, `scripts/privacy-export.ts` | avec `--privacy on`, les deux demandes d'une personne concernée, traitées en ligne de commande sur les sources avec les variables de `.env` (`npm run privacy:erase -- <subject-id> [--operator <qui-demande>]`, `npm run privacy:export -- <subject-id> > export.json`) : l'effacement détruit d'abord la clé de la personne quand le projet a un event store (`--event-sourcing on` : ses événements stockés se lisent effacés ; audité avec `--audit on`), puis efface chaque copie listée dans `src/platform/privacy/data-subject-copies.ts` ; `privacy:purge` lance à la main ce que le *job* `privacy.purge-expired` lance chaque nuit à 03:00 UTC, la purge de ce qui a dépassé sa durée de conservation (`JOB_PRIVACY_PURGE_EXPIRED_ENABLED=false` coupe le *job*) ; l'export rassemble chaque enregistrement listé dans `data-subject-exports.ts` en un document JSON daté (`format`, `subject`, `exportedAt`, `records`), l'export de chaque contexte audité avec `--audit on`, jamais les valeurs (chaque exécution laisse son entrée, un essai compris : essayez-le sur une personne de test). Avec `--tenancy shared-table`, `TENANTS` nomme les tenants, séparés par des virgules : une écriture de données de tenant n'est jamais élargie. Ni l'un ni l'autre n'atteint les sauvegardes, les journaux ou une copie qu'aucun contexte n'a déclarée |
585
603
  | `docker-compose.yml`, `.env.example`, `Dockerfile`, `.dockerignore` | la base de données avec un contrôle de santé et un volume nommé, `jaegertracing/jaeger:2.22.0` derrière le profil `observability` (son interface et son port OTLP liés à 127.0.0.1), les ports depuis `.env` ; une image multi-étapes, sans root, avec les seules dépendances de production |
@@ -598,7 +616,7 @@ choix sont enregistrés sous `stack` dans la configuration, `docsUi`, `ci` et `l
598
616
  | `REVIEW.md` | la politique de revue du projet : les passes d'une revue (bugs, sécurité, conformité face à la revue de conception de la ligne, l'acceptation de la *story*, les enregistrements de `docs/adr/` et les règles), ce qu'Important veut dire, au plus cinq *nits* (un *nit* récurrent devient une ligne de `AGENTS.md` sous `## Mistakes seen here` ou une règle de la configuration), ce qui n'est pas signalé (les fichiers générés, ce que `npm run verify` refuse). Lu par l'agent `architecture-reviewer` par-dessus sa méthode, par un relecteur humain et par tout robot de revue. Écrit une fois, pour que l'équipe le modifie : `--force` le laisse tel quel, `doctor` dit quand il manque |
599
617
  | `.github/copilot/settings.json` | le *plugin* du kit, déclaré pour GitHub Copilot (`extraKnownMarketplaces`, `enabledPlugins`) : son agent cloud l'installe, la CLI Copilot et VS Code le recommandent ; un fichier existant garde ce qu'il contient et reçoit les deux entrées |
600
618
  | `.claude/hooks/production-gate.mjs`, `.claude/hooks/change-reference.mjs` | avec `--agent-profile regulated` : les deux *hooks* du profil, enregistrés sous `hooks.PreToolUse` de `.claude/settings.json`, écrits une fois pour que l'équipe les modifie (`--force` les réécrit). La porte bloque une commande qui nomme l'environnement de production avec une action de mise en production sauf si `RELEASE_APPROVAL` nomme un approbateur et un changement ; la référence demande avant une modification d'une migration ou des conteneurs, pour le *trailer* `Change: <id>` du *commit* ([Mettre les agents de code en bac à sable](../../docs/guides/agent-sandbox.fr.md#le-profil-réglementé)) |
601
- | `.claude/settings.json` | des permissions (et, avec `--agent-profile regulated`, le bloc de bac à sable ci-dessous) : les vérifications et les générateurs s'exécutent sans demander, les fichiers `.env` sont illisibles (`.env.example` reste lisible), les trois documents générés ne sont pas modifiés à la main, `git push`, `npm publish` et toute modification des fichiers qui portent les règles et le *pipeline* (`ddd-ts-kit.config.json`, `REVIEW.md`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`, `.github/copilot/settings.json`) demandent d'abord, comme une modification de ce qui atteint la production autrement que par le code : les migrations de l'ORM (`migrations/**` avec drizzle, knex et typeorm, `prisma/migrations/**` avec prisma, rien avec une persistance *custom* ou sans ORM), `Dockerfile`, `docker-compose.yml` et `docker/**`. Le fichier compose lit `.env` à la racine, que la liste de refus couvre déjà ; rien sous `docker/` ne porte de secret |
619
+ | `.claude/settings.json` | des permissions (et, avec `--agent-profile regulated`, le bloc de bac à sable ci-dessous) : les vérifications et les générateurs s'exécutent sans demander, les fichiers `.env` sont illisibles (`.env.example` reste lisible), `git push`, `npm publish` et toute modification des fichiers qui portent les règles et le *pipeline* (`ddd-ts-kit.config.json`, `REVIEW.md`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`, `.github/copilot/settings.json`) demandent d'abord, comme une modification des contrats générés et du verrou d'une acceptation (`openapi/**`, `docs/integration/asyncapi.*`, `docs/integration/event-catalog.md`, `test/acceptance/*.acceptance.lock.json` : une règle `ask`, puisque le bac à sable de Claude Code mettrait un chemin refusé en lecture seule pour `docs:generate` et `acceptance --lock` aussi ; la garde du plugin en refuse la modification à la main) et de ce qui atteint la production autrement que par le code : les migrations de l'ORM (`migrations/**` avec drizzle, knex et typeorm, `prisma/migrations/**` avec prisma, rien avec une persistance *custom* ou sans ORM), `Dockerfile`, `docker-compose.yml` et `docker/**`. Le fichier compose lit `.env` à la racine, que la liste de refus couvre déjà ; rien sous `docker/` ne porte de secret |
602
620
  | `.gitignore` | `node_modules`, `dist`, `coverage`, `.env`, `*.tsbuildinfo`, `.ddd-ts-kit/`, où écrit `worker-scope`, et `.worktrees/`, où vivent les *worktrees* |
603
621
 
604
622
  `--ci both` écrit les deux *pipelines*, `--ci none` aucun (et pas de `renovate.json`). Les
@@ -609,11 +627,19 @@ emplacements à remplacer documentés.
609
627
  `--agent-profile regulated` enregistre `agents.profile` dans la configuration, avec ou sans
610
628
  `--force` (`--agent-profile none` le retire), et écrit le bloc `sandbox` de Claude Code à côté des
611
629
  permissions : activé, échouant quand le bac à sable est indisponible, aucune nouvelle tentative
612
- hors bac à sable, le registre npm et l'hôte git du projet (lu dans `repository` de
613
- `package.json`, sinon dans le *remote* `origin`) comme seuls hôtes, les fichiers d'identifiants
630
+ hors bac à sable, les caches qu'écrit l'installation de la pile comme seuls chemins hors du
631
+ projet et du répertoire temporaire (`~/.npm`, ou le *store* et le cache de pnpm, et `~/.cache/prisma` avec Prisma), le
632
+ registre npm, l'hôte git du projet (lu dans `repository` de `package.json`, sinon dans le
633
+ *remote* `origin`) et les hôtes d'où téléchargent les scripts d'installation de la pile
634
+ (`binaries.prisma.sh` avec Prisma, `github.com` et `release-assets.githubusercontent.com` avec le
635
+ client Kafka) comme seuls hôtes, les fichiers d'identifiants
614
636
  (`~/.ssh`, `~/.aws`, `~/.config/gcloud`, `~/.azure`) et les variables secrètes usuelles refusés à
615
- chaque commande en bac à sable ; une clé que le projet avait déjà posée est gardée. Elle affiche
616
- aussi, en note, le bloc de réglages gérés qu'un fichier de projet ne peut pas poser
637
+ chaque commande en bac à sable ; une clé que le projet avait déjà posée est gardée, et une liste
638
+ qu'il porte gagne les entrées dont la pile a besoin. Elle affiche aussi, en note, que le
639
+ propriétaire lance la première installation hors de l'agent (un chemin absent au démarrage d'une
640
+ session y reste en lecture seule) puis épingle les scripts d'installation de la pile sur les
641
+ versions relues (`npm install-scripts approve <package>...`, ou `'<package>@<version>': true` dans
642
+ `allowBuilds` sous pnpm), une montée de version de l'un d'eux demandant la même chose, et le bloc de réglages gérés qu'un fichier de projet ne peut pas poser
617
643
  (`allowManagedHooksOnly`, `allowManagedPermissionRulesOnly`,
618
644
  `permissions.disableBypassPermissionsMode`, `strictKnownMarketplaces` avec la *marketplace* du
619
645
  kit, `requiredMinimumVersion`), pour que l'équipe plateforme le colle, et écrit les deux *hooks*
@@ -646,7 +672,10 @@ appellent par son chemin (`node node_modules/@typescript/native/bin/tsc`). `npx
646
672
  l'ancien.
647
673
 
648
674
  `init` et `generate context` commencent par le langage : la première entrée de `next` est le
649
- glossaire du contexte à remplir.
675
+ glossaire du contexte à remplir. Tous deux refusent un contexte nommé `schema`, quel que soit
676
+ l'ORM : sous Prisma les modèles d'un contexte vivent dans `prisma/schema/<context>.prisma`, et
677
+ `prisma/schema/schema.prisma` est le fichier principal que tous les contextes partagent (un projet
678
+ passe à Prisma par `init --force`).
650
679
 
651
680
  ### Presets
652
681
 
@@ -668,7 +697,8 @@ vérifiée ne provisionne aucun compte. Sur `init` sans `--context` de son nom,
668
697
  quoi que dise `--authz` : l'attribution `'identity:*'` de `platform/auth/authorization/signed-in-grants.ts`,
669
698
  à laquelle répond `SignedInGrantsAuthorizer` avant le modèle dans `createAuthorizer`. Avec des
670
699
  *tenants*, les tables du contexte n'appartiennent à aucun, sous un enregistrement de décision que
671
- le *preset* écrit, et avec `--authn keycloak` l'authentificateur lit le *claim* `organization`
700
+ le *preset* écrit et la déclaration du contexte comme plan de contrôle des *tenants*
701
+ (`contexts.<name>.tenancy`, aucune désactivation dans ses adaptateurs), et avec `--authn keycloak` l'authentificateur lit le *claim* `organization`
672
702
  comme les *tenants* de la personne (un autre authentificateur reçoit une étape suivante qui dit
673
703
  quoi faire correspondre). Le *preset* est écrit pour `declared` avec les dépendances `signature`,
674
704
  `factories`, les objets-valeurs `throwing`, les routes `controllers` ou `nest` (des contrôleurs Nest, lus dans leurs signatures, sur un projet Nest), Knex ou Drizzle sur PostgreSQL, Zod ou
@@ -754,7 +784,7 @@ Next, in this order: the language of the context first, then the business decisi
754
784
  | `e2e` | `<context> <UseCaseName> [--event <eventType>]` | `test/e2e/<use-case>.e2e.spec.ts` qui pilote la route du cas d'usage : 401 sans identifiant de connexion, 403 sans la permission, le statut documenté avec elle ; pour une commande, un test de plus vérifie la trace de la requête HTTP, exacte sur les noms et la structure, avec `installTestTracing()` et `expectSpanTree(storyOf(trace), [...])` de `@ddd-ts-kit/tracing/testing` (`POST /invoices`, puis `command IssueInvoiceCommand`, puis `repository InvoiceRepository.save`). Un cas d'usage qu'aucune route n'atteint, lancé par un gestionnaire d'événement d'intégration du contexte, reçoit une spec qui publie l'événement de l'amont, construit depuis sa déclaration, avec `application.publish([event])`, attend `application.settled()` et laisse des `it.todo` pour ce qu'un client observe (les routes `GET` du contexte, ou les événements qu'il publie, avec `collectEvents`) ; le gestionnaire qui envoie `<UseCase>Command` est cherché dans `application/integration/handlers/`, et `--event billing.invoice.issued` nomme l'événement quand des gestionnaires de plusieurs l'envoient, ou quand le gestionnaire ne l'envoie pas encore. Demande la route, ou ce gestionnaire |
755
785
  | `policy` | `<context> <Name> --permission <aggregate>.<action>` | `application/authorization/<name>.policy.ts`, *spec* ; déclaré : la classe porte `@Policy(permission, { name })` et rien d'autre n'est écrit ; explicite : l'enregistrement dans `platform/auth/authorization/access-policies.ts` |
756
786
  | `gateway` | `<context> <upstreamContext> <Name>` | le contrat de lecture dans le langage publié de l'amont (`<name>.contract.ts`, une classe abstraite et le jeton de la valeur de l'amont), le port `application/ports/<name>-gateway.port.ts`, un adaptateur dans le processus dans `infrastructure/external/` lié `.as('gateway')`, un *fake*, une suite de contrat ; refusé sauf si l'amont est déclaré |
757
- | `adapter` | `<context> <Port> [--kind external\|gateway] [--decorators]` | `infrastructure/external/remote-<port>.adapter.ts` pour un port existant, sa *spec*, et sur tsyringe sa liaison `builder.bind(<Port>).toClass(Remote<Port>).as(<kind>).with(ownPolicy(retry(...), timeout(...)))` ; avec `--decorators`, sur toute *stack*, la classe porte `@Retry` et `@Timeout` de `@ddd-ts-kit/aspects/decorators` sur son unique méthode sortante et est liée `.with(ownPolicy())`. Explicite : un port déjà lié, ou le câblage manuel, reçoit une note au lieu d'une liaison. Déclaré : la classe porte `@Adapter(<Port>, { kind, aspects })`, ou `@Gateway(<Port>, { aspects })` dans `remote-<port>.gateway.ts` avec `--kind gateway`, et un port qui a déjà un adaptateur déclaré est refusé |
787
+ | `adapter` | `<context> <Port> [--kind external\|gateway\|simulated] [--decorators]` | `infrastructure/external/remote-<port>.adapter.ts` pour un port existant, sa *spec*, et sur tsyringe sa liaison `builder.bind(<Port>).toClass(Remote<Port>).as(<kind>).with(ownPolicy(retry(...), timeout(...)))` ; avec `--decorators`, sur toute *stack*, la classe porte `@Retry` et `@Timeout` de `@ddd-ts-kit/aspects/decorators` sur son unique méthode sortante et est liée `.with(ownPolicy())`. Explicite : un port déjà lié, ou le câblage manuel, reçoit une note au lieu d'une liaison. Déclaré : la classe porte `@Adapter(<Port>, { kind, aspects })`, ou `@Gateway(<Port>, { aspects })` dans `remote-<port>.gateway.ts` avec `--kind gateway`, et un port qui a déjà un adaptateur déclaré est refusé. Avec `--kind simulated` : `infrastructure/external/simulated-<port>.adapter.ts` et sa *spec*, une classe du code de production qui répond dans la mémoire du processus comme le système extérieur répondrait, pour un environnement dont le fournisseur est simulé ; elle ne porte aucune politique (`--decorators` est refusé), est déclarée `@Adapter(<Port>, { kind: 'external' })` ou liée `.toClass(Simulated<Port>).as('external')`, et alterne avec l'adaptateur distant, un par port |
758
788
  | `service` | `<context>` | `src/apps/<context>/main.ts` (kernel, plateforme, ce contexte seul, avec ses *jobs* : `jobSettings(process.env, '<context>')`), le script `start:<context>`, un service compose derrière le profil `services`, l'entrée knip, `deployable: true` dans la configuration. Le Dockerfile prend le point d'entrée comme argument de build `ENTRY` |
759
789
  | `worker` | aucun | `src/apps/worker/main.ts` : les modules de `main.ts`, pas de serveur HTTP, pas de relais de l'outbox, les *jobs* démarrés quoi que dise `RUN_JOBS`, un arrêt propre ; le script `start:worker`, un service compose `worker` derrière le profil `services`, l'entrée knip, `"worker": true` dans la configuration, et `RUN_JOBS` qui vaut `false` par défaut à partir de là, si bien que l'API cesse d'exécuter les *jobs* qu'exécute le *worker*. Avec plusieurs instances, le verrou doit être un vrai verrou : `--cache redis` lie le verrou Redis, et sans lui le README généré dit la limite. Un contexte nommé `worker` est refusé |
760
790
  | `adr` | `"<title>" [--deviation <what>] [--reason "<why>"]` | `docs/adr/NNNN-<slug>.md` ; avec `--deviation`, l'entrée `deviations` de la configuration qui pointe vers lui |
@@ -871,7 +901,9 @@ Next, in this order: the language of the context first, then the business decisi
871
901
  du pluriel, du participe passé et en -ing sont reconnues). `--term "<Term>=<meaning>"`,
872
902
  répétable, ajoute les lignes dans la même commande. Les mots techniques (`Manager`, `Helper`,
873
903
  `Data`, `Impl`, `Model`...) et un fait d'événement qui ne se lit pas au passé sont refusés eux
874
- aussi. `--allow-name` passe outre les trois vérifications ; `check` signalera tout de même ce
904
+ aussi ; un mot technique passe quand un terme du glossaire le tient
905
+ (`--term "Scoring model=<meaning>"` laisse passer `ScoringModel`), parce que le langage du
906
+ métier l'emporte. `--allow-name` passe outre les trois vérifications ; `check` signalera tout de même ce
875
907
  que le glossaire ne définit pas.
876
908
  - Le code généré compile tel quel et passe `check`, le preset ESLint, dependency-cruiser et knip
877
909
  aux sévérités par défaut : un export par fichier, des fichiers bien en dessous de 350 lignes,
@@ -1320,8 +1352,26 @@ porte.
1320
1352
  Un cycle dans `Depends on`, une dépendance vers un identifiant qu'aucune ligne ne porte, une ligne
1321
1353
  sans responsable et un identifiant que portent deux lignes rendent les lignes impossibles à
1322
1354
  ordonner : ils sont signalés seuls, sans vagues, et la commande sort avec 1. Un fichier sans table
1323
- de tranches, ou un contexte qu'aucune ligne ne nomme, est refusé. `--json` affiche
1324
- `{ file, context, problems: [{ kind, rows, message }], waves: [{ wave, batches: [{ id, owner, context, rows: [{ id, kind, slice, status, story, waitingFor, waitingForRows: [{ id, context, story, status }] }], aggregates, brief, sameFiles, unknownOverlap }] }], mergeOrder, otherStories: [{ id, context, story, kind, slice, owner, status, batch, waitedForBy }] }`,
1355
+ de tranches, ou un contexte qu'aucune ligne ne nomme, est refusé.
1356
+
1357
+ Une fois les lignes ordonnables, les commandes de génération de leurs cellules `Start with` (entre
1358
+ accents graves, `generate ...` ou `npx ddd-ts-kit generate ...`) sont rejouées dans une copie du
1359
+ projet (les fichiers que git voit ; le projet reste tel quel), dans l'ordre des vagues, pour
1360
+ qu'une commande trouve ce que génèrent les lignes d'avant. Le générateur dit lui-même quels noms
1361
+ introduit chaque commande (le cas d'usage, l'agrégat et le fait d'un événement, un `--name`, les
1362
+ mots d'une `--permission`, ...), et chacun est jugé comme le générateur le juge, contre le
1363
+ glossaire de son contexte tel qu'il est, plus les `--term` de la ligne et des lignes qu'elle
1364
+ attend, directement ou non : un terme qu'ajoute une ligne qu'elle n'attend pas ne compte pas, car
1365
+ cette ligne peut ne pas être fusionnée quand celle-ci se construit. Chaque mot que le glossaire ne
1366
+ définit pas (`undefined-word`) et chaque mot technique qu'aucun terme ne porte (`technical-word`)
1367
+ est signalé une fois par ligne, avec le `--term` à ajouter, sans vagues, et la commande sort avec
1368
+ 1 : un worker qui suivrait cette ligne telle qu'écrite serait refusé. Les commandes que le
1369
+ générateur a refusées pour une autre raison (un `--module` manquant, un agrégat qu'aucune ligne ne
1370
+ génère, un amont non déclaré, un handler écrit à la main dont un spec de bout en bout a besoin)
1371
+ sont listées après les vagues sous `Refused for another reason than a word when the plan was
1372
+ replayed`, sans échec : les noms qu'elles introduiraient après ce refus ne sont pas jugés. Le rejeu
1373
+ coûte environ un dixième de seconde par commande. `--json` affiche
1374
+ `{ file, context, problems: [{ kind, rows, message }], waves: [{ wave, batches: [{ id, owner, context, rows: [{ id, kind, slice, status, story, waitingFor, waitingForRows: [{ id, context, story, status }] }], aggregates, brief, sameFiles, unknownOverlap }] }], mergeOrder, otherStories: [{ id, context, story, kind, slice, owner, status, batch, waitedForBy }], notReplayed: [{ row, command, refusal }] }`,
1325
1375
  `story` valant `null` pour une ligne dont l'identifiant n'en nomme aucune, et `batch` `null` pour
1326
1376
  une ligne que le contexte demandé ne montre pas.
1327
1377
 
@@ -1643,15 +1693,27 @@ manque au projet tant que le parent épingle encore le paquet sous le correctif
1643
1693
  version corrigée est `no longer needed`, à retirer, car il retiendrait le paquet quand une majeure
1644
1694
  suivante sera demandée. Une chaîne qui n'est pas installée n'est pas jugée.
1645
1695
 
1696
+ Et chaque script d'installation dont la pile a besoin, les moteurs de Prisma (`@prisma/engines`) et
1697
+ le client Kafka (`@confluentinc/kafka-javascript`), jugé sur la version installée face à
1698
+ `allowScripts` de `package.json` sous npm ou à `allowBuilds` de `pnpm-workspace.yaml` sous pnpm,
1699
+ lus comme npm les lit (le nom seul, `name@*`, ou des versions exactes jointes par `||` ; un refus
1700
+ l'emporte) : aucune entrée donne `missing`, et `init` ajoute le nom ; des entrées épinglées sur
1701
+ d'autres versions seulement, l'épingle qu'une montée de version a laissée, donnent `other
1702
+ version`, avec `npm install-scripts approve <package>` puis `npm rebuild <package>` (sous pnpm, la
1703
+ version écrite dans `allowBuilds`, puis `pnpm rebuild <package>`) une fois le nouveau script lu ; un
1704
+ refus donne `written otherwise`. Un paquet qui n'est pas installé n'est pas jugé.
1705
+
1646
1706
  `--strict` sort avec 1 tant que quelque chose manque ou est à une autre plage, ou tant que le
1647
1707
  *checkout* ne peut pas faire tourner le projet : un Node hors d'`engines.node`, pas de
1648
1708
  `node_modules`, un paquet du kit non installé ou à une autre version, un sous-module non
1649
1709
  initialisé, un *override* qui manque. Un script écrit autrement, un *hook* que ce clone n'a pas
1650
1710
  installé, un Node que `.nvmrc` ne nomme pas quand `engines.node` l'accepte, un *lockfile* modifié
1651
- depuis l'installation (un *checkout* peut le réécrire avec ce que `node_modules` contient déjà), et
1652
- un *override* qui n'est plus nécessaire sont signalés sans le faire échouer. `--json` affiche `{ version, findings: [{ area, name, problem,
1711
+ depuis l'installation (un *checkout* peut le réécrire avec ce que `node_modules` contient déjà), un
1712
+ *override* qui n'est plus nécessaire et un script d'installation refusé (l'équipe peut construire le
1713
+ paquet autrement) sont signalés sans le faire échouer ; un script d'installation qui manque ou
1714
+ épinglé sur une autre version le fait échouer. `--json` affiche `{ version, findings: [{ area, name, problem,
1653
1715
  expected, found }] }`, `area` valant `script`, `package`, `permission`, `hook`, `guidance`,
1654
- `node`, `install`, `submodule` ou `override`.
1716
+ `node`, `install`, `submodule`, `override` ou `install-script`.
1655
1717
 
1656
1718
  ## worker-scope
1657
1719
 
@@ -2194,7 +2256,7 @@ règle.
2194
2256
  | `events/defined-in-published-language` | `defineIntegrationEvent` hors d'un langage publié, sans charge utile, deux fois pour une même version ; un événement décrit à la main |
2195
2257
  | `language/glossary-term` | une classe du modèle nommée avec un mot que le glossaire de son contexte ne définit pas ; un glossaire vide ; sous `"stack.refusals": "factories"` ou `"named"`, une classe de `domain/errors/` aussi, une classe de refus de `named` ayant droit en plus aux qualificatifs `invalid`, `unknown`, `already`, `too`, `no`, `missing` et `required` (`<context>.codes.ts` n'est pas jugé) |
2196
2258
  | `language/declared-vocabulary` | une chaîne littérale dont la valeur est une valeur d'un vocabulaire fermé que le projet déclare (un objet `as const` exporté avec le type union de son nom, un ensemble de permissions de `definePermissions`), hors du fichier qui le déclare, à l'endroit qui parle son langage (son contexte ; la plateforme et les groupes de routes pour la plateforme ; partout pour un identifiant de permission ou le noyau partagé) ; les tests, les langages publiés et le schéma de relations ne sont pas jugés, ni, hors de `domain/`, un mot typé par un autre langage (une clé d'un `Record<T, ..>`, une valeur d'un `Record<.., T>`, `'x' satisfies T`, `T` un type d'un langage publié, d'un paquet ou de `infrastructure/anti-corruption/` ou `infrastructure/external/`) ; sous `"stack.literals": "named"` |
2197
- | `language/no-technical-name` | `Manager`, `Helper`, `Util`, `Utils`, `Data`, `Info`, `Processor`, `Wrapper`, `Impl`, `Base`, `Abstract`, `Dto`, `Entity`, `Model` dans un type déclaré sous `domain/` ou dans un dossier de cas d'usage |
2259
+ | `language/no-technical-name` | `Manager`, `Helper`, `Util`, `Utils`, `Data`, `Info`, `Processor`, `Wrapper`, `Impl`, `Base`, `Abstract`, `Dto`, `Entity`, `Model` dans un type déclaré sous `domain/` ou dans un dossier de cas d'usage, sauf quand un terme du glossaire du contexte tient le mot (`Scoring model` tient `ScoringModel`) |
2198
2260
  | `purity/no-system-clock` | `new Date()` sans argument, `Date.now()`, `performance.now()` dans `domain/` ou `application/` |
2199
2261
  | `purity/no-ambient-randomness` | `Math.random`, la source aléatoire de `crypto`, une bibliothèque d'identifiants |
2200
2262
  | `purity/no-environment` | `process.env` et apparentés, `console`, `fetch`, les modules de système de fichiers et de réseau |
@@ -2230,7 +2292,7 @@ règle.
2230
2292
  | `tracing/platform-only` | un import de `@ddd-ts-kit/tracing` ou d'un *package* `@opentelemetry/*` hors du répertoire de la plateforme, de `main.ts` et de `apps/`, tests compris |
2231
2293
  | `nest/no-parallel-pipeline` | dans `presentation/`, `infrastructure/` ou le fichier de module d'un contexte, tests à part : un import d'un contrôleur que Nest sert (ses décorateurs de route et de paramètres, sauf si le fichier importe `KitRoute` ou `KitRoutes` de `@ddd-ts-kit/http/nest`), de la requête ou de la réponse brutes, d'un *guard*, d'un *pipe*, d'un filtre d'exceptions ou d'une `HttpException`, d'un intercepteur ou du `Logger` de `@nestjs/common`, un import sans nom de celui-ci, ou un import d'un *package* de Nest dont le kit fait le travail (`@nestjs/core`, `@nestjs/swagger`, `@nestjs/cqrs`, `@nestjs/passport`, `@nestjs/config`, `@nestjs/schedule` et les autres de la section 3 d'ARCHITECTURE.md) ; le message dit ce que le kit fait à sa place ; sous la racine des sources hors des contextes, tests à part : un fichier qui importe `Controller` de `@nestjs/common`, ni `KitRoute` ni `KitRoutes`, et nomme `CommandBus` ou `QueryBus` ou importe un fichier d'un contexte |
2232
2294
  | `nest/controllers-current` | avec `"stack.routes": "nest"` : un `<context>.controllers.ts` qui diffère de ce que donnent les contrôleurs Nest du contexte et les signatures de leurs méthodes, ou absent ; une partie de la requête prise entière par aucune classe DTO et que `request` de `@KitRoute` ne donne pas ; une méthode de route qui ne répond ni une classe DTO, ni `Accepted`, ni `void`, et ne déclare pas de `response` dans `@KitRoute` |
2233
- | `tenancy/scoped-statement` | avec `stack.tenancy` autre que `none`, dans `infrastructure/` d'un contexte, tests mis à part : sur Knex, l'exécuteur utilisé autrement que comme argument (`executor()(`, `executor().from(`, `executor().raw(`, `const db = ...executor();`) et tout `.raw(` ; sur Drizzle, instruction par instruction, une lecture, une mise à jour ou une suppression sur l'exécuteur dont le where n'a ni `tenantCondition(` ni `ownTenantCondition(` (en ligne ou dans la variable locale qu'il reçoit), une insertion dont la ligne n'a pas de `tenantScopeOf(`, une requête relationnelle (`executor().query`), un `execute(` brut, ou l'exécuteur gardé dans une variable ; sur Prisma, instruction par instruction sur le client, une lecture (`findFirst(`, `findMany(`, `count(`, `aggregate(`, `groupBy(`) dont le where ne décompose pas `tenantWhere(`, une mise à jour ou une suppression dont le where ne décompose pas `ownTenantWhere(`, une création dont les données ne décomposent pas `tenantScopeOf(` (en ligne ou dans une variable locale que les arguments nomment), `findUnique(`, `upsert(`, une requête brute (`$queryRaw`, `$executeRaw`), ou le client gardé dans une variable ; sur TypeORM, la même chose sur le *manager* (`find*(`, `count*(`, `update(`, `delete(`, `insert(`, la ligne confiée à `insertIgnoringConflict(`, un *query builder* dont le where ne porte aucune condition, `save(`, `upsert(`, `query(`) ; sur les quatre, un magasin de modèle de lecture construit sans son option `tenant`. Un where construit par une autre fonction n'est pas suivi |
2295
+ | `tenancy/scoped-statement` | avec `stack.tenancy` autre que `none`, dans `infrastructure/` d'un contexte, tests et contexte dont `tenancy` vaut `control-plane` mis à part : sur Knex, l'exécuteur utilisé autrement que comme argument (`executor()(`, `executor().from(`, `executor().raw(`, `const db = ...executor();`) et tout `.raw(` ; sur Drizzle, instruction par instruction, une lecture, une mise à jour ou une suppression sur l'exécuteur dont le where n'a ni `tenantCondition(` ni `ownTenantCondition(` (en ligne ou dans la variable locale qu'il reçoit), une insertion dont la ligne n'a pas de `tenantScopeOf(`, une requête relationnelle (`executor().query`), un `execute(` brut, ou l'exécuteur gardé dans une variable ; sur Prisma, instruction par instruction sur le client, une lecture (`findFirst(`, `findMany(`, `count(`, `aggregate(`, `groupBy(`) dont le where ne décompose pas `tenantWhere(`, une mise à jour ou une suppression dont le where ne décompose pas `ownTenantWhere(`, une création dont les données ne décomposent pas `tenantScopeOf(` (en ligne ou dans une variable locale que les arguments nomment), `findUnique(`, `upsert(`, une requête brute (`$queryRaw`, `$executeRaw`), ou le client gardé dans une variable ; sur TypeORM, la même chose sur le *manager* (`find*(`, `count*(`, `update(`, `delete(`, `insert(`, la ligne confiée à `insertIgnoringConflict(`, un *query builder* dont le where ne porte aucune condition, `save(`, `upsert(`, `query(`) ; sur les quatre, un magasin de modèle de lecture construit sans son option `tenant`. Un where construit par une autre fonction n'est pas suivi |
2234
2296
  | `standard/no-parallel-interface` | une classe, une interface ou un alias de type déclaré comme `ILogger`, `AppLogger`, `LoggerService`, `LoggerInterface`, `IMetrics`, `MetricsService`, `ICache`, `CacheService`, `UserContext`, `CurrentUser`, `AuthContext`, `RequestContext` (hors de `presentation/` et de la plateforme), `UserSession`, `AuthSession`, `SessionData`, `PaginatedResult`, `PageResult`, `PaginatedResponse`, `Paginated`, `PaginationParams`, `PageParams`, `AuditLog`, `AuditLogEntry`, `AuditRecord`, `IJobScheduler`, `JobSchedulerService`, `CronScheduler`, `TaskScheduler`, `IScheduledJob`, `CronJob`, `ScheduledTask`, `BackgroundJob`, `IErrorReporter`, `ErrorReporterService`, `ErrorTracker`, `ExceptionReporter`, `CrashReporter`, `CacheInvalidator`, `CacheInvalidationService`, `CachePurgeService`, `CdnPurger`, `I` suivi d'un nom standard (`IClock`, `IIdGenerator`, `IUnitOfWork`, `ISession`, ...) ou un nom de `standardInterfaces` ; une classe qui implémente ou étend l'interface standard est un adaptateur et n'est pas signalée |
2235
2297
  | `events/outbox-required` | `stack.events` autre que `outbox` avec un ORM et sans dérogation `stack.events` ; dans `domain/` et `application/`, l'import d'un client de *broker* ou d'une implémentation de bus ou de relais ; un *publisher* qui dépend de plus que `IntegrationEventPublisher` ; un module de la plateforme qui distribue un *publisher* et ne nomme jamais `OutboxPublisher` |
2236
2298
  | `events/consumer-idempotent` | une classe de gestionnaire d'événement d'intégration (`application/integration/handlers/*.integration-handler.ts`) qui ne porte pas `@IntegrationEventHandler` et n'est pas non plus enregistrée dans son fichier de module sous un nom de consommateur ; un `@IntegrationEventHandler` dont le `consumer` n'est pas une chaîne littérale non vide ; un `on(` ou un `consume(` libre sans `processed` ; un nom de consommateur utilisé deux fois, dans les déclarations comme dans les enregistrements |
@@ -2242,7 +2304,7 @@ règle.
2242
2304
  | `event-sourcing/projection-never-appends` | dans `application/projections/` ou un fichier qui déclare `@Projection`, `EventStore` ou `EventSourcedRepository` importé ; dans une projection déclarée `{ feed: 'event-store' }`, tout ce qui vient de `domain/repositories/` aussi |
2243
2305
  | `event-sourcing/upcaster-required` | un `defineStoredEvent` dont `encode` ne nomme aucun type, ou un type non déclaré dans le fichier, ou un type qu'il atteint et que le fichier ne déclare pas ; une version au-dessus de 1 sans *upcaster* depuis chaque version inférieure ; une version en dessous de la dernière enregistrée dans `stored-events.lock.json`, ou une version enregistrée dont la forme a changé. `ddd-ts-kit docs --stored-events` enregistre les nouvelles versions et n'en réécrit jamais une ; `docs --check` échoue tant qu'une version déclarée n'est pas enregistrée |
2244
2306
  | `context/extractable` | un fichier de module qui importe un autre contexte hors de son langage publié ; une persistance qui importe l'infrastructure d'un autre contexte ou nomme son schéma ; un gestionnaire qui importe le *repository* d'un autre contexte ; `export let` ou un `new Map`, `Set`, `WeakMap` exporté au niveau du module ; `deployable: true` sans `apps/<context>/main.ts` ; dans le style déclaré, un fichier de rôle qui importe quoi que ce soit d'un fichier de port d'un autre contexte |
2245
- | `governance/recorded-deviation` | un commentaire `ddd-ts-kit-disable` ou `eslint-disable` dont la raison ne nomme aucun `ADR-<number>` avec un fichier `docs/adr/<number>-*.md` ; une règle mise à `off` (ou à `warn` en dessous de sa valeur par défaut), un répertoire supplémentaire, un *package* autorisé supplémentaire, un `guard` autre que `enforce` ou `stack.events` hors de l'outbox, sans entrée `deviations` `{ what, adr, reason }` qui pointe vers un enregistrement existant |
2307
+ | `governance/recorded-deviation` | un commentaire `ddd-ts-kit-disable` ou `eslint-disable` dont la raison ne nomme aucun `ADR-<number>` avec un fichier `docs/adr/<number>-*.md` ; une règle mise à `off` (ou à `warn` en dessous de sa valeur par défaut), un répertoire supplémentaire, un contexte dont `tenancy` vaut `control-plane`, un *package* autorisé supplémentaire, un `guard` autre que `enforce` ou `stack.events` hors de l'outbox, sans entrée `deviations` `{ what, adr, reason }` qui pointe vers un enregistrement existant |
2246
2308
  | `declarations/role-declared` | style déclaré seulement : un fichier de rôle (autre que `*.command.ts` et `*.query.ts`, tenus par `authz/declared` ; `*.job.ts` sous `application/scheduling/` avec `@Scheduled` et `*.publisher.ts` avec `@DomainEventHandler` sont des rôles) qui n'exporte aucune classe portant le décorateur de son suffixe et de son dossier, ou une classe qui en porte une autre ; une classe déclarée dans un fichier qui n'est pas un fichier de rôle ; une option `consumer` ou `name` manquante, vide, une variable, une concaténation ou un template literal avec une substitution ; tout décorateur de déclaration sur une classe sous `domain/` |
2247
2309
  | `declarations/barrel-current` | style déclaré seulement : avec `stack.assembly: barrel`, un `<layer>.declarations.ts` d'une couche manquant ou qui diffère d'un `export *` par fichier de rôle de la couche trié par chemin, suivi d'un `injected(Class, [Tokens])` par classe de la couche dont le constructeur reçoit quelque chose (lu depuis les signatures, avec leurs imports), un `<context>.declarations.ts` manquant ou qui diffère d'un `export *` par tel fichier trié par chemin, et les déclarations d'une couche qui ne contient plus aucun fichier de rôle ; avec `discovery`, des déclarations générées qui existent encore, et un `<context>.dependencies.ts` qui diffère de ces instructions `injected` (son absence est acceptée tant qu'il n'en contiendrait aucune). Le message nomme le fichier de rôle manquant ou la classe dont la liste est périmée. Un contexte encore déclaré comme l'écrivait une version antérieure, exactement tel que l'écrirait cette version (le fichier unique `<context>.declarations.ts` de 0.84, ou un `<folder>.declarations.ts` par dossier de rôle comme l'écrivaient 0.85 et 0.86), est un avertissement dans cette version (`docs --check` passe et l'affiche, `docs` le déplace) et une erreur dans une version mineure ultérieure. Elle a besoin de l'arbre, c'est pourquoi `check-file` ne l'exécute pas |
2248
2310
  | `declarations/constructor-injection` | style déclaré seulement, dans un fichier de rôle : sur une classe dont le décorateur ne liste rien, un paramètre de constructeur optionnel, qui a une valeur par défaut, est un paramètre du reste ou est déstructuré, n'a pas de type, ou est typé par autre chose qu'un nom de classe (arguments de type mis à part) : une union, une intersection, un tableau, un nom qualifié, un type du langage, une interface, un alias de type, une enum ou une classe non exportée du fichier ou du fichier du projet d'où elle est importée ; une classe qui hérite son constructeur d'une classe que le projet ne sait pas lire. Sous `stack.dependencies: signature`, un décorateur qui porte une liste alors que le constructeur peut être lu : une liste qui le répète, une qui en diffère |