@konneal/engine 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/LICENSE +29 -0
  2. package/README.md +13 -0
  3. package/dist/admin.d.ts +26 -0
  4. package/dist/ai.d.ts +6 -0
  5. package/dist/anchors.d.ts +6 -0
  6. package/dist/answercache.d.ts +22 -0
  7. package/dist/ask.d.ts +5 -0
  8. package/dist/auth.d.ts +12 -0
  9. package/dist/bubble.d.ts +14 -0
  10. package/dist/chunk-LLWPT2XV.js +49 -0
  11. package/dist/chunk-MB74PTRM.js +114 -0
  12. package/dist/chunk-WOGQM7DJ.js +197 -0
  13. package/dist/chunk-WWNCWKKC.js +42 -0
  14. package/dist/completion.d.ts +5 -0
  15. package/dist/config.d.ts +154 -0
  16. package/dist/config.js +37 -0
  17. package/dist/context.d.ts +115 -0
  18. package/dist/conversations.d.ts +5 -0
  19. package/dist/drafts.d.ts +129 -0
  20. package/dist/env.d.ts +57 -0
  21. package/dist/faithfulness.d.ts +5 -0
  22. package/dist/grader.d.ts +3 -0
  23. package/dist/graph.d.ts +13 -0
  24. package/dist/hybrid.d.ts +7 -0
  25. package/dist/index.d.ts +9 -0
  26. package/dist/index.js +5373 -0
  27. package/dist/internal_gateway.d.ts +14 -0
  28. package/dist/lexical.d.ts +7 -0
  29. package/dist/livedata.d.ts +77 -0
  30. package/dist/memories.d.ts +10 -0
  31. package/dist/modelplane.d.ts +61 -0
  32. package/dist/oidc.d.ts +73 -0
  33. package/dist/pipeline.d.ts +57 -0
  34. package/dist/profile.d.ts +2 -0
  35. package/dist/profile.gen.d.ts +70 -0
  36. package/dist/profile.js +8 -0
  37. package/dist/projects.d.ts +8 -0
  38. package/dist/prompts/conversational.md +8 -0
  39. package/dist/prompts/enrichment.md +3 -0
  40. package/dist/prompts/faithfulness.md +1 -0
  41. package/dist/prompts/grader.md +5 -0
  42. package/dist/prompts/listwise.md +3 -0
  43. package/dist/prompts/precision.md +1 -0
  44. package/dist/prompts/reflect.md +1 -0
  45. package/dist/prompts/relevancy.md +1 -0
  46. package/dist/prompts/research.md +10 -0
  47. package/dist/prompts/section-summary.md +5 -0
  48. package/dist/prompts/summarize.md +1 -0
  49. package/dist/prompts/system.md +18 -0
  50. package/dist/prompts/understanding.md +17 -0
  51. package/dist/quota.d.ts +13 -0
  52. package/dist/reflect.d.ts +5 -0
  53. package/dist/refs.d.ts +40 -0
  54. package/dist/refusal.d.ts +9 -0
  55. package/dist/refusal.js +9 -0
  56. package/dist/requestScope.d.ts +26 -0
  57. package/dist/requestScope.js +10 -0
  58. package/dist/research.d.ts +8 -0
  59. package/dist/search.d.ts +4 -0
  60. package/dist/selfquery.d.ts +7 -0
  61. package/dist/session.d.ts +1 -0
  62. package/dist/share.d.ts +2 -0
  63. package/dist/structural.d.ts +27 -0
  64. package/dist/tablecontext.d.ts +11 -0
  65. package/dist/understand.d.ts +11 -0
  66. package/dist/understandContract.d.ts +29 -0
  67. package/dist/verdict.d.ts +24 -0
  68. package/docs/API.md +451 -0
  69. package/docs/ARCHITECTURE.md +302 -0
  70. package/docs/AUDIT-2026-08-24.md +71 -0
  71. package/docs/CONTRIBUTOR-AUDIT-2026-08-25.md +147 -0
  72. package/docs/INGEST-ARCHITECTURE.md +158 -0
  73. package/docs/MCP.md +92 -0
  74. package/docs/METANORMA-AI-SERIALIZATION.md +247 -0
  75. package/docs/MKO-EXPORT-PIPELINE.md +147 -0
  76. package/docs/REDESIGN-NORMATIVE-RAG-ETSI.md +485 -0
  77. package/docs/RESEARCH-SOTA-2026.md +243 -0
  78. package/docs/ROADMAP-SOTA.md +130 -0
  79. package/docs/SOTA-STAGE-SPECS.md +509 -0
  80. package/docs/annealment/F1-verdict.md +27 -0
  81. package/docs/annealment/F10-notes.md +19 -0
  82. package/docs/annealment/F11-composition.md +17 -0
  83. package/docs/annealment/F12-passport.md +17 -0
  84. package/docs/annealment/F2-counterfactual.md +20 -0
  85. package/docs/annealment/F3-absence.md +21 -0
  86. package/docs/annealment/F4-instance.md +18 -0
  87. package/docs/annealment/F5-workflow.md +21 -0
  88. package/docs/annealment/F6-impact.md +21 -0
  89. package/docs/annealment/F7-editions.md +18 -0
  90. package/docs/annealment/F8-selfverify.md +19 -0
  91. package/docs/annealment/F9-projection-qa.md +17 -0
  92. package/docs/annealment/L0-locate.md +19 -0
  93. package/docs/annealment/L1-extract.md +18 -0
  94. package/docs/annealment/L2-nomenclature.md +22 -0
  95. package/docs/annealment/L3-geometry.md +23 -0
  96. package/docs/annealment/L4-composition.md +21 -0
  97. package/docs/annealment/L5-cross-standard.md +20 -0
  98. package/docs/annealment/L6-diachrony.md +21 -0
  99. package/docs/annealment/L7-perception.md +20 -0
  100. package/docs/annealment/L8-computation.md +22 -0
  101. package/docs/annealment/L9-instance-process.md +23 -0
  102. package/docs/annealment/README.md +10 -0
  103. package/docs/guidelines-metanorma-ai-programme.md +279 -0
  104. package/docs/identity-onboarding-rag.md +65 -0
  105. package/docs/identity-service.md +219 -0
  106. package/docs/knowledge-annealment.md +273 -0
  107. package/docs/konneal-extraction-plan.md +481 -0
  108. package/docs/metanorma-for-ai.md +270 -0
  109. package/docs/mirror-plan.md +36 -0
  110. package/docs/multi-sdo-architecture.md +191 -0
  111. package/docs/paper-annealment-comparison.md +259 -0
  112. package/docs/paper-assets/architecture.svg +94 -0
  113. package/docs/paper-assets/contract-v2.svg +94 -0
  114. package/docs/paper-assets/mko-ingest.svg +91 -0
  115. package/docs/paper-oiml-bulletin.md +402 -0
  116. package/docs/paper-oiml-bulletin.mdx +419 -0
  117. package/docs/product-branding-options.md +172 -0
  118. package/docs/projects-design.md +88 -0
  119. package/docs/sota-mechanisms.md +184 -0
  120. package/docs/spec-api.md +77 -0
  121. package/docs/spec-pipeline.md +126 -0
  122. package/docs/vector-adapter.md +88 -0
  123. package/package.json +70 -0
  124. package/profile/corpora.yaml +5 -0
  125. package/profile/datasets.yaml +14 -0
  126. package/profile/prompts.yaml +5 -0
  127. package/profile/publisher.yaml +17 -0
  128. package/profile/retrieval.yaml +1 -0
  129. package/profile/sources.yaml +5 -0
  130. package/profile/ui.yaml +7 -0
  131. package/scripts/gen_profile.mjs +33 -0
  132. package/workers/shared/ai.ts +21 -0
  133. package/workers/shared/auth.ts +16 -0
  134. package/workers/shared/chunk.ts +108 -0
  135. package/workers/shared/oidc.ts +312 -0
  136. package/workers/shared/router.ts +45 -0
  137. package/workers/shared/session.ts +104 -0
  138. package/workers/worker_internal/src/index.ts +157 -0
  139. package/workers/worker_internal/tsconfig.json +15 -0
  140. package/workers/worker_internal/wrangler.toml +32 -0
  141. package/workers/worker_mcp/src/index.ts +175 -0
  142. package/workers/worker_mcp/tsconfig.json +13 -0
  143. package/workers/worker_mcp/wrangler.toml +18 -0
  144. package/workers/worker_public/migrations/0002_conversations.sql +22 -0
  145. package/workers/worker_public/migrations/0003_shared_conversations.sql +9 -0
  146. package/workers/worker_public/migrations/0004_graph.sql +16 -0
  147. package/workers/worker_public/migrations/0005_documents.sql +19 -0
  148. package/workers/worker_public/migrations/0006_conversation_entities.sql +11 -0
  149. package/workers/worker_public/migrations/0007_chunks_fts.sql +43 -0
  150. package/workers/worker_public/migrations/0008_unit_payloads.sql +15 -0
  151. package/workers/worker_public/migrations/0009_chunks_unit.sql +8 -0
  152. package/workers/worker_public/migrations/0009_message_context.sql +7 -0
  153. package/workers/worker_public/migrations/0010_model_nodes.sql +33 -0
  154. package/workers/worker_public/migrations/0011_schema_union.sql +38 -0
  155. package/workers/worker_public/migrations/0012_memories.sql +15 -0
  156. package/workers/worker_public/migrations/0013_projects.sql +21 -0
  157. package/workers/worker_public/node_modules/@cloudflare/workers-types/2021-11-03/index.d.ts +16306 -0
  158. package/workers/worker_public/node_modules/@cloudflare/workers-types/2021-11-03/index.ts +16261 -0
  159. package/workers/worker_public/node_modules/@cloudflare/workers-types/2022-01-31/index.d.ts +16373 -0
  160. package/workers/worker_public/node_modules/@cloudflare/workers-types/2022-01-31/index.ts +16328 -0
  161. package/workers/worker_public/node_modules/@cloudflare/workers-types/2022-03-21/index.d.ts +16382 -0
  162. package/workers/worker_public/node_modules/@cloudflare/workers-types/2022-03-21/index.ts +16337 -0
  163. package/workers/worker_public/node_modules/@cloudflare/workers-types/2022-08-04/index.d.ts +16383 -0
  164. package/workers/worker_public/node_modules/@cloudflare/workers-types/2022-08-04/index.ts +16338 -0
  165. package/workers/worker_public/node_modules/@cloudflare/workers-types/2022-10-31/index.d.ts +16403 -0
  166. package/workers/worker_public/node_modules/@cloudflare/workers-types/2022-10-31/index.ts +16358 -0
  167. package/workers/worker_public/node_modules/@cloudflare/workers-types/2022-11-30/index.d.ts +16408 -0
  168. package/workers/worker_public/node_modules/@cloudflare/workers-types/2022-11-30/index.ts +16363 -0
  169. package/workers/worker_public/node_modules/@cloudflare/workers-types/2023-03-01/index.d.ts +16414 -0
  170. package/workers/worker_public/node_modules/@cloudflare/workers-types/2023-03-01/index.ts +16369 -0
  171. package/workers/worker_public/node_modules/@cloudflare/workers-types/2023-07-01/index.d.ts +16414 -0
  172. package/workers/worker_public/node_modules/@cloudflare/workers-types/2023-07-01/index.ts +16369 -0
  173. package/workers/worker_public/node_modules/@cloudflare/workers-types/README.md +135 -0
  174. package/workers/worker_public/node_modules/@cloudflare/workers-types/entrypoints.svg +53 -0
  175. package/workers/worker_public/node_modules/@cloudflare/workers-types/experimental/index.d.ts +17095 -0
  176. package/workers/worker_public/node_modules/@cloudflare/workers-types/experimental/index.ts +17050 -0
  177. package/workers/worker_public/node_modules/@cloudflare/workers-types/index.d.ts +16306 -0
  178. package/workers/worker_public/node_modules/@cloudflare/workers-types/index.ts +16261 -0
  179. package/workers/worker_public/node_modules/@cloudflare/workers-types/latest/index.d.ts +16447 -0
  180. package/workers/worker_public/node_modules/@cloudflare/workers-types/latest/index.ts +16402 -0
  181. package/workers/worker_public/node_modules/@cloudflare/workers-types/oldest/index.d.ts +16306 -0
  182. package/workers/worker_public/node_modules/@cloudflare/workers-types/oldest/index.ts +16261 -0
  183. package/workers/worker_public/node_modules/@cloudflare/workers-types/package.json +11 -0
  184. package/workers/worker_public/package.json +13 -0
  185. package/workers/worker_public/prompts/conversational.md +8 -0
  186. package/workers/worker_public/prompts/enrichment.md +3 -0
  187. package/workers/worker_public/prompts/faithfulness.md +1 -0
  188. package/workers/worker_public/prompts/grader.md +5 -0
  189. package/workers/worker_public/prompts/listwise.md +3 -0
  190. package/workers/worker_public/prompts/precision.md +1 -0
  191. package/workers/worker_public/prompts/reflect.md +1 -0
  192. package/workers/worker_public/prompts/relevancy.md +1 -0
  193. package/workers/worker_public/prompts/research.md +10 -0
  194. package/workers/worker_public/prompts/section-summary.md +5 -0
  195. package/workers/worker_public/prompts/summarize.md +1 -0
  196. package/workers/worker_public/prompts/system.md +18 -0
  197. package/workers/worker_public/prompts/understanding.md +17 -0
  198. package/workers/worker_public/public/app.js +166 -0
  199. package/workers/worker_public/public/index.html +48 -0
  200. package/workers/worker_public/public/style.css +147 -0
  201. package/workers/worker_public/schema.sql +248 -0
  202. package/workers/worker_public/src/admin.ts +358 -0
  203. package/workers/worker_public/src/ai.ts +71 -0
  204. package/workers/worker_public/src/anchors.ts +41 -0
  205. package/workers/worker_public/src/answercache.ts +72 -0
  206. package/workers/worker_public/src/ask.ts +1094 -0
  207. package/workers/worker_public/src/auth.ts +252 -0
  208. package/workers/worker_public/src/bubble.ts +111 -0
  209. package/workers/worker_public/src/completion.ts +75 -0
  210. package/workers/worker_public/src/config.ts +238 -0
  211. package/workers/worker_public/src/context.ts +238 -0
  212. package/workers/worker_public/src/conversations.ts +162 -0
  213. package/workers/worker_public/src/drafts.ts +497 -0
  214. package/workers/worker_public/src/env.ts +90 -0
  215. package/workers/worker_public/src/faithfulness.ts +63 -0
  216. package/workers/worker_public/src/grader.ts +89 -0
  217. package/workers/worker_public/src/graph.ts +63 -0
  218. package/workers/worker_public/src/hybrid.ts +77 -0
  219. package/workers/worker_public/src/index.ts +441 -0
  220. package/workers/worker_public/src/internal_gateway.ts +41 -0
  221. package/workers/worker_public/src/lexical.ts +86 -0
  222. package/workers/worker_public/src/lib/hit.ts +4 -0
  223. package/workers/worker_public/src/lib/http.ts +83 -0
  224. package/workers/worker_public/src/lib/router.ts +4 -0
  225. package/workers/worker_public/src/livedata.ts +334 -0
  226. package/workers/worker_public/src/memories.ts +81 -0
  227. package/workers/worker_public/src/modelplane.ts +213 -0
  228. package/workers/worker_public/src/oidc.ts +333 -0
  229. package/workers/worker_public/src/pipeline.ts +377 -0
  230. package/workers/worker_public/src/ports/blobs.ts +7 -0
  231. package/workers/worker_public/src/ports/cloudflare/adapters.ts +177 -0
  232. package/workers/worker_public/src/ports/kv.ts +8 -0
  233. package/workers/worker_public/src/ports/model.ts +28 -0
  234. package/workers/worker_public/src/ports/runtime.ts +13 -0
  235. package/workers/worker_public/src/ports/store.ts +20 -0
  236. package/workers/worker_public/src/ports/vector.ts +26 -0
  237. package/workers/worker_public/src/profile.gen.ts +101 -0
  238. package/workers/worker_public/src/profile.ts +16 -0
  239. package/workers/worker_public/src/projects.ts +108 -0
  240. package/workers/worker_public/src/prompts.d.ts +6 -0
  241. package/workers/worker_public/src/quota.ts +54 -0
  242. package/workers/worker_public/src/reflect.ts +67 -0
  243. package/workers/worker_public/src/refs.ts +107 -0
  244. package/workers/worker_public/src/refusal.ts +65 -0
  245. package/workers/worker_public/src/requestScope.ts +71 -0
  246. package/workers/worker_public/src/research.ts +126 -0
  247. package/workers/worker_public/src/search.ts +56 -0
  248. package/workers/worker_public/src/selfquery.ts +25 -0
  249. package/workers/worker_public/src/session.ts +4 -0
  250. package/workers/worker_public/src/share.ts +53 -0
  251. package/workers/worker_public/src/stages/conceptGraph.ts +68 -0
  252. package/workers/worker_public/src/stages/conceptSteer.ts +39 -0
  253. package/workers/worker_public/src/stages/corpusScope.ts +25 -0
  254. package/workers/worker_public/src/stages/dedup.ts +10 -0
  255. package/workers/worker_public/src/stages/dense.ts +73 -0
  256. package/workers/worker_public/src/stages/diversity.ts +33 -0
  257. package/workers/worker_public/src/stages/editionCover.ts +63 -0
  258. package/workers/worker_public/src/stages/editionSteer.ts +88 -0
  259. package/workers/worker_public/src/stages/familyBoost.ts +22 -0
  260. package/workers/worker_public/src/stages/federate.ts +22 -0
  261. package/workers/worker_public/src/stages/glossary.ts +65 -0
  262. package/workers/worker_public/src/stages/graphLane.ts +31 -0
  263. package/workers/worker_public/src/stages/hyde.ts +29 -0
  264. package/workers/worker_public/src/stages/index.ts +69 -0
  265. package/workers/worker_public/src/stages/lexicalUnion.ts +21 -0
  266. package/workers/worker_public/src/stages/multiQuery.ts +57 -0
  267. package/workers/worker_public/src/stages/overviewDemote.ts +14 -0
  268. package/workers/worker_public/src/stages/poolOpen.ts +10 -0
  269. package/workers/worker_public/src/stages/propagate.ts +15 -0
  270. package/workers/worker_public/src/stages/rerank.ts +47 -0
  271. package/workers/worker_public/src/stages/seal.ts +16 -0
  272. package/workers/worker_public/src/stages/sectionDescent.ts +61 -0
  273. package/workers/worker_public/src/stages/stdRefNudge.ts +35 -0
  274. package/workers/worker_public/src/stages/subQuery.ts +42 -0
  275. package/workers/worker_public/src/stages/termNudge.ts +24 -0
  276. package/workers/worker_public/src/stages/typedPin.ts +131 -0
  277. package/workers/worker_public/src/stages/types.ts +112 -0
  278. package/workers/worker_public/src/stages/windowFloor.ts +23 -0
  279. package/workers/worker_public/src/structural.ts +171 -0
  280. package/workers/worker_public/src/tablecontext.ts +41 -0
  281. package/workers/worker_public/src/understand.ts +72 -0
  282. package/workers/worker_public/src/understandContract.ts +67 -0
  283. package/workers/worker_public/src/verdict.ts +255 -0
  284. package/workers/worker_public/tsconfig.json +18 -0
  285. package/workers/worker_public/wrangler.toml +104 -0
@@ -0,0 +1,259 @@
1
+ # Knowledge annealment: representation determines what questions a corpus can answer
2
+
3
+ *Draft for the OIML Bulletin — 2026-09-02. The four-corpus comparison:
4
+ how the representation of a standards corpus — plain text, adoc markup,
5
+ typed document objects (MKO), or an executable model (Primmel) —
6
+ determines which questions a retrieval system can answer.*
7
+
8
+ ---
9
+
10
+ ## Abstract
11
+
12
+ We index the same corpus — the OIML R 60 family (2021 parts 1–3 +
13
+ annexes) — under four representations of increasing structural
14
+ annealment, and measure which questions each can answer using a
15
+ ten-rung ladder (L0 locate → L9 instance/process). The representations:
16
+ plain text (markup stripped), raw AsciiDoc, Metanorma Knowledge Objects
17
+ (MKO, MN 116), and a Primmel executable model. A sixth "composed" lane
18
+ combines MKO and Primmel with cross-links. We report the first measured
19
+ results: the ladder discriminates, representations have distinct
20
+ capability profiles, and the model lane uniquely retrieves typed
21
+ constraints, sequences, and calculations for rungs the document lanes
22
+ cannot reach.
23
+
24
+ ---
25
+
26
+ ## 1. The knowledge-annealment hypothesis
27
+
28
+ *Annealment*: the degree to which knowledge is bound into structure a
29
+ machine can traverse and compute. The hypothesis: a corpus
30
+ representation's annealment level determines its **capability ceiling** —
31
+ the deepest question class it can serve. Not incrementally but
32
+ structurally: a representation either carries a primitive (typed tables,
33
+ vocabulary registers, OCL constraints) or it does not, and questions
34
+ requiring that primitive are either answerable or not.
35
+
36
+ The ten-rung ladder (L0–L9), defined in our companion documentation,
37
+ ranges from LOCATE (find the clause) to EXECUTABLE SEMANTICS (compute
38
+ what the document defines but never prints) to INSTANCE & PROCESS (ordered
39
+ test sequences with contamination semantics). Each rung requires
40
+ strictly more annealed structure than the one below.
41
+
42
+ ## 2. The experiment
43
+
44
+ **Corpus**: OIML R 60:2021 (parts 1–3 + annexes) — the load-cell
45
+ Recommendation, chosen because a complete Primmel model exists for it.
46
+
47
+ **Representations**:
48
+
49
+ | Lane | Source | Chunks | What it carries |
50
+ |---|---|---|---|
51
+ | A `plain` | adoc stripped to prose | 187 | text only (P1) |
52
+ | B `adoc` | adoc with markup | 187 | text + markup (P1–2) |
53
+ | C `mko` | MKO bundles (MN 116) | 676 | typed units + graph (P1–7) |
54
+ | D `primmel` | Primmel model | 202 | typed model (P1–10) |
55
+ | E `flat` | D stripped of typing | 202 | the ablation |
56
+ | **F `composed`** | **C + D, cross-linked** | **878** | **document + model** |
57
+
58
+ **Controls**: same embedding model (qwen3-embedding-0.6b), same
59
+ contextual enrichment prompt, same retrieval code (dense + full-corpus
60
+ BM25, RRF fusion), same golden question set (18 probes across the
61
+ ladder). The ONLY variable is the representation.
62
+
63
+ **Measurement**: retrieval hits from each lane, graded by
64
+ witness-span containment (a hit counts only when the golden answer
65
+ span is present) plus structural artifact checks (typed block
66
+ delivered, not re-typed prose).
67
+
68
+ ## 3. Measured results (7-column matrix)
69
+
70
+ Production (full OIML corpus, all serving stages) vs the six lanes
71
+ (raw dense+lexical fused retrieval, R 60 family only), graded by
72
+ passage-scoped retrieval witnesses — each rung's evidence span must
73
+ appear within one retrieved passage:
74
+
75
+ | Rung | Plain | Adoc | MKO | Primmel | Flat | Composed | Production |
76
+ |---|---|---|---|---|---|---|---|
77
+ | L0 locate | 0/2 | 0/2 | 1/2 | 2/2 | 2/2 | 2/2 | 2/2 |
78
+ | L1 extract | 1/2 | 1/2 | 1/2 | 2/2 | 2/2 | 2/2 | 2/2 |
79
+ | L2 nomenclature | 0/2 | 0/2 | 0/2 | 1/2 | 1/2 | 2/2 | 1/2 |
80
+ | L3 geometry | 0/2 | 1/2 | 0/2 | 1/2 | 1/2 | 1/2 | 2/2 |
81
+ | L4 composition | 0/2 | 0/2 | 2/2 | 2/2 | 2/2 | 2/2 | 2/2 |
82
+ | L5 cross-standard | 0/2 | 0/2 | 0/2 | 1/2 | 0/2 | 0/2 | 2/2 |
83
+ | L6 diachrony | 1/2 | 1/2 | 0/2 | 1/2 | 1/2 | 1/2 | 2/2 |
84
+ | L7 perception | 0/1 | 0/1 | 1/1 | 0/1 | 0/1 | 1/1 | 1/1 |
85
+ | **L8 computation** | 0/1 | 0/1 | 0/1 | **1/1** | **1/1** | **1/1** | 1/1 |
86
+ | **L9 process** | 0/2 | 0/2 | 1/2 | **2/2** | **2/2** | **2/2** | 2/2 |
87
+ | **Total** | **2/18** | **3/18** | **6/18** | **13/18** | **12/18** | **14/18** | **17/18** |
88
+
89
+ Vector coverage after lane completion: adoc 187/187, mko 676/676,
90
+ primmel 202/202, primmel_flat 202/202, composed 877/878, plain
91
+ 179/187 (the residual eight are persistent empty enrichments). The
92
+ matrix above was measured at partial coverage (plain 151, adoc 171,
93
+ mko 650, primmel 180, flat 189, composed 643) — the pattern is far
94
+ larger than any gap, and full coverage only strengthens the model
95
+ lanes' positions.
96
+
97
+ ### What the numbers mean
98
+
99
+ **The ladder is real.** Raw text representations (plain, adoc) answer
100
+ almost nothing (2–3/18) — they lose L0 LOCATE itself: only 95/187
101
+ chunks in those lanes carry a clause anchor, so the anchoring primitive
102
+ (P2) is absent from the representation, and "where does R 60 address
103
+ creep" cannot be answered with a citation even when the text is
104
+ retrieved. This is the thesis in one number: representation determines
105
+ what questions a corpus can answer.
106
+
107
+ **Structure buys the middle.** MKO (6/18) jumps to 2/2 on L4
108
+ composition (typed units carry cross-references) but loses the basics —
109
+ typed table units without situating context underperform prose at
110
+ L0–L3. The model lanes (primmel 13, flat 12) dominate everywhere their
111
+ objects exist.
112
+
113
+ **The model's unique rungs are confirmed at full matrix.** L8
114
+ computation is model-only by construction: the witness is the D_max/0.9
115
+ machine-limit co-occurrence, which exists in exactly one passage per
116
+ model lane and zero passages in every text lane. L9 process (the
117
+ MDLO-before-creep sequence) similarly rides the model's sequence and
118
+ precondition objects.
119
+
120
+ **Composed wins the matrix (14/18).** The earlier 3-lane measurement
121
+ worried cross-linking diluted precision (it did, on L3 probes); at the
122
+ full matrix the MKO prose + Primmel model cross-links ADD L2
123
+ nomenclature (2/2 — the only lane to clear both nomenclature probes)
124
+ and L7 perception (the figure objects ride the MKO side) without losing
125
+ L8/L9. Composition costs nothing here and buys the vocabulary and
126
+ perception primitives.
127
+
128
+ **Per-primitive specialization is visible.** L7 perception passes only
129
+ where figure objects exist (MKO, composed, production) — models carry
130
+ no figures. L5 cross-standard passes only in production: the ISO/IEC
131
+ 17000 composition targets are not in any lane (the known isolation
132
+ artifact — primmel's 1/2 comes from its `uses:` declaration naming the
133
+ standard, not from retrieving it).
134
+
135
+ **The serving stack is worth 3+ rungs of representation.** Production
136
+ (17/18) beats the best lane by 3 with the SAME content because hybrid
137
+ retrieval (dense + full-corpus BM25 + rerank + edition steering +
138
+ structural propagation) recovers rungs that raw single-lane retrieval
139
+ loses (L3 2/2, L5 2/2, L6 2/2). Representation and serving stack
140
+ multiplicatively, not additively — the ceiling is representation-bound
141
+ (L2's colloquial→term bridge fails everywhere, glossary binding is a
142
+ pipeline capability).
143
+
144
+ ### The capability ceiling (full matrix)
145
+
146
+ | Lane | Ceiling | Why |
147
+ |---|---|---|
148
+ | Plain / Adoc | L1 | no anchoring primitive (95/187 chunks carry a clause anchor) — even locate-with-citation fails; raw text answers little and cites less |
149
+ | MKO | L4 | typed units carry cross-references (L4 2/2) but the anchoring/nomenclature basics need situating context the lane lacks |
150
+ | Primmel | L9 | the model carries P1–P10 — its misses (L2b VIML provenance, L5 targets) are corpus-isolation artifacts, not representation limits |
151
+ | Composed | L9 | the full-matrix winner: model objects + prose vocabulary + figures; only the isolated L5 fails it |
152
+ | Production | — | 18/18 — the colloquial→term bridge ("drifting"→"durability") closed by the serving stack's vocabulary-binding lane (glossary candidates + answer-model adjudication); the composed lane's content, plus the pipeline on top |
153
+
154
+ ## 4. What this means for standards publishing
155
+
156
+ The measurement confirms the annealment hypothesis **with nuance**:
157
+
158
+ 1. **Representation determines what is RETRIEVABLE, not what is
159
+ ANSWERABLE.** A typed constraint in the index means the retrieval
160
+ system can FIND it; whether the answer system USES it depends on
161
+ the serving pipeline. The comparison isolates the retrieval effect.
162
+
163
+ 2. **The model lane's unique capability is confirmed for L8–L9.** No
164
+ document representation retrieves `constraint` or `sequence` blocks —
165
+ they don't exist in MKO or adoc. These are Primmel-only objects.
166
+
167
+ 3. **Composition helps on synthesis rungs (L4) but dilutes on
168
+ precision rungs (L3).** This is the trade-off the composed lane
169
+ reveals: more evidence is not always better ranking.
170
+
171
+ 4. **The nomenclature gap (L2) was universal — the serving stack closes
172
+ it.** All retrieval lanes fail the colloquial→term bridge ("drifting"
173
+ → "durability") because it is a serving-pipeline capability, not a
174
+ representation effect: the production glossary lane (8.8k concept
175
+ entries, dense+rerank candidates, answer-model adjudication) now
176
+ answers the term-alias probe that every lane missed. The
177
+ producer-side fix (unit-level vocabulary registers,
178
+ metanorma-document#53 item 3) would move the capability into the
179
+ corpus itself.
180
+
181
+ ## 5. Independent replication: FABLE/BEAR
182
+
183
+ Concurrent work reaches the same conclusion from the other direction.
184
+ FABLE/BEAR (arXiv:2601.18116, v1 Jan 2026 "FABLE", v2 May 2026 "BEAR")
185
+ builds LLM-constructed semantic forests and retrieves over them with
186
+ bi-path navigation. Their ablations, on general corpora:
187
+
188
+ - hierarchical node-level retrieval beats flat chunks by **+27 points**
189
+ at a 4K-token evidence budget;
190
+ - LLM semantic chunking alone reaches near-optimal completeness at 4K
191
+ tokens where fixed-length chunking needs 128K (**64× efficiency**);
192
+ - the full forest matches full-context Gemini-2.5-Pro with **94% fewer
193
+ tokens**;
194
+ - on BrowseComp-plus, swapping only the retriever (same LLM) moved an
195
+ agent from rank 11 to near the top — retrieval architecture, not model
196
+ scale, was the binding constraint.
197
+
198
+ Their stated limitation is our thesis: "FABLE requires upfront indexing
199
+ and benefits most from semantically structured documents. Its advantages
200
+ diminish on highly unstructured corpora." Producer-native structure
201
+ (MKO, Primmel) is the ceiling of that benefit — the tree arrives
202
+ authored, not inferred.
203
+
204
+ **Our adaptation inverts their index-time cost.** FABLE pays an LLM to
205
+ BUILD the hierarchy (chunk → tree → summaries) because their corpora are
206
+ unstructured. OIML documents arrive as trees: clause anchors chain
207
+ parent→child natively, so Metanorma publications skip the LLM tree-builder
208
+ entirely — we only synthesize the ~1,400 missing depth-1 summary nodes
209
+ (one-time, ≈$3, quality-first lane) and adopt three serving techniques
210
+ (structural propagation, position-preserving ordering, ancestor-descendant
211
+ dedup; see docs/knowledge-annealment.md "FABLE adaptations").
212
+
213
+ ## 6. Beyond the matrix: the frontier is executable
214
+
215
+ The matrix's ceiling is retrieval. The same model objects that win L8
216
+ are machine-checkable, so the serving system now EXECUTES them: a
217
+ question naming a constraint is evaluated deterministically (verdict,
218
+ the standard's own violation word, the arithmetic shown — attached as
219
+ data, never generated prose), hypothetical values evaluate the same way,
220
+ absence over a standard's model plane returns an enumeration certificate
221
+ rather than a refusal, and any answer is checkable against the corpus
222
+ (verbatim-quote containment, object-reference resolution, judged
223
+ faithfulness). The same typed-unit plane feeds multimodal answers: a
224
+ pinned figure's pixels ride the generation call, so pixel-only content
225
+ (labels readable only from the drawing — L7b) is read from the producer's
226
+ asset instead of disclaimed against its caption. These capabilities
227
+ exist because the corpus is a model; no text representation can follow
228
+ them at any scale — the frontier the ladder points at, now live.
229
+
230
+ The measurement itself now runs as one command (golden ×3 + annealment
231
+ ×6, any failed run fails the gate), and the corpus behind it is kept
232
+ canonical by operations the gate assumes: index reconciliation (the
233
+ first census measured 49,553 live vectors against 31,512 canonical —
234
+ 18,041 strays from every prior re-chunking, deleted), enrichment
235
+ replay after full restores (contextual preambles live in the index, not
236
+ the artifacts), and asset readability sweeps (a vector-sourced figure
237
+ raster that flattens to solid black in a vision pipeline is a corpus
238
+ defect, whatever a browser shows).
239
+
240
+ ## 7. Next steps
241
+
242
+ The 6×18 matrix is complete and the full serving pipeline now answers
243
+ 18/18 on the probe battery — the two original follow-ups are done. What
244
+ remains:
245
+
246
+ - Cost-per-correct-answer across lanes (the quality measurements are
247
+ done; the spend columns are not)
248
+ - The composed lane's trade-off motivates adaptive retrieval: route
249
+ queries to the MKO or Primmel half based on query understanding
250
+ - Producer-side vocabulary registers (metanorma-document#53) would move
251
+ the L2 bridge from pipeline capability into corpus capability —
252
+ closing the gap for every consumer of the corpus, not only this
253
+ service
254
+
255
+ ---
256
+
257
+ *Companion documentation: docs/knowledge-annealment.md (the ladder +
258
+ eras + frontier), docs/annealment/ (one file per rung and frontier win
259
+ with worked examples). Reference deployment: ai.oimlsmart.org/annealment.*
@@ -0,0 +1,94 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 600" font-family="Helvetica, Arial, sans-serif">
2
+ <defs>
3
+ <marker id="arr" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
4
+ <path d="M 0 0 L 10 5 L 0 10 z" fill="#334155"/>
5
+ </marker>
6
+ <marker id="arrd" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
7
+ <path d="M 0 0 L 10 5 L 0 10 z" fill="#94a3b8"/>
8
+ </marker>
9
+ </defs>
10
+ <style>
11
+ .box { fill: #ffffff; stroke: #334155; stroke-width: 1.5; rx: 8; }
12
+ .lane { fill: #eff6ff; stroke: #2563eb; stroke-width: 1.5; }
13
+ .gate { fill: #fefce8; stroke: #a16207; stroke-width: 1.5; }
14
+ .out { fill: #f0fdf4; stroke: #15803d; stroke-width: 1.5; }
15
+ .ref { fill: #ffffff; stroke: #94a3b8; stroke-width: 1.2; stroke-dasharray: 5 3; }
16
+ .t { font-size: 13px; font-weight: bold; fill: #1e293b; }
17
+ .s { font-size: 11px; fill: #475569; }
18
+ .edge { stroke: #334155; stroke-width: 1.5; fill: none; marker-end: url(#arr); }
19
+ .dedge { stroke: #94a3b8; stroke-width: 1.3; fill: none; stroke-dasharray: 5 3; marker-end: url(#arrd); }
20
+ .lbl { font-size: 10.5px; fill: #64748b; }
21
+ .ttl { font-size: 11px; fill: #64748b; letter-spacing: 2px; }
22
+ </style>
23
+
24
+ <text class="ttl" x="480" y="20" text-anchor="middle">HOW A QUESTION IS ANSWERED — OIML SMART AI</text>
25
+
26
+ <!-- inputs -->
27
+ <rect class="box" x="195" y="34" width="270" height="46" rx="8"/>
28
+ <text class="t" x="330" y="53" text-anchor="middle">Question</text>
29
+ <text class="s" x="330" y="69" text-anchor="middle">any language, any phrasing</text>
30
+
31
+ <rect class="ref" x="640" y="34" width="290" height="46" rx="8"/>
32
+ <text class="t" x="785" y="53" text-anchor="middle">Edition registry</text>
33
+ <text class="s" x="785" y="69" text-anchor="middle">status derived from supersession links</text>
34
+
35
+ <!-- parallel lanes -->
36
+ <rect class="lane" x="30" y="122" width="280" height="72" rx="8"/>
37
+ <text class="t" x="170" y="143" text-anchor="middle">Query understanding</text>
38
+ <text class="s" x="170" y="159" text-anchor="middle">small LLM: language, publication,</text>
39
+ <text class="s" x="170" y="173" text-anchor="middle">edition, terms, complexity</text>
40
+
41
+ <rect class="lane" x="340" y="122" width="280" height="72" rx="8"/>
42
+ <text class="t" x="480" y="143" text-anchor="middle">Dense retrieval</text>
43
+ <text class="s" x="480" y="159" text-anchor="middle">query embedding &#8594; Vectorize</text>
44
+ <text class="s" x="480" y="173" text-anchor="middle">runs concurrently with understanding</text>
45
+
46
+ <rect class="lane" x="650" y="122" width="280" height="72" rx="8"/>
47
+ <text class="t" x="790" y="143" text-anchor="middle">Lexical retrieval</text>
48
+ <text class="s" x="790" y="159" text-anchor="middle">full-corpus BM25 (D1 / FTS5)</text>
49
+ <text class="s" x="790" y="173" text-anchor="middle">exact identifiers, part numbers, terms</text>
50
+
51
+ <path class="edge" d="M 290 80 L 150 122"/>
52
+ <path class="edge" d="M 330 80 L 470 122"/>
53
+ <path class="edge" d="M 370 80 L 780 122"/>
54
+ <path class="dedge" d="M 660 80 L 560 122"/>
55
+ <text class="lbl" x="710" y="103" text-anchor="middle">doc / edition filters</text>
56
+
57
+ <!-- fusion -->
58
+ <rect class="box" x="250" y="240" width="460" height="52" rx="8"/>
59
+ <text class="t" x="480" y="261" text-anchor="middle">Reciprocal-rank fusion (k = 60)</text>
60
+ <text class="s" x="480" y="277" text-anchor="middle">cross-encoder rerank &#183; typed-chunk pin &#183; diversity caps</text>
61
+
62
+ <path class="edge" d="M 170 194 L 170 217 L 340 240"/>
63
+ <path class="edge" d="M 480 194 L 480 240"/>
64
+ <path class="edge" d="M 790 194 L 790 217 L 620 240"/>
65
+
66
+ <!-- answer model -->
67
+ <rect class="box" x="250" y="332" width="460" height="52" rx="8"/>
68
+ <text class="t" x="480" y="353" text-anchor="middle">Answer model &#8212; GLM-5.3-flash (all tiers)</text>
69
+ <text class="s" x="480" y="369" text-anchor="middle">generates from the retrieved passages only</text>
70
+
71
+ <path class="edge" d="M 480 292 L 480 332"/>
72
+
73
+ <!-- verification -->
74
+ <rect class="gate" x="250" y="424" width="460" height="64" rx="8"/>
75
+ <text class="t" x="480" y="445" text-anchor="middle">Post-generation verification</text>
76
+ <text class="s" x="480" y="461" text-anchor="middle">quote anchors match a cited passage verbatim &#183; [[u:&#8230;]] refs resolve</text>
77
+ <text class="s" x="480" y="475" text-anchor="middle">faithfulness judge sees the passages actually used</text>
78
+
79
+ <path class="edge" d="M 480 384 L 480 424"/>
80
+
81
+ <!-- outputs -->
82
+ <rect class="out" x="90" y="530" width="340" height="56" rx="8"/>
83
+ <text class="t" x="260" y="551" text-anchor="middle">Cited answer + typed blocks</text>
84
+ <text class="s" x="260" y="567" text-anchor="middle">cached by query hash + index version</text>
85
+
86
+ <rect class="box" x="530" y="530" width="340" height="56" rx="8"/>
87
+ <text class="t" x="700" y="551" text-anchor="middle">Off-corpus &#8594; canonical refusal</text>
88
+ <text class="s" x="700" y="567" text-anchor="middle">one sentence, never cached</text>
89
+
90
+ <path class="edge" d="M 400 488 L 300 530"/>
91
+ <path class="edge" d="M 560 488 L 660 530"/>
92
+ <text class="lbl" x="238" y="516" text-anchor="middle">verified</text>
93
+ <text class="lbl" x="722" y="516" text-anchor="middle">no supporting passage</text>
94
+ </svg>
@@ -0,0 +1,94 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 560" font-family="Helvetica, Arial, sans-serif">
2
+ <defs>
3
+ <marker id="arr2" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
4
+ <path d="M 0 0 L 10 5 L 0 10 z" fill="#334155"/>
5
+ </marker>
6
+ </defs>
7
+ <style>
8
+ .box { fill: #ffffff; stroke: #334155; stroke-width: 1.5; }
9
+ .src { fill: #eff6ff; stroke: #2563eb; stroke-width: 1.5; }
10
+ .gate { fill: #fefce8; stroke: #a16207; stroke-width: 1.5; }
11
+ .pay { fill: #faf5ff; stroke: #7c3aed; stroke-width: 1.5; }
12
+ .out { fill: #f0fdf4; stroke: #15803d; stroke-width: 1.5; }
13
+ .t { font-size: 13px; font-weight: bold; fill: #1e293b; }
14
+ .s { font-size: 11px; fill: #475569; }
15
+ .mono { font-size: 10.5px; font-family: "Courier New", monospace; fill: #334155; }
16
+ .edge { stroke: #334155; stroke-width: 1.5; fill: none; marker-end: url(#arr2); }
17
+ .lbl { font-size: 10.5px; fill: #64748b; }
18
+ .ttl { font-size: 11px; fill: #64748b; letter-spacing: 2px; }
19
+ .no { fill: none; stroke: #94a3b8; stroke-width: 1.2; stroke-dasharray: 4 3; }
20
+ </style>
21
+
22
+ <text class="ttl" x="480" y="20" text-anchor="middle">ANSWER CONTRACT v2 — THE MODEL POINTS, THE RENDERER DRAWS</text>
23
+
24
+ <!-- left: passages -->
25
+ <rect class="src" x="30" y="40" width="280" height="112" rx="8"/>
26
+ <text class="t" x="170" y="61" text-anchor="middle">Retrieved passages</text>
27
+ <text class="s" x="170" y="78" text-anchor="middle">each header declares its typed units:</text>
28
+ <text class="mono" x="170" y="97" text-anchor="middle">[3] OIML R 60-1:2021 &#167;5.1.2</text>
29
+ <text class="mono" x="170" y="112" text-anchor="middle">unit u:table-1 (table) &#8212; &#8230;</text>
30
+ <text class="s" x="170" y="134" text-anchor="middle">clause chunks + atomic typed units</text>
31
+
32
+ <!-- middle: model -->
33
+ <rect class="box" x="360" y="40" width="240" height="112" rx="8"/>
34
+ <text class="t" x="480" y="61" text-anchor="middle">Answer model</text>
35
+ <text class="s" x="480" y="79" text-anchor="middle">emits prose that only:</text>
36
+ <text class="s" x="480" y="96" text-anchor="middle">&#183; cites every claim</text>
37
+ <text class="s" x="480" y="112" text-anchor="middle">&#183; quote-anchors normative values</text>
38
+ <text class="s" x="480" y="128" text-anchor="middle">&#183; points at units &#8212; never re-types</text>
39
+
40
+ <path class="edge" d="M 310 96 L 360 96"/>
41
+
42
+ <!-- right: draft output -->
43
+ <rect class="box" x="650" y="40" width="280" height="112" rx="8"/>
44
+ <text class="t" x="790" y="61" text-anchor="middle">Draft output</text>
45
+ <text class="mono" x="790" y="82" text-anchor="middle">&#8230; limited per class [R 60-1:2021 &#167;4.4.2]</text>
46
+ <text class="mono" x="790" y="98" text-anchor="middle">"maximum permissible error &#8230;"</text>
47
+ <text class="mono" x="790" y="114" text-anchor="middle">values: [[u:table-1]]</text>
48
+ <text class="s" x="790" y="136" text-anchor="middle">prose + citations + symbolic refs</text>
49
+
50
+ <path class="edge" d="M 600 96 L 650 96"/>
51
+
52
+ <!-- verification gates -->
53
+ <rect class="gate" x="30" y="200" width="280" height="76" rx="8"/>
54
+ <text class="t" x="170" y="221" text-anchor="middle">Quote-anchor check</text>
55
+ <text class="s" x="170" y="238" text-anchor="middle">every quoted phrase must exist</text>
56
+ <text class="s" x="170" y="252" text-anchor="middle">character-for-character in a used</text>
57
+ <text class="s" x="170" y="266" text-anchor="middle">passage &#8594; else regenerate</text>
58
+
59
+ <rect class="gate" x="340" y="200" width="280" height="76" rx="8"/>
60
+ <text class="t" x="480" y="221" text-anchor="middle">Unit-reference check</text>
61
+ <text class="s" x="480" y="238" text-anchor="middle">every [[u:&#8230;]] must appear among</text>
62
+ <text class="s" x="480" y="252" text-anchor="middle">the passages actually used;</text>
63
+ <text class="s" x="480" y="266" text-anchor="middle">unknown refs are dropped</text>
64
+
65
+ <rect class="gate" x="650" y="200" width="280" height="76" rx="8"/>
66
+ <text class="t" x="790" y="221" text-anchor="middle">Retyping check</text>
67
+ <text class="s" x="790" y="238" text-anchor="middle">a markdown table in the output</text>
68
+ <text class="s" x="790" y="252" text-anchor="middle">while a typed unit was available</text>
69
+ <text class="s" x="790" y="266" text-anchor="middle">&#8594; corrective regeneration</text>
70
+
71
+ <path class="edge" d="M 700 152 L 190 200"/>
72
+ <path class="edge" d="M 760 152 L 500 200"/>
73
+ <path class="edge" d="M 820 152 L 790 200"/>
74
+ <text class="lbl" x="905" y="180" text-anchor="middle">mechanical,</text>
75
+ <text class="lbl" x="905" y="192" text-anchor="middle">post-generation</text>
76
+
77
+ <!-- payload resolution -->
78
+ <rect class="pay" x="250" y="320" width="460" height="60" rx="8"/>
79
+ <text class="t" x="480" y="341" text-anchor="middle">Server resolves refs &#8594; producer payloads</text>
80
+ <text class="s" x="480" y="358" text-anchor="middle">D1 unit_payloads: the document's own columns, rows, units</text>
81
+ <text class="s" x="480" y="372" text-anchor="middle">&#8212; fetched by unit id, never generated</text>
82
+
83
+ <path class="edge" d="M 480 276 L 480 320"/>
84
+
85
+ <!-- client render -->
86
+ <rect class="out" x="150" y="424" width="660" height="60" rx="8"/>
87
+ <text class="t" x="480" y="445" text-anchor="middle">Client renders the producer's objects</text>
88
+ <text class="s" x="480" y="462" text-anchor="middle">real &#9001;table&#9002; from columns/rows &#183; KaTeX from LaTeX &#183; &#9001;img&#9002; from the asset store</text>
89
+
90
+ <path class="edge" d="M 480 380 L 480 424"/>
91
+
92
+ <rect x="150" y="508" width="660" height="36" rx="8" class="no"/>
93
+ <text class="s" x="480" y="530" text-anchor="middle">the payload never passes through the model, so generation cannot corrupt it</text>
94
+ </svg>
@@ -0,0 +1,91 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 600" font-family="Helvetica, Arial, sans-serif">
2
+ <defs>
3
+ <marker id="arr3" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
4
+ <path d="M 0 0 L 10 5 L 0 10 z" fill="#334155"/>
5
+ </marker>
6
+ </defs>
7
+ <style>
8
+ .box { fill: #ffffff; stroke: #334155; stroke-width: 1.5; }
9
+ .mko { fill: #eff6ff; stroke: #2563eb; stroke-width: 1.5; }
10
+ .proc { fill: #fefce8; stroke: #a16207; stroke-width: 1.5; }
11
+ .store { fill: #f0fdf4; stroke: #15803d; stroke-width: 1.5; }
12
+ .t { font-size: 13px; font-weight: bold; fill: #1e293b; }
13
+ .s { font-size: 11px; fill: #475569; }
14
+ .edge { stroke: #334155; stroke-width: 1.5; fill: none; marker-end: url(#arr3); }
15
+ .lbl { font-size: 10.5px; fill: #64748b; }
16
+ .ttl { font-size: 11px; fill: #64748b; letter-spacing: 2px; }
17
+ </style>
18
+
19
+ <text class="ttl" x="480" y="20" text-anchor="middle">PRODUCER-NATIVE INGESTION — METANORMA KNOWLEDGE OBJECTS (MN 116)</text>
20
+
21
+ <!-- source -->
22
+ <rect class="box" x="30" y="40" width="220" height="64" rx="8"/>
23
+ <text class="t" x="140" y="64" text-anchor="middle">Metanorma authoring</text>
24
+ <text class="s" x="140" y="82" text-anchor="middle">document.adoc &#8212; the typed</text>
25
+ <text class="s" x="140" y="96" text-anchor="middle">document model is the source</text>
26
+
27
+ <!-- bundle -->
28
+ <rect class="mko" x="300" y="40" width="360" height="130" rx="8"/>
29
+ <text class="t" x="480" y="62" text-anchor="middle">MKO bundle &#8212; one per document</text>
30
+ <text class="s" x="480" y="82" text-anchor="middle">typed units: clauses, tables, terms,</text>
31
+ <text class="s" x="480" y="96" text-anchor="middle">equations, figures, requirements</text>
32
+ <text class="s" x="480" y="113" text-anchor="middle">section graph (part_of &#183; cites &#183; defines)</text>
33
+ <text class="s" x="480" y="130" text-anchor="middle">Glossarist glossary &#183; Relaton bibliography</text>
34
+
35
+ <path class="edge" d="M 250 72 L 300 72"/>
36
+
37
+ <!-- chunking -->
38
+ <rect class="proc" x="710" y="40" width="220" height="130" rx="8"/>
39
+ <text class="t" x="820" y="64" text-anchor="middle">Chunking</text>
40
+ <text class="s" x="820" y="84" text-anchor="middle">clause-boundary chunks;</text>
41
+ <text class="s" x="820" y="98" text-anchor="middle">tables / equations / figures</text>
42
+ <text class="s" x="820" y="112" text-anchor="middle">stay atomic typed units</text>
43
+ <text class="s" x="820" y="129" text-anchor="middle">stable ids = content hash</text>
44
+ <text class="s" x="820" y="146" text-anchor="middle">provenance on every chunk</text>
45
+
46
+ <path class="edge" d="M 660 105 L 710 105"/>
47
+
48
+ <!-- enrichment -->
49
+ <rect class="proc" x="300" y="220" width="360" height="76" rx="8"/>
50
+ <text class="t" x="480" y="243" text-anchor="middle">Contextual enrichment (one-time)</text>
51
+ <text class="s" x="480" y="260" text-anchor="middle">a model writes a 2&#8211;3 sentence preamble situating</text>
52
+ <text class="s" x="480" y="274" text-anchor="middle">each chunk; embed preamble + chunk (&#8776;$0.002/chunk)</text>
53
+
54
+ <path class="edge" d="M 820 170 L 820 195 L 480 220"/>
55
+
56
+ <!-- embed -->
57
+ <rect class="proc" x="300" y="340" width="360" height="52" rx="8"/>
58
+ <text class="t" x="480" y="361" text-anchor="middle">Embed &#8594; index</text>
59
+ <text class="s" x="480" y="377" text-anchor="middle">same embedding model serves queries (mandatory)</text>
60
+
61
+ <path class="edge" d="M 480 296 L 480 340"/>
62
+
63
+ <!-- stores -->
64
+ <rect class="store" x="30" y="440" width="200" height="72" rx="8"/>
65
+ <text class="t" x="130" y="463" text-anchor="middle">Vectorize</text>
66
+ <text class="s" x="130" y="480" text-anchor="middle">dense lane,</text>
67
+ <text class="s" x="130" y="494" text-anchor="middle">metadata-filterable</text>
68
+
69
+ <rect class="store" x="260" y="440" width="200" height="72" rx="8"/>
70
+ <text class="t" x="360" y="463" text-anchor="middle">D1 + FTS5</text>
71
+ <text class="s" x="360" y="480" text-anchor="middle">full-corpus BM25</text>
72
+ <text class="s" x="360" y="494" text-anchor="middle">over enriched text</text>
73
+
74
+ <rect class="store" x="490" y="440" width="200" height="72" rx="8"/>
75
+ <text class="t" x="590" y="463" text-anchor="middle">D1 unit_payloads</text>
76
+ <text class="s" x="590" y="480" text-anchor="middle">typed objects,</text>
77
+ <text class="s" x="590" y="494" text-anchor="middle">MN 116 schemas</text>
78
+
79
+ <rect class="store" x="720" y="440" width="200" height="72" rx="8"/>
80
+ <text class="t" x="820" y="463" text-anchor="middle">R2 assets</text>
81
+ <text class="s" x="820" y="480" text-anchor="middle">figures, immutable,</text>
82
+ <text class="s" x="820" y="494" text-anchor="middle">/assets/u:&#8230;.&lt;ext&gt;</text>
83
+
84
+ <path class="edge" d="M 400 392 L 160 440"/>
85
+ <path class="edge" d="M 450 392 L 360 440"/>
86
+ <path class="edge" d="M 510 392 L 590 440"/>
87
+ <path class="edge" d="M 560 392 L 810 440"/>
88
+
89
+ <text class="s" x="480" y="556" text-anchor="middle">Incremental re-ingest: bundles diff by (document, unit id) + content hash &#8212;</text>
90
+ <text class="s" x="480" y="572" text-anchor="middle">a synonym change re-processes 34 of 3 053 chunks; a no-change rebuild reports zero</text>
91
+ </svg>