LLM Wiki — Index
Refresh vault/wiki/index.md — the vault MOC.
Per-folder folder notes (wiki/<topic>/<topic>.md, type: index; legacy
_index.md where still present) are maintained by
/claude-wiki-pages:ingest during ingest. This skill does not touch
them.
When to invoke
- A new top-level topic folder has been created.
- A synthesis note has been added under
wiki/_synthesis/. /claude-wiki-pages:lintreports vault-MOC drift.- The user asks for an index refresh.
Reading contract
vault/CLAUDE.md— the schema.vault/wiki/— the full tree, specifically:- Top-level topic folders (children of
wiki/). wiki/_synthesis/*.md— the synthesis notes.- Each top-level folder's folder note (or legacy
_index.md) — to pull its topictitleand the aliases the vault MOC should expose.
- Top-level topic folders (children of
Writing contract
Exactly one write target:
vault/wiki/index.md
With frontmatter matching the index type schema, and a body that:
- Lists every top-level topic folder under a
## Topicsheading, one line per folder, format- [[<folder>]] — <one-line summary from the folder note>(filename wikilink to the folder note, matching the quoted"[[<folder>]]"form the schema requires in the rootchild_indexes:). - Lists every synthesis note under
## Syntheses, one line per file, format- [[<file-basename>|<Title>]] — <synthesis_type>(piped basename target — a bare[[<Title>]]does not resolve to the kebab-case filename and renders as a ghost node). - Ends with an auto-generated timestamp:
_Generated <YYYY-MM-DD>._
Plus one log append:
## [YYYY-MM-DD] index | refreshed vault MOC (<N> topics, <M> syntheses)
This skill MUST NOT:
- Touch per-folder folder notes (
wiki/<topic>/<topic>.md, or legacy_index.md). Ever. - Write any page other than
wiki/index.mdandwiki/log.md. - Reorder entries non-deterministically — ordering must be stable, so repeated runs on an unchanged tree produce no diff.
Ordering
- Topics: alphabetical by folder name. Underscore-prefixed folders
(
_synthesis,_sources) are excluded from the topic list. - Syntheses: chronological by
created:ascending, ties broken alphabetically.
These are the conventions; document any project-specific override in
vault/CLAUDE.md and respect it here.
Workflow
- Schema. Read
vault/CLAUDE.md. - Enumerate. List top-level folders under
wiki/(excluding underscore-prefixed). List files underwiki/_synthesis/. - Summarize. For each topic folder, read its folder note's frontmatter
title:and first-line summary (fall back to a legacy_index.mdwhen no folder note exists). For each synthesis, readtitle:andsynthesis_type:. - Render. Build
wiki/index.mdper the frontmatter schema and the body format above. - Verify idempotency. If the current
wiki/index.mdis byte-identical to what would be written, skip the write (avoid a noop commit) but still log the refresh. - Write. Overwrite
wiki/index.md. - Log. Append to
wiki/log.md.
Hook enforcement
PreToolUse validate-frontmatter.sh rejects an index-type page missing
any required field (title, type, aliases, children,
child_indexes). For the vault MOC, children and child_indexes at the
top level are the full lists built in step 4.
Completion signal
READY: wrote wiki/index.md (<N> topics, <M> syntheses).
or, on a noop:
UNCHANGED: wiki/index.md already reflects the current tree.
## Context contract
Machine-readable read/write contract for the `engine context` verb.
| role | globs |
| -------------- | ----------------------------------------- |
| inputs (L4) | wiki/** |
| reference (L3) | vault/CLAUDE.md |
| outputs | wiki/index.md |