agentleFS
legendtkllegendtkl/layered-code-review/skills/layered-review/references/agents.md

layered-code-review / references

AGENTS.md0 starsChanged 26 days agoMITView on GitHub

Fill the {placeholders} and send each prompt to its own fresh-context subagent. Fresh context is the point: the reviewer must not share the author's assumptions. Quick depth sends one finder with both intent and fit. Keep a finding if it reaches the vote threshold for the depth (1/1, 2/2, ≥2/3). Its severity is the most common verifier severity (ties go to Important); its tag is Pre-existing if most verifiers say so. A finding with at least one real vote but…

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

The file

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

1 rule. About 0 are common, 1 is distinctive, and 0 are 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep a finding if it reaches the vote threshold for the depth (1/1, 2/2, ≥2/3).

    line 61

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

Subagent prompts

Fill the {placeholders} and send each prompt to its own fresh-context subagent. Fresh context is the point: the reviewer must not share the author's assumptions.

Lenses

LensAsks
intentDoes the change solve the problem it states? Edge cases, error paths, off-by-one, null/empty, concurrency, resource leaks. On a bug fix: is this the root cause, or a symptom patch that leaves the bug reachable another way?
fitDoes it fit the system or break something else? Callers and implementers of changed signatures, contracts, serialized formats, config, feature flags, migrations. Conventions in CLAUDE.md/REVIEW.md. Lines in CLAUDE.md or docs this change makes untrue.
historyRead git log -p and blame for the touched code. Was this tried and reverted before? Does it undo an earlier fix? Does it fight an invariant an earlier commit established?

Quick depth sends one finder with both intent and fit.

Finder prompt

You are reviewing a code change in the repository at {repo_root}. Lens: {lens} — {lens_question}

Intent of the change: {intent}
Review this diff ({mode}): run `{diff_cmd}` to see it. The base commit is {base}.
Project instructions (CLAUDE.md / REVIEW.md excerpts): {instructions}
Already reported, do not report again: {known_findings}
Skip these paths: {review_skip}

Read any file you need. Report only problems you can prove from the code: for each one give the
file and line, the code that shows it, and a concrete input or sequence that triggers it.
Do not report style, naming, formatting, missing comments, or anything a linter, type-checker
or compiler would catch. Do not suggest refactors. If a problem appears in several places,
report it once as a class and list every instance.
It is a good outcome to find nothing. Do not invent findings to have something to say.

Return JSON only:
{"findings": [{"class": "short bug class", "title": "one line", "path": "...", "line": 0,
  "symbol": "enclosing function or type", "instances": ["path:line", ...],
  "evidence": "code + trigger", "fix": "smallest fix", "severity_guess": "Important|Nit"}]}

Verifier prompt

You are verifying candidate review findings for the change at {repo_root}
(`{full_diff_cmd}`, base {base}, intent: {intent}).

For EACH candidate below, try to refute it. Read the code, follow the call paths, check whether
the trigger can actually happen, whether a caller or test already guards it, and whether the
behavior is intended by the stated intent. Then vote.

Also decide provenance: is the problem introduced by this change, or already present at the
base commit? Check with `git show {base}:<path>`.

Candidates:
{candidates_json}

Return JSON only:
{"votes": [{"index": 0, "real": true|false, "severity": "Important|Nit",
  "provenance": "introduced|pre-existing", "reason": "one or two sentences with file:line"}]}

Keep a finding if it reaches the vote threshold for the depth (1/1, 2/2, ≥2/3). Its severity is the most common verifier severity (ties go to Important); its tag is Pre-existing if most verifiers say so. A finding with at least one real vote but below threshold, guessed Important, goes to Disputed.

Security prompt

You are doing a security review of the change at {repo_root} (`{full_diff_cmd}`, base {base}).
Look only at what this change introduces or makes reachable: injection (SQL, shell, template,
prompt injection into LLM calls), authn/authz gaps, secrets in code or logs, unsafe
deserialization, SSRF, path traversal, insecure defaults, overly broad CI workflow permissions,
untrusted input in GitHub Actions expressions, dependency or install-script changes.
Report only issues with a concrete exploit path in this codebase; no generic hardening advice.

Return JSON only:
{"findings": [{"class": "...", "title": "...", "path": "...", "line": 0, "symbol": "...",
  "evidence": "code + exploit path", "fix": "..."}]}

Send security findings through the same verifiers as the rest. Kept ones get severity Security; they block like Important findings.

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.