Skip to content

fix(roadmap): cut prose after a cited stage command #4956

Closed

Description

@dan-petty

Problem Description

The command citation gate of devops roadmap stage (src/devops_cli/roadmap/stage/stage_commands.py, #4197) reads a cited devops command in prose with no code span. _COMMAND_PROSE_PATTERN takes every word after uv run devops to the end of the sentence, and a text that starts with uv run devops or devops is taken whole. The gate then gives the English words after the command to the command resolver as arguments. The resolver refuses them as an unknown command or an unexpected extra argument, so the gate refuses a good plan.

The stage replay of the recorded plans shows this false refusal in 6 of 54 recorded plans (cases 2152, 2175, 2258, 2260, 2524, 2946).

Reproduction Steps

  1. Give command_citation_problems a plan whose Feasibility holds the sentence of case 2152: First checks the implementation runs: uv run pytest tests/test_reference_extractor.py tests/test_builtin_tools.py -k 'numeric or ip' to confirm existing tests pass before and after the change; uv run devops ci to confirm the full gate including the constructs row passes.
  2. Read the problems that it returns.

Expected vs Actual Behavior

Expected: no problem. devops ci is a real command, and the words after it are prose.

Actual: The plan cites uv run devops ci to confirm the full gate including the constructs row passes: unknown command 'to' under 'devops ci'.

Other cases of the replay:

  • 2175: uv run devops ci and confirm exit code 0 ...: unknown command 'and' under 'devops ci'.
  • 2524: uv run devops roadmap intake command with gh issue create: unexpected extra argument 'command with gh issue create' for 'devops roadmap intake'.
  • 2946: uv run devops ci to verify the full CI passes: unknown command 'to' under 'devops ci'.
  • 2258 and 2260: one sentence cites 3 commands, and the first command takes all words to the end of the sentence, the next commands included.

Proposed fix: in prose, end the cited command line at the first word that the command tree does not list as a command name or an option. A group that needs a subcommand keeps the next word as its subcommand, so an unknown subcommand is still refused. A code span keeps the full check. The gate must still refuse an unknown option in prose, such as uv run devops ssh list --dry-run (cases 2258 and 2260), and every refusal of a code span (cases 2130 and 3205).

Environment Diagnostics

origin/main at 6c8e1bd (release 0.117.0). uv run devops roadmap eval stage --replay and the recorded plans in tests/fixtures/roadmap_eval/stage/.

Logs, Traces, or Terminal Output

Replay of the recorded plans with the code of main (case 2152): new_refusals_by_now_code.citation = ["The plan cites uv run devops ci to confirm the full gate including the constructs row passes: unknown command 'to' under 'devops ci'."]. The replay of 2026-11-08 code did not give this refusal; #4197 merged on 2026-11-09 00:35Z.

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 12, 2026
  2. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Priority: P2-Medium. The bug refuses good plans in 6 of 54 recorded plans and blocks the stage gate.
    • Value: Medium. The fix removes false refusals and makes the roadmap stage gate reliable for plan authors.
    • Effort: Medium. The fix needs command tree parsing, prose boundary rules and regression tests for cited commands.
    • Related: feat(roadmap): Resolve devops commands and flags cited in a plan #3302, which asks for a different change. Both items concern devops commands cited in a plan; #3302 adds command resolution and this candidate corrects the prose parsing in that gate.
  3. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. Six of 54 recorded plans are falsely refused, blocking valid stage plans but not all of them.
    • Value: Medium. Valid plans are rejected, causing rework and friction for every affected plan.
    • Effort: Medium. Requires changing the prose pattern to stop at the first non-command word while preserving subcommand and option handling.
    • Related: feat(roadmap): Resolve devops commands and flags cited in a plan #3302, which asks for a different change. #3302 introduced the command resolver that this bug misuses in prose; the candidate fixes a parsing defect in that feature.
  4. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 12, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 12, 2026
  6. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-12 15:46 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/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions