wiki-ingest
Identify synthesis pages affected by asset changes and report or draft updates
Wiki Ingest
Detect which synthesis pages are affected when an asset is added or changed, then report staleness or draft updated content.
Input
Accept one of the following:
- Asset path (e.g.,
shared/prompts/k8s-log-analyzer.md) - Asset ID (e.g.,
k8s-log-analyzer)
Optional argument: --draft-pr to switch from report mode to draft-PR mode.
Report Mode (default)
When no --draft-pr argument is provided, produce a read-only impact report.
Steps
-
Resolve the asset. Read
metadata.jsonat the repository root. Locate the entry whoseidorfile_pathmatches the input. Extract the asset'sid,tags,last_revieweddate, and domains (derived from all tags in thetagsarray; an asset with multiple tags appears in multiple domains). -
Find affected synthesis pages. Read every Markdown file under
docs/synthesis/. For each file, parse its YAML frontmatter and look for asourcesarray. Collect every synthesis page whosesourceslist contains the resolved asset ID. -
Check staleness. For each affected synthesis page, compare its
last_synthesizedfrontmatter date against the asset'slast_revieweddate. Iflast_synthesizedis older thanlast_reviewed, mark the page as stale and note the number of days behind. -
Check domain coverage gaps. Using
metadata.json, group all assets by domain (all tags; assets with multiple tags appear in multiple domains). For each domain that has 3 or more assets, check whether a corresponding entity page (entity-{domain}.md) exists indocs/synthesis/. If no entity page exists, flag the domain as a coverage gap. -
Produce the report. Output a structured summary with these sections:
- Resolved Asset: ID, path, last_reviewed date
- Affected Pages: list of synthesis page paths with staleness status (fresh/stale + days)
- Coverage Gaps: domains meeting the 3-asset threshold that lack entity pages
- Suggested Actions: concrete next steps (e.g., "Re-synthesize docs/synthesis/kubernetes-tools.md" or "Create entity page for domain 'terraform'")
Draft-PR Mode (opt-in)
When the --draft-pr argument is provided, create a branch and update affected pages.
Steps
-
Perform all report-mode steps above to identify affected pages and gaps.
-
Create a worktree branch. If the repository uses a worktree-based workflow (check CLAUDE.md), create a worktree:
git worktree add worktrees/wiki-ingest-{asset-id} -b wiki-ingest/{asset-id} main cd worktrees/wiki-ingest-{asset-id}Otherwise, create a branch:
git checkout -b wiki-ingest/{asset-id}. Replace{asset-id}with the resolved asset ID. -
Update affected synthesis pages. For each stale synthesis page:
- Re-read all source assets listed in the page's
sourcesfrontmatter. - Regenerate the page body by synthesizing the current content of those source assets. Preserve the existing page structure (headings, sections) but refresh facts, descriptions, and cross-references.
- Update the
last_synthesizeddate in frontmatter to today's date.
- Re-read all source assets listed in the page's
-
Create new entity pages for any coverage gaps identified in step 1. Use the synthesis page template from
docs/synthesis/README.mdif available. -
Commit and push.
git add docs/synthesis/ git commit -m "docs(synthesis): refresh pages for {asset-id}" git push -u origin wiki-ingest/{asset-id} -
Create a draft PR.
gh pr create --draft \ --title "docs(synthesis): refresh pages for {asset-id}" \ --body "Auto-generated by wiki-ingest skill. ## Updated Pages - (list each updated synthesis page path) ## New Pages - (list each newly created entity page, or 'None') ## Source Asset - {asset-id} (last_reviewed: {date})" -
Report what was updated. Output the PR URL and a summary of all changes made.
Key Files
| File | Purpose |
|---|---|
metadata.json | Asset registry with IDs, paths, tags, dates |
docs/synthesis/README.md | Synthesis page index and templates |
docs/synthesis/*.md | Individual synthesis pages with sources and last_synthesized frontmatter |

