wiki-reingest
When This Skill Activates
- User wants to check if any vault sources have changed since ingestion.
- Periodic drift check during lint or maintenance cycles; scheduled/headless runs report only.
- User explicitly asks to re-ingest a specific source.
Output language
Run skillwiki lang at the start. Generate log entries in the resolved language.
Pre-orientation reads
Standard four reads (SCHEMA, index, log, project context if applicable).
Steps
- Resolve vault:
skillwiki pathandskillwiki lang. - Run
skillwiki drift [vault]. Read the JSON output. - Present findings grouped by status:
- drifted: Source content has changed. Show stored vs current sha256.
- identity_conflicts: The fetched source no longer matches the raw filename/source identity. STOP and surface the conflict. Do not archive or reingest until a human chooses the correct source/filename pair.
- fetch_failed: Could not re-fetch. Show error details.
- unchanged: No action needed.
- Report-only is the default.
skillwiki drift --applymust not rewrite raw hashes or content; it reports the need for a new capture. - For each drifted source, ask the user whether to create a new capture and preserve-archive the old address, or skip.
- If the user explicitly approves one source:
a. Follow
wiki-ingestto create the updated content as a new raw capture. Verify it before changing the old address. b. Previewskillwiki archive <exact-old-raw-path>. c. Apply only with the live--apply --approve <token>flow. The old complete bytes move toraw/archived/<category>/...; they are never rewritten. d. Update maintained concept/entity pages to cite the new capture where the editorial meaning requires it. Relocation history continues to resolve the old archived evidence. - Append a log event/entry summarizing: scanned, drifted, newly captured, archived, skipped.
N9 Compliance
Raw files are immutable (N9). Re-ingest never modifies an existing raw file. Instead:
- Preserve the old raw file under
raw/archived/<category>/through the attended structural transaction. - Create a new raw file with updated content and new sha256.
- This preserves full provenance history.
Stop conditions
skillwiki driftreturns non-zero exit code other than DRIFT_DETECTED.- User declines all re-ingest actions.
- No raw sources have
source_url(nothing to check).
Forbidden
- Modifying files in
raw/directly (N9). - Writing new archives to legacy
_archive/raw/. - Running raw structural apply from scheduled or headless maintenance.
- Re-ingesting without user approval for each drifted source.
- Re-ingesting a source listed under
identity_conflictswithout explicit user approval and a corrected target filename/source URL. - Skipping the drift check and assuming sources have changed.