agentleFS
BSchriftBSchrift/critique.nvim/AGENTS.md

critique.nvim

AGENTS.md2 starsChanged 15 days agoMITView on GitHub

Instructions for AI agents (and people) changing this repo. CONTRIBUTING.md has the file layout and the release steps; this file adds what an agent needs to work here safely. Use the ponytail skill for all work here: the smallest change that fully solves the task, reusing what the code already has, with a test for any new logic, and a reply that ends with what you skipped and any risk. - Claude Code: this repo's .claude/settings.json adds ponytail's marketplace and…

  • 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 repository2 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:

    Use the ponytail skill for all work here: the smallest change that fully solves the task, reusing what the code already has, with a test …

    line 8
  2. Distinctive:

    Other agents: follow ponytail's AGENTS.md.

    line 16
  3. Very specific:

    Read the code the change touches, and grep every caller.

    line 20
  4. Very specific:

    Never wrap a call that can yield in pcall: it fails on PUC Lua builds of Neovim.

    line 25
  5. Distinctive:

    Every behavior change gets a test that fails without the change.

    line 34
  6. Distinctive:

    Don't make tests depend on timing or on the machine (tags, the user's config, network).

    line 36
  7. Very specific:

    After every push, wait for CI (gh run watch) and fix a failure right away, before other work.

    line 52
  8. Very specific:

    Don't change the user's own setup (~/.config/nvim, ~/.claude) unless asked.

    line 55

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

Working on critique.nvim

Instructions for AI agents (and people) changing this repo. CONTRIBUTING.md has the file layout and the release steps; this file adds what an agent needs to work here safely.

Work like ponytail

Use the ponytail skill for all work here: the smallest change that fully solves the task, reusing what the code already has, with a test for any new logic, and a reply that ends with what you skipped and any risk.

  • Claude Code: this repo's .claude/settings.json adds ponytail's marketplace and turns the plugin on once you trust the folder. If Claude Code says it isn't installed, run /plugin install ponytail@ponytail. (Claude Code reads this file through CLAUDE.md.)
  • Codex: codex plugin marketplace add DietrichGebert/ponytail, then codex plugin add ponytail@ponytail.
  • Other agents: follow ponytail's AGENTS.md.

Before you change code

  • Read the code the change touches, and grep every caller. lua/critique/init.lua draws both GitHub reviews and local (agent) reviews, through S.backend: github.lua or local.lua, which offer the same functions. A change to one backend usually needs the same change in the other.
  • Supported: Neovim 0.11 and newer. Use 0.12-only APIs only with a fallback (see M.text in diff.lua).
  • Async code runs in coroutines (gh.async / gh.await / gh.all / gh.wait in lua/critique/gh.lua). Never wrap a call that can yield in pcall: it fails on PUC Lua builds of Neovim.
  • critique's PR checkouts are partial, history-free clones. Never run git commands there that look up objects that may be missing (cat-file -e, rev-parse <sha>^{commit}): git then downloads the commit with its whole history. Fetch with --depth=1 instead, as fetch() in github.lua does.

Tests

  • tests/run.sh runs everything, offline, in a few minutes; tests/run.sh local github runs some. GitHub is stubbed: tests/github_test.lua uses local repos as the "GitHub" remote.
  • Every behavior change gets a test that fails without the change. Check it: break the code, run the test, see it fail, restore.
  • Don't make tests depend on timing or on the machine (tags, the user's config, network). CI runs on Linux and macOS with Neovim 0.11.0, stable, and nightly, and checks out without tags.

Docs

  • A change users will notice also updates README.md, doc/critique.txt (78 columns), and a line under "Unreleased" in CHANGELOG.md.
  • The README describes the product as it is: no "new in" sections or version history; that belongs in the changelog.
  • skills/critique/SKILL.md is product too: users' agents follow it.
  • Plain English: short sentences, everyday words, say what to do next.

Anything outside this checkout needs the user's OK first

  • Pushing, tagging, releasing, and any GitHub write (comments, reviews, PRs, deleting anything), including on the demo sandbox repo BSchrift/nvim-reviewer-sandbox. Read-only gh calls are fine.
  • After every push, wait for CI (gh run watch) and fix a failure right away, before other work.
  • Release only on a green CI run, following CONTRIBUTING.md (the changelog and .claude-plugin/plugin.json versions must match the tag).
  • Don't change the user's own setup (~/.config/nvim, ~/.claude) unless asked.

Demos

demo/*.tape and demo/clips/*.tape record the README's GIFs with vhs. The clips stage a local review with demo/clips-setup.sh and need no GitHub writes; demo/demo.tape posts to the sandbox PR, so it needs the user's OK. Look at the frames of every recording before using it.

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.