agentleFS
coldteadotaicoldteadotai/pr-lens/AGENTS.md

pr-lens

AGENTS.md1.9k starsChanged 57 days agoMITView on GitHub

Hard rules for anyone (human or agent) working in this repo. Read fully before writing code. Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed. Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment. Don't assume. Don't hide confusion. Surface tradeoffs. Before implementing: Minimum code that solves the problem. Nothing speculative. Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify. Touch only what you must. Clean up…

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 19 mentionsOct 2026: 15 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the coldteadotai/pr-lens repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about coldteadotai/pr-lens

The biggest 5 of 35 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 35

Talked about on GitHub and Hacker News (35 times).

On GitHub · 32

27 more on GitHub
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 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

Show its rules and text

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

19 rules. About 0 are common, 17 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    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. Distinctive:

    If multiple interpretations exist, present them - don't pick silently.

    line 25
  2. Distinctive:

    If a simpler approach exists, say so.

    line 26
  3. Distinctive:

    If something is unclear, stop.

    line 27
  4. Distinctive:

    No features beyond what was asked.

    line 33
  5. Distinctive:

    No abstractions for single-use code.

    line 34
  6. Distinctive:

    No error handling for impossible scenarios.

    line 36
  7. Distinctive:

    If you write 200 lines and it could be 50, rewrite it.

    line 37
  8. Distinctive:

    Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

    line 39
  9. Distinctive:

    When editing existing code:

    line 45
  10. Distinctive:

    Don't "improve" adjacent code, comments, or formatting.

    line 47
  11. Distinctive:

    Don't refactor things that aren't broken.

    line 49
  12. Distinctive:

    If you notice unrelated dead code, mention it - don't delete it.

    line 51
  13. Distinctive:

    When your changes create orphans:

    line 53
  14. Very specific:

    Remove imports/variables/functions that YOUR changes made unused.

    line 55
  15. Distinctive:

    Don't remove pre-existing dead code unless asked.

    line 56
  16. Very specific:

    Don't narrate what the code does — the reader sees the map, the switch, the names.

    line 84
  17. Distinctive:

    If code needs a comment to be understood, first make the code clearer (rename, extract).

    line 86
  18. Distinctive:

    Delete comments that restate the adjacent line.

    line 87
  19. Distinctive:

    Every comment must earn its place: if you can't name what it tells the reader that the code doesn't, drop it.

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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

PR Lens — Agent Instructions

Hard rules for anyone (human or agent) working in this repo. Read fully before writing code.

Hard requirements

  • No secrets in this repo, ever. This repo needs no credentials. Do not read ~/Documents/dev/pr-lens-secrets/.
  • Verify before claiming done: tests green, pnpm build + typecheck clean, and visual output verified in a real browser when the change affects rendered SVGs.
  • No AI attribution in commits or pull requests. No Co-Authored-By line for a model, no "Generated with" footer, no session link, no bot listed as an author. Whoever opened the pull request is the author of every commit in it. Coding agents add these by default: .claude/settings.json in this repo turns them off for Claude Code, and if you use another tool, find its switch before your first commit. A squash merge carries a co-author trailer over from the branch, so check the merge box too.
  • Pass user-facing words through the humanizer before shipping them. Anything a person reads — comments, captions, tips, README prose, share pages, cards, terminal output — goes through the humanizer skill first. Copy that reads as machine-written spends trust the diagrams then have to earn back.

General

Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.

Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment.

1. Think Before Coding

Don't assume. Don't hide confusion. Surface tradeoffs.

Before implementing:

  • State your assumptions explicitly. If uncertain, ask.
  • If multiple interpretations exist, present them - don't pick silently.
  • If a simpler approach exists, say so. Push back when warranted.
  • If something is unclear, stop. Name what's confusing. Ask.

2. Simplicity First

Minimum code that solves the problem. Nothing speculative.

  • No features beyond what was asked.
  • No abstractions for single-use code.
  • No "flexibility" or "configurability" that wasn't requested.
  • No error handling for impossible scenarios.
  • If you write 200 lines and it could be 50, rewrite it.

Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

3. Surgical Changes

Touch only what you must. Clean up only your own mess.

When editing existing code:

  • Don't "improve" adjacent code, comments, or formatting.
  • Preserve intentional blank lines between methods and logical blocks. Do not compact whitespace to reduce line count or satisfy a file-size target; restructure the code instead if length is a problem.
  • Don't refactor things that aren't broken.
  • Match existing style, even if you'd do it differently.
  • If you notice unrelated dead code, mention it - don't delete it.

When your changes create orphans:

  • Remove imports/variables/functions that YOUR changes made unused.
  • Don't remove pre-existing dead code unless asked.

The test: Every changed line should trace directly to the user's request.

4. Goal-Driven Execution

Define success criteria. Loop until verified.

Transform tasks into verifiable goals:

  • "Add validation" → "Write tests for invalid inputs, then make them pass"
  • "Fix the bug" → "Write a test that reproduces it, then make it pass"
  • "Refactor X" → "Ensure tests pass before and after"

For multi-step tasks, state a brief plan:

1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]

Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.

5. Comment Sparingly

Default to no comment. Code says WHAT; comments say WHY — and only when the WHY isn't obvious.

  • Don't narrate what the code does — the reader sees the map, the switch, the names. Restating them is noise.
  • Comment only the non-obvious: a reason, a gotcha, a workaround, a constraint, a "looks wrong but isn't."
  • If code needs a comment to be understood, first make the code clearer (rename, extract). Comment only what better code can't express.
  • Delete comments that restate the adjacent line. One earned comment beats ten obvious ones.
  • Every comment must earn its place: if you can't name what it tells the reader that the code doesn't, drop it.

TypeScript quality — exhaustive, deterministic types

Quality software is built on types the compiler can enforce. These are non-negotiable in this codebase.

  • Closed sets use an exhaustive switch + assertNever. For discriminated unions / enums, switch on the discriminant and end with default: return assertNever(value) so adding a variant fails to compile until every consumer handles it. Never use if/else-if chains for mutually-exclusive variants. When behavior depends on several related status checks, derive one closed decision/status type and switch over that — don't scatter conditionals through a method. Define assertNever once in the schema package's utils and import it everywhere:

    export const assertNever = (
      value: never,
      message = "Unhandled variant",
    ): never => {
      throw new Error(`${message}: ${JSON.stringify(value)}`);
    };
  • Use type, not interface.
  • Discriminated unions for state — every multi-shape value carries a type/kind discriminant. No optional-field soup where one shape is meant.
  • No type casting. as is a bug until proven otherwise — narrow with typeof/discriminants/schema parsing instead. (as const and zod .parse() outputs are fine.)
  • Expected failures use typed domain errors with a stable machine-readable code (SCREAMING_SNAKE_CASE) callers can switch on exhaustively. Concise messages, no terminal punctuation.
  • Deterministic ID/key formats have a single owner: one named creation function per format (content-hash keys, R2 paths, comment markers). Never inline-format the same ID in two places.
  • Schema-first boundaries: anything crossing a process/API boundary is zod-parsed at the edge; internal code trusts parsed types, never re-validates ad hoc.

Repo specifics

  • pnpm monorepo: packages/schema (the contract — everything else consumes it), packages/renderer (pure function, no I/O), packages/cli, packages/action, packages/agent-skill. MIT © Coldtea AI.
  • The renderer must be deterministic: same graph in → byte-identical SVG out. Treat any nondeterminism (object iteration order, Date, random) as a bug.
  • Rendered SVGs must remain GitHub-safe: SMIL/CSS animation only, no scripts, no external resources, self-contained.

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.