diff options
| author | Adam Malczewski <[email protected]> | 2026-06-04 22:14:36 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-04 22:14:36 +0900 |
| commit | a6119e0434597399c773da6f0b31363003f6aa09 (patch) | |
| tree | 46efb86279b446ba286e7ebb02db95d6dae3bc35 /.dispatch | |
| parent | 394f1ed37ce860da6fdc385769bf29f9737105cd (diff) | |
| download | dispatch-a6119e0434597399c773da6f0b31363003f6aa09.tar.gz dispatch-a6119e0434597399c773da6f0b31363003f6aa09.zip | |
chore: scaffold monorepo + AI harness (constitution, rules, glossary, kernel stub)
Diffstat (limited to '.dispatch')
| -rw-r--r-- | .dispatch/rules/kernel-purity.md | 6 | ||||
| -rw-r--r-- | .dispatch/rules/no-internal-mocks.md | 7 | ||||
| -rw-r--r-- | .dispatch/rules/one-owner.md | 6 | ||||
| -rw-r--r-- | .dispatch/rules/pure-core.md | 6 | ||||
| -rw-r--r-- | .dispatch/rules/typed-handles.md | 7 |
5 files changed, 32 insertions, 0 deletions
diff --git a/.dispatch/rules/kernel-purity.md b/.dispatch/rules/kernel-purity.md new file mode 100644 index 0000000..cdd975b --- /dev/null +++ b/.dispatch/rules/kernel-purity.md @@ -0,0 +1,6 @@ +# Rule: kernel purity + +The kernel touches NO I/O and names NO concrete feature. +Forbidden in `packages/kernel`: `node:fs`, `bun:sqlite`, `node:child_process`, +`fetch`/network, and any import of a concrete tool/provider/extension. +Need an effect? It belongs in an extension, injected through a contract. diff --git a/.dispatch/rules/no-internal-mocks.md b/.dispatch/rules/no-internal-mocks.md new file mode 100644 index 0000000..20c1f99 --- /dev/null +++ b/.dispatch/rules/no-internal-mocks.md @@ -0,0 +1,7 @@ +# Rule: no internal mocks + +A unit test that mocks one of OUR OWN modules (`@dispatch/*`) is a DESIGN BUG, +not a test to write. Move the decision logic to a pure function and inject the +effect, then test the pure function directly. +Mocking the OUTERMOST edge (real network, real clock) is the only allowed mock. +Kernel + pure-core packages must reach ZERO internal mocks. diff --git a/.dispatch/rules/one-owner.md b/.dispatch/rules/one-owner.md new file mode 100644 index 0000000..04fec56 --- /dev/null +++ b/.dispatch/rules/one-owner.md @@ -0,0 +1,6 @@ +# Rule: one owner per unit + +You may ONLY edit the files you were explicitly assigned. No exceptions. +To change another unit, do NOT edit it — write the requested change into your +report (`reports/<unit>.md`) for the orchestrator to dispatch. +You see other units' CONTRACTS, never their implementation. diff --git a/.dispatch/rules/pure-core.md b/.dispatch/rules/pure-core.md new file mode 100644 index 0000000..27edd0e --- /dev/null +++ b/.dispatch/rules/pure-core.md @@ -0,0 +1,6 @@ +# Rule: pure core / imperative shell + +Decision logic is pure (input → output), no I/O, no ambient state. +Effects (fs, db, shell, network, clock, random) are injected at the edges. +If a function reaches for a global/singleton instead of receiving it, refactor. +This is for testability, not purity dogma — stop where it would only add ceremony. diff --git a/.dispatch/rules/typed-handles.md b/.dispatch/rules/typed-handles.md new file mode 100644 index 0000000..00c539d --- /dev/null +++ b/.dispatch/rules/typed-handles.md @@ -0,0 +1,7 @@ +# Rule: typed handles, no string-keyed coupling + +Every cross-extension coupling is anchored to an exported TYPED symbol: +hook descriptors (`defineHook<T>(...)`) and service handles, never a raw string +at the consumer site. A string-keyed cross-feature lookup must be a compile +error, so `lsp references` on the symbol returns the true blast radius. +Exception: the kernel routing a tool-call by name (that's data, not a code ref). |
