diff --git a/00-META/glossary.md b/00-META/glossary.md index cdc72989..26a7e164 100644 --- a/00-META/glossary.md +++ b/00-META/glossary.md @@ -732,7 +732,7 @@ it was told, and the servarr apps' own libraries. **Upstream of** nothing. **Dec 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. +0284, 0290, 0291, 0423, 0424. - **research effort**, **graduation**, **hand-off**, **playbook** — an investigation, held whole in the knowledge base and named "research NNN"; @@ -746,11 +746,19 @@ Not a domain of the mesh but of the way it is built, listed because its words me (ADR 0290). Not a *rule*, which is a line of `00-META/how-we-build.md`. - **knowledge base** — what holds the decision records and research efforts whole (number, status, topic, - typed links, clauses and reasoning, with every version), takes them as proposals, has them reviewed and accepted, + typed links, clauses and reasoning, with every version), and, once they are moved, the designs and the glossary + 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. -- **design** — a document in `03-DESIGN/`: **as-is** (what runs) or **to-be** (what is being built). +- **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/`. +- **design state** — of a design: proposed, designed, in progress or implemented, worked out by the knowledge base + from the issues with a design link to it and whether their deliveries are done; never written by anyone + (ADR 0424). +- **glossary entry** — one entry of the glossary as a record of the knowledge base: its head word or words, its + domain, its meaning, its *Not:* line and its identifier line (ADR 0423). Until the move, an entry of this page. - **milestone** — a group of a design's issues delivered together, as one delivery group, or one pull request when it touches one repository; named by what the operator or the mesh can do once it is delivered (playbook 04, ADR 0401). diff --git a/03-DESIGN/01-to-be/55-the-knowledge-base.md b/03-DESIGN/01-to-be/55-the-knowledge-base.md index f8124393..abf36df7 100644 --- a/03-DESIGN/01-to-be/55-the-knowledge-base.md +++ b/03-DESIGN/01-to-be/55-the-knowledge-base.md @@ -2,10 +2,12 @@ layer: to-be status: in-progress code: [mesh-catalog] -updated: 2026-10-17 +updated: 2026-10-18 decisions: - "ADR 0290" - "ADR 0321" + - "ADR 0423" + - "ADR 0424" --- # 55 — The knowledge base @@ -28,7 +30,8 @@ gets, in one call under 4 KiB, the clauses in force, the records they come from, read the reasoning behind each. This document designs the first slice in detail, tracked by issue 425. The slices after it are in -[§ 9](#9-the-slices-after-the-first). +[§ 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). ## 1. The parts @@ -41,9 +44,12 @@ This document designs the first slice in detail, tracked by issue 425. The slice ├ verbs ask, get, holds, links, history, reserve, propose, import, return │ served by the control-node's tool runner ├ events proposed, reviewed, accepted, changed, imported, drafted, confirmed, returned - └ consumes the router's warrants: the operator's Approve for a record that needs it (§ 5) + ├ 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) + 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) 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 @@ -57,9 +63,11 @@ the records module, as the issue tracker's import does. ## 2. What one record holds -- `number` and `kind` (decision or research), its key together; `title`, `topic`, `status`, `date`, `deciders`; +- `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; markdown, as written; + 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; - 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 @@ -192,11 +200,89 @@ field by field and section by section, and the result is written on issue 426. |---|---|---|---| | 1 | this document: the module, the import, clauses, answers, `propose`, its own review and acceptance | the acceptance sentence above, live, and a record proposed, reviewed and accepted without a pull request | issue 425 | | 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, playbooks and glossary entries as kinds | `holds` answers for a design's decisions and a glossary word | issue 428 | +| 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 | 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). +repository keeps no copy of the records, generated or otherwise (issue 435, answered by the operator). Playbooks +stay in this repository as files: they are how work is done here, not records of what was decided (research 061). + +### 9.1 Designs and glossary entries as records + +**A design** is a record of the kind `design`, named "design NN" and keeping its number (ADR 0423). Its text is its +sections: the `to-be` section, what is being built, and the `as-is` section, what runs. Each of the as-is documents +becomes the as-is section of the design it describes, never a record of its own: the import matches 3 of the 18 by +name and 15 by topic, and shows the operator the list before it runs. Its owning repositories are its field `code`; +its decisions, and every design it names, are `cites` links. It holds no state written by anyone (§ 9.2). A new +design takes its number from `reserve` and is written with `propose`, and is reviewed as every record is (§ 5). + +**A glossary entry** is a record of the kind `glossary entry`, one per entry of the glossary page, kept whole: its +head word or words (an entry may name several with one meaning, as research effort, graduation, hand-off and playbook +do), its domain, its meaning, its *Not:* line with each retired word's scope, and its identifier line. Each row of +the page's homonym table becomes an entry of its own, naming the qualified form each domain uses. The entries replace +the page as the authority on words (ADR 0423, changing ADR 0244). + +**The readers change with them.** Everything that read the page or the design folders reads the records instead: + +| Reader | Reads, after the move | +|---|---| +| the knowledge base's own rule on a retired word (§ 4) | the *Not:* and identifier lines of the entries, no longer the page through the records module; it judges a design when it is proposed, as it judges a decision | +| hq's word check | the entries' *Not:* and identifier lines, and its uniqueness check (a head word heading two entries, or also retired) over the entries; it covers what stays in this repository, and designs leave its coverage | +| the catalogue's repository check | the retired words of no scope or *(tools)* from the entries; its copied list is retired, so hq has no copy to compare | +| hq's cycle check | the design records, for every design naming its decisions, not files under `03-DESIGN/` | + +Each of the four fails, saying so, when the knowledge base does not answer, and never passes on nothing. + +**Links become links between records, and the old paths go.** At the import every file link inside a design becomes +a link between records, which the rule on a link to nothing then checks (§ 4). The links from documents that stay in +this repository are rewritten to name the design ("design 47"). No page stays at an old path: afterwards this +repository holds no file under `03-DESIGN/` and no `00-META/glossary.md`. + +**It moves in one delivery**, as the records did: the import, the two kinds, the four readers, the rewritten links, +the playbooks' steps that write a design, and the instruction text sessions read, which names the glossary's place. +A reader left behind would pass on nothing, so none moves alone. + +### 9.2 A design's state + +**The knowledge base says a design's state, and nobody writes it** (ADR 0424): proposed, designed, in progress or +implemented, kept matching what runs. No person, session or document sets it, and `propose` refuses a design that +carries one. + +It reads two things. The issues are those the issue tracker holds with a `design` link to the design. Whether one +is done comes from its deliveries: an issue is done when it is resolved and the delivery its fix went out in reached +`delivered`, whether a hotfix alone or a delivery group. The delivery module announces each delivery done on the +bus, and on each announcement the knowledge base works the state of every design that issue links out again. + +``` + issue tracker ── issues with a design link ──┐ + ├──▶ knowledge base ── works out ──▶ the design's state + mesh-delivery ── "delivery done", bus ───────┘ (served by get, ask) +``` + +**The rules.** + +| Case | State | +|---|---| +| a decision the design names is not accepted | proposed | +| no linked issue done, or no linked issue at all | designed | +| some linked issues done | in progress | +| every linked issue done | implemented | + +Three kinds of issue count apart: an issue closed won't fix is left out; an issue resolved with nothing to deliver, +a fix of documents only, is done when resolved; and a new issue linked to an implemented design makes it in progress +again, until that issue is done. Milestones are not read: a milestone is a group of a design's issues delivered +together, and the state depends only on the issues and their deliveries. + +**Imported designs say what they lack.** A design imported with no linked issue shows `no issues linked yet` beside +designed, until an issue is linked to it; the import names each such design by number. Linking their issues is +tracked by issue 428. + +### 9.3 Its place beside design 47 + +The delivery-done announcement this slice reads is design 47's +([47 — Delivery](47-delivery-from-commit-to-delivered.md)): its hotfixes and delivery groups, and each delivery's +end at `delivered`. This slice is an extension after design 47's last milestone. It changes none of design 47's +milestones and nothing of how a delivery runs; it only listens for the announcement. ## 10. How it is checked @@ -214,6 +300,26 @@ repository keeps no copy of the records, generated or otherwise (issue 435, answ | 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 | +**The third slice's acceptance tests** (§ 9.1 to § 9.3; research 062's direction), what its build proves before it +is done: + +1. After the import, `knowledge-base.get` of design 47 returns its sections and its links, and every link from a + design resolves to a record: none is refused by the rule on a link to nothing. +2. This repository's main holds no file under `03-DESIGN/` and no `00-META/glossary.md`, and its link check passes + with the 76 links from documents that stay here rewritten. +3. hq's cycle check and word check read the knowledge base, and fail, saying so, when it does not answer. +4. A proposal holding a retired word is refused after the move, the word read from the entries; the entries are + 175 and hold 183 head words and 29 retired words, 0 unparsed, both counts checked. +5. In the module's tests, each state rule of § 9.2 gives its state from fixture issues; live, an issue linked to a + design whose hotfix is delivered turns the design implemented within a minute of the delivery being done, and + a new issue linked to it turns it in progress. +6. The import reports every design with no linked issue as `no issues linked yet`, by number. +7. The instruction text sessions read names the glossary's new place. +8. Every entry of the glossary's Config section is filed under the Config domain, and the domains the entries name + are the twelve of ADR 0354. +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 catalogue or the instruction text pointing at a removed path. + ## What it leaves out Semantic or vector search; a browser view; line comments on a proposal (the judgement's findings name the section and