Skip to content

fix(roadmap): the stage command check refuses text that is no command #7927

Done

Description

@dan-petty

Problem Description

The command check of the stage job refuses text that is no command. The check is command_citation_problems in src/devops_cli/roadmap/stage/stage_commands.py. The gate is citation, and the code is stage_problem_command_reference. A false refusal costs one more reply of the model, and an item can end with no plan.

Reproduction Steps

Give command_citation_problems a plan with one of these feasibility lines.

  1. A code span that is the name of a spec requirement:
For the requirement `devops pr describe has a JSON format`, write a test.
  1. A quoted source line that holds backticks. The citation rules ask the model for such a quote:
`read_file` showed `docs/ENV_VARS.md:3:Generated by `uv run devops docs generate` from `src/x.py`. Do not edit.

Expected vs Actual Behavior

Expected: the check returns no problem for the two lines.

Actual for line 1: missing required parameter '--summary' for 'devops pr describe'. 33 requirement names in openspec/specs start with devops . A plan that changes one of them must name it. A new requirement of the reply has the same problem.

Actual for line 2: unknown command 'generate' under 'devops docs'`. The backticks of the quote break the pairs of the line, so the check reads the command as prose and keeps the closing backtick in its last word.

A paired plan-only run of Ready items on two models recorded these refusals. stage_problem_command_reference was the second most frequent refusal for each model, and most of its findings had the first form.

Acceptance criteria

  • A code span that is the name of a requirement of a base spec, or of the spec delta of the reply, gives no command problem.
  • A quoted line that holds a command between backticks gives no command problem when the command resolves.
  • A wrong command is still refused, as a code span and in a sentence.

Environment Diagnostics

  • DevOps CLI Version: 0.264.1
  • Python Version: 3.14
  • Execution Environment: DevContainer

Activity

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

    @dan-petty
    OwnerAuthor
    • Priority: False refusals cause extra model replies (increased AI spend) and can leave items with no plan.
    • Related: fix(roadmap): cut prose after a cited stage command #4956, which asks for a different change. Both target the command citation gate in stage_commands.py, but 4956 fixes prose words being appended to a valid command, while the candidate fixes non-command code spans and broken backtick pairs being misread as commands.
  3. added
    effort/medium
    priority/p1-high
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 30, 2026
  4. removed
    status/in-review
    on Nov 30, 2026
  5. devops-cli-service commented on Nov 30, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-30 22:54 UTC

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/mediumpriority/p1-highscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions