Skip to content

fix(review): align code-reviewer Duplicated Code severity with the code-design mode #8330

Closed

Description

@kyle-sexton

Parent

Refs #8326 · Source: PLAN Phase 1 (part 3 of 3), topic malleable-design-defaults

Depends on

Outcome

review:code-reviewer rates repetition the same way the code-design mode does. Duplicated Code that the diff introduces, with no shared source or sync check, is CRITICAL (Fowler's Duplicated Code). Shotgun Surgery, where one change forces many small edits, stays SUGGESTION. The bundled code-design criteria count as the documented rule that permits escalating Duplicated Code, and only Duplicated Code. A cascade finding that names the repeated fact and the change that would diverge may carry Confidence: high when verified at both sites. All other smells keep the advisory default. When the brief carries no Quality bar: line (PR review, fanout), the reviewer rates as production and says so.

Key interfaces

From the plan's ## Design:

review agents/code-reviewer.md | Shotgun Surgery severity aligned with the code-design mode | reactive

Repetition severity (code-design mode and code-reviewer): in code, CRITICAL only for Duplicated Code the diff introduces, naming the repeated fact or logic and the later otherwise-correct change that would diverge, with no shared source or sync check keeping the copies aligned; every other repetition or cascade finding (Shotgun Surgery included) SUGGESTION; Markdown SUGGESTION; quality bar prototype SUGGESTION everywhere; consumer severity vocabulary and criteria win.

The babysit merge lane blocks on CRITICAL and IMPORTANT, so this narrow CRITICAL becomes a merge blocker in unattended lanes (approved as DA-A).

Done when

  • code-reviewer's smell-severity rule and its confidence rule are edited as above; other smells unchanged.
  • Eval case (a case.yaml dir under the review plugin's evals/): an introduced, unsynced duplicated fact is rated CRITICAL; a Shotgun Surgery-only diff is SUGGESTION. /evals:plugin-eval with and without; difference in the PR body.
  • After the commit, bash scripts/check-changed-skills.sh origin/main and bash scripts/check-affected.sh --tests exit 0 with no SKIP line.
  • A changelog fragment for the review plugin.

Out of scope

  • Any IMPORTANT tier for repetition.
  • Changes to the babysit merge lane.

Metadata

Metadata

Assignees

Labels

agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.

Type

Fields

No fields configured for Task.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions