@dialecte/core 0.8.0 → 0.9.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 (295) hide show
  1. package/dist/assets/hub.worker-35vzG0HK.js +2 -0
  2. package/dist/dialecte/create-dialecte-project.d.ts +1 -2
  3. package/dist/dialecte/create-dialecte-project.d.ts.map +1 -1
  4. package/dist/dialecte/create-project-factory.d.ts +5 -5
  5. package/dist/dialecte/create-project-factory.d.ts.map +1 -1
  6. package/dist/dialecte/define-dialecte.d.ts +2 -2
  7. package/dist/dialecte/dialecte.types.d.ts +11 -23
  8. package/dist/dialecte/dialecte.types.d.ts.map +1 -1
  9. package/dist/{dialecte-gIPrRzni.js → dialecte-oAXwOG-Q.js} +1182 -1203
  10. package/dist/document/document.d.ts +1 -1
  11. package/dist/document/types.extensions.d.ts.map +1 -1
  12. package/dist/{engine-store-CIEqgPUb.js → engine-store-Deo9XNhr.js} +21 -21
  13. package/dist/engine.constants-Bi4gw6BR.js +205 -0
  14. package/dist/errors/{codes.d.ts → codes.constants.d.ts} +33 -105
  15. package/dist/errors/{codes.d.ts.map → codes.constants.d.ts.map} +1 -1
  16. package/dist/errors/core-codes.constants.d.ts +3 -0
  17. package/dist/errors/core-codes.constants.d.ts.map +1 -0
  18. package/dist/errors/errors.constants.d.ts +5 -0
  19. package/dist/errors/errors.constants.d.ts.map +1 -1
  20. package/dist/errors/errors.d.ts.map +1 -1
  21. package/dist/errors/index.d.ts +1 -1
  22. package/dist/errors/index.d.ts.map +1 -1
  23. package/dist/errors/types.d.ts +1 -1
  24. package/dist/errors/types.d.ts.map +1 -1
  25. package/dist/{helpers-DVShv41E.js → helpers-D8p0KiJu.js} +1 -1
  26. package/dist/helpers.js +2 -2
  27. package/dist/{in-process-link-DBeAOZRp.js → in-process-link-B-TCHrlb.js} +996 -993
  28. package/dist/index.js +8 -7
  29. package/dist/project/index.d.ts +1 -1
  30. package/dist/project/index.d.ts.map +1 -1
  31. package/dist/project/io/store-runtime.types.d.ts +1 -3
  32. package/dist/project/io/store-runtime.types.d.ts.map +1 -1
  33. package/dist/project/project.d.ts +13 -15
  34. package/dist/project/project.d.ts.map +1 -1
  35. package/dist/project/types.d.ts +24 -19
  36. package/dist/project/types.d.ts.map +1 -1
  37. package/dist/{project-key-Ch34EtFa.js → project-key-2ccZ-0gu.js} +195 -205
  38. package/dist/running-operations-DCKvzlU7.js +107 -0
  39. package/dist/{same-json-value-C6kUaoyt.js → same-json-value-_AChwM_n.js} +41 -41
  40. package/dist/sqlite-engine.d.ts +7 -0
  41. package/dist/sqlite-engine.d.ts.map +1 -0
  42. package/dist/{engine.js → sqlite-engine.js} +4136 -4075
  43. package/dist/sqlite.d.ts +27 -2
  44. package/dist/sqlite.d.ts.map +1 -1
  45. package/dist/sqlite.js +1118 -917
  46. package/dist/store/in-memory/in-memory-state.constants.d.ts +14 -0
  47. package/dist/store/in-memory/in-memory-state.constants.d.ts.map +1 -0
  48. package/dist/store/in-memory/in-memory-state.d.ts +0 -4
  49. package/dist/store/in-memory/in-memory-state.d.ts.map +1 -1
  50. package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
  51. package/dist/store/in-memory/types.d.ts +1 -2
  52. package/dist/store/in-memory/types.d.ts.map +1 -1
  53. package/dist/store/index.d.ts +2 -1
  54. package/dist/store/index.d.ts.map +1 -1
  55. package/dist/store/lost-write.d.ts +8 -8
  56. package/dist/store/lost-write.d.ts.map +1 -1
  57. package/dist/store/lost-write.types.d.ts +1 -1
  58. package/dist/store/lost-write.types.d.ts.map +1 -1
  59. package/dist/store/{engine/project-key.d.ts → project-key.d.ts} +0 -5
  60. package/dist/store/project-key.d.ts.map +1 -0
  61. package/dist/store/resolve-store.d.ts +6 -18
  62. package/dist/store/resolve-store.d.ts.map +1 -1
  63. package/dist/store/sqlite/adapter/in-process-link.constants.d.ts +12 -0
  64. package/dist/store/sqlite/adapter/in-process-link.constants.d.ts.map +1 -0
  65. package/dist/store/sqlite/adapter/in-process-link.d.ts +1 -1
  66. package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -1
  67. package/dist/store/sqlite/adapter/sqlite-connector.d.ts +12 -11
  68. package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -1
  69. package/dist/store/sqlite/adapter/sqlite-connector.types.d.ts +7 -0
  70. package/dist/store/sqlite/adapter/sqlite-connector.types.d.ts.map +1 -0
  71. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -3
  72. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -1
  73. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +12 -1
  74. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -1
  75. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +2 -2
  76. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -1
  77. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +1 -1
  78. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -1
  79. package/dist/store/sqlite/engine/engine.types.d.ts +2 -2
  80. package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -1
  81. package/dist/store/sqlite/engine/schema.d.ts.map +1 -1
  82. package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -1
  83. package/dist/store/{hub-public.d.ts → sqlite/hub-public.d.ts} +9 -9
  84. package/dist/store/sqlite/hub-public.d.ts.map +1 -0
  85. package/dist/store/sqlite/packaging/engine-packaging.constants.d.ts +15 -0
  86. package/dist/store/sqlite/packaging/engine-packaging.constants.d.ts.map +1 -0
  87. package/dist/store/sqlite/runtime/engine-control-loop.d.ts +11 -0
  88. package/dist/store/sqlite/runtime/engine-control-loop.d.ts.map +1 -0
  89. package/dist/store/sqlite/runtime/install-pool.d.ts +1 -1
  90. package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -1
  91. package/dist/store/sqlite/runtime/progress-beat.d.ts +1 -1
  92. package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -1
  93. package/dist/store/sqlite/runtime/runtime.types.d.ts +4 -2
  94. package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -1
  95. package/dist/store/sqlite/runtime/serve-sqlite-engine.d.ts +9 -0
  96. package/dist/store/sqlite/runtime/serve-sqlite-engine.d.ts.map +1 -0
  97. package/dist/store/sqlite/runtime/serve-sqlite-engine.types.d.ts +27 -0
  98. package/dist/store/sqlite/runtime/serve-sqlite-engine.types.d.ts.map +1 -0
  99. package/dist/store/sqlite/served/client/check-engine-wire.d.ts.map +1 -0
  100. package/dist/store/{engine → sqlite/served}/client/client.constants.d.ts +3 -3
  101. package/dist/store/sqlite/served/client/client.constants.d.ts.map +1 -0
  102. package/dist/store/{engine → sqlite/served}/client/client.types.d.ts +13 -8
  103. package/dist/store/sqlite/served/client/client.types.d.ts.map +1 -0
  104. package/dist/store/{engine → sqlite/served}/client/engine-client.d.ts +1 -1
  105. package/dist/store/sqlite/served/client/engine-client.d.ts.map +1 -0
  106. package/dist/store/sqlite/served/client/engine-control.d.ts.map +1 -0
  107. package/dist/store/sqlite/served/client/heartbeat-watch.d.ts.map +1 -0
  108. package/dist/store/{engine → sqlite/served}/client/hub-connector.d.ts +1 -1
  109. package/dist/store/sqlite/served/client/hub-connector.d.ts.map +1 -0
  110. package/dist/store/{engine → sqlite/served}/client/hub-connector.types.d.ts +6 -7
  111. package/dist/store/sqlite/served/client/hub-connector.types.d.ts.map +1 -0
  112. package/dist/store/sqlite/served/client/worker-connector.d.ts.map +1 -0
  113. package/dist/store/sqlite/served/creation-refusal.d.ts.map +1 -0
  114. package/dist/store/sqlite/served/dialecte-refusal.d.ts +19 -0
  115. package/dist/store/sqlite/served/dialecte-refusal.d.ts.map +1 -0
  116. package/dist/store/sqlite/served/engine-lock.d.ts +6 -0
  117. package/dist/store/sqlite/served/engine-lock.d.ts.map +1 -0
  118. package/dist/store/sqlite/served/engine-store.constants.d.ts +3 -0
  119. package/dist/store/sqlite/served/engine-store.constants.d.ts.map +1 -0
  120. package/dist/store/{engine → sqlite/served}/engine-store.d.ts +6 -6
  121. package/dist/store/sqlite/served/engine-store.d.ts.map +1 -0
  122. package/dist/store/sqlite/served/engine-store.types.d.ts.map +1 -0
  123. package/dist/store/sqlite/served/engine.constants.d.ts.map +1 -0
  124. package/dist/store/{engine → sqlite/served}/engine.types.d.ts +2 -4
  125. package/dist/store/sqlite/served/engine.types.d.ts.map +1 -0
  126. package/dist/store/sqlite/served/host/changed.d.ts +5 -0
  127. package/dist/store/sqlite/served/host/changed.d.ts.map +1 -0
  128. package/dist/store/sqlite/served/host/engine-wire.d.ts.map +1 -0
  129. package/dist/store/{engine → sqlite/served}/host/heartbeat.d.ts +1 -1
  130. package/dist/store/sqlite/served/host/heartbeat.d.ts.map +1 -0
  131. package/dist/store/sqlite/served/host/host.constants.d.ts.map +1 -0
  132. package/dist/store/{engine → sqlite/served}/host/host.types.d.ts +4 -3
  133. package/dist/store/sqlite/served/host/host.types.d.ts.map +1 -0
  134. package/dist/store/sqlite/served/host/store-events.constants.d.ts +9 -0
  135. package/dist/store/sqlite/served/host/store-events.constants.d.ts.map +1 -0
  136. package/dist/store/sqlite/served/host/store-events.d.ts.map +1 -0
  137. package/dist/store/sqlite/served/hub/hub-client.constants.d.ts.map +1 -0
  138. package/dist/store/sqlite/served/hub/hub-client.d.ts.map +1 -0
  139. package/dist/store/{engine → sqlite/served}/hub/hub-client.types.d.ts +2 -9
  140. package/dist/store/sqlite/served/hub/hub-client.types.d.ts.map +1 -0
  141. package/dist/store/sqlite/served/hub/hub-protocol.types.d.ts.map +1 -0
  142. package/dist/store/sqlite/served/hub/hub-router.d.ts.map +1 -0
  143. package/dist/store/sqlite/served/hub/hub-shell.d.ts.map +1 -0
  144. package/dist/store/sqlite/served/hub/hub-shell.types.d.ts.map +1 -0
  145. package/dist/store/{engine → sqlite/served}/hub/hub.constants.d.ts +3 -3
  146. package/dist/store/sqlite/served/hub/hub.constants.d.ts.map +1 -0
  147. package/dist/store/{engine → sqlite/served}/hub/hub.types.d.ts +2 -2
  148. package/dist/store/sqlite/served/hub/hub.types.d.ts.map +1 -0
  149. package/dist/store/sqlite/served/hub/hub.worker.d.ts.map +1 -0
  150. package/dist/store/sqlite/served/hub/realm-host.d.ts.map +1 -0
  151. package/dist/store/{engine → sqlite/served}/hub/realm-host.types.d.ts +3 -3
  152. package/dist/store/sqlite/served/hub/realm-host.types.d.ts.map +1 -0
  153. package/dist/store/sqlite/served/wire/error-envelope.d.ts.map +1 -0
  154. package/dist/store/sqlite/served/wire/wire-values.d.ts.map +1 -0
  155. package/dist/store/sqlite/served/wire/wire.constants.d.ts.map +1 -0
  156. package/dist/store/{engine → sqlite/served}/wire/wire.types.d.ts +1 -1
  157. package/dist/store/sqlite/served/wire/wire.types.d.ts.map +1 -0
  158. package/dist/store/sqlite/sqlite-connector-params.d.ts +13 -0
  159. package/dist/store/sqlite/sqlite-connector-params.d.ts.map +1 -0
  160. package/dist/store/sqlite/sqlite-engine-registration.d.ts +30 -0
  161. package/dist/store/sqlite/sqlite-engine-registration.d.ts.map +1 -0
  162. package/dist/store/sqlite/sqlite-error-entry.d.ts +10 -0
  163. package/dist/store/sqlite/sqlite-error-entry.d.ts.map +1 -0
  164. package/dist/store/sqlite/sqlite-errors.constants.d.ts +110 -0
  165. package/dist/store/sqlite/sqlite-errors.constants.d.ts.map +1 -0
  166. package/dist/store/sqlite/sqlite-errors.types.d.ts +7 -0
  167. package/dist/store/sqlite/sqlite-errors.types.d.ts.map +1 -0
  168. package/dist/store/sqlite/sqlite-storage-kind.constants.d.ts +10 -0
  169. package/dist/store/sqlite/sqlite-storage-kind.constants.d.ts.map +1 -0
  170. package/dist/store/sqlite/sqlite-storage-kind.d.ts +3 -0
  171. package/dist/store/sqlite/sqlite-storage-kind.d.ts.map +1 -0
  172. package/dist/store/sqlite/sqlite-storage.constants.d.ts +24 -0
  173. package/dist/store/sqlite/sqlite-storage.constants.d.ts.map +1 -0
  174. package/dist/store/sqlite/sqlite-storage.types.d.ts +27 -0
  175. package/dist/store/sqlite/sqlite-storage.types.d.ts.map +1 -0
  176. package/dist/store/sqlite/sqlite-store-of.d.ts +8 -3
  177. package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -1
  178. package/dist/store/storage-kinds.constants.d.ts +16 -0
  179. package/dist/store/storage-kinds.constants.d.ts.map +1 -0
  180. package/dist/store/storage-kinds.d.ts +43 -0
  181. package/dist/store/storage-kinds.d.ts.map +1 -0
  182. package/dist/store/storage-kinds.types.d.ts +46 -0
  183. package/dist/store/storage-kinds.types.d.ts.map +1 -0
  184. package/dist/store/store.types.d.ts +6 -4
  185. package/dist/store/store.types.d.ts.map +1 -1
  186. package/dist/test/create-test-dialecte.constants.d.ts +4 -0
  187. package/dist/test/create-test-dialecte.constants.d.ts.map +1 -0
  188. package/dist/test/create-test-dialecte.d.ts.map +1 -1
  189. package/dist/test/test-storage/index.d.ts +1 -1
  190. package/dist/test/test-storage/index.d.ts.map +1 -1
  191. package/dist/test/test-storage/sqlite-test-store.d.ts +15 -0
  192. package/dist/test/test-storage/sqlite-test-store.d.ts.map +1 -0
  193. package/dist/test/test-storage/test-storage.types.d.ts +12 -0
  194. package/dist/test/test-storage/test-storage.types.d.ts.map +1 -1
  195. package/dist/test/test-storage/test-store-for.d.ts +18 -6
  196. package/dist/test/test-storage/test-store-for.d.ts.map +1 -1
  197. package/dist/test/test-storage/test-store-providers.constants.d.ts +8 -0
  198. package/dist/test/test-storage/test-store-providers.constants.d.ts.map +1 -0
  199. package/dist/test/test-storage/test-store-providers.d.ts +11 -0
  200. package/dist/test/test-storage/test-store-providers.d.ts.map +1 -0
  201. package/dist/test.js +797 -763
  202. package/dist/types/dialecte-config.d.ts.map +1 -1
  203. package/dist/{utils-USNkj4sT.js → utils-Cv4oHia0.js} +63 -137
  204. package/dist/utils.js +1 -1
  205. package/package.json +16 -22
  206. package/skills/dialecte/SKILL.md +84 -15
  207. package/skills/dialecte/references/api.json +88 -61
  208. package/skills/dialecte/references/api.md +461 -459
  209. package/skills/dialecte/references/core-api.md +43 -15
  210. package/skills/dialecte-contributing/SKILL.md +94 -48
  211. package/skills/dialecte-contributing/references/code-rules.md +7 -0
  212. package/skills/dialecte-contributing/references/landing-changes.md +10 -6
  213. package/skills/dialecte-contributing/references/lot-in-a-package.md +45 -0
  214. package/skills/dialecte-contributing/references/perf.md +2 -1
  215. package/skills/dialecte-contributing/references/traps.md +20 -0
  216. package/skills/dialecte-lot/SKILL.md +106 -51
  217. package/skills/dialecte-lot/references/briefs.md +18 -9
  218. package/skills/dialecte-lot/references/model-tiers.md +3 -3
  219. package/skills/dialecte-lot/references/standard-check.md +45 -0
  220. package/skills/dialecte-lot/references/stations.md +110 -0
  221. package/dist/assets/hub.worker-B1HcVDhn.js +0 -2
  222. package/dist/engine.constants-DBMjMmV9.js +0 -98
  223. package/dist/engine.d.ts +0 -9
  224. package/dist/engine.d.ts.map +0 -1
  225. package/dist/running-operations-vnijBvn7.js +0 -76
  226. package/dist/store/engine/client/check-engine-wire.d.ts.map +0 -1
  227. package/dist/store/engine/client/client.constants.d.ts.map +0 -1
  228. package/dist/store/engine/client/client.types.d.ts.map +0 -1
  229. package/dist/store/engine/client/engine-client.d.ts.map +0 -1
  230. package/dist/store/engine/client/engine-control.d.ts.map +0 -1
  231. package/dist/store/engine/client/heartbeat-watch.d.ts.map +0 -1
  232. package/dist/store/engine/client/hub-connector.d.ts.map +0 -1
  233. package/dist/store/engine/client/hub-connector.types.d.ts.map +0 -1
  234. package/dist/store/engine/client/worker-connector.d.ts.map +0 -1
  235. package/dist/store/engine/creation-refusal.d.ts.map +0 -1
  236. package/dist/store/engine/dialecte-refusal.d.ts +0 -18
  237. package/dist/store/engine/dialecte-refusal.d.ts.map +0 -1
  238. package/dist/store/engine/engine-store.d.ts.map +0 -1
  239. package/dist/store/engine/engine-store.types.d.ts.map +0 -1
  240. package/dist/store/engine/engine.constants.d.ts.map +0 -1
  241. package/dist/store/engine/engine.types.d.ts.map +0 -1
  242. package/dist/store/engine/host/engine-wire.d.ts.map +0 -1
  243. package/dist/store/engine/host/heartbeat.d.ts.map +0 -1
  244. package/dist/store/engine/host/host.constants.d.ts.map +0 -1
  245. package/dist/store/engine/host/host.types.d.ts.map +0 -1
  246. package/dist/store/engine/host/store-events.d.ts.map +0 -1
  247. package/dist/store/engine/hub/hub-client.constants.d.ts.map +0 -1
  248. package/dist/store/engine/hub/hub-client.d.ts.map +0 -1
  249. package/dist/store/engine/hub/hub-client.types.d.ts.map +0 -1
  250. package/dist/store/engine/hub/hub-protocol.types.d.ts.map +0 -1
  251. package/dist/store/engine/hub/hub-router.d.ts.map +0 -1
  252. package/dist/store/engine/hub/hub-shell.d.ts.map +0 -1
  253. package/dist/store/engine/hub/hub-shell.types.d.ts.map +0 -1
  254. package/dist/store/engine/hub/hub.constants.d.ts.map +0 -1
  255. package/dist/store/engine/hub/hub.types.d.ts.map +0 -1
  256. package/dist/store/engine/hub/hub.worker.d.ts.map +0 -1
  257. package/dist/store/engine/hub/realm-host.d.ts.map +0 -1
  258. package/dist/store/engine/hub/realm-host.types.d.ts.map +0 -1
  259. package/dist/store/engine/project-key.d.ts.map +0 -1
  260. package/dist/store/engine/wire/error-envelope.d.ts.map +0 -1
  261. package/dist/store/engine/wire/wire-values.d.ts.map +0 -1
  262. package/dist/store/engine/wire/wire.constants.d.ts.map +0 -1
  263. package/dist/store/engine/wire/wire.types.d.ts.map +0 -1
  264. package/dist/store/hub-public.d.ts.map +0 -1
  265. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +0 -16
  266. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +0 -1
  267. package/dist/store/sqlite-storage.constants.d.ts +0 -14
  268. package/dist/store/sqlite-storage.constants.d.ts.map +0 -1
  269. package/dist/store/sqlite-storage.d.ts +0 -22
  270. package/dist/store/sqlite-storage.d.ts.map +0 -1
  271. package/dist/store/sqlite-storage.types.d.ts +0 -24
  272. package/dist/store/sqlite-storage.types.d.ts.map +0 -1
  273. package/dist/test/test-dialecte.worker.d.ts +0 -2
  274. package/dist/test/test-dialecte.worker.d.ts.map +0 -1
  275. /package/dist/store/{engine → sqlite/served}/client/check-engine-wire.d.ts +0 -0
  276. /package/dist/store/{engine → sqlite/served}/client/engine-control.d.ts +0 -0
  277. /package/dist/store/{engine → sqlite/served}/client/heartbeat-watch.d.ts +0 -0
  278. /package/dist/store/{engine → sqlite/served}/client/worker-connector.d.ts +0 -0
  279. /package/dist/store/{engine → sqlite/served}/creation-refusal.d.ts +0 -0
  280. /package/dist/store/{engine → sqlite/served}/engine-store.types.d.ts +0 -0
  281. /package/dist/store/{engine → sqlite/served}/engine.constants.d.ts +0 -0
  282. /package/dist/store/{engine → sqlite/served}/host/engine-wire.d.ts +0 -0
  283. /package/dist/store/{engine → sqlite/served}/host/host.constants.d.ts +0 -0
  284. /package/dist/store/{engine → sqlite/served}/host/store-events.d.ts +0 -0
  285. /package/dist/store/{engine → sqlite/served}/hub/hub-client.constants.d.ts +0 -0
  286. /package/dist/store/{engine → sqlite/served}/hub/hub-client.d.ts +0 -0
  287. /package/dist/store/{engine → sqlite/served}/hub/hub-protocol.types.d.ts +0 -0
  288. /package/dist/store/{engine → sqlite/served}/hub/hub-router.d.ts +0 -0
  289. /package/dist/store/{engine → sqlite/served}/hub/hub-shell.d.ts +0 -0
  290. /package/dist/store/{engine → sqlite/served}/hub/hub-shell.types.d.ts +0 -0
  291. /package/dist/store/{engine → sqlite/served}/hub/hub.worker.d.ts +0 -0
  292. /package/dist/store/{engine → sqlite/served}/hub/realm-host.d.ts +0 -0
  293. /package/dist/store/{engine → sqlite/served}/wire/error-envelope.d.ts +0 -0
  294. /package/dist/store/{engine → sqlite/served}/wire/wire-values.d.ts +0 -0
  295. /package/dist/store/{engine → sqlite/served}/wire/wire.constants.d.ts +0 -0
@@ -21,13 +21,13 @@ in the installed `.d.ts` or the repo before calling. Paths are relative to the c
21
21
 
22
22
  ## Entry points
23
23
 
24
- | Import | What is there |
25
- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
26
- | `@dialecte/core` | Project, Document, Query, Transaction, `defineDialecte`, `createProjectFactory`, stores, XML parse/build, errors, diagnostics, perf, all types |
27
- | `@dialecte/core/helpers` | record converters, guards, `readAttribute(s)`, `standardizeRecord`, `mergeExtensions`, `stripAttributes`, write-path guards, namespace constants |
28
- | `@dialecte/core/utils` | attribute rules, definition resolution, xsi:type, namespaces, ordering, `invariant`, `formatXml` / `formatEmbeddedXml`, `saveToDisk` |
29
- | `@dialecte/core/test` | `createTestHelpers`, `createTestRunner`, `createTestProject`, XML/XPath assertions, test dialecte, `normalizeUuids` |
30
- | `@dialecte/core/sqlite` | opt-in SQLite storage: importing it registers `{ type: 'sqlite' }`; `connectHub`, `adoptHubPort`, `listProjects` |
24
+ | Import | What is there |
25
+ | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26
+ | `@dialecte/core` | Project, Document, Query, Transaction, `defineDialecte`, `createProjectFactory`, stores, XML parse/build, errors, diagnostics, perf, all types |
27
+ | `@dialecte/core/helpers` | record converters, guards, `readAttribute(s)`, `standardizeRecord`, `mergeExtensions`, `stripAttributes`, write-path guards, namespace constants |
28
+ | `@dialecte/core/utils` | attribute rules, definition resolution, xsi:type, namespaces, ordering, `invariant`, `formatXml` / `formatEmbeddedXml`, `saveToDisk` |
29
+ | `@dialecte/core/test` | `createTestHelpers`, `createTestRunner`, `createTestProject`, XML/XPath assertions, test dialecte, `normalizeUuids` |
30
+ | `@dialecte/core/sqlite` | opt-in SQLite storage: importing it registers `{ type: 'sqlite' }`; `serveSqliteEngine` (the app's one engine worker file), `registerSqliteEngine` (the page, once), `connectHub`, `adoptHubPort`, `listProjects` |
31
31
 
32
32
  ## Project (`project/project.ts`)
33
33
 
@@ -53,7 +53,8 @@ in the installed `.d.ts` or the repo before calling. Paths are relative to the c
53
53
  in-memory) the channel is the Project's own and reposts what the store tells; on `local` (IndexedDB) it is
54
54
  shared by project name.
55
55
  - `listProjects({ dialecteId? })` from `@dialecte/core/sqlite` (SQLite projects of the origin, read from the private
56
- file system) and `factory.destroyProject({ name })` (delete one without opening it).
56
+ file system) and `factory.destroyProject({ name, storage })` (delete one without opening it, from the storage named:
57
+ `storage: { type: 'sqlite' }` for a project on SQLite; any kind works the same way).
57
58
 
58
59
  ## Document (`document/document.ts`)
59
60
 
@@ -70,6 +71,7 @@ in the installed `.d.ts` or the repo before calling. Paths are relative to the c
70
71
  - Transaction only (`tx`): `addChild`, `clearRecordCache`, `clearStagedOperations`, `commit`, `deepClone`, `delete`, `ensureChild`, `finishStaging`, `getStagedOperations`, `update`
71
72
  - Document: `close`, `destroy`, `prepare`, `subscribe`, `transaction`
72
73
  - Project: `addBlob`, `attachBlob`, `close`, `createChannel`, `destroy`, `detachBlob`, `export`, `exportBlob`, `getBlob`, `getBlobsByDocument`, `getBlobsByRecord`, `getDatabaseInstance`, `getDocument`, `getDocumentConfig`, `getDocumentStatus`, `getDocuments`, `getStandaloneBlobs`, `import`, `importFile`, `initEmptyDocument`, `open`, `openDocument`, `queryAll`, `queryFirst`, `redo`, `removeBlob`, `removeDocument`, `undo`
74
+
73
75
  <!-- /dialecte-skills:generated -->
74
76
 
75
77
  ## Query (`document/query/main.ts`)
@@ -183,13 +185,39 @@ needs the parent's `updated` (children list) too.
183
185
 
184
186
  ## Stores (`store/`)
185
187
 
186
- - `storage` param: `{ type: 'local' }` (IndexedDB, the default), `{ type: 'sqlite' }` (the SQLite
187
- engine in a worker, one per project shared by every tab through the hub; opt-in: the app imports
188
- `@dialecte/core/sqlite` once, else `PROJECT_SQLITE_NOT_IMPORTED`; opened from a dialecte's project
189
- factory, which names its engine worker),
190
- `{ type: 'inMemory', writable? }`,
191
- `{ type: 'custom', store }`. The store is a switch: results must be identical on every store,
192
- only speed changes. A difference is a store bug.
188
+ - `storage` param: `{ type: 'local' }` (IndexedDB, the default), `{ type: 'inMemory', writable? }`,
189
+ `{ type: 'custom', store }` - core's own kinds - and any kind an entry registers: `{ type: 'sqlite' }` (the SQLite
190
+ engine in a worker, one per project shared by every tab through the hub; setup below) exists once
191
+ `@dialecte/core/sqlite` is imported. The store is a switch: results must be identical on every store, only speed
192
+ changes. A difference is a store bug.
193
+ - Storage kinds are a registry: an entry adds its kind with `registerStorageKind({ type, kind: { id, storeOf } })`
194
+ (from `@dialecte/core`) and widens `StorageParam` by augmenting `interface StorageKinds` of `@dialecte/core`
195
+ (`declare module '@dialecte/core' { interface StorageKinds { mine: { type: 'mine'; url: string } } }`) - how a
196
+ store package plugs in like SQLite does. A type nobody registered (an app that never imported
197
+ `@dialecte/core/sqlite`) is refused `PROJECT_STORAGE_NOT_REGISTERED`; another kind under a taken type,
198
+ `STORE_KIND_TAKEN`.
199
+ - SQLite storage is opt-in and **the app assembles its engine**; a dialecte package ships its declaration
200
+ only, no worker. The SQLite calls come from `@dialecte/core/sqlite`, which the app imports once (the factory and
201
+ the rest of the API stay in `@dialecte/core`):
202
+ - the app's one engine worker file (say `engine.worker.ts` in its sources) calls `serveSqliteEngine({ dialectes })`
203
+ with every dialecte the app opens on SQLite - one file for all of them, not one per dialecte;
204
+ - the page calls `registerSqliteEngine({ url, dialectes })` once, before the first project opens: `url` a
205
+ `?worker&url` import of that file, `dialectes` the same list (declarations fit);
206
+ - `createProjectFactory({ dialecte })` takes the declaration only, no engine URL; a project opens with
207
+ `storage: { type: 'sqlite' }`; `connectHub()` takes no parameter (optional: a project opening on
208
+ `sqlite` offers the registered engines too).
209
+ - SQLite refusals: entry never imported → `PROJECT_STORAGE_NOT_REGISTERED` (core: no `sqlite` kind); no
210
+ registration, or one that does not name the project's dialecte → `PROJECT_SQLITE_ENGINE_NOT_REGISTERED`, nothing
211
+ started; a worker file that fails to load, or cannot load the engine's chunk (a precache list that leaves it out)
212
+ → `PROJECT_ENGINE_UNAVAILABLE`; a project stored by another layout → `PROJECT_LAYOUT_OUTDATED`. The keys only SQLite
213
+ raises (`PROJECT_SQLITE_*`, `PROJECT_ENGINE_*`, `PROJECT_LAYOUT_OUTDATED`, `PROJECT_DATABASE_LOST`, the hub's
214
+ `STORE_HUB_*`, `STORE_REALM_*`, `STORE_PROTOCOL_MISMATCH`, `STORE_SQLITE_ENGINE_FIXED`) are declared by
215
+ `SQLITE_ERRORS` from `@dialecte/core/sqlite`, codes unchanged: match them with
216
+ `isKnownDialecteError(error, { catalogues: [SQLITE_ERRORS] })` or `SQLITE_ERRORS.<KEY>.key`.
217
+ - A store behind a connection (SQLite's worker, a remote store) that loses it refuses the call
218
+ `STORE_CONNECTION_LOST` (core); for a write, `meta.writeId` and `meta.outcome` (`applied`, `not-applied`,
219
+ `running`, `unknown`) say whether it landed - a Document's commit and a Project's import ask it once themselves;
220
+ never write again blindly (`store.getWriteOutcome({ writeId })`).
193
221
  - `Store` interface is public surface for custom stores. The patch merge every built-in store uses
194
222
  is internal to the stores (not exported): a custom store merges a `RecordPatch` itself.
195
223
 
@@ -1,10 +1,11 @@
1
1
  ---
2
2
  name: dialecte-contributing
3
- description: Change Dialecte itself - @dialecte/core, a dialecte package, the generator (create) or the type-perf CLI (cli). Covers how the repos are split, the placement decision (core vs dialecte hook vs dialecte extension vs helper vs consumer code), the red-first table-driven workflow, the Definition of Done gates (check, format, build, test, doc:build, docs + CHANGELOG), the team code rules, the verification traps that give false greens, and how a change is handed over (a commit-by-lots hand-over the user runs, never pushed by the agent). Use it whenever the working directory is inside a dialecte repo, the task says "add to core", "new hook", "new extension method", "fix dialecte", "bump core in a dialecte package", or a consumer feature is blocked on a missing dialecte capability. Load the dialecte skill too for the API map; for a dialecte's own schema knowledge also load its skill (dialecte-<id>).
3
+ description: Change Dialecte itself - @dialecte/core, a dialecte package, the generator (create) or the type-perf CLI (cli). Covers how the repos are split, the placement decision (core vs dialecte hook vs dialecte extension vs helper vs consumer code), the red-first table-driven workflow, the Definition of Done gates (check, format, build, test, doc:build, docs + CHANGELOG), mutation testing and its survivors (`dialecte mutants`), the team code rules, the verification traps that give false greens, and how a change is handed over (a commit-by-lots hand-over the user runs, never pushed by the agent). Use it whenever the working directory is inside a dialecte repo, the task says "add to core", "new hook", "new extension method", "fix dialecte", "bump core in a dialecte package", or a consumer feature is blocked on a missing dialecte capability. Load the dialecte skill too for the API map; for a dialecte's own schema knowledge also load its skill (dialecte-<id>).
4
4
  license: MIT
5
5
  metadata:
6
6
  author: dialecte
7
7
  version: '0.1.0'
8
+ audience: contributor
8
9
  ---
9
10
 
10
11
  <!-- dialecte-skills workspace -->
@@ -79,35 +80,16 @@ rule that contradicts the standard stays out of the engine (consumer override).
79
80
 
80
81
  ## Reading the standard
81
82
 
82
- For a dialecte that implements a standard: the standard your dialecte implements is the truth its rules come
83
- from, and a long text read once by one model is not a reliable source.
84
-
85
- - **Markdown first.** Read the standard as markdown, citing `file:line`; never the PDF. A document not yet in
86
- markdown is converted first: markitdown for PDF, DOCX or PPTX; docling or pymupdf4llm when its tables come
87
- out broken.
88
- - **The converted text stays private**: kept next to the plans, outside every package repository; never
89
- committed, never quoted or cited in committed text (code, doc, CHANGELOG, skill) or on GitHub. Committed text
90
- states the behaviour.
91
- - **A confirmation** (a name, a type, a cardinality the code already follows): one reader, with line references.
92
- - **A decision that changes what the engine does or accepts** gets the cross-check, once per decision:
93
- 1. Two or three independent readers on the `standard` tier (at least one on another model or vendor when
94
- one is available): the same question, no shared notes, a `file:line` for every claim.
95
- 2. One reader takes the whole relevant part, the others split it by section, so coverage does not rest on
96
- one model's retrieval.
97
- 3. An adjudicator on the `strong` tier compares the answers: an agreed claim with matching lines passes; a
98
- disagreement, or a claim without a line, becomes a question for the user or the domain expert. Runs of
99
- one model share its biases, so agreement is evidence, not proof.
100
- 4. The result (question, claims, lines, verdict) goes in the plan's research folder, next to the plan: later
101
- lots reuse it instead of reading the standard again.
102
-
103
- The tiers are those of the `dialecte-lot` skill (its model-tiers reference).
83
+ The standard check is part of every lot: `dialecte-lot` references/standard-check.md (markdown first, the
84
+ converted text kept private, the cross-check for a decision that changes what the engine does or accepts, and
85
+ what the station records for the hand-over card).
104
86
 
105
87
  ## The workflow
106
88
 
107
89
  1. **Orient**: read the nearest existing example of what you build (an extension in the same
108
90
  package, a hook sub-file, its test) and the package's `doc/` page for the surface. Copy shapes,
109
91
  don't invent them. A new extension verb starts from `npx dialecte new verb <namespace>
110
- <query|transaction> <name>`: it writes the function, its `.types.ts`, a red table case marked
92
+ <query|transaction> <name>`: it writes the function, its `.types.ts`, a red table case marked
111
93
  `only`, the barrel export and the namespace registration, and lists the `FILL:` placeholders
112
94
  (`skills check` refuses them until written).
113
95
  2. **Red first, proven by the cli**: the tests come first, from the spec, before any production code:
@@ -133,7 +115,9 @@ The tiers are those of the `dialecte-lot` skill (its model-tiers reference).
133
115
  3. **Implement under the code rules**: [references/code-rules.md](references/code-rules.md).
134
116
  Read it before writing the first line; most review comments come from it. `npx dialecte rules`
135
117
  checks them on the changed files.
136
- 4. **Gates** (below), then docs + CHANGELOG if the surface changed.
118
+ 4. **Gates** (below): `gate --fast` and `npx dialecte rules` per step (fix every `rules` error before the
119
+ review), `gate --full` once per lot, then `dialecte contrib` (`@dialecte/cli` 0.3.0); docs + CHANGELOG if the
120
+ surface changed.
137
121
  5. **Independent review**: have a fresh reviewer (a sub-agent with only the spec, the diff and
138
122
  these rules, or a human) read the diff against the previous version before hand-over. Self-review
139
123
  re-reads your own intent and misses weakened assertions and unusable types.
@@ -141,6 +125,9 @@ The tiers are those of the `dialecte-lot` skill (its model-tiers reference).
141
125
  command writes the hand-over folder and prints the card the user gets
142
126
  ([references/landing-changes.md](references/landing-changes.md)). The agent never commits or pushes.
143
127
 
128
+ Run as a `dialecte-lot` lot, each station gains the package's own steps: [references/lot-in-a-package.md](references/lot-in-a-package.md)
129
+ (the mutation switch, `dialecte rules`, `dialecte contrib`, `mutants status`, merges onto a moved main).
130
+
144
131
  ## Test tiers
145
132
 
146
133
  In a package whose vitest config has a `node` project (core), a test runs in one of two tiers.
@@ -157,7 +144,8 @@ In a package whose vitest config has a `node` project (core), a test runs in one
157
144
  `npx vitest run --project browser <path>`. A file that reads the package from disk or starts node goes
158
145
  to `NODE_ONLY_TEST_FILES` the same way. The config refuses a listed path that names no file.
159
146
  - **A difference between the tiers is a bug**, of the store or of the assertion. Never move a test to
160
- the browser list to hide it, never retry it. Reproduce it with `--project node`, pin it with a red
147
+ the browser list to hide it, never retry it beyond the one serial rerun every failing run gets (a case that
148
+ fails in one tier only after that rerun is a difference, not a flake). Reproduce it with `--project node`, pin it with a red
161
149
  case first: in the store contract (`src/store/contract`) when a store answers differently, beside
162
150
  core's assertion helper (`src/test/assert-xml`) when it reads the XML differently between tiers.
163
151
  Then fix it. When the test's own assertion depends on something no store promises (an XPath `[1]`
@@ -179,7 +167,7 @@ hand-over script holds the repository. With `--fast`, a change that touches no t
179
167
  passes the tests step with the note "no test file is affected by the change"; any other run that
180
168
  counts no test fails. Paste its lines in your report: they are the real counts. A gate of the same
181
169
  mode on a tree it already passed, with the same lock, linked dependencies and steps, runs its hygiene and `tdd`
182
- step, then answers the rest from that record (`reused`, from cli 0.2.0). `--rerun` forces a run: only when the
170
+ step, then answers the rest from that record (`reused`, from cli 0.2.0). `--no-reuse` forces a run: only when the
183
171
  person asks, or when something outside the key changed (an edit, a lock or a linked dependency already makes a
184
172
  new key).
185
173
 
@@ -193,21 +181,28 @@ and the gate prints how many production and test files the change still touches.
193
181
  worktree's branch since `dialecte worktree add` made it (other branches' entries are only noted), and
194
182
  every new file declared (`--declare <path>`, one per new file or folder; an undeclared one is a
195
183
  warning). A failure names what changed and the read-only commands
196
- to look at it. `--full` and the heavy steps hold a machine-wide lock: a step the package marks `heavy`, a
197
- command naming a browser project, and any test step of a package that runs its tests in a browser (a
198
- `@vitest/browser*` or playwright dependency, a `browser` in its vitest config). A second heavy run waits
199
- with a line every 30 s naming the holder (`--no-wait` refuses). A heavy run outside the gate (a browser suite,
200
- mutation tests, a bench) starts with `npx dialecte lock run -- <command>`, which takes the same lock; a cli
201
- whose `npx dialecte --help` lists no `lock` does not have it yet: run nothing heavy while another heavy run is
202
- on the machine (`uptime`, and `ps` or `pgrep -fl` for a browser, vitest or Stryker process), and never write a
203
- lock script of your own.
184
+ to look at it.
185
+
186
+ **Test runs use the runner's defaults**: full parallelism, no `nice`, no `--maxWorkers`, no
187
+ `--no-file-parallelism`, no lock and no waiting on other sessions' runs or on the load - the machine is shared,
188
+ and that is the user's to manage: when they ask you to limit (to leave room for other sessions), do it for the
189
+ time they say. A run that fails is rerun **once, serially, on its failing files**: the same command, its
190
+ `--project` flags kept so the rerun stays in the failing tier, with the failing files and `--no-file-parallelism`
191
+ added (through an npm script, after `--`). Failing there too, it is a real failure; passing there, it is **flaky in
192
+ parallel** - a defect of the test or the code, reported with its files and fixed at its cause (a wall-clock bound
193
+ tuned on a quiet machine, a shared temporary folder, port or build output, browser state, an inherited environment
194
+ variable), never answered by throttling the next runs. The gate does this rerun itself on a vitest test step: a
195
+ step that passes on it is green and its line says `flaky in parallel` with one `flaky <file>` line per file - read
196
+ the flag on a green gate; one that fails again says `real failure`. A failing step line that says neither comes
197
+ from a cli without the rerun: rerun its files by hand. Such a cli may still hold a machine lock around `--full`,
198
+ its heavy steps and `tdd`: let it wait.
204
199
 
205
200
  **Waiting on a long run** (`gate --full`, a mutation run, a bench): start it in the background with its output in
206
201
  a log - your harness's background run, or `cmd > "$log" 2>&1 & echo $! > "$pidfile"` - then wait for the
207
202
  harness's completion notice or on that PID (`while kill -0 "$(cat "$pidfile")" 2>/dev/null; do sleep 5; done`),
208
203
  with an upper bound tied to the run's expected duration; at the bound, report "timed out" with the log's tail.
209
204
  Never wait with `pgrep -f "<text>"` when that text is in your own wait command: the loop finds itself and never
210
- ends (`pgrep -f "[m]utants.ts"` if it is unavoidable). When the wait ends, read the exit code and the log's
205
+ ends (`pgrep -f "[v]itest run"` if it is unavoidable). When the wait ends, read the exit code and the log's
211
206
  summary line: "no process found" is not a pass.
212
207
 
213
208
  Read the step list in the package's `package.json` (`"dialecte": { "gate" }`) when it overrides the
@@ -222,12 +217,16 @@ or the steps by hand:
222
217
  3. `npm run build` - runs the type-check in parallel and emits declarations (vite-plugin-dts),
223
218
  which catches union-assignability errors the editor misses.
224
219
  4. The tests, by tier: `npm run test:node` per step (the fast gate runs its changed files), the
225
- browser-only list once per lot (`npx vitest run --project browser --no-file-parallelism`, in the full
226
- gate), and `npm run test:browser:all` - the whole suite in the browser - once before the branch
227
- merges: any difference fails it, never retried. A package without a `node` project: `npx vitest run`
220
+ browser-only list once per lot (`npx vitest run --project browser`, in the full gate), and
221
+ `npm run test:browser:all` - the whole suite in the browser - once before the branch merges. A failing run of
222
+ any tier first gets its one serial rerun (above); a case that still fails there while it passes in the other
223
+ tier is a tier difference - a bug, never retried further, never hidden ([Test tiers](#test-tiers)). A package without a `node` project: `npx vitest run`
228
224
  (`npm run test` is watch mode in some packages; create uses `npm run test:ts` + `test:py`).
229
225
  One file while iterating: [Test tiers](#test-tiers).
230
- 5. `npm run doc:build` - the VitePress docs build.
226
+ 5. `npm run doc:build` - the VitePress docs build. From cli 0.3.0 a dialecte package
227
+ (`"dialecte": { "profile": "contributor" }`) runs it, with the type bench, the code rules and the release
228
+ check, in `npx dialecte contrib` after a green `gate --full` and before the hand-over, whose `contrib`
229
+ guard refuses a tree without a green record of it.
231
230
  6. `npm run skills:generate`, then `npm run skills:check` - every change, not only one that touches a skill:
232
231
  the check fails on a name, path or script a skill cites that no longer exists, and on a public function
233
232
  without its JSDoc summary and `@intent` (below). The scripts run the package's pinned cli; with a pin
@@ -259,8 +258,54 @@ Type performance: `npm run type-bench:check` compares type instantiations with
259
258
  and explain the growth; if it is legitimate, re-baseline with `npm run type-bench` in its own lot.
260
259
  Never hand-edit `baseline.json`, never twist code to dodge the gate.
261
260
 
262
- Run slow gates (create's `npm run proof`, corpora, mutation testing) once per lot before hand-over,
263
- not after every fix. Fast targeted runs while iterating.
261
+ Run slow gates (create's `npm run proof`, corpora) once per lot before hand-over, not after every fix.
262
+ Fast targeted runs while iterating. Mutation testing runs beside the lot instead (below).
263
+
264
+ ## Mutation testing
265
+
266
+ In a package that declares a mutation scope (`package.json` `"dialecte": { "mutation" }`), `dialecte mutants`
267
+ (`@dialecte/cli` 0.2.0) runs StrykerJS on it and keeps every survivor in a ledger until it is handled; `dialecte
268
+ mutants` with no verb prints each verb's usage. The scripts do the bookkeeping, so your tokens go to judgment only.
269
+
270
+ - **The switch is per lot**, in `.dialecte/lot.json`: `dialecte lot mutation off|changed|audit|gate`. Without it, a
271
+ lot whose diff touches the scope runs `changed` (its changed lines), any other lot `off`. `gate` is for a
272
+ robustness lot only: its hand-over waits for a run reported on the tree it commits, so it runs again after the
273
+ last fix. `audit` mutates the whole scope.
274
+ - **Off the critical path.** Start `dialecte mutants run` as a background run of your harness (the cli has no
275
+ background flag): the run is written `running` in the store before Stryker starts, so a killed session leaves a
276
+ `died` run, never nothing. Go on working (to wait on it: Waiting on a long run, above). A hand-over does not wait
277
+ for it, except a `gate` lot's; a merge does.
278
+ - **Before every hand-over and every merge: `dialecte mutants status`.** Pending items block the card and the
279
+ `handover run` guard: `new` survivors of the package (whatever their lot), `died` runs, and a `running` run of the
280
+ branch for a merge or a `gate` lot (on a plain hand-over it is a `!`). `scheduled` survivors belong to their
281
+ follow-up lot and do not block.
282
+ - **Judge one file at a time**: `dialecte mutants judge [--file <file>] --json` gives each file's packet (code,
283
+ covering tests, a family guess). Per survivor, one of:
284
+ - a test that kills it (a `gap`: red first like any test), then run again;
285
+ - `dialecte mutants record --key <key> --family <family> --reason "<why>"`, the reason saying in 200 characters at
286
+ most why no tested behaviour changes. An `invariant-guard` or `fallback-never-taken` also gets a follow-up lot
287
+ that deletes the guard or tightens the type: `dialecte mutants schedule <follow-up lot> <key>` first, then
288
+ `record ... --removable` (a scheduled survivor keeps its follow-up when recorded; a recorded one can no longer be
289
+ scheduled);
290
+ - `dialecte mutants schedule <follow-up lot> <key>` when another lot owns it.
291
+
292
+ The families are a closed list, the words of the judgment: `invariant-guard` (a check the types, or internal
293
+ callers only, already guarantee), `fallback-never-taken` (a default no input reaches), `exhaustive-default` (the
294
+ default of a switch that covers every case), `no-op-on-empty` (a skip of work that would do nothing),
295
+ `perf-shortcut` (a cache or an early exit that only saves time), `static-init` (module-level setup),
296
+ `schema-default-read` (a read of a value the schema already defaults), `wording` (message or log text). None
297
+ fits: it is a `gap`. Judge on the standard tier; the strong tier only for a `gap` with no obvious test.
298
+
299
+ - **The cli is the only writer** of `.dialecte/mutation-records.json` and of the store under
300
+ `<git-common-dir>/dialecte-mutation/`: never edit either by hand (nor anything else under `.git`).
301
+ - **Runs**: a `died` run is rerun, or `dialecte mutants abandon <run id>`; `dialecte mutants drop <run id>` removes
302
+ only an abandoned run or a reported one the ledger took in.
303
+ - **Full audit** (`dialecte mutants run --mode audit`): before a release or on request, in the background; its
304
+ survivors are scheduled as named follow-up lots, not fixed in the release.
305
+
306
+ A lot that builds tooling with shared state or drives an external tool has its own traps (plan it as a transition
307
+ table, one real run in a scratch clone, cited third-party values): [references/traps.md](references/traps.md), Tools
308
+ with shared state.
264
309
 
265
310
  ## Cross-package changes
266
311
 
@@ -288,11 +333,11 @@ core has `dialecte`, `dialecte-contributing` and `dialecte-lot`, create `dialect
288
333
  package its own `dialecte-<id>` with the knowledge of its schema. A skill changes in the same PR as the code it describes - never
289
334
  in another repository afterwards. `@dialecte/cli` maintains them:
290
335
 
291
- | Command | Does |
292
- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
293
- | `dialecte skills sync` | installs the skills of the app's dependencies into `.claude/skills` + `.agents/skills` (`--agent claude,copilot,agents`, `--copy`); `--from <workspace>` takes them from local checkouts |
294
- | `dialecte skills generate` | rewrites the `<!-- dialecte-skills:generated ... -->` blocks (verb map, method and export index, hook files) from the source |
295
- | `dialecte skills check` | frontmatter, links, and every API / path / npm script a page cites must exist; generated blocks must be fresh; every public function and method has a JSDoc summary and an `@intent`; `--workspace <dir>` also verifies pages that describe several repositories |
336
+ | Command | Does |
337
+ | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
338
+ | `dialecte skills sync` | installs the skills of the app's dependencies into `.claude/skills` + `.agents/skills` (`--agent claude,copilot,agents`, `--copy`); consumer skills only unless `--contributing` (remembered); `--from <workspace> --contributing` takes every skill from local checkouts |
339
+ | `dialecte skills generate` | rewrites the `<!-- dialecte-skills:generated ... -->` blocks (verb map, method and export index, hook files) from the source |
340
+ | `dialecte skills check` | frontmatter, links, and every API / path / npm script a page cites must exist; generated blocks must be fresh; every public function and method has a JSDoc summary and an `@intent`; `--workspace <dir>` also verifies pages that describe several repositories |
296
341
 
297
342
  Write claims so the check can verify them: API as `query.<method>` / `tx.<ns>.<verb>`, paths
298
343
  relative to a package, scripts as `npm run <script>`. A deliberate mention of something outside the package goes in
@@ -311,6 +356,7 @@ during import (import is in-memory two-pass by design, see the hooks rules in th
311
356
  - Add a domain rule to core because it was convenient.
312
357
  - Restate a registry or the definition by hand (see code-rules).
313
358
  - Commit, push, or touch a repo's git index while a hand-over script may be running.
359
+ - Name a tool that consumes the package in a committed file or message ([code-rules](references/code-rules.md)).
314
360
  - Leave a known improvement as a "note for later" without doing it or explaining why you cannot.
315
361
 
316
362
  ## Retro gate - before you hand over
@@ -320,7 +366,7 @@ and every correction the user made that a skill should have prevented. Then:
320
366
 
321
367
  - **Inside a dialecte repository**: draft each skill edit as before/after and show it to the user; an
322
368
  approved edit goes in the same change (skills ship with the package that owns the code), through
323
- `anthropic-skills:skill-creator` loaded with the Skill tool - the eval case first, failing on the text
369
+ the skill-creator skill (`anthropic-skills:skill-creator`) loaded - the eval case first, failing on the text
324
370
  before the change, as `dialecte-lot` describes - then `npm run skills:generate` and `npm run skills:check`.
325
371
  - **In an app**: draft an issue for the package that ships the skill - the statement that was wrong
326
372
  or missing, the evidence (file, behaviour), the wording you propose - and show it to the user.
@@ -77,6 +77,13 @@ does not name.
77
77
  review comment. Write the rule itself ("a name stays unique among its siblings"). Citations
78
78
  live only in uncommitted plan notes. Naming the standard a library implements (site tagline, the
79
79
  XSD it is generated from, the namespace prefixes of the schema, the schema's version ids) is not a citation. Never quote the standard's text anywhere (copyright).
80
+ - **No name of a tool that consumes the package** (an app, a pipeline or a product built on a dialecte) in
81
+ any committed file or commit message - code, comments, tests, skill text and its evals, docs, CHANGELOG. A
82
+ dialecte serves every app alike: say what the behaviour is, not who asked for it ("an app", "a consumer").
83
+ The names live on the machine only, `git config --global dialecte.consumerNames "<name>, <name>"`, never in a
84
+ repository; from cli 0.3.0, `dialecte rules` and `dialecte handover` refuse each as a whole word in a
85
+ contributor package (`consumer tool name`). A file your lot touches that already names one is refused too:
86
+ reword that line only, and list it in the hand-over.
80
87
  - Do not create documentation that was not asked for, beyond the docs + CHANGELOG the Definition
81
88
  of Done requires.
82
89
 
@@ -40,9 +40,10 @@ workspace root, outside every repo); the hand-over files are written next to it
40
40
  unstages those files, with its `cd`: give it to the user.
41
41
  - **Guards**, checked when the folder is written (nothing is written on a refusal) and again when it
42
42
  runs: the branch and HEAD, the hooks folder `core.hooksPath` names exists (a missing one makes git skip
43
- every hook), `lots.json` as reviewed, an empty index, every changed file in exactly one lot, no plan tag or standard citation in
44
- a lot's files (skill evals and test fixtures included) nor in its messages; when it runs, every file
45
- against the snapshot taken when it was written, and no other file changed.
43
+ every hook), `lots.json` as reviewed, an empty index, every changed file in exactly one lot, no plan tag, standard citation or (from cli 0.3.0) name of a
44
+ consuming tool in a lot's files (skill evals and test fixtures included) nor in its messages; when it runs, every file
45
+ against the snapshot taken when it was written, and no other file changed; and, in a contributor package (cli 0.3.0), a green `dialecte contrib` record of the tree the lots
46
+ leave (guard `contrib`; a rehearsal runs contrib in its clone when there is none).
46
47
  - **The folder**: the lots file, the snapshot (`files.txt`, `files.sha256`, `files.deleted`) and a one-line
47
48
  `commit.sh` that runs `npx --no-install @dialecte/cli handover run <folder>` (it re-executes itself with
48
49
  bash: people run it with `sh`). Nothing per lot. The repository stays locked for `dialecte gate` until
@@ -78,6 +79,9 @@ as the behaviour for a reader of the history. No plan/ticket tags, no standard c
78
79
 
79
80
  ## Hand-over message
80
81
 
81
- The message is the card `dialecte handover` printed - repository, worktree, branch, HEAD, gates, the lots
82
- with their files and messages, and the command to run with its absolute `cd` - pasted as printed, never
83
- retyped; then what was not verified.
82
+ From cli 0.3.1 the message points at the hand-over, it does not carry it: `READY`, then
83
+ `cd <worktree> && npx dialecte handover show <name>` (the card recomputed from the records, current whenever
84
+ it is read) and `npx dialecte handover run <name>` (what the person runs); then what was not verified. Never
85
+ a pasted or retyped card: it goes stale as soon as a record changes. With an older cli, the message is the
86
+ card `dialecte handover` printed - repository, worktree, branch, HEAD, gates, the lots with their files and
87
+ messages, and the command to run with its absolute `cd` - pasted as printed, never retyped.
@@ -0,0 +1,45 @@
1
+ <!-- dialecte-skills workspace -->
2
+
3
+ # A lot in a dialecte package
4
+
5
+ The `dialecte-lot` stations run the same in every repository. In a dialecte package - `"dialecte": { "profile":
6
+ "contributor" }` in its `package.json`: core, a dialecte, create, cli - they gain the steps below. An app runs none
7
+ of them: its lot ends at the hand-over.
8
+
9
+ ## Station 0 - the mutation switch
10
+
11
+ - **Mutation switch** (a package that declares a mutation scope): the orchestrator sets it per lot in the worktree's
12
+ `.dialecte/lot.json` with `dialecte lot mutation <mode>` and names it in the brief - the default (`changed` when the
13
+ diff touches the scope, `off` otherwise) for most lots, `gate` only for a robustness lot (its hand-over waits for
14
+ a run reported on the tree it commits: it runs again after the last fix), `audit` on request. The implementer
15
+ starts `dialecte mutants run` in the background once green and judges the survivors as [SKILL.md](../SKILL.md)
16
+ (Mutation testing) says. Before a release, a full audit in the background;
17
+ its survivors become named follow-up lots (`dialecte mutants schedule <follow-up lot> <key>`).
18
+
19
+ ## Station 2 - `dialecte rules`
20
+
21
+ With the fast gate, run `npx dialecte rules` from the package root and fix every error before the review; answer
22
+ every warning ([code-rules.md](code-rules.md)). The implement report's `Gates:` line adds
23
+ `rules <n errors, m warnings>`.
24
+
25
+ ## Station 5 - `dialecte contrib` after the full gate
26
+
27
+ From `@dialecte/cli` 0.3.0, once `gate --full` is green, run `npx dialecte contrib`: `rules` on the files changed
28
+ against HEAD, the package's contrib steps (by default the docs build, its generated docs restored, and the type
29
+ bench), `release` (no dependency named by a local folder) and `mutation` when a scope is declared. A step the full
30
+ gate passed on the same tree and install is not run again (`reused from gate --full`). Paste its lines with the
31
+ gate's. The hand-over's `contrib` guard refuses a tree without a green record of it; a rehearsal runs it in its
32
+ scratch clone when there is none.
33
+
34
+ ## Station 6 - mutation, landing, merges
35
+
36
+ - The landing rules apply: [landing-changes.md](landing-changes.md) (lots, guards, rehearsal, merge lots).
37
+ - In a package with a mutation scope, run `dialecte mutants status`
38
+ before every hand-over and every merge: a `new` survivor or a `died` run blocks the card and the guard until it is
39
+ handled ([SKILL.md](../SKILL.md), Mutation testing); the lot's own run still running blocks only a merge or a `gate`
40
+ lot (on a plain hand-over it is a `!`).
41
+ - A merge onto a main that moved since the cut leaves a tree no check has seen: it is rehearsed. The branch's green
42
+ records say nothing about it - not its suite, nor a gate step the hook does not run (docs, skills check, the
43
+ browser suite). The rehearsal's hook runs the suite on the merged tree; run only the steps the hook does not run,
44
+ in the clone `--rehearse --keep` leaves, never a `gate --full` that would run the suite there again. A `reused`
45
+ line for such a merge is a cli bug to report, never a result to pass on.
@@ -36,4 +36,5 @@ before measuring, or you measure old code.
36
36
  ## Reading results
37
37
 
38
38
  Explain a delta before acting on it. Compare against the previous commit on the same machine,
39
- same fixture, several runs; keep heavy runs one at a time on shared machines.
39
+ same fixture, several runs; a timed bench runs alone, its load recorded beside the numbers: beside another
40
+ suite its timings mean nothing (tests, unlike benches, run at full parallelism whatever the load).
@@ -72,6 +72,26 @@ ran what you think it ran.
72
72
  - `dialecte-xmlfmt` reformats `/* xml */` template literals; it can mangle a nested template
73
73
  literal - check the diff.
74
74
 
75
+ ## Tools with shared state
76
+
77
+ For a lot that builds tooling (the cli above all) rather than engine code. Each trap cost a lot several review rounds.
78
+
79
+ - **A store several runs share** (a ledger, a records file, a run store, a cache, a lock) planned as prose is wrong
80
+ in ways only interleavings show: two runs finishing in either order, overlapping runs, a crash between two writes,
81
+ a dead or reused owner. The plan writes it as a transition table (event, from, to, condition), its invariant
82
+ ("an item leaves pending only by ...") and the list of interleavings; the test station writes one forced-order
83
+ test per interleaving before any code. Liveness is the process id plus its start time read in UTC, never the id
84
+ alone.
85
+ - **A fake runner proves the wiring, not the integration.** A lot that drives an external tool (StrykerJS, vitest,
86
+ git, npm) records one real run on a known target with its expected numbers before the hand-over, in `SMOKE.md` in
87
+ the hand-over folder.
88
+ - **That run happens in a scratch `git clone`** (its own `.git`), never a worktree of a real repository: worktrees
89
+ share the git folder, so a store under it (`dialecte-mutation/`, the check records) takes the experiment's state
90
+ and blocks the next real hand-over. State that landed in a real store anyway is cleared through the cli only.
91
+ - **A value a third-party tool produces or consumes** (a report field, a column, a config key) is pinned by a test
92
+ that cites its source: a file and line of the tool, or a recorded real run. A shape from memory merged once one
93
+ column off.
94
+
75
95
  ## Shell
76
96
 
77
97
  - zsh does not word-split `$FILES`: `git diff -- $FILES` with a space-separated list addresses one