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.2.0.tar.gz (21.6 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.2.0-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: proofwright-0.2.0.tar.gz
  • Upload date:
  • Size: 21.6 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.2.0.tar.gz
Algorithm Hash digest
SHA256 5a801f1a5874b181bb3e1a97d553ade1d2a1fb15e222ce80a68d885c7ba563f9
MD5 8107fcec41048b5f1838d0554e9e78cc
BLAKE2b-256 5d856e333dbfc507670b79fe3555086523de6b4133425f861d06ae36b0e9fc7e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: proofwright-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 31.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b97755187bc3dbeaa256758a514361319daf94626cfd7db0fc2f999fc90f610
MD5 23f13e56a24925275b46dac79e8df64a
BLAKE2b-256 7c6821b9cadceb8683dbcabbdfbfe5b7bade1c9a0187b4cdce11ef6f616865db

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