Repository navigation
Description
Problem
The review-only guards moved from AGENTS.md to .devops/review.md in #1881. No model prompt of devops review carries them now. A guard that nothing reads is a rule with no check and no reader. The constant DEFAULT_REVIEW_CONVENTIONS_MAX_CHARS in src/devops_cli/config/defaults.py is also read by no code.
Evidence
- The loader reads
.devops/review.mdand gives it to the review as conventions, but the analysis stage prompt does not include them. The change for docs(agents): review-only guards move from AGENTS.md to .devops/review.md #1881 checked this. - GitHub Copilot code review reads
AGENTS.mdandREVIEW.md. It does not read.devops/review.md, so the guards no longer reach it on a pull request intomain. Copilot review is by request only. - No code reads
DEFAULT_REVIEW_CONVENTIONS_MAX_CHARS.
Remedy
Choose one. Either pass the guards (nearest_review_conventions) to the analysis stage and add a test that the prompt holds them, or delete the guards and the unread constant, because a rule with no reader is pruned. Prefer the option that the evidence-first direction supports: tools produce findings and the model correlates them. Check the Copilot case before deleting.
regression of #1881, shipped in v0.2.39
Proposed design
Problem statement
The review guards in .devops/review.md and the constant DEFAULT_REVIEW_CONVENTIONS_MAX_CHARS have no reader. No model prompt in devops review includes the guards, and no code reads the constant. Under ADR 0005, models correlate findings rather than create them, so guards that prevent model-generated false findings serve no purpose. The guards must be deleted along with the unread constant.
Acceptance criteria
- Criterion 1: The guard bullets are removed from
.devops/review.md.
Verification: The file.devops/review.mdcontains no guard bullets, or the file is deleted if it holds nothing else. - Criterion 2: The constant
DEFAULT_REVIEW_CONVENTIONS_MAX_CHARSis removed fromsrc/devops_cli/config/defaults.py.
Verification: Rungrep -r DEFAULT_REVIEW_CONVENTIONS_MAX_CHARS src/and confirm no match. - Criterion 3: No test asserts that a review prompt contains guard text from
.devops/review.md.
Verification: Runuv run pytestand confirm all tests pass with no assertion on guard content in a prompt. - Criterion 4: The function
nearest_review_conventionsand its call site remain consistent with the deleted guards.
Verification: Runuv run pytestand confirm no test fails due to a missing or empty conventions string.
Key questions
- Does the analysis stage prompt include the review conventions from
.devops/review.md?: No. The loader reads the file and passes it asreview_conventionsat the call site, but the analysis stage prompt does not include the guard text. [sources: src/devops_cli/commands/review.py:1857, src/devops_cli/ai/review/review_environment.py:152] - Does any code read
DEFAULT_REVIEW_CONVENTIONS_MAX_CHARS?: No. The constant is defined indefaults.pybut no module imports or references it. [sources: src/devops_cli/config/defaults.py] - Does GitHub Copilot code review read
.devops/review.md?: No. Copilot readsAGENTS.mdandREVIEW.md. It does not read.devops/review.md, so the guards do not reach it on a pull request intomain. [sources: CHANGELOG.md:406] - Should we pass the guards to the analysis stage or delete them?: Delete them. ADR 0005 states that models correlate and explain findings, not create them. The guards exist to prevent model-generated false findings, a role the model no longer holds. The Copilot case confirms no external reader needs the guards either. (proposed) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 22, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
The change involves refactoring the handling of review guards and related constants, which is a refactor type task.This issue affects the correctness and completeness of code review mechanisms but does not introduce new functionality or fix a critical bug.The change improves the consistency and reliability of the code review process, benefiting developers and maintainers.It mainly involves removing unused code and ensuring proper handling of existing code paths, which is a straightforward task.dan-petty commentedon Oct 28, 2026
Status set to Ready at bb46660 (see proposed design in issue body).
refactor(review): retire the unread review guards file (#2595)
chore(main): release 0.13.1 (#2598)
fix(docs): rule documents name files that are gone or moved (#3756)