agentleFS
iamironziamironz/ai-config-bundle/ai-kb/AGENTS.md

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 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 repository3 other files it gives its agents.

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
  1. Very specific:

    Use ck (MCP server ck) to search ai-kb for relevant rules/commands by meaning and keywords.

    line 44
  2. Distinctive:

    Run at least two ck queries before loading docs.

    line 45
  3. Distinctive:

    Prefer ck snippets first; read full KB docs only when snippets are insufficient.

    line 46
  4. Very specific:

    If ck is unavailable, record the reason and fall back to ai-kb/rules/INDEX.md keyword matching.

    line 47
  5. Very specific:

    Before writing code or plans, output a <rule_context> block listing what you loaded and the key rules you will enforce.

    line 57
  6. Very specific:

    Check the result against your own <rule_context> block.

    line 65
  7. Very specific:

    Every delegated Task must follow the Task Context Packet contract in ai-kb/rules/command-orchestration.md.

    line 72
  8. Distinctive:

    Use it to infer command intent from natural language and execute matching workflows automatically.

    line 77
  9. Very specific:

    After outputting <rule_context>, immediately proceed with the task in the same response.

    line 82
  10. Distinctive:

    Never ask "should I continue?" for optional feedback.

    line 83

≈ “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

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)

  1. Extract task keywords first (domain terms, artifacts, constraints, error text if present).
  2. Use ck (MCP server ck) to search ai-kb for relevant rules/commands by meaning and keywords.
  3. Run at least two ck queries before loading docs.
  4. Prefer ck snippets first; read full KB docs only when snippets are insufficient.
  5. If ck is unavailable, record the reason and fall back to ai-kb/rules/INDEX.md keyword matching.

2) Load (Thorough)

  1. Load all Level 1 rules that apply.
  2. For any directly relevant domain, load the listed Level 2 subdocs.
  3. For any code task, always include architecture.md, code-quality.md, and error-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-router first.
  • 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

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.