This doc is an index that points you at the right place to read. Substantive content lives in the linked files.
| What you want to do | Where to start |
|---|---|
| Add a new LLM model or provider | benchmark/README.md § Adding New LLM Providers |
| Tweak the verification prompt | benchmark/README.md § Where the prompt lives — core/prompts.js is the single source of truth |
| Fix a bug you see in the Wikipedia sidebar UI | The UI is hand-maintained in main.js (outside the <core-injected> markers). CLAUDE.md § Key Methods in main.js is the function-by-function index |
| Improve how the tool extracts claim text from articles | README.md § core/ and the sync script — logic lives in core/claim.js, tests in tests/claim.test.js. The "between adjacent citations" design constraint is in README's Constraints section |
| Add test cases or extend the ground-truth dataset | benchmark/README.md § Workflow + § Dataset Versions |
| Run the benchmark to evaluate your change | benchmark/README.md § Workflow |
| Spot-check a single citation from the command line | README.md § Command-line interface — npx ccs verify <url> <n> |
| Test your changes on Wikipedia before they ship | README.md § Development — load via the User:Alaexis/AI_Source_Verification_test.js page |
npm test— runs thecore/unit testsnpm run build -- --check— confirms the livemain.js(the file Wikipedia loads) is in sync withcore/. Fails if you editedcore/but didn't rebuild.- If your change touches the prompt or claim extraction, run the benchmark and check that metrics didn't regress:
cd benchmark && npm run benchmark && npm run analyze(seebenchmark/README.md§ Workflow). This runs the full 189-row dataset across all configured providers and takes a few minutes; a faster smoke-set workflow is on the roadmap. Running it requires at least one API key — seebenchmark/README.md§ Run Benchmark for details on each. If you don't have a key for financial reasons, ping the maintainers — we'll happily set you up with access.
main.js— the userscript Wikipedia loads (single-class IIFE, no build step on the install path)core/*.js— pure-logic modules; spliced intomain.jsbyscripts/sync-main.jsbin/,cli/—npx ccs verifyCLIbenchmark/— eval suite, ground-truth dataset, frozen snapshotstests/—node:testsuite coveringcore/docs/— reference docs and design plans (seedocs/README.md)Benchmarking_data_Citations.csv— single source of truth for the dataset
If you're using an AI assistant to contribute: start with CLAUDE.md for architecture and conventions, then read the relevant benchmark/README.md section for the area you're changing. Run npm test and npm run build -- --check before declaring work complete.
Open an issue at https://github.com/alex-o-748/citation-checker-script/issues.