// case-study.md

LLM-Friendly Wiki for an Enterprise WMS
A Karpathy-inspired Obsidian vault for human + AI context

A hand-maintained Obsidian wiki documenting a large enterprise WMS — built so that both a human engineer and an LLM coding agent can land on the same page and immediately know what file maps to what doc, what depends on what, what was decided, and when it was last verified. Inspired by Andrej Karpathy’s repeated point that the most useful artifact you can give an LLM is a high-quality, frontmatter-tagged wiki of your own code.

client Confidential · logistics operator under NDA
last touched
role Author / Maintainer
period 2026 — Present
status Hand-maintained · in active use
format Obsidian-compatible Markdown vault
Obsidian Markdown YAML frontmatter LLM-friendly Claude Code context Karpathy guidelines
// receipts · tl;dr
top-level folders
~20
frontmatter fields
7
source repos covered
2
human + agent readable
// outcome · what changed
BEFORE

Notes scattered across repo READMEs, Slack threads, and engineer heads.

AFTER

Single Markdown vault next to the source tree, every page YAML-front-mattered.

BEFORE

LLMs (Claude / Cursor / Cline) got a chaotic context window every session.

AFTER

Per-folder _INDEX.md gives agents a stable shape they can navigate without flailing.

BEFORE

Documentation drift hid behind file mtimes; nobody knew which pages were stale.

AFTER

Frontmatter verified: field marks freshness; a future script can flag stale pages by interval.

What it is

A separate Markdown vault that sits next to the WMS source tree (aai-wms-api / aaiwms). Every page has YAML frontmatter that names the source paths it documents (aai-wms-api/app/Http/Controllers, aaiwms/pages), the database connection it touches, related wiki pages, a tag list, and a last_verified date. When a Claude Code or other AI agent opens a session on the repo, the agent’s CLAUDE.md points it at the wiki and tells it: edit a controller, update the matching wiki page in the same turn, bump the timestamp.

Structure: ~20 top-level folders (Architecture, Backend, Database, Decisions, Examples, Frontend, Integrations, Modules, Modules-v2, Rules, Runbooks, Tags, Tutorials, Workflows, plus Glossary, STYLE, Paths-and-Patterns, TechDebt). Every folder has an _INDEX.md that lists its pages so a single grep gives you the catalog without reading the full tree.

The bottleneck

The WMS is a real codebase — 251 Eloquent models, 103 controllers, 315 migrations on the API; 130 Vue pages on the web admin; 13 feature modules in the Flutter app. A human onboarding to a single module takes days, and an LLM agent asked to make a non-trivial change burns most of its context window just locating the right files. Specific pain:

The ask: a single artifact, hand-maintained, that both humans and LLM agents can read, with enough structure that an agent can navigate it deterministically (frontmatter + _INDEX.md per folder) and enough discipline that pages stay current (every edit to source triggers a wiki update in the same commit).

How I broke it down

What I built

Vault structure shipped:

Example: the frontmatter shape every page follows — this is what makes the vault LLM-readable:

~/WMS Obsidian Memory/Backend/Controllers/ReceivingController.md
---
title: ReceivingController · inbound API
domain: backend.controllers
source_paths:
  - aai-wms-api/app/Http/Controllers/ReceivingController.php
  - aai-wms-api/app/Services/ReceivingService.php
  - aai-wms-api/routes/api.php
db_connection: mysql
related:
  - Backend/Models/AppReceiving.md
  - Workflows/inbound-receiving-flow.md
  - Integrations/sap-to-wms-bridge.md
  - Decisions/2026-02-12_serial-grouping-strategy.md
tags: [controller, receiving, sap-integration, api]
last_verified: 2026-05-09
---

# ReceivingController · inbound API

## Purpose
Owns the inbound-shipment endpoint surface — accepts SAP-bridged documents,
validates against the master item / location tables, stages serials …
Obsidian graph + folder tree mock showing the LLM wiki structure — frontmatter-tagged pages, cross-links between Controllers / Models / Workflows / Decisions, _INDEX.md per folder, last_verified stamps.
MOCKVault overview · folder tree on the left (Architecture, Backend, Database, Decisions, Modules, Workflows…), an open page showing the YAML frontmatter contract, and a graph fragment showing wiki cross-links. Source file paths anonymized.

Tech

Results

top-level folders
~20
frontmatter fields
7
source repos covered
2
human + agent readable

Agent sessions that previously burned half their context window locating the right file now read the relevant _INDEX.md + page frontmatter and land on the right spot in seconds. New human team members start with the 00-SYSTEM-OVERVIEW.md and a path through Tutorials/ instead of guided tours. Architectural decisions survive past Slack-thread amnesia; runbook procedures don’t need to be reconstructed during incidents.

This case study is itself the philosophy — the wiki is the proof of work, not a metric on a chart.

What I’d do again — and differently

Worked well:

Would tighten: