Repository navigation
Description
Problem or Motivation
src/devops_cli/commands/roadmap.py holds all twelve top-level commands in 920 lines, but the eval commands have their own files. The commands are of three kinds, and one flat list mixes them:
- Pipeline jobs:
intake,refine,alternatives,stage,implement,run. - Item operations:
claim,release,return,explain,inbox. - Evaluations: the
evalgroup.
The description of the group says "Read and write the roadmap on GitHub, its source of truth: issues, their labels and milestones". It no longer says that the group runs the plan and implement pipeline. #1359 would add a thirteenth command, onboard.
Proposed Solution & Architectural Design
- Split
commands/roadmap.pyinto one file for the jobs, one for the item operations, and keep theevalfiles. A smallroadmap.pycreates the group and adds the three. - Keep every command name, option and output. This issue changes where the code lives, not what the commands do.
- Move the helpers that several commands share (
_open_store,_target,_exit_on_failure,_one_mode,_refuse) into one module that the three files import. - Write the group description so that it names the pipeline.
- Do not start this before the pull requests that now change the stage and implement code are merged (feat(roadmap): the stage job verifies its plan with a model #3182, and the plans for feat(roadmap): the stage job probes the premise at the staging commit and returns an item whose premise is false #3011, fix(roadmap): the stage job requires devops ci test verify commands and mirrored test paths #3015, fix(roadmap): the stage job refuses a plan whose group reads a path that a later group creates #3017 and feat(roadmap): the stage job maps each acceptance criterion of the issue to a task group #3019), to avoid merge conflicts.
Open question for the refine step: whether the help tests, the generated command reference and the MCP tool list depend on the module that holds a command. A snapshot or a test that reads the module path would need an update.
Target Subsystem
src/devops_cli/commands/roadmap.py and the new files next to it.
Existing Tool Considered
No open tool splits a Typer command module. The change is a move of existing code with no new behavior. The cost is about 60k tokens and 3 hours to build, and nothing to keep. The existing tests are the proof that the behavior is the same.
Alternatives check of 2026-11-05: not-applicable.
Class: refactor, no search.
Tool: none found.
Proposed design
Problem statement
The devops roadmap Typer group holds all top-level commands in one 920-line module. This mixes pipeline jobs, item operations and sub-apps. The change moves the commands into modules by kind. It keeps every command name, option and output unchanged. It also makes the group help name the plan and implement pipeline.
Acceptance criteria
Requirement: Roadmap group entry point
The module src/devops_cli/commands/roadmap.py SHALL create the roadmap Typer app and register the job commands, the item commands and the eval, review and step sub-apps.
Scenario: Import the group app
- WHEN A test imports devops_cli.commands.roadmap.app and reads its registered command names and sub-app names.
- THEN The test asserts that every command and sub-app name that the base commit registers is still registered.
Requirement: Job commands in the job module
The job commands intake, refine, alternatives, retitle, consolidate, stage, implement and run SHALL be defined in src/devops_cli/commands/roadmap_jobs.py.
Scenario: Job command module
- WHEN A test imports devops_cli.commands.roadmap.app and reads the callback of each job command.
- THEN The test asserts that each callback has module equal to devops_cli.commands.roadmap_jobs.
Requirement: Item commands in the item module
The item commands claim, release, return, explain, inbox and plan-check SHALL be defined in src/devops_cli/commands/roadmap_items.py.
Scenario: Item command module
- WHEN A test imports devops_cli.commands.roadmap.app and reads the callback of each item command.
- THEN The test asserts that each callback has module equal to devops_cli.commands.roadmap_items.
Requirement: Shared helpers in one module
The helpers _open_store, _target, _exit_on_failure, _one_mode and _refuse SHALL be defined in src/devops_cli/commands/roadmap_shared.py and imported by the job and item modules.
Scenario: Shared helper imports
- WHEN A test imports devops_cli.commands.roadmap_shared and reads the source of the job and item modules.
- THEN The test asserts that each helper is defined in roadmap_shared and that roadmap_jobs and roadmap_items import each helper from that module.
Requirement: Command names, options and help unchanged
Every roadmap command SHALL keep its name, parameters, defaults and help text after the split.
Scenario: Command metadata comparison
- WHEN A test reads the Typer app and compares each command's parameter names, defaults and help strings with the values recorded at the base commit.
- THEN The test asserts that every value is equal.
Requirement: Group help names the pipeline
The roadmap group help SHALL name the plan and implement pipeline.
Scenario: Group help text
- WHEN A test reads HELP.roadmap.app or runs devops roadmap --help.
- THEN The test asserts that the text names the plan and implement pipeline.
Requirement: Command behavior unchanged
The split SHALL NOT change the runtime behavior of any roadmap command.
Scenario: Existing roadmap tests
- WHEN The test suite runs the existing roadmap command tests.
- THEN The tests pass with no change to their expected command results.
Existing Tool Considered
The alternatives check in the issue body records not-applicable for class refactor and names no tool. No open, maintained tool splits a Typer command module. The body gives the cost of this move as about 60k tokens and 3 hours to build, and nothing to keep. The existing tests are the proof that the behavior stays the same.
Key questions
- Does a help test, the generated command reference or the MCP tool list read the module that holds a command?: The cited context names no test or generator that reads the module path. The command reference is a generated document built from the command matrix. The help strings come from HELP.roadmap. The split keeps the app object and the help strings. A test that asserts a callback's module would need an update. [sources: CONTEXT.md, src/devops_cli/commands/roadmap.py]
- Which module holds the retitle, consolidate and plan-check commands?: Put retitle and consolidate in src/devops_cli/commands/roadmap_jobs.py. They call job planners and models. Put plan-check in src/devops_cli/commands/roadmap_items.py. It checks one pull request of an item. (best practice) [sources: src/devops_cli/commands/roadmap.py]
- Chosen: Job module for retitle and consolidate; item module for plan-check. The code calls job planners for retitle and consolidate, and plan-check inspects one pull request.
- Rejected: Leave all three in the group module. It keeps the group module large and defeats the split.
- Rejected: Put all three in the item module. Retitle and consolidate are jobs with model planners, not item operations.
- Where do the shared helpers live?: Put _open_store, _target, _exit_on_failure, _one_mode and _refuse in src/devops_cli/commands/roadmap_shared.py. The job and item modules import them from there. (best practice) [sources: src/devops_cli/commands/roadmap.py]
- Chosen: A shared module roadmap_shared.py. It gives one import path and no circular import between the job and item modules.
- Rejected: Keep the helpers in roadmap.py. The job and item modules would import the group module and create a cycle.
- Rejected: Duplicate the helpers in each module. It creates two copies of the same behavior and invites drift.
- Does the split keep the eval, review and step sub-apps?: Yes. The group module keeps the existing eval, review and step sub-apps. The split changes only where the top-level commands live. [sources: src/devops_cli/commands/roadmap.py]
Fit
Fits in one pull request.
Suspected block
None.
Activity
devops-cli-service commentedon Nov 2, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
refactorprefix of the title gives the type.(roadmap)scope of the title gives the scope.No behavior change and no user-facing impact; it is a maintenance improvement.Improves maintainability of the commands module but changes no user-visible behavior.The body estimates about 3 hours and 60k tokens to move code and extract shared helpers.Both reorganize roadmap code structure, but the candidate splits commands/roadmap.py while #3187 groups the roadmap/ job implementation files into subpackages.devops-cli-service commentedon Nov 2, 2026
Refine cannot set this item to Ready at fd0cc2f 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.
devops-cli-service commentedon Nov 5, 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-05. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 19, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.