Knowledge<T>
Sounio’s epistemic value type: explicit unwrap, no silent loss of uncertainty.
Knowledge<T>
Knowledge<T> remains the most concrete public entry point into Sounio’s epistemic model. Even though the full design includes richer metadata and propagation rules, the checked public contract already establishes an important invariant: epistemic context should not disappear silently.
Current contract
- Keep the value wrapped as
Knowledgefor as long as possible. - Crossing from epistemic data to plain data should happen at an explicit boundary such as
unwrap(reason). - The reason string is not a cosmetic detail; it is the clearest currently enforced provenance boundary in the public surface.
Representative use
let k = Knowledge { value: 42.0 }
let accepted: f64 = k.unwrap("accepted for demo")
Repo map
docs/reference/KNOWLEDGE_REFERENCE.mdexplains the larger value model and intended arithmetic behavior.self-hosted/check/epistemic.siois the first implementation file to inspect for checker behavior.tests/run-pass/vancomycin_propagation.siois the best small fixture showing this concept inside a real workflow.
Important caveats
- Do not assume every field described in research-oriented docs is exposed in the checked artifact in the same way.
- Do not describe
Knowledgeas just a tagged wrapper; in this repo it is meant to carry audit and decision meaning. - If you want to claim automatic propagation semantics, point to a current fixture or clearly mark the claim as part of the larger model.