From citadel
Builds markdown-first knowledge base: ingests raw sources, compiles interlinked topic files, self-maintains index for LLM queries up to 400K words without vector DBs.
npx claudepluginhub sethgammon/citadel --plugin citadelThis skill uses the workspace's default tool permissions.
**Use when:** building and querying a markdown-first knowledge base -- ingests raw notes, deduplicates, surfaces answers.
Manages LLM-compiled knowledge bases in .wiki/ or ~/wiki/: ingests sources to raw/, compiles interconnected markdown articles with indexes, queries, lints, and supports topic sub-wikis.
Builds LLM-maintained markdown wikis from external knowledge sources like articles, papers, and web clips. Handles ingest, query, lint, and promote for persistent, compounding RAG alternative.
Builds and maintains an LLM-curated personal knowledge base from sources like papers, articles, transcripts, and notes. Supports ingestion, querying accumulated notes, linting, auditing, and scaling.
Share bugs, ideas, or general feedback.
Use when: building and querying a markdown-first knowledge base -- ingests raw notes, deduplicates, surfaces answers. Don't use when: capturing session learnings into the evolve pipeline (use /learn); generating structured code documentation (use /doc-gen).
wiki/
index.md # Master index
raw/ # Unprocessed sources (timestamped files)
topics/ # Compiled topic files (one per topic, interlinked)
.wiki-meta.json # Stats: topic count, source count, last compaction
| Command | Behavior |
|---|---|
/wiki | Status overview: topic count, last update, pending raw sources |
/wiki --add [source] | Ingest a new source into the wiki |
/wiki --query [question] | Answer a question using wiki knowledge |
/wiki --status | Detailed wiki health: topic count, staleness, orphan detection |
/wiki --compact | Merge, deduplicate, and reorganize topics |
/wiki --rebuild-index | Regenerate index.md from current topic files |
/wiki init [path] | Initialize a new wiki at the specified path |
/wiki init [path]Create wiki/, wiki/raw/, wiki/topics/, an empty wiki/index.md, and wiki/.wiki-meta.json with fields: created, lastUpdated, topicCount: 0, sourceCount: 0, totalWords: 0, lastCompaction: null. Default path: wiki/ at project root.
/wiki --add [source]Ingest a new source into the wiki.
Step 1: Determine source type — URL (fetch with WebFetch), file path (read), raw text (use directly), no argument (ask user).
Step 2: Write raw content to wiki/raw/source-{timestamp}.md with header: title/URL, ingested date, type, original reference.
Step 3: Identify 1-5 topics. For each: check if a topic file already exists — append to existing or create wiki/topics/{slug}.md.
Step 4: Each topic file has: title, > Last updated, > Sources, compiled content, and ## Related Topics with [[slug]] cross-links. Scan existing topics for cross-links when writing.
Step 5: Regenerate wiki/index.md with stats header, Topics table ([[slug]] | summary | last updated), and Recent Sources table.
Step 6: Update wiki/.wiki-meta.json with new counts.
Step 7: Output: source description, topics created, topics updated, index counts.
/wiki --query [question]wiki/index.md, identify 1-5 relevant topic files, explain reasoning briefly[[cross-links]] up to 2 hops if relevant/wiki --add for missing areas/wiki --statusRead meta, count topic files and raw sources, check for orphaned topics, broken cross-links, and stale topics (30+ days). Output: topic/source/word counts, last updated/compaction dates, and health issues with counts and lists.
/wiki --compactwiki/index.md and all topic fileswiki/index.md and update wiki/.wiki-meta.json with lastCompaction and new counts/wiki --rebuild-indexRead all topic files, extract title/summary/date, write a fresh wiki/index.md. Output: "Index rebuilt with {count} topics."
.planning/ does not exist: Run /do setup first to initialize the harness state directory./wiki init. Do not auto-create on query or status./wiki --add."[[missing-topic]] (stub -- needs content) if no context./wiki --compact.Disclosure: "Updating wiki at .planning/wiki/. Files will be created or modified."
Reversibility: amber — creates and modifies .planning/wiki/ files; undo by deleting or reverting changed files.
Trust gates:
Output a summary appropriate to the command executed, then:
---HANDOFF---
- Wiki: {command executed} at {wiki path}
- Topics: {count} total, {new/updated/merged count} changed
- Status: {healthy | needs compaction | has orphans/broken links}
---