Repository navigation
Description
Problem or Motivation
Found while building #1916 (origin/main 46958d4, 2026-10-29). devops review reads the target project's general conventions (AGENTS.md and its peers) but never gives them to a model, and it records a digest of them that no code sets.
ReviewProfiler.set_conventions(src/devops_cli/ai/review/profile.py) has no caller insrc, only in a test. Soprofile.json'sconventions_digestis empty for every real session, anddevops ai runs comparecompares empty digests.nearest_conventions(src/devops_cli/ai/review/review_environment.py) has one caller:devops review corpus generate, which copiesAGENTS.mdinto the corpus._materialize_pr_head(src/devops_cli/ai/review/runner.py) copies the base'sAGENTS.mdand its peers into a pull request checkout. No prompt builder reads either copy.src/devops_cli/ai/tasks/review.mdline 7 tells the model to judge against the conventions the target declares, but the model never receives them.docs/SELF_IMPROVEMENT.md(the feat(review): review prompts state a threat model and an evidence bar, and send nothing the pipeline does not use #951 and fix(review): the devsecops persona reports misconfiguration and error-handling defects again, scored against a fixed recall set #1015 measurement protocols) describes a conventions swap per arm that the profile records asconventions_digest.
Proposed Solution & Architectural Design
Decide with ADR 0005 (tools originate findings; the model explains them) and record the evidence:
- either the group analysis prompt receives the target's conventions, bounded in size, and the profile records their digest; a test holds both;
- or the conventions plumbing goes:
nearest_conventionsand its walk, the corpus and pull request copies,set_conventions,conventions_digest, the line inai/tasks/review.md, and the protocol text.
Target Subsystem
devops review: ai/review/profile.py, ai/review/review_environment.py, ai/review/runner.py, ai/review/defects.py, ai/tasks/review.md, docs/SELF_IMPROVEMENT.md.
Existing Tool Considered
Nothing new is built either way. The analysis prompt and the profile already exist.
Related
#1916 retires .devops/review.md for the same reason.
Alternatives check of 2026-11-04: not-applicable.
Class: refactor, no search.
Tool: none found.
Proposed design
Problem statement
devops review reads the target's general conventions (AGENTS.md and its peers) but no prompt builder receives them. ReviewProfiler.set_conventions has no caller in src, so conventions_digest is empty in every real session. The code, the task file and the documents claim a feature that does not exist. ADR 0005 and docs/SELF_IMPROVEMENT.md say that no review stage gives project rules to the model. The change removes the dead conventions plumbing, so that the code and the documents agree.
Acceptance criteria
Requirement: Profile holds no conventions digest
The review profile SHALL NOT define conventions_digest, and ReviewProfiler SHALL NOT define set_conventions.
Scenario: Profile fields and an old profile file
- WHEN A test builds a profile and loads a saved
profile.jsonthat still holds the keyconventions_digest. - THEN The profile has no
conventions_digestfield,ReviewProfilerhas noset_conventions, and the old file loads with no error.
Requirement: Review environment has no conventions reader
The module review_environment SHALL NOT define nearest_conventions, its directory walk or the list of conventions file names.
Scenario: Module names
- WHEN A test lists the names of
devops_cli.ai.review.review_environment. - THEN The names
nearest_conventionsand_TARGET_CONVENTIONS_CANDIDATESare absent, andreviewed_treeandvalidate_criteria_commandstill work.
Requirement: Pull request checkout copies only changed files
_materialize_pr_head SHALL write only the head version of each changed file and SHALL NOT copy conventions files from the base.
Scenario: Base has AGENTS.md and the pull request changes one source file
- WHEN A test runs
_materialize_pr_headwith a fake GitHub client whose base holds AGENTS.md and whose pull request changessrc/a.py. - THEN The destination directory holds
src/a.pyand holds noAGENTS.md.
Requirement: Defect corpus copies no conventions
devops review corpus generate SHALL NOT copy AGENTS.md or a peer conventions file into the corpus.
Scenario: Source with AGENTS.md
- WHEN A test generates a corpus from a source directory that holds an
AGENTS.mdfile. - THEN The corpus directory holds no
AGENTS.mdfile.
Requirement: Task prompt makes no claim about conventions
The task file ai/tasks/review.md SHALL NOT tell the model to judge against conventions that the review does not give to it.
Scenario: Prompt text
- WHEN A test reads
ai/tasks/review.md. - THEN The text names no
AGENTS.md,CLAUDE.mdor conventions file that the target declares.
Requirement: Documents match the code
docs/SELF_IMPROVEMENT.md SHALL NOT name conventions_digest or describe a conventions swap per arm.
Scenario: Document text
- WHEN A test reads
docs/SELF_IMPROVEMENT.md. - THEN The text holds neither
conventions_digestnor a step that swaps conventions between arms.
Existing Tool Considered
No open tool applies. The alternatives check gave not-applicable, class refactor. The change builds no code. It deletes about 100 lines of dead code, doc
Key questions
None.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Oct 29, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
The title is prefixed refactor and the body proposes either wiring existing plumbing or deleting it.Dead plumbing and an always-empty digest cause no active break; the fix is a design decision, not a user-facing defect.The conventions digest is always empty, so devops ai runs compare compares nothing, and the model never receives target conventions.Either wire conventions into one prompt and set the digest, or remove five or more references across four files and two docs.Both address conventions discovered by devops review but never delivered to a model prompt. The candidate targets AGENTS.md and the digest; #1916 targets .devops/review.md.devops-cli-service commentedon Oct 30, 2026
Status set to Ready at 18a6e2b (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
The stage job returned the item to New. The premise of the issue does not hold at the staging commit, so the job planned no change and opened no pull request.
Evidence:
placeholder
devops-cli-service commentedon Nov 4, 2026
Alternatives check: not-applicable
Class: refactor. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-04. A person decides what this means for the item. The check changes no label and closes no issue.
[-]refactor(review): no review prompt reads the target's AGENTS.md, and the profile's conventions digest is never set[/-][+]refactor(review): Pass AGENTS.md to the review prompt and set digest[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 96 characters, and the limit is 60. The type and the scope stay.
refactor(review): no review prompt reads the target's AGENTS.md, and the profile's conventions digest is never setrefactor(review): Pass AGENTS.md to the review prompt and set digestdevops-cli-service commentedon Nov 9, 2026
Status set to Ready at 2f20244 (see proposed design in issue body).