agentleFS
V-SongbirdV-Songbird/razor/AGENTS.md

razor

AGENTS.md8 starsChanged 48 days agoMITView on GitHub

razor is one plugin for Claude Code, Codex and Antigravity: a checklist before new code and a few checks behind it, so a small task stays small. Its hooks and scripts are dependency-free Node.js and run with Node.js 22 or later and Git; there is no install or build step. This repository is Foundry's razor submodule and ships from main. The README serves every host and names the host beside every host-specific instruction and result. Results identify the actual host,…

  • 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,700 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 repository2 other files it gives its agents.

The file

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

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before changing a check, read how razor works.

    line 10
  2. Distinctive:

    Before adding or renaming a setting, read settings.

    line 11
  3. Very specific:

    Before touching Codex behavior, read the Codex setup guide.

    line 12
  4. Distinctive:

    Before touching a README number, read the numbers.

    line 13
  5. Distinctive:

    Before a release, read the changelog and CONTRIBUTING.md.

    line 14

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

razor

razor is one plugin for Claude Code, Codex and Antigravity: a checklist before new code and a few checks behind it, so a small task stays small. Its hooks and scripts are dependency-free Node.js and run with Node.js 22 or later and Git; there is no install or build step. This repository is Foundry's razor submodule and ships from main.

Start here

  • Before changing a check, read how razor works; each check speaks at most once and the retry always goes through.
  • Before adding or renaming a setting, read settings.
  • Before touching Codex behavior, read the Codex setup guide; patch guards only see previewable local apply_patch changes.
  • Before touching a README number, read the numbers.
  • Before a release, read the changelog and CONTRIBUTING.md.

Rules that outrank everything

  • One package serves the three hosts. Shared checks live outside the host adapters, and a new hook event needs an entry in hooks/hooks.json, hooks/codex-hooks.json and, when Antigravity has the event, the root hooks.json.
  • The three manifests, .claude-plugin/plugin.json, .codex-plugin/plugin.json and plugin.json, carry the same version, changed together; the suite fails when they differ. Foundry's catalogs carry no version for razor and only move source.sha.
  • razor never edits code, manifests or lockfiles and never grants a permission; every check is a message to the assistant.

Commands

CommandPurposeCost
node --test tests/*.test.jsThe suiteLocal fixtures inside the plugin root; fails from a checkout under the system temp directory
node scripts/git-hooks/check-readme-nav.jsThe root README has its nav, and every heading anchor linked from a tracked Markdown file resolvesLocal
node scripts/build-windows-launchers.js --writeAfter editing hooks/windows-launcher.ps1 or a hook in hooks/codex-hooks.json, regenerate that file's commandWindows launchers; the suite fails naming the first stale oneLocal
claude plugin validate .Claude Code package shapeLocal
agy plugin validate .Antigravity package shapeLocal; needs the Antigravity CLI
git config core.hooksPath scripts/git-hooksOne-time: the pre-commit hook runs the suite and the nav checkLocal

Where things live

PathContent
hooks/pre-tool-use.js runs dep-guard.js, import-guard.js, manifest-guard.js and file-meter.js; build-ledger.js, mode-toggle.js, session-start.js and subagent-start.js cover the other events; codex-hook.js and antigravity-hook.js translate those hosts' events; razor-lib.js and lib/ hold the shared state and the three host adapters; windows-launcher.ps1 is the fnm fallback of each commandWindows in codex-hooks.json
scripts/unused-deps.jsThe scanner behind the unused skill; scripts/build-windows-launchers.js builds and checks the Windows launchers; scripts/git-hooks/ holds the commit gates
skills/unused/The one skill
tests/The node:test suite and the contract/ fixtures
docs/knowledge/How it works, settings, Codex setup, benchmark details and the changelog
.claude-plugin/, .codex-plugin/, plugin.json, hooks.jsonHost manifests with the same version; the Codex manifest names hooks/codex-hooks.json, and the root manifest and hooks.json are what Antigravity reads

Conventions

The README serves every host and names the host beside every host-specific instruction and result. Results identify the actual host, model, source and date; keep losses and limits, show Not measured where evidence is absent, and never present a Claude Code result as a Codex result. Benchmark runners, datasets and experiments are not part of the package; tests/ holds functional tests only. CLAUDE.md imports this file; keep shared contributor facts here.

Pitfalls

  • Claude Code substitutes ${CLAUDE_PLUGIN_ROOT} in skill text; Codex and Antigravity do not. They need a path relative to the skill file.
  • tests/dispatcher.test.js and tests/contract.test.js build workspaces inside the plugin root. disp-ws-*/ and contract-ws-*/ residue from a failed run is ignored, never staged.
  • Files written by a shell command skip the file checks in every host. Only the assistant's own editing tool passes through them.
  • Antigravity has no session, prompt or subagent event. An injected message reaches only the model call it is attached to, so the ladder and the drift note go with every call, except that the calls answering the build check carry no drift note, the ledger baseline only the first call of a conversation, and the toggle and the subagent checklist do not exist there; a turn starts at the call whose invocationNum is 0, so a Stop continuation stays in its turn and a turn with no Stop still ends.

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.