Liking cljdoc? Tell your friends :D

fractal-engine.provenance

The trust layer. A FINAL value is a claim, not a fact (the behavior prompt says so explicitly). Two reads make a claim auditable:

  1. CLAIM PROVENANCE — walk a node's FINAL value and surface every claim that carries evidence, with the address of the node that produced it, so you can follow FINAL field → child → leaf → cited file.
  2. CLAIM-VS-EVIDENCE — the confabulation backstop. For each cited file: quote, read the file and check whether the distinctive tokens and code snippets in the quote actually occur in it. A model can write a fluent, code-quoted analysis of a file it never read; this catches exactly that.

Matching is deliberately tolerant: evidence is paraphrase, not a byte-exact slice. We extract identifiers (snake_case / CamelCase / dotted names) and backtick code spans from the quote and report how many land in the file, with the misses named so a human or agent can judge rather than trust a single boolean.

The trust layer. A FINAL value is a *claim*, not a fact (the behavior prompt says
so explicitly). Two reads make a claim auditable:

1. CLAIM PROVENANCE — walk a node's FINAL value and surface every claim that
   carries evidence, with the address of the node that produced it, so you can
   follow FINAL field → child → leaf → cited file.
2. CLAIM-VS-EVIDENCE — the confabulation backstop. For each cited `file: quote`,
   read the file and check whether the distinctive tokens and code snippets in the
   quote actually occur in it. A model can write a fluent, code-quoted analysis of
   a file it never read; this catches exactly that.

Matching is deliberately tolerant: evidence is paraphrase, not a byte-exact slice.
We extract identifiers (snake_case / CamelCase / dotted names) and backtick code
spans from the quote and report how many land in the file, with the misses named
so a human or agent can judge rather than trust a single boolean.
raw docstring

check-claimsclj

(check-claims final)
(check-claims final base)

Run claim-vs-evidence over every evidenced claim in a FINAL value, resolving relative citations against base (the repo root the run worked on). Each result is {:label … :evidence "…" :file … :verdict …}.

Run claim-vs-evidence over every evidenced claim in a FINAL value, resolving
relative citations against `base` (the repo root the run worked on). Each result is
{:label … :evidence "…" :file … :verdict …}.
sourceraw docstring

check-evidenceclj

(check-evidence parsed)
(check-evidence {:keys [file quote]} base)

Check one parsed evidence {:file :quote} against the filesystem, resolving a relative path against base (the repo root). Returns a verdict map naming what was found and what was missing — explainable, not just a boolean.

Check one parsed evidence {:file :quote} against the filesystem, resolving a
relative path against `base` (the repo root). Returns a verdict map naming what was
found and what was missing — explainable, not just a boolean.
sourceraw docstring

extract-claimsclj

(extract-claims final)

Walk a FINAL value and collect every evidenced claim as {:label … :evidence [str…]}. A claim is any map carrying an :evidence key; bare file: quote strings found loose are also captured.

Walk a FINAL value and collect every evidenced claim as
{:label … :evidence [str…]}. A claim is any map carrying an :evidence key; bare
`file: quote` strings found loose are also captured.
sourceraw docstring

merge-verdictsclj

(merge-verdicts checks verdicts)

Fold the engine's deep verdict vector back onto the floor checks by :id.

Fold the engine's deep verdict vector back onto the floor checks by :id.
sourceraw docstring

node-provenanceclj

(node-provenance root-dir address)

For the node at address, the chain that backs its FINAL value: the final value itself, the evidenced claims it contains, and the child/leaf calls that fed it. Pure structural read over the journal fold.

For the node at `address`, the chain that backs its FINAL value: the final value
itself, the evidenced claims it contains, and the child/leaf calls that fed it.
Pure structural read over the journal fold.
sourceraw docstring

parse-evidenceclj

(parse-evidence s)

Split "/abs/path.ext: some quoted text" into {:file :quote}. The path is the leading non-space run ending at the first colon; everything after is the quote. If there's no leading path, :file is nil and the whole string is the quote.

Split `"/abs/path.ext: some quoted text"` into {:file :quote}. The path is the
leading non-space run ending at the first colon; everything after is the quote.
If there's no leading path, :file is nil and the whole string is the quote.
sourceraw docstring

summarizeclj

(summarize checks)

Roll verdicts up to one banner: counts per verdict + an overall trust call.

Roll verdicts up to one banner: counts per verdict + an overall trust call.
sourceraw docstring

verify-taskclj

(verify-task checks _base)

Build the task that asks the engine to validate its own claims against source. It does NOT prescribe children-vs-leaves — that's the engine's call, the whole point. Input is the floor's parsed checks (so floor and deep share one parse); output instruction is a compact per-claim verdict vector.

Build the task that asks the engine to validate its own claims against source.
It does NOT prescribe children-vs-leaves — that's the engine's call, the whole
point. Input is the floor's parsed checks (so floor and deep share one parse);
output instruction is a compact per-claim verdict vector.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close