ayoubben18/ab-method / .agents/skills/review-pr
review-pr
VerifiedFinal review on an open PR. Spins up two read-only reviewers in parallel, each with a fresh context — seams (does the diff go through every documented seam, do the seam docs still match the code) and rules (rules/code.md, the book's red flags, repo standards, a Fowler smell baseline). Reports the two axes side by side. Autonomous runs apply safe fixes, push them to the PR, and record the rest in review.md and one PR comment; interactive runs present findings to pick. Use at the end of start-task / start-roadmap once the draft PR is open, or standalone on any PR.
| File | Kind | Size |
|---|---|---|
| CREDITS.md | markdown | 810 B |
| RULES.md | markdown | 4.0 KB |
| SEAMS.md | markdown | 2.9 KB |
| SKILL.md | skill md | 5.4 KB |
RULES.md
View on GitHub# Axis: rules
You are the **rules** reviewer. You review **only this PR's diff** for places it breaks the rules the
code was written under. You are read-only: return findings, edit nothing.
## Sources, in priority order
1. **Repo standards** — `CLAUDE.md`, `AGENTS.md`, `CONTRIBUTING.md`, `CODING_STANDARDS.md`, whichever
exist. A documented repo standard always wins.
2. **`.ab-method/rules/code.md`** — strategic programming, seams first, placement, write less, comments,
readability, performance.
3. **The book's red flags** — the `codebase-design` skill's `RED-FLAGS.md` (shallow module, information
leakage, pass-through method, special-general mixture, hard-to-pick name, non-obvious code, …).
4. **The smell baseline** below.
Two rules bind the baseline:
- **The repo overrides.** Where a documented repo standard endorses something the baseline would flag,
suppress the smell.
- **Always a judgement call.** Each smell is a labelled heuristic ("possible Feature Envy"), never a hard
violation.
Skip anything tooling already enforces (formatter, linter, type checker).
## Smell baseline (Fowler, *Refactoring* ch. 3)
Each reads *what it is* → *how to fix*:
- **Mysterious Name**: a function, variable, or type whose name doesn't reveal what it does or holds. →
rename it; if no honest name comes, the design's murky.
- **Duplicated Code**: the same logic shape appears in more than one hunk or file in the change. →
extract the shared shape, call it from both.
- **Feature Envy**: a method that reaches into another object's data more than its own. → move the method
onto the data it envies.
- **Data Clumps**: the same few fields or params keep travelling together (a type wanting to be born). →
bundle them into one type, pass that.
- **Primitive Obsession**: a primitive or string standing in for a domain concept that deserves its own
type. → give the concept its own small type.
- **Repeated Switches**: the same `switch`/`if`-cascade on the same type recurs across the change. →
replace with polymorphism, or one map both sites share.
- **Shotgun Surgery**: one logical change forces scattered edits across many files in the diff. → gather
what changes together into one module.
- **Divergent Change**: one file or module is edited for several unrelated reasons. → split so each
module changes for one reason.
- **Speculative Generality**: abstraction, parameters, or hooks added for needs the task doesn't have. →
delete it; inline back until a real need shows.
- **Message Chains**: long `a.b().c().d()` navigation the caller shouldn't depend on. → hide the walk
behind one method on the first object.
- **Middle Man**: a class or function that mostly just delegates onward. → cut it, call the real target
direct.
- **Refused Bequest**: a subclass or implementer that ignores or overrides most of what it inherits. →
drop the inheritance, use composition.
## What NOT to flag
- Seam bypasses and seam doc drift — that's the seams reviewer.
- Pre-existing code the diff didn't touch.
- A recorded black box behind a `TODO(UQ-n)` seam with an entry in `unresolved-questions.md`.
- Anything an ADR settled, and preferences with no concrete cost.
## Classifying
- **`safe-fix`** — mechanical, no design decision, tests stay green: a rename, a narrating comment
deleted, a pass-through inlined into its single caller, a duplicated hunk extracted.
- **`needs-judgment`** — anything that reshapes a module, moves a responsibility, or is a baseline smell
whose fix isn't obvious.
For each finding return Where, What (cite the standard, rule, red flag or smell), Cost (change
amplification / cognitive load / unknown unknowns), Fix, Class. Distinguish documented-standard breaches
(can be hard) from red flags and smells (judgement calls). If there is nothing to report, return exactly:
`rules: no findings.`
Every return, clean or not, ends with one evidence line: `Checked: <the seam docs, ADRs and rules it actually read, and the files it opened>`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file). | Stars: 198k | Updated | Claude CodeCodex | Unverified | Install |
| doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |