Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crosscheck

A linter for knowledge, not code. Point it at any corpus — a local docs folder, a git repo, or a remote knowledge base via MCP (Notion, Slack canvases, Google Drive, …) — and it finds the places where the corpus disagrees with itself, contradicts itself, or says nothing while appearing to say something.

/crosscheck run on the notion workspace called "Sales"
/crosscheck scan ./docs
/crosscheck check this repo's markdown

The deliverable is an interactive HTML report: one digestible line per finding, ranked by severity. A Deep dive toggle per finding reveals the evidence — verbatim quotes from both sides, a suggested fix, the verifier's note — plus a resolved-checkbox and comment box. Copy as markdown puts the triaged findings (+ your resolution notes) on the clipboard.

What it looks like

Report overview — one severity-stamped line per finding

Each finding expands into the full apparatus: lettered witnesses with verbatim quotes, a blue-pencil suggested fix, and the adversarial verifier's line-level evidence check:

Deep dive — witnesses, suggested fix, verifier note

Getting started

git clone https://github.com/TwillAI/crosscheck.git
cd crosscheck
claude          # open Claude Code in this repo — the tool IS the repo

Then type /crosscheck followed by a sentence describing the corpus. Local paths and git repos work out of the box; Notion (and other MCP sources) need the matching connector enabled in Claude Code. A run spawns several subagents — the dogfood run below cost roughly 190k subagent tokens and 7 minutes.

The problem

Any knowledge base older than six months accumulates rot:

  • Contradictions — page A says the retention window is 30 days, page B says 90.
  • Drift — prices, limits, versions that differ between copies of the same fact.
  • Terminology — the same concept under three names ("workspace", "team space", "org").
  • Dangling references — mentions of pages, features, teams that no longer exist.
  • Vagueness — "processed quickly", "most customers" in places that demand a number.

Humans read one page at a time, so the rot is invisible until you compare every claim against every other claim — exactly the exhaustive cross-referencing LLMs do well and humans never do.

How it works

flowchart LR
    A["/crosscheck<br>&quot;scan ./docs&quot;"] --> B["discover corpus<br>inventory + size estimate"]
    B --> C{"fits one context?<br>(&le;120k tokens)"}
    C -->|yes| H["holistic-reviewer<br>reads everything at once"]
    C -->|no| E["claim-extractor &times; N<br>docs &rarr; atomic claims"]
    E --> F["cluster claims<br>by entity key"]
    F --> G["contradiction-judge &times; M<br>one per cluster"]
    H --> V["finding-verifier &times; K<br>tries to REFUTE each finding"]
    G --> V
    V --> R["interactive<br>HTML report"]
Loading

Everything lives in .claude/ — this repo is the tool.

  1. The /crosscheck skill parses your sentence, discovers the corpus (filesystem directly; Notion & co. via MCP, with the kb-discoverer agent for messy cases), and routes by size.
  2. Small corpus (≲120k tokens) → holistic mode: one agent reads everything in a single context. Strictly better when it fits, because contradictions live between documents.
  3. Big corpus → map-reduce Claude Workflow (.claude/workflows/crosscheck.js): parallel claim-extractor agents turn each doc batch into atomic claims (qualifiers, verbatim quote, source anchor, entity keys) → union-find clustering on entity keys → parallel contradiction-judge agents per cluster. The map step extracts claims rather than hunting issues because a contradiction between doc 3 and doc 47 is invisible to any single mapper.
  4. Every raw finding faces a finding-verifier agent instructed to refute it (checks quotes exist, scopes truly overlap, the issue isn't pedantic). Uncertain → dropped. Precision is the product.
  5. Findings JSON is injected into templates/report.html and sent to you.

Full rationale and contracts: DESIGN.md. History: BRAINSTORM.md.

Status

First real run complete: the Twill public docs (42 files, holistic mode) — 5 raw findings, 1 refuted in verification, 4 confirmed (the screenshots above). Next: hand-score precision on more corpora.

Roadmap

  1. Owners. Assign an owner per finding, so triage ends with a name next to every item, not just a checkbox.
  2. Shared reports. Publish the report as a Claude Artifact instead of a local file, so teammates can open one link, resolve items, and leave notes — triage becomes collaborative instead of single-player.
  3. Close the loop. Turn accepted resolutions into edits to the knowledge base itself: crosscheck drafts the doc fix (PR for repos, page edit for Notion) from the suggested resolution and your notes.
  4. CI mode. Incremental runs — "does this PR contradict the corpus?" — instead of full re-scans.

About

A linter for knowledge bases: find contradictions, drift, and vagueness across any corpus

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages