Skip to main content

Wikipedia Gap Finder v2

A campaign-driven pipeline that finds people from an underrepresented group who should have an English Wikipedia article but don't, checks every fact against real sources, and hands a human a research dossier they write the article from.

The tool never writes article prose. English Wikipedia prohibits LLM-generated/-rewritten article content (guideline enacted by RfC, March 2026, with narrow copyedit and translation exceptions). This tool does detective work, verification, and structure only — a human writes every sentence, and the dossier is a map, not a source: the writer opens and reads every cited source themselves. That isn't a limitation to route around; it's the product's integrity claim: AI found her and gathered the evidence; a human checked every source and wrote her story.

Four steps: start with names (orgs, books, event lists); find who's missing (no Wikipedia article yet); check every fact (real sources, exact quotes); a human writes every single sentence. The first three are the AI's detective work, the last is the human's.

Pipeline

  1. Intake — names from CSV/txt lists and/or an optional Wikidata SPARQL redlist query.
  2. Gap check — per name: enwiki title + fuzzy search, redirect detection, Draft: namespace, deletion-log history, and Wikidata sitelinks. Verdicts: GAP / EXISTS / REDIRECT_ONLY / DRAFT_EXISTS / DELETED_BEFORE / TRANSLATE_CANDIDATE (⭐ candidates that already exist in another language are the highest-value, since translation is an allowed path).
  3. Notability triage (planned) — coverage search scored against WP:GNG.
  4. Source vetting → dossier — see below.

Source vetter

The vetter is two processes across a two-file JSON boundary, so each side is testable in isolation:

gap_finder --dossier gathers coverage and writes vetting_worklist.json; the Claude vet-sources subagent classifies and chases, writing vetting_verdicts.json (VERIFIED / LEAD / DEAD_END); gap_finder --dossier then renders dossier.md, which a human writes from. The JSON files are the whole contract.
  • Python (keyless): gathers coverage, tiers each source against Wikipedia's perennial-sources list (WP:RSP), and renders the dossier.

  • The Claude subagent (skills/vet-sources): classifies reliability and traces breadcrumbs, sorting every claim into one of three buckets:

    Bucket Meaning Dossier section
    VERIFIED a single reliable source names the subject and supports the claim, with a verbatim quote Verified facts table
    LEAD a breadcrumb is real, but no reliable source names the subject yet Research leads — chase before writing
    DEAD_END no corroboration found UNVERIFIED — do not use

The never-stitch rule (WP:SYNTH): the vetter may not promote a LEAD to VERIFIED by combining a subject-naming unreliable source with a fact-confirming reliable source. Two half-sources stay a LEAD. And the renderer structurally refuses to print any fact backed only by an unreliable source — even if a verdicts file claims otherwise.

A fan wiki that names her plus a news story that proves the fact but not her is still not a fact — it stays a research lead. Only one reliable source that names her and states the fact becomes a verified fact, quoted in the dossier.

Install

pip install wiki-gap-finder            # installs the `gap-finder` command
pip install "wiki-gap-finder[ui]"      # + Rich-rendered tables
pip install "wiki-gap-finder[chase]"   # + the Firecrawl coverage backend

Or clone this repo and run python3 gap_finder.py ... directly — same CLI (pip3 install requests PyYAML jsonschema --break-system-packages).

Usage

Commands read and write paths relative to the current directory, so run them from your project root (campaign paths like input/candidates.csv resolve from there, and results land in output/<campaign>/).

gap-finder --campaign campaigns/<campaign>.yaml --check       # stages 1–2
gap-finder --campaign campaigns/<campaign>.yaml --check --no-sparql --limit 5
gap-finder --campaign campaigns/<campaign>.yaml --report      # table from saved state
gap-finder --campaign campaigns/<campaign>.yaml --dossier "Name Here"
gap-finder --campaign ... --dossier "Name" --search-backend firecrawl

A campaign is one small YAML — swapping demographics is a new file, zero code changes. One rule for lists naming living people (the spirit of WP:BLPCAT): only include identity attributes the person has publicly self-identified with, and only when they're relevant to their public life. Minimal example:

name: my-campaign
description: Who this campaign is about
intake:
  name_lists:
    - "input/candidates.csv"   # CSV with a `name` column, or one name per line
  # optional: a Wikidata SPARQL WHERE-clause body for redlist intake
search_hints:                  # appended to coverage searches
  - "activist"

Other flags: -v logs every request.

Heads-up on the keyless search default: DuckDuckGo increasingly serves a bot challenge to non-browser clients. If coverage search comes back empty, the tool now says so loudly — use --search-backend firecrawl (with the firecrawl CLI installed) for dependable coverage gathering.

Conventions

Zero API keys on the default path (MediaWiki + Wikidata + DuckDuckGo are keyless; Firecrawl is opt-in). Polite User-Agent, ≥1s between requests with exponential backoff, and maxlag=5 on MediaWiki API calls so the tool yields when servers lag.

python3 -m pytest      # 54 tests

Layout

  • gap_finder.py — back-compat shim; the CLI lives in gapfinder/cli.py
  • gapfinder/ — the package (cli, contract, rsp, search, worklist, verdicts, dossier)
  • gapfinder/data/rsp_seed.json — curated WP:RSP reliability seed (ships in the wheel)
  • skills/vet-sources/SKILL.md — the Claude subagent contract
  • campaigns/ — one YAML per campaign
  • docs/superpowers/ — design spec and implementation plan

MIT licensed.

Metadata

Release files for wiki-gap-finder 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wiki-gap-finder 2.0.2
File Size Uploaded
wiki_gap_finder-2.0.2.tar.gz 34.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wiki-gap-finder 2.0.2
File Interpreter ABI Platform
wiki_gap_finder-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 61.0 kB

Release files / wiki_gap_finder-2.0.2.tar.gz

Download URL wiki_gap_finder-2.0.2.tar.gz
Size 34.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1d7f1d67acf87bc33e2210dc61262c89f0856629305d19319b9e480073d1da00
BLAKE2b-256 checksum
How to use checksums
1ce69a4930cf258d97ba6da311207eace48d5be403756206acd3c9e27977c315
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / wiki_gap_finder-2.0.2-py3-none-any.whl

Download URL wiki_gap_finder-2.0.2-py3-none-any.whl
Size 26.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
869fa7fd1255edb0d6835a8fb8ff960cea30791915c1ae3ef0ff15b18cabbb9a
BLAKE2b-256 checksum
How to use checksums
87f51a62e4690e8ba9dba5aa78183770798a21888142d32ce2303bc192ed483d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page