SP42 is a Rust-first workbench for Wikimedia maintenance work. It began as a recent-changes patrolling tool and has grown into a platform with domains: shared, domain-agnostic layers (scoring, fetching, inference, live ingestion, coordination, wiki registry, UI) with focused capabilities built on top — patrolling, LLM-assisted citation verification, article-quality assessment, and Wikidata as a first-class review target. Every shell (browser, CLI, desktop, localhost server, MCP agent surface) drives the same core contracts.
SP42 is currently alpha software. The repository is public and buildable, but it is not yet a production-ready moderation tool.
- A platform of shared, domain-agnostic layers: transport contracts, a guarded read-only fetch edge, the scoring engine and policy framework, live EventStreams ingestion, multi-operator coordination, wiki registry/capability profiles, the provider-agnostic LLM interface (ADR-0006), read-only Parsoid page access, shared reporting, and a shared design-system UI layer
- The patrolling domain (shipped): patrol queueing, scoring, diffing, context building, reviewer actions, and multi-operator coordination
- The references / citation verification domain (shipped): LLM-assisted
verification of whether a cited source actually supports the claim it backs —
article-level
verify-pagereports, bare-URL reference repair, and book-citation grounding through Open Library / Internet Archive - The assessment domain (first crate landed): grounded evidence for per-article quality assessments, starting with the Good-article review appendix
- The Wikidata capability (in progress): entity read/diff and
content-model-routed patrol wired through the platform's
wikibasemodule - Shells that reuse the same core contracts: a browser/PWA shell, a CLI, a desktop shell, a localhost server (coordination, debug surfaces, and the local dev-auth bridge), and an MCP surface that exposes citation verification to agents
- Patrolling and citation verification are substantially implemented for local development
- Single-user local Wikimedia token testing is supported through a localhost bridge
- Live Wikimedia integration is still gated by external credentials and verification
- Multi-user production auth is not implemented yet
The phase-by-phase implementation timeline lives in docs/STATUS.md — the README deliberately does not duplicate it.
SP42 is a platform that owns shared abstraction layers, with domains that
consume them and shells on top (platform ◄─ domains ◄─ shells, ADR-0013).
The dependency direction is mechanically enforced by
scripts/check-layering.sh and drawn in
docs/platform/architecture.md.
Platform layers (shared, domain-agnostic):
crates/sp42-types: transport contracts and storage/HTTP/clock abstractionscrates/sp42-platform: reusable mechanisms and contracts — the scoring engine and policy framework, action contracts/executor, wikitext editing, OAuth/dev-auth, and the Wikidata entity read model (wikibase)crates/sp42-fetch: guarded read-only HTTP fetch edge (SSRF-guarded DNS resolver, redirect/size caps, Retry-After retry loop, Wikimedia UA)crates/sp42-inference: provider-agnostic LLM edge — model client, endpoint config, and the multi-model panel (ADR-0006)crates/sp42-live: EventStreams ingestion, recentchanges/backlog polling, and live queue filteringcrates/sp42-coordination: multi-operator collaboration protocol and room statecrates/sp42-wiki: wiki config parsing, registry/default selection, and capability profilescrates/sp42-parsoid: read-only Parsoid page access — fetch a revision and decompose it into prose-bearing blockscrates/sp42-reporting: shared reporting framework and rendererscrates/sp42-ui: shared Leptos presentation layer — Codex-backed tokens, theming, and typed UI primitives
Domains (capabilities built on the platform):
crates/sp42-patrol: patrolling policy, workflow, and report definitionscrates/sp42-citation: citation verification and bare-URL repaircrates/sp42-assessment: Good-article evidence-appendix rendering over verification reports- Wikidata has no crate yet; its entity read model lives in
sp42-platform(see docs/domains/wikidata/)
Shells (drive the platform and domains):
crates/sp42-app: browser and PWA shellcrates/sp42-cli: CLI shellcrates/sp42-desktop: desktop shellcrates/sp42-server: localhost HTTP/WebSocket server, auth bridge, and routingcrates/sp42-devtools: deterministic fixtures and demo-surface builderscrates/sp42-mcp: agent-facing MCP surface for citation verification
Transitional and tooling:
crates/sp42-core: retiring re-export facade (its code has been extracted intosp42-platformand the domain crates)xtask: workspace build tasks
Supporting trees:
configs/: per-wiki and scoring configurationschemas/: config schemasfixtures/: test fixturesevals/: scoring evaluation fixture sets and profilesdocs/: platform, domain, and project documentation (see docs/README.md)
- Rust
1.96or newer - The
wasm32-unknown-unknowntarget for browser builds
Optional:
trunkfor serving the browser app during developmentsccachefor faster repeated local Rust builds- A local Wikimedia testing token in
.env.wikimedia.localfor the single-user auth bridge
./scripts/build-local.shBuilds are incremental by default. Pass --clean to any build entrypoint when
you want to purge generated artifacts, including target/, before building.
For a deployable web release build:
./scripts/build-web-release.shFor CI-shaped builds with deterministic caching:
./scripts/ci-all.shFor focused local checks during iteration:
./scripts/check-focused.shcargo run -p sp42-serverUseful local endpoints:
http://127.0.0.1:8788/healthzhttp://127.0.0.1:8788/debug/summaryhttp://127.0.0.1:8788/dev/auth/bootstrap/status
cargo run -p sp42-cli -- --help # list subcommands
cargo run -p sp42-cli -- preview # ranked queue from STDIN (built-in sample if empty)Capabilities are subcommands (verify, verify-page, locate-probe,
bare-url, preview). For the full command-line reference — including
environment variables — see docs/platform/CLI.md.
rustup target add wasm32-unknown-unknown
./scripts/build-frontend.shTo generate Cargo timings reports:
./scripts/build-timings.shFor live local development with the server and Trunk proxy running together:
./scripts/dev-local.sh
./scripts/dev-local.sh --smokeThe dev command runs sp42-server on 127.0.0.1:8788 and Trunk on
127.0.0.1:4173.
For runtime settings, local credentials, and API base URL behavior, see
docs/platform/RUNTIME_CONFIGURATION.md.
For desktop app packaging, see
docs/platform/DESKTOP_DISTRIBUTION.md.
For a Wikimedia Cloud VPS artifact, run ./scripts/package-vps.sh; the
generated package includes its own deployment README.
./scripts/build-local.sh
./scripts/build-local.sh --clean
./scripts/build-server.sh
./scripts/build-frontend.sh
./scripts/build-web-release.sh
./scripts/package-vps.sh
./scripts/build-desktop.sh --platform macos --debug
./scripts/dev-local.sh --smoke
./scripts/check-focused.sh
./scripts/ci-all.shContributor validation expectations live in CONTRIBUTING.md.
Maintainer/full-CI commands live behind ./scripts/ci-all.sh and the Cargo
aliases in .cargo/config.toml.
Optional shared compiler cache:
- Install
sccachefor faster repeated local builds - Set
SP42_USE_SCCACHE=1to requiresccache - Leave
SP42_USE_SCCACHEunset to auto-enablesccachewhen available without making it mandatory
Documentation is organized to mirror the platform/domain architecture. Start with the docs map, then drill into a layer or domain:
- docs/README.md: documentation map — platform, domains, and project docs
- docs/platform/README.md: platform layers — runtime, desktop, developer surface, design contract, scoring, and the platform ADRs
- docs/domains/README.md: domains — patrolling and references/citation (shipped), assessment and Wikidata (incoming)
Project and process docs:
- docs/STATUS.md: phase-by-phase project status
- CONTRIBUTING.md: contributor workflow and local checks
- GOVERNANCE.md: maintainer model, protected areas, and release authority
- CONSTITUTION.md: binding engineering laws
- CODE_OF_CONDUCT.md: participation expectations
- docs/process/prd-protocol.md: PRD protocol for user-facing changes
SP42 is licensed under the GNU General Public License version 3 only
(GPL-3.0-only). See LICENSE.