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.
Check a claim (just below): a sentence and its sources in, VERIFIED or REFUSED out, with where each word, number and quotation was found. Any AI agent can run the same check itself: call it from your agent.
Check quotes (further down): is each quote word for word in its source? VERIFIED, NEAR_MATCH (close but altered) or NOT_FOUND, with a receipt hash anyone can recompute.
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:
every quotation in the claim (the words between double quote marks) is word for word in a cited source;
every content word outside the quotations is in a cited source;
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.
check
what
found
where in the source
What an agent receives (the same JSON the MCP server returns)
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):
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.
Needs Node.js 20 or later and git. It reads its questions on stdin and writes its answers on stdout: no network, nothing written to disk, nothing sent to us.
On every change, GitHub's computers run that exact npx line from an empty folder on Node 20, 22 and 24, spawn the server and check a true claim comes back VERIFIED and a false one REFUSED: the runs, in public.
npm 10 (Node 20 and 22) cannot run it pinned to a full commit hash (github:sjgant80-hub/kar-citelock#<hash>); npm 11 can. The plain line above works on all three.
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)
3 · Results
Source
Quote (as claimed)
Verdict
Similarity
Closest passage in source
4 · Verification receipt
This is the SHA-256 hash of a canonical JSON payload built from every
source's hash, every claim, and every verdict above — no timestamp, no randomness. Anyone who
runs the same sources and claims through this same page (open-view-source, it's one file) will
get this exact hash back.
copied
5 · Session ledger (hash-chained audit trail of every run this session)
#
Time
Summary
Receipt hash
Chain hash
Each entry's chain hash covers the previous
entry's chain hash, this run's receipt hash, and this run's verdict summary. Export the ledger,
hand-edit any field in the file, and re-import it — the mismatch is what "tamper-evident" means
here: nothing more than a hash that no longer recomputes.
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
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.
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".
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.
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
One source of truth. The checking logic is the KERNEL block inside this page. build.mjs copies it byte for byte into kernel.mjs (which the tests and the mutation gate run) and into scripts/kar-citelock.mjs (the one-file agent skill). CI fails if the three ever differ, so the page you use, the code that is proven and the script an agent runs are the same code.
Tests.kernel.test.mjs tests the kernel; skill.test.mjs runs the shipped script on its own, the way an agent platform runs it, against the expected outputs in examples/.
Mutation gate.witness makes one small change to the kernel at a time (a < becomes <=, an && becomes ||) and re-runs the tests. Every change must make a test fail: that proves the tests check each of those points, rather than just running the code (see Mutation gate in Words on this page). From receipts/witness.json: reading the receipt…
The claim check.verify({ claim, sources }) is in the same KERNEL block, so the box at the top of this page, kernel.mjs and the agent server run the same code, and the mutation gate above covers it: the numbers there are for the whole kernel, quote check and claim check together. It never throws: input it cannot use is REFUSED with the reason.
The agent server.mcp.mjs answers MCP messages (initialize, tools/list, tools/call for verify_claim and about) and stdio.mjs runs it one line at a time on stdin and stdout. mcp.test.mjs starts the server as its own process and speaks MCP to it. witness tests those tests too (18 of 18 changes to mcp.mjs and 2 of 2 to stdio.mjs caught, none excused), and CI runs the npx line from GitHub on Node 20, 22 and 24.
The page code. The claim box, the trace table and the recorded call on this page are drawn by claim-page.js, which decides nothing itself: every verdict comes from the kernel. page.test.mjs loads this page without a browser, presses its buttons and checks what it shows against the kernel; witness caught 18 of 18 changes to claim-page.js, none excused.
The recorded call.trace/mcp-call.in.jsonl is what an agent sent; trace/mcp-call.out.jsonl is what the server answered. CI re-runs the server on the first and fails if the answers differ from the second, so the trace on this page stays true.
A cell of the genome.seed.json says what this tool is, what it takes and what it refuses, and genome/cell.mjs answers for it: its judge is the kernel's verify() on a known-true and a known-false claim, its lane is a claim with its sources, and anything else goes to Kar. The genome birth check runs those hooks on every change and admits it as a cell only when all four of its traits hold; witness caught 2 of 2 changes to genome/cell.mjs.
The cost case below is calculated by a separate small piece of code, checkcase.mjs, tested and mutation-gated in the same way as the kernel, in its own CI job. It uses only published figures (the UK median wage and UK inflation), each linked under the table.
CI re-runs all of it on GitHub's computers on every change: every run, in public.
Roll it out
Pick one place where this check is done by hand today, or skipped, and the person who owns it.
Try it here on real examples from that place. Nothing leaves the page.
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.
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.
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.
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.
CEO. A misquote in a report, a summary or a chatbot answer is caught before it is published under your name.
CFO. Checking quotes by hand becomes a verdict per quote in seconds; the case below works it out on your volumes. MIT open-source licence, no licence fee.
COO. One step before anything quoted goes out: sources and quotes in, a verdict per quote out.
Heads of AI and automation. One tool call any MCP agent can make before it states a sourced claim: VERIFIED, or REFUSED with the reason and the place, on the agent's own machine, with no account.
CTO / CISO. No AI judge and no network: the same input gives the same verdicts and receipt on any machine. Its tests are themselves tested by a mutation gate (see Words on this page); the code is kernel.mjs, in public.
Legal and compliance. Attribution you can show: each verdict with a receipt anyone can recompute from the same source.
The teams. Writers and reviewers get the exact word that differs, not a vague doubt.
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.
year
checking by hand
with Kar-Citelock
saved
Against what you do now
Searching the source by hand. Slow, and a changed word in a long quote is easy to miss.
Trusting the summary or the model. AI summaries can alter or invent quotes, and nothing shows which.
Asking a model to check. Its answer is not reproducible and cannot be recomputed by anyone else.
Trusting the citation marks an AI adds. A [1] after a sentence says where it came from, not that the source says it. The claim check opens the source and looks.
Security, data protection and deployment
The page runs entirely in your browser; nothing you paste is sent anywhere. It can be served from your own intranet unchanged.
The script is one file with no dependencies and makes no network calls; it runs on Node.js 20 or later, on any machine or CI runner.
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. The receipt hash lets anyone re-check a result.
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 source itself. It confirms text is in the source you supplied, not that the source is authentic.
Meaning out of context. A verbatim quote can still mislead; that is a human judgement.
Claims, not meaning. The claim check confirms the words and numbers are in the cited sources; it cannot tell whether they are joined the way the claim joins them. The limits show where, with examples you can run.
Short quotes. The near-match threshold is fixed at 0.90, so one changed word in a quote of a few words can read NOT_FOUND rather than NEAR_MATCH.
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
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.
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.
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.
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
It does not understand meaning. It checks words, numbers and offsets. That is what makes it the same on every machine and checkable by anyone, and it is also its limit.
Words that are there, joined differently. It checks that each word and number is in a cited source, not that they are joined the way the claim joins them. "revenue rose 12%" passes against "Revenue rose 3% and costs rose 12%."
A word the claim leaves out. It cannot see what the claim drops. "The board did approve the merger." passes against "The board did not approve the merger." A "not" the claim adds is caught, unless the word is somewhere in the cited sources; a "not" it drops never is.
Small words. These English words are skipped, and every trace lists the ones it skipped: . Never skipped: not, no, never, without, may, will, must, over, under, more, less, he, she, we and the other words for people.
Word forms. Capitals and simple plurals are evened out ("Rates" matches "rate", "companies" matches "company"). Nothing else is: "rose" is not "rise", and "approve" is not "approved", so a reworded claim is REFUSED even when it is true.
Numbers. Compared as written: 12.0 is not 12, and "twelve" is a word, not a number. The unit is not checked: 12% and 12 million both contain 12.
Quotations. Only double quote marks ("…" or “…”) start a quotation; text in single quotes is checked word by word. Capitals count inside a quotation.
Other languages. The skipped words are English; other languages are checked word by word. Chinese, Japanese, Thai and other scripts written without spaces count a whole run of text as one word, so they pass only when a run is copied exactly.
Offsets. Each check gives two pairs of offsets: norm, into the source after spacing and quote marks are evened out, and raw, into the source exactly as given. Raw offsets are left out where the raw text does not slice back to the match, for example an accent typed as its own character, or "…" typed as one character.
Size. One claim up to 2,000 characters; up to 50 sources and 1,000,000 characters in all. Check a long text one sentence at a time.
The sources themselves. It confirms the words are in the sources you give it, not that the sources are true, complete or genuine.
Who calls it. It is a check any agent can call. It becomes a check shared between teams only once other teams' agents call it, and no outside caller is recorded yet.
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
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.
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.
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 checked
An answer that is nothing but copied passages
Any sentence: quotations, plus the words and numbers around them
Word for word means
The exact bytes, nothing evened out
After spacing, curly quote marks and dashes are evened out; whole words
Offsets
UTF-8 byte offsets, given by the worker and checked
Character offsets, found by the check and reported
Words outside quotations
Not allowed: everything must be copied
Each content word and number must be in a cited source
Sources
Committed in advance by their hashes
Passed in with the claim; not fixed in advance
Who must agree
A named verifier signs PASS, and the chain re-checks the copying
Nobody signs; anyone can re-run it and get the same answer
What it moves
Money, from escrow to the worker or back to the buyer
Nothing: 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.