Skip to content

utils / command

Review work

Rates a PR's delivery 0–10 per criterion (spec match, tests, security, complexity, debt…) and overall, deducting per verified finding, with a next step for every finding

❯ /utils:review-work [<pr-number>] [--base <branch>] [--spec <path|url|ticket>]

Reads what the PR was supposed to deliver and what it actually delivers, then rates each criterion from 0.0 to 10.0 (one decimal) with the evidence behind it. Read-only: it never edits code, comments on the PR or pushes.

The criteria:

  • Spec match
  • Scope and size
  • Readability and conventions
  • Tech debt
  • Unit tests
  • E2e tests
  • Security
  • Cyclomatic complexity
  • Error handling and edge cases
  • Performance
  • Backward compatibility
  • Documentation

It rates only the ones the diff touches, so a style-only change skips tests, security and complexity. Each starts at 10.0 and loses a fixed amount per verified finding: 6.0 for a blocker, 3.0 for a major, 1.0 for a minor, 0.5 for a nit. The overall is their weighted average, spec match counting most, and a blocker caps it at 4.0.

Parameters

Read-only: it prints the report in the chat and changes nothing.

Parameter What it does
[pr-number] The PR to rate. Defaults to the current branch's open PR. Without one, it rates the branch against its merge base, uncommitted and untracked changes included.
--base <branch> Base of the comparison. Defaults to the PR's base; without a PR, develop when origin/develop exists, else the default branch.
--spec <path|url|ticket> An extra source of truth for Spec match, on top of the ones it finds by itself.
/utils:review-work                                # the current branch's PR, or the branch alone
/utils:review-work 123                            # PR 123
/utils:review-work --base main                    # compare against main
/utils:review-work --spec docs/specs/checkout.md  # check against a spec file
/utils:review-work --spec ABC-123                 # check against a ticket

View source on GitHub