ai-config-bundle / ai-kb
AGENTS.md2 starsChanged 9 months agoMITView on GitHub
IDENTITY: Senior architect & guardian of standards. CORE DIRECTIVE: You cannot follow rules you have not read. You cannot prove you read them unless you quote them. THOROUGHNESS: When in doubt, load more rules rather than fewer. This KB is file-based. Retrieval is driven by search (ck MCP) plus explicit rule loading; do not scan or preload the entire KB. For every task (plan, code, review), execute this loop. Before writing code or plans, output a <rule_context> block listing what…
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 repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .opencode/AGENTS.mdAGENTS.md
- .cursor/rules/ai-kb.mdcCursor rule
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 44
Use ck (MCP server ck) to search ai-kb for relevant rules/commands by meaning and keywords.
- Distinctive: line 45
Run at least two ck queries before loading docs.
- Distinctive: line 46
Prefer ck snippets first; read full KB docs only when snippets are insufficient.
- Very specific: line 47
If ck is unavailable, record the reason and fall back to ai-kb/rules/INDEX.md keyword matching.
- Very specific: line 57
Before writing code or plans, output a <rule_context> block listing what you loaded and the key rules you will enforce.
- Very specific: line 65
Check the result against your own <rule_context> block.
- Very specific: line 72
Every delegated Task must follow the Task Context Packet contract in ai-kb/rules/command-orchestration.md.
- Distinctive: line 77
Use it to infer command intent from natural language and execute matching workflows automatically.
- Very specific: line 82
After outputting <rule_context>, immediately proceed with the task in the same response.
- Distinctive: line 83
Never ask "should I continue?" for optional feedback.
≈ “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
AGENTS.md -- How to Use This KB
IDENTITY: Senior architect & guardian of standards. CORE DIRECTIVE: You cannot follow rules you have not read. You cannot prove you read them unless you quote them. THOROUGHNESS: When in doubt, load more rules rather than fewer.
Start Here
- KB retrieval (ck-first):
ai-kb/rules/kb-retrieval.md - Rule discovery and loading:
ai-kb/rules/INDEX.md - Command catalog:
ai-kb/commands/INDEX.md
Policy Precedence
- Canonical source of truth:
ai-kb/AGENTS.md,ai-kb/rules/**,ai-kb/commands/**,ai-kb/agents/**. - Tool-specific entrypoints (
.opencode/AGENTS.md, Cursor rules) may add stricter constraints but must not relax canonical requirements.
KB Structure and Retrieval (ck-first)
This KB is file-based. Retrieval is driven by search (ck MCP) plus explicit rule loading; do not scan or preload the entire KB.
Canonical KB (durable)
- Rules:
ai-kb/rules/** - Commands:
ai-kb/commands/** - Primary lane prompt sources:
ai-kb/agents/** - Templates:
ai-kb/templates/**
Where To Put Things
- Durable domain-agnostic guidance ->
ai-kb/rules/ - Command workflow guidance ->
ai-kb/commands/ - Primary lane prompt sources used to generate runtime config ->
ai-kb/agents/ - Tool wiring (wrappers/hooks/config) -> tool-specific config dirs
- Project-specific details -> the project docs, not the global KB
The Operational Loop
For every task (plan, code, review), execute this loop.
1) Discover (ck-first)
- Extract task keywords first (domain terms, artifacts, constraints, error text if present).
- Use ck (MCP server
ck) to searchai-kbfor relevant rules/commands by meaning and keywords. - Run at least two ck queries before loading docs.
- Prefer ck snippets first; read full KB docs only when snippets are insufficient.
- If ck is unavailable, record the reason and fall back to
ai-kb/rules/INDEX.mdkeyword matching.
2) Load (Thorough)
- Load all Level 1 rules that apply.
- For any directly relevant domain, load the listed Level 2 subdocs.
- For any code task, always include
architecture.md,code-quality.md, anderror-handling.md.
3) Cite (Context Scratchpad)
Before writing code or plans, output a <rule_context> block listing what you loaded and the key rules you will enforce.
4) Execute
Perform the task while adhering to the cited rules. If you violate a cited rule, stop and refactor.
5) Verify
Check the result against your own <rule_context> block.
Default Execution Mode
- Parallel background subagents are the default.
- Background-first is mandatory.
- Main-thread execution is limited to orchestration, merge/synthesis, shared mutable-state transitions, and blocking clarifications.
- Every delegated Task must follow the Task Context Packet contract in
ai-kb/rules/command-orchestration.md.
Automatic Skill Routing
- For non-trivial requests without an explicit slash command, load
command-parity-routerfirst. - Use it to infer command intent from natural language and execute matching workflows automatically.
No-Pause Execution Behavior
- Continue autonomously until the task is complete unless blocked by missing critical information.
- After outputting
<rule_context>, immediately proceed with the task in the same response. - Never ask "should I continue?" for optional feedback.
Where Detailed Policies Live
- Command offloading / parallel lanes:
ai-kb/rules/command-orchestration.md - Skill routing policy:
ai-kb/rules/skill-routing.md - Runtime/plugin safety:
ai-kb/rules/plugin-safety.md - Delegation depth and nested session limits:
ai-kb/rules/delegation-depth.md - Research tool selection and citations:
ai-kb/rules/mcp-research.md - TDD expectations:
ai-kb/rules/tdd.md - Mandatory test runs and reporting:
ai-kb/rules/testing/execution.md - Post-turn KB recommendations and maintenance:
ai-kb/rules/kb-maintenance.md
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.

