Auto-grow a pro-workflow wiki by running a budget-capped BFS research loop over pluggable source fetchers (web, arXiv, GitHub). Each iteration pops a seed from the queue, fetches sources, drafts a wiki page, dedupes claims against existing pages, enqueues follow-up seeds. Halts
Installs just this skill. Get the whole plugin for auto-invocation.
โก How it fires
How this skill gets triggered: by you, by Claude, or both.
Fires itselfClaude auto-loads it when your prompt matches the work.
You can call itInvoke it directly when you want it.
Slash command/wiki-research-loop
๐๏ธ Context preview
The summary Claude sees to decide when to auto-load this skill.
Auto-grow a pro-workflow wiki by running a budget-capped BFS research loop over pluggable source fetchers (web, arXiv, GitHub). Each iteration pops a seed from the queue, fetches sources, drafts a wiki page, dedupes claims against existing pages, enqueues follow-up seeds. Halts
---name: wiki-research-loop
description: Auto-grow a pro-workflow wiki by running a budget-capped BFS research loop over pluggable source fetchers (web, arXiv, GitHub). Each iteration pops a seed from the queue, fetches sources, drafts a wiki page, dedupes claims against existing pages, enqueues follow-up seeds. Halts on budget cap, depth cap, or convergence. Use when the user says "research <topic>", "grow the <slug> wiki", "auto-research", or wants a knowledge base that builds itself overnight.
user-invocable: true
---# Wiki Research Loop
Driver that turns a wiki into an auto-grown knowledge base. Layers on top of `wiki-builder` and `wiki-query`.
## Loop semantics
```
seed-queue (pending) โ next-seed
โ fetch sources via plugins (web | arxiv | github)
โ extract claims
โ dedupe vs index (FTS5; later vector via 3.3.2)
โ compile new page or amend existing
โ upsert page (auto-FTS-index)
โ enqueue follow-up seeds (max-depth gate)
โ mark seed done
โ if budget OR convergence OR kill-switch โ halt
```
## Halt conditions (any one trips)
- `budget_usd` exceeded (loop tracks per-fetcher cost estimate)
- `max_pages_per_run` written
- `max_depth` reached on every active branch
- 3 consecutive pages add < 5 % new claims (convergence)
Loop pops by `(depth ASC, created_at ASC)` so it explores breadth-first.
## Convergence detection
After each compiled page, compute Jaccard overlap of claim-text tokens vs the prior 3 pages. If `< 5 %` novel content for 3 consecutive pages, halt and report `converged`.
## Kill switch
```
touch ~/.pro-workflow/STOP
```
Loop checks per-iteration and halts gracefully. Remove file to resume next run.
## Privacy guard
If `wiki.config.md` has `private: true`, the loop refuses any non-local fetcher and emits a warning. Only `raw/` ingestion via manual seeds is allowed.
## Reactive trigger (Phase 3.3.4)
`scripts/file-watcher.js` watches `wiki/<slug>/wiki/**/*.md`. On user-edited claim, enqueues a verification seed (`verify: <claim>`) at depth 0. Wired through pro-workflow's `file-watcher.js` hook.
## Cron tick (Phase 3.3.4)
`scripts/research-tick.js` is launchable from any cron-style runner. Picks the oldest opted-in wiki with pending seeds and runs a single iteration. Hook event: `pro-workflow:research-tick`.
## Output
Each run writes:
```
<wiki-root>/logs/research-<UTC-timestamp>.md # human-readable run log
Every compiled page goes through `wiki-cli.js page` so FTS5 stays consistent. The dedupe step calls `searchWiki` with the candidate claim text to find near-duplicates.