Generated banner for llm-wiki
Generated logo for llm-wiki

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.
— the description by Mehmet Goekce

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).

Folders
FolderRoleFiles
.githubagent-config5
docsdocs7
examplesexamples2
templatestemplates8
.claude-pluginfolder3
openspecfolder23

Requirements

Works with: Claude Code

Set it up

  1. Clone the repository at the commit AutoGineer scanned:

    git clone https://github.com/MehmetGoekce/llm-wiki.git && cd llm-wiki && git checkout 5fa5ee7d49a4346eeb1d92c1de7bf649e7654e91
  2. Point Claude Code at .claude-plugin/icon.png: it does not read that file on its own.

  3. cd llm-wiki && claude

  4. AutoGineer scanned these files at commit 5fa5ee7.

  5. 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
  6. 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
  7. 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| L2

What 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 ingest updates 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 lint finds orphan pages, stale content, broken refs, and credential leaks.

  • Logseq + Obsidian. Use whichever you already have. No tool switch required.

Quick Start

claude plugin marketplace add MehmetGoekce/llm-wiki
claude plugin install llm-wiki@mehmetgoekce

On Claude Code 2.1.275 or later, one line inside a session does the same:

/plugin install llm-wiki --marketplace MehmetGoekce/llm-wiki

Claude 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.md

In 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 finds templates/

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.md

Then 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.

LayerWhatSizeLoadingContains
L1Claude Code Memory~10-20 filesAuto-loaded every sessionRules, gotchas, identity, credentials
L2Wiki (Logseq/Obsidian)~50-200 pagesOn-demand via /llm-wiki queryProjects, 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| L2

The 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

CommandDescription
/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 --l1L1-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 statusMetrics 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:

LogseqObsidian
Propertiesproperty:: value (inline)YAML frontmatter
FormatOutliner (- prefix on every line)Flat markdown
File namesWiki___Tech___Strapi.mdWiki/Tech/Strapi.md
Links[[Wiki/Tech/Strapi]][[Wiki/Tech/Strapi]]
BacklinksAutomatic (graph-native)Via plugin or core feature
Block addressingEvery line is a blockParagraph-level
LicenseAGPL-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 workflow

Every 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 content

Trade-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

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.yml are 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: query may consult it, lint reports rules that are due for a check, and prune --l1 classifies, updates, moves or deletes memory files, each one only after you confirm it. lint never prints the content of a memory file. Without memory_path the 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 ingest makes 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

License

MIT -- see LICENSE for details.

openspec/specs/ingest.md

Spec: /llm-wiki ingest — Source Processing Pipeline

Description

The ingest command processes external sources (URLs, files, text) and distributes extracted knowledge across wiki pages. It is the primary write path into the wiki. A single ingest run targets 5-15 page touches (creates + updates + hub updates).


Requirements

Phase 1: Source Analysis
  • REQ-010: The system SHALL accept three source types: URL (fetched via WebFetch), file path (read from disk), and inline text (parsed directly).

  • REQ-011: The system SHALL extract entities, facts, relationships, dates, and decisions from the source material.

  • REQ-012: The system SHALL classify extracted knowledge into exactly one of six categories: business, technical, content, project, learning, reference.

  • REQ-013: The system SHALL evaluate each extracted fact against the L1/L2 routing rule (see specs/l1-l2-routing.md) and recommend Memory for L1 candidates.

  • REQ-014: The system SHOULD identify when a source contains credentials or secrets and MUST NOT write them to wiki pages.

Phase 2: Wiki Scan
  • REQ-020: The system SHALL read llm-wiki.yml before any wiki operations to determine tool mode (logseq/obsidian), paths, and namespace configuration.

  • REQ-021: The system SHALL read the Schema page to load current conventions and property requirements.

  • REQ-022: The system SHALL glob for existing wiki pages matching extracted entities and topics to identify update targets.

  • REQ-023: The system SHALL read existing target pages before modifying them. Maximum 3 pages loaded simultaneously (JIT retrieval).

  • REQ-024: The system SHALL produce a page operation plan: pages to create, pages to update, cross-references to add, hub pages to update.

Phase 3: Page Operations
  • REQ-030: The system SHALL create new pages with ALL required properties for the declared page type (per Schema). Missing required properties are a spec violation.

  • REQ-031: The system SHALL use the correct format for the configured tool: Logseq (outliner with - prefix, property:: value) or Obsidian (flat markdown, YAML frontmatter).

  • REQ-032: The system MUST NOT delete existing content when updating pages. A new fact that supersedes no stated state SHALL be appended as a new block below existing content.

  • REQ-032a: When a new fact supersedes a state a block already states (status, decision, deadline, next step), the system SHALL rewrite that block's headline, properties and next step in place and SHALL move the superseded wording, dated, into the block's collapsed History child (newest first; Logseq collapsed:: true, Obsidian folded callout). It MUST NOT append dated status addenda to the block's running prose.

  • REQ-032b: Superseded statements SHALL remain readable in the History child; moving them there MUST NOT shorten or paraphrase them beyond a one-line date prefix.

  • REQ-033: The system SHALL update hub pages to list any newly created child pages in their namespace.

  • REQ-033a: For every page created or updated, the system SHALL set or refresh its routing line in the namespace hub's ### Index section, formatted [[Wiki/NS/Page]] -- <one-sentence description, <=120 chars> #tags (see specs/schema.md and specs/query.md Phase 0). The description is the routing key consumed by two-stage query and MUST be terse and distinctive, not filler. A page without a routing line is unroutable.

  • REQ-034: The system SHALL add [[Wiki/Namespace/Page]] cross-references between all affected pages. Every page touched MUST have at least 1 outgoing wiki link.

  • REQ-035: The system SHALL set the updated:: property (or YAML updated field) to today's date on every modified page. The value SHALL be the date only; change notes belong in the commit message (hubs: a line in the collapsed ## Change log).

  • REQ-036: When a page mentions an entity that has its own wiki page, the system SHALL use [[Wiki/...]] link syntax instead of plain text.

  • REQ-037: The system SHOULD target 5-15 page touches per ingest. Fewer than 5 suggests insufficient cross-referencing. More than 20 suggests the ingest should be split.

  • REQ-038: File names MUST follow tool conventions: Logseq uses triple-underscore separators (Wiki___Tech___Strapi.md), Obsidian uses directory hierarchy (Wiki/Tech/Strapi.md).

  • REQ-039: Namespace depth MUST NOT exceed 3 levels (e.g., Wiki/Business/Clients/Acme is the maximum depth).

Phase 4: Quality Gate
  • REQ-040: The system SHALL verify that all new pages have ALL required properties for their declared type before completing the ingest.

  • REQ-041: The system SHALL verify that every touched page has at least 1 outgoing [[Wiki/...]] cross-reference.

  • REQ-041a: The system SHALL verify that every new or updated active page has a routing line in its namespace hub ### Index (REQ-033a). A missing routing line is a warning (the page is unroutable until lint --fix backfills it).

  • REQ-042: The system SHALL scan all created/updated content for credential patterns (token::, password::, secret::, api-key::, base64 strings of 40+ chars). Any match MUST block the ingest and warn the user.

  • REQ-043: The system SHALL count page touches and emit a warning if the count is below 5 or above 20.

  • REQ-044: The quality gate SHALL NOT block the ingest on page-touch count warnings (REQ-043). It SHALL block on credential detection (REQ-042) and missing required properties (REQ-040).

Phase 5: Report
  • REQ-050: The system SHALL output a summary listing: pages created (with types), pages updated, cross-references added, hub pages updated.

  • REQ-051: The system SHALL list any warnings (low page-touch count, L1 candidates found, skipped items) and their reasons.

  • REQ-052: The system SHOULD recommend a git commit after structural changes.

Cross-Cutting
  • REQ-060: The system MUST NOT modify any non-wiki pages (existing Logseq journals, personal notes, other vault content).

  • REQ-061: The system SHALL use ISO 8601 date format (YYYY-MM-DD) for all date properties.

  • REQ-062: When the configured tool is Logseq, every line of wiki content MUST start with - (outliner block prefix). Properties MUST use property:: value syntax.

  • REQ-063: When the configured tool is Obsidian, properties MUST be in YAML frontmatter. Content uses standard markdown without block prefixes.


Scenarios

Scenario 1: Ingest a URL source (happy path)
GIVEN llm-wiki.yml is configured with tool: logseq and wiki_path: /tmp/test-wiki
AND the wiki has a Schema page and a Wiki/Tech hub page
AND no page exists for "Redis"
WHEN the user runs /llm-wiki ingest "https://redis.io/docs/about/"
THEN the system SHALL create a new page Wiki___Tech___Redis.md
AND the page SHALL have properties: type:: entity, entity-type:: technology,
    created:: [today], updated:: [today], status:: active, source:: ingest
AND the page SHALL contain extracted facts about Redis from the URL
AND the page SHALL have at least 1 [[Wiki/Tech]] cross-reference
AND the Wiki___Tech.md hub `### Index` SHALL gain a routing line:
    "[[Wiki/Tech/Redis]] -- In-memory data store, cache + pub/sub #redis"
AND the report SHALL show: 1 page created, 1 hub updated, N cross-refs added
Scenario 2: Ingest adds a fact to an existing page (append)
GIVEN a page Wiki___Tech___Strapi.md exists with content "Headless CMS for Node.js"
AND the page has updated:: 2026-03-01
WHEN the user runs /llm-wiki ingest "Strapi 5 uses documentId for PUT, not numeric id"
THEN the system SHALL append a new block to the existing page
AND the original content "Headless CMS for Node.js" SHALL still be present unchanged
AND updated:: SHALL be changed to [today]
AND the report SHALL show: 1 page updated
Scenario 3: Credential detected in source — ingest blocked
GIVEN the user provides source text containing "api-key:: " followed by a token value
WHEN the system reaches Phase 4 (Quality Gate)
THEN the ingest SHALL be blocked
AND the system SHALL warn: "Credential pattern detected. Move to L1 memory, not wiki."
AND no wiki pages SHALL be created or modified
Scenario 4: L1 candidate detected — recommend memory
GIVEN the user provides source text "PM2 reload does not work with npm start"
WHEN the system evaluates L1/L2 routing in Phase 1
THEN the system SHALL identify this as an L1 candidate (operational gotcha)
AND the system SHALL recommend: "This looks like an L1 rule. Consider saving to
    Memory instead of Wiki."
AND the system SHALL still proceed with wiki ingest if the user confirms
Scenario 5: Page touch count below minimum
GIVEN a simple source with one fact about an existing page
WHEN the ingest completes with only 2 page touches
THEN the system SHALL emit a warning: "Only 2 page touches (target: 5-15).
    Consider adding cross-references to related pages."
AND the ingest SHALL complete successfully (warning, not blocking)
Scenario 6: Page touch count above maximum
GIVEN a complex source spanning 25 different topics
WHEN the ingest plan identifies 25 page operations
THEN the system SHALL emit a warning: "25 page touches exceeds target (5-15).
    Consider splitting this ingest into multiple runs."
AND the ingest SHALL complete successfully (warning, not blocking)
Scenario 7: Hub page missing for new namespace child
GIVEN a hub page Wiki___Projects.md exists
AND no page Wiki___Projects___NewProject.md exists
WHEN the user ingests information about "NewProject"
THEN the system SHALL create Wiki___Projects___NewProject.md with required properties
AND the system SHALL append [[Wiki/Projects/NewProject]] to Wiki___Projects.md
Scenario 8: Obsidian mode — YAML frontmatter format
GIVEN llm-wiki.yml is configured with tool: obsidian and wiki_path: /tmp/test-wiki
WHEN the user ingests a new technology "Milvus"
THEN the system SHALL create Wiki/Tech/Milvus.md
AND the file SHALL start with YAML frontmatter:
    ---
    type: entity
    entity-type: technology
    created: [today]
    updated: [today]
    status: active
    source: ingest
    ---
AND the content SHALL use standard markdown without "- " block prefixes
Scenario 9: Max 3 pages loaded simultaneously
GIVEN an ingest source references 8 existing wiki pages
WHEN Phase 2 identifies all 8 as update targets
THEN the system SHALL read at most 3 pages at a time
AND process them in batches: read 3, update 3, read next 3, update next 2
AND all 8 pages SHALL be correctly updated after the ingest completes
Scenario 10: Namespace depth violation
GIVEN a source describes an entity "Contact" under Wiki/Business/Clients/Acme
WHEN the ingest would create Wiki/Business/Clients/Acme/Contact (depth 4)
THEN the system SHALL NOT create the 4-level page
AND the system SHALL instead add "Contact" as a section within the
    Wiki/Business/Clients/Acme page
AND the report SHALL note: "Namespace depth limit (3) reached, content merged
    into parent page"
Scenario 11: Ingest supersedes a stated state (rewrite + history)
GIVEN a Logseq page holds the block
    "- 🔴 Decommission staging VM — due [[2026-09-29]]" with status:: open
    and child "**Next step:** delete the VM"
WHEN the user runs /llm-wiki ingest "2026-09-28: decided to keep the staging VM, hardening in OPS-348"
THEN the system SHALL rewrite the headline to "✅ Staging VM stays — decided [[2026-09-28]]"
AND set status:: done and add the follow-up ticket as a property
AND replace the next step with the OPS-348 hardening step
AND add "2026-09-28 decided to keep the VM" and, marked (superseded), the old
    "due 2026-09-29, delete the VM" wording as lines of the block's collapsed History child
AND NOT append a "Status 2026-09-28: ..." sentence to the block's prose

Acceptance Criteria

  • [ ] All 5 phases execute in order (Analysis, Scan, Operations, Quality Gate, Report)

  • [ ] URL, file path, and inline text sources all work

  • [ ] New pages have ALL required properties per Schema

  • [ ] No existing content is deleted — new facts are appended, superseded state moves to a collapsed History

  • [ ] updated:: carries the date only

  • [ ] Hub pages list all child pages after ingest

  • [ ] Every created/updated active page has a routing line in its hub ### Index

  • [ ] Every touched page has at least 1 cross-reference

  • [ ] Credential patterns block the ingest

  • [ ] Page touch warnings are emitted but do not block

  • [ ] Works correctly in both Logseq and Obsidian modes

  • [ ] Max 3 pages loaded simultaneously during processing

  • [ ] Namespace depth never exceeds 3 levels

  • [ ] All dates use ISO 8601 format


Dependencies

  • llm-wiki.yml must exist and be valid

  • Schema page must exist in the wiki

  • specs/l1-l2-routing.md defines the L1/L2 routing decision logic used in Phase 1

58 files · 2 not served here

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 run
  • SKILL.md: Timestamp the lint run
  • SKILL.md: Last prune run (newest archived:: date) + a recommendation when the cold-page count is high
  • SKILL.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 pages
  • SKILL.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
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