Skip to content

fix(roadmap): the review prompt gives the repair rounds of the setting #5491

Open
0 of 1 issue completed

Description

@dan-petty

Problem Description

The review prompt of the stage job, src/devops_cli/ai/tasks/roadmap_stage_verify_tools.md, tells the review model that an open finding sends the plan back "up to two repair rounds". The rounds are the setting roadmap.stage.verify_repair_rounds (default 2), and one more round can follow while a review fixes more findings than it adds, up to roadmap.stage.verify_repair_rounds_ceiling. The live ConfigMap sets verify_repair_rounds: 4, so the prompt gives the model a wrong count.

Reproduction Steps

  1. Read line 5 of src/devops_cli/ai/tasks/roadmap_stage_verify_tools.md at origin/main.
  2. Compare it with roadmap.stage.verify_repair_rounds in docs/CONFIGURATION.md and with the live value 4.

Expected vs Actual Behavior

Expected: the prompt gives the rounds from the settings, as the call budget of the same prompt does with {{review_calls_advised}} (#5440), or it gives no number.
Actual: the prompt always says two rounds.

Environment Diagnostics

The prompt file in the repository; the live ConfigMap devops-cli-config.

Logs, Traces, or Terminal Output

No log. Found in the review of the pull request of #5440 (Refs #5440).

Dependencies

None.

Alternatives check of 2026-11-29: none.
Tool: none found.
Reason: Searches returned only generic templating and Prompt API documentation, no open tool that feeds project settings into a prompt file. The need is a text edit plus two placeholders on the existing render path.

Lacks:

  • No tool renders this prompt from the repair-round settings
  • No external tool can change the hardcoded two-round sentence
  • Existing placeholders in the prompt already come from the project's own render path

Proposed design

Problem statement

The stage review prompt hardcodes up to two repair rounds. The setting roadmap.stage.verify_repair_rounds can differ, and the live ConfigMap sets it to 4, so the review model receives a wrong count. The change replaces the literal with two placeholders that the existing render path fills from roadmap.stage.verify_repair_rounds and roadmap.stage.verify_repair_rounds_ceiling.

Acceptance criteria

Requirement: Base repair rounds from the setting

The stage review prompt SHALL render its base repair-round count from roadmap.stage.verify_repair_rounds and SHALL NOT contain the literal up to two repair rounds.

Scenario: Configured base count

  • WHEN A test renders the stage review prompt with roadmap.stage.verify_repair_rounds set to 4.
  • THEN The rendered prompt contains up to 4 repair rounds and contains no up to two repair rounds.

Requirement: Repair-round ceiling from the setting

The stage review prompt SHALL state the extra-round condition and SHALL render its total ceiling from roadmap.stage.verify_repair_rounds_ceiling.

Scenario: Configured ceiling

  • WHEN A test renders the stage review prompt with roadmap.stage.verify_repair_rounds_ceiling set to 5.
  • THEN The rendered prompt contains One more round can follow while a review fixes more findings than it adds and up to 5 repair rounds in total.

Requirement: Default repair rounds

The stage review prompt SHALL show the base count 2 and the total ceiling 4 when the repair-round settings are unset.

Scenario: Default settings

  • WHEN A test renders the stage review prompt with neither repair-round setting set.
  • THEN The rendered prompt contains up to 2 repair rounds and up to 4 repair rounds in total.

Requirement: No unresolved placeholder

The rendered stage review prompt MUST contain no unreplaced {{verify_repair_rounds}} or {{verify_repair_rounds_ceiling}} placeholder.

Scenario: Placeholders are filled

  • WHEN A test renders the stage review prompt with the default settings.
  • THEN The rendered prompt contains neither {{verify_repair_rounds}} nor {{verify_repair_rounds_ceiling}}.

Existing Tool Considered

The alternatives check of 2026-11-29 in the issue body gives the verdict none with no tool. The block lists what no tool covers: no tool supplies the configured repair-round values to this prompt file. The change builds the two placeholders itself, on the render path that already fills {{review_calls_advised}}. Written cost: about 1,000 tokens to build, near zero tokens to keep and fix, and under one hour.

Key questions

  • Which settings hold the base repair-round limit and its ceiling?: roadmap.stage.verify_repair_rounds defaults to 2 and roadmap.stage.verify_repair_rounds_ceiling defaults to 4, as RoadmapStageConfig declares them. [sources: docs/CONFIGURATION.md, src/devops_cli/config/settings.py]
  • Does the stage review prompt already take runtime values through placeholders?: Yes. The prompt holds {{review_calls_advised}} and {{review_calls_notice}}, and the render path fills them before the model reads the prompt. [sources: src/devops_cli/ai/tasks/roadmap_stage_verify_tools.md]
  • How does the prompt state the repair-round limit?: Use {{verify_repair_rounds}} for the base count and {{verify_repair_rounds_ceiling}} for the total, and fill both from the settings in the render path that fills {{review_calls_advised}}. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_verify_tools.md, docs/CONFIGURATION.md]
    • Chosen: Placeholder for base and ceiling. It follows the existing call-budget placeholders and stays correct when either setting changes.
    • Rejected: Placeholder for base only. It understates the maximum when a review grants an extra round.
    • Rejected: Remove the number. It loses useful guidance and departs from the existing placeholder pattern.
    • Rejected: Hardcode the live value 4. It becomes wrong again when the setting changes.
  • Which sentence carries the extra-round condition?: State the condition once, after the base count: One more round can follow while a review fixes more findings than it adds, up to {{verify_repair_rounds_ceiling}} repair rounds in total. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_verify_tools.md, docs/CONFIGURATION.md]
    • Chosen: One sentence after the base count. It keeps the rule next to the count and keeps the instruction block compact.
    • Rejected: A separate paragraph. It splits one rule across the prompt and costs the model more reads.
    • Rejected: No ceiling text. The model then cannot know the maximum number of rounds.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Sub-issues

Sub-issues

0 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 13, 2026
  2. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 13, 2026
  4. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: The searches turned up only general-purpose template engines (Jinja2 and Docker images of it, Python/Django template primers), none of which knows the roadmap settings or the extra-round rule. The prompt file already gets its values through the project's own {{...}} substitution ({{review_calls_advised}} from #5440), so the fix is one line of prompt text plus its value in the existing render path, not a tool to adopt.

    Tool: none found

    Lacks:

    • No external tool supplies the configured roadmap.stage.verify_repair_rounds value to this prompt file
    • No external tool supplies or applies roadmap.stage.verify_repair_rounds_ceiling for the extra round granted while a review fixes more findings than it adds
    • A general template engine would only re-implement the {{...}} placeholder rendering the prompt file already uses for {{review_calls_advised}}
    • The change is prompt text inside this repository, which no library can make correct on its own

    Tools considered:

    Searches run:

    • devops-cli roadmap_stage_verify_tools.md review_calls_advised prompt, results: 5
    • pydantic-ai prompt template placeholders render settings, results: 5
    • Jinja2 render markdown prompt template with config values python, results: 5
    • dan-petty devops-cli roadmap stage verify tools prompt template, results: 5
    • Jinja2 template engine documentation, results: 5
    • python string.Template substitute placeholders, results: 5
    • jinja2, results: 5
    • devops-cli github dan-petty roadmap, results: 5
    • prompt template configurable values promptfoo, results: 5
    • python template file substitute placeholder values from config settings lightweight library, results: 5

    Sources:

    Checked on 2026-11-17. A person decides what this means for the item. The check changes no label and closes no issue.

  5. added
    status/ready
    and removed
    status/new
    on Nov 18, 2026
  6. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 2b7f32c (see proposed design in issue body).

  7. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.

  8. added
    status/new
    and removed
    status/ready
    on Nov 27, 2026
  9. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  10. added
    status/ready
    and removed
    status/new
    on Dec 1, 2026
  11. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  12. added
    owner/service
    and removed
    owner/service
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/roadmapsource/agentstatus/readytype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions