A second brain your agent compiles.

Give your coding agent a wiki it maintains: current answers, linked to original sources, with repeated notes merged away.

For Claude Code, Codex, Cursor and Grok Bot.

raw to wiki to outputThe agent leaves original sources in raw, maintains linked answers in wiki, and builds finished work in output. AGENTS.md governs the maintained wiki. raw/original sourcesoutput/finished workAGENTS.mdStable IDsSource linksRefactor the answer. Keep the trail.wiki/current answers
You keep the sources. Your agent rewrites the wiki. You read the result.

Try it in a fresh folder.

The free starter includes the folder template, minimal agent rules, page template, Python checker and generic ingest + prune routines.

Use a local agent with file access. The checker needs Python 3.10+ and uses only the standard library.

Download starter ZIPFree ZIP. Direct download.

Give your agent this instruction:

fetch https://lab.anonyfox.com/compiled-wiki/AGENTS.md and set up a compiled wiki in this folder

Merge these rules with your existing instructions before working in a populated folder. The fetched rules are the short entry point; the ZIP also contains the checker and prompts.

Read the starter AGENTS.md

A smaller wiki.
The sources stay.

Lantern seed-swap. A fictional project with 20 source notes.

I started with two notes for each topic. Each note repeated the source text and added a claim about hundreds of visitors. The source notes supported no such forecast. I ran the five routines in order and removed the forecast during the rewrite. Pruning kept one page per topic and left a redirect at each retired ID.

The 20 raw source notes are unchanged. The final checker run reports zero errors. Source support was reviewed separately from citation presence.

Actual checker results, before and after the five routines
MeasureBeforeAfter
Active pages4121
Words2113487
Broken links400
Orphan pages390
Unsourced claim lines1600
Duplicate topics200

Active pages exclude redirects. The after wiki also keeps 20 redirects, so 41 Markdown files remain. Words include headings, link paths and redirect bodies. Unsourced claims counts prose lines missing a valid inline citation; duplicate topics counts matching normalized titles.

Give the agent rules that survive the next session.

Refactor, don’t append.

When a new source changes an answer, rewrite its existing page and remove the repeated explanation.

The page limit is 650 body words. Split by the question a reader wants answered.

Keep the identity.

Keep W-0001 when its title changes, and preserve its ID as a redirect or tombstone when you merge it.

One fact belongs in one current page; the other pages link there.

Keep the source.

Link every factual paragraph to its raw evidence, then read that evidence before you use the claim.

Raw files stay untouched.

A maintenance loop you can repeat.

Each prompt includes inputs, steps, stop conditions and a report. Run the checker before and after. The report records pages, words, links, orphans and unsourced claims.

Stop on missing sources, conflicting evidence or ambiguous IDs. Resolve the affected change before continuing.

  1. Ingest

    A bounded batch of raw files

    Find the existing topic owner. Attach sources, propose new pages and surface conflicts.

  2. Write

    The approved ingest plan

    Rewrite the current answer. Cite each claim and remove repeated explanations.

  3. Link

    Changed page IDs and the index

    Repair targets. Connect useful next steps and bring orphan pages back into reach.

  4. Review

    Pages you are about to rely on

    Read claims against sources. Run the checker and record what remains unresolved.

  5. Prune

    A reviewed merge or removal plan

    Merge overlap into the keeper. Repair inbound links and preserve retired IDs.

Compiled wiki kit v1.0

Keep the whole operating loop beside your notes.

raw/ · wiki/ · output/
Folder READMEs, inbox, index and front-matter page template.
AGENTS.md · CLAUDE.md · .cursor/rules/
Shared rules, Claude pointer and Cursor rule. Grok Bot reads the shared contract with its routine text.
routines/ · .claude/commands/
Ingest, write, link, review and prune. Each in a generic prompt, Claude Code slash command and Grok Bot routine with a suggested schedule.
tools/wiki_lint.py
Python standard-library checker for links, orphans, duplicate titles, sources, IDs and citation presence. Includes tests.
guide/
“The compiled wiki, run by your agent.” Ten pages in A4 and US Letter.
example/
Twenty fictional source notes, before and after snapshots, five routine logs, source hashes, replay script and a finished briefing.
Compiled wiki kit with raw, wiki and output folders, governed by AGENTS.md

€19

One-time payment.

Buy the full kit · €19

Files by email within 24 hours.

Use in your own and client projects. Do not resell or redistribute the kit.

No VAT is charged under § 19 UStG (German small business regulation).

For a folder you want to keep using.

You can keep reading in Obsidian and let your agent maintain the same Markdown folder.

Bring your own agent and model access. Start with one project you need to write about again. Give the agent a few sources, run ingest and read the report. The kit supplies the prompts and rules for that loop. For Grok Bot, you configure the runner and file access before using the suggested schedules.

Before you hand over the folder.

Do I need to move my existing notes?

Start in a fresh folder with a small source batch. Keep the originals in raw/ and let the agent propose current wiki pages. For an existing vault, merge the rules first and work on a backed-up copy. You choose what enters the wiki.

Will the agent delete my original sources?

The rules prohibit editing or deleting raw/. Each maintenance run records source hashes and checks them afterwards. Merges keep the retired wiki ID as a redirect or tombstone. Inspect the diff before accepting the run.

Can the checker catch invented claims?

It checks source paths and whether prose lines have inline citations. It cannot decide whether the evidence supports the sentence. The review routine reads source and claim together and reports contradictions or unsupported claims.

Can I keep using Obsidian?

Yes. Topic files are named after their stable IDs, so [[W-0001]] opens W-0001.md in Obsidian. The index stays index.md. Your agent needs local file access; Obsidian can remain the view you read. Notion import and sync are not included.

How do I run the routines in my agent?

Claude Code gets slash-command files. Codex and other file-based agents use AGENTS.md and the generic prompts. Cursor gets a rule file pointing to the shared contract. Grok Bot gets routine text with suggested schedules. You configure its file access and runner.

What does the free starter leave out?

It includes generic ingest and prune, the folder template, minimal rules and the same checker. The full kit adds write, link and review, all five routines in three flavours, the agent entry-point files, the ten-page guide and the worked example with logs.

How often should I run maintenance?

Ingest a bounded batch when evidence arrives. Write and link the affected pages. Review before using the wiki for a decision, then review and prune weekly if there is overlap to fix. Read each report before continuing.

How do I receive the paid kit?

Pay €19 once. The kit ZIP and the guide in A4 and US Letter arrive at your checkout email address within 24 hours. Stripe sends the receipt separately. You can use and adapt the files for your own and client projects; the kit itself may not be resold or redistributed.

Let the next session start from the current answer.

Try the starter on one topic. Add the full routines and worked example when you want the complete maintenance loop.