Today's feed had a cleaner split than most second-brain posts. @Gumli_AI, writing on 2 December 2026, put it like this: "I wrote almost none of the 1,200 notes in my second brain. Six weeks ago I started a new Obsidian vault. It now holds 300 wiki pages, 200 'today I learned' notes, 108 incident reviews, 78 runbooks and 38 architecture decisions. The LLM writes the vault. I write the rules." A couple of hours later, Jake Roper named the other half of that setup: "The most important AI tool we use isn't an AI tool. It's the notes app the AIs share. Everything Claude Code makes for us gets saved into one second brain. That's the only reason my other agents can read it."
Official Obsidian connectors now let Claude and ChatGPT read the same local notes folder, which is one reason agent-written vaults are common. The part I do not buy is the implication that writing the rules is the work. Writing RULES.md is not the same as enforcing it. If the model writes 1,200 notes and you only wrote the rules, you need a checker that fails the vault when an agent page has no source, when a secret or a customer's address lands in the wiki, when an incident review or a runbook skips a human field, or when a page contradicts a named rule.
On 30 November 2026, Maciej Sikora's NordLayer AI Scout report described a coding agent asked to read a GitLab token from a .env file. It loaded the whole file and leaked production passwords, an HR API token, and a BI client secret across ten sessions over three weeks. Later it also printed upstream AI provider API keys. It even said it had leaked secrets — after the fact. The project had instructions. The leak still happened. A rule you only wrote is a hope.
A paper submitted on 2 November 2026, WASP-Mem: Let Agent Organize Procedural Memory. Human Spend Effort on Diagnosis, argues for a simple division of labor: let the agent organize a wiki; spend human effort on diagnosis. One round of human diagnosis outperformed four rounds of agent self-judgment by 7.0–10.9 percentage points on TheAgentCompany, as stated in the abstract. I am not reproducing that benchmark. I am borrowing the split: this checker writes a queue, and a human does the diagnosis. It does not rewrite a wiki page.
So this post is a 703-line, stdlib-only Python script called rule_check.py. You point it at a Markdown vault with a human-written RULES.md at the root — frontmatter kind: rules and author: human, plus a fenced YAML block of checkable rules. The checker parses the structured rules, not the prose alone. check exits 1 if any finding is blocking. report writes a diagnosis queue and still exits 1 when the vault fails. Twenty-two tests pin that down, including that neither command edits a wiki page.
A rule you only wrote is a hope
The failure mode I keep seeing is a vault that looks governed because someone typed the policy into a document the model can read. The model can also ignore it or contradict it on the next page. A checker fails specific pages.
- A rules file has to exist at the vault root (
RULES.mdorrules.md). Missing that ismissing_rules. Wrong frontmatter, or no parseable YAML block, fails too. Prose alone is not a rule. -
require_source_on_agenttreats a page as agent-written whenauthor: agent, or when author is missing and the page is not the rules file. Those pages need asources:list or a Sources section with at least one link or path. Missing that ismissing_source. Human-authored pages do not need a citation just to exist. -
forbid_secretscans wiki pages — not the rules file — for obvious leak shapes: AWS-likeAKIA…keys,sk-/sk_live_/sk_test_style strings,api_key=assignments,bearertokens, PEM headers, and password assignments. Fixtures use only obviously fake values such aswhs_live_EXAMPLE_NOT_A_REAL_KEY. The finding issecret_leak. -
forbid_piilooks for a customer mailing address, a phone number, or payment-note phrasing. A public shop address on an hours page does not trip it; a client note withShip to:and a phone does. The finding ispii_leak. - Page-type contracts come from
type:or from the path. Anincident(or a file underincidents/) needsreviewed: true; otherwiseneeds_review. Arunbookneedsowner:andlast_drilled:asYYYY-MM-DD. Anadr(or a file underdecisions/) needsstatus:anddecider:. -
forbid_phraserules live inRULES.md, each with an id, a list of phrases, and an optionalapplies_if. The oxalic rule only runs on pages that mention "oxalic." The finding isrule_violation, and the message carries the rule id. -
check ./wikiexits 0 only when nothing is blocking.report ./wiki --out REVIEW.mdwrites the diagnosis queue outside the vault — it refuses to write inside the wiki — and still exits 1 if anything is blocking. Neither command rewrites a wiki page.
def _apply_rule(rule, wiki, findings): if rule.type == "require_source_on_agent": for page in wiki: if is_agent_page(page) and not page_sources(page): findings.append(Finding( "missing_source", page.rel, "agent page has no sources: list or Sources section", rule_id=rule.id, )) return if rule.type == "forbid_secret": for page in wiki: for label, ev in scan_secrets(page.text): findings.append(Finding( "secret_leak", page.rel, f"{label} found in a wiki page", evidence=ev, rule_id=rule.id, )) return if rule.type == "forbid_pii": for page in wiki: hits = scan_pii(page.text) # address/phone need client context if hits: findings.append(Finding( "pii_leak", page.rel, "customer address, phone, or payment note found in the wiki", evidence="; ".join(f"{k}: {v}" for k, v in hits), rule_id=rule.id, )) return if rule.type == "forbid_phrase": for page in wiki: if rule.applies_if and not page_mentions(page, rule.applies_if): continue for phrase in rule.phrases: m = re.search(re.escape(phrase), page.body, re.I) if m: findings.append(Finding( "rule_violation", page.rel, f"page contradicts rule {rule.id}", evidence=m.group(0), rule_id=rule.id, )) break return # plus incident reviewed:true, runbook owner+last_drilled, # ADR status+decider, and an optional unlabeled-type warning The comparison is deliberately boring. The script does not know what oxalic acid is for. It knows that oxalic-treatment.md mentions oxalic and contains "dribble with supers in place," and that connector-config.md contains an api_key= assignment. "6 Warehouse Row" on the hours page is a public shop address. "27 Wickbottle Lane" on a client follow-up is not. Only the second one matches.
The sample vault
The fixture in this post is made up: a fictional beekeeping-supply and extraction shop I called Wrenhouse Apiary Supply, in Ashland, Oregon. The owner and rule-writer is Ellis Ward. These pages are not a real policy, customer, or key. Credential-shaped strings in the messy vault are obvious fakes (EXAMPLE_NOT_A_REAL_KEY).
The clean version has a human-written RULES.md and seven compliant pages.
-
RULES.md— Ellis writes this file; agents may read it and may not edit it. No customer addresses, phones, or payment notes in the wiki. Oxalic dribble only after honey supers are off. Lot labels include harvest yard and date. Runbooks need an owner and a last-drilled date. ADRs need a status and a named decider. Incident reviews stay draft until a human setsreviewed: true. Agent pages must cite a source. The fenced YAML block is what the checker actually reads. -
oxalic-treatment.md— human-authored. Supers come off first. -
lot-labels.md— every jar and bucket getsYard name · YYYY-MM-DD. No customer name on the label, and none in the wiki. -
runbooks/extractor-startup.md— owner Ellis Ward, last drilled 8 November 2026. Low pulley first. -
decisions/stainless-uncappers.md— status accepted, decider Ellis Ward. The plastic uncapping tank cracked; the shop is moving to stainless. -
incidents/extractor-jam-2026-11-18.md— already reviewed. A bowed top bar and a wet load taken too fast. -
shop-hours.mdandshop-voice.md— public hours at the fictional address on Warehouse Row, and a short voice note. The hours page names the shop street on purpose. It should not fail a PII check.
check ./wiki on the clean vault exits 0:
wiki ./wiki · 8 pages · 1 rules · 1 incident · 1 runbook · 1 adr · 0 unlabeled 0 blocking · 0 warnings ok: rule check passed The messy version is the same shop after the kind of week the feed has been describing. The rules file is still there — that is the point. The agent still wrote an unsourced winter-stores page, pasted a fake API key into a connector note, and filed a "helpful" client follow-up with a fictional mailing address, phone number, and payment note. The oxalic page now says you can dribble with supers in place. The incident is still draft, the runbook is missing owner and last-drilled, the ADR has no status or decider, and a Saturday scratch note has no type:.
Running it on the messy vault
check ./wiki on that vault exits 1, with nine blocking findings and one warning:
wiki ./wiki · 12 pages · 1 rules · 1 incident · 1 runbook · 1 adr · 1 unlabeled 9 blocking · 1 warnings BLOCK missing_decider decisions/stainless-uncappers.md architecture decision is missing decider: BLOCK missing_drilled runbooks/extractor-startup.md runbook is missing last_drilled: (YYYY-MM-DD) BLOCK missing_owner runbooks/extractor-startup.md runbook is missing owner: BLOCK missing_source winter-stores.md agent page has no sources: list or Sources section BLOCK missing_status decisions/stainless-uncappers.md architecture decision is missing status: BLOCK needs_review incidents/extractor-jam-2026-11-18.md incident review is draft until a human sets reviewed: true BLOCK pii_leak client-mara-ellison.md customer address, phone, or payment note found in the wiki · customer mailing address: 27 Wickbottle Lane; customer phone: (541) 555-0194; payment note: card ending BLOCK rule_violation oxalic-treatment.md page contradicts rule oxalic_supers_off · dribble with supers in place BLOCK secret_leak connector-config.md api_key assignment found in a wiki page · api_key=whs_live_EXAMPLE_NOT_A_REAL_KEY WARN unlabeled_type saturday-scratch.md no type: in frontmatter and path does not imply one fail: rule check found blocking issues Four things I care about in that report.
The secret_leak on connector-config.md is the NordLayer shape in miniature. Ellis already wrote "do not put credentials in the wiki." The agent still pasted api_key=whs_live_EXAMPLE_NOT_A_REAL_KEY into a note so the next session could "just reconnect." The rules file did not stop it. The value is an obvious fake; the failure mode is not.
The pii_leak on client-mara-ellison.md is the same mistake, pointed at a person. The note is labeled fictional, and it still should not be in the wiki: a ship-to street, a phone, and a payment note. The hours page, which names the shop at 6 Warehouse Row, does not appear in the report.
The rule_violation on oxalic-treatment.md is why the phrases live in YAML, not only in prose. Ellis wrote that oxalic acid is dribbled only after honey supers are off. The agent page still says you can "dribble with supers in place." The finding names oxalic_supers_off.
The contract findings are the human fields. The incident is still draft, so needs_review. The runbook is missing owner: and last_drilled:. The ADR is missing status: and decider:. The checker will not flip reviewed: true for you. winter-stores.md failing missing_source is the quiet one: an agent page with no citation is how a vault fills up with statements nobody can rerun.
A diagnosis queue, then a human edit
report ./wiki --out REVIEW.md exits 1 on the messy vault, because the findings are still blocking, and writes a queue. It does not move a file, and it will not write that report inside the vault.
The queue lists each finding with the rule id and a suggested diagnosis: add sources; remove the key; delete the client note; correct the oxalic page; set reviewed: true only after a human reads the incident; fill in the runbook and ADR fields. That is as far as I would take the WASP-Mem split. The agent can keep organizing pages. The report is a place to spend a person's attention, not a claim that a lint queue is their benchmark.
After a human actually does that work, the reviewed fixture is the same shop with eleven pages and no leftover leak.
check ./wiki on that vault exits 0:
wiki ./wiki · 11 pages · 1 rules · 1 incident · 1 runbook · 1 adr · 0 unlabeled 0 blocking · 0 warnings ok: rule check passed Eleven pages and a clean check is not a smaller vault. It is a vault a person has actually looked at. The agent can still write the next procedure, as long as the next check is allowed to fail.
Put the rules where the team already writes
A script like this is only useful if the pages it watches are the pages people will actually correct. The source of truth for a team LLM wiki should be the workspace the team already edits, not a parallel dump an agent maintains in a private repo. If you are building an LLM wiki for more than one person, start with access and review, then connect a model. The same instinct shows up when you look at AI workspace permissions: once agents can read the notes, data access is no longer a side issue — it is how a pasted key or a customer phone number leaves the building. If you self-host an AI workspace, keep that knowledge layer where you can see it, and treat the model as a writer with a checker, not as the person who signs off.
I work on AFFiNE, which is knowledge base software and an AI knowledge base software option teams can run in the cloud or self-host. It is also an open source Notion alternative in the sense that the docs, whiteboards, and databases live in one workspace you can export. None of that replaces a rule check. It is the place you would keep one.
If you already have a Markdown vault, start with check. If it fails, read the diagnosis queue, then edit the pages yourself. The next session should inherit a rules file that actually holds, not 1,200 notes and a policy nobody enforced.





