Workspace wiki: project memory for humans and AI agents
TOOL

Workspace wiki: project memory for humans and AI agents

43 projects, over 800 articles, one convention. The wiki lives as Markdown in every repo, a CLI makes it searchable, an audit keeps it honest, and AI agents are required to use it, not just allowed to.

August 2026

Project

Workspace wiki: project memory for humans and AI agents

Technologies Used

Node.jsNext.jsMarkdownVector Searchtransformers.jsRAGClaude CodeDeveloper Tooling

Challenge

It didn't start with a problem, it started with having fun. I began building reference projects: for every area I work in, one project that shows how I think it should be done, with all the decisions you otherwise make from scratch every time. Half out of curiosity, half with an ulterior motive, because when working with agents I wanted to draw on these best practices instead of explaining everything from the beginning each time.

That worked. But with every new project certain patterns kept repeating, and at some point every feature and every piece of tooling raised the same question: which project is actually the real reference for this? The auth setup from one, the deploy from another, the test structure from a third. The reference existed, it just wasn't findable.

Then there was scale. My workspace has grown to over 40 projects: apps, web services, tools, experiments. Since I started working AI-natively, new ones appear faster, and the work spreads across many Claude Code sessions. Every session starts from zero. The agent knows neither the project nor last week's decisions, so it searches the code, builds up a picture, and discards it as soon as the context window ends. Next time, from scratch.

The usual answers don't scale. A CLAUDE.md per project is good for rules but too small for architecture: it grows long, goes stale, and gets loaded in full in every session. README files describe how things looked back then. And the actual knowledge, why something is built the way it is, what wire format a message has, which env variable the deploy needs, lived in chat histories nobody can find again.

The tipping point was Andrej Karpathy's “LLM wiki” idea: instead of searching over raw data anew for every question, the model maintains a persistent wiki of Markdown that grows with every source and every question, with three operations, ingest, query, and lint. The human curates and asks, the model handles summarizing, linking, and filing. That was exactly what my reference projects were missing: they turned into a wiki system where not only the best practices but every single project is documented, in a format agents can read and keep writing. For me, ingest is the create-wiki skill, query is wiki ask, and lint became the drift audit against the code.

Then there's the drift problem: documentation maintained by hand eventually lies. A path gets renamed, a function disappears, the article stays put. Annoying for a human reader, fatal for an agent, because it takes the text at face value and builds on top of it.

So four requirements were set:

  • The knowledge lives with the code: in the repo, versioned, as Markdown, without a database and without a build step
  • Agents can query it in seconds, semantically too, without a running service and without any content going to a cloud
  • False statements get caught mechanically before they are committed
  • Writing is not optional: agents read the wiki before searching the code, and maintain it before they finish

Solution

The result is a system of three parts that read the same files: one convention per project, a CLI, and a web frontend. None of it is exotic, the impact comes from consistency.

A convention instead of a database

Every project has a .wiki/ folder in the repo root: a wiki.config.md with project name, categories, and tech stack, an articles/<category>/<slug>.md tree, and a nutshell.md as a fact sheet with a one-liner, status, stack including versions, size in files and lines of code, and deployment target. One topic per file, frontmatter mandatory: title, category, tags, status, related for cross-references, and code_refs for the places in the code the article describes. The rule sounds trivial, but it's the reason 43 projects are readable with the same CLI. German prose, English identifiers, Mermaid for architecture diagrams.

File technologies once, don't reconcile them across projects

The answer to the reference question is a dedicated area above the projects: one Markdown file per technology or pattern, currently 76 of them, from Docker and Coolify through JWT auth, CryptoKit, and Jetpack Compose to MLX and agent loops. Every file has the same structure: in a nutshell, version-specific quirks, learnings and gotchas, best practices and patterns, a pattern library with code, and the sources, meaning the project articles the knowledge comes from. It gets extracted from all project wikis together instead of me comparing it project by project. A solution that worked well once lives exactly there, and an agent setting up a new project reaches for it instead of checking five repos to see which one is the real reference. The technology files run as pseudo-articles in the same vector index, so wiki vsearch and wiki ask find them just like project articles, and the frontend gives them their own tab.

One CLI as the shared entry point

wiki is a Node script with no dependencies worth mentioning, symlinked into ~/.local/bin, and the way agents read the wiki. wiki ls shows the projects, wiki cat <project>/<category>/<slug> an article, wiki search matches substrings, wiki stack --tag nextjs answers “where do I use X”. Which projects are mounted lives in exactly one registry file shared by the CLI and the frontend; wiki reindex and wiki doctor keep manifest and registry consistent. The tooling writes wiki files in only one place: two scaffold scripts detect tech stack and project size from manifests and imports and generate the nutshell and stack list from them.

Semantic search, fully local

Substring search fails as soon as someone searches for “push updates” and the article is called “SSE + pg_notify”. So wiki vbuild splits every article into paragraph chunks of around 1,500 characters, prepends the article title to each chunk as a context anchor, and embeds it with a multilingual E5 model via transformers.js, on the CPU, no API. The index is a JSONL file in the cache, currently around 5,000 chunks. wiki vsearch embeds the question, computes cosine similarity over all vectors, and deduplicates at the article level so the hit list shows eight different articles instead of the same one eight times. German and English work mixed, and the build detects on its own whether articles have changed since the last run.

wiki ask: RAG without infrastructure

wiki ask puts a Q&A bot on top of the vector search: the top 15 hits plus all nutshells as context, then a claude -p subprocess over the existing Claude Code login. No API key, no hosting. The system prompt separates the truth cleanly: for “which projects use X”, versions, and deploy targets the nutshells are authoritative, snippets only for “how does Y work”. Every statement cites exactly one article as [project/category/slug], and the answer stays deliberately short, because you're meant to go deeper at the source. An NDJSON mode streams the same pipeline into the web frontend.

Drift audit: docs checked against the code

The part that matters most to me. wiki audit runs over all articles and verifies every claim that can be checked mechanically: code_refs and related in the frontmatter, file:line references in the text, paths in backticks, and called symbols like obj.method(...), which must exist in the source tree or in a stdlib allowlist. Paths are resolved in three stages (exact, suffix, unique basename), multi-repo projects get multiple source roots. A negation heuristic prevents false alarms: if the symbol is preceded by “no”, “planned”, or “formerly”, the reference to something non-existent is correct. What the audit deliberately does not check: signatures, behavior, and numbers in prose, that takes a semantic review. Across the whole workspace it currently verifies over 11,000 references in around twelve seconds, deterministically, without network access, with exit code 1 on errors. That makes it fit for a pre-commit check.

A frontend for reading

For humans there's a Next.js frontend that reads the .wiki/ folders straight from the filesystem: project overview in platform buckets (app, web, tool), rendered articles with status badge, related list, and code references, a technologies tab across all projects, and an ask widget on ⌘K that streams wiki ask. New articles show up on refresh, no build.

Implementation

A wiki nobody reads is dead weight, and a wiki nobody maintains becomes a trap. So usage is built into the rules every agent gets in every session, on three levels.

Global: the wiki first, then the code

My global CLAUDE.md describes the wiki CLI with all its commands. Anyone needing cross-project context or architecture background searches there first: vsearch for fuzzy terms, search for known identifiers, ask for questions spanning multiple projects. The commands are pre-allowed in the project settings, so no permission prompt gets in the way and reaching for the wiki is cheaper than reaching for the code.

Per project: reading and writing as part of the feature workflow

Every project's CLAUDE.md contains the same rule block. The wiki is the primary knowledge source: for every question about features or architecture, index and articles are read first, before searching the code. After every feature implementation the agent checks which articles are affected and updates them, including the updated date, before reporting the work as done. New features get an article, removed ones move to _archive/. And the hardest rule: the wiki documents only existing code. Planned features belong in a planning area, not in articles, because otherwise an agent can no longer tell the difference between “is” and “is supposed to become”.

Automated: skills, hooks, and the release flow

A /create-wiki skill sets up the complete wiki for a project. It starts a master agent at maximum analysis depth that fans out parallel explore agents across the code and only writes articles once the referenced code has actually been read. My scaffolding skill for new projects initializes the wiki from the first commit, together with release notes and a /wrap command. This /wrap flow closes out every version: evaluate the git log, determine the version, write release notes, and, as its own step, the wiki maintenance, meaning an article for every new feature, an update for every changed one, regenerate the index, wiki audit before the commit. A PostToolUse hook additionally reminds when articles are newer than the index. Release notes answer “what changed”, the wiki “how does it work”, and that separation is spelled out explicitly in the rules.

Code Examples

Results

Today the system covers my entire workspace:

  • 43 projects and over 800 articles in the same format, from an iOS game to a web service, all readable through one CLI
  • 76 technology files with best practices, gotchas, and a pattern library, extracted across projects so every solution is filed exactly once
  • Semantic search over around 5,000 chunks, locally on the CPU, German and English mixed, without a single byte leaving the machine
  • Drift audit over more than 11,000 code references in around twelve seconds; most projects sit at zero errors, and where drift occurs, the audit names the article, path, and reason
  • A Q&A bot with citations, no API key and no server, over the existing Claude Code login
  • A web frontend that renders the Markdown files without a build step
  • Mandatory wiki use on three levels: global rules, project rules, and automated skills, hooks, and release flow

The tangible effect shows in the sessions. An agent that starts with wiki vsearch has the picture after one minute that used to take ten minutes of reading code, and it's the same picture I have. Lost decisions have become rarer because their place is fixed. And because agents must write before they finish, the wiki grows with the code instead of trailing behind it.

The question about the real reference has resolved itself. Solutions that work well get filed in the wiki and reused in the next project, no matter which repo they originally came from. With every project, efficiency grew noticeably, because less gets built from scratch and more gets pulled from the existing stock.

The takeaway: documentation for AI agents needs different properties than documentation for humans. It has to be machine-findable, it has to be mechanically verifiable, and it has to be mandatory. A convention of Markdown and frontmatter, a CLI, and an audit are enough for that. What matters is not the tool but that it sits at every point of the workflow: at project start, in every session, in every release.

The system is tailored to my workspace and not released as a package. But the ideas behind it, convention instead of a database, local vector search, a drift audit against the code, and mandatory wiki use in the workflow, can be rebuilt in any team setup.

Insights

Terminal with the wiki CLI: project overview, semantic search, and drift audit

Project list, semantic search with scores, and the audit with verified references: the three commands an agent session begins and ends with.