Pathlight·Playbook

The Wiki

The Codex holds what you decide. The Wiki holds what you learn. Drop a source into raw/, run one compile step, and Claude writes linked notes on top: a summary, the people and companies that matter, the ideas worth keeping, all cross-linked. The web of notes gets denser every time you read something. This is the Memory layer that grows without you filing it by hand.


Why this comes after the Codex

The Codex (chapter 01) is what you author: voice, who you serve, decisions, processes. It is canonical and small. The Wiki is what you take in: the market report you read, the competitor you researched, the call transcript, the brain dump. It is external, and it grows without limit.

You need both, kept apart. Pour every article you read into decisions.md and the canonical truth drowns in raw research. The Wiki is the release valve: unlimited source material compiles into linked notes, while the Codex stays the clean, authored core. The two link to each other, so reading more makes the whole system smarter, and neither layer contaminates the other.

The method comes from Andrej Karpathy: keep your raw sources exactly as they came in, and let the model write a set of linked notes on top. The links do the work a search system would otherwise do. The whole thing fits in one Claude session, so there is no database and no special retrieval setup. It is plain text files that get better the more you feed them.


How to build it

Build it in three short sessions. Folders and the rulebook first, since both commands read the rulebook as ground truth before they touch a note. Then /kb-ingest and your first three sources, to prove the loop on real material. Then /kb-lint to keep it honest as it grows. About an hour each. The model does the compiling; your job is to drop good sources and read what comes out before you trust it.


The structure (folders plus the rulebook)

The two layers

knowledge-base/
├── _SCHEMA.md          # the rulebook both commands read first
├── raw/                # untouched sources: articles, transcripts, reports, brain dumps
│   ├── 2026-06-10_market-report.md
│   └── 2026-06-09_competitor-call.md
└── wiki/               # the notes Claude writes and owns
    ├── summary/        # one note per source, with a link back to the raw file
    ├── entity/         # a company, person, product, or competitor that keeps coming up
    ├── concept/        # an idea, pattern, or objection worth naming
    ├── index.md        # a catalog of every note, one line each
    └── log.md          # a running list of everything pulled in

The line that makes this safe. Everything in raw/ is frozen: once a source lands, no tool edits it. Everything in wiki/ belongs to the model: the compile step writes it freely. And everything above knowledge-base/ (your Codex, your work, anything canonical) is off limits to these commands. That hard boundary is what lets the Wiki grow underneath your real work without ever putting it at risk.

The rulebook (_SCHEMA.md)

The rulebook is the one file both commands read before doing anything. It names the note types, the frontmatter each note needs (frontmatter is the handful of label lines at the very top of a file, between the --- marks), the link format, and the rules for the index and log. You change the rules here, never inside the command prompts.

# Knowledge Base Schema

## Note types in wiki/
- summary/<slug>.md : one note per source. What it says, key claims, link to raw/<file>.
- entity/<slug>.md  : a company, person, product, or competitor that recurs.
- concept/<slug>.md : an idea, pattern, or objection.
- index.md : catalog of every note, one line each, grouped by type. Under 200 lines.
- log.md   : running record of every ingest and audit.

## Frontmatter (required on every wiki note)
---
title: <human title>
type: summary | entity | concept
sources: [raw/<file>, ...]   # what this note draws from
updated: <YYYY-MM-DD>        # stamped, never invented
reviewed: false              # only while awaiting your read; delete once read
---

## Rules
- One note = one subject.
- Links use [[type/slug]]. A link to a note that doesn't exist yet is a to-do, not an error.
- index.md stays under 200 lines. Over the limit, detail moves down into notes.
- No dated-snapshot notes like entity/foo-2026-05.md. Update in place.
- summary/ notes must link to the raw/ file they came from.

The two commands

Two commands do the work. /kb-ingest reads a source and writes notes. /kb-lint checks the result. (Lint means an automated read-through that flags problems and never fixes them without asking.)

Command What it does Boundary
/kb-ingest <source> Lands the source in raw/, compiles it into summary, entity, and concept notes, and updates the links, index, and log. It is additive: it appends and revises, never overwrites. Writes only inside knowledge-base/.
/kb-lint Read-only check. Reports notes nothing links to, contradictions, stale claims, broken links, an over-long index, and missing sections. Proposes fixes, writes nothing without approval. Reads everything, edits nothing on its own.

To build them, ask Claude:

  1. “Write a /kb-ingest command. It takes a source (a file, a URL, or pasted text), copies it untouched into raw/, reads _SCHEMA.md and wiki/index.md, then writes summary, entity, and concept notes that follow the schema. It checks the index first so it appends instead of overwriting, stamps reviewed: false on anything new or changed, updates index.md and log.md, and never writes above knowledge-base/.”
  2. “Write a /kb-lint command. Read-only. It reads the whole wiki, then reports notes nothing links to, contradictions, stale claims, broken links, an index over 200 lines, and the outstanding reviewed: false list. It proposes fixes for me to approve and writes nothing on its own.”

The review flag: visibility without a gate

Ingest writes the wiki without asking, but you still need to see what is new. The trick is one line of frontmatter, not an approval step.

  • /kb-ingest stamps reviewed: false on every note it creates or meaningfully changes, and adds a 🆕 mark to that note’s line in index.md.
  • You read the new note, then tell Claude to mark it reviewed. That deletes the reviewed line and strips the 🆕.
  • No flag means reviewed. Old notes need no backfill.
  • /kb-lint lists what is still waiting and flags any note whose flag and index mark disagree.

This is the difference between the Wiki and the Vault (chapter 03). The Wiki trusts the model to write and asks you only to read. The Vault does not let the model touch canonical strategy until you tick a box. Match the gate to the stakes: research notes are cheap to fix, strategy decisions are not.


Pitfalls (the “if X, then Y” guide)

Situation What to do
You’re not sure if something is a summary, entity, or concept One source = one summary. A thing that recurs across sources (a competitor, a person) = entity. An idea or pattern = concept. When unsure, write the summary first; the rest falls out of it.
index.md is creeping past 200 lines That is the signal to push detail down into notes. The index is a list of one-line hooks, not a place for content. Let /kb-lint flag it.
You want to “fix” a raw source you dropped in Don’t. raw/ is frozen. If the source was wrong, drop a corrected one as a new file and let the wiki reconcile. The trail matters more than tidiness.
Two notes now contradict each other Leave both until /kb-lint surfaces it, then resolve on purpose. A contradiction between sources is information: it tells you where the truth is still moving.
You’re tempted to point /kb-ingest at your Codex to “enrich” it Never. The boundary is the whole point. If a source implies a change to canonical strategy, that is a job for the Vault’s confirm gate (chapter 03), not the wiki compiler.
The wiki feels like busywork after 3 sources Keep going to about 10. The payoff only shows once the same entities recur across sources and the links thicken. Below that it looks like filing; above it, it starts answering questions you didn’t ask.

Maya’s version

Maya runs an online store, a small service business, and a content channel. She does not code. Here is what the Wiki does for her.

She drops three things into raw/: a supplier research doc she pulled together, a competitor’s website saved as a page, and a handful of articles she had bookmarked. She runs /kb-ingest on each and reads what comes back.

Claude writes her a summary note for each source, an entity note for the competitor and for each supplier that keeps coming up, and a concept note for a pattern she keeps hitting (a shipping-cost objection her customers raise). Every note links to the others. The competitor note links to the article that mentioned them; the shipping-cost note links to the customer emails where it came up.

The point: Maya never wrote a research document. She dropped in raw sources and got back a linked set of notes she can navigate by clicking. The tenth source is where it pays off. By then the same suppliers and the same objections recur across sources, and each new source thickens the notes she already has instead of just adding one more. A fresh Claude session can answer “what do we know about this supplier?” by reading the index and following links, with nothing else loaded.


You’ve got it when

The Wiki earns its keep around the tenth source, not the third. Keep feeding it.


The skills that help here

/kb-ingest (pull a source into your knowledge base and compile it) and /kb-lint (audit the result read-only and propose fixes) are both in the starter kit and listed in ../03-habits/01-skills-and-commands.md.


→ Next: 03-the-vault.md. Add a light governance layer on top of Memory: tiers, an append-only decision log, and a confirm gate where the AI proposes and you approve.