<kb-pool name="kos-systems" version="1" title="Knowledge Pool v3 and Assay: how they work" lang="en" address="mr://kos/systems/" kind="pack">
<schema name="kb-block" strict-children="true">
<require attr="key"/>
<require attr="kind"/>
<require attr="stamp"/>
<child tag="title" min="1" max="1"/>
<child tag="dried" min="1" max="1"/>
<allow tag="body"/>
<allow tag="quote"/>
<allow tag="proof"/>
<allow tag="source"/>
<allow tag="link"/>
<allow tag="tag"/>
<allow tag="rel"/>
<allow tag="score"/>
<allow tag="comment"/>
</schema>
<spine title="Knowledge Pool v3 and Assay: how they work">
<part id="identity" title="Identity and the pool">
<dried>C14N-MR 1.0, block identity, content root.</dried>
<ref key="sy-c14n"/>
<ref key="sy-root"/>
<ref key="sy-pool-format"/>
<ref key="sy-stamps"/>
</part>
<part id="assay" title="Assay">
<dried>The knowledge desk.</dried>
<ref key="sy-pipeline"/>
<ref key="sy-stamp-rule"/>
<ref key="sy-assay-11"/>
<ref key="sy-assay-12"/>
<ref key="sy-load-checks"/>
</part>
<part id="kp3" title="Knowledge Pool v3">
<dried>The single-file reader and its kernel.</dried>
<ref key="sy-kp3-kernel"/>
<ref key="sy-kp3-profiles"/>
</part>
</spine>

<block key="sy-c14n" kind="specification" stamp="VP" date="2026-09" id="sha256:88bdc6c451a85415bede899162203800f5b095c8e4369057140aaf1169672dbc">
<title>C14N-MR 1.0 canonical form</title>
<dried>canon(E) = &lt;name attrs&gt; children &lt;/name&gt;: attributes (minus R on the root) sorted by UTF-16 code units, written name=escV(value) joined by ';'; text and CDATA escaped (escT: &amp; &lt; &gt;); child elements recursed unless their lower-cased name is in X; comments and processing instructions dropped. escV also escapes ';' and '='. hash(E) = sha256: + hex(SHA-256(UTF-8(canon(E)))).</dried>
<body><p>Block identity uses X = {signature, lineage, score, comment} and R = {id, key}: annotations and the key can change without changing identity.</p><p>Matched by the browser kernel, the TypeScript port and the independent Python reference on 23 vectors.</p></body>
</block>

<block key="sy-root" kind="specification" stamp="VP" id="sha256:b31802d883045ac149923b40a641152025f0edb6a8427ed5c12e1cc4aa16b7a6">
<title>Content root</title>
<dried>root = sha256 over the sorted block hashes joined by newlines, a newline, then the canonical content spines. Captures are not in the root directly: each capture's captured-hash must appear in a content block's canonical form, and loaders check that.</dried>
</block>

<block key="sy-pool-format" kind="specification" stamp="VP" id="sha256:d3307dc24ddf8579388789581b2fac46a3a5f4ebcc97763d121b5b77aebfe5f1">
<title>The &lt;kb-pool&gt; format</title>
<dried>A pool holds a kb-block schema (title and dried required; body, quote, proof, source, link, tag, rel, score, comment allowed), profiles, spines of parts referencing blocks by key, content blocks, &lt;iframe-region&gt; captures, system blocks (feature, test, spec, contract) and, in packs, one &lt;manifest&gt;.</dried>
</block>

<block key="sy-stamps" kind="specification" stamp="VP" id="sha256:bbf63e3ece03d2ad7111d80a746ef4741444e29f962d36789e405be8da49c5fe">
<title>Stamp vocabulary</title>
<dried>VV verified (for claims: located, appraised to standard and independently corroborated by a fetched page); VP provenance verified (located and to standard, without independent fetched corroboration); U unverified.</dried>
</block>

<block key="sy-pipeline" kind="method" stamp="VP" id="sha256:37739e2b2c2bd28c04b883c1c2f0fa49d43813e2b218f9f623bb900a0ec17ff6">
<title>The assay pipeline</title>
<dried>Capture (sanitised snapshot stored as an iframe-region, three hashes) → extract (Claude: claims with verbatim quotes) → check (quotes located mechanically; figures in restatements checked) → appraise (Claude, against 25 dated standards) → corroborate (web search, worker fetch, passage located on an independent publisher's page) → deterministic stamp → seal.</dried>
</block>

<block key="sy-stamp-rule" kind="rule" stamp="VP" id="sha256:11733d849439031e54fd26e1909b6d485e339593e78c7cebcc349237d8ac047c">
<title>The stamp rule</title>
<dried>U if the quote is not located (exact, normalised, case-insensitive or elided, on word boundaries), too short (&lt;6 words or 30 characters), ambiguous, irrelevant, or the restatement adds figures; U if any located contradiction exists (evidence is append-only); U for asserted, unsupported, contested, anachronistic, opinion. VP if appraised sourced or demonstrated. VV if VP plus a relevant supporting passage located on a page the worker fetched, from a different publisher, the subject itself having been fetched.</dried>
</block>

<block key="sy-assay-11" kind="release" stamp="VP" date="2026-10-02" id="sha256:baaacfff6c2de4512bd00bf3792f349d8f4a491cb7810ca02f5d5636d5822d46">
<title>Assay 1.1: tools, records, replay, SQLite, D1</title>
<dried>Six tool blocks pinned to the build; every model answer recorded as a response block; run blocks; audit, fresh and drift replays; an in-memory SQLite index; a D1 store with append-only, chunked pool versions, atomic optimistic concurrency and watched sources.</dried>
<body><p>Verification: 31 worker checks, 39 tool-and-store checks, 60 end-to-end checks (the UI served through the compiled worker under its real CSP), 6 checks against workerd with a local D1; an independent review's 7 findings fixed with regression tests.</p></body>
</block>

<block key="sy-assay-12" kind="release" stamp="VP" date="2026-10-02" id="sha256:232d6dcf59709101979fea1bc99093472b9f903be5c2626288ef74a5a1719cb7">
<title>Assay 1.2: signed install</title>
<dried>Packs verified against pinned roots before install: block hashes, content root, publisher signature, certificate chain, validity, revocation, scope. Content packs merge; tool packs register definitions only.</dried>
</block>

<block key="sy-load-checks" kind="rule" stamp="VP" id="sha256:d826990f7feb98a0b95a08de0a36f959230dfca9abbd116169ff740ff4dd3282">
<title>What a load from the store checks</title>
<dried>Content root recomputed; ledger chain re-verified; every block and capture sealed; every capture's snapshot hashes to its captured-hash and that hash is in a content block's canonical form; stored desk state agrees with the pool; every source re-audited. Consistency, not authorship: authorship needs signatures.</dried>
</block>

<block key="sy-kp3-kernel" kind="design" stamp="VP" id="sha256:762f6d8806122ba537876e8aa94697ae377193bd6bd4b9e9c755f089ee809a5c">
<title>The v3 kernel</title>
<dried>A 15.5 KB kernel verifies and loads feature blocks pinned by build spines, with semver requires and declared capabilities; code runs baked (KB.define) or live; bundle({slim}) saves only what the active build pins; the host is asked for downloads only if a pinned feature declares it.</dried>
</block>

<block key="sy-kp3-profiles" kind="design" stamp="VP" id="sha256:909213713fdbb079970647b25196c95deb83db7ac98fa000fa25c8421bd2d66a">
<title>Build profiles</title>
<dried>min-reader (contents, reading paths), reader (adds relations, trail, profile lens, comments, build tab), publisher (adds ledger, merge, exports to PDF, Word, Markdown and HTML, and tests).</dried>
</block>

<manifest pack="kos-systems" title="Knowledge Pool v3 and Assay: how they work" version="1.0.0" format="kos-pack-1" created="2026-10-02T12:00:00Z" root="sha256:76b64eb1542404004757576f001705d040d5fc993790235d3b74b60810a296f9" blocks="11">
<who>
<identity root="sha256:76b64eb1542404004757576f001705d040d5fc993790235d3b74b60810a296f9"/>
<author name="Rob Anderson" org="Memeroot Ltd" role="commissioning author and publisher"/>
<builder name="Claude" org="Anthropic" model="claude-opus-5-5" role="collated, checked and compiled under the author’s instruction"/>
</who>
<where>
<derived-from kind="document" date="2026-09-27/2026-10-02">Project notes claude/knowledge-pool-v3.md, claude/assay-knowledge-desk.md, claude/assay-1.1-tools-replay-d1.md</derived-from>
<build tool="build_packs.py" sha256="sha256:6a8f4d9eb8f927aa16729fe8ab00ace73bd9f11981ccbb95070296dbeb52ece1" canonical="C14N-MR 1.0"/>
</where>
<what kind="content" effects="read-only" install="merge">
<purpose>The design of the two built systems as reference blocks: the identity rule, the pool format, the stamp rule, the assay pipeline, replay, the store and their verification records.</purpose>
</what>
<list>
<item key="sy-c14n" hash="sha256:88bdc6c451a85415bede899162203800f5b095c8e4369057140aaf1169672dbc"/>
<item key="sy-root" hash="sha256:b31802d883045ac149923b40a641152025f0edb6a8427ed5c12e1cc4aa16b7a6"/>
<item key="sy-pool-format" hash="sha256:d3307dc24ddf8579388789581b2fac46a3a5f4ebcc97763d121b5b77aebfe5f1"/>
<item key="sy-stamps" hash="sha256:bbf63e3ece03d2ad7111d80a746ef4741444e29f962d36789e405be8da49c5fe"/>
<item key="sy-pipeline" hash="sha256:37739e2b2c2bd28c04b883c1c2f0fa49d43813e2b218f9f623bb900a0ec17ff6"/>
<item key="sy-stamp-rule" hash="sha256:11733d849439031e54fd26e1909b6d485e339593e78c7cebcc349237d8ac047c"/>
<item key="sy-assay-11" hash="sha256:baaacfff6c2de4512bd00bf3792f349d8f4a491cb7810ca02f5d5636d5822d46"/>
<item key="sy-assay-12" hash="sha256:232d6dcf59709101979fea1bc99093472b9f903be5c2626288ef74a5a1719cb7"/>
<item key="sy-load-checks" hash="sha256:d826990f7feb98a0b95a08de0a36f959230dfca9abbd116169ff740ff4dd3282"/>
<item key="sy-kp3-kernel" hash="sha256:762f6d8806122ba537876e8aa94697ae377193bd6bd4b9e9c755f089ee809a5c"/>
<item key="sy-kp3-profiles" hash="sha256:909213713fdbb079970647b25196c95deb83db7ac98fa000fa25c8421bd2d66a"/>
</list>
<signature role="build" author="ef59f070612d4b99" fp256="ef59f070612d4b99c450156fb03ea1a65780a8b5f650c92192891e94cff138ae" name="build" pubkey="MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1H5n/Foqg+LAXtLIWeJ6/b2gjZ0l03yZnYQd+OHoUizGpIB4D2lG3FZ+JPPHjf3lw8Ny6QBidHPklzRVCoXzVA==" value="WsnQeSdco4N4L7WmBfRzIUyc5qHNOtaHcEOQ+hhIGIcLlW4Sbk26KJr9L3NyELwCVDvE6lUcfIOqv4alXYAXMA==" algo="ECDSA-P256-SHA256" timestamp="2026-10-02T12:30:10.317Z"/></manifest>
</kb-pool>