llmwiki
Japanese / 日本語
A Claude Code plugin that automatically generates and maintains an entity-based knowledge wiki from text files stored in any directory.
Built on Andrej Karpathy's LLM Wiki pattern with added contradiction management inspired by karesansui-u/delta-zero.
Prerequisites
Installation
As a plugin (all skills are installed together):
/plugin marketplace add https://github.com/ktrysmt/claude-plugins.git
/plugin install llmwiki@ktrysmt
Structure
.claude-plugin/
plugin.json # Plugin manifest
skills/
make/ # /llmwiki:make -- Wiki generation & update
SKILL.md
scripts/
llmwiki_preprocess.py # Deterministic preprocessing + sha256 change detection
makeindex.py # Wiki catalog generation
llmwiki_decay.py # Decay candidate detection
llmwiki/
schema.md # Wiki page template + merge rules
query/ # /llmwiki:query -- Query the wiki in natural language
SKILL.md
lint/ # /llmwiki:lint -- Health check + Decay demotion
SKILL.md
metabolize/ # /llmwiki:metabolize -- Contradiction detection & resolution
SKILL.md
docs/ # /llmwiki:docs -- Generate documents from the wiki
SKILL.md
Running a skill generates .llmwiki/ in the project directory:
<project>/
.llmwiki/
config.json # Persisted settings (input_dir, etc.)
index.xml # Entity catalog (auto-generated)
entities.json # Entity dictionary (accumulated)
entities/<category>/*.md # Wiki pages (accumulated)
syntheses/*.md # Synthesized documents (generated by llmwiki:query)
log.md # Session history (append-only)
Skills
| Skill | Purpose | Writes |
|---|
| /llmwiki:make | Generate & update wiki from input files | Automatic (including dormant promotion) |
| /llmwiki:query | Query the wiki in natural language | Only on feedback (requires approval) |
| /llmwiki:lint | Health check + Decay/Promotion proposals | Only on demotion/promotion (requires approval) |
| /llmwiki:metabolize | Detect, classify & resolve contradictions (including false positives) | Requires approval |
| /llmwiki:docs | Generate documents by specifying a theme | None (external output only) |
Usage
/llmwiki:make -- Wiki Generation & Update
/llmwiki:make # scans the project root
/llmwiki:make ~/work/dump # scans an external directory
Processes in order: Phase 0 (preprocessing) -> Phase 1 (LLM ingestion) -> Phase 2 (validation).
Output is written to .llmwiki/ at the project root.
The input directory argument is optional. When omitted, it falls back to the path saved in .llmwiki/config.json, or defaults to the project root. The path used is always persisted to config.json for subsequent runs.
Records SHA-256 hashes of source files in frontmatter to detect content changes and source disappearance:
- New file: Full ingestion
- Content update (sha256 mismatch): Differential merge
- Source disappearance: Recorded in Source Files (page is not deleted)
- Dormant page: Automatically reactivated when new sources are ingested
Determines and records the source_type of each source based on file path and content (primary > secondary > derived).
Supported formats: .json, .md, .csv, .tsv, .yaml, .yml, .hcl, .sh
/llmwiki:query -- Query the Wiki
/llmwiki:query What are the CIDR ranges for the VPC?
Ask questions in natural language against the knowledge accumulated in the wiki.
Relationships, new entities, contradictions, and dormant promotions discovered during answering are fed back to the wiki upon user approval.
Valuable synthesized answers can be saved to .llmwiki/syntheses/ to accumulate knowledge.
/llmwiki:lint -- Health Check + Decay
/llmwiki:lint
Detects the following and proposes corrective actions:
- Orphan pages, broken links, stale pages, uncovered files
- Contradictions (count of "needs review" flags; guides to /llmwiki:metabolize)
- Decay candidates (pages with 0 references and not updated for 90+ days)
- Promotion candidates (dormant pages with references > 0)
/llmwiki:metabolize -- Contradiction Resolution
/llmwiki:metabolize
Classifies "needs review" flags (contradictions) in the wiki using llmwiki's own practical taxonomy -- temporal / scope / genuine / none (false positive) -- and seeks human judgment for resolution.
When resolving genuine contradictions, presents priority candidates based on source_type trust order (primary > secondary > derived).
/llmwiki:docs -- Document Generation
/llmwiki:docs Production environment architecture overview