Skip to content

World's first open-source enterprise world model.

Restore the 0043 record a closed PR took off dev (#819)

WaylandYangc33c192d89fb
diff --git a/docs/decisions/0043-every-review-queue-is-governed.md b/docs/decisions/0043-every-review-queue-is-governed.md
new file mode 100644
index 00000000..132e6130
--- /dev/null
+++ b/docs/decisions/0043-every-review-queue-is-governed.md
@@ -0,0 +1,70 @@
+# 0043 · Every review queue is governed
+
+- **Status**: Decided 2026-09-14 · **no code on `dev`** · cut 1 was built in PR #699 — migration 0058 widening `agent_decisions` to `fact` and `conflict` with `summary` and `detail`, `queue_agent` walking low-confidence and stale facts then temporal conflicts after the duplicate rounds of the same `govern` job, every applied action revertible from the Agent queue — and that PR was **closed on 2026-09-17**, to re-land on the open graph once [0044](0044-the-ontology-is-a-view-over-what-documents-say.md) cut 2 has settled alignment · violations, ontology defects and concept mappings are cut 2 · **the decisions below stand; only the code was withdrawn**
+- **Restored to `dev` 2026-09-20.** The file left `dev` with PR #699 and its number stayed allocated and cited — [0044](0044-the-ontology-is-a-view-over-what-documents-say.md) links to it, `docs/design/governance.md` and `docs/design/time.md` reason from its decisions 5 and 1, and `docs/design/README.md` has carried it as `proposed` throughout. A record is the reasoning, and the reasoning was never withdrawn, so the file belongs here whatever happened to the branch. The status line above is the only thing rewritten.
+- **Written**: 2026-09-14 (conventions in the [README](README.md))
+- **Related**: [0025](0025-governance-reads-the-ledger-before-it-decides.md) (the governor this extends; its open question "Other queues"), [0026](0026-a-decision-records-why.md) (a person's why becomes a precedent), [0027](0027-an-automatic-merge-is-gated-by-what-it-can-undo.md) (act on what can be undone), [0022](0022-an-unknown-date-is-not-an-open-one.md) (the temporal engine whose conflicts this settles), [0015](0015-recording-a-sentence-is-not-asserting-a-fact.md) (nods, which stay with people), #695
+
+> On the Blackbaud lease bench the timeline held a deadline back because the model had marked the amendment's new date 0.7. A conflict waited for a person, and the as-of question came back with two answers. The duplicate queue had an agent; the conflict queue and the low-confidence queue had nobody but a person who never came.
+
+## Why a decision is needed
+
+0025 gave one queue, duplicate pairs, to an agent that reads the ledger before it decides. The others kept waiting: temporal conflicts, low-confidence facts, facts whose evidence a new version replaced, axiom violations, ontology defects, concept mappings. On a base nobody curates they only grow, and what they hold back is real. A low-confidence successor may not take over from its predecessor (0022), so the graph answers with both. Decided on 2026-09-14: every queue is governed, except nods.
+
+## Decisions
+
+### 1. One governor, every queue but nods
+
+The `govern` job runs the duplicate rounds of 0025 first, then the fact queues, then conflicts. The order is causal. A merge changes which facts share a timeline, and a confirmed fact withdraws the conflict it was held in (decision 5). The same switch starts and stops it, the same fuse (0025 decision 9) counts reverts of any kind, and the same hourly scan finds bases with backlog. Extraction enqueues the job after every document on a governed base, since conflicts and low-confidence facts come out of extraction, not only duplicate pairs.
+
+Nods (`pending_facts`, 0015) stay out: a remembered sentence becomes a fact when the person who said it nods, and an agent nodding for them would turn a remark into an assertion. 0025 said the same.
+
+### 2. Each queue keeps its own actions, and they are the people's
+
+Facts: `confirm` or `reject`. Conflicts: `close_old`, `retime_new`, `keep_both` or `reject_new`. Each action calls the store function a person's click calls (`temporal::set_confidence`, `temporal::retract`, `temporal::resolve_conflict`, `temporal::correct_interval`), so an agent's decision and a person's leave the graph in the same shape. `retime_new` is the one action people reach through the interval editor, not the conflict card. It exists because the commonest simultaneous conflict on contract chains is a successor whose start the model took from the wrong date.
+
+A decision is a row in `agent_decisions` with `target_kind` saying which queue. `summary` holds what the item looked like when decided: a fact or a conflict has no pair of names to join later, and its rows get rewritten. `detail` holds the action's parameters and what undoing it needs.
+
+### 3. The model decides; the server checks what can be checked
+
+One call per batch of eight, each item with its evidence (document, the document's own date, the quote) and the recent human decisions of that queue as precedents. The rules on precedents are those of 0025 and 0026. The model returns an action, a confidence and a sentence; at `AUTO_CONF` it is applied, below it is a proposal. Nothing the model says about the world is taken on trust where the server can check it:
+
+- A date for `close_old` or `retime_new` must be in the evidence: the fact's start, a document's own date, or a day the quote writes out.
+- A stale fact is confirmed by quoting the current version of its document, and the quote must appear there. The quote is then attached as evidence, which is what takes the fact out of the stale queue.
+
+A check that fails turns a confident verdict into a proposal that says why it was held.
+
+### 4. Every action can be taken back
+
+An applied decision records its undo in `detail`:
+
+| Action | Undo |
+|---|---|
+| Confirm a low-confidence fact | Restore its prior confidence |
+| Confirm a stale fact | Remove the attached evidence |
+| Reject a fact | Restore the fact (`temporal::restore`) |
+| `close_old`, `retime_new` | Invalidate the rewritten row and restore the original (`temporal::undo_rewrite`); the original arrives again, so its conflict is recorded again |
+| `keep_both` | Reopen the conflict |
+| `reject_new` | Restore the fact and reopen the conflict |
+
+A person answers from the Agent queue: accept or override a proposal, or revert an applied decision. An override runs the person's action through the same path and becomes a precedent.
+
+### 5. Confidence is part of the timeline
+
+Confirming a fact changes whether it may take over, so `set_confidence` locks the fact's timelines, changes the value and recomputes them, as a retraction does. A `low_confidence` conflict whose pair the recompute no longer holds is withdrawn. The question it asked, "may this doubtful value take over", has been answered.
+
+## What a reader sees
+
+Agent rows for facts and conflicts carry their summary in place of two names. A proposal is answered with that queue's own actions, and an applied decision offers Revert whatever it did. The ledger rows are the queue's own actions (`fact.confirm`, `conflict.close_old`, …) with no actor, like the duplicate governor's.
+
+## Dead ends
+
+- **One generic "approve / dismiss" action for every queue.** The queues differ in what a decision does to the graph: closing a value and keeping both are different graphs. A generic approve would have to map back onto each queue's actions anyway, and the model would decide without knowing which one it was choosing.
+- **Letting the model set the close date freely.** It is the one thing a successor's evidence can be checked against, and the commonest mistake it would make is the one the conflict came from.
+- **Resolving the held conflict when a fact is confirmed.** The confirmation doesn't know which conflicts it answers; the recompute does, because it is the thing that held the pair.
+
+## Open questions
+
+- **Cut 2: violations, ontology defects, concept mappings.** A violation's `fact_retracted` and `fact_closed` fit this shape. `axiom_relaxed` changes the ontology, and `fixed` for a defect means a person changed it; both need a gate before an agent applies them.
+- **The second look.** The fact and conflict queues have no tool loop yet (0025 decision 5); the batch sees the evidence directly. Add one when proposals keep asking for something the batch could not see.
+- **The interface.** The Agent queue shows these rows with minimal changes; the queue cards themselves don't yet show the agent's proposal inline, as duplicate cards do.
diff --git a/docs/decisions/README.md b/docs/decisions/README.md
index 818fe833..31146236 100644
--- a/docs/decisions/README.md
+++ b/docs/decisions/README.md
@@ -68,9 +68,11 @@ The test for writing one: if someone (including us) looks at a piece of code in
| 0040 | [A chunk says where its words came from](0040-a-chunk-says-where-its-words-came-from.md) | Cuts 1–3 implemented (the ledger shape, and a file that needs a reader degrades with an alert instead of becoming garbage text; scans and images read by a workspace's MinerU service, one segment per page, waiting on the service without spending retries; recordings read by a diarizing transcription model, speakers in the text and times in the anchor, an unlabelled transcript degrades) · scans and images through a MinerU service, recordings only with speaker labels (revised 2026-09-15) · a chunk carries an **origin** (`stated`, `ocr`, `transcribed`, `described`) and the model that produced it, and an **anchor** back into the original bytes (a page and region, a time range, an image inside the file) — decided before any media reader, because a transcript stored without its times can never be tied to the recording again · the packer never mixes origins in a chunk · facts from a description enter below `AUTO_CLOSE_MIN_CONFIDENCE`, so a misread chart opens a conflict instead of closing a correct fact · per-modality model settings, media reading as a resumable job, origin and anchor in the API, MCP and RDF · cuts: ledger shape, scans via MinerU, recordings, descriptions, video |
| 0041 | [A name is a claim about an entity](0041-a-name-is-a-claim-about-an-entity.md) | Cut 0 built (identity bench) · cut 1 implemented (#670): names are value facts on `known_as`, the extractor reports other names, a shared name goes to the adjudicator; forward/reverse F1 0.43/0.54 → 0.68/0.68 · cuts 2–4 (name vectors and neighbours, evidence decides, re-evaluation) not started |
| 0042 | [The chat loop is a runner with hooks](0042-the-chat-loop-is-a-runner-with-hooks.md) | Implemented (#548) · the loop is rig's runner and every policy is a hook with a typed result · the wire stays `LlmClient` behind `RigModel` · a turn cannot end before a tool has run, `no_evidence_needed` is the exit for questions not about the base · RAG fallback only on a 400/422 to the first request with tools · an empty reply is asked again once · the skip rate is the model's (DeepSeek-V3 1–3 of 12, Qwen2.5-72B 0) and recorded, not prevented |
+| 0043 | [Every review queue is governed](0043-every-review-queue-is-governed.md) | Decided 2026-09-14 · no code on `dev` · 0025 gave one queue — duplicate pairs — to an agent that reads the ledger before it decides, and the rest went on waiting for a person who never came: temporal conflicts, low-confidence facts, facts a new document version left stale. Every queue is governed **except nods**, which stay with the person who said the sentence. Each queue keeps its own actions and they are the people's own store calls, so an agent's decision and a person's leave the graph in the same shape; the model decides and the server checks what can be checked (a close date must appear in the evidence, a stale fact is confirmed by quoting the current version), and a failed check turns a confident verdict into a proposal that says why it was held. Every applied action records its undo. Cut 1 was built in PR #699 and that PR was **closed 2026-09-17** to re-land on the open graph after 0044 cut 2; violations, ontology defects and concept mappings are cut 2 |
| 0044 | [The ontology is a view over what documents say](0044-the-ontology-is-a-view-over-what-documents-say.md) | Accepted · cut 1 built (#731, #735, #736, #741, #743–#745): extraction writes open statements, memory documents take the same path, the typed path is deleted, kind words bind to classes · cut 2 (alignment producing typed facts, identity profiles, the errata agent) not built · three layers: extraction writes an open graph in the documents' words (0 of 333 statements unstated in the prototype, against 4–9% of facts bound at write time), a small ontology proposed by an agent and approved by people, and a typed graph computed from the open graph on cached signatures · time mentions resolved against a document time context by code · identity across documents on deterministic evidence before the adjudicator · an errata agent reviews the typed graph |
| 0045 | [A time mention is resolved against its document](0045-a-time-mention-is-resolved-against-its-document.md) | Accepted · cuts 1 and 2 built (#740): a document is dated from its own text, each mention is interpreted by the model and computed by code, upload time is used nowhere · cuts 3 and 4 (grades replace the confidence gate, re-resolution and the anchor queue) not built · a time expression is a mention with its words and place; the model returns shape, anchor, offset and granularity and code computes the interval; a document carries its own date, calendars and anchors across chunks, never its upload time; unresolved mentions wait for an anchor; timelines close on resolution grade instead of confidence |
| 0046 | [The app surface is MCP](0046-the-app-surface-is-mcp.md) | Decided, with the refused design kept. Asked for an app center: applications built on this knowledge, mounted, run in a sandbox, handed to a team. The answer is that the surface already exists — a personal token carries identity and scope, ten read tools serve chat and MCP from one place, `as_of` reaches every graph read, and a read returns `structuredContent` with stable ledger identities — so a coding agent builds on this base today in its own platform, its own language and its own sandbox. Refused here because the layer an app would read is being replaced under it (typed facts now come only from alignment), because 0016 closes open seams before cutting new ones, and because a catalog, an execution boundary and quotas are three other products. The shape is kept with the four gates it would have to hold (runs as the caller, egress only through a declared action, a declared clock, the existing queue) and the dead ends: a container runtime (withdrawn the day it was written — WeKnora's skills are human-written and assume a shell, and they pay for it), a Wasm component runtime (better on every axis including the determinism re-parse needs, still not built because the reason is priority), a service identity per app, an app as a saved conversation. Reopened by a named customer who needs a button inside the product, by the type layer settling, or after 0034 |
+
| | Record | Domain | Status |
|---|---|---|---|
| 0001 | [Ontology import and governance](0001-ontology-import-and-governance.md) | ontology | partly superseded (by 0009, 0010, 0012, 0044) |
@@ -115,6 +117,7 @@ The test for writing one: if someone (including us) looks at a piece of code in
| 0040 | [A chunk says where its words came from](0040-a-chunk-says-where-its-words-came-from.md) | sources | current |
| 0041 | [A name is a claim about an entity](0041-a-name-is-a-claim-about-an-entity.md) | identity | current |
| 0042 | [The chat loop is a runner with hooks](0042-the-chat-loop-is-a-runner-with-hooks.md) | chat-and-mcp | current |
+| 0043 | [Every review queue is governed](0043-every-review-queue-is-governed.md) | governance | current |
| 0044 | [The ontology is a view over what documents say](0044-the-ontology-is-a-view-over-what-documents-say.md) | ontology | current |
| 0045 | [A time mention is resolved against its document](0045-a-time-mention-is-resolved-against-its-document.md) | time | current |
| 0046 | [The app surface is MCP](0046-the-app-surface-is-mcp.md) | chat-and-mcp | current |
diff --git a/docs/design/README.md b/docs/design/README.md
index 4e8b24e1..599f385e 100644
--- a/docs/design/README.md
+++ b/docs/design/README.md
@@ -50,7 +50,7 @@ below marks these records from this note; their own status lines predate it and
`current`: every decision in the record holds. `partly superseded (by NNNN)`: a later record, or
the note above, overturned some of its decisions and the rest hold; the record's own revision notes
say which. `superseded (by NNNN)`: none of its decisions hold. `proposed`: the direction is accepted
-and the record is not yet on `dev` (0034 has no code; 0043 was in PR #699, closed on 2026-09-17 to re-land on the open graph after alignment; 0044 and 0045 sit in
+and the code is not yet on `dev` (0034 has no code; 0043's cut 1 was in PR #699, closed on 2026-09-17 to re-land on the open graph after alignment, while the record itself is on `dev`; 0044 and 0045 sit in
PRs #710 and #724, and 0044's cut 1 has landed ahead of the record). The record's own status line
is the source of truth for what is built; this table only adds whether a later record has overtaken
it.