llm-wiki
AGENTS.md383 starsChanged 5 months agoMITView on GitHub
This file is the schema for Codex CLI and any other coding agent that reads AGENTS.md instead of CLAUDE.md (OpenCode, Gemini CLI, etc.). The workflows are identical to CLAUDE.md — only the language is agent-agnostic. Different agents write their transcripts to different locations. The adapter registry in llmwiki/adapters/ abstracts this away. The CLI auto-detects which adapter(s) to run. Override with --adapter <name>. Run from inside the repo: Or use the one-click scripts: ./sync.sh, ./build.sh, ./serve.sh (macOS/Linux); sync.bat, build.bat, serve.bat (Windows).
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llmwiki-ingestSkill
- llmwiki-querySkill
- llmwiki-syncSkill
- project-maintainerSkill
- self-learnSkill
- wiki-allSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 0 are common, 3 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 44
Run from inside the repo:
- Very specific: line 59
Read the source file(s) under raw/.
- Very specific: line 60
Read wiki/index.md and wiki/overview.md for current wiki context.
- Very specific: line 62
Update wiki/index.md — add the new source under ## Sources.
- Very specific: line 63
Update wiki/overview.md if the source adds substantial new information.
- Very specific: line 64
Create/update wiki/entities/<Name>.md for any people, companies, projects, tools, or libraries mentioned.
- Very specific: line 65
Create/update wiki/concepts/<Name>.md for any ideas or patterns discussed.
- Very specific: line 74
Read wiki/index.md and wiki/overview.md.
- Distinctive: line 75
Read the pages most relevant to the question.
- Very specific: line 77
If the answer is substantial, ask if it should be saved to wiki/syntheses/<slug>.md.
- Very specific: line 198
Every entity page should declare entity_type in frontmatter:
- Distinctive: line 210
No silent overwrites. Record contradictions, don't hide them.
- Very specific: line 213
Do not ingest raw .jsonl files directly — only ingest the markdown under raw/.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
llmwiki — Codex CLI / Agent Schema
This file is the schema for Codex CLI and any other coding agent that reads AGENTS.md instead of CLAUDE.md (OpenCode, Gemini CLI, etc.). The workflows are identical to CLAUDE.md — only the language is agent-agnostic.
Three layers
raw/ IMMUTABLE. Session transcripts converted from the agent's session store.
Never modify files here.
wiki/ LLM-maintained. Pages you write that summarise and cross-reference raw/.
index.md Catalog of every page. Update on every ingest.
log.md Append-only chronological record (auto-archives at 50KB).
overview.md Living synthesis.
hints.md Writing conventions and entity naming rules (load on demand).
hot.md Last 10 session summaries — global hot cache.
hot/<project>.md Per-project hot caches (default ON, configurable).
MEMORY.md Cross-session facts (200-line cap, auto-consolidated).
SOUL.md Wiki identity and writing voice.
CRITICAL_FACTS.md Must-know facts (<120 tokens).
sources/ One page per raw source.
entities/ People, companies, projects, products.
concepts/ Ideas, frameworks, methods.
syntheses/ Saved query answers.
site/ GENERATED. Static HTML from `python3 -m llmwiki build`. Do not edit.Session stores by agent
Different agents write their transcripts to different locations. The adapter registry in llmwiki/adapters/ abstracts this away.
| Agent | Session store | Adapter |
| Claude Code | ~/.claude/projects/<project>/<uuid>.jsonl | claude_code.py |
| Codex CLI | ~/.codex/sessions/ | codex_cli.py (stub in v0.1) |
| Gemini CLI | ~/.gemini/ (TBD) | gemini_cli.py (planned) |
| OpenCode | ~/.opencode/ (TBD) | opencode.py (planned) |
The CLI auto-detects which adapter(s) to run. Override with --adapter <name>.
Commands
Run from inside the repo:
python3 -m llmwiki sync # convert new .jsonl → raw/sessions/*.md
python3 -m llmwiki build # compile site/ from raw/ + wiki/
python3 -m llmwiki serve # local HTTP server on 127.0.0.1:8765
python3 -m llmwiki init # scaffold raw/, wiki/, site/ directoriesOr use the one-click scripts: ./sync.sh, ./build.sh, ./serve.sh (macOS/Linux); sync.bat, build.bat, serve.bat (Windows).
Ingest Workflow
Triggered when the user says "ingest this", "sync the wiki", or runs /wiki-sync:
- Read the source file(s) under
raw/. - Read
wiki/index.mdandwiki/overview.mdfor current wiki context. - For each source, write
wiki/sources/<slug>.mdusing the Source Page Format below. - Update
wiki/index.md— add the new source under## Sources. - Update
wiki/overview.mdif the source adds substantial new information. - Create/update
wiki/entities/<Name>.mdfor any people, companies, projects, tools, or libraries mentioned. - Create/update
wiki/concepts/<Name>.mdfor any ideas or patterns discussed. - Cross-link everything with
[[wikilinks]]under## Connections. - Flag contradictions under
## Contradictions— keep both claims visible. - Append to
wiki/log.md:## [YYYY-MM-DD] ingest | <title>
Query Workflow
Triggered by /wiki-query <question>:
- Read
wiki/index.mdandwiki/overview.md. - Read the pages most relevant to the question.
- Synthesise an answer with
[[wikilink]]citations. - If the answer is substantial, ask if it should be saved to
wiki/syntheses/<slug>.md. - Append to
wiki/log.md:## [YYYY-MM-DD] query | <question>.
Lint Workflow
Triggered by /wiki-lint:
Check for:
- Orphans — pages with no inbound
[[links]]. - Broken wikilinks — pointing to non-existent pages.
- Contradictions — conflicting claims across pages.
- Stale pages —
last_updatedolder than the most recent contributing source. - Missing entity pages — entities mentioned in 3+ sources but no dedicated page.
- Data gaps — questions the wiki can't answer.
Output a report. Offer to save it to wiki/lint-report.md.
Page formats
Source page (wiki/sources/<slug>.md)
---
title: "Source Title"
type: source
tags: []
date: YYYY-MM-DD
source_file: raw/sessions/<project>/<file>.md
project: <project-slug>
---
## Summary
2–4 sentences.
## Key Claims
- Claim 1
- Claim 2
## Key Quotes
> "Quote" — context
## Connections
- [[Entity]] — how they relate
- [[Concept]] — how it connectsEntity / Concept page
---
title: "Name"
type: entity # or: concept
tags: []
sources: [slug-1, slug-2]
last_updated: YYYY-MM-DD
---
# Name
One paragraph.
## Key Facts
- Fact 1
## Sessions
- [[session-slug]] (YYYY-MM-DD) — what happened
## Connections
- [[Other]]Index
# Wiki Index
## Overview
- [Overview](overview.md)
## Sources
- [Title](sources/slug.md) — one-line summary
## Entities
- [Name](entities/Name.md) — one-line description
## Concepts
- [Name](concepts/Name.md) — one-line description
## Syntheses
- [Title](syntheses/slug.md) — the question it answersLog
## [YYYY-MM-DD] <operation> | <title>
<optional one-line notes>Parse recent entries with: grep "^## \[" wiki/log.md | tail -10
Naming conventions
- Source slugs:
kebab-case - Entity / concept pages:
TitleCase.md - Synthesis pages:
kebab-case.md
Cross-project wiki access
Other projects can reference this wiki by adding to their agent config:
wiki_path: ~/Desktop/2026/production-draft/llm-wikiThen read wiki/index.md first, navigate from there.
Entity types
Every entity page should declare entity_type in frontmatter:
person | org | tool | concept | api | library | project
Confidence & lifecycle
confidence: 0.85— 4-factor score (source count, quality, recency, cross-refs)lifecycle: draft— one of: draft, reviewed, verified, stale, archived
Hard rules
raw/is immutable. Never edit files there.- No silent overwrites. Record contradictions, don't hide them.
- Cross-link everything — every page has a
## Connectionssection. - Frontmatter is authoritative. Always populate
title,type,tags,sources,last_updated,confidence,lifecycle,entity_type. - Do not ingest raw
.jsonlfiles directly — only ingest the markdown underraw/.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

