Skip to content

fix: state low-score issue contract in review prompts - #774

Open
jimmybrancaccio wants to merge 1 commit into
peteromallet:mainfrom
jimmybrancaccio:fix/review-low-score-prompt-contract
Open

jimmybrancaccio wants to merge 1 commit into
peteromallet:mainfrom
jimmybrancaccio:fix/review-low-score-prompt-contract

Conversation

@jimmybrancaccio

Copy link
Copy Markdown

Problem

Focused review batches are rejected when they score a dimension below 85 without an issue, but the generated task requirements do not state that import contract. In a real project run, the abstraction-fitness reviewer twice returned a coherent 84 assessment with issues: []; both runs exited successfully and were then marked parse_failed.

Fix

State the existing low-score issue requirement directly in the shared task requirements used by batch and external review prompts. The wording also tells reviewers not to invent defects: when no issue is warranted, the score must remain consistent with that judgment.

Validation

  • python -m pytest desloppify/tests/commands/review/test_review_batch_core_direct.py -q — 22 passed
  • python -m pytest desloppify/tests/ -q — 5,811 passed, 3 skipped; one unrelated pre-existing Nim tree-sitter grammar mismatch
  • Re-ran the previously failing immutable project packet, batch 3, through the patched source; it imported successfully and produced a concrete abstraction-fitness issue with the below-85 score.

Copilot AI lite review requested due to automatic review settings September 22, 2026 06:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new import block violates the configured Ruff import-sorting rule and should be merged with the existing block.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Clarifies the low-score issue contract in shared batch/external review prompts.

Changes:

  • Adds the below-85 score requirement and anti-invention guidance.
  • Adds regression assertions for the batch prompt.
File Description
prompt_sections.py Adds shared low-score task requirements.
test_review_batch_core_direct.py Verifies the new prompt contract.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +5 to +7
from desloppify.intelligence.review.feedback_contract import (
LOW_SCORE_ISSUE_THRESHOLD,
)
github-actions Bot added a commit to citizenadam/desloppify that referenced this pull request Sep 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants