Releases: CatChen/knowledge-wiki-template
v1.5
What's New
/knowledge-wiki-summary — pipe body via temp file, never retype paths (#29)
wiki-summary.mjs create no longer writes a skeleton for the LLM to edit. Instead the LLM generates the full summary body, writes it to a temp file, and pipes it in — so the LLM never has to re-enter the summary file path. This eliminates a class of silent corruption where non-ASCII characters in filenames (e.g. U+2019 right single quotation mark) were transcribed as their ASCII lookalikes (U+0027), causing the edit to land on the wrong file while leaving the correct target untouched.
The create command now accepts --tags "[tag1, tag2]" and reads body content from stdin (empty stdin exits with an error). The skill is restructured accordingly, with a recovery step for wrong-source-path errors.
File existence checks before inserting wikilinks (#28)
wiki-index.mjs upsert-summary and wiki-concept.mjs insert-source previously inserted wikilink entries without verifying the target file existed, silently creating broken links that wiki-lint would later flag. Both commands now check that the summary .md file is present on disk and exit 1 with a clear error message if not — catching apostrophe-character mismatches and other path errors at the point of insertion rather than downstream. The knowledge-wiki-concept and knowledge-wiki-lint skills include recovery hints for when these errors fire.
Wikilink regex fix for bracket-named files (#27)
Three wikilink regexes used character classes that stopped at the first ] inside a path, silently truncating links to files whose names contain square brackets (e.g. [Admission] Program). The fix uses a negative lookahead that allows a lone ] inside a link path as long as it is not immediately followed by another ] (which would close the wikilink). Affected: extractWikilinks in lib/graph.mjs, findUngroundedConcepts in wiki-lint.mjs, and SUMMARY_RE in wiki-index.mjs.
/knowledge-wiki-merge — guard against head-truncation (#26)
LLMs tend to append | head -N to commands with large output to keep context under control, silently discarding candidates and causing duplicate concepts to be missed. Two targeted fixes: an explicit Do not pipe through head warning on candidates.mjs find-shared-source-concepts, and a structural change to wiki-index.mjs read-concepts that redirects output to a temp file and reads it with the Read tool's offset/limit pagination — removing the incentive to truncate in the first place.
v1.4
What's New
/knowledge-wiki-lint — ungrounded concept check (#22)
New lint check detects concept articles whose claims aren't backed by any linked source — flagging content that may have been invented or over-generalized rather than synthesized from the knowledge base.
/knowledge-wiki-cluster now creates new parent concepts as Synthesis-type pages with the notepad icon.
/knowledge-wiki-concept — index description synthesis rule (#20)
Step 3c now explicitly bans two common shortcuts when writing a concept's one-line index description: copying the summary's ## Key Concepts line, or lifting the article's first sentence verbatim. The description must be freshly synthesized as a compact, self-contained characterization of the concept body.
/knowledge-wiki-cluster — tighter AskUserQuestion usage (#21, #25)
- Each cluster must be presented via its own single-question
AskUserQuestioncall — never batched with other clusters, even when recommending the same action. - The 4a cluster summary table must be sent as a normal markdown message before any interactive question tool is called, instead of being crammed into option descriptions.
- Interactive prompts fall back to plain markdown when a dialog can't keep the summary, reasoning, and options visible together — improving compatibility with Codex and similar agents.
Wiki script reorganization (#23, #24)
- Shared logic extracted into
scripts/wiki/lib/(frontmatter, graph, markdown-lines, paths, sections, state-store), with existing scripts slimmed down to delegate to it. - Two new top-level scripts:
candidates.mjs(implied parents, shared sources, thin concepts) andwiki-backlinks.mjs(unified backlink updates). - Removed unused compatibility shims
wiki-graph-lib.mjsandwiki-section-lib.mjs. - Added comprehensive CI test coverage for
wiki-lint,wiki-candidates,wiki-backlinks, andwiki-index.
v1.3
What's New
/knowledge-wiki-cluster — existing-parent clusters (#19)
The cluster skill now handles two cluster types instead of one:
- New-parent (
parentExists: false): the implied parent concept does not exist yet — create it, then fold/skip children. (Original behavior.) - Existing-parent (
parentExists: true): the implied parent already exists but some children have never been linked to it — fold/skip the unlinked children without re-creating the parent.
This replaces the specificity-candidates pass in /knowledge-wiki-merge, which surfaced parent/child slug pairs one at a time. The cluster skill gives better UX by grouping all unlinked children of an existing parent together as a single unit.
Dismissed decisions are now stored as individual parent/child pairs (dismissedPairs) rather than as a whole-parent slug (dismissedParents), so dismissing a cluster only suppresses the specific children you reviewed — new children added under the same parent later will resurface automatically.
wiki-state.mjs changes:
- New unified
dismiss-pair <skill-name> <pathA> <pathB>command replaces bothdismiss-merge-pairanddismiss-cluster-parent - New
prune-cluster-pairsreplacesprune-cluster-parents; prunes pairs only when the child file is absent (parent absence is legitimate — pairs may be recorded before the parent is created)
/knowledge-wiki-lint Check 9 updated to call prune-cluster-pairs.
/knowledge-wiki-cluster — deferred parent creation (#17)
The skill now collects all fold/skip decisions for a cluster before writing any files. Previously it created the parent concept immediately and then asked about each child, which meant a partial cluster could be left in an inconsistent state if the session was interrupted mid-way.
/knowledge-wiki-cluster — fold/skip design overhaul (#16)
Complete redesign of the interactive workflow:
- Per-child Fold / Skip recommendations presented as a rendered table before asking
- Batch options: Proceed (apply recommendations), Skip all, Fold all, Review one by one
- Skip decisions now recorded as dismissed pairs so skipped children don't resurface on the next run
- LLM pre-filter auto-dismisses clusters whose implied parent is a common English modifier (e.g.
smart,the,digital)
/knowledge-wiki-lint — duplicate concept links check (Check 11) (#14)
New check detects summary files where the same concept wikilink appears more than once in the ## Key Concepts section (a common side-effect of folding). Duplicate entries are consolidated into a single combined description.
/knowledge-wiki-lint and /knowledge-wiki-merge — table summaries (#18)
Both skills now print their final summary as a rendered markdown table instead of a plain-text list, making results easier to scan at a glance.
/knowledge-wiki-lint — self-links check (Check 10)
New check removes ## Connected Concepts entries where a concept links to itself — an artifact that can appear when a concept is folded into a parent that already linked back to it.
Stale dismissed cluster parent pruning (#12)
prune-cluster-parents (now prune-cluster-pairs) gained logic to remove entries whose descendant concepts have all been deleted, in addition to entries whose concept file was created.
CI: bash integration tests (#11)
GitHub Actions workflow added with fixture-based integration tests for all wiki-state.mjs, wiki-concept.mjs, and wiki-index.mjs subcommands. Each test case has a fixture/ directory copied to the repo root before the command runs, and assertions compare expected/ files bidirectionally against the result.
v1.2
What's New
New: /knowledge-wiki-cluster skill (#10)
Adds an interactive workflow for creating missing parent concept pages. The new missing-parent-clusters lint subcommand detects groups of 2+ concepts that share a non-existing implied parent slug — each concept is grouped under its non-existing prefix ancestors up to (but not including) its nearest existing ancestor. The skill presents clusters deepest-first so you build bottom-up, tracks processed clusters in-memory to prevent already-handled entries from reappearing after a refresh, and supports Create / Dismiss / Skip per cluster.
Supporting state commands in wiki-state.mjs:
dismiss-cluster-parent— permanently hide a cluster from future runsprune-cluster-parents— remove dismissed entries whose concept file now exists on disk
/knowledge-wiki-lint gains Check 9 (Stale Dismissed Cluster Parents), mirroring Check 8 for merge pairs.
/knowledge-wiki-merge — tag merging step (#9)
The merge skill now carries tags over from both source concepts into the merged result, so no tag coverage is lost when two articles are combined.
Unified Claude and Codex skills via symlink (#8)
CLAUDE.md is now a symlink to AGENTS.md, eliminating duplicated skill documentation across the two agent instruction files.
Bug fixes
v1.1
What's new
Chinese README translations
Simplified Chinese (README.zh-CN.md) and Traditional Chinese (README.zh-TW.md) translations of the README are now included. All three language versions are interlinked with a language switcher at the top of each file.
Bug fixes
Several correctness issues in the wiki scripts have been addressed:
- Wikilink regex —
update-concept-backlinks.mjsnow uses an exact match to prevent a shorter concept slug from accidentally deleting wikilinks for longer slugs that share a prefix. - Directory traversal —
wiki-summary.mjsnow skips.git/andnode_modules/during file scanning. - Fresh-repo safety —
find-orphan-summaries.mjs,find-thin-concepts.mjs, andwiki-state.mjsnow handle the case whereWiki/does not yet exist, so the skills work correctly on a repo where no summaries have been generated yet. - Localized README exclusion —
wiki-summary.mjsnow excludesREADME.zh-CN.mdandREADME.zh-TW.mdfrom the summary scanner, consistent with howREADME.mdis excluded.
Full changelog
v1 — Initial public release
What is this?
A template for building a personal knowledge wiki powered by AI. Drop your Markdown notes into any folder structure you like; the included Claude Code skills incrementally build and maintain an interconnected wiki in Wiki/ from your source documents — without re-synthesizing everything from scratch on every query.
The design follows Andrej Karpathy's LLM Wiki pattern.
What's included
Six wiki skills
| Skill | Purpose |
|---|---|
/knowledge-wiki-summary |
Summarizes each source file into Wiki/Summaries/ |
/knowledge-wiki-concept |
Extracts and writes concept articles in Wiki/Concepts/ |
/knowledge-wiki-synthesis |
Discovers cross-cutting connections and writes synthesis articles |
/knowledge-wiki-lint |
Repairs orphan summaries, broken wikilinks, and orphan concepts |
/knowledge-wiki-merge |
Interactive session to merge duplicate concept articles |
/knowledge-wiki-enrich |
Expands thin concept articles using web search |
Supporting infrastructure
scripts/— 13 Node.js helper scripts the skills invoke (wiki index, state tracking, section manipulation, orphan/broken-link detection, duplicate candidate finding, concept backlink updating).githooks/— pre-commit, post-checkout, post-merge, post-rewrite hooks that automatically re-index and re-embed on every git operation.nvmrc— pins Node.js 24AGENTS.md/CLAUDE.md— workspace instructions for AI agents, including qmd search tool usage and folder conventions
Search via qmd
The template is wired for qmd, a local semantic search engine that indexes your Markdown files. Once configured, AI agents can search your notes with BM25 keyword, semantic vector, or hypothetical-document queries — and fall back to ripgrep if qmd is unavailable.
Getting started
See README.md for the full 11-step setup guide: install Node 24, ripgrep, and qmd; create the collection; generate embeddings; configure git hooks; wire up the MCP server for Claude, Claude Code, or Codex; add your content; and run the skills.