LLM-wiki-tags: LLM-readable codebase docs with grep-friendly tags

m_pashka1 pts0 comments

GitHub - mpashka/llm-wiki-tags · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

mpashka

llm-wiki-tags

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>4 Commits<br>4 Commits

languages

languages

AGENTS.md

AGENTS.md

CLAUDE.md

CLAUDE.md

INSTRUCTIONS.md

INSTRUCTIONS.md

INSTRUCTIONS.ru.md

INSTRUCTIONS.ru.md

LICENSE

LICENSE

README.md

README.md

README.ru.md

README.ru.md

index.md

index.md

View all files

Repository files navigation

llm-wiki-tags

llm-wiki-tags IS THE SAME llm-wiki BY ANDREJ KARPATHY — WITH TAGS .

Languages: English · Русский — Agent instructions:<br>English · Русский

What it is

llm-wiki (original gist by Andrej Karpathy)<br>is the idea of keeping a codebase's documentation as an LLM-readable wiki:<br>every meaningful directory carries an index.md, pages<br>are small and single-purpose, links are bidirectional (parent ⇄ child), and one<br>page owns each detail. An agent navigates the tree top-down through index.md<br>files instead of blindly grepping.

llm-wiki-tags is exactly that, plus tags — nothing about llm-wiki<br>changes; tags are added on top.

What "+ tags" adds

A tag is a short kebab-case slug written as the token @tag:. The same<br>tag is placed both in code and in documentation , which creates an explicit<br>code ⇄ documentation link that does not depend on the directory tree. With<br>tags you can:

find code and docs by tag — one search returns every file (code or docs)<br>that carries a concept, even when they are scattered across the tree;

see which tags a piece of code has — read the tags at the top of a file or<br>directory to learn which cross-cutting concepts it participates in;

see which tags a document has — the same, for a doc page;

keep a single tag registry (docs/tags.md) describing what each tag means.

Tags complement index.md navigation (which follows the directory tree) with a<br>second, orthogonal axis: a concept that spans several folders is reachable in one<br>step.

Tag format

Slugs are lowercase kebab-case ([a-z0-9-]+); the same @tag: token is<br>placed in both code and docs.

Documentation (.md): in YAML front matter at the top of the file, a<br>tags field holding the space-separated tokens; for a directory, in that<br>directory's index.md. A tag that applies to just one section may instead sit<br>as a @tag: line in the body next to it.<br>tags: "@tag:payments @tag:retry"

Code : a comment in the language's syntax containing the token, placed above<br>the element. A tag can mark a package , a file , a class (or<br>equivalent) or a method/function . Per-language rules live in<br>languages/ — Java,<br>Python, Go.

Multiple tags : repeat the token, space-separated: @tag:ui @tag:mechanism.

Searching

" .

# which tags a given file has<br>grep -oE "@tag:[a-z0-9-]+" path/to/file

# every tag used in the repo<br>grep -rhoE "@tag:[a-z0-9-]+" . | sort -u"># every code + doc location that carries a tag<br>grep -rn "@tag:" .

# which tags a given file has<br>grep -oE "@tag:[a-z0-9-]+" path/to/file

# every tag used in the repo<br>grep -rhoE "@tag:[a-z0-9-]+" . | sort -u

Every tag is registered once in docs/tags.md with a one-line description.

The index.md rules

llm-wiki-tags keeps (and makes explicit) llm-wiki's documentation rules:

Every meaningful directory has an index.md giving a one-line<br>description of each file and each sub-directory in that folder.

Index files describe stable concepts, not changelogs. Prefer many small pages<br>over one large document; put local detail next to the code it describes.

Bidirectional navigation : parent indexes link to child pages; child pages<br>link back to the parent index and to related pages.

One page owns a detail ; other pages link to it — do not duplicate.

Read before you act : before a task, follow index.md files from the<br>nearest directory down to the code you will touch.

Update as you go : during or after the task, update the affected index.md<br>files (and tags) in the same change.

How to adopt it

Point your coding agent at the instruction page and ask it to install:

поставь...

tags wiki index code file directory

Related Articles