Repository navigation
Description
Problem or Motivation
#1151 deleted the persona stage of devops review, and #4827 removes the persona text of the files that it lists. Persona text and unread persona code stay in other review modules:
src/devops_cli/ai/review/pipeline.py: 7 docstrings and comments name a "persona stage" or "persona pages", andgenerate_consolidated_reporttakes apersonasparameter that no caller passes.src/devops_cli/ai/review/profile.py:3lists "persona review" and "verification" as review stages. The review has neither stage.src/devops_cli/output/formatters/panels.py:render_review_resultandrender_review_rawtake a persona, and onlytests/ai/review/test_review_runner.pycalls them.src/devops_cli/commands/review.py: the finding panel shows aPersona:badge with the producer of the finding.src/devops_cli/ai/review/adjudication.py:13names "another persona's report".
Proposed Solution & Architectural Design
- Delete the
personasparameter ofgenerate_consolidated_report, andrender_review_resultandrender_review_rawwith their test. - Name the producer, not a persona, in the finding panel.
- Rewrite the docstrings and comments so that they describe the stages that run: pre-analysis, payloads, group analysis and report.
- Alpha keeps no compatibility, so add no shim.
Target Subsystem
AI & Agentic Review Pipeline (src/devops_cli/ai/review/, src/devops_cli/commands/review.py, src/devops_cli/output/formatters/panels.py).
Existing Tool Considered
A delete and a text fix. No tool applies. Cost to build: about 50,000 tokens and 1 hour.
Acceptance Criteria
git grep -n -i persona -- src/devops_cli/ai/review src/devops_cli/output/formatters/panels.pyfinds only thepersonaread aliases of saved findings.- The finding panel of
devops review findingsnames the producer. uv run devops cipasses.
Dependencies
#4827 (pull request #5044) changes ai/review/runner.py first.
Source: #5044
Alternatives check of 2026-11-15: not-applicable.
Class: refactor, no search.
Tool: none found.
Proposed design
Problem statement
Persona review text and unread persona code remain in the review modules after the persona stage was deleted. This item removes the remaining parameter, helpers, badge and comments, and it aligns the docs with the stages that run.
Acceptance criteria
Requirement: Remove the unused persona parameter
The signature of generate_consolidated_report SHALL take no personas parameter.
Scenario: Signature has no persona parameter
- WHEN a test inspects the signature of
generate_consolidated_report - THEN the signature has no parameter named
personasand the test passes.
Requirement: Delete the persona render helpers
src/devops_cli/output/formatters/panels.py SHALL define neither render_review_result nor render_review_raw.
Scenario: Persona render helpers are gone
- WHEN a test imports
devops_cli.output.formatters.panelsand looks up each helper name - THEN the module has no attribute
render_review_resultand no attributerender_review_raw.
Requirement: Delete the persona render helper test
tests/ai/review/test_review_runner.py SHALL hold no test of render_review_result or render_review_raw.
Scenario: Persona helper test is gone
- WHEN a test searches
tests/ai/review/test_review_runner.pyfor the two helper names - THEN the search finds no reference to either helper.
Requirement: Finding panel names the producer
The finding panel of devops review findings SHALL show the finding producer and SHALL show no Persona: badge.
Scenario: Finding panel shows the producer
- WHEN a test renders a finding with producer
semgrepthrough the finding panel - THEN the output holds
semgrepand does not holdPersona:.
Requirement: Review profile lists only live stages
The module docstring of src/devops_cli/ai/review/profile.py SHALL list the stages that run and SHALL not list persona review or verification.
Scenario: Review profile names the live stages
- WHEN a test imports
devops_cli.ai.review.profileand reads its__doc__ - THEN the docstring holds
pre-analysis,payloads,group analysisandreport, and holds neitherpersona reviewnorverification.
Requirement: Adjudication names the producer
src/devops_cli/ai/review/adjudication.py SHALL name the producer of a finding and SHALL not name another persona's report.
Scenario: Adjudication names no persona
- WHEN a test reads the source text of
devops_cli.ai.review.adjudication - THEN the text holds no
another persona's reportand names the producer.
Requirement: Schema markers have no reader
Finding and ReviewResult SHALL carry no SkipJsonSchema marker, and the comment in src/devops_cli/ai/review_schema.py SHALL not say that a persona agent receives the schema.
Scenario: Schema markers are gone
- WHEN a test inspects the fields of
FindingandReviewResultand reads the comment at the schema - THEN no field carries
SkipJsonSchemaand the comment holds nopersona agenttext.
Requirement: Corpus generate prints a runnable command
The command that devops review corpus generate prints SHALL run with --dry-run and SHALL exit with code 0.
Scenario: Printed review command runs
- WHEN a test takes the
devops review pathline thatdevops review corpus generateprints, adds--dry-run, and runs it - THEN the command exits with code 0.
Requirement: Review docs name no persona review
docs/SELF_IMPROVEMENT.md SHALL hold no present-tense persona review text outside the calibration records and the A/B protocols that run old revisions.
Scenario: Review docs match the live review
- WHEN a test runs
git grep -n -i -E 'default persona|every persona|each persona|code_review_prompt|review_output_instruction|consolidate_duplicate_findings' -- docs/SELF_IMPROVEMENT.mdand skips the calibration records and A/B protocols - THEN the search finds no match.
Requirement: No persona text in review modules
The review modules SHALL hold no persona review text, except the persona read aliases of saved findings.
Scenario: Review modules hold only read aliases
- WHEN a test runs
git grep -n -i persona -- src/devops_cli/ai/review src/devops_cli/output/formatters/panels.py - THEN the search finds only the
personaread aliases of saved findings.
Requirement: CI passes
The change SHALL pass uv run devops ci.
Scenario: CI passes
- WHEN a test runs
uv run devops ci - THEN the command exits with code 0.
Existing Tool Considered
The alternatives check in the issue body gives not-applicable for this refactor and names no tool. The change builds its own code: about 50,000 tokens and 1 hour to delete the dead code and fix the text.
Key questions
- Which command should
devops review corpus generateprint for the generated corpus?: Printdevops review path <corpus>/fileswith no--alloption. (best practice) [sources: src/devops_cli/commands/review.py:2014, src/devops_cli/commands/review.py:2396-2421]- Chosen: Remove
--allfrom the printed line.review pathhas no--all, and the persona fan-out is gone. - Rejected: Add
--alltoreview path. It keeps a persona option that the review no longer has. - Rejected: Print a different command. The corpus generator names
review path; no other command reads the corpus.
- Chosen: Remove
- Do the
SkipJsonSchemamarkers ofFindingandReviewResultstill have a reader?: No. No review call sends theFindingorReviewResultschema to a model. Remove the markers and the comment that names a persona agent. (best practice) [sources: src/devops_cli/ai/review_schema.py:521-525, src/devops_cli/ai/review/pipeline.py]- Chosen: Remove the markers and the comment. No review call sends the schema, so the markers guard no reader.
- Rejected: Keep the markers and rewrite the comment. The markers stay as unread code.
- Rejected: Keep both and record a follow-up. The item removes unread persona code now; a follow-up leaves the text.
- How should the finding panel show the producer of a finding?: Show
Producer: <producer>from the saved finding and remove thePersona:badge. (best practice) [sources: CONTEXT.md, src/devops_cli/ai/review_schema.py, src/devops_cli/commands/review.py]- Chosen: Show
Producer: <producer>. The finding carries the producer that its anchor records. - Rejected: Show the anchor type. The producer names the tool or fact; the anchor is a separate record.
- Rejected: Show no badge. The producer is useful and the issue asks to name it.
- Chosen: Show
- Which stages should the rewritten review docstrings and comments list?: List pre-analysis, payloads, group analysis and report. [sources: src/devops_cli/ai/review/pipeline.py, src/devops_cli/ai/review/profile.py]
- Which guardrails should
docs/SELF_IMPROVEMENT.mdname in place of the removed persona files?: Namesrc/devops_cli/ai/tasks/review_group_analysis.md:8and:19andsrc/devops_cli/ai/review/pipeline.py:3151-3162. [sources: src/devops_cli/ai/tasks/review_group_analysis.md:8, src/devops_cli/ai/tasks/review_group_analysis.md:19, src/devops_cli/ai/review/pipeline.py:3151-3162] - Should the docs keep the DevSecOps persona guardrail?: No. The rule at
src/devops_cli/ai/personas/devsecops/prompt.md:20reaches onlydevops ai chat, so the review docs must not say that it guards the review. [sources: src/devops_cli/ai/personas/devsecops/prompt.md:20, docs/SELF_IMPROVEMENT.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Dead parameter and misleading comment removal with no user-facing behaviour change.Both delete persona leftovers from the review system, but in different files and with different acceptance criteria.dan-petty commentedon Nov 12, 2026
Scope addition from the review of #5044. The pull request merged before these fixes, so this issue now holds them.
Persona review text that stays on
main(65473bc):src/devops_cli/commands/review.py:2014:devops review corpus generateprintsReview it: devops review path <corpus>/files --all.review pathhas no--alloption, so the printed command stops withNo such option: --all.docs/SELF_IMPROVEMENT.md, section 2 step 4: "The persona agent is shown a reply schema of only the fields a reviewer writes". No review call sends theFindingorReviewResultschema to a model now: no caller passes them tochat_structuredor to anoutput_type.docs/SELF_IMPROVEMENT.md, section 4 (sample validation): "It uses the default persona, or every persona with--all."samples validate --reviewruns a plainreview pathwithno_cache=True(commands/review.py:2396-2421).docs/SELF_IMPROVEMENT.md, section 5.1: the failure text says in the present tense that "each persona" causes the fan-out, and the guardrails namecode_review_prompt.md,review_output_instruction.mdandconsolidate_duplicate_findings. These do not exist. The current guardrails areai/tasks/review_group_analysis.md:8(the model must not originate a finding),:19(same-root-causeonly on a shared correlation key) andai/review/pipeline.py:3151-3162(one finding per fingerprint and location).docs/SELF_IMPROVEMENT.md, section 5.2: the "Persona" guardrail says the DevSecOps persona guards the review. Its rule (ai/personas/devsecops/prompt.md:20) reaches onlydevops ai chatnow.src/devops_cli/ai/review_schema.py:521-525: the comment says that a finding's JSON schema "is the reply format a persona agent is shown". Decide if theSkipJsonSchemamarkers ofFindingandReviewResultstill have a reader.Add to the acceptance criteria:
devops review corpus generateprints runs. A test can take the printeddevops review pathline, add--dry-runand expect exit code 0. Before the fix it exits with code 2.docs/SELF_IMPROVEMENT.mdhas no present-tense persona review text outside the calibration records and the A/B protocols that run old revisions.A fix for all items but the last one is written and tested: the new test failed before the change (exit code 2) and passed after it, and
devops ci docsand the doc tests passed. The builder of this issue can get the patch from the agent that ran the #5044 review.devops-cli-service commentedon Nov 15, 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-15. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 20, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.