Wiki Maintain
Comprehensive wiki maintenance: lint, deduplicate, upgrade, and analyze.
Resolve .wiki/ from plugin install scope. If not found, say "No wiki found."
Arguments
/wiki-maintain — run full maintenance (all steps below)
/wiki-maintain lint — only fix broken links, missing frontmatter, orphans
/wiki-maintain dedup — only find and merge near-duplicate pages
/wiki-maintain gaps — only analyze knowledge gaps and missing coverage
Full Maintenance Steps
1. Lint
Launch wiki-auditor agent to:
- Find
[[wiki-links]] that point to non-existent pages — list for user
- Fix missing frontmatter fields (add defaults)
- Find orphan pages (no incoming links) — suggest connections
- Remove dead index entries
- Fix stale
updated: dates on pages that were modified but not date-bumped
2. Deduplicate
Find pages with >60% slug token overlap (Jaccard similarity on slug words split by -):
- Report pairs for review
- For confirmed duplicates: auto-merge into one page, update all backlinks, add redirect note to absorbed page
3. Confidence Upgrade
Pages with 3+ independent sources in frontmatter get upgraded:
low → medium (if 2+ sources)
medium → high (if 3+ corroborating sources)
- Run
fact-checker agent on high-confidence pages to verify claims against external sources
- Write the reason in log.md
4. Stale Detection (Freshness Tiers)
Pages are evaluated against an intelligent freshness system — not a flat threshold. Each page has a TTL based on its content type:
| Tier |
TTL |
Examples |
live |
15 min |
stock prices, live scores, server status, deployment state |
breaking |
1-6 hours |
breaking news, incident updates, release announcements |
current |
1-3 days |
news articles, current events, trending topics |
fast |
1-4 weeks |
AI/LLM/MCP, API changes, model benchmarks |
moderate |
1-3 months |
software versions, frameworks, libraries, tools |
standard |
6 months |
general knowledge, how-to guides (default) |
academic |
1 year |
research papers, studies, formal publications |
evergreen |
5 years |
history, biographies, foundational concepts, laws, theorems |
permanent |
never |
personal notes, ideas, memories, journal entries |
Resolution order:
- Explicit
freshness_tier: in page frontmatter (user override)
- Explicit
ttl: in frontmatter (custom duration like ttl: 30m or ttl: 2d)
- Auto-classification from tags, type, and content keywords
For stale pages:
- Add
stale: true to frontmatter
- Suggest running
/wiki-write --refresh-stale or /wiki-read to refresh
5. Concept Auto-Generation
Detect patterns spanning 3+ pages:
- Find groups of pages that share 3+ common
[[wiki-links]] targets
- For each cluster: suggest a synthesis article that connects the concepts
- If user approves: generate the synthesis page via
wiki-writer agent
6. Regenerate Index
Rebuild .wiki/index.md from all pages:
- Group by
type: field (concept, entity, source, idea, status, etc.)
- Alphabetical within each group
- Include confidence badge and one-line description
7. Report
Print summary: broken links fixed, duplicates found, confidence upgrades, stale flags, concepts suggested, index updated.
Source: Oshayr/LLM-Wiki — distributed by TomeVault.
1---2name: oshayr-llm-wiki-llm-wiki3description: Wiki Maintain4---56# Wiki Maintain78Comprehensive wiki maintenance: lint, deduplicate, upgrade, and analyze.910Resolve `.wiki/` from plugin install scope. If not found, say "No wiki found."1112## Arguments1314- **`/wiki-maintain`** — run full maintenance (all steps below)15- **`/wiki-maintain lint`** — only fix broken links, missing frontmatter, orphans16- **`/wiki-maintain dedup`** — only find and merge near-duplicate pages17- **`/wiki-maintain gaps`** — only analyze knowledge gaps and missing coverage1819## Full Maintenance Steps2021### 1. Lint2223Launch `wiki-auditor` agent to:24- Find `[[wiki-links]]` that point to non-existent pages — list for user25- Fix missing frontmatter fields (add defaults)26- Find orphan pages (no incoming links) — suggest connections27- Remove dead index entries28- Fix stale `updated:` dates on pages that were modified but not date-bumped2930### 2. Deduplicate3132Find pages with >60% slug token overlap (Jaccard similarity on slug words split by `-`):33- Report pairs for review34- For confirmed duplicates: auto-merge into one page, update all backlinks, add redirect note to absorbed page3536### 3. Confidence Upgrade3738Pages with 3+ independent sources in frontmatter get upgraded:39- `low` → `medium` (if 2+ sources)40- `medium` → `high` (if 3+ corroborating sources)41- Run `fact-checker` agent on high-confidence pages to verify claims against external sources42- Write the reason in log.md4344### 4. Stale Detection (Freshness Tiers)4546Pages are evaluated against an intelligent freshness system — not a flat threshold. Each page has a TTL based on its content type:4748| Tier | TTL | Examples |49|------|-----|----------|50| `live` | 15 min | stock prices, live scores, server status, deployment state |51| `breaking` | 1-6 hours | breaking news, incident updates, release announcements |52| `current` | 1-3 days | news articles, current events, trending topics |53| `fast` | 1-4 weeks | AI/LLM/MCP, API changes, model benchmarks |54| `moderate` | 1-3 months | software versions, frameworks, libraries, tools |55| `standard` | 6 months | general knowledge, how-to guides (default) |56| `academic` | 1 year | research papers, studies, formal publications |57| `evergreen` | 5 years | history, biographies, foundational concepts, laws, theorems |58| `permanent` | never | personal notes, ideas, memories, journal entries |5960Resolution order:611. Explicit `freshness_tier:` in page frontmatter (user override)622. Explicit `ttl:` in frontmatter (custom duration like `ttl: 30m` or `ttl: 2d`)633. Auto-classification from tags, type, and content keywords6465For stale pages:66- Add `stale: true` to frontmatter67- Suggest running `/wiki-write --refresh-stale` or `/wiki-read` to refresh6869### 5. Concept Auto-Generation7071Detect patterns spanning 3+ pages:72- Find groups of pages that share 3+ common `[[wiki-links]]` targets73- For each cluster: suggest a synthesis article that connects the concepts74- If user approves: generate the synthesis page via `wiki-writer` agent7576### 6. Regenerate Index7778Rebuild `.wiki/index.md` from all pages:79- Group by `type:` field (concept, entity, source, idea, status, etc.)80- Alphabetical within each group81- Include confidence badge and one-line description8283### 7. Report8485Print summary: broken links fixed, duplicates found, confidence upgrades, stale flags, concepts suggested, index updated.8687---88> Source: [Oshayr/LLM-Wiki](https://github.com/Oshayr/LLM-Wiki) — distributed by [TomeVault](https://tomevault.io).89<!-- tomevault:4.0:skill_md:2026-06-21 -->