agentleFS
ro-agro-ag/ai/AGENTS.md

ai

AGENTS.md0 starsChanged 3 months agoMITView on GitHub

Shared rules for every AI coding tool on this machine (Codex, Cursor, Copilot, Antigravity, Trae, opencode, zcode/GLM). Claude Code reads CLAUDE.md, which mirrors these. Keep the two in sync. Rules promoted from the memento ledger. Details/fix: memento show <slug>. - In uv-managed projects use uv run / uv add only — never bare python or pip; stdlib-only scripts (e.g. memento.py) run with plain python3 (memento: uv-not-python) - Never ignore SonarQube gate findings — coverage, cognitive complexity, and code smells must…

  • Commits and pushes
  • 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 31,774 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

8 rules. About 0 are common, 4 are distinctive, and 4 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.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not refactor code unrelated to the task.

    line 12
  2. Very specific:

    No AI attribution, ever: no Co-Authored-By, no "Generated with …" in commits, PRs, or release notes.

    line 13
  3. Very specific:

    Always create a working branch before starting work.

    line 14
  4. Distinctive:

    If the working directory has no git repository or no associated remote: stop and ask the user before making changes.

    line 15
  5. Distinctive:

    Never release, tag, push, or publish without an explicit user request in the current session.

    line 16
  6. Very specific:

    Rust: do not combine sources with tests — never put #[cfg(test)] mod tests blocks inside a source file.

    line 22
  7. Very specific:

    When hard rules change: re-run uv run rulesync, and keep the pointer BLOCK in src/rulesync/core.py in step — it is the condensed "hard …

    line 34
  8. Distinctive:

    Never ignore SonarQube gate findings — coverage, cognitive complexity, and code smells must be fixed before calling work done (memento: …

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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 rules — all AI tools

Shared rules for every AI coding tool on this machine (Codex, Cursor, Copilot, Antigravity, Trae, opencode, zcode/GLM). Claude Code reads CLAUDE.md, which mirrors these. Keep the two in sync.

Chat vs build

  • Detect intent before acting: a question, an opinion request, thinking out loud, or a stream of ideas is a conversation, not a work order. Answer, discuss, wait. No branching, editing, or scaffolding until the user asks for the change or the idea is fully shaped.
  • Rushing to code mid-discussion buries the user's next thought under diffs. Stay in the conversation while ideas keep coming; build when direction is confirmed.

Hard rules

  • Do not refactor code unrelated to the task. Do not modify unrelated files. Do not install new dependencies without explicit approval.
  • No AI attribution, ever: no Co-Authored-By, no "Generated with …" in commits, PRs, or release notes.
  • Always create a working branch before starting work. Never commit directly to main/master. Branches land via PR + squash merge (gh pr merge --squash --delete-branch) — never leave any branch but main in local or remote after merging.
  • If the working directory has no git repository or no associated remote: stop and ask the user before making changes.
  • Never release, tag, push, or publish without an explicit user request in the current session.
  • Releases publish via GitHub Actions on tag push ONLY — never locally (no local cargo publish, npm publish, twine upload, no hand-run gh release create). Tag + changelog + README consistent and tests passing before the release push.
  • GitHub Actions cost money on private repos: never add or enable a workflow unless explicitly asked. When one exists, it triggers on merge to main or on release tags only — never on every push or PR update. Quality gates run locally (tests, lint, review) before merge instead. When CI exists or is requested, enforce the cost rules in rules/github-actions.md: lint/unit on Linux only, Windows gated to PRs + main, macOS UI/AppKit gated to approved PRs / main / nightly / releases, cancel superseded PR runs, path filters, dependency caches, expensive jobs needs: cheap Linux gates.

Language rules

  • Rust: do not combine sources with tests — never put #[cfg(test)] mod tests blocks inside a source file. Go-style siblings: module.rs + module_test.rs, wired from the parent (lib.rs/mod.rs) with #[cfg(test)] mod module_test;.

Memento — learn from mistakes (all tools)

  • Repeated-mistake ledger + enforcement. CLI: python3 ~/.agents/memento/memento.py (uv run memento inside this repo). Full protocol: skills/memento/SKILL.md.
  • Task start: run memento check and respect its output. On any user correction, hard-won fix, or ignored quality gate: memento hit <slug> --rule "..." --fix "...". On a PROMOTE alert or user "always/never": memento promote <slug>.

Workspace

  • Purpose: agent documentation, helpers, and small tools. Each project in its own subdirectory.
  • Git workflow detail: rules/git-workflow.md. Release process: rules/releases.md. CI cost rules: rules/github-actions.md. Machine-local (gitignored): rules/local/ — tool fleet, inventories, review bridges.
  • Posture: quality first — save tokens by avoiding waste, not by downgrading model quality on work that matters.
  • When hard rules change: re-run uv run rulesync, and keep the pointer BLOCK in src/rulesync/core.py in step — it is the condensed "hard minimum" copy of these rules.

Memento-enforced

Rules promoted from the memento ledger. Details/fix: memento show <slug>.

  • In uv-managed projects use uv run / uv add only — never bare python or pip; stdlib-only scripts (e.g. memento.py) run with plain python3 (memento: uv-not-python)
  • Never ignore SonarQube gate findings — coverage, cognitive complexity, and code smells must be fixed before calling work done (memento: quality-gates-ignored)
  • Visual-design agent prompts must carry measurable acceptance criteria (e.g. 'diff obvious in 2s side-by-side', 'gradient sweep >=50 levels'), never soft adjectives like 'restrained' or 'subtle polish' — those produce invisible changes the owner rejects (memento: design-agent-needs-measurable-boldness)
  • Unsigned macOS debug binaries re-prompt keychain ACLs on every rebuild and block callers inside SecKeychainFindGenericPassword (masquerades as daemon/IPC hang) — sign dev binaries with a stable codesigning identity (memento: macos-dev-keychain-prompt-loop)
  • A Tauri app binary built with plain cargo build --release keeps the dev context (loads devUrl, white window offline) — production binaries must be built through 'tauri build', including --no-bundle (memento: tauri-release-needs-cli-build)
  • A merge is not landed until the main-branch CI run is green — check gh run list / pr checks after every squash-merge instead of reporting success from local gates alone (memento: verify-ci-after-merge)
  • Never keep a live continuously-written binary DB (e.g. .ptrack/ptrack.redb) tracked in git — it permanently dirties the tree, breaks gh pr merge checkouts, ff pulls, and stash pops; and when untracking it, back the file up first because the merge checkout can delete the on-disk copy (memento: git-tracked-live-db)
  • macOS login keychain that cannot auto-unlock returns errSecAuthFailed (-25293) on every write with NO permission prompt — masquerades as app-level 'native credential store unavailable'; it is not a signing or app bug (memento: macos-login-keychain-auth-failed)
  • First keychain access from a freshly-linked signed macOS binary can take 1-5s (security server evaluates the whole binary's code signature); keychain-touching requests need generous deadlines or a startup warm-up, and 2s test deadlines on such paths are flaky by design (memento: keychain-first-access-signature-eval)
  • On this machine /.cargo/config.toml sets build.target-dir=/.cargo/shared-target for every project, so an agent worktree's cargo build relinks the SAME pam binary the main checkout is executing (AMFI stale-signature kills, 'daemon not ready' hangs, directory-lock stalls); every parallel worktree agent and every local test loop must set its own CARGO_TARGET_DIR (memento: shared-target-agent-worktree-relink)
  • The first exec of a freshly linked large macOS binary (100 MB debug pam) stalls in _dyld_start for 5-30+ s (one-time per-inode executable assessment, worse under build load); every later launch is sub-second. Test harnesses that spawn a just-built binary must warm-exec it once (e.g. --version) OUTSIDE their readiness/deadline clocks instead of widening timeouts (memento: macos-first-exec-assessment-stall)

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.