Skip to content

feat(roadmap): devops roadmap explain names why stage and implement take or skip an item #2911

Description

@dan-petty

What happened

The owner asked on 2026-10-31 for one issue workflow that is simple, clear, discrete, consistent and repeatable for the Service jobs, agentic coders and human developers. The plan and the owner's decisions are in the tracker issue. Decisions taken (the recommended defaults): add the label status/planned (amends ADR 0016); claim an item with labels owner/service, owner/agent and owner/human; a new runner image digest clears a stop once; any actor may claim an item, one at a time, a person's claim beats the Service's, and the Service never takes a claimed item.

devops roadmap implement --plan printed "No item to implement" on 2026-10-31 while #2147 and #2747 were Ready and planned. The reason (both are effort/medium, the filter asks for low effort) is nowhere in the output. A person or an agent reads the code to find it.

What should happen

  • devops roadmap explain <issue> prints, for the stage job and for the implement job, a yes or a no, and for a no, the first rule that fails: the filter family and value, the owner (W3), the stop record and the number of rounds, a missing plan or branch, the group budget, the repository limit of the round.
  • The "left out" lists of stage --plan and implement --plan name an item that matched no filter only when asked (--why), and show the same reason text.
  • The reason texts live in one place (lang/en), used by both commands.

Evidence

  • The plan output of 2026-10-31 and roadmap/stage.py, roadmap/implement.py (the selection code).

Acceptance criteria

  • explain names the failing rule for an item of medium effort, a claimed item, a stopped item and an unplanned item.
  • explain makes no model call and no write.
  • --dry-run rules hold (it makes only the reads it needs).
  • uv run devops ci passes.

Proposed design

Problem statement

When the stage or implement job skips an item, the output says only "No item to implement". The reason, such as a mismatch on the effort filter, is not shown. A person or an agent must read the selection code to find the cause. This issue adds an explain command and a --why flag so that the first failing rule is named in plain text.

Acceptance criteria

Requirement: explain names the failing rule for a medium-effort item

The explain command SHALL name the filter family and value that rejected an item whose effort is medium when the filter asks for low.

Scenario: medium effort item rejected by low-effort filter

  • WHEN An item has effort/medium and the filter asks for effort/low
  • THEN The output names the filter family effort and the value low as the first failing rule

Requirement: explain names the failing rule for a claimed item

The explain command SHALL name the owner label that blocks an item claimed by another actor.

Scenario: claimed item rejected by owner rule

  • WHEN An item carries owner/human and the Service attempts to take it
  • THEN The output names the owner rule and the label owner/human as the first failing rule

Requirement: explain names the failing rule for a stopped item

The explain command SHALL name the stop record and the number of rounds that block a stopped item.

Scenario: stopped item rejected by stop record

  • WHEN An item has a stop record with two rounds used
  • THEN The output names the stop record and the round count as the first failing rule

Requirement: explain names the failing rule for an unplanned item

The explain command SHALL name the missing plan or branch that blocks an item that is not Planned.

Scenario: unplanned item rejected by missing plan

  • WHEN An item has no change folder on the default branch and no branch on origin
  • THEN The output names the missing plan or branch as the first failing rule

Requirement: explain makes no model call and no write

The explain command SHALL make no model call and no write to GitHub or the repository.

Scenario: explain is read-only

  • WHEN A person runs devops roadmap explain on any item
  • THEN No model API call is made and no issue, label, or file is modified

Requirement: dry-run rules hold

The explain command under --dry-run SHALL make only the reads it needs and no writes.

Scenario: dry-run explain makes only reads

  • WHEN A person runs devops roadmap explain with --dry-run
  • THEN Only read operations against GitHub and the local repository occur

Requirement: why flag shows reason for left-out items

The --why flag on stage --plan and implement --plan SHALL name each item that matched no filter and show the same reason text as explain.

Scenario: why flag lists left-out items with reason

  • WHEN A person runs devops roadmap implement --plan --why and an item is left out by the effort filter
  • THEN The output names the item and shows the same reason text that explain would show

Requirement: reason texts live in one place

The reason texts SHALL live in one module under lang/en and be used by both the explain command and the --why flag.

Scenario: single source of reason texts

  • WHEN The explain command and the --why flag produce a reason for the same rule
  • THEN Both read the text from the same lang/en module

Requirement: ci passes

The command uv run devops ci SHALL pass after the change.

Scenario: ci suite passes

  • WHEN A person runs uv run devops ci on the branch
  • THEN All checks complete with a passing status

Existing Tool Considered

No check has run. The selection logic is project-specific code in roadmap/stage.py and roadmap/implement.py. No open, maintained tool covers explaining why a project-specific multi-rule selection filter rejected an item. The written cost is the tokens to build the explain subcommand, the shared reason-text module in lang/en, and the --why flag wiring, plus the tokens to keep them in sync with the selection logic until it matches the tool.

Key questions

  • Where do the reason texts live?: In one module under lang/en, used by both the explain command and the --why flag. (proposed)
    • Chosen: lang/en module. The body records this as the owner decision. One place avoids drift between stage and implement.
    • Rejected: Inline in each command. Duplicated text would drift when a rule changes. Rejected.
  • What is the order of rule evaluation in explain?: The body lists the order: filter family and value, owner (W3), stop record and number of rounds, missing plan or branch, group budget, repository limit of the round. The first failing rule is reported and evaluation stops. (proposed)
    • Chosen: Fixed order, stop at first failure. The body names the order. Stopping at the first failure gives one clear reason and matches the acceptance criteria.
    • Rejected: Evaluate all rules, list every failure. More output than the body asks for. The body says the first rule that fails.
  • Does explain reuse the existing filter functions from stage and implement?: Yes. The explain command calls the same filter functions that roadmap/stage.py and roadmap/implement.py use, so the reason is always in sync with the selection logic. (proposed)
    • Chosen: Reuse existing filter functions. One source of truth for the rules. A change to a filter is reflected in explain automatically.
    • Rejected: Duplicate filter logic in explain. Two copies would drift. Rejected.
  • What does --why show on stage --plan and implement --plan?: It names each item that matched no filter and shows the same reason text as explain. Items that were selected are not listed. (proposed)
    • Chosen: List only left-out items with reason. The body says it names an item that matched no filter. This is the minimal useful output.
    • Rejected: List all items with their status. More output than the body asks for. The selected items are already shown.

Open questions

  • Does explain make a model call? (missing verified source)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Oct 31, 2026
  2. dan-petty commented on Oct 31, 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/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It removes a manual code-reading step for every skipped item but does not block delivery.
    • Value: Medium. A person or agent no longer reads source code to find why an item was skipped.
    • Effort: Medium. It needs a new subcommand, a shared reason-text module, and wiring into two existing --plan outputs.
    • Related: feat(roadmap): Define one shared workflow for all roadmap actors #2908, which asks for a different change. Both belong to the same issue workflow; #2908 is the umbrella for the whole workflow, while the candidate adds the explain command and --why flag as one sibling step.
  3. added
    priority/p2-medium
    on Oct 31, 2026
  4. added
    owner/agent
    on Oct 31, 2026
  5. devops-cli-service commented on Oct 31, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 91a971e until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • Does explain make a model call? (missing verified source)
  6. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Oct 31, 2026
  7. removed
    status/in-review
    owner/agent
    on Nov 1, 2026
  8. added a commit that references this issue on Nov 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/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions