SuperAPI AI Directory

wiki-reingest

General & other

View repository

Updated 10-16 09:57

About this skill

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.
  • 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

  1. Resolve vault: skillwiki path and skillwiki lang.
  2. Run skillwiki drift [vault]. Read the JSON output.
  3. 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.
  4. For each drifted source, ask the user: archive old + ingest new, or skip?
  5. If the user approves re-ingest for a source: a. Run skillwiki archive <raw-path> to archive the old raw file. b. Follow the wiki-ingest skill to ingest the updated content as a new raw file. c. Update any concept/entity pages that cite the old source to reference the new one.
  6. Append a log.md entry summarizing: scanned, drifted, re-ingested, skipped.

N9 Compliance

Raw files are immutable (N9). Re-ingest never modifies an existing raw file. Instead:

  • Archive the old raw file (moves to _archive/raw/).
  • Create a new raw file with updated content and new sha256.
  • This preserves full provenance history.

Stop conditions

  • skillwiki drift returns 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).
  • Re-ingesting without user approval for each drifted source.
  • Re-ingesting a source listed under identity_conflicts without explicit user approval and a corrected target filename/source URL.
  • Skipping the drift check and assuming sources have changed.