agent-knowledge-hub
AGENTS.md0 starsChanged 6 months agoMITView on GitHub
A personal, agent-maintained knowledge monorepo. Holds any number of knowledge hubs, each a set of dense, code-grounded notes that coding agents read (to prime on a topic) and write (to capture durable findings). This file is the umbrella charter: how hubs are organized and isolated. Each hub has its own AGENTS.md with that hub's domain context and note rules. Canonical vocabulary for the whole system is in CONTEXT.md. Use those terms: the monorepo (this repo) vs a sub-hub (a child…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 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 repository6 other files it gives its agents.
- template/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- hub-doctorSkill
- hub-lintSkill
- load-contextSkill
- store-to-hubSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
If the user names a hub, use that.
- Very specific: line 14
If the working directory is inside a hub (hubs/<name>/), use that hub.
- Very specific: line 15
If there is only one hub in hubs/, use it as the default.
- Distinctive: line 16
If there are multiple hubs and no clear signal, ask which hub before doing anything.
- Distinctive: line 20
All content operations happen inside the active hub:
- Very specific: line 26
Never write one hub's content into another hub's directory.
- Distinctive: line 30
If asked to run something across all hubs (e.g.
- Distinctive: line 34
Read the hub's AGENTS.md first.
- Very specific: line 35
Read the hub's INDEX.md to find existing notes before creating a new one.
- Distinctive: line 47
If two charters could claim it, the charters themselves should declare which wins (each charter carries its own scope test and …
- Distinctive: line 76
Gather: Do the work. Capture provenance as you go (file:line, thread/ticket URLs, queries).
- Very specific: line 77
Capture: When a finding clears the bar (30+ minutes, reusable, non-obvious), /store-to-hub.
- Very specific: line 102
Read before writing. Check the hub's INDEX.md and related notes before creating a file.
- Distinctive: line 104
Verify before asserting. A grep hit is a lead, not an answer.
- Very specific: line 106
Every new or renamed note gets an INDEX.md entry in its hub.
- Very specific: line 107
Never store sensitive data (see CONTEXT.md): cite the pointer, never the payload.
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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
agent-knowledge-hub
A personal, agent-maintained knowledge monorepo. Holds any number of knowledge hubs, each a set of dense, code-grounded notes that coding agents read (to prime on a topic) and write (to capture durable findings). This file is the umbrella charter: how hubs are organized and isolated. Each hub has its own AGENTS.md with that hub's domain context and note rules.
Canonical vocabulary for the whole system is in CONTEXT.md. Use those terms: the monorepo (this repo) vs a sub-hub (a child under hubs/), note vs work, never a bare "hub" for a specific referent.
Hub Isolation
Hubs are isolated from each other. Every operation (read, store, lint, query) targets a single hub at a time.
Determining the Active Hub
- If the user names a hub, use that.
- If the working directory is inside a hub (
hubs/<name>/), use that hub. - If there is only one hub in
hubs/, use it as the default. - If there are multiple hubs and no clear signal, ask which hub before doing anything.
Path Rules
All content operations happen inside the active hub:
- Notes:
hubs/<active>/*.md - Project research:
hubs/<active>/works/<project>/ - Hub index:
hubs/<active>/INDEX.md - Hub charter:
hubs/<active>/AGENTS.md
Never write one hub's content into another hub's directory. Cross-hub references use a relative path (../<other-hub>/<note>.md), never a bare filename.
Multi-Hub Operations
If asked to run something across all hubs (e.g. "lint all hubs"), run sequentially, one hub at a time, and present results grouped by hub.
Working in a Hub
- Read the hub's
AGENTS.mdfirst. It has the domain context, note voice, and rules for that specific hub. - Read the hub's
INDEX.mdto find existing notes before creating a new one. - The umbrella owns shared machinery:
template/(new-hub starter),scripts/hub(CLI),scripts/checks/(bookkeeping checks). Hubs inherit these; they do not duplicate them.
Sub-hubs
The monorepo holds any number of sub-hubs; the set grows with the domains you work in. Each sub-hub's AGENTS.md charter declares its scope. This template ships one example sub-hub (hubs/example/); read it for the style, then clear it and create your own.
Routing (which sub-hub does a finding belong in)
Routing is charter-driven, not hardcoded:
- Match the finding against each sub-hub's charter (its scope declaration). File it in the hub whose charter claims it.
- If two charters could claim it, the charters themselves should declare which wins (each charter carries its own scope test and tie-breakers). Never split one topic across two hubs; one canonical note.
- If no charter fits, do not force it. Suggest creating a new sub-hub: propose a name and a one-line scope, then
./scripts/hub create <name>. A finding that has no home is a signal the hub set should grow. After creating a sub-hub, fill its charter's scope line and add it to the rootINDEX.md(the sub-hub catalog).
store-to-hub implements exactly this: classify against charters, route, or propose a new sub-hub.
Notes vs works
Two kinds of content, two lifecycles:
- A note is atomic, concept-oriented, and useful across projects. It lives at a sub-hub root and is findable via
INDEX.md. (Evergreen-note style.) - A work (
works/<slug>/) is a goal-bound project: a linear story across numbered files, plus status. Routed to a sub-hub by the same charter matching as notes.
When an investigation done inside a work is reusable beyond that project, promote it to a note (so it is findable) and link it from the work, rather than burying it in the project folder. The test: if future-you would search for it independent of the project, it is a note; otherwise it lives in the work. See CONTEXT.md.
Context sources (the full context layer)
This monorepo is one leg of a wider context layer. When working, pull from the right leg instead of re-deriving:
- Hubs (here): curated domain knowledge. Notes + works, retrieved via
/load-context(INDEX then TL;DR then body; never bulk-load). - Live sources (MCP, CLIs): external state that changes: telemetry, tickets, docs, chat. Authoritative for anything that changes outside this repo; a hub note caches a finding, the live source verifies it is still true.
- Harness capabilities: passive session memory (if you run one), skills, browser tools.
Rule of thumb: knowledge that compounds goes in a hub; state that changes stays behind live sources and gets cited, not copied wholesale.
Working in a session
A session runs in four phases:
- Prime.
/load-context <topic>pulls existing hub notes (one-liners + TL;DRs). - Gather. Do the work. Capture provenance as you go (file:line, thread/ticket URLs, queries). A note without cited sources is incomplete.
- Capture. When a finding clears the bar (30+ minutes, reusable, non-obvious),
/store-to-hub. Offer this proactively after a substantive investigation. - Maintain.
/hub-lintperiodically, and before trusting notes for important work. A weekly scheduled run ofscripts/hub-maintenance.shautomates the deterministic half.
CLI
./scripts/hub list # list all hubs with note counts
./scripts/hub create <name> # scaffold a new hub from template/Harness compatibility
This file (AGENTS.md) is the contract, and it is the open standard most coding agents read natively: Claude Code, Codex, Cursor, Copilot, Gemini CLI, Aider, and others (CLAUDE.md is a redirect). The skills (/load-context, /store-to-hub, /hub-lint) are Claude Code / Codex conveniences installed by ./install.sh; every operation underneath is harness-agnostic and any agent can run it directly:
node skills/load-context/bin/match.mjs "<topic>" --json # retrieve
node skills/store-to-hub/bin/classify.mjs "<topic>" --json # classify + dedup
scripts/checks/hub-lint.sh hubs/<name> # health gate
scripts/checks/append-log.sh <hub> <op> <note> "<why>" # log a writeSkills resolve the hub root from the HUB_ROOT env var (written by install.sh).
Rules
- Read before writing. Check the hub's
INDEX.mdand related notes before creating a file. Update an existing note instead of forking. - Cite code, do not paraphrase. Include file paths with line ranges; quote the relevant lines.
- Verify before asserting. A grep hit is a lead, not an answer. Open the file before claiming anything.
- Dense, opinionated, code-grounded prose. No filler.
- Every new or renamed note gets an
INDEX.mdentry in its hub. - Never store sensitive data (see
CONTEXT.md): cite the pointer, never the payload.
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.

