Repository navigation
Description
Problem or Motivation
The plan in pull request #3322 (for #3187) moves src/devops_cli/roadmap/ into job subpackages. Its spec scenario says that no top-level module name starts with intake, refine, stage or implement.
The plan moves only 15 of the 47 job modules. It leaves 32 top-level job modules, such as stage_ready.py, stage_verify.py, implement_run.py, implement_trace.py and implement_submit.py. The invariant test of the plan would fail on the tree that the plan produces. A reader finds this only by comparing the task list with the folder.
The plan also verifies one sampled import for each group, such as from devops_cli.roadmap.intake_model import, so a missed module in the same group passes the check.
Proposed Solution & Architectural Design
- In
check_proposal(src/devops_cli/roadmap/stage_change.py), when a plan group moves a set of files by name prefix, require every module of that prefix in the tree to appear in the groupchangesor in a later group. Refuse a plan that leaves a module that its own spec scenario forbids. - In the stage prompt (
src/devops_cli/ai/tasks/roadmap_stage_change.md), ask the planner to name every module of the prefix, not the entry module only. - A group that moves a set of files gives a verification that covers the set, such as one
findorgit grepcommand, and not one sample file.
Target Subsystem
src/devops_cli/roadmap/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md
Existing Tool Considered
The tree walk of check_proposal and git mv cover the need. No new tool is needed. The cost is about 8k tokens and 45 minutes.
Proposed design
Problem statement
The stage plan for a module move can leave top-level job modules in place. Its own layout test then fails. The plan also verifies one sampled import, so a missed module passes the check. The change makes the plan check require every module of a moved name prefix and makes the prompt ask for a prefix-wide verification.
Acceptance criteria
Requirement: Refuse an omitted module of a moved prefix
The stage plan check SHALL refuse a group that moves a top-level module by name prefix and leaves another module of that prefix for no later group.
Scenario: A move group omits a module of its prefix
- WHEN The staged tree holds
src/devops_cli/roadmap/stage_ready.pyandsrc/devops_cli/roadmap/stage_verify.py, and a group movesstage_ready.pytostage/ready.pywith no later group. - THEN
check_proposalreturns a problem that namessrc/devops_cli/roadmap/stage_verify.py.
Requirement: Accept a later group that completes the prefix
The stage plan check SHALL accept a moved prefix when every module of that prefix appears in the move group or in a later group.
Scenario: A later group moves the missing module
- WHEN The staged tree holds
src/devops_cli/roadmap/stage_ready.pyandsrc/devops_cli/roadmap/stage_verify.py, the first group movesstage_ready.py, and a later group movesstage_verify.py. - THEN
check_proposalreturns no problem for either module.
Requirement: Keep modules of another prefix out of the check
The stage plan check SHALL require only top-level modules whose names start with the moved prefix.
Scenario: A move group leaves an unrelated module
- WHEN The staged tree holds
src/devops_cli/roadmap/stage_ready.pyandsrc/devops_cli/roadmap/status.py, and a group movesstage_ready.py. - THEN
check_proposalreturns no problem forsrc/devops_cli/roadmap/status.py.
Requirement: Ask the planner for every module of the prefix
The stage prompt SHALL tell the planner to list every module of a moved name prefix in the group changes.
Scenario: The stage prompt describes a prefix move
- WHEN A test reads
src/devops_cli/ai/tasks/roadmap_stage_change.md. - THEN The prompt text tells the planner to name every module of the prefix and not the entry module only.
Requirement: Refuse a sampled verify for a move group
The stage plan check SHALL refuse a move group whose verify command names one module of the prefix instead of the whole prefix.
Scenario: A move group verifies one sampled import
- WHEN A move group for prefix
stagegives the verify command! git grep -n -F devops_cli.roadmap.stage_ready src/ tests/. - THEN
check_proposalreturns a problem that says the verify command must cover the prefix, and returns no such problem for! git grep -n -F devops_cli.roadmap.stage src/ tests/.
Existing Tool Considered
No alternatives check has run. The plan builds its own check with the existing tree walk in check_proposal and git mv; no new external tool is needed. The written cost is about 8k tokens and 45 minutes.
Key questions
- How does the plan check identify a move by name prefix?: A group moves a top-level module when its
changesholds the old path and itscreatesholds the new path under a subpackage. The check takes the old stem up to the first_, or the whole stem when it has none, as the prefix. It requires every top-level module intreewhose stem starts with that prefix to appear in the groupchangesor in a later groupchanges. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_paths.py]- Chosen: Old and new path pairs. The existing
changesandcreateslists already record a move, so the check needs no new schema field. - Rejected: A new
movesfield. It expands the reply schema and the prompt for data that the existing path lists already hold. - Rejected: The group title. The title is free text and a planner can omit or change it.
- Chosen: Old and new path pairs. The existing
- Which verify command proves that a move group covers a whole name prefix?: Use one
! git grepcommand whose literal is the shared import prefix, such asdevops_cli.roadmap.stage, and whose paths coversrc/andtests/. Refuse a literal that names one module, such asdevops_cli.roadmap.stage_ready. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/roadmap/stage_change.py]- Chosen:
! git grepwith the prefix. The prompt permits this form, and one search covers every module of the prefix. - Rejected:
findover the directory. The stage form rules permit onlyuv run devopsand! git grepcommands. - Rejected:
uv run pyteston one test. The prompt refuses this command, and one test does not prove the full tree.
- Chosen:
- Where does the prefix coverage rule run?: The rule runs in
check_proposal, so the stage job and the replay judge the same plan. The prompt states the rule for the planner, but the check enforces it. (best practice) [sources: docs/ROADMAP_WORKFLOW.md:253, src/devops_cli/roadmap/stage_change.py]- Chosen:
check_proposal. The stage job and the replay already call it, so one rule judges both. - Rejected: The prompt only. A prompt tells the planner what to do but cannot refuse a bad plan.
- Rejected: A new replay gate. The replay already treats
check_proposalas its paths gate.
- Chosen:
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 3, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
A plan that violates its own spec produces a broken tree, but the defect is in the planning tool, not in production code.Both address incomplete verification of the module-move plan in PR #3322, but #3373 finds missed references to moved modules while the candidate ensures every module of a prefix is included in the plan.docs(openspec): plan #3187 group the roadmap job modules in subpackag…
devops-cli-service commentedon Nov 3, 2026
Status set to Ready at c343f14 (see proposed design in issue body).
devops-cli-service commentedon Nov 3, 2026
Staged: branch
fix/3372-the-stage-plan-of-a-module, draft pull request #3378. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
The plan run made 2 model request(s), and used 150573 input tokens and 10190 output tokens. The model made no tool call.
A model review of the plan found these points. They stop no draft, and a person judges them:
verify_format specs, group 2: The accepted verify literaldevops_cli.roadmap.stagealso matchesdevops_cli.roadmap.stage.ready, the import path after a correct move. The! git grepcommand then fails on a correct tree. The check also matchesdevops_cli.roadmap.stage_changeimports, so it accepts a literal that cannot pass. Evidence: "! git grep -n -F devops_cli.roadmap.stage src/ tests/"docs(openspec): plan #3372 correct the prefix move and its verify
dan-petty commentedon Nov 4, 2026
Premise correction for the verify scenario:
! git grep -n -F devops_cli.roadmap.stage src/ tests/findsfrom devops_cli.roadmap.stage importon the staged tree and, after the move,devops_cli.roadmap.stage.ready. A negative search passes only on exit 1, so this literal can never pass on the tree that the plan produces. The literal also equals the import path ofstage.py, so it is one sampled module.Plan pull request #3378 now refuses that literal and accepts
devops_cli.roadmap.stage_. The general gap, that the stage gate never proves a negative search on the produced tree, is #3410.docs(openspec): plan #3372 Check every module of a moved prefix (#3378)
docs(openspec): plan #3373 Require a move plan to cover each reference (
fix(roadmap): check every module of a moved prefix
docs(openspec): archive the change of #3372
devops-cli-service commentedon Nov 4, 2026
Released in v0.53.6: https://github.com/dan-petty/devops-cli/releases/tag/v0.53.6
devops-cli-service commentedon Nov 4, 2026
Live since 2026-11-04 04:36 UTC
fix(roadmap): leave out a golden case with no commit (#3728)