agentleFS
xgbtxyxgbtxy/ap/AGENTS.md

ap

AGENTS.md2 starsChanged 13 days agoMITView on GitHub

Before proposing, adding, or modifying anything in this repository, read docs/HANDBOOK.md / docs/HANDBOOK.zh-CN.md, CONTRIBUTING.md / CONTRIBUTING.zh-CN.md, and **.github/PULL_REQUEST_TEMPLATE.md**.

  • Installs packages
  • 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,266 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 repository8 other files it gives its agents.

The file

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

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before proposing, adding, or modifying anything in this repository, read docs/HANDBOOK.md / docs/HANDBOOK.zh-CN.md, CONTRIBUTING.md /

    line 3
  2. Very specific:

    Crate-Level Physical Isolation + Single Binary (ap): All 7 crates (crates/ap-*) maintain zero sibling ap-* dependencies …

    line 12

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

agent-primitives Repository Operating Rules (v2.48+ Pure-Rust Edition)

Before proposing, adding, or modifying anything in this repository, read docs/HANDBOOK.md / docs/HANDBOOK.zh-CN.md, CONTRIBUTING.md / CONTRIBUTING.zh-CN.md, and .github/PULL_REQUEST_TEMPLATE.md.

Core Philosophy (4-Source Recursive Self-Improvement)

  1. Observe Real Coding-Agent Runs & Survey Mature OSS First: Ground every upgrade in (a) external community pain points & proven open-source mechanisms (Aider, RTK, SWE-agent, ripgrep, ast-grep, oh-my-pi, Tree-sitter, SQLite FTS5, Chromium CDP) and (b) actual process friction across agent execution logs (ap audit --maintainer zero-PII numeric brief across OpenCode, Codex, Pi, Claude Code, Antigravity, Qwen Code, Gemini CLI, Grok) — strictly anonymized mechanics only, zero private data or misuse.
  2. Synthesize Lean Pure-Rust Primitives (Never Reinvent Slop): Distill battle-tested mechanisms into zero-dependency Pure Rust rather than bloated wrappers or verbose prompt walls.
  3. Empirical Verification & Reviewer-First PR Delivery: Validate every improvement with synthetic tests AND realistic Before-vs-After practical measurements, keeping English (*.md) & Simplified Chinese (*.zh-CN.md) aligned, and documenting exact file :: symbol (lines) change maps in PRs matching .github/PULL_REQUEST_TEMPLATE.md.

Six Non-Negotiable Engineering Invariants

  1. Zero AI Slop: Zero pure-prompt checklists, zero Regex::new inside hot loops (OnceLock DFAs), zero swallowed errors, 0 clippy -D warnings.
  2. Crate-Level Physical Isolation + Single Binary (ap): All 7 crates (crates/ap-*) maintain zero sibling ap-* dependencies (test_crate_physical_isolation_and_frontmatter_budget), linking into one native binary ap (ap.exe) exposing both Unix CLI and ap mcp stdio JSON-RPC.
  3. Zero External Runtime Prerequisite: Prebuilt binaries across Linux (musl + arm64), macOS (arm64 + x64), and Windows (x64 MSVC) via 1-line install.sh / install.ps1 / cargo install.
  4. Hard Context & Latency Budgets: SKILL.md frontmatter < 65 tokens per folder (390 tokens total); core AST/SQLite/Hook latency < 20 ms.
  5. Tools Enforce Rules, Not Prose: Recurring mistakes become deterministic .agents/guard.json rules, atlas product contract checks, or probe smoke steps.
  6. Empirical Truth & 1:1 Bilingual Parity: Validate with live controlled A/B runs (beginner, legacy, and empty-dir random projects) and keep English (*.md) & Simplified Chinese (*.zh-CN.md) synchronized.

Required Verification Before Every Commit

cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo run --release --bin ap -- doctor
cargo run --release --bin ap -- bench --out bench/results.json

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.