Skip to main content

Deterministic, zero-LLM structural checks for an LLM Wiki (Karpathy raw/→wiki/ pattern).

Project description

Proofwright

Deterministic, zero-LLM structural tooling for an LLM Wiki — the Karpathy raw/ → LLM → wiki/ research-synthesis pattern.

Proofwright is the deterministic layer: it checks the wiki against invariants and rebuilds derived artifacts, but never authors content. A "wright" is a maker/keeper — it builds the index, link graph, and report, not just flags problems.

What it checks

  • Structural — orphan pages, missing pages, broken [[wikilinks]], stale index, missing provenance.
  • Frontmatter — required keys, types, allowed tag/grade vocabularies.
  • Citation integrity — every [n] resolves to a source that maps to a real file in raw/; prose lacking a citation is flagged. (The primary defense against hallucination-baking.)
  • Source grades — every source graded, grades from a fixed vocabulary.
  • Graph — phantom hubs, hub stubs, fragile bridges.
  • Freshness — stale-page candidate list from recency markers.

Everything semantic (synthesis, meaning-level contradiction, supersession) stays with the LLM and is out of scope by design.

Usage

uv run proofwright check --config wiki.toml            # run all checks → report
uv run proofwright check --format json                 # machine-readable findings
uv run proofwright index --check                        # is the committed index stale?
uv run proofwright index --write                        # regenerate the index
uv run proofwright graph --report                       # graph-health report
uv run proofwright search "your query"                  # rank pages (BM25 + graph, RRF)
uv run proofwright search "your query" --format json    # ranked results with provenance

Retrieval

search ranks pages with two deterministic streams — BM25 (exact terms) and graph expansion (structural links, seeded by the top BM25 hits) — fused with reciprocal rank fusion. Each result reports which stream surfaced it. Tune it under [retrieval] in wiki.toml.

The LLM rerank of the top slice is a bounded, injectable step (a Reranker protocol); the package default is a no-op, so search stays zero-LLM. A vector stream can fuse in later without changing the fusion.

proofwright is a library, not a framework: all per-wiki variance (paths, vocabularies, thresholds) lives in wiki.toml; custom rules register via the plugin hook. No subject-matter knowledge lives in the package.

See templates/ for a starter wiki.toml, CLAUDE.md schema, and page templates.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proofwright-0.3.0.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

proofwright-0.3.0-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

Details for the file proofwright-0.3.0.tar.gz.

File metadata

  • Download URL: proofwright-0.3.0.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for proofwright-0.3.0.tar.gz
Algorithm Hash digest
SHA256 69bdeefa2ed202bf08810ffdfecea2e46e1bf3463909fdadf3b1a806d5a38090
MD5 4640c2e5eb5b6a2552cfa65e62e383be
BLAKE2b-256 303b890ddc500b2e7c618a63c339e85a91bc8686dc61a5ec3b599f0d7e1f66d9

See more details on using hashes here.

File details

Details for the file proofwright-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: proofwright-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 35.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for proofwright-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d64315d9fa7ded83789a2b56b50b69ea3e81c72a323324501f7404e9f2e17b47
MD5 bf4a610a82e6e5a694c8d60c034a203e
BLAKE2b-256 53ed96a4de5105bd539cb9f7c7ed6a127f8480536fe7bb958a867df5b94fb500

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page