Repository navigation
feat(review): add /review:quality-gate code-design mode with bundled criteria and cascade severity #8329
Description
Parent
Refs #8326 · Source: PLAN Phase 1 (part 2 of 3), topic malleable-design-defaults
Depends on
Outcome
/review:quality-gate code-design exists: a review mode that loads the consumer's review criteria through the standards contract, and falls back to small bundled universal criteria when the consumer has none. It flags Duplicated Code that the diff introduces with no shared source or sync check, naming the repeated fact or logic and the later change that would make the copies diverge. When a consumer standard contradicts a bundled default, it applies the consumer standard and says which default it overrode. It also reads the Quality bar: line; when that line is absent, it treats the bar as production and says so in the output.
Key interfaces
From the plan's ## Design:
review
skills/quality-gatecode-designmode (new) | bundled universal code-design criteria, cascade severity, consumer-criteria loading | reactive
Quality bar: prototype | internal | production Overrides bundled default <principle> per <standards file>
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
prototypeSUGGESTION everywhere; consumer severity vocabulary and criteria win.
A missing quality-bar line counts as
productionfor review severity, and the review names that assumption.
Variation verdict: consumer review criteria are contained in the code-design mode, which loads them through the standards-contract resolution ladder; consumer criteria win over bundled ones.
Exempt from CRITICAL (judgment; no review guide read states them): contract-restatement markers, registries the repo declares, generated files, fixtures, rename diffs. No numeric file threshold.
Conventions followed: the planning plugin's standards-contract reference (resolution ladder, provenance); the review plugin's severity tier tests; .claude/rules/skill-bodies-state-current-rules.md.
Done when
-
grep -c "code-design"on the quality-gate SKILL.md is ≥ 2 (argument hint, router row, description trigger), and acode-designcontext file exists in the quality-gate skill. - First, probe that a
docs/standards/file written by an eval case'sscaffold_scriptis readable in an eval run; record the result in the PR body. - Eval cases (
case.yamldirs under the review plugin'sevals/):qg-code-design-cascade(introduced unsynced repetition is CRITICAL),qg-code-design-sanctioned(registry and rename diffs are not CRITICAL),qg-code-design-markdown(SUGGESTION),qg-code-design-prototype(SUGGESTION),qg-code-design-override(emits the override line)./evals:plugin-evalwith and without the plugin; difference in the PR body. - After the commit,
bash scripts/check-changed-skills.sh origin/mainexits 0 andbash scripts/check-affected.sh --testsexits 0 with noSKIPline. - A changelog fragment for the review plugin.
Out of scope
code-reviewerseverity changes (next item).- Phase-boundary dispatch from implementation skills.
Activity
kyle-sexton commentedon Oct 19, 2026