@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.
- package/dist/assets/hub.worker-35vzG0HK.js +2 -0
- package/dist/dialecte/create-dialecte-project.d.ts +1 -2
- package/dist/dialecte/create-dialecte-project.d.ts.map +1 -1
- package/dist/dialecte/create-project-factory.d.ts +5 -5
- package/dist/dialecte/create-project-factory.d.ts.map +1 -1
- package/dist/dialecte/define-dialecte.d.ts +2 -2
- package/dist/dialecte/dialecte.types.d.ts +11 -23
- package/dist/dialecte/dialecte.types.d.ts.map +1 -1
- package/dist/{dialecte-gIPrRzni.js → dialecte-oAXwOG-Q.js} +1182 -1203
- package/dist/document/document.d.ts +1 -1
- package/dist/document/types.extensions.d.ts.map +1 -1
- package/dist/{engine-store-CIEqgPUb.js → engine-store-Deo9XNhr.js} +21 -21
- package/dist/engine.constants-Bi4gw6BR.js +205 -0
- package/dist/errors/{codes.d.ts → codes.constants.d.ts} +33 -105
- package/dist/errors/{codes.d.ts.map → codes.constants.d.ts.map} +1 -1
- package/dist/errors/core-codes.constants.d.ts +3 -0
- package/dist/errors/core-codes.constants.d.ts.map +1 -0
- package/dist/errors/errors.constants.d.ts +5 -0
- package/dist/errors/errors.constants.d.ts.map +1 -1
- package/dist/errors/errors.d.ts.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/types.d.ts +1 -1
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/{helpers-DVShv41E.js → helpers-D8p0KiJu.js} +1 -1
- package/dist/helpers.js +2 -2
- package/dist/{in-process-link-DBeAOZRp.js → in-process-link-B-TCHrlb.js} +996 -993
- package/dist/index.js +8 -7
- package/dist/project/index.d.ts +1 -1
- package/dist/project/index.d.ts.map +1 -1
- package/dist/project/io/store-runtime.types.d.ts +1 -3
- package/dist/project/io/store-runtime.types.d.ts.map +1 -1
- package/dist/project/project.d.ts +13 -15
- package/dist/project/project.d.ts.map +1 -1
- package/dist/project/types.d.ts +24 -19
- package/dist/project/types.d.ts.map +1 -1
- package/dist/{project-key-Ch34EtFa.js → project-key-2ccZ-0gu.js} +195 -205
- package/dist/running-operations-DCKvzlU7.js +107 -0
- package/dist/{same-json-value-C6kUaoyt.js → same-json-value-_AChwM_n.js} +41 -41
- package/dist/sqlite-engine.d.ts +7 -0
- package/dist/sqlite-engine.d.ts.map +1 -0
- package/dist/{engine.js → sqlite-engine.js} +4136 -4075
- package/dist/sqlite.d.ts +27 -2
- package/dist/sqlite.d.ts.map +1 -1
- package/dist/sqlite.js +1118 -917
- package/dist/store/in-memory/in-memory-state.constants.d.ts +14 -0
- package/dist/store/in-memory/in-memory-state.constants.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-state.d.ts +0 -4
- package/dist/store/in-memory/in-memory-state.d.ts.map +1 -1
- package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
- package/dist/store/in-memory/types.d.ts +1 -2
- package/dist/store/in-memory/types.d.ts.map +1 -1
- package/dist/store/index.d.ts +2 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/lost-write.d.ts +8 -8
- package/dist/store/lost-write.d.ts.map +1 -1
- package/dist/store/lost-write.types.d.ts +1 -1
- package/dist/store/lost-write.types.d.ts.map +1 -1
- package/dist/store/{engine/project-key.d.ts → project-key.d.ts} +0 -5
- package/dist/store/project-key.d.ts.map +1 -0
- package/dist/store/resolve-store.d.ts +6 -18
- package/dist/store/resolve-store.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/in-process-link.constants.d.ts +12 -0
- package/dist/store/sqlite/adapter/in-process-link.constants.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/in-process-link.d.ts +1 -1
- package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts +12 -11
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/sqlite-connector.types.d.ts +7 -0
- package/dist/store/sqlite/adapter/sqlite-connector.types.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -3
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +12 -1
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +2 -2
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +1 -1
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -1
- package/dist/store/sqlite/engine/engine.types.d.ts +2 -2
- package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -1
- package/dist/store/sqlite/engine/schema.d.ts.map +1 -1
- package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -1
- package/dist/store/{hub-public.d.ts → sqlite/hub-public.d.ts} +9 -9
- package/dist/store/sqlite/hub-public.d.ts.map +1 -0
- package/dist/store/sqlite/packaging/engine-packaging.constants.d.ts +15 -0
- package/dist/store/sqlite/packaging/engine-packaging.constants.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/engine-control-loop.d.ts +11 -0
- package/dist/store/sqlite/runtime/engine-control-loop.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/install-pool.d.ts +1 -1
- package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -1
- package/dist/store/sqlite/runtime/progress-beat.d.ts +1 -1
- package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -1
- package/dist/store/sqlite/runtime/runtime.types.d.ts +4 -2
- package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -1
- package/dist/store/sqlite/runtime/serve-sqlite-engine.d.ts +9 -0
- package/dist/store/sqlite/runtime/serve-sqlite-engine.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/serve-sqlite-engine.types.d.ts +27 -0
- package/dist/store/sqlite/runtime/serve-sqlite-engine.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/client/check-engine-wire.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/client/client.constants.d.ts +3 -3
- package/dist/store/sqlite/served/client/client.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/client/client.types.d.ts +13 -8
- package/dist/store/sqlite/served/client/client.types.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/client/engine-client.d.ts +1 -1
- package/dist/store/sqlite/served/client/engine-client.d.ts.map +1 -0
- package/dist/store/sqlite/served/client/engine-control.d.ts.map +1 -0
- package/dist/store/sqlite/served/client/heartbeat-watch.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/client/hub-connector.d.ts +1 -1
- package/dist/store/sqlite/served/client/hub-connector.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/client/hub-connector.types.d.ts +6 -7
- package/dist/store/sqlite/served/client/hub-connector.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/client/worker-connector.d.ts.map +1 -0
- package/dist/store/sqlite/served/creation-refusal.d.ts.map +1 -0
- package/dist/store/sqlite/served/dialecte-refusal.d.ts +19 -0
- package/dist/store/sqlite/served/dialecte-refusal.d.ts.map +1 -0
- package/dist/store/sqlite/served/engine-lock.d.ts +6 -0
- package/dist/store/sqlite/served/engine-lock.d.ts.map +1 -0
- package/dist/store/sqlite/served/engine-store.constants.d.ts +3 -0
- package/dist/store/sqlite/served/engine-store.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/engine-store.d.ts +6 -6
- package/dist/store/sqlite/served/engine-store.d.ts.map +1 -0
- package/dist/store/sqlite/served/engine-store.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/engine.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/engine.types.d.ts +2 -4
- package/dist/store/sqlite/served/engine.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/host/changed.d.ts +5 -0
- package/dist/store/sqlite/served/host/changed.d.ts.map +1 -0
- package/dist/store/sqlite/served/host/engine-wire.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/host/heartbeat.d.ts +1 -1
- package/dist/store/sqlite/served/host/heartbeat.d.ts.map +1 -0
- package/dist/store/sqlite/served/host/host.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/host/host.types.d.ts +4 -3
- package/dist/store/sqlite/served/host/host.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/host/store-events.constants.d.ts +9 -0
- package/dist/store/sqlite/served/host/store-events.constants.d.ts.map +1 -0
- package/dist/store/sqlite/served/host/store-events.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-client.constants.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-client.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/hub/hub-client.types.d.ts +2 -9
- package/dist/store/sqlite/served/hub/hub-client.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-protocol.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-router.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-shell.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-shell.types.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/hub/hub.constants.d.ts +3 -3
- package/dist/store/sqlite/served/hub/hub.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/hub/hub.types.d.ts +2 -2
- package/dist/store/sqlite/served/hub/hub.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub.worker.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/realm-host.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/hub/realm-host.types.d.ts +3 -3
- package/dist/store/sqlite/served/hub/realm-host.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/wire/error-envelope.d.ts.map +1 -0
- package/dist/store/sqlite/served/wire/wire-values.d.ts.map +1 -0
- package/dist/store/sqlite/served/wire/wire.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/wire/wire.types.d.ts +1 -1
- package/dist/store/sqlite/served/wire/wire.types.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-connector-params.d.ts +13 -0
- package/dist/store/sqlite/sqlite-connector-params.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-engine-registration.d.ts +30 -0
- package/dist/store/sqlite/sqlite-engine-registration.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-error-entry.d.ts +10 -0
- package/dist/store/sqlite/sqlite-error-entry.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-errors.constants.d.ts +110 -0
- package/dist/store/sqlite/sqlite-errors.constants.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-errors.types.d.ts +7 -0
- package/dist/store/sqlite/sqlite-errors.types.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-storage-kind.constants.d.ts +10 -0
- package/dist/store/sqlite/sqlite-storage-kind.constants.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-storage-kind.d.ts +3 -0
- package/dist/store/sqlite/sqlite-storage-kind.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-storage.constants.d.ts +24 -0
- package/dist/store/sqlite/sqlite-storage.constants.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-storage.types.d.ts +27 -0
- package/dist/store/sqlite/sqlite-storage.types.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-store-of.d.ts +8 -3
- package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -1
- package/dist/store/storage-kinds.constants.d.ts +16 -0
- package/dist/store/storage-kinds.constants.d.ts.map +1 -0
- package/dist/store/storage-kinds.d.ts +43 -0
- package/dist/store/storage-kinds.d.ts.map +1 -0
- package/dist/store/storage-kinds.types.d.ts +46 -0
- package/dist/store/storage-kinds.types.d.ts.map +1 -0
- package/dist/store/store.types.d.ts +6 -4
- package/dist/store/store.types.d.ts.map +1 -1
- package/dist/test/create-test-dialecte.constants.d.ts +4 -0
- package/dist/test/create-test-dialecte.constants.d.ts.map +1 -0
- package/dist/test/create-test-dialecte.d.ts.map +1 -1
- package/dist/test/test-storage/index.d.ts +1 -1
- package/dist/test/test-storage/index.d.ts.map +1 -1
- package/dist/test/test-storage/sqlite-test-store.d.ts +15 -0
- package/dist/test/test-storage/sqlite-test-store.d.ts.map +1 -0
- package/dist/test/test-storage/test-storage.types.d.ts +12 -0
- package/dist/test/test-storage/test-storage.types.d.ts.map +1 -1
- package/dist/test/test-storage/test-store-for.d.ts +18 -6
- package/dist/test/test-storage/test-store-for.d.ts.map +1 -1
- package/dist/test/test-storage/test-store-providers.constants.d.ts +8 -0
- package/dist/test/test-storage/test-store-providers.constants.d.ts.map +1 -0
- package/dist/test/test-storage/test-store-providers.d.ts +11 -0
- package/dist/test/test-storage/test-store-providers.d.ts.map +1 -0
- package/dist/test.js +797 -763
- package/dist/types/dialecte-config.d.ts.map +1 -1
- package/dist/{utils-USNkj4sT.js → utils-Cv4oHia0.js} +63 -137
- package/dist/utils.js +1 -1
- package/package.json +16 -22
- package/skills/dialecte/SKILL.md +84 -15
- package/skills/dialecte/references/api.json +88 -61
- package/skills/dialecte/references/api.md +461 -459
- package/skills/dialecte/references/core-api.md +43 -15
- package/skills/dialecte-contributing/SKILL.md +94 -48
- package/skills/dialecte-contributing/references/code-rules.md +7 -0
- package/skills/dialecte-contributing/references/landing-changes.md +10 -6
- package/skills/dialecte-contributing/references/lot-in-a-package.md +45 -0
- package/skills/dialecte-contributing/references/perf.md +2 -1
- package/skills/dialecte-contributing/references/traps.md +20 -0
- package/skills/dialecte-lot/SKILL.md +106 -51
- package/skills/dialecte-lot/references/briefs.md +18 -9
- package/skills/dialecte-lot/references/model-tiers.md +3 -3
- package/skills/dialecte-lot/references/standard-check.md +45 -0
- package/skills/dialecte-lot/references/stations.md +110 -0
- package/dist/assets/hub.worker-B1HcVDhn.js +0 -2
- package/dist/engine.constants-DBMjMmV9.js +0 -98
- package/dist/engine.d.ts +0 -9
- package/dist/engine.d.ts.map +0 -1
- package/dist/running-operations-vnijBvn7.js +0 -76
- package/dist/store/engine/client/check-engine-wire.d.ts.map +0 -1
- package/dist/store/engine/client/client.constants.d.ts.map +0 -1
- package/dist/store/engine/client/client.types.d.ts.map +0 -1
- package/dist/store/engine/client/engine-client.d.ts.map +0 -1
- package/dist/store/engine/client/engine-control.d.ts.map +0 -1
- package/dist/store/engine/client/heartbeat-watch.d.ts.map +0 -1
- package/dist/store/engine/client/hub-connector.d.ts.map +0 -1
- package/dist/store/engine/client/hub-connector.types.d.ts.map +0 -1
- package/dist/store/engine/client/worker-connector.d.ts.map +0 -1
- package/dist/store/engine/creation-refusal.d.ts.map +0 -1
- package/dist/store/engine/dialecte-refusal.d.ts +0 -18
- package/dist/store/engine/dialecte-refusal.d.ts.map +0 -1
- package/dist/store/engine/engine-store.d.ts.map +0 -1
- package/dist/store/engine/engine-store.types.d.ts.map +0 -1
- package/dist/store/engine/engine.constants.d.ts.map +0 -1
- package/dist/store/engine/engine.types.d.ts.map +0 -1
- package/dist/store/engine/host/engine-wire.d.ts.map +0 -1
- package/dist/store/engine/host/heartbeat.d.ts.map +0 -1
- package/dist/store/engine/host/host.constants.d.ts.map +0 -1
- package/dist/store/engine/host/host.types.d.ts.map +0 -1
- package/dist/store/engine/host/store-events.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-client.constants.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-client.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-client.types.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-protocol.types.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-router.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-shell.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-shell.types.d.ts.map +0 -1
- package/dist/store/engine/hub/hub.constants.d.ts.map +0 -1
- package/dist/store/engine/hub/hub.types.d.ts.map +0 -1
- package/dist/store/engine/hub/hub.worker.d.ts.map +0 -1
- package/dist/store/engine/hub/realm-host.d.ts.map +0 -1
- package/dist/store/engine/hub/realm-host.types.d.ts.map +0 -1
- package/dist/store/engine/project-key.d.ts.map +0 -1
- package/dist/store/engine/wire/error-envelope.d.ts.map +0 -1
- package/dist/store/engine/wire/wire-values.d.ts.map +0 -1
- package/dist/store/engine/wire/wire.constants.d.ts.map +0 -1
- package/dist/store/engine/wire/wire.types.d.ts.map +0 -1
- package/dist/store/hub-public.d.ts.map +0 -1
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +0 -16
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +0 -1
- package/dist/store/sqlite-storage.constants.d.ts +0 -14
- package/dist/store/sqlite-storage.constants.d.ts.map +0 -1
- package/dist/store/sqlite-storage.d.ts +0 -22
- package/dist/store/sqlite-storage.d.ts.map +0 -1
- package/dist/store/sqlite-storage.types.d.ts +0 -24
- package/dist/store/sqlite-storage.types.d.ts.map +0 -1
- package/dist/test/test-dialecte.worker.d.ts +0 -2
- package/dist/test/test-dialecte.worker.d.ts.map +0 -1
- /package/dist/store/{engine → sqlite/served}/client/check-engine-wire.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/client/engine-control.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/client/heartbeat-watch.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/client/worker-connector.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/creation-refusal.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/engine-store.types.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/engine.constants.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/host/engine-wire.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/host/host.constants.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/host/store-events.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-client.constants.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-client.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-protocol.types.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-router.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-shell.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-shell.types.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub.worker.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/realm-host.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/wire/error-envelope.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/wire/wire-values.d.ts +0 -0
- /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: '
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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
|
-
|
|
83
|
-
|
|
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)
|
|
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
|
|
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). `--
|
|
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.
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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 "[
|
|
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
|
|
226
|
-
|
|
227
|
-
|
|
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
|
|
263
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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;
|
|
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
|