adapter
Route to, register, inspect, validate, and run explicitly trusted local private adapters…
Compile raw sources into wiki articles. Synthesizes, cross-references, and organizes active knowledge.
> /plugin marketplace add nvk/llm-wiki > /plugin install wiki@llm-wiki
How it fires
How this command gets triggered: by you, by Claude, or both.
/compileContext preview
What this command does when you run it.
Compile raw sources into wiki articles. Synthesizes, cross-references, and organizes active knowledge.
description: "Compile raw sources into wiki articles. Synthesizes, cross-references, and organizes active knowledge." argument-hint: "[--full] [--source <path>] [--topic <name>] [--include-archived] [--wiki <name>] [--local]" allowed-tools: Read, Write, Edit, Glob, Grep, Bash(ls:*), Bash(wc:*), Bash(date:*), Bash(mv:*), Bash(mkdir:*)
**Resolve the wiki.** Do NOT search the filesystem or read reference files — follow these steps: 1. Read `$HOME/.config/llm-wiki/config.json`. If it has `hub_path`, expand leading `~` only (not tildes in `com~apple~CloudDocs`) and prefer that path; use `resolved_path` only as a fallback cache when the expanded `hub_path` is unavailable and `resolved_path` is initialized. If config has only `resolved_path`, use it. If the configured path can be statted but reading `wikis.json` or listing `topics/` fails with `Operation not permitted`, stop and ask the user to grant Full Disk Access/iCloud Drive access to the launcher; do not fall back to `~/wiki` or `resolved_path`. Do not write machine-specific `resolved_path` into shared configs. 2. If no config → read `$HOME/wiki/_index.md`. If it exists → HUB = `$HOME/wiki`. If nothing found, ask the user where to create the wiki. 3. **Wiki location** (first match): `--local` → `.wiki/` in CWD; `--wiki <name>` → `HUB/wikis.json` lookup with portable path resolution (`<HUB>`, `~`, absolute, or HUB-relative); if the registry path is stale, fall back to `HUB/topics/<name>`; CWD has `.wiki/` → use it; else → HUB. 4. Read `<wiki>/_index.md` to verify. If missing → stop with "No wiki found. Run `/wiki init` first."
Read the compilation protocol at `skills/wiki-manager/references/compilation.md` and the indexing protocol at `skills/wiki-manager/references/indexing.md`. Then compile raw sources into wiki articles.
Inventory awareness: compile consumes `raw/` and writes `wiki/`; it does not compile inventory records into articles. Read `inventory/_index.md` only to notice active candidates, blocked source queues, or next actions that explain why sources were ingested. If compilation completes work represented by an inventory record, report the recommended record update instead of silently changing operational state.
Archive awareness: compile targets active topic wikis only by default. If the resolved `--wiki <name>` path is archived (`wikis.json` status `archived` or path under `topics/.archive/`), stop and ask the user to restore the topic or rerun with `--include-archived`. When `--include-archived` is present, compile only inside that archived topic path and keep it archived; do not use archived raw sources to update active articles.
makes the wiki active.
0. **Placement pre-check** (C13 + C11 from `references/linting.md`): Before surveying, walk `raw/` and for each `.md` file read its frontmatter. Rewrite any legacy keys/values using the C13 alias table. Then compare the file's `type` field to its actual directory — if it's misplaced (e.g., `type: papers` but sitting in `raw/notes/`, or loose at the wiki root), `mv` it to the canonical path, creating the destination directory if needed. This is the same rule lint uses, run inline because you're already reading every frontmatter. It heals both user miscategorization and stale layouts from older wiki versions — there is no separate migration pass. On slug collisions at the destination, skip and warn. Do this before step 1 so the survey sees canonical state. Does not touch `output/projects/` — that's compile step 7's territory.
0.5. **Topic-guide preflight**: Follow `references/compilation.md` § Topic-guide preflight. In short, read `schema.md` when present and use its cardinality, article-boundary, scope, and keep-separate guidance while planning. Advisory guidance is a planning preference: explain a deliberate deviation in the compile report. For `schema_state: strict`, stop before writing a planned deviation and request confirmation. Topic guidance never changes global categories/frontmatter, never rewrites existing articles merely to conform, and never exempts a raw source from C6 coverage.
1. **Survey**: Read `raw/_index.md` to see all sources. Read `wiki/_index.md` to see existing articles. For incremental mode, identify sources ingested after the "Last compiled" date in master `_index.md`.
2. If no uncompiled sources found (incremental mode), report: "All sources are already compiled. Use `--full` to recompile everything."
3. **Read sources**: Read each uncompiled source in full. Extract key concepts, facts, relationships.
4. **Plan**: For each concept found:
5. **Write/Update articles**: Follow the protocol in `references/compilation.md` and core principle #9 (chunked writes):
5.5. **Self-validation pass**: For every article touched in step 5 (new or updated), re-read the frontmatter and verify:
If any check fails, halt with: `Article <path>: missing required frontmatter (<field>). See references/compilation.md § Step 5 (writ
LLM-compiled knowledge bases for any AI agent. Parallel multi-agent research, thesis-driven investigation, source ingestion, wiki compilation, querying, and artifact generation.
Route to, register, inspect, validate, and run explicitly trusted local private adapters…
Archive or restore whole topic wikis so old interests stay preserved but out of default…
Assess a local repo against the active wiki's research body and the broader market. Gap…
Truth-seeking umbrella audit for llm-wiki. Combines active wiki maintenance, output drift…
Export, refresh, verify, or import a comprehensive cross-topic Project Knowledge Checkpoint…