CiteLock

Checks quotes and whole claims against their sources, with fixed rules anyone can re-run, here or from any AI agent. No AI judge: text matching, offsets and SHA-256.

Start here

Kar-Citelock checks what an AI (or a person) says against the documents it says it comes from. It does two jobs, both with fixed rules and no AI judging anything, and both run entirely in this page: nothing you paste is sent anywhere.

Below the tools: how the claim check works · its limits · payment on proof · how the quote check works · words on this page · blueprint · roll it out · for a business · FAQ

Check a claim against its sources

Paste a claim, for example a sentence an AI wrote, and the sources it rests on. The answer is VERIFIED only when all three hold:

  1. every quotation in the claim (the words between double quote marks) is word for word in a cited source;
  2. every content word outside the quotations is in a cited source;
  3. every number outside the quotations is in a cited source.

Anything less is REFUSED, with one reason for each part that failed. The table shows every check and where in the source it was found. Mark which source a sentence rests on with [id], for example [report]; a claim with no marker is checked against every source.

Start here: press Load a true claim, then Verify. Then Load a false claim and verify again, and compare the reasons. Then type your own.

A source with no id is cited by its position: 1, 2, 3. The examples are made up for this page.

Call it from your agent

Any AI agent that speaks MCP (the Model Context Protocol, the way agents such as Claude call tools) can run this same check on its own machine, with no account and no key. One line starts it:

npx -y github:sjgant80-hub/kar-citelock

In an MCP client's settings (Claude Desktop, Cursor and others take this shape):

{
  "mcpServers": {
    "kar-citelock": { "command": "npx", "args": ["-y", "github:sjgant80-hub/kar-citelock"] }
  }
}

In Claude Code:

claude mcp add kar-citelock -- npx -y github:sjgant80-hub/kar-citelock

The server has two tools. verify_claim takes { claim, sources } and returns VERIFIED or REFUSED, the reasons and the trace, exactly as the box above shows. about returns the rules and the limits in plain words. Tell your agent to call verify_claim before it states anything it says a source supports, and to stop, or say so, when the answer is REFUSED.

Paste one or more source documents, then list the quotes an AI (or a person) claims come from them. CiteLock checks each claimed quote against its source using plain substring search and Levenshtein similarity — the same algorithm every time, inline in this page's own source code — and classifies it as VERIFIED (exact, after whitespace/quote-mark normalization), NEAR MATCH (a close but altered passage — an edited or paraphrased quote), or NOT FOUND (no matching passage exists in that source at all). The run ends with a SHA-256 receipt hash: give the same sources and the same claims to anyone, anywhere, and this exact algorithm produces the exact same hash — that is what "provable" means here, nothing more mystical than that.

Limits. CiteLock only checks whether the quoted words are in the source you supplied. It cannot tell you whether that source is genuine or unaltered, or whether it says something different elsewhere. It does not understand meaning, so a word-for-word quote can still mislead out of context. Capital letters count: a quote that differs only by a capital is a NEAR MATCH, not VERIFIED. Before comparing, only spacing, curly quotes and dashes, and Unicode's different ways of encoding the same letter are evened out. A passage 90% or more similar but not exact is a NEAR MATCH. Similarity is 1 minus the characters you would have to change, divided by the length of the longer text: changing "move" to "shift" in a 69-character sentence scores 92.75%. A quote must match whole words: "he said yes" is not VERIFIED by a source that says "she said yes" (version 1 did verify it); it is measured against the words it sits in and comes out a NEAR MATCH. In Chinese, Japanese, Thai and other scripts written without spaces, any matching run counts. A quote under three words is too short for the near-match search, so it is either found exactly (VERIFIED) or NOT FOUND. Nothing you type is sent anywhere or saved anywhere — this page runs entirely in your browser, offline, and reloading it clears everything.

1 · Source documents (0)

2 · Claimed quotes (0)

Independent hash check

Not part of the workflow above — a standalone SHA-256 box so you can confirm, with your own eyes, that this page uses nothing but the browser's built-in crypto.subtle.digest. Paste the canonical JSON from the receipt above (or literally any text) here, or into any other SHA-256 tool, and compare.

—

How it works

sourceclaimed quotenormalisequotes, dashes, spacesexact match, orclosest passage scoredVERIFIEDNEAR_MATCHNOT_FOUNDreceipt
  1. Source and quote are normalised the same way: curly quotes, dashes and whitespace are made uniform, so typography cannot hide a match or fake one.
  2. An exact match of whole words is VERIFIED: it must not start or end inside a word, so "he said yes" is not verified by "she said yes".
  3. Otherwise it finds the closest passage in the source that shares a run of at least three words, and scores how alike they are: 0.90 or more is NEAR_MATCH, less is NOT_FOUND.
  4. The inputs and results are hashed with SHA-256 into a receipt anyone can recompute.

Words on this page

Similarity
1 minus the number of characters you would have to change, divided by the length of the longer text. Changing "move" to "shift" in a 69-character sentence takes 5 changes: 1 − 5/69 = 92.75%, so NEAR MATCH, not VERIFIED.
Session ledger
Every check you run in this session, each entry chained to the one before by its hash, so editing any entry afterwards breaks the chain and shows.
Kernel
The small piece of code that decides every verdict; the rest of the page only shows what it decided. Here it is the block inside this page, copied byte for byte into kernel.mjs (the file the tests run) and into the script, so all three are the same code.
SHA-256 receipt
A 64-character fingerprint of the input and the verdict. Anyone with the same input gets the same fingerprint; change one character and it changes completely.
Deterministic
No AI model, no random numbers and no clock go into a verdict, so the same input gives the same verdict on any machine, every time.
No AI judge
No language model decides anything. The verdict comes from fixed rules you can read in kernel.mjs.
Mutation gate
A test of the tests. witness makes small deliberate changes to the kernel, one at a time: for example it turns if (count > 0) into if (count >= 0), then runs the tests. Every change must make a test fail. A change no test notices has survived: it would mean no test checks what happens at that exact point. A change reviewed as equivalent cannot alter any result (both versions give the same answer for every input), and the reason is written down and checked.
CI
Continuous integration: GitHub re-runs every test and the gate on its own computers on every change, and the runs are public.
In the browser
The page does the work on your computer. Nothing you paste is sent to a server.
MIT licence
An open-source licence: you may use, copy, change and build products with it, free, as long as the copyright notice stays.
Sourced figures
Every number in the cost case comes from a published source (the UK median wage and UK inflation, from the ONS), linked under the table.

Blueprint

Roll it out

  1. Pick one place where this check is done by hand today, or skipped, and the person who owns it.
  2. Try it here on real examples from that place. Nothing leaves the page.
  3. Put it in the flow. Run node scripts/kar-citelock.mjs input.json in CI or a script (Node.js 20 or later, no dependencies). Exit code 0 means every quote is VERIFIED, 1 means at least one is not, 2 means the input could not be read. An AI agent can run the same script as a skill.
  4. Give your agents the claim check. Add the MCP server (one line), and tell each agent to call verify_claim before it states anything it says a source supports. Decide what REFUSED means in that flow: rewrite the sentence, quote the source instead, or flag it for a person.
  5. Keep the receipts with the work they checked, so anyone can recompute a verdict later. For a claim, keep the trace: it says where each word and number came from.
  6. Measure the difference with the cost case below.

For a business

Kar-Citelock turns a check that is usually done by eye, or not at all, into a verdict anyone can recompute: the same input gives the same answer and the same SHA-256 receipt on any machine, with no AI judging it.

The cost case, on your numbers

What the checking costs today against running the tool. Staff time is at the UK median hourly wage with on-costs left out, so this is a floor; later years rise with UK inflation (CPI). Change any box to your own numbers and the table recalculates as you type.

How it is worked out. Today: checks a year (per week × 52) × minutes per check × the median hourly wage, plus anything you pay for a tool now. With the tool: the share it replaces takes the seconds you enter instead of the minutes, and the rest is still checked by hand. Each later year rises by one more year of inflation.

yearchecking by handwith Kar-Citelocksaved

Against what you do now

Security, data protection and deployment

Support and ownership

Supplied by AI Native Solutions; start through that site. Support, any service level, warranty and liability are agreed per deployment, in each deployment's agreement. The software is MIT and keeps running without us.

Where it stops, answered straight

The case for the board

A check that anyone can recompute replaces a check that has to be trusted, at no licence cost, without sending your data anywhere. Its logic is the code on this page, and its tests are themselves tested.

FAQ

Why NEAR_MATCH and not just found or not?
Because the dangerous case is a quote that is almost right: one word changed, a number altered. NEAR_MATCH says it is close and shows you it is not the same.
Can an agent run it?
Yes, two ways. Any MCP agent can start the claim check with npx -y github:sjgant80-hub/kar-citelock (details). And the quote check ships as a one-file Node.js script (scripts/kar-citelock.mjs), usable as an agent skill before it quotes anything.
What is the difference between VERIFIED here and true?
VERIFIED means the words, numbers and quotations of the claim are in the sources it cites. It does not mean the claim is a fair reading of them, or that the sources are right. See where the claim check stops.
What happens with bad, empty or very large input?
A quote naming a source that is not loaded gets SOURCE_MISSING. On the page an empty quote gets EMPTY; the script refuses one as bad input (exit 2), as it does a file without a sources list and a claims list. Quotes under three words cannot be fuzzy-matched (see Limits). There is no size cap; the near-match search takes longer on long quotes and long sources.
What do I need to run it?
For the page, a modern browser; there is nothing to install. For the script, Node.js 20 or later (free from nodejs.org; node --version shows which one you have): download scripts/kar-citelock.mjs (one file, no dependencies, no npm install) and run it with no arguments to see how to call it.
Does it need the internet or an account?
No. The page works once loaded, and the script runs offline. Nothing is uploaded.

How the claim check works, traced from a real call

claim+ its sources 1 citations[id] is asource given 2 quotationsword for word,whole words 3 numberseach one in acited source 4 wordseach contentword found VERIFIEDall passed REFUSEDa reason each every check goes into the trace: what it looked for, the source it found it in, and where (character offsets)
  1. Citations. Each [id] outside the quotations must name a source that was given. The cited sources, in the order the claim cites them, are the only ones searched. With no marker, all are.
  2. Quotations. Each passage between double quote marks must appear word for word in a cited source, capitals included, starting and ending on whole words. Spacing, curly quote marks and dashes are evened out first. If it is not there, the closest passage that is a near match is shown.
  3. Numbers. Each number outside the quotations must appear in a cited source. Thousands commas are taken out (1,200 and 1200 match); otherwise a number is compared as written.
  4. Content words. Each word outside the quotations must appear in a cited source, ignoring capitals and simple plurals. Small English words such as "the" and "said" are skipped, and the trace lists them.

The call below is real. These are the messages an agent sent to the MCP server and the answers it gave, recorded by running the server (node stdio.mjs) on trace/mcp-call.in.jsonl; the answers are trace/mcp-call.out.jsonl. GitHub re-runs the server on the same messages on every change and fails if any answer differs. This page also runs the same claims through its own copy of the check and says whether it gets the same answers.

Reading the recorded call…

Where the claim check stops, in plain words

Payment on proof: what is connected, and what is not

A separate public project, kar-paid-on-proof, has a smart contract, FulfilmentGate, that holds a buyer agent's payment and releases it to a worker agent only on proof. People ask whether this claim check is that proof. It is not, and this is exactly what each one checks, read from the code (the contract at commit 0db0987).

What the contract checks before it pays

  1. The worker's deliverable is an answer made only of passages copied from the sources, each cited as a document number and a start and end byte offset.
  2. The named verifier has answered PASS (100 out of 100) for this exact deliverable in a validation registry on the chain (release, _verdict). That verifier's own rule, in the project's sdk/verify.mjs, also asks, by default, that the copied words cover at least half of the question's terms; the chain cannot re-run that part and relies on the signature.
  3. The chain then re-checks it itself (_checkGrounded): the 1 to 16 source documents hash to the sources the buyer committed to; the answer and its citations hash to what the worker submitted; there are 1 to 8 citations, each inside its document; and the answer is exactly the cited byte ranges joined by single spaces, byte for byte, with nothing evened out. Otherwise the payment does not move.

How that differs from this claim check

FulfilmentGate (on the chain)This claim check (verify)
What may be checkedAn answer that is nothing but copied passagesAny sentence: quotations, plus the words and numbers around them
Word for word meansThe exact bytes, nothing evened outAfter spacing, curly quote marks and dashes are evened out; whole words
OffsetsUTF-8 byte offsets, given by the worker and checkedCharacter offsets, found by the check and reported
Words outside quotationsNot allowed: everything must be copiedEach content word and number must be in a cited source
SourcesCommitted in advance by their hashesPassed in with the claim; not fixed in advance
Who must agreeA named verifier signs PASS, and the chain re-checks the copyingNobody signs; anyone can re-run it and get the same answer
What it movesMoney, from escrow to the worker or back to the buyerNothing: it answers VERIFIED or REFUSED

Binding the two is not done. Nothing in the contract runs this check, and nothing in this project produces what the contract takes. A claim this page calls VERIFIED does not release any payment, and a payment the contract releases was not decided by this check. Joining them would need code that does not exist today, for example a verifier that runs this check and signs its verdict where the contract reads it. This page makes no claim about where the contract is deployed; its own project says that.