$npx -y skills add getpaperclipai/paperclip --skill wiki-lintUse when an operation issue is a lint or health-check (operationType: "lint") — typically the nightly lint routine or a manual "Run lint" from the UI. Audit the wiki for contradictions, orphans, weak provenance, broken links, and missing concept pages, and return a triage list
| 1 | # Wiki Lint |
| 2 | |
| 3 | Audit, do not edit. Return findings the maintainer (human or agent) can triage. |
| 4 | |
| 5 | ## Inputs |
| 6 | |
| 7 | - An operation issue with `operationType: "lint"`. |
| 8 | - The operation issue's target `wikiId`, `spaceSlug`, and space root. Lint only that space unless the issue explicitly says this is a multi-space sweep. |
| 9 | |
| 10 | ## Workflow |
| 11 | |
| 12 | 1. **Walk the target space's `wiki/index.md` and wiki tree** with `wiki_search` and `wiki_read_page`, always passing the operation issue's `wikiId` and `spaceSlug`. Build a mental map of: pages that exist, pages referenced from `index.md`, pages referenced from other pages, and raw sources. |
| 13 | 2. **Check for the seven recurring issues**, in this order: |
| 14 | 1. **Contradictions** — two pages making incompatible claims about the same entity, decision, or status. Flag both pages, name the conflicting claims, and quote evidence. |
| 15 | 2. **Stale claims** — a page asserts X, but a newer source under `raw/` has superseded it. Flag the older page; never overwrite. |
| 16 | 3. **Orphan pages** — a `wiki/` page is not linked from `index.md` and not referenced from any other wiki page. Either it should be linked, removed, or merged. |
| 17 | 4. **Concept gaps** — a term appears on three or more pages but has no dedicated `wiki/concepts/<slug>.md`. Recommend creating one. |
| 18 | 5. **Broken `[[wiki-links]]`** — a link target file does not exist. |
| 19 | 6. **Weak provenance** — a non-trivial claim is uncited or cites only the wiki itself in a circle. The original source ref should be findable. |
| 20 | 7. **Index / log drift** — pages exist that are not in `index.md`, or `index.md` lists pages that no longer exist. Recent operations in `wiki/log.md` that did not produce a corresponding page change. |
| 21 | 3. **Return a triage list**, grouped by severity: |
| 22 | - **critical**: contradictions, broken links to active pages, fabricated citations. |
| 23 | - **medium**: stale claims, weak provenance, large concept gaps. |
| 24 | - **low**: orphans, log drift, small index gaps. |
| 25 | Each item has: file path, evidence (a 1–2 line quote), suggested fix, and the operation that should follow up (`ingest`, `paperclip-distill`, `index-refresh`, manual review). |
| 26 | 4. **Do not write to `wiki/`.** Lint is read-only by design — the maintainer or the routine that follows decides which findings to act on. |
| 27 | 5. **Append a log entry** describing the run: |
| 28 | ``` |
| 29 | ## [YYYY-MM-DD] lint | <N findings, M critical> |
| 30 | - operation issue: <issue identifier> |
| 31 | - critical: <count> |
| 32 | - medium: <count> |
| 33 | - low: <count> |
| 34 | ``` |
| 35 | |
| 36 | ## Voice |
| 37 | |
| 38 | - Lead with the count by severity. |
| 39 | - Each finding is one bullet. Resist commentary. |
| 40 | - When in doubt about severity, say so and surface it as medium with a "verify" note. |
| 41 | |
| 42 | ## Verification |
| 43 | |
| 44 | Before closing the operation issue: |
| 45 | |
| 46 | - [ ] Findings are grouped by severity with file paths, evidence, and suggested fix per item. |
| 47 | - [ ] No files under `raw/` were modified. No files under `wiki/` were modified except `wiki/log.md`. |
| 48 | - [ ] If the run found nothing, the issue is closed with "no findings" and the log entry still exists so future audits can see this run happened. |
| 49 | |
| 50 | ## Tools |
| 51 | |
| 52 | `wiki_search`, `wiki_read_page`, `wiki_list_sources`, `wiki_read_source`, `wiki_write_page` (only `wiki/log.md`). Always include the operation issue's `wikiId` and `spaceSlug`. |