agentleFS
daniel-kindldaniel-kindl/dkstack/skills/review-standards/SKILL.md

review-standards

Skill1 starsChanged 19 days agoMITView on GitHub

Use when a review must check a change against the documented rules: safety, correctness, security, dependencies, naming, quality gates, logging, architecture, UI, docs and writing. One building block of code-review. Includes the code smell list.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 4

    Distinctive

    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:

    Check intent, accuracy and domain terms in the changed identifiers.

    line 22
  2. Distinctive:

    Check each file against this list.

    line 28
  3. Distinctive:

    Use this list even if the project documents no rules.

    line 48
  4. Distinctive:

    Do not start subagents for this skill.

    line 78

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “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
SKILL.md

Review the standards

A building block of code-review. Use it alone, or as step 5 of code-review. Rate each finding with the severity table. Write each finding in the finding format.

Sources

Find the standards:

  • AGENTS.md and the dkstack pages that apply.
  • The project rules, for example CONTRIBUTING.md, the coding standards and the ADRs.
  • The project's documented exceptions to dkstack rules. A dkstack rule wins over a project rule, except through a documented exception. See the precedence rules in AGENTS.md.

Skip what an automated check in the project already enforces. For naming, review the meaning rules in coding/naming.md. Check intent, accuracy and domain terms in the changed identifiers. Do not repeat a naming form check that the project's automated checks reliably enforce. Review forms that have no reliable automated check.

Checklist

Check each file against this list. Link the rule in each finding. Do not copy the rule.

  • Safety: no change breaks a rule in workflow/safety.md. A path that lets an agent start a production deploy or a project's release workflow, or release without the owner's OK, is Blocking.
  • Correctness: logic, edge cases, empty and null input, error paths and resource cleanup. See coding/error-handling.md and resource balancing.
  • Security: input validation, secrets, injection, permissions, and CI triggers and tokens. See coding/security.md and its CI workflows rules.
  • Dependencies: each new dependency has a reason, a pinned version and a lockfile change. Each third-party CI step is pinned to a full commit SHA. Run the project's dependency audit if you can. See coding/dependencies.md.
  • Clean code: semantic naming, readability and broken windows. See coding/quality.md and coding/naming.md.
  • Domain language: names in code, tests and docs use the terms in CONTEXT.md, if the file exists. See the glossary. A name that uses a word from an _Avoid_: line is Low. A name that gives a glossary term a different meaning is Medium. A changed meaning with no change to CONTEXT.md is Medium.
  • Quality gates: no check is disabled, skipped or lowered. A warning suppression follows the suppression rules. See coding/quality-gates.md.
  • Logging: check the changed events and the Observability: line against coding/logging.md. A secret or personal data in a log is Blocking. A missing or wrong Observability: line in the pull request body is Medium. A duplicate terminal Error is Medium. A missing event is Medium only when you name the diagnostic gap. A wrong level is Low.
  • Architecture: the change follows the Accepted ADRs. Code that contradicts one is High under the ADR findings rule. The change also follows architecture/index.md. For a structural change, use apply-architecture.
  • Sustainability: follow stewardship when the change matches a signal on that page. An unrelated refactor is work the specification did not ask for. Do not require a stewardship report for ordinary work.
  • Performance: hot paths, allocations, repeated queries and blocking I/O on the UI thread. For UI, see UI performance.
  • Rendered UI: for a rendered UI change, use ui-review. A failed WCAG 2.2 A or AA criterion on a changed surface is High. A missed dkstack accessibility rule that is not a WCAG criterion is Medium. A missing state that the specification requires is High. A missing or wrong Visual verification: line in the pull request body is Medium. An inconsistency with the project's design system is Medium. A visual preference is Low.
  • Docs: the README, user docs, ADRs and CHANGELOG.md match the change.
  • Writing: all text follows writing/index.md. Use writing-check.
  • Version: the version change matches semver. See versioning/index.md.

Code smells

Use this list even if the project documents no rules. A documented rule wins over this list. If a project rule allows a pattern, do not report it as a smell.

A smell is a judgement, not a hard violation. Write it as "possible feature envy". A smell is Medium by default. Make it Low if the impact is small, and give the reason. Make it High if it causes wrong behavior.

SmellFixPrinciple
Mysterious name: a name does not say what the thing does or holdsRename it. If no clear name fits, the design is not clearcoding/naming.md, domain languages
Duplicated code: the same logic is in more than one placeMove the logic to one function and use it in each placeDRY
Feature envy: a function uses the data of another object more than its ownMove the function to the data it usesdecoupling
Data clumps: the same fields or parameters always go togetherMake one type for the group and pass itdomain languages, DRY
Primitive obsession: a string or number stands for a domain conceptMake a small type for the conceptdomain languages, design by contract
Repeated switches: the same switch or if chain on the same type is in more than one placeUse polymorphism, or one shared mapSOLID (open-closed)
Shotgun surgery: one logical change needs edits in many filesPut the parts that change together in one moduleorthogonality
Divergent change: one module changes for unrelated reasonsSplit it, so that each module has one reason to changeSOLID (single responsibility), separation of concerns
Speculative generality, or dead code: code, parameters or hooks with no current useDelete it. Add it again when a real need existsYAGNI
Message chains: a caller walks through many objects, for example a.b().c().d()Ask the first object for the resultdecoupling
Middle man: a class or function only passes calls on, and it is not a deliberate boundaryRemove it and call the target directly. Keep it if it isolates a dependency or a module boundaryKISS, decoupling
Refused bequest: a subtype ignores or overrides most of what it inheritsUse composition, not inheritanceSOLID (Liskov substitution)
Long function or deep nestingSplit it into small functions with clear namescomplexity, KISS, separation of concerns
Magic value: a literal with no nameUse a named constant. If the value depends on the environment, make it configurationliteral values, DRY, configuration
Type escape: any, dynamic, a cast that no check proves, or a comment that turns off the type checkUse the real type. For an unknown value, use the safe top type and check it at the boundarytypes
Boolean flags that together encode a stateModel the states and transitionsstate machines
Shared mutable state with no owner, atomic operation or lock. This is High by defaultGive the state one owner, or guard itconcurrency
Configuration read in many places, or environment values in codeRead configuration in one place and pass it inconfiguration, reversibility
An error is ignored, or bad input is accepted and fails laterFail at once, at the boundaryfail fast, design by contract
Calls that must run in a hidden orderMake the order explicit, or remove ittemporal coupling
Signal comment: a comment explains a workaround in the project's own code, or guards a constraint, for example "do not remove"Fix the cause, or encode the constraint as a type, a check, a test or a lint rule. Then delete the comment. If the cause is out of scope, link an issue in the commentcomments

Subagents

Do not start subagents for this skill. Reason: this is one building block. code-review runs it in its own subagent. See the subagent guide.

Credit

The smell list comes from the code-review skill by Matt Pocock (MIT). The smells come from Martin Fowler, Refactoring, chapter 3.

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.