Repository navigation
Description
Problem
/review has two classes only: blockers (F#) and suggestions (S#). There is no way to say what kind of problem a blocker is, no explicit check for over-engineering, and Ultrafix keeps cycling while any blocker exists even if what remains is stylistic. A PR can pass cross-model review and still be far larger than the issue called for.
Goal
Categorise blockers, make unrequested complexity a first-class review dimension, and damp fix loops.
Acceptance criteria
ActionableFindinggains acategoryfield with a closed vocabulary:correctness,requirement,security,tests,complexity,style. It is added to the machine and public finding field sets and rendered in the public review comment.- Review comments written before this change still parse (missing category is treated as
correctness); the parser accepts both the old and new field sets. - The default review guidance asks the reviewer to flag unrequested complexity as category
complexity: new abstractions, generic retry/validation/config layers and options nobody asked for, and a diff much larger than the effective objective implies. The prompt includes the diff size and the effective objective length as context. - The guidance states that purely stylistic points belong in Suggestions, and that a blocker may use
styleonly when it violates an explicit repository rule. - Ultrafix: when a review's remaining blockers are all category
style, the loop treats the review as clean for continuation purposes and stops with a distinct reason ("only stylistic findings remain"), without triggering another fix. Score rules are unchanged. review_scoresstores per-review counts by category (a JSON column or dedicated columns) via a migration; existing rows are unaffected.- Neutral wording only: no "slop"-style labels anywhere in prompts or output.
- Tests cover parsing old and new comments, rendering, the Ultrafix stop rule,
jobReachedGoalconsistency, and the migration.
Implementation
Key files: src/jobs/reviewOutputParser.ts (ActionableFinding, MACHINE_FINDING_FIELDS, PUBLIC_FINDING_FIELDS, parsePublicActionableRecords, renderPublicReview), src/jobs/reviewRecordFields.ts, src/jobs/reviewPromptBuilder.ts, packages/shared/src/reviewPrompt.ts (DEFAULT_REVIEW_GUIDANCE), src/jobs/reviewCommentGatherer.ts (getPendingReviewState), src/jobs/ultrafixLoopContinuation.ts (collectReviewOutput), src/jobs/ultrafixOrchestrationService.ts (determineNextAction currently receives no findings), src/jobs/ultrafixLoopContinuationHelpers.ts (finishUltrafixLoop), src/jobs/reviewScorePersistence.ts (jobReachedGoal), packages/core/src/services/reviewScoreStore.ts, packages/api/mcp/commandProgress.ts (UltrafixOutcome). Tests: test/review*.test.ts, test/ultrafix*.test.ts, packages/api/test/reviewScoreStats.test.ts. Verify with the standard commands.
Activity