llm-wiki
LLM wiki kit
Created by Mehmet Goekce
Published in MehmetGoekce/llm-wiki. Publisher page
168 GitHub stars
What it is
Build Karpathy's LLM Wiki with Claude Code. L1/L2 cache architecture. Logseq + Obsidian support.
Summary from the brain’s metadata
Build Karpathy's LLM Wiki with Claude Code. L1/L2 cache architecture. Logseq + Obsidian support. Build Karpathy's LLM Wiki with Claude Code. Two-layer cache architecture (L1/L2). Supports Logseq and Obsidian.
How it works
Memory model: LLM wiki
AutoGineer overview, from the brain’s own files
Memory model: LLM wiki. Folders: .github (agent config, 5 files); docs (docs, 7 files); examples (examples, 2 files); templates (templates, 8 files).
| Folder | Role | Files |
|---|---|---|
| .github | agent-config | 5 |
| docs | docs | 7 |
| examples | examples | 2 |
| templates | templates | 8 |
| .claude-plugin | folder | 3 |
| openspec | folder | 23 |
Requirements
Works with: Claude Code
Set it up
Clone the repository at the commit AutoGineer scanned:
git clone https://github.com/MehmetGoekce/llm-wiki.git && cd llm-wiki && git checkout 5fa5ee7d49a4346eeb1d92c1de7bf649e7654e91Point Claude Code at .claude-plugin/icon.png: it does not read that file on its own.
cd llm-wiki && claude
AutoGineer scanned these files at commit 5fa5ee7.
- Not scanned by AutoGineerThe author’s README also describes installing it as a Claude Code plugin marketplace. Read its install section: AutoGineer did not scan that path. https://github.com/MehmetGoekce/llm-wiki/blob/5fa5ee7d49a4346eeb1d92c1de7bf649e7654e91/README.md#quick-start
- Not scanned by AutoGineerThe author’s README also describes installing it from a clone of its repository. Read its install section: AutoGineer did not scan that path. https://github.com/MehmetGoekce/llm-wiki/blob/5fa5ee7d49a4346eeb1d92c1de7bf649e7654e91/README.md#quick-start
Created by Mehmet Goekce. Published in MehmetGoekce/llm-wiki. Licence: MIT License.
Usage
From the brain’s own files
- ${user_config.wiki_path} (the "Wiki root:" line): your Logseq graph or Obsidian vault
- ${CLAUDE_PLUGIN_ROOT} (the setup workflow): the clone, so that setup finds templates/
Documentation by Mehmet Goekce
llm-wiki
Image: License: MIT Image: Release Image: Stars Image: Top Language Image: Last Commit
Build Karpathy's LLM Wiki with Claude Code. Two-layer cache architecture (L1/L2). Supports Logseq and Obsidian.
graph TB
subgraph "Every Session — Auto-loaded"
L1[L1: Claude Memory]
L1R[Rules & Gotchas]
L1I[Identity & Preferences]
L1C[Credentials]
L1 --> L1R
L1 --> L1I
L1 --> L1C
end
subgraph "On Demand — /llm-wiki query"
L2[L2: Wiki]
L2P[Projects & History]
L2W[Workflows & Processes]
L2K[Research & Learning]
L2 --> L2P
L2 --> L2W
L2 --> L2K
end
NEW[New Knowledge] --> ROUTE{Quick rule?}
ROUTE -->|Yes| L1
ROUTE -->|No| L2
USER[User Query] --> CLAUDE[Claude Code]
CLAUDE --> L1
CLAUDE -->|Deep question| L2What is this?
Image: Wiki graph view after setup Your wiki after a few ingests — interconnected knowledge pages in Logseq's graph view.
In April 2026, Andrej Karpathy published a gist called "LLM Wiki" that got 5,000+ stars in days. The idea: let an LLM maintain a structured, cross-referenced wiki for you. Feed it raw sources, it extracts facts, links them together, and keeps everything consistent. The wiki becomes a persistent, compounding artifact instead of a graveyard of stale notes.
Everyone loved the concept. Almost nobody built one. The gist describes what to build, not how to wire it up with real tools, real files, and real workflows. llm-wiki is the implementation. It uses Claude Code as the LLM brain and either Logseq or Obsidian as the wiki UI, with a two-layer cache architecture that turned out to be the key insight Karpathy's gist does not mention.
Why use this?
5-minute setup. Install the plugin, run
/llm-wiki setup, and you have a schema, namespaces, and git tracking. No manual design needed.Claude becomes your wiki maintainer.
/llm-wiki ingestupdates 5-15 pages with cross-references from a single source.L1/L2 architecture. Auto-loaded rules in memory (L1) + deep knowledge in the wiki (L2). No other tool has this.
Built-in quality checks.
/llm-wiki lintfinds orphan pages, stale content, broken refs, and credential leaks.Logseq + Obsidian. Use whichever you already have. No tool switch required.
Quick Start
As a Claude Code plugin (recommended)
claude plugin marketplace add MehmetGoekce/llm-wiki
claude plugin install llm-wiki@mehmetgoekceOn Claude Code 2.1.275 or later, one line inside a session does the same:
/plugin install llm-wiki --marketplace MehmetGoekce/llm-wikiClaude Code asks for one value, the Wiki root: your Logseq graph or Obsidian vault. The directory may be empty or not exist yet. Then, in any project:
/llm-wiki setup
/llm-wiki ingest "your first source"
/llm-wiki query "what do I know about X?"
/llm-wiki lint/llm-wiki setup asks which tool you use and which namespaces you want, then creates the Schema,
Dashboard, hub pages, Access-Log and llm-wiki.yml. The wiki starts sparse and gets denser with
every ingest. New releases reach you through the plugin; nothing to copy.
Tested with Claude Code 2.1.296.
Without the plugin
Clone the repository and copy the skill into the project that should use it:
git clone https://github.com/MehmetGoekce/llm-wiki.git ~/llm-wiki
mkdir -p ~/myproject/.claude/commands
cp ~/llm-wiki/SKILL.md ~/myproject/.claude/commands/wiki.mdIn the copy, replace two placeholders with absolute paths:
${user_config.wiki_path}(the "Wiki root:" line): your Logseq graph or Obsidian vault${CLAUDE_PLUGIN_ROOT}(the setup workflow): the clone, so that setup findstemplates/
On Linux (on macOS, write sed -i '' instead of sed -i):
sed -i -e 's|\${user_config.wiki_path}|/home/you/notes/wiki|g' \
-e 's|\${CLAUDE_PLUGIN_ROOT}|/home/you/llm-wiki|g' \
~/myproject/.claude/commands/wiki.mdThen run /wiki setup in that project. The copy is invoked as /wiki <command>, stays at the
version you copied, and needs the clone to stay where it is. The plugin is the recommended path.
The rest of this README writes /llm-wiki <command>. With a copied skill, type /wiki <command>.
Moving from a copied skill to the plugin
Install the plugin, enter your existing wiki directory as Wiki root, and delete the copied
.claude/commands/wiki.md from your project. The wiki itself needs no change.
Coming from v1.6.0
The plugin's commands lost their second part: /llm-wiki:wiki ingest is now /llm-wiki ingest, and
/llm-wiki:setup is now /llm-wiki setup. Update the plugin and use the new names.
The L1/L2 Architecture
This is the part not in Karpathy's gist, and it turned out to be the most important design decision.
When you start building a wiki, the instinct is to put everything in one place. That is wrong. Some knowledge must be available in every session, before you even ask a question -- things like "max 2-3 SSH calls to the VPS, never 10+" or "always use ISO 8601 dates." If the LLM has to query the wiki to learn these rules, it has already made the mistake.
Other knowledge only matters in specific contexts. The full history of a project. A detailed API workflow. Loading all of this into every session wastes the context window.
The solution maps to a concept every engineer knows: CPU cache hierarchy.
| Layer | What | Size | Loading | Contains |
|---|---|---|---|---|
| L1 | Claude Code Memory | ~10-20 files | Auto-loaded every session | Rules, gotchas, identity, credentials |
| L2 | Wiki (Logseq/Obsidian) | ~50-200 pages | On-demand via /llm-wiki query | Projects, workflows, research, deep knowledge |
graph TB
subgraph "Every Session — Auto-loaded"
L1[L1: Claude Memory]
L1R[Rules & Gotchas]
L1I[Identity & Preferences]
L1C[Credentials]
L1 --> L1R
L1 --> L1I
L1 --> L1C
end
subgraph "On Demand — /llm-wiki query"
L2[L2: Wiki]
L2P[Projects & History]
L2W[Workflows & Processes]
L2K[Research & Learning]
L2 --> L2P
L2 --> L2W
L2 --> L2K
end
NEW[New Knowledge] --> ROUTE{Quick rule<br/>or gotcha?}
ROUTE -->|Yes| L1
ROUTE -->|No| L2
USER[User Query] --> CLAUDE[Claude Code]
CLAUDE --> L1
CLAUDE -->|Deep question| L2The routing rule is simple: Would the LLM making a mistake without this knowledge be dangerous or embarrassing? Then it belongs in L1. Would the mistake be merely inconvenient? Then L2.
Credentials are a special case -- they must live in L1 because the wiki is typically git-tracked. The L1 memory directory is excluded from git, making it the only safe place for secrets.
For the full deep-dive, see docs/l1-l2-architecture.md.
Commands
| Command | Description |
|---|---|
/llm-wiki ingest <source> | Process a source (URL, file, text), update 5-15 wiki pages |
/llm-wiki query <question> | Two-stage search via hub index, synthesize answer with source attribution |
/llm-wiki prune [--months N] | LRU-Demote: evict cold pages from the live index (default 6 months) |
/llm-wiki prune --l1 | L1-Verification: classify L1 rules, check due behavior claims against local evidence, re-verify / demote / delete |
/llm-wiki lint [--fix] | Health check: orphans, stale pages, broken refs, index drift, credential leaks, due L1 claims |
/llm-wiki status | Metrics dashboard: page count, health, hot/cold profile, recent changes |
Ingest Flow
Ingest is the core operation. When you run /llm-wiki ingest "deployed v2.0 to production", here is what happens:
graph LR
SRC[Source<br/>URL / File / Text] --> A[Phase 1<br/>Analyze & Extract]
A --> B[Phase 2<br/>Scan Wiki<br/>Find affected pages]
B --> C[Phase 3<br/>Update Pages<br/>Create new / Append]
C --> D[Phase 4<br/>Quality Gate<br/>Properties? Cross-refs?<br/>No credentials?]
D --> E[Phase 5<br/>Report<br/>Pages touched / Warnings]
E --> GIT[git commit]Phase 1 -- Analyze & Extract. Claude reads the source and extracts entities, facts, relationships, and dates. It classifies each piece by domain (business, technical, content, etc.) and checks whether it belongs in L1 (quick rule) or L2 (deep knowledge).
Phase 2 -- Scan Wiki. Claude reads the schema, then scans existing pages to find which ones the new information affects. If you mention a tool that already has an entity page, it knows to update that page too.
Phase 3 -- Update Pages. New pages get all required properties from the schema. Existing pages get new facts appended; when a fact supersedes a stated state (a status, a deadline, a decision), the block is rewritten and the old wording moves into a collapsed History -- nothing is deleted, and the current state stays on top. Target: 5-15 page touches per ingest.
Phase 4 -- Quality Gate. Before committing: Do all pages have required properties? Does every page have at least one cross-reference? Are there credential patterns in the content?
Phase 5 -- Report. Summary of pages created, updated, cross-references added, and any warnings.
Query
Query is two-stage, the way a CPU resolves an address before touching memory. Stage 1 (routing): Claude reads only the hub ### Index pages of the candidate namespaces — a cheap list of routing lines ([[page]] -- description #tags) — and picks the 3 most relevant pages by description. This is the wiki's page table. Stage 2 (read): it opens only those full pages and synthesizes an answer with source attribution. A full-text grep over every page is the L3 fallback, used only when routing finds nothing. Each full-page read is logged to an append-only Access-Log together with the routing reason it was picked (the matched index description or grep term) — so the log records not just what loaded but why, and it feeds prune. If the query reveals a gap, it offers to create a new page.
Prune
Prune is the eviction layer that keeps routing precise as the wiki grows. It reads the Access-Log, finds cold pages (no read in N months, default 6), and evicts them from the live index — the routing line moves from the hub ### Index to ### Archive and the page is marked archived::. This is demotion, not deletion: the file stays in place, every incoming [[link]] stays valid, and the page is still found by the L3 grep fallback (and re-promoted automatically if queried again). Crucially, prune never renames or moves a file — the wiki tool links by page name, so a move would break every backlink. Run it on a schedule (the command does not self-schedule).
--l1 is the L1 counterpart. Access frequency cannot find stale L1 rules — every L1 file loads every session, so a stale rule never looks cold; it shows up as the agent confidently acting on an outdated assumption. So L1 files carry a claim class: asserts-current-behavior: true for claims about a system's current state (a path, flag, version, quirk) and false for decisions and preferences, which never go stale. Behavior claims carry a verified date. /llm-wiki prune --l1 classifies unclassified files (it proposes, you confirm), checks due claims against read-only local evidence, and lets you re-verify, demote the rule to L2 as history, or delete it. It does not warn mid-session when a stale rule is about to justify an action — Claude Code loads L1, so there is no hook for that; it is on the roadmap.
Lint
Lint is the automated health check. It scans every wiki page and checks 13 rules: orphan pages (no incoming links), stale content (last updated 90+ days ago but still marked high-confidence), missing required properties, broken references, hub completeness, index drift (an active page with no routing line, or a routing line with no page), archived-in-live-index (a demoted page still routed), empty pages, weak cross-referencing, credential patterns, L1/L2 duplicates, due L1 claims (behavior claims whose verified date is missing or older than l1_verify_days), and block bloat (a block grown past 600 characters of prose, or an updated:: value used as a change log). Run with --fix and Claude auto-repairs what it can — including backfilling missing routing lines into hub indexes.
The Schema
The schema is the contract between you and the LLM. Without it, the LLM creates inconsistent pages -- one uses status: active, another state:: running, a third has no status field at all. With a schema, every page follows the same structure and automated quality checks become possible.
The schema defines:
8 namespaces (Business, Tech, Content, Projects, People, Learning, Reference, Careers)
5 page types (Entity, Project, Knowledge, Feedback, Hub) with required properties
Lint rules for automated health checks
L1/L2 boundary so the system knows where new knowledge should be routed
For the complete schema reference, see docs/schema-reference.md.
Logseq vs. Obsidian
Both wiki apps are supported. Choose based on your preference:
| Logseq | Obsidian | |
|---|---|---|
| Properties | property:: value (inline) | YAML frontmatter |
| Format | Outliner (- prefix on every line) | Flat markdown |
| File names | Wiki___Tech___Strapi.md | Wiki/Tech/Strapi.md |
| Links | [[Wiki/Tech/Strapi]] | [[Wiki/Tech/Strapi]] |
| Backlinks | Automatic (graph-native) | Via plugin or core feature |
| Block addressing | Every line is a block | Paragraph-level |
| License | AGPL-3.0 (open source) | Proprietary (free for personal use) |
Logseq shines when the LLM is doing the writing -- its outliner format means every block is independently addressable, so appending new content never disrupts existing structure.
Obsidian is better if you do a lot of manual editing -- flat markdown is more natural to write by hand, and the plugin ecosystem is massive.
For a detailed comparison with migration paths, see docs/logseq-vs-obsidian.md.
Before & After
The difference between a dead wiki and a living one is page quality.
Before -- a placeholder created when the page was first made:
- type:: knowledge
- domain:: content
- ## Newsletter
- To be filled via /llm-wiki ingest.After -- synthesized from multiple sources over several ingest operations:
- type:: knowledge
- domain:: content
- confidence:: high
- created:: 2026-03-15
- updated:: 2026-04-07
- ## Company Newsletter
- Monthly newsletter targeting existing clients and prospects.
- ### Metrics
- | Metric | Value | As of |
|--------|-------|-------|
| Subscribers | ~240 | 2026-04-01 |
| Open rate | 38% | 2026-04-01 |
| Cadence | monthly | -- |
- ### Content Strategy
- 1 technical deep-dive + 1 business insight per issue
- Always include a CTA to the latest blog post
- Subject lines: question format performs 2x better
- ### Open Questions
- Segment list by industry vertical?
- A/B test send time (Tuesday AM vs Thursday AM)?
- ### Cross-References
- [[Wiki/Content/Blog]] -- Source content
- [[Wiki/Content/LinkedIn]] -- Promotion channel
- [[Wiki/Reference/Workflows]] -- Publishing workflowEvery number has a date. Decisions have rationale. Open questions are explicit. Cross-references connect to related pages.
Configuration
Setup creates llm-wiki.yml in your wiki root. You can also create it manually:
# llm-wiki.yml
tool: logseq # or "obsidian"
wiki_path: ~/Documents/MyWiki/
pages_dir: pages # relative to wiki_path
memory_path: ~/.claude/projects/my-project/memory/
l1_verify_days: 90 # optional: re-verify L1 behavior claims after N days
namespaces:
- Business
- Tech
- Content
- Projects
- People
- Learning
- Reference
- Careers
# Lint settings
lint:
stale_threshold_days: 90
min_cross_refs: 1
credential_patterns:
- "token::"
- "password::"
- "secret::"
- "api.key::"
# Ingest settings
ingest:
target_page_touches: [5, 15] # min, max pages per ingest
append_only: true # never delete content; superseded state moves to a collapsed History
# Language (for multilingual wikis)
language:
business: en # Language for business content
tech: en # Language for technical contentTrade-offs
No system is perfect. Some things to know:
The schema feels overengineered at first. With 10 pages, defining 5 page types and 8 lint rules seems like overkill. Past 50 pages, you will be grateful for the consistency. Define the schema early -- it is much harder to retrofit one later.
Two systems means you need a clear boundary. Having both L1 and L2 means you could accidentally put the same information in both places. The lint rule for L1/L2 duplicates exists precisely for this reason.
Parallel agents can conflict. If you have multiple Claude sessions writing to wiki files simultaneously, concurrent edits can cause conflicts. Treat wiki files as a shared resource.
Start with fewer hub pages. Let them emerge organically from ingest operations rather than creating empty hubs upfront.
Documentation
FAQ — Common questions before you install
Troubleshooting — Setup, integration, and runtime issues
L1/L2 Architecture — Why two layers, how to route knowledge
Schema Reference — Page types, properties, lint rules
Logseq vs. Obsidian — Detailed comparison and migration notes
Privacy
llm-wiki has no backend and collects nothing. It is a skill and a few shell scripts that run inside your own Claude Code session.
Wiki pages, the access log and
llm-wiki.ymlare written to your local Logseq graph or Obsidian vault and stay there. Whatever you ingest ends up in those files, including names or contact details if the source contains them.If you set
memory_path, the skill also reads your local Claude Code memory directory:querymay consult it,lintreports rules that are due for a check, andprune --l1classifies, updates, moves or deletes memory files, each one only after you confirm it.lintnever prints the content of a memory file. Withoutmemory_paththe skill does not touch that directory.The skill and the scripts send nothing to the author or to any third party. There is no telemetry.
The only network access is the page fetch that
ingestmakes when you pass a URL as the source.Commits are local. Nothing is pushed unless you push your wiki yourself.
Claude reads the content you work with in order to do the work. That processing is covered by your own Claude plan and Anthropic's terms, not by this plugin.
Credits
Inspired by Andrej Karpathy's LLM Wiki gist
Built with Claude Code
License
MIT -- see LICENSE for details.
openspec/specs/prune.md
Spec: /llm-wiki prune — LRU-Demote (Index Eviction)
Description
The prune command keeps two-stage routing precise as the wiki grows by evicting cold
pages from the live hub index. A page is "cold" when it has not been read (logged in
the Access-Log) within a configurable window (default 6 months). Eviction is NOT
deletion and NOT a file move: the page keeps its filename and location, its incoming
[[links]] stay valid, and it remains greppable as an L3 fallback. Only its routing
line moves from the hub ### Index to ### Archive, and the page is marked
archived::. This is the access-frequency eviction layer of the L1/L2/L3 cache model —
the counterpart to query (read path) and ingest (write path).
prune is meant to run on a schedule (default cadence: 6 months). The command itself does NOT self-schedule; the user wires it via their own scheduler.
/llm-wiki prune --l1 is a separate mode for L1 memory. Access frequency cannot find stale
L1 rules (every L1 file is loaded every session), so this mode works on claim class and
verification date (specs/l1-l2-routing.md REQ-370-379): it classifies unclassified
files, checks due behavior claims against read-only evidence, and lets the user
re-verify, demote to L2, or delete each one. --l1 does NOT run the L2 index eviction,
and plain /llm-wiki prune does NOT touch L1.
Requirements
Phase 1: Access Profile
REQ-600: The system SHALL read
llm-wiki.ymlfirst to determine tool mode, wiki path, and memory path.REQ-601: The system SHALL read the Access-Log page (
Wiki/Reference/Access-Log) and determine the last-access date per page from its newest log entry.REQ-602: For a page that has never been logged, the system SHALL use its
created::date as the last-access proxy.REQ-603: The cold threshold SHALL be "no access in N months", where N defaults to 6 and is overridable via
--months N.REQ-604: The system SHALL EXEMPT from demotion: hub pages (type hub), the Schema page, the Dashboard page, the Access-Log page, and any page with
status:: activethat is a project (in-flight work is never evicted, even if unread).
Phase 2: Demote Candidates
REQ-610: The system SHALL list demote candidates (page — last-access date — age in months) and present them to the user BEFORE any write. Demotion is opt-in.
REQ-611: For each confirmed candidate, the system SHALL add the property
archived:: <today>— the canonical demoted marker, valid on any page type (see specs/schema.md REQ-565). It MUST NOT modifycreated::orupdated::.REQ-612: For pages whose
statusenum includesarchived(Entity), the system SHOULD also setstatus:: archived. For types whose enum does NOT (Project, Knowledge), the system MUST NOT set an out-of-enumstatusvalue.REQ-613: The system SHALL move the page's routing line from the hub
### Indexto the hub### Archivesection VERBATIM (move, not delete).REQ-614: The system MUST NOT rename the page or move its file to another namespace. The tool links by page name; a move would break every incoming
[[link]].REQ-615: After demotion, all incoming
[[links]]to the page SHALL remain valid and the page SHALL remain readable via the L3 grep fallback in query.
Phase 3: Report + Commit
REQ-620: The system SHALL report the demoted list, the new live-index size per namespace, and the hot pages (top access count) for contrast.
REQ-621: The system SHALL create a git commit for the structural change (hub index edits + page property changes). This commit also carries any pending Access-Log appends (which are non-structural and not committed per-query).
REQ-622: The system SHALL note when the next prune is due (N months out). It MUST NOT create a scheduler entry itself.
L1 Mode (--l1)
Phase L1-1: Scope
REQ-900:
/llm-wiki prune --l1SHALL requirememory_path. If it is absent, the system SHALL display "memory_path not configured — L1 mode unavailable." and abort.REQ-901: The system SHALL skip the L1 index file (specs/l1-l2-routing.md REQ-377).
REQ-902: The batch size SHALL default to 10 and be overridable via
--batch N. The verification window SHALL default tol1_verify_daysand be overridable via--days N.REQ-903: Every write in L1 mode SHALL require confirmation. L1 is not git-tracked: there is no undo. Before any delete or demote, the system SHALL show a carry-over summary: what the L2 history block keeps, what is dropped (and why), and the path to the file so the user can read it in full. For files of a few lines, the full content MAY be shown instead.
Phase L1-2: Classify
REQ-905: For up to one batch of unclassified files, the system SHALL propose a value for
asserts-current-behavior(true/false) with a one-line reason per file, applying the definitions in specs/l1-l2-routing.md REQ-371-372.REQ-906: The user SHALL be able to confirm the whole batch or override individual proposals. Only confirmed values SHALL be written (specs/l1-l2-routing.md REQ-376 placement rules apply).
REQ-907: Classification MUST NOT set
verified. A newly classified behavior claim is due until evidence has been checked.REQ-908: A file whose content is mixed (a decision plus a behavior claim) SHOULD be classified
trueand the proposal SHOULD suggest splitting it into two files.
Phase L1-3: Gather Evidence
REQ-910: For each due rule (up to one batch, oldest
verifiedfirst, never-verified before dated), the system SHALL extract the concrete, checkable elements the rule names: file paths, commands, flags, versions, ports, config keys, URLs.REQ-911: Evidence gathering MUST be read-only: checking file existence, reading files, searching file contents, reading dependency manifests, and running commands only with read-only informational flags (
--version,--help). The system MUST NOT run commands with side effects, write to disk, deploy, or change remote state.REQ-912: The system SHALL report a verdict —
supports,contradicts, orinconclusive— per checkable claim in the rule, with the evidence behind it (what was checked, what was found). A rule usually makes several claims.REQ-912a: The rule's overall verdict SHALL be
contradictsif any claim contradicts,supportsif all checked claims support, andinconclusiveotherwise. A partial verdict (some claims unchecked) SHALL be marked as partial and name the unchecked claims.REQ-912b: Each piece of evidence SHALL state its basis:
executed(read-only command output),source(read the implementing code, not run), orfile(existence or content of a file). Behavior that can only be observed with side effects SHALL be checked viasourceor reportedinconclusive, never executed.REQ-913: A rule whose elements cannot be checked locally (external service behavior, pricing, third-party policy) SHALL be reported
inconclusivewith the reason "not locally verifiable". The system MUST NOT fetch remote content to decide.REQ-914: Evidence output MUST NOT include credential values. For a rule that holds a credential, the system SHALL report only whether the referenced location exists.
REQ-915: The system MUST NOT decide on its own. A verdict is input for the user, not an action.
Phase L1-4: Act (per rule, user choice)
REQ-920: The system SHALL offer three actions per due rule: re-verify, demote to L2, delete. It SHALL recommend one based on the verdict:
supports→ re-verify;contradicts→ demote (history still useful) or delete;inconclusive→ re-verify only if the user confirms the claim from their own knowledge.REQ-921: Re-verify SHALL set
verified: <today>. If the verdict iscontradicts, re-verify SHALL only be offered together with a proposed corrected rule text, and both SHALL be written together on confirmation. The correction SHALL cover every place the contradicted claim appears: the body, the frontmatterdescription(it is loaded via the index), and the rule's line in the L1 index file.REQ-922: Demote to L2 SHALL route the rule's content through the normal ingest path (specs/ingest.md): append it as a history block to the most relevant wiki page found via hub-index routing, or create a page if none fits. The block SHALL carry
source:: l1-demotionand the date. Only after the wiki write succeeds SHALL the system delete the L1 file and remove its line from the L1 index file.REQ-923: A rule containing a credential MUST NOT be demoted to L2 (specs/l1-l2-routing.md REQ-312). Only re-verify and delete SHALL be offered.
REQ-924: Delete SHALL remove the L1 file and its line from the L1 index file.
REQ-925: Choosing none of the three (skip) SHALL leave the file untouched; it stays due and reappears in the next run.
REQ-926: Before removing an L1 file (demote or delete), the system SHALL search the other L1 files and the L1 index file for references to it (file name and frontmatter
name). On demote, references SHALL be rewritten to point to the L2 page; on delete, they SHALL be listed for the user and removed or rewritten on confirmation. If the index line points to more than one file, only the removed file's pointer SHALL be taken out, and the line SHALL be shown before and after.
Phase L1-5: Report + Commit
REQ-928: The system SHALL report counts: classified (true/false), re-verified, demoted, deleted, skipped, and remaining unclassified and due files.
REQ-929: The system SHALL create a git commit for wiki pages changed by demotion (plus pending Access-Log appends). L1 changes are not committed (L1 is git-excluded, specs/l1-l2-routing.md REQ-330).
Scenarios
Scenario 1: Cold page demoted
GIVEN Wiki/Tech/Legacy-Foo was last logged in the Access-Log on 2025-09-01
AND today is 2026-06-07 (≈ 9 months, exceeds the 6-month threshold)
AND it is a knowledge page (not a hub, not active project, not Schema/Dashboard/Access-Log)
WHEN the user runs /llm-wiki prune
THEN the system SHALL list Wiki/Tech/Legacy-Foo as a demote candidate (last access 2025-09-01, 9 mo)
AND on confirmation SHALL add archived:: 2026-06-07 to the page (created::/updated:: unchanged)
AND move its routing line from the Wiki/Tech hub `### Index` to `### Archive`
AND NOT rename or move the page file
AND commit the changeScenario 2: Never-accessed page uses created date
GIVEN Wiki/Learning/Old-Course has no Access-Log entries
AND its created:: date is 2025-08-01 (older than 6 months)
WHEN the user runs /llm-wiki prune
THEN the system SHALL treat 2025-08-01 as its last-access proxy
AND list it as a demote candidateScenario 3: Active project exempt
GIVEN Wiki/Projects/Big-Migration has status:: active
AND it has not been read in 8 months
WHEN the user runs /llm-wiki prune
THEN the system SHALL NOT list it as a demote candidate (active projects are exempt)Scenario 4: Custom window
GIVEN several pages last accessed between 3 and 5 months ago
WHEN the user runs /llm-wiki prune --months 3
THEN the system SHALL list every page with no access in the last 3 months as a candidateScenario 5: Re-promotion is handled by query, not prune
GIVEN Wiki/Tech/Legacy-Foo is demoted (archived::, routing line in `### Archive`)
WHEN a later /llm-wiki query L3 grep matches it and reads it in full
THEN re-promotion is offered by the query command (specs/query.md REQ-452), NOT prune
AND prune SHALL never auto-promote pagesScenario 6: Demotion preserves incoming links
GIVEN Wiki/Projects/Acme links to [[Wiki/Tech/Legacy-Foo]]
WHEN Wiki/Tech/Legacy-Foo is demoted by /llm-wiki prune
THEN the [[Wiki/Tech/Legacy-Foo]] link in Wiki/Projects/Acme SHALL still resolve
AND lint SHALL NOT report it as a broken referenceScenario 7: Obsidian mode
GIVEN llm-wiki.yml is configured with tool: obsidian
AND Wiki/Tech/Legacy-Foo.md is a cold page
WHEN the user runs /llm-wiki prune
THEN the system SHALL add archived: <today> to the YAML frontmatter
AND move the routing line within the Wiki/Tech hub (Wiki/Tech/_index.md) from
`### Index` to `### Archive`
AND keep the file at Wiki/Tech/Legacy-Foo.md (no move)Scenario 8: L1 classification batch
GIVEN memory_path holds 25 unclassified L1 files
WHEN the user runs /llm-wiki prune --l1
THEN the system SHALL propose asserts-current-behavior values for 10 files, each with a reason
e.g. "feedback_pm2_reload.md → true (claims PM2 reload fails with npm start)"
"feedback_no_ai_attribution.md → false (records a preference)"
AND on confirmation SHALL write only the key, without verified
AND report 15 files still unclassifiedScenario 9: Evidence contradicts a rule
GIVEN feedback_hook_path.md (asserts-current-behavior: true, verified: 2026-02-01) says
"the hook lives at ~/.claude/hooks/rtk-rewrite.sh"
AND that path does not exist, but settings.json references ~/Projekte/tools/rtk/hooks/rtk-rewrite.sh
WHEN the user runs /llm-wiki prune --l1
THEN the system SHALL report verdict contradicts, with both paths as evidence
AND recommend demote or delete
AND offer re-verify only together with a corrected rule text naming the new path
AND write nothing until the user choosesScenario 10: Not locally verifiable
GIVEN reference_hosting_prices.md (asserts-current-behavior: true, no verified) states a monthly price
WHEN the user runs /llm-wiki prune --l1
THEN the system SHALL report verdict inconclusive — "not locally verifiable"
AND NOT fetch the provider websiteScenario 11: Demote to L2
GIVEN feedback_old_deploy_flow.md is due and the verdict is contradicts
AND the user chooses demote
WHEN the system executes the action
THEN it SHALL show a carry-over summary (kept in L2 / dropped and why / file path) first
AND append a history block with source:: l1-demotion to the page routed via the hub index
(e.g. Wiki/Tech/Deployment)
AND only then delete feedback_old_deploy_flow.md and its MEMORY.md line
AND commit the wiki changeScenario 12: Credential rule cannot be demoted
GIVEN reference_strapi_credentials.md is due
WHEN the user runs /llm-wiki prune --l1
THEN the evidence SHALL show only whether the referenced location exists, never the value
AND the offered actions SHALL be re-verify and delete onlyScenario 12b: Partial verdict with evidence basis
GIVEN feedback_e2e_gotchas.md claims (a) `data/` in .gitignore also matches lib/data/,
(b) a fresh worktree lacks public/clients/logo.svg, (c) a proxy rewrites `next start`
AND .gitignore contains `data/`, public/clients/logo.svg no longer exists anywhere,
and (c) can only be observed by starting a server
WHEN the user runs /llm-wiki prune --l1
THEN the system SHALL report (a) supports [file], (b) contradicts [file], (c) unchecked
AND the overall verdict SHALL be contradicts (partial), naming claim (b) and unchecked (c)
AND the proposed correction SHALL change the body, the description, and the index lineScenario 12c: References are rewritten on demote
GIVEN project_x_status.md is demoted to Wiki/Projects/X
AND feedback_lighthouse.md contains "Related: [[project_x_status]]"
WHEN the L1 file is removed
THEN the reference SHALL be rewritten to [[Wiki/Projects/X]]
AND the MEMORY.md pointer to project_x_status.md SHALL be removedScenario 13: Modes are separate
GIVEN cold L2 pages and due L1 rules both exist
WHEN the user runs /llm-wiki prune
THEN only L2 index eviction SHALL run
WHEN the user runs /llm-wiki prune --l1
THEN only L1 classification and verification SHALL runAcceptance Criteria
[ ] Last-access computed from the Access-Log; created:: used as proxy when never logged
[ ] Default 6-month threshold, overridable via --months N
[ ] Hubs, Schema, Dashboard, Access-Log, and active projects are exempt
[ ] Candidates shown to the user before any write (opt-in)
[ ] Demote adds archived:: (and status:: archived only where the enum allows)
[ ] Routing line moved from
### Indexto### Archive(move, not delete)[ ] Page file never renamed or moved — incoming links stay valid
[ ] Demoted page still greppable as L3 fallback
[ ] Re-promotion is query's responsibility, not prune's
[ ] Structural change committed; next-prune date reported (no self-scheduling)
[ ] Works in both Logseq and Obsidian modes
[ ]
--l1requires memory_path and never runs L2 eviction; plain prune never touches L1[ ] Classification proposes, user confirms, verified is never set by classification
[ ] Evidence gathering is strictly read-only and local; no remote fetches
[ ] Verdicts per claim with evidence basis (executed / source / file); overall verdict aggregated, partial marked
[ ] Three actions per rule, nothing written without confirmation, carry-over summary shown before removal
[ ] Corrections cover body, description, and index line
[ ] References to a removed L1 file are rewritten (demote) or listed (delete)
[ ] Demote writes to L2 first, deletes L1 only after the wiki write succeeds
[ ] Credential rules: never demoted, values never printed
Dependencies
llm-wiki.ymlmust exist and be valid (see specs/config.md)specs/schema.md defines the
archived::marker, the hub### Index/### Archivestructure, and the Access-Log pagespecs/query.md writes the Access-Log this command consumes and owns re-promotion
specs/lint.md rules 10-11 detect index drift and archived-in-live-index left by an interrupted prune
specs/l1-l2-routing.md REQ-370-379 define claim class, verification date, and due rules for
--l1; specs/lint.md Rule 12 reports them; specs/config.md REQ-660 sets the windowspecs/ingest.md is reused by the demote-to-L2 action
58 files · 2 not served here
- .claude-plugin/icon.png (not served here)
- .claude-plugin/marketplace.json
- .claude-plugin/plugin.json
- .github/ISSUE_TEMPLATE/bug_report.md
- .github/ISSUE_TEMPLATE/config.yml
- .github/ISSUE_TEMPLATE/feature_request.md
- .github/PULL_REQUEST_TEMPLATE.md
- .github/SECURITY.md
- .gitignore
- ATTRIBUTION.md
- CHANGELOG.md
- CONTRIBUTING.md
- LICENSE
- README.md
- SECURITY.md
- SKILL.md
- config.example.yml
- docs/diagrams.md
- docs/faq.md
- docs/graph-view.png (not served here)
- docs/l1-l2-architecture.md
- docs/logseq-vs-obsidian.md
- docs/schema-reference.md
- docs/troubleshooting.md
- examples/before-after.md
- examples/l1-memory-examples.md
- openspec/AGENTS.md
- openspec/changes/archive/2026-10-11-add-plugin-packaging/design.md
- openspec/changes/archive/2026-10-11-add-plugin-packaging/proposal.md
- openspec/changes/archive/2026-10-11-add-plugin-packaging/specs/config.md
- openspec/changes/archive/2026-10-11-add-plugin-packaging/specs/plugin.md
- openspec/changes/archive/2026-10-11-add-plugin-packaging/specs/setup.md
- openspec/changes/archive/2026-10-11-add-plugin-packaging/tasks.md
- openspec/changes/remove-shell-scripts/design.md
- openspec/changes/remove-shell-scripts/proposal.md
- openspec/changes/remove-shell-scripts/specs/config.md
- openspec/changes/remove-shell-scripts/specs/plugin.md
- openspec/changes/remove-shell-scripts/specs/setup.md
- openspec/changes/remove-shell-scripts/tasks.md
- openspec/project.md
- openspec/specs/config.md
- openspec/specs/ingest.md
- openspec/specs/l1-l2-routing.md
- openspec/specs/lint.md
- openspec/specs/plugin.md
- openspec/specs/prune.md
- openspec/specs/query.md
- openspec/specs/schema.md
- openspec/specs/setup.md
- templates/logseq/Access-Log.md
- templates/logseq/Dashboard.md
- templates/logseq/Hub.md
- templates/logseq/Schema.md
- templates/obsidian/Access-Log.md
- templates/obsidian/Dashboard.md
- templates/obsidian/Hub.md
- templates/obsidian/Schema.md
- wiki.md
Advantages
- 5-minute setup. Install the plugin, run /llm-wiki setup, and you have a schema, namespaces, and git tracking. No manual design needed. evidence: README.md
- Claude becomes your wiki maintainer. /llm-wiki ingest updates 5-15 pages with cross-references from a single source. evidence: README.md
- L1/L2 architecture. Auto-loaded rules in memory (L1) + deep knowledge in the wiki (L2). No other tool has this. evidence: README.md
- Built-in quality checks. /llm-wiki lint finds orphan pages, stale content, broken refs, and credential leaks. evidence: README.md
- Logseq + Obsidian. Use whichever you already have. No tool switch required. evidence: README.md
Limitations
- The schema feels overengineered at first. With 10 pages, defining 5 page types and 8 lint rules seems like overkill. Past 50 pages, you will be grateful for the consistency. Define the schema early -- it is much harder to retrofit one later. evidence: README.md
- Two systems means you need a clear boundary. Having both L1 and L2 means you could accidentally put the same information in both places. The lint rule for L1/L2 duplicates exists precisely for this reason. evidence: README.md
- Parallel agents can conflict. If you have multiple Claude sessions writing to wiki files simultaneously, concurrent edits can cause conflicts. Treat wiki files as a shared resource. evidence: README.md
- Start with fewer hub pages. Let them emerge organically from ingest operations rather than creating empty hubs upfront. evidence: README.md
Security
Risk level: No risk found
This brain runs
Agent instructions that run or fetch something (18)
SKILL.md:Run /llm-wiki setup to create one." If its `wiki_path` names a different directory than the wiki root above, warn once, naming both paths, and continue with the wiki root above.SKILL.md:Meant as a periodic run (default cadence N = 6 months) — wire it via your scheduler;SKILL.md:READ-ONLY and LOCAL: check existence, read files, search contents, read dependency manifests, run commands only with `--version` / `--help`.SKILL.md:Evidence basis per claim: `executed` (read-only command), `source` (read the implementing code, not run), or `file` (existence/content).SKILL.md:Skip -> file untouched, stays due for the next runSKILL.md:Timestamp the lint runSKILL.md:Last prune run (newest archived:: date) + a recommendation when the cold-page count is highSKILL.md:Comparison to last status run (if Dashboard page exists)SKILL.md:git: if the user wants git init or the root is a repository, check `git --version`.SKILL.md:Run `date +%Y-%m-%d` once.SKILL.md:Git init, only if the user agreed and the root has no `.git`: `git -C "<root>" init`.SKILL.md:Commit, only if the root is a git repository and this run created at least one file.SKILL.md:Run lint on imported pagesSKILL.md:decision:: run benchmark B1 first, then delete (2026-09-12)SKILL.md:- **Next step:** run B1, otherwise default A (check volumes, delete)SKILL.md:status: open · ticket: OPS-195 · decision: run benchmark B1 first, then delete (2026-09-12)SKILL.md:**Next step:** run B1, otherwise default A (check volumes, delete)openspec/AGENTS.md:git is optional.
Attribution and licence
- Created by
- Mehmet Goekce
- Declared authors
- Mehmet Goekce (declared in .claude-plugin/plugin.json)
- Publisher
- Mehmet Gökçe (Community)
- Source
- MehmetGoekce/llm-wiki · commit 5fa5ee7
- Licence
- MIT License (files served here)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Mehmet Goekce.
Install from source
2 of its files are not served here, so there is no ZIP. MehmetGoekce/llm-wiki at 5fa5ee7