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
Who's talking about coldteadotai/pr-lens
- A Hacker News story“Show HN: Turn every PR into animated architecture diagrams (open-source)”Hacker News · Aug 27, 2026 · 6 points
- A Hacker News story“Show HN: What if you could review code without reading code?”Hacker News · Sep 17, 2026 · 4 points
- A Hacker News story“Show HN: I stopped reading my agent's diffs, so I made every PR draw itself”Hacker News · Oct 5, 2026 · 2 points
- thejoeejoee/pr-lens-git-backend“fix(deps): bump @coldtea/pr-lens-schema from 0.4.0 to 0.7.0”GitHub · Oct 5, 2026
- thejoeejoee/pr-lens-git-backend“fix(deps): bump @coldtea/pr-lens-renderer from 0.2.6 to 0.3.2”GitHub · Oct 5, 2026
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
- Oct 5, 2026fix(deps): bump @coldtea/pr-lens-schema from 0.4.0 to 0.7.0 — thejoeejoee/pr-lens-git-backend0 reactions · 1 comment
- Oct 5, 2026fix(deps): bump @coldtea/pr-lens-renderer from 0.2.6 to 0.3.2 — thejoeejoee/pr-lens-git-backend0 reactions · 1 comment
- Oct 5, 2026agent-skills.github.coldteadotai.pr-lens: 0.12.0 → 0.13.0 — sudosubin/agents.nix0 reactions
- Oct 4, 2026Add the tracker interface and its GitHub adapter — open-software-factory/software-factory0 reactions · 2 comments
- Oct 4, 2026Bump @deepseek-ai/schemastery from 3.18.2 to 3.18.4 — open-software-factory/software-factory0 reactions
27 more on GitHub
- Oct 4, 2026Bump @opencode-ai/plugin from 1.18.31 to 1.18.34 — open-software-factory/software-factory0 reactions
- Oct 4, 2026Bump agnix-core from 0.54.0 to 0.56.1 — open-software-factory/software-factory0 reactions
- Oct 4, 2026Bump sha2 from 0.10.9 to 0.11.0 — open-software-factory/software-factory0 reactions
- Oct 3, 2026agent-skills.github.coldteadotai.pr-lens: 0.7.0 → 0.12.0 — sudosubin/agents.nix0 reactions
- Oct 3, 2026[TASK-11] Install PR Lens as a managed skill across all supported agents — scowalt/machine-setup-scripts0 reactions
- Oct 2, 2026Factory console: borrow the prlens.dev walkthrough's focused-canvas UX — open-software-factory/software-factory0 reactions
- Oct 2, 2026fix(ci): keep pr-lens green when the model call leaves no reason — open-software-factory/software-factory0 reactions · 1 comment
- Oct 1, 2026fix(deps): bump @coldtea/pr-lens-renderer from 0.2.6 to 0.3.1 — thejoeejoee/pr-lens-git-backend0 reactions · 2 comments
- Oct 1, 2026fix(ci): keep the pr-lens check green when the model call fails — open-software-factory/software-factory0 reactions
- Sep 30, 2026fix(deps): bump @coldtea/pr-lens-schema from 0.4.0 to 0.6.0 — thejoeejoee/pr-lens-git-backend0 reactions · 2 comments
- Sep 30, 2026fix(deps): bump @coldtea/pr-lens-renderer from 0.2.6 to 0.3.0 — thejoeejoee/pr-lens-git-backend0 reactions · 2 comments
- Sep 30, 2026feat(osf): start the status block, and summarise Rust test changes in it — open-software-factory/software-factory0 reactions
- Sep 30, 2026feat: review aids on every pull request — open-software-factory/software-factory0 reactions
- Sep 29, 2026fix(deps): bump @coldtea/pr-lens-schema from 0.4.0 to 0.5.0 — thejoeejoee/pr-lens-git-backend0 reactions · 2 comments
- Sep 28, 2026Show architecture diffs directly in the GitHub Actions job summary — maximilianfeix/repoatlas0 reactions
- Sep 27, 2026build(deps-dev): bump @deepseek-ai/dsh-llm from 0.1.5-rc.2 to 0.1.5-rc.3 — open-software-factory/software-factory0 reactions · 3 comments
- Sep 26, 2026[Candidate] coldteadotai/pr-lens/skills/pr-lens - pr-lens — ProSkillsMD/proskills0 reactions · 2 comments
- Sep 26, 2026[Candidate] coldteadotai/pr-lens/skills/eli5 - eli5 — ProSkillsMD/proskills0 reactions · 1 comment
- Sep 26, 2026[Candidate] coldteadotai/pr-lens/packages/agent-skill - pr-lens — ProSkillsMD/proskills0 reactions · 1 comment
- Sep 26, 2026agent-skills.github.coldteadotai.pr-lens: init at 0.7.0 — sudosubin/agents.nix0 reactions
- Sep 25, 2026build(devcontainer): add moon, Node and pnpm, and keep the toolchain read-only — open-software-factory/software-factory0 reactions · 2 comments
- Sep 22, 2026fix(deps): bump @coldtea/pr-lens-schema from 0.3.0 to 0.4.0 — thejoeejoee/pr-lens-git-backend0 reactions · 1 comment
- Sep 22, 2026fix(deps): bump @coldtea/pr-lens-renderer from 0.2.5 to 0.2.6 — thejoeejoee/pr-lens-git-backend0 reactions · 1 comment
- Sep 14, 2026Add a compact read-only file and diff companion with measured opening latency — Codevetter/codevettersays it tested it0 reactions · 2 comments
- Sep 8, 2026AI Community Trends -- 2026-09-09 — rahmanramsi/daily-digest-ai0 reactions
- Sep 8, 2026tracking: PR comprehension cluster — system recap, primitives map, plan-vs-actual, consumer pattern — deftai/directive0 reactions · 1 comment
- Sep 8, 2026Diagram assets for coldteadotai/pr-lens#23 — real-sma11/pr-lens0 reactions
On Hacker News · 3
- Aug 27, 2026Show HN: Turn every PR into animated architecture diagrams (open-source)6 points · 1 comment
- Sep 17, 2026Show HN: What if you could review code without reading code?4 points
- Oct 5, 2026Show HN: I stopped reading my agent's diffs, so I made every PR draw itself2 points · 1 comment
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.
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
- Distinctive: line 25
If multiple interpretations exist, present them - don't pick silently.
- Distinctive: line 26
If a simpler approach exists, say so.
- Distinctive: line 27
If something is unclear, stop.
- Distinctive: line 33
No features beyond what was asked.
- Distinctive: line 34
No abstractions for single-use code.
- Distinctive: line 36
No error handling for impossible scenarios.
- Distinctive: line 37
If you write 200 lines and it could be 50, rewrite it.
- Distinctive: line 39
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
- Distinctive: line 45
When editing existing code:
- Distinctive: line 47
Don't "improve" adjacent code, comments, or formatting.
- Distinctive: line 49
Don't refactor things that aren't broken.
- Distinctive: line 51
If you notice unrelated dead code, mention it - don't delete it.
- Distinctive: line 53
When your changes create orphans:
- Very specific: line 55
Remove imports/variables/functions that YOUR changes made unused.
- Distinctive: line 56
Don't remove pre-existing dead code unless asked.
- Very specific: line 84
Don't narrate what the code does — the reader sees the map, the switch, the names.
- Distinctive: line 86
If code needs a comment to be understood, first make the code clearer (rename, extract).
- Distinctive: line 87
Delete comments that restate the adjacent line.
- Distinctive: line 88
Every comment must earn its place: if you can't name what it tells the reader that the code doesn't, drop it.
≈ “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.
Files
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-Byline 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.jsonin 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, theswitch, 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,switchon the discriminant and end withdefault: 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. DefineassertNeveronce 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, notinterface. - Discriminated unions for state — every multi-shape value carries a
type/kinddiscriminant. No optional-field soup where one shape is meant. - No type casting.
asis a bug until proven otherwise — narrow withtypeof/discriminants/schema parsing instead. (as constand 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.
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
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.

