agentleFS
mduongvandinhmduongvandinh/llm-wiki/AGENTS.md

llm-wiki

AGENTS.md214 starsChanged 8 months agoMITView on GitHub

For: Cursor, Windsurf, Codex CLI, Aider, Continue.dev, and any agent that reads AGENTS.md Claude Code users: see CLAUDE.md and install the skill from skills/llm-wiki/ You are maintaining a personal knowledge base using the LLM Wiki pattern. The wiki builds itself: you read raw sources, write structured wiki pages, maintain cross-references, detect contradictions, and keep everything up to date. The human only reads the wiki and asks questions. When the user asks you to run the wiki, follow these workflows. Use…

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. manychambered-biome812/llm-wiki★ 0100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • 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 35,337 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 repository2 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

28 rules. About 0 are common, 11 are distinctive, and 17 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 17

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    raw/ is immutable: Never edit, delete, or move files in raw/.

    line 21
  2. Very specific:

    Cross-reference everything: Use [[filename]] links. Every page needs at least 2 links to other pages.

    line 24
  3. Distinctive:

    Keep INDEX.md current: Create/delete a wiki page → update INDEX.md immediately.

    line 25
  4. Very specific:

    Log all activity: Every action gets an entry in wiki/LOG.md.

    line 26
  5. Distinctive:

    When the user asks you to run the wiki, follow these workflows.

    line 30
  6. Very specific:

    Read config.yaml to understand topics, feeds, and settings

    line 34
  7. Distinctive:

    Run discover: search for new sources based on topics/gaps

    line 35
  8. Very specific:

    Run ingest: process all new files in raw/

    line 36
  9. Distinctive:

    Run lint: health check the wiki

    line 37
  10. Very specific:

    Read config.yaml and AGENTS.md (this file) for schema and rules

    line 42
  11. Very specific:

    Read .discoveries/history.json → get list of already-processed files

    line 43
  12. Distinctive:

    Never fabricate information — only write what's in the raw sources

    line 57
  13. Distinctive:

    If new info contradicts existing → keep both, note the contradiction explicitly

    line 59
  14. Very specific:

    Always cite sources: Source: filename

    line 60
  15. Very specific:

    Read wiki/INDEX.md → find relevant pages

    line 64
  16. Distinctive:

    Read those wiki pages (read enough context, not just 1-2 pages)

    line 65
  17. Very specific:

    If the answer has analytical value → save to wiki/syntheses/ or outputs/

    line 67
  18. Distinctive:

    If wiki lacks info → say so and suggest what to discover

    line 72
  19. Very specific:

    Read all files in wiki/

    line 77
  20. Very specific:

    Read config.yaml → topics, feeds, discovery settings

    line 92
  21. Very specific:

    Read .discoveries/gaps.json → knowledge gaps to fill

    line 93
  22. Very specific:

    Read .discoveries/history.json → avoid re-processing

    line 94
  23. Distinctive:

    Search web for sources based on topics + gaps

    line 95
  24. Very specific:

    Never re-fetch URLs already in history.json

    line 112
  25. Very specific:

    If config.yaml has book_mode: true:

    line 228
  26. Very specific:

    Check each raw file for chapter: N frontmatter

    line 229
  27. Distinctive:

    When re-ingesting a known source, compare new content to existing wiki page

    line 235
  28. Very specific:

    If significant change detected → create wiki/changes/YYYY-MM-DD-entity.md

    line 236

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

LLM Wiki — Agent Instructions

For: Cursor, Windsurf, Codex CLI, Aider, Continue.dev, and any agent that reads AGENTS.md Claude Code users: see CLAUDE.md and install the skill from skills/llm-wiki/

You are maintaining a personal knowledge base using the LLM Wiki pattern. The wiki builds itself: you read raw sources, write structured wiki pages, maintain cross-references, detect contradictions, and keep everything up to date. The human only reads the wiki and asks questions.

3-Layer Architecture

raw/        → Raw sources (IMMUTABLE — you READ ONLY, NEVER modify)
wiki/       → Wiki you write and maintain entirely
outputs/    → Query results, reports, battlecards, briefs
config.yaml → Topics, feeds, schedule

Golden Rules

  1. raw/ is immutable. Never edit, delete, or move files in raw/. It is the source of truth.
  2. You own wiki/ entirely. The human does not manually edit wiki pages.
  3. One file per topic. Each entity, concept, and source summary is a separate .md file. Filename: kebab-case.
  4. Cross-reference everything. Use [[filename]] links. Every page needs at least 2 links to other pages.
  5. Keep INDEX.md current. Create/delete a wiki page → update INDEX.md immediately.
  6. Log all activity. Every action gets an entry in wiki/LOG.md.

How to Run Each Workflow

When the user asks you to run the wiki, follow these workflows. Use natural language descriptions of what you're doing — you don't have a slash command, just execute the steps directly.

Run full cycle (discover → ingest → lint)

  1. Read config.yaml to understand topics, feeds, and settings
  2. Run discover: search for new sources based on topics/gaps
  3. Run ingest: process all new files in raw/
  4. Run lint: health check the wiki
  5. Report summary

Ingest

  1. Read config.yaml and AGENTS.md (this file) for schema and rules
  2. Read .discoveries/history.json → get list of already-processed files
  3. Scan raw/ → find files not in history
  4. For each new file: a. Read full content b. Create source summary → wiki/sources/ c. Extract entities → create/update wiki/entities/ d. Extract concepts → create/update wiki/concepts/ e. Add [[cross-references]] to related pages f. Flag contradictions with existing content
  5. Update wiki/INDEX.md
  6. Append to wiki/LOG.md
  7. Update .discoveries/history.json

Rules:

  • Never fabricate information — only write what's in the raw sources
  • One source typically creates 5–15 wiki pages
  • If new info contradicts existing → keep both, note the contradiction explicitly
  • Always cite sources: [Source: filename](../raw/path)

Query

  1. Read wiki/INDEX.md → find relevant pages
  2. Read those wiki pages (read enough context, not just 1-2 pages)
  3. Synthesize answer with citations [[wiki-page]]
  4. If the answer has analytical value → save to wiki/syntheses/ or outputs/
  5. Append to wiki/LOG.md

Rules:

  • Answer ONLY from wiki content, not from external knowledge
  • If wiki lacks info → say so and suggest what to discover
  • Comparisons, analyses → automatically save as synthesis pages

Lint

  1. Read all files in wiki/
  2. Check for:
    • Contradictions: conflicting claims between pages
    • Orphans: pages nobody links to
    • Missing pages: [[links]] pointing to non-existent files
    • Stale claims: old info contradicted by newer sources
    • Broken links: links to raw sources that no longer exist
    • Gaps: important areas with no coverage
    • Quality: pages too short, missing sources, missing cross-refs
  3. Save report → outputs/lint-YYYY-MM-DD.md
  4. Update .discoveries/gaps.json
  5. Append to wiki/LOG.md

Discover

  1. Read config.yaml → topics, feeds, discovery settings
  2. Read .discoveries/gaps.json → knowledge gaps to fill
  3. Read .discoveries/history.json → avoid re-processing
  4. Search web for sources based on topics + gaps
  5. Fetch content → save to raw/articles/YYYY-MM-DD-slug.md with frontmatter:
    ---
    title: "Title"
    url: "https://..."
    discovered: YYYY-MM-DD
    topic: "topic name"
    ---
  6. Update .discoveries/history.json
  7. Trigger ingest on new sources

Rules:

  • Max sources per cycle: see config.yaml → schedule.run.max_sources
  • Priority: gaps > pain points > trending > feeds
  • Skip: ads, low-quality listicles, duplicates
  • Never re-fetch URLs already in history.json

Wiki Page Formats

Entity (wiki/entities/)

---
type: entity
category: person | organization | tool | project
created: YYYY-MM-DD
updated: YYYY-MM-DD
sources: [list of raw source files]
---

# Entity Name

One-line description.

## Overview
[Details]

## Key Points
- [Bullet points]

## Links
- [[related-concept]]
- [[related-entity]]

## Sources
- [Source 1](../raw/articles/filename.md)

Concept (wiki/concepts/)

---
type: concept
domain: ai | engineering | business | ...
created: YYYY-MM-DD
updated: YYYY-MM-DD
sources: []
---

# Concept Name

One-line description.

## Definition
[Clear explanation]

## How It Works
[Technical details if applicable]

## Examples
[Concrete examples]

## Links
- [[related-concept]]

## Sources
- [Source 1](../raw/articles/filename.md)

Source Summary (wiki/sources/)

---
type: source
format: article | paper | note | video | podcast
raw_path: raw/articles/filename.md
ingested: YYYY-MM-DD
---

# Source Title

## Summary
[2-3 paragraph summary]

## Key Takeaways
- [Most important points]

## Entities Mentioned
- [[entity-1]]

## Concepts Mentioned
- [[concept-1]]

## Notable Quotes
> "Important quote from the source"

Synthesis (wiki/syntheses/)

---
type: synthesis
topic: analysis topic
created: YYYY-MM-DD
sources_count: N
---

# Analysis Title

## Question
[The question or purpose of this analysis]

## Analysis
[Synthesized content from multiple sources]

## Conclusion
[Summary of findings]

## Sources Used
- [[source-1]]
- [[source-2]]

Variant-Specific Instructions

If config.yaml has book_mode: true:

  • Check each raw file for chapter: N frontmatter
  • Skip files where N > config.current_chapter (spoiler protection)
  • Log: [SKIP] filename — chapter N exceeds current_chapter M
  • Extract: characters, locations, factions, events, quotes, themes

If config.yaml has change_detection: true:

  • When re-ingesting a known source, compare new content to existing wiki page
  • If significant change detected → create wiki/changes/YYYY-MM-DD-entity.md
  • Mark changed entity page with ⚡ CHANGED: [description]
  • Log with [CHANGE DETECTED] tag

Special Commands (natural language equivalents)

book-summary — Generate structured summary of the book wiki:

  • Cast of characters table (name, role, faction, status)
  • Timeline of key events (up to current_chapter)
  • Major factions and their goals
  • Key locations
  • Major themes
  • Unresolved mysteries / open questions
  • Notable quotes
  • Save to outputs/book-summary-YYYY-MM-DD.md

competitive-brief "Name" — Generate battlecard for a competitor:

  • One-line positioning
  • Pricing table (tiers, prices, limits)
  • Top features list
  • Recent moves (last 30 days)
  • Known weaknesses (from reviews/Reddit)
  • Job postings signal (roadmap inference)
  • How we differ
  • Save to outputs/battlecard-name-YYYY-MM-DD.md

interview-prep "Company" — Generate interview prep 1-pager:

  • Company overview (stage, size, business model)
  • Tech stack
  • Engineering culture signals
  • Recent news
  • Interview process (from Glassdoor/Reddit)
  • Known interview questions
  • Compensation range (from levels.fyi/Reddit)
  • Green flags / red flags
  • Questions to ask them
  • Save to outputs/interview-prep-company-YYYY-MM-DD.md

Error Handling

  • WebFetch/WebSearch fails → log error in LOG.md, skip that source, continue
  • Unreadable raw file (binary, corrupted) → skip, log
  • Wiki too large for context → read INDEX.md first, then only relevant pages
  • Missing config.yaml field → use defaults from this file

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.