Pair with a coding agent for a few weeks and a pile of tiny rules builds up. Colours in components must come from design tokens. A data hook exposes two similar booleans, and only one of them means a request is really in flight. A bug fix should not wander into neighbouring code. Commits need a particular message layout.
Individually these are trivial. Collectively they are expensive: forget any one of them and the agent repeats the error, and a reviewer has to catch it again. They need a home the agent consults before it acts.
The home described here is an Obsidian vault — markdown files the agent reads directly — maintained by a small toolkit of seven slash commands and a pair of hooks. One principle decided how much of that maintenance could run without supervision, so it comes first; commands, hooks and retrieval follow.
Skills are for procedures, not facts
The rules originally went into skills, and that was the mistake. A skill describes a routine: do this, then that, and here is how to tell the job is finished. A rule about design tokens is no routine; a dozen routines depend on it. Stored in one skill, it is invisible to the others. Duplicated across several, it diverges as soon as one copy is revised. Supplementary files of caveats made things worse, since the caveats began pointing at each other and no single file could be trusted as current.
Two needs drove the move to a shared store. Tool independence came first: identical knowledge whether the agent runs in plain chat, Cursor or Claude Code, with no dependence on any of them staying in use. Related rules also had to live next to one another and link to one another, because a convention is hard to apply correctly when its neighbours sit in some other document.
Today the rules are markdown notes in one folder, and skills simply reference them. Fixing a rule means editing one file; every connected tool picks up the new wording the next time it looks.
Rules before and after the move
Supervision follows visibility
Nearly all upkeep in the vault happens with no one watching. A maintenance run opens its own branch, works there and merges when done, with nobody checking in. A single operation always pauses for a human decision.
What sets that operation apart is not the scale of damage it could cause. The question asked of every step was simpler: if this goes wrong, will the problem still be apparent later? For most steps the answer is yes. A misdirected link looks misdirected. A page with almost nothing on it looks unfinished. Contradicting notes, kept together under a flag, remain flagged. A note built from an external source points back at it. A session record just sits there, unused by anything. None of this needs a supervisor, because every failure mode leaves evidence.
Promotion is the exception — lifting something out of a session record into a long-lived note. A bad promotion leaves no evidence at all. It becomes impossible to tell apart from a rule the team really agreed on, which is why it alone requires sign-off.
The unattended steps obey three hard constraints, enforced in the command definitions themselves: when notes conflict, both claims are preserved; a topic without a source is labelled as missing rather than filled in; originals are read-only.
Unattended vs. reviewed
Housekeeping therefore costs no attention, and human time goes only where interpretation is involved.
The command set, grouped by purpose
At first glance the seven commands look unrelated. Grouped by purpose they make more sense: three pairs, where each pair tackles opposite ends of one problem, plus one standalone command that produces something for a human to read.
Commands grouped by job
Carrying context between sessions
Closing a session calls /compress, usually via a hook rather than by hand. It writes a record covering finished work, loose ends, any corrections the agent received and anything it met for the first time, and it updates the project's memory file while it is at it. Opening the next session, /catchup does the reverse: it loads the loose ends from that record plus the memory file, and the agent resumes without being re-briefed.
Each half needs the other. Records that never get read back help no one; a catch-up with no record behind it has nothing to load. Run in sequence, every session feeds the one after it.
More valuable than the session records are two cumulative files updated alongside them and never rewritten. One registers mistakes: what the agent produced, what it should have produced, and which category of error that was. The other registers first encounters. No amount of planning could have filled either file up front, and that is exactly what makes them the richest part of the vault.
Two representative entries. Over-reach: a request to fix a single bug came back with nearby code tidied as well; the unrequested edits were undone, and the register gained a rule to keep changes within the requested scope, however tempting the surrounding code. Under-verification: the agent called a deployment finished because its process was alive; readiness now means the health check and the site's root URL both answer. Both were corrected once and have stayed corrected.
Tagging each entry by type turns a pile of anecdotes into a signal: a type that keeps collecting entries is telling the vault that a note is missing.
The checkpoint: /digest
Session records are unfiltered. They carry a date, they are written as a session ends, and they include every false start alongside the few findings that deserve a longer life — a pattern that came up again, a convention the team finally agreed on, a decision that should not be reopened. Whether the vault grows more useful over time depends almost entirely on how well those findings get extracted.
/digest scans records nobody has processed yet and drafts proposals for the long-lived notes: extend an existing page here, create a new page there because several sessions point at the same topic. Then it stops. Proposals sit untouched until a person approves or rejects each one.
Models are unreliable at extraction, and their errors here are costly. Without the conversation around it, a session record is easy to misinterpret. A hack used once can look like standard practice; a decision overturned later can look current; a limitation of one project can look universal. Promote any of those and the agent keeps retrieving it for months, with nothing about it looking suspicious. Missing knowledge is cheap by comparison and easy to notice, so a few minutes spent reviewing each batch pays for itself.
Review is also the one occasion on which somebody actually looks at what the vault believes. All other jobs finish without anyone looking; this one puts the agent's conclusions about team practice in front of a human, who can reject them. Without those rejections, the vault would slowly become a portrait of the team painted by the agent.
Upkeep, intake and boundaries
Two sources of decay
Two kinds of damage accumulate. The first develops within the vault itself:
- Isolated notes with no incoming links.
- Links aimed at pages that do not exist.
- Statements that conflict with other statements or no longer hold.
- References to pages nobody created.
- Pages too sparse to answer anything.
/lint-obsidian looks for all of these without being prompted, fixes them and logs what it changed. The second kind comes from outside: one note modified on two computers before they synchronised. /vault-resolve-conflict handles it by walking through the files one at a time, asking for confirmation on each and leaving the final commit to a person.
The asymmetry is deliberate. Structural decay follows rules and can be checked mechanically. Choosing between two versions of something a human wrote is a question of intent, which is why that command waits for a human while the linter does not.
The linter's most important habit concerns empty pages: it flags them rather than filling them. Invented filler would look authoritative and hide the fact that nobody knows the answer yet, whereas a flagged gap keeps asking to be closed.
Bringing knowledge in
Additions start in one of two ways: somebody provides material, or somebody spots a hole. For the first case, /ingest takes the provided text (a blog post, a code snippet, a meeting transcript) and yields a summary, a line in the index and edits to every related note. For the second, /learn identifies weak coverage, looks the topic up and fills it in without supervision. Frequent entries in one category of the mistake register are a typical reason to run it.
Originals and notes never mix. Originals are stored separately, never altered, and serve as the evidence any note can point to. Notes are the processed layer, and only they reach the agent. That separation is what makes a note trustworthy: its claim can always be checked against an unmodified original.
One ingested article usually changes about twelve notes, mostly through new links between existing pages. People almost never make those edits by hand, and their absence is precisely how a wiki slides out of date. That tedious cross-linking is the most convincing argument for letting an agent do the maintenance.
Where each command may write
Because four commands modify the same folder, each definition states what it must not touch. Laid side by side, their scopes chain into a single flow:
/compress— reads the live conversation, produces a session record, never edits a long-lived note./digest— reads records not yet reviewed, produces long-lived notes, and only for proposals a person approved./lint-obsidian— reads and repairs long-lived notes, leaves session records and originals alone./ingest— reads an original without changing it, produces notes, ignores session records.
Write scope per command
Each prohibition exists because its absence once caused a bug. The linter used to inspect session records as though they were curated pages, then report them for missing metadata and links that records are not supposed to have. And /digest used to mark records as done the moment it had drafted proposals, so any proposal still awaiting a decision was lost for good. Implicit conventions about folder layout had prevented neither problem; one explicit sentence per command did.
Hooks, not reminders
Commands that rely on memory get used enthusiastically at first and rarely afterwards. The two jobs here most prone to being forgotten — saving a long session before it ends and reviewing accumulated records — both come due when attention is on something else. Hooks take care of both.
Clocks play no part in either hook. Scheduled jobs were rejected: a closed or sleeping laptop skips them without a trace, and an invisible failure is harder to live with than no scheduled job at all. Each hook instead responds to a condition that really took place.
At start-up: the review prompt
On start-up, a hook counts records still lacking a review mark. If there are more than a few, it prompts for the review then and there, while the reviewer still remembers those sessions. Processed status is explicit: /digest writes a marker into each record's frontmatter, so any record without the marker is pending. The state lives with the records, so restarts lose nothing and anyone opening a record can see whether it has been reviewed.
Mid-session: automatic saving
The other hook tracks session length on two axes, number of exchanges and wall-clock minutes. When both limits are exceeded, a background process nudges the model into running /compress. Firing resets both counters, so an immediate second trigger cannot happen.
The hook is asynchronous for a reason. A blocking stop-hook risks an endless back-and-forth, with the agent repeatedly resuming and being halted again. The asynchronous form runs off to the side, never pauses the agent, and rouses the model on one agreed exit code only — so the loop is impossible by design, not merely prevented.
Counting exchanges involves a shortcut. No exchange count is passed to the hook — only where the transcript file lives, and that file grows by a line per event. Line count approximates exchange count, loosely, since verbose exchanges add more lines. An off-by-one save is the largest possible consequence, which is perfectly acceptable.
Both hooks were exercised with piped input before being trusted with a real session:
States checked before first real use
- No accumulated activity at all.
- Activity below both limits, so nothing fires.
- Both limits crossed, so the hook fires.
- A rerun straight after firing, which has to stay silent — the check that separates a working hook from an endless loop.
What sets each hook off
Notice which hook is fully automatic: the one that only produces a session record, something nothing consumes yet. The one whose path ends in long-lived notes hands the decision to a person.
Claude Code and Cursor each have their own implementation of both hooks, following the same logic. Limits are configurable, because a multi-hour restructuring job and a quick bug fix deserve different values.
Reading the vault: agent and human
Having knowledge on disk is not enough: the handful of relevant paragraphs has to land in the model's context when needed, and pasting the whole vault in is not viable. Two retrieval routes exist.
Route one is an index file. It names every note, adds a line about each one's contents, and the agent opens it first. Choosing notes by title works well as long as the question shares vocabulary with the title; when it doesn't, the right note is easy to miss.
The second route is semantic search: an MCP server holds embeddings of every passage and offers two operations, one returning matching passages and one returning an entire named note. Every passage is scored for similarity to the query; only top results above a minimum score come back, each tagged with its note, and if nothing reaches the minimum the result is empty. Context therefore receives a few passages rather than a folder.
What limits passage search is granularity, not accuracy. It answers narrow rule questions well — "where may a component take its colours from?" — and handles requests for a whole document badly. Ask it to recap last month's navigation redesign and it returns several disconnected snippets of the same record. Whole-note retrieval and the index exist for that kind of request.
Index lookup vs. passage search
A typical convention lookup, recorded below, involves one search, a few passages and a reference to where they came from. Only a tiny fraction of the vault entered context, and the answer was still correct.
Obsidian is the viewer for people and matters least to the system, even though it is what people ask about first. Notes are plain .md files with a metadata header; the agent opens them like any other file. Deleting the app would break nothing: no custom format is involved, nothing needs converting, and any text-capable tool has full access.
For humans, though, the app adds a lot. Backlinks show every note that relies on a given convention. The graph view turns structural problems into something visible — an island of notes cut off from the rest stands out immediately, while a directory listing would never reveal it — so it doubles as a quick health check. Freshly written notes can also be read in the app the moment they appear.
What is still unsolved
The setup was also audited against what others have published about wikis that agents curate. Most recommendations were already covered, and the few real omissions it found have since been implemented and are included in the description above. Four limitations remain.
Retrieval mode is picked by phrasing. Choosing between full-note retrieval and passage search happens implicitly, driven only by how a query is worded.
Linter findings are anonymous. Results do not record which rule triggered them, so it is hard to tell a rule that is too strict from a part of the vault that really is messy.
Concurrent multi-author editing is unsupported. Conflict resolution targets one person syncing several machines. Genuine real-time co-editing would call for CRDT-based replication, which lies outside this design by choice.
Permissions do not exist. A plain folder has no way to express who may see which note. Knowledge with a restricted readership belongs in a platform with access control.
A fifth gap concerns behaviour rather than code: nothing prompts anyone to reread the vault. Recording and repair run by themselves end to end; rereading happens only when someone thinks of it.
Takeaways
- Decide what needs supervision by asking whether errors would stay visible, not how severe they could be. Visible failures can be left to automation; the step whose failures look like decisions always gets a human.
- Tie automation to events such as a long session or a growing backlog, not to a schedule. Event-driven hooks keep firing months later; timed jobs get skipped and eventually switched off.
- Put procedures in skills and facts in notes, with each fact stored once and read by every procedure that needs it.
Maintenance is affordable only because the agent edits many notes per run without waiting for approval; accuracy survives only because one step does wait. Drop the checkpoint and the vault fills with confident claims nobody made; add checkpoints everywhere and nobody keeps up with them, so the notes fall behind within weeks.