Design 55: the knowledge base keeps its records on the bus and is written and reviewed by section (ADR 0592), so a long record is judged whole and a draft lives only in the knowledge base
The glossary gains section, draft, form-only version and search index, and the homonyms section and draft.
This commit is contained in:
+19
-2
@@ -967,7 +967,7 @@ and no session (ADR 0278), in its plain sense.
|
||||
|
||||
Not a domain of the mesh but of the way it is built, listed because its words meet the mesh's.
|
||||
**Recorded in** this repository, the issue tracker and the knowledge base. **Decided by** ADR 0019, 0080, 0244, 0275,
|
||||
0284, 0290, 0291, 0423, 0424.
|
||||
0284, 0290, 0291, 0423, 0424, 0592.
|
||||
|
||||
- **research effort**, **graduation**, **hand-off**, **playbook** — an investigation, held whole in the
|
||||
knowledge base and named "research NNN";
|
||||
@@ -985,7 +985,20 @@ Not a domain of the mesh but of the way it is built, listed because its words me
|
||||
entries too (ADR 0423); takes them as proposals, has them reviewed and accepted,
|
||||
and answers what holds: the seat `knowledge-base`, held by the module `mesh-knowledge`
|
||||
([55 — The knowledge base](../03-DESIGN/01-to-be/55-the-knowledge-base.md)). Not **the record**, the literal reader
|
||||
of this repository.
|
||||
of this repository. It keeps them on the bus: each record's head in its state, its versions on a stream, its
|
||||
sections' bodies once each in an object bucket by digest (ADR 0592).
|
||||
- **section** — of a record: one part of its reasoning with a plain title, such as Context or Direction, stored once by
|
||||
the digest of its body, and written and reviewed on its own; never a file, and never named like one. It is named as
|
||||
"research 081 › Direction"; a clause as "ADR 0290 §7" (ADR 0592). Not an **instruction section** (see
|
||||
[Homonyms](#homonyms)).
|
||||
- **draft** — of a record: the version being written, one section per call, held by the knowledge base and by one
|
||||
**author**, until it is submitted as a version or dropped; another session may **take it over** with a reason, as a
|
||||
proposal (ADR 0592). Not a **drafted** clause, which the import's judgement wrote from prose (see
|
||||
[Homonyms](#homonyms)).
|
||||
- **form-only version** — of a record: a version that changes only its sections' titles and the targets of its links,
|
||||
proved by a check rather than judged, and marked `form`; never a change of meaning (ADR 0592).
|
||||
- **search index** — the knowledge base's full-text index of the records, built in the module's memory from the bus
|
||||
at start and kept by the events; `ask` and `holds` answer from it (ADR 0592).
|
||||
- **design** — a record of the knowledge base, named "design NN", with a **to-be** section (what is being built)
|
||||
and an **as-is** section (what runs), its owning repositories and its links to its decisions and other designs
|
||||
(ADR 0423). Until the move, a document in `03-DESIGN/`, in `01-to-be/` or `00-as-is/`.
|
||||
@@ -1089,6 +1102,10 @@ renaming one sense, the old sense moves to a *Not:* line and becomes mechanical.
|
||||
| nox | the mesh's one agent identity, its logins and accounts (ADR 0414) | **`nox`, the agent** | Identity and access |
|
||||
| | the operator's terminal command, `mesh-cli` | **the `nox` command** | Operator and conversation |
|
||||
| knowledge base | the module holding the decision records and research efforts whole | **knowledge base** | The record |
|
||||
| section | one titled part of a record's reasoning | **section** | The record |
|
||||
| | one named section of the managed instruction file | **instruction section** | Operator and conversation |
|
||||
| draft | a record's version being written, held by one author | **draft** | The record |
|
||||
| | a clause the import's judgement wrote from prose | **drafted** clause | The record |
|
||||
| | the predecessor's operational memory, in older playbooks (issue 430) | none: it no longer exists | — |
|
||||
| check | a pull request's two statuses, until release 4 of ADR 0429 | **merge check**, **repository check**; from release 4, `mesh/check` | Delivery |
|
||||
| | whether the machines a change touches still compose, the assigner's | **composition check** | Delivery |
|
||||
|
||||
@@ -2,34 +2,46 @@
|
||||
layer: to-be
|
||||
status: in-progress
|
||||
code: [mesh-catalog, hq]
|
||||
updated: 2026-10-18
|
||||
updated: 2026-11-02
|
||||
decisions:
|
||||
- "ADR 0290"
|
||||
- "ADR 0321"
|
||||
- "ADR 0423"
|
||||
- "ADR 0424"
|
||||
- "ADR 0592"
|
||||
---
|
||||
|
||||
# 55 — The knowledge base
|
||||
|
||||
**Where it stands, 2026-10-17** (the records cleanup, issue 1072; playbook 07, "The design's state is written back"). Built and live since 2026-10-11: the knowledge base is the module mesh-knowledge in mesh-catalog, holding every decision record and research effort (issues 425 and 426, resolved and delivered). Left: the later slices, issues 428 and 429.
|
||||
|
||||
**Amended, 2026-11-02** (ADR 0592, on the operator's word: "our knowledge base must be nats-native"; "don't use
|
||||
file references or local files anymore"). The records leave the store for the bus: each record's head in the
|
||||
module's state, its versions on a stream, its sections' bodies once each in an object bucket by digest. A record is
|
||||
written one section at a time in a draft, and reviewed one section at a time. A section is a part with a title,
|
||||
never a file. § 1, § 2, § 4, § 5, § 8.1 and the fifth slice of § 9 say how; until it is built, the module keeps its
|
||||
records in the store as before.
|
||||
|
||||
**The mesh keeps its decision records and research efforts whole in a module of its own, `mesh-knowledge`, one
|
||||
instance on the control-node, holding the seat `knowledge-base`: each record's number, status, topic, typed links,
|
||||
its clauses with their own status, and its reasoning, with every version kept. A record is proposed, checked when it
|
||||
is written, reviewed by the knowledge base's own judgement and accepted there; the operator's Approve is asked when a record needs
|
||||
it. Agents ask what holds, and why, in one bounded call.**
|
||||
(ADR 0290,
|
||||
its clauses with their own status, and its reasoning in titled sections, with every version kept, all of it on the
|
||||
bus. A record is written section by section, checked when it is submitted, reviewed section by section by the
|
||||
knowledge base's own judgement and accepted there; the operator's Approve is asked when a record needs it. Agents
|
||||
ask what holds, and why, in one bounded call.**
|
||||
(ADR 0290 and ADR 0592,
|
||||
from research 045.)
|
||||
|
||||
A **clause** is one numbered statement a decision record makes, with its own status. The **knowledge base** is the
|
||||
module that holds the records; the seat it holds is `knowledge-base`. The glossary holds both words.
|
||||
A **clause** is one numbered statement a decision record makes, with its own status. A **section** is one titled
|
||||
part of a record's reasoning. The **knowledge base** is the module that holds the records; the seat it holds is
|
||||
`knowledge-base`. The glossary holds these words.
|
||||
|
||||
**Acceptance.** A session started in any folder on any node asks "what holds about the merge window, and why" and
|
||||
gets, in one call under 4 KiB, the clauses in force, the records they come from, what changed them since, and how to
|
||||
read the reasoning behind each.
|
||||
read the reasoning behind each. A session writes a research effort of more than 100 KiB one section at a time, a
|
||||
session on another node takes the draft over and submits it, and every section is judged.
|
||||
|
||||
This document designs the first slice in detail, tracked by issue 425. The slices after it are in
|
||||
This document designs the first slice in detail, tracked by issue 425, and the fifth, the records on the bus
|
||||
(ADR 0592). The slices after the first are in
|
||||
[§ 9](#9-the-slices-after-the-first), which also designs the third: designs and the glossary's entries become records,
|
||||
and the knowledge base works out each design's state (ADR 0423, ADR 0424).
|
||||
|
||||
@@ -40,17 +52,27 @@ and the knowledge base works out each design's state (ADR 0423, ADR 0424).
|
||||
|
||||
mesh-knowledge (seat knowledge-base, held once for the mesh)
|
||||
├ its process, launched by the node runtime
|
||||
├ a database in the store records, versions, clauses, links; ranked full-text search
|
||||
├ verbs ask, get, holds, links, history, reserve, propose, import, return
|
||||
├ on the bus, written by it alone (§ 2)
|
||||
│ state heads one key per record: its fields, clauses, links, sections as title and digest
|
||||
│ state drafts one key per record being written: its author and its sections as title and digest
|
||||
│ state findings the whole-set findings standing now, and when each was told
|
||||
│ stream versions one message per version: who, when, why, its mark, the head as it stood
|
||||
│ stream reviews one message per part reviewed: the digest judged, the verdict, the findings
|
||||
│ objects sections every section's body, once, named by its sha256 digest
|
||||
├ in its memory the search index, built from the bus at start and kept by watching heads
|
||||
├ verbs ask, get, list, holds, links, history, findings, progress,
|
||||
│ reserve, open, write, remove, order, submit, drop, take-over, propose,
|
||||
│ withdraw, retract, import, return
|
||||
│ served by the control-node's tool runner
|
||||
├ events proposed, reviewed, accepted, changed, imported, drafted, confirmed, returned
|
||||
├ events reserved, opened, written, removed, ordered, submitted, dropped, taken-over, proposed,
|
||||
│ reviewed, accepted, changed, imported, drafted, confirmed, returned, moved, formed
|
||||
├ consumes the router's warrants: the operator's Approve for a record that needs it (§ 5)
|
||||
└ consumes the delivery module's delivery-done announcement: a design's state (§ 9)
|
||||
|
||||
mesh-issues (control-node) the counters for decision and research numbers (§ 6);
|
||||
the issues' design links, read for a design's state (§ 9)
|
||||
mesh-delivery (its seat) announces each delivery done, on the bus (§ 9)
|
||||
claude-code (same node) claude_code_judge: review a proposal (§ 5), draft and confirm clauses (§ 7)
|
||||
claude-code (same node) claude_code_judge: review a section or a head (§ 5), draft and confirm clauses (§ 7)
|
||||
records (any node) records_read at a commit: the import's source (§ 8)
|
||||
messenger (control-node) the router: the operator's ask and its warrant
|
||||
|
||||
@@ -59,20 +81,51 @@ and the knowledge base works out each design's state (ADR 0423, ADR 0424).
|
||||
```
|
||||
|
||||
The module is written in Go against the SDK. It holds no checkout of this repository; the import reads it through
|
||||
the records module, as the issue tracker's import does.
|
||||
the records module, as the issue tracker's import does. Until the move of § 8.1, its records are in a database in
|
||||
the store; from the move on, it requires no database (ADR 0592 §1, changing ADR 0290 §7).
|
||||
|
||||
**The search index** is a full-text index in the module's own memory, written with the pure Go library bleve. At
|
||||
start the module reads every head and the bodies of every current version into it, and says it is not ready until it
|
||||
holds as many records as `heads`; then it keeps the index current by watching `heads`. `ask` and `holds` answer from
|
||||
it, ranked by title, clauses and sections as before. Nothing but the module writes it, and nothing outside it reads it.
|
||||
|
||||
### 1.1 Its tools, health and events
|
||||
|
||||
Every piece of state has a tool that reads it, and every act the module does by itself can be done by hand
|
||||
(ADR 0592 §18):
|
||||
|
||||
| Tool | Reads or does |
|
||||
|---|---|
|
||||
| read a head | one key of `heads`, whole |
|
||||
| read a version | one message of `versions`, with its sections' titles and digests |
|
||||
| read a section | one object of `sections`, by its digest |
|
||||
| read a draft | one key of `drafts`, with who holds it and since when |
|
||||
| read a review | the part reviews of one version, from `reviews` |
|
||||
| fill | each bucket's and stream's size and count against its cap |
|
||||
| rebuild the index | the search index, built again from the bus |
|
||||
| review again | asks one part's review again, for a version still proposed |
|
||||
| move, and check the move | § 8.1, each with a dry run |
|
||||
|
||||
**Health** says whether every bucket and stream answers, and whether the search index is built and holds as many
|
||||
records as `heads`. A review waiting more than 30 minutes is named in the health and told to the operator once; the
|
||||
module stays healthy, because a record waiting on its review is not the module failing (issue 508).
|
||||
|
||||
**Events** say each step: `opened`, `written`, `removed`, `ordered`, `submitted`, `dropped` and `taken-over` for a
|
||||
draft; `moved` for each record the move copies; `formed` for each form-only version (§ 2.2); beside the events the
|
||||
module emits for reserving, proposing, reviewing, accepting, changing and the import.
|
||||
|
||||
## 2. What one record holds
|
||||
|
||||
- `number` and `kind` (decision or research; with the third slice also design and glossary entry, § 9), its key
|
||||
together; `title`, `topic`, `status`, `date`, `deciders`;
|
||||
- its **reasoning**, in sections: for a decision, context, the options weighed, consequences, how it is checked,
|
||||
references; for a research effort, its overview and each of its documents by name; for a design, its `to-be`
|
||||
section and, where something of it runs, its `as-is` section (§ 9); markdown, as written;
|
||||
- its **reasoning**, in **sections**, each a plain title and its text in markdown: for a decision, Context,
|
||||
Considered Options, Consequences, How it is checked, References; for a research effort, its overview and each of its
|
||||
parts by title; for a design, its `to-be` section and, where something of it runs, its `as-is` section (§ 9);
|
||||
- for a decision, its **clauses** (§ 3);
|
||||
- its **links**, typed, each stored once and read from both ends;
|
||||
- its **versions**: every change is a new version with who made it, when, and why in one line; `history` lists them
|
||||
and gives the difference between any two. A progressive insight is a version marked as one, dated, saying what stood
|
||||
before.
|
||||
before. A form-only version (§ 2.2) is marked `form`.
|
||||
|
||||
| Link | From → to |
|
||||
|---|---|
|
||||
@@ -84,6 +137,59 @@ the records module, as the issue tracker's import does.
|
||||
| `touches` | a research effort → a record, issue or design it bears on (by link), or an area (as text) |
|
||||
| `cites` | any record → any record or issue it names |
|
||||
|
||||
### 2.1 Where it is kept
|
||||
|
||||
A record is kept in three of the bus's own forms, so that a new version costs only what changed (ADR 0592 §1 to §6):
|
||||
|
||||
```
|
||||
heads (state) versions (stream) sections (object bucket)
|
||||
┌─────────────────────┐ ┌──────────────────────────┐ ┌────────────────────────┐
|
||||
│ decision.0290 │ │ decision.0290 version 7 │ │ 3f9a… "Context" text │
|
||||
│ title, status, … │ │ who, when, why, mark │ │ 81c2… "Options" text │
|
||||
│ clauses, links │ │ the head as it stood: │──────▶ │ 0d77… "Context" text, │
|
||||
│ current: 8 │ │ Context 3f9a… │ │ as changed in 8 │
|
||||
│ sections: │ ├──────────────────────────┤ │ … │
|
||||
│ Context 0d77… │──────▶│ decision.0290 version 8 │──────▶ └────────────────────────┘
|
||||
│ Options 81c2… │ │ Context 0d77… │ each body once, named by
|
||||
└─────────────────────┘ │ Options 81c2… │ its sha256 digest
|
||||
└──────────────────────────┘
|
||||
```
|
||||
|
||||
- **The head** is one key in the state `heads`, `<kind>.<number>`: the record's fields, its clauses with their status
|
||||
and source, its links, the operator's ask and warrant, its current and pending version, the latest verdict of each
|
||||
part's review (§ 5), and its sections in order, each a title and a digest. A key's value stays under 256 KiB
|
||||
(ADR 0201).
|
||||
- **A version** is one message on the stream `versions`: who wrote it (the caller the bus proved), when, why, its
|
||||
mark, and the head as it stood. It never copies a section's body. The stream keeps every message, with no age limit.
|
||||
- **A section's body** is one object in the bucket `sections`, named by the sha256 digest of the body: a section
|
||||
unchanged in a new version costs nothing. An object no version and no draft names is removed a day after the last
|
||||
stopped naming it. The bucket is storage of the bus, as the controller's object bucket of ADR 0486 is; the module
|
||||
declares it in its manifest as it declares its state, and the manifest gains that declaration for every module.
|
||||
- **A draft** is a key in the state `drafts` (§ 4). **A part's review** is a message on the stream `reviews` (§ 5).
|
||||
**The whole-set findings** standing now, and when each was told to the operator, are keys in the state `findings`.
|
||||
|
||||
**Who may read each** is announced in the manifest. `heads`, `versions`, `sections` and `reviews` may be read by a
|
||||
module the manifest names, such as the web page that shows records once it exists; `drafts` and `findings` by
|
||||
mesh-knowledge alone. No secret is kept in any of them. A grant cannot limit a reader to some objects of a bucket
|
||||
(ADR 0488), which is why reading is announced per bucket and never per record.
|
||||
|
||||
### 2.2 A section is a part with a title
|
||||
|
||||
A section's name is a plain title, unique in its record: "Context", "Direction", "The move". It is never a file's
|
||||
name: a name with an extension, a number prefix such as `00-`, or a slash is refused, and so is a text that holds a
|
||||
local path (in a person's home folder or the temporary folder), a reference to a file and line, or a link whose
|
||||
target is a relative path or a file (ADR 0592 §15).
|
||||
|
||||
**A reference to a part has one form**, which `get` resolves and a web page links: the record, then each title down
|
||||
to the part, joined by ›, such as "research 081 › Direction › D3"; a clause as its record and number, "ADR 0290 §7".
|
||||
|
||||
**The records imported with file-named sections** (the research efforts' `00-overview.md` and the like) get titles in
|
||||
one form-only version per record, written by the module after the move. It changes only section names and the
|
||||
targets of links, each link to a record's file becoming a reference in the form above. It is marked `form`, lists the
|
||||
names it changed, and is accepted without a judgement because a check proves only form changed: each section's text,
|
||||
with every link replaced by its label, is the same before and after. It is not a change of meaning; `history` shows
|
||||
it as a change of form (ADR 0592 §17).
|
||||
|
||||
## 3. Clauses
|
||||
|
||||
A clause holds its record's number and its own (`0276 §4`), its wording, a `status` and a `source`:
|
||||
@@ -103,9 +209,41 @@ A clause holds its record's number and its own (`0276 §4`), its wording, a `sta
|
||||
|
||||
## 4. Writing a record
|
||||
|
||||
`reserve` gives a number (§ 6). `propose` takes the record whole: its fields, its clauses, its reasoning in sections,
|
||||
its links, and for each `changes` the clauses it changes. It is refused, with every reason at once, when one of the
|
||||
29 rules of the hq checks that judge one record or its prose fails, among them:
|
||||
`reserve` gives a number (§ 6). A record is then written in a **draft**, one section per call, and submitted as a
|
||||
version (ADR 0592 §9):
|
||||
|
||||
| Verb | Does |
|
||||
|---|---|
|
||||
| `open` | opens a draft of a reserved or existing record, with its fields, clauses and links; called again by its author, changes them |
|
||||
| `write` | writes one section: its title and its text; one call per section |
|
||||
| `remove` | removes one section from the draft |
|
||||
| `order` | sets the sections' order |
|
||||
| `submit` | makes the draft a version: every rule below is checked, every reason of a refusal named at once, and the review asked (§ 5) |
|
||||
| `drop` | discards the draft |
|
||||
| `take-over` | makes the caller the author of a draft or a proposal, with a reason |
|
||||
| `propose` | `open`, a `write` of each section and `submit` in one call, for a record that fits one bus message |
|
||||
|
||||
```
|
||||
open ──▶ write ──▶ write ──▶ … ──▶ submit ──▶ proposed, reviewed by part (§ 5)
|
||||
▲ │ │
|
||||
└─ remove, order └── refused: every reason named, the draft kept as it was
|
||||
|
||||
drop: the draft is gone take-over: another session becomes its author, with a reason
|
||||
```
|
||||
|
||||
A draft is a key in the state `drafts`: its author, when it was opened, the version it starts from, the record's
|
||||
fields and clauses, and its sections in order as title and digest. Each `write` stores the section's body in the
|
||||
object bucket `sections` and its digest in the draft, so the knowledge base holds the only copy of a draft and a
|
||||
session on any node can read it. A draft is kept until it is submitted or dropped; `list` names one untouched for a
|
||||
week.
|
||||
|
||||
**A draft and a proposal have one author** (ADR 0592 §11). Only the author writes a draft or revises a proposal;
|
||||
another caller is refused, naming the author. `take-over` makes the caller the author, keeps the reason on the
|
||||
record, and tells the previous author by the event `taken-over`. It answers a proposal that only the machine that
|
||||
wrote it could revise (issue 1102) and one left proposed for ever by a version from an unproven writer (issue 465).
|
||||
|
||||
`submit` and `propose` are refused, with every reason at once, when one of the rules that judge one record or its
|
||||
prose fails, among them:
|
||||
|
||||
- a link names a record or clause that does not exist;
|
||||
- a decision has no clause, or a clause has no bold lead;
|
||||
@@ -113,21 +251,48 @@ its links, and for each `changes` the clauses it changes. It is refused, with ev
|
||||
that replaced it;
|
||||
- its topic is not one of the reading order's;
|
||||
- a research effort graduates without naming what it became;
|
||||
- its text uses a retired word of the glossary, or a daemon's command line.
|
||||
- its text uses a retired word of the glossary, or a daemon's command line;
|
||||
- a section is over 40 KiB (it says: split it), or the clauses together are;
|
||||
- a section's name looks like a file, or its text holds a local path, a file and line, or a link to a file (§ 2.2).
|
||||
|
||||
`write` refuses a section over 40 KiB, or one whose name or text breaks § 2.2, at once, so a session learns it on the
|
||||
section it just wrote.
|
||||
|
||||
A proposed record can be revised by its author as new versions until it is accepted. Nothing proposed is ever served
|
||||
as in force.
|
||||
|
||||
## 5. Review and acceptance
|
||||
|
||||
When `propose` takes a record (or a new version of a proposed one), the knowledge base reviews it itself: it asks for
|
||||
a judgement in a separate call, with no tools, that sees only the record, the records it links and the rules, and
|
||||
answers `approve` or `changes` with its findings, the way the issue tracker's triage judges an issue. The judgement
|
||||
goes through the agent module's judge (`claude_code_judge`) today, and through the mesh's inference layer once one
|
||||
exists; nothing in this design depends on which. On `changes`, the record stays proposed, the findings are kept with
|
||||
that version, and its author revises it with a new version, which is reviewed again. A judgement that cannot be had
|
||||
(the judge unreachable, or its answer unreadable) leaves the record proposed and says so; it is never taken as an
|
||||
approval. On `approve`:
|
||||
When a version is submitted (by `submit` or `propose`, a new version of a proposed record included), the knowledge
|
||||
base reviews it itself, **in parts** (ADR 0592 §12 to §14, changing ADR 0290 §4): one judgement per part, each in a
|
||||
separate call, with no tools, that answers `approve` or `changes` with its findings, the way the issue tracker's
|
||||
triage judges an issue. The judgement goes through the agent module's judge (`claude_code_judge`) today, and through
|
||||
the mesh's inference layer once one exists; nothing in this design depends on which.
|
||||
|
||||
- **The head** is one part: the title, the brief, the clauses and the links, judged against the clauses of the
|
||||
records it links.
|
||||
- **Each changed section** is a part of its own, judged with **the frame**: the title, every clause, the links, the
|
||||
Context section (the Overview, for a research effort), shortened to fit and saying so, and in full each clause the
|
||||
section names. The frame is at most 16 KiB, and a section at most 40 KiB, so each question stays under the judge's
|
||||
60 KiB.
|
||||
- **The rules on the whole record** (§ 4) stay code, run at `submit`; no judgement is asked to find a link to nothing.
|
||||
|
||||
```
|
||||
version 3 of research 081
|
||||
├ head title, brief, clauses, links ── judged ──▶ approve
|
||||
├ Overview unchanged since version 2, same frame ── kept ──▶ approve (version 2's)
|
||||
├ Direction changed ── judged ──▶ changes: "D3 contradicts ADR 0290 §7"
|
||||
└ Findings changed ── judged ──▶ approve
|
||||
version 3 stays proposed, with the findings of Direction
|
||||
```
|
||||
|
||||
A part's review is a message on the stream `reviews`: the record, its version, the part, the digest judged, the
|
||||
verdict, the findings, who judged and when; the head keeps the latest verdict of each part. A part's review is kept
|
||||
for a new version when its digest and its frame's digest are both unchanged; any other part is judged again. **A
|
||||
version is accepted when every part's review approves.** On `changes`, the record stays proposed, the findings are
|
||||
kept with that version and the part they name, and its author revises it with a new version. A part that cannot be
|
||||
judged (the judge unreachable, or its answer unreadable) leaves the version proposed and says which; it is never
|
||||
taken as an approval. When every part approves:
|
||||
|
||||
1. a record that does not need the operator is accepted at once;
|
||||
2. a record whose author marked it `needs operator` gets an ask on the router with Approve and Decline, shown on a
|
||||
@@ -138,18 +303,18 @@ On acceptance the record and its clauses move to `accepted` and `in force`, ever
|
||||
`supersedes` name moves to `changed` or `superseded`, and `accepted` and `changed` events are emitted. Then the 4
|
||||
rules that judge the whole record set run (an accepted decision cited by nothing, and the like). A failure does not
|
||||
undo the acceptance. It is a fault of the records, which their authors repair, not of the module: it is told to the
|
||||
operator once, as a warning naming the rule and the records, and cleared once the rule holds again. The module's
|
||||
health names it and stays healthy, because health says only whether the module works, and a finding never holds a
|
||||
rollout at the module's first-node gate (the operator's decision of 2026-10-12 on issue 504, as issue 508 decided for a proposal never
|
||||
reviewed).
|
||||
operator once, as a warning naming the rule and the records, kept in the state `findings`, and cleared once the rule
|
||||
holds again. The module's health names it and stays healthy, because health says only whether the module works, and
|
||||
a finding never holds a rollout at the module's first-node gate (the operator's decision of 2026-10-12 on issue 504,
|
||||
as issue 508 decided for a proposal never reviewed).
|
||||
|
||||
The rule `cited` is also judged ahead, in the review, before the judgement: a decision that names no home and that no
|
||||
accepted record links is not accepted. Its review, by the knowledge base itself, asks changes naming the rule (issue
|
||||
504). It is not refused at `propose`, because no record can link a number only reserved: a record that cites a new
|
||||
504). It is not refused at `submit`, because no record can link a number only reserved: a record that cites a new
|
||||
decision is proposed after it and accepted, and the new decision is proposed again.
|
||||
|
||||
An accepted record is changed only by a new record, or by a progressive insight: a new version marked as one, which
|
||||
is reviewed like a proposal.
|
||||
An accepted record is changed only by a new record, by a progressive insight (a new version marked as one, which is
|
||||
reviewed like a proposal), or by a form-only version of § 2.2, which a check, not a judgement, accepts.
|
||||
|
||||
## 6. Numbers
|
||||
|
||||
@@ -194,6 +359,27 @@ reporting nothing created (issue 488).
|
||||
Before the records leave this repository (issue 426), every record is compared with its file at the import's commit,
|
||||
field by field and section by section, and the result is written on issue 426.
|
||||
|
||||
### 8.1 The move off the store
|
||||
|
||||
The records leave the store once, and the database is dropped only after a check and the operator's yes
|
||||
(ADR 0592 §8):
|
||||
|
||||
1. **Copy.** The move copies every record, version, clause, link, review, finding and ask from the database onto the
|
||||
bus: each version's sections into `sections` by digest, each version as a message on `versions`, each record's
|
||||
head into `heads`, each standing finding into `findings`. A clause keeps its number, status and source as the
|
||||
database holds them (ADR 0321). It emits `moved` per record, writes nothing twice, and a second run changes
|
||||
nothing and says so. A dry run lists what it would write.
|
||||
2. **Check.** A tool compares the database and the bus record by record: the counts of versions, clauses and links,
|
||||
and the digest of every section of every version, computed from the database's text and read from the bus. Its
|
||||
result names every difference.
|
||||
3. **Switch.** The module answers from the bus only once the check shows no difference; until then it answers from
|
||||
the database, and a difference is told to the operator.
|
||||
4. **Tell and ask.** The operator is told the check's result and asked whether the database may be dropped, because
|
||||
dropping it removes data.
|
||||
5. **Drop.** On the operator's yes, the delivery after it removes the module's requirement of a database, and the
|
||||
database is dropped by the store's module, through its tool for it, which is built there first if it has none.
|
||||
6. **Titles.** The module then writes the form-only versions of § 2.2, one per record with file-named sections.
|
||||
|
||||
## 9. The slices after the first
|
||||
|
||||
| Slice | Delivers | Done when the operator sees | Tracked by |
|
||||
@@ -202,6 +388,7 @@ field by field and section by section, and the result is written on issue 426.
|
||||
| 2 | the decision records and research efforts leave this repository; path mentions become "ADR NNNN" and "research NNN"; playbooks 01 and 02 changed | this repository holds no decision record, and `get` answers every one | issue 426 |
|
||||
| 3 | designs and the glossary's entries as records, moved in one delivery, and each design's state worked out by the knowledge base (§ 9.1 to § 9.3; ADR 0423, ADR 0424) | `get` answers design 47 with its sections and links, a word's entry answers from the knowledge base, and a design's state follows its issues' deliveries without anyone writing it | issue 428 |
|
||||
| 4 | meeting notes, drawings and blog posts | not decided; needs its own decision | issue 429 |
|
||||
| 5 | the records on the bus, written and reviewed by section, the move off the store and the titles (§ 1, § 2, § 4, § 5, § 8.1; ADR 0592) | the acceptance tests of the fifth slice in § 10, live; the knowledge base requires no database | the issues its hand-off opens (playbook 04) |
|
||||
|
||||
Numbers from the issue tracker, which `reserve` needs, are the tracker's own slice, tracked by issue 424. This
|
||||
repository keeps no copy of the records, generated or otherwise (issue 435, answered by the operator). Playbooks
|
||||
@@ -299,6 +486,12 @@ milestones and nothing of how a delivery runs; it only listens for the announcem
|
||||
| An answer stays within its bound | the module's test over the full import of `main` at a recorded commit: every `ask`, `get` and `holds` of a fixed question list |
|
||||
| A record written in this repository meanwhile writes its clauses | `records.py`, check `clauses`, on every hq pull request, until the records left this repository (issue 426); since then `records.py`, check `no-records`, refuses any record written here |
|
||||
| Live | the acceptance sentence, asked from a session outside this repository |
|
||||
| A record is kept in the bus's forms, a section once by its digest, and read only as announced | one integration test that starts the module whole against a real bus server: a record of three sections and a second version changing one give one head, two version messages and four objects; a reader the manifest does not name is refused |
|
||||
| Search answers from the index as it did from the store | a unit test over a fixed set of records and a fixed question list; the integration test restarts the module and asks again |
|
||||
| A draft is written by section and has one author, and a take-over tells the previous one | unit tests of each verb of § 4, of a refusal naming the author, and of `take-over` emitting `taken-over` |
|
||||
| A long record is judged whole, one part at a time | unit tests: every question stays under 60 KiB with a 40 KiB section and the largest frame; a section over 40 KiB is refused saying split it; an unchanged section keeps its review, a changed frame asks it again |
|
||||
| A section is a part with a title | a table test, one case per refused name and text of § 2.2; a form-only version whose text changed beyond its links is refused |
|
||||
| Every bucket has a tool, and health says the index | the manifest test compares tools and events with the code; a unit test of the health before and after the index is built |
|
||||
|
||||
**The third slice's acceptance tests** (§ 9.1 to § 9.3; research 062's direction), what its build proves before it
|
||||
is done:
|
||||
@@ -320,7 +513,26 @@ is done:
|
||||
9. Tests 1 to 8 pass together after the one delivery, run against main and the live knowledge base, with nothing
|
||||
in this repository, the catalog or the instruction text pointing at a removed path.
|
||||
|
||||
**The fifth slice's acceptance tests** (§ 1, § 2, § 4, § 5, § 8.1; ADR 0592), what its build proves before it is
|
||||
done:
|
||||
|
||||
1. The move's check, run live, names no difference between the database and the bus: 656 decision records and 80
|
||||
research efforts (the counts of 2026-11-02, or the counts on the day), every version, clause and link, and the
|
||||
digest of every section of every version.
|
||||
2. The operator is told that result and asked before the database is dropped; after the yes and the delivery, the
|
||||
module's manifest requires no database and the store holds none for it.
|
||||
3. A session writes a research effort of more than 100 KiB one section at a time from one node; a session on another
|
||||
node takes the draft over with a reason, the first session hears `taken-over`, and the second submits it.
|
||||
4. Every changed section of that effort is judged on its own, each question under 60 KiB, and the effort is
|
||||
accepted once every part approves.
|
||||
5. A section named like a file, a text holding a local path, and a section over 40 KiB are each refused, the last
|
||||
saying split it.
|
||||
6. After the titles' form-only versions, no record holds a section named like a file, `history` shows each as a
|
||||
change of form, and `get` of "research 062 › Direction" answers that section.
|
||||
7. The fill tool shows each bucket and stream against its cap; the second version of a record with one changed
|
||||
section adds one object, not one per section.
|
||||
|
||||
## What it leaves out
|
||||
|
||||
Semantic or vector search; a browser view; line comments on a proposal (the judgement's findings name the section and
|
||||
Semantic or vector search; a browser view (its reading of the buckets is announced, ADR 0592); line comments on a proposal (the judgement's findings name the section and
|
||||
clause instead); and the rules of how-we-build, which are not decision records. Each needs a decision of its own.
|
||||
|
||||
Reference in New Issue
Block a user