Jochen asked whether the order made sense. It did not -- it followed when things happened to be decided, which after consolidation is fictional anyway since record 5 alone folds decisions taken across a week. Concretely wrong before: the domain statement sat at 8, after five engineering rules; the constitution was scattered across 5, 12 and 17; the tiers landed at 15, 16, 21 and 22 with process records in between. Now it walks: what the mesh is (1-3), its tiers from the bottom up (4-8), what runs on them and how it gets there (9-10), how it is built (11-16), how it is checked (17-18), how we work (19-23). Two things made this safe rather than free. It is a permutation, not a compaction, so the renames go through temporary names -- otherwise two files want one slot and one is lost. And the reference rewrite is a single simultaneous pass, because almost every number moved into a slot another number was vacating; replacing one at a time would have cascaded and pointed things at the wrong record while still resolving. Verified: 284 [ADR NNNN](path) links across the repository, all with matching text and target. The ordering principle is now stated in 19 rather than left implicit -- the repository already said "the numbering is the flow" about its folders, and there was no reason for the records to be the exception.
3.0 KiB
3.0 KiB
status, initiated, touches, became
| status | initiated | touches | became | ||||
|---|---|---|---|---|---|---|---|
| active | 2026-08-22 |
|
|
001 — Module domain decomposition
- Initiated by: jochen, 2026-08-22
- Areas touched: every
hal/*andnoxflow/*module; the pipeline's dependency graph; the knowledge base; agent identity and credentials.
Summary
HAL has 124 modules. That number is not a maintenance problem in itself — it is the symptom of missing bounded contexts. Modules are split not because they model different domains, but because splitting is the only lever the platform offers:
- no way to run one daemon on one node without making it a module
(
hal/claude-licences— one daemon, single-node) - no way to expose two of a kind from one module
- no namespace separating the mesh from the software it runs
This effort establishes the current state, the ideal state, and the sequence between them.
Trigger
A night of debugging that produced four fixes and one conclusion. Every fault was a boundary fault:
- Per-agent Claude credentials had to be written by the noxflow runtime, because
agents.claude_accountis in noxflow's database — even though agent identity is a mesh concept and node identity already lives in the mesh registry. - Whether
hal/brainmay depend on noxflow took three attempts to answer, twice wrongly, because the ownership boundary was never stated. - Authoritative documentation existed in
mesh_docsand was not found, while a proposal in repo markdown was invisible to search entirely.
Decisions taken (2026-08-22)
| Question | Decision |
|---|---|
| What should noxflow become? | Decompose into hal/* modules; noxflow returns to tasks/workflows |
| Who owns agent identity? | hal/agents — a mesh concept, alongside nodes |
| Where do third-party apps live? | Out of this repo. They run on the mesh; they are not of it |
| Knowledge structure | Modelled on papa-hq; implementation choice left open |
Open questions
Tracked in analysis.md under "Open questions".
Deliberately not decided
Recorded so they are not mistaken for oversights. Each is open, and each comes out of
ADR 0001; this effort stays
active until they are answered.
| Question | Status |
|---|---|
hal/scheduler — infrastructure, or part of the work context. |
Open. |
| Which context owns the executor. | Open. |
| Catalogue destination — one repository or many. | Open. Phase 4. |
| What the shared library keeps after extraction. | Open. Phase 3. |
| Where human agent modality is recorded — which user, on which node, a human agent acts as. | Open. Required by the model; not yet stored. |
| Which domains the modules outside the platform core group into. | Open, from ADR 0009, which settles the principle and deliberately not the list. |