Status: Era C5 implementation is active, with the source-of-truth contract finalized.
Decision
Meta Museum will use a MediaWiki instance extended with a custom Wikibase as the publication surface for the Meta Wiki Art bridge.
This extends the existing C5 plan from "publish to MediaWiki" to a structured semantic publication model that supports statement-level references and authority reconciliation.
Source-Of-Truth Contract (Finalized)
Chosen model: publication-target-only.
- Canonical source of truth: Meta Museum internal Linked Art records in Postgres/storage (`/api/records` domain model).
- Wiki role: governed publication projection layer (MediaWiki narrative + Wikibase statements/references).
- Edit ownership: publication content may evolve on wiki, but canonical data corrections must flow through Meta Museum ingest/reconciliation pipelines first.
- Publish gate: `/api/wiki-drafts/[id]/publish` preflight now requires the draft `sourceRecordId` to resolve to an existing internal record.
- Runtime policy key: `METAMUSEUM_WIKI_SOURCE_OF_TRUTH_MODE` (default and current enforced mode is `publication-target-only`).
Community-editable mode now requires explicit opt-in and reverse-ETL enablement:
- `METAMUSEUM_WIKI_SOURCE_OF_TRUTH_MODE=community-editable`
- `METAMUSEUM_WIKI_REVERSE_ETL_ENABLED=1`
Reverse-ETL endpoint:
- `POST /api/wiki-sync/reverse-etl`
Deterministic merge policy (implemented):
- Resolve internal target record via explicit `internalEntityId` or bidirectional sync map (`wikiItemId` -> internal ID).
- Normalize + sort incoming claims deterministically (`property`, `modifiedAt`, `changeId`, `value`).
- Apply per-property precedence:
- Idempotency:
- Mapped claim updates:
- Unmapped claim properties remain no-op for record fields but are tracked in merge state for deterministic conflict handling.
- newer `modifiedAt` wins;
- tie-break by lexicographic `changeId`;
- older/equal precedence claims are skipped.
- replayed `changeId` is skipped safely.
- `P_label` -> record `_label`
- `P_primary_name` -> first `identified_by` Name
- `P_description` -> `referred_to_by` statement (`Wikibase Description`)
- `P_publish_rights_status` -> `referred_to_by` statement (`Wikibase Publish Rights Status`)
Why this fits
- Linked Art alignment:
Linked Art JSON-LD, RDF modeling, and planned SPARQL workflows map directly to Wikibase's item/property statement model.
- AI grounding:
C4 Graph-RAG and NL→SPARQL require verifiable, structured entities; Wikibase supplies a strong query/citation substrate.
- Provenance requirements:
Meta Museum's "cite or refuse" rule is reinforced by Wikibase statement references and qualifiers.
- Authority reconciliation:
B6/C2 authority-cache work (AAT/ULAN/TGN/Wikidata/GeoNames/LoC) maps naturally to external IDs and exact-match links in Wikibase.
Sequencing constraints
This bridge is intentionally deferred until Era C5. It must not ship before Era B hardening is complete.
Required gates before write-path activation:
- SHACL validation stable (B2).
- Postgres as storage of record (B3 cutover complete).
- Auth + role-gated write paths and auditability (B4).
- Authority cache and reconciliation baselines established (B6/C2).
Planned C5 flow
- Curator/agent creates `WikiDraft`.
- Draft enters human review queue with rights + citation checks.
- Approved draft publishes to MediaWiki/Wikibase:
- Publish action writes an audit trail and stores return identifiers for round-trip sync.
- narrative article content (MediaWiki),
- structured claims + references (Wikibase),
- source attribution + rights templates.
Boundaries (Out Of Scope For Era A/B)
- Live MediaWiki/Wikibase provisioning in current app runtime.
- Public write automation from agents without explicit human approval.
- Direct external-authority query on request path.
Migration operations playbook
For cost-first rollout (Wikibase Cloud now) with a controlled path to self-hosted Wikibase later, use:
- wikibase-cloud-migration-checklist.md(wikibase-cloud-migration-checklist.md)