Quality checks for wiki content extraction — cross-check wikilink consistency, identify broken references, handle delete-and-redo workflows when output is unsatisfactory. Use alongside youtube-content for wiki ingest.
The most common quality issue: a concept page uses [[concepts/some-name]] but the actual file on disk is concepts/different-name.md. This happens because subagents choose filenames independently and don't cross-check.
When the user reports a page with broken links, find the source page and enumerate its wikilinks:
search_files(path="WIKI_PATH", pattern="page-name", target="content")
Then for each [[concepts/...]] link found, verify the file exists:
search_files(path="WIKI_PATH/concepts", pattern="concept-slug", target="files")
The concepts subagent writes files under one set of names but writes wikilinks under different names in related pages. This is a self-consistency failure within a single subagent's output — not a cross-subagent coordination problem.
Either approach works:
1. Rename the file to match the wikilink (cleaner, preserves all inbound links)
2. Patch the wikilink to match the existing filename
Prefer renaming when the wikilink name is the better/canonical name. Prefer patching when the existing filename is more descriptive.
When the user is unsatisfied with the quality of an extraction and wants a full redo from scratch:
Search for all files that source from the transcript:
search_files(path="WIKI_PATH", pattern="transcript-slug", target="content")
This returns: raw transcript, entity page, highlights page, and all concept pages.
Verify whether any concepts being deleted are referenced by OTHER pages (not from this same transcript). If a concept is shared across extractions, preserve it and only update the pages from this extraction.
Remove all files from the extraction: transcript, entity, highlights, concepts.
Remove entries from index.md and log.md for all deleted pages.
Run the full pipeline fresh. The raw transcript must be re-fetched since it was deleted.
After the new extraction completes:
After any batch extraction, run this quick audit:
# For a page expected to have many concept wikilinks (like a synthesis page):
1. Extract all [[concepts/...]] links
2. Check each one exists on disk
3. Report any broken links
This catches the inconsistency before the user finds it.
log.md (all actions) and each subfolder (e.g., consume/) has its own log.md. The youtube-content template says to prepend to WIKI_PATH/log.md but the wiki root index and root log both live at the wiki root (/opt/data/wiki/), not under consume/. Always update both: WIKI_PATH/../log.md (root) and WIKI_PATH/log.md (folder-level).