Repository navigation
Description
Problem or Motivation
The stage job planned #3388 against a base that lacks the behavior its premise names. The plan of PR #3396 says "The stage check reads constant claims from the prose of a plan." The base does not do this. git grep -n "stage_constants\|constant_claims" 6c15a64a -- src tests finds nothing, and src/devops_cli/roadmap/stage_constants.py is absent.
The prose scan is only planned by #3308. The plan folder openspec/changes/3308-the-plan-check-compares-a-number/ is on main, and the issue stays Planned. That plan also creates src/devops_cli/roadmap/stage_constants.py and tests/roadmap/test_roadmap_stage_constants.py, the same new files that the plan of #3388 creates.
The stage job recorded no dependency: refine.blocked_by is null. An implement step would create a file that the plan of #3308 owns, or it would fail on the missing prose scan.
Reproduction Steps
- Read the base at
6c15a64a, the merge base oforigin/mainand the plan branch. - Run
git grep -n "stage_constants\|constant_claims" 6c15a64a -- src testsand see no match. - Run
git cat-file -e 6c15a64a:src/devops_cli/roadmap/stage_constants.pyand see that the path does not exist. - Read the plan of feat(roadmap): the stage plan states constant claims in a structured field #3388 in
openspec/changes/3388-the-stage-plan-states-constant-claims/and see that it creates the same new module and test module.
Expected vs Actual Behavior
Expected: the stage job finds that the premise names behavior that only another open plan creates, returns the item with that dependency, and adds no plan.
Actual: the stage job plans the item with Dependencies: None, and the plan creates files that the plan of #3308 also creates.
Proposed Solution & Architectural Design
- In the premise check of
src/devops_cli/roadmap/stage_probe.py, when a cited behavior or path is absent at the staging commit, search the plan folders of open items underopenspec/changes/. A plan folder that names the same path or requirement is a dependency. - When the check finds a dependency, the stage job returns the item with the open item's number instead of planning it. Record the number in
blocked_byso refine and stage leave the item until the other item closes. - In
check_proposalorstage_paths, refuse a plan that lists a path increatesthat another open plan also lists increates. - Add tests in
tests/roadmap/test_roadmap_stage_plan.pyfor a plan that needs an open plan's module and for a plan that creates a path another open plan creates.
Target Subsystem
src/devops_cli/roadmap/stage_probe.py, src/devops_cli/roadmap/stage.py, src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/refine.py
Existing Tool Considered
The stage job already reads the plan folders of openspec/changes/ for the stage context. No open tool detects a dependency between two planned items. The change extends that read: about 6,000 tokens to build and test, about 1,000 tokens per month to keep and fix, and about 3 hours elapsed. The change deletes no internal code.
Source: #3396
Proposed design
Problem statement
The stage job plans an item against a staging commit that lacks behavior that another open item's plan creates. The job records no dependency. An implement step then creates files that the other plan owns, or it fails on the missing behavior. The fix makes the stage job detect the open plan, return the item with a dependency, and refuse a plan that creates a path that another open plan creates.
Acceptance criteria
Requirement: Open plan dependency from a missing cited item
The stage job SHALL detect a dependency when a cited item is absent at the staging commit and an open plan names it.
Scenario: Missing path named by an open plan
- WHEN The issue cites
src/devops_cli/roadmap/stage_constants.py, the staging commit lacks it, and open item feat(roadmap): check a plan number against its constant #3308 has a plan folder that names it. - THEN The stage run returns the item with feat(roadmap): check a plan number against its constant #3308 as its dependency and plans no change.
Requirement: Recorded dependency stops staging
The stage job SHALL record the open item's number in blocked_by and return the item to New when it finds the dependency.
Scenario: Dependency found before the model call
- WHEN The premise check finds that open item feat(roadmap): check a plan number against its constant #3308 owns a cited missing path.
- THEN The stage run records feat(roadmap): check a plan number against its constant #3308 in
blocked_by, returns the item to New, and makes no model call for the item.
Requirement: Stage leaves a recorded open dependency
The stage job SHALL leave out an item whose blocked_by record names an open item.
Scenario: Recorded dependency is open
- WHEN An item's job record holds
blocked_bywith feat(roadmap): check a plan number against its constant #3308, and feat(roadmap): check a plan number against its constant #3308 is open. - THEN The stage selection leaves out the item with a reason that names feat(roadmap): check a plan number against its constant #3308.
Requirement: Closed dependency stops no staging
The stage job MUST stage an item whose blocked_by record names only closed items.
Scenario: Recorded dependency is closed
- WHEN An item's job record holds
blocked_bywith feat(roadmap): check a plan number against its constant #3308, and feat(roadmap): check a plan number against its constant #3308 is closed. - THEN The stage selection does not leave out the item for that dependency.
Requirement: Overlapping create path is refused
The stage job SHALL refuse a plan that lists a path in creates that an open item's plan also lists in creates.
Scenario: Two plans create the same module
- WHEN Open item feat(roadmap): check a plan number against its constant #3308's
tasks.mdmarkssrc/devops_cli/roadmap/stage_constants.pywith(new), and the reply lists the same path increates. - THEN
check_proposalreturns a problem that names the path and feat(roadmap): check a plan number against its constant #3308, and the stage job sends the reply back to the model once.
Requirement: Closed plan is no dependency
The stage job MUST ignore a plan folder whose item is closed or archived when it detects a dependency or an overlapping create.
Scenario: Closed plan names the same path
- WHEN A closed item's plan lists the cited path in
creates. - THEN The stage job records no dependency on that item and accepts the reply.
Existing Tool Considered
No alternatives check has run. No open, maintained tool detects a dependency between two planned items. The change extends the stage job's existing read of openspec/changes/. The written cost is about 6,000 tokens to build and test, about 1,000 tokens per month to keep and fix, and about 3 hours elapsed. The change deletes no internal code.
Key questions
- How does the stage job find a cited path or identifier that the staging commit lacks?:
probe_premiserunsgit cat-file,git grepandgit logat the staging commit. It returns the missing paths and identifiers inProbe.missing. [sources: src/devops_cli/roadmap/stage_probe.py, src/devops_cli/roadmap/stage.py] - How does the stage job know which items are open and which have a plan on the default branch?: The store holds each item's open or closed state.
read_stage_selectionreads the change folders on the default branch withread_planned_changes. [sources: src/devops_cli/roadmap/stage.py] - Where does the roadmap record
blocked_by, and what waits on it?:RefinedItem.blocked_byholds the open item numbers.NextStep.BLOCKEDwaits until every item in that record closes. [sources: src/devops_cli/roadmap/refine.py, tests/roadmap/test_roadmap_refine.py] - How does a rendered plan mark a path that it creates?: The
Changes:line of a task group puts(new)after the code span of each path increates. [sources: src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_plan.py] - How should the stage job match a missing cited item to an open plan?: Search the full text of each open plan folder for the missing path or identifier. The folder holds the path and the requirement in one place. (best practice) [sources: src/devops_cli/roadmap/stage_probe.py, src/devops_cli/roadmap/stage_change.py, CONTEXT.md]
- Chosen: Search the full plan folder text. The plan folder is the record and already holds the path and the requirement. No new parser is needed.
- Rejected: Read only the
createslists. A plan can name a behavior in a requirement without a file path. - Rejected: Read only the spec requirement names. A plan can create a path that no requirement name states.
- How should the stage job get the plan folders of open items?: Pass the open item numbers and their plan folders from
read_stage_selectioninto the planner and the premise probe. (best practice) [sources: src/devops_cli/roadmap/stage.py, src/devops_cli/roadmap/refine.py]- Chosen: Pass open item plan folders from the selection. The store already knows the open state. The job reads the plan folders once for the round.
- Rejected: Read every folder under
openspec/changes/. A closed or archived item's plan can cause a false dependency. - Rejected: Read each issue on GitHub during the probe. It adds a remote read for each item and makes the probe non-local.
- Where should the stage job record a dependency it finds?: Record the open item number in
blocked_byand return the item to New. Refine and stage already wait on an open item in that record. (best practice) [sources: src/devops_cli/roadmap/refine.py, src/devops_cli/roadmap/stage.py]- Chosen: Use
blocked_byandNextStep.BLOCKED. Refine already stops an item until each open blocker closes. Stage can read the same record. - Rejected: Post only a return comment. A comment does not stop the next stage or refine round.
- Rejected: Add a stage-only dependency record. It duplicates the existing wait rule and needs a second reader.
- Chosen: Use
- Where should the check for an overlapping
createspath run?: Run it incheck_proposalwith the open plan paths that the round read. A refused reply goes back to the model once. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_paths.py, src/devops_cli/roadmap/stage.py]- Chosen: In
check_proposal. It already collects rule failures and sends them back to the model once. - Rejected: In
stage_pathsalone.stage_pathschecks the staged tree, not another plan. - Rejected: In the prompt only. A prompt rule cannot refuse a reply.
- Chosen: In
- How should the stage job read the
createspaths of an open plan?: Parse the(new)marks in the open plan'stasks.md. That file is the rendered record of the plan's task groups. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_plan.py]- Chosen: Parse the
(new)marks intasks.md. The rendered plan already marks each created path. The job needs no new file. - Rejected: Treat every path in the plan folder as created. A plan reads and changes paths that it does not create.
- Rejected: Add a JSON manifest to each plan folder. It changes the plan format and needs a migration for plans on the default branch.
- Chosen: Parse the
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 4, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.A real defect that wastes implementation work and creates file conflicts, but a person can close the bad plan as a workaround.Prevents failed implementations and file-ownership conflicts between concurrent plans.The body estimates about 6,000 tokens and 3 hours for build, test, and integration across four files.Both items concern plan dependencies, but #3224 records and reports a dependency list in an already-created plan, while the candidate detects the dependency at stage time and refuses to plan the item.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at 89682e4 (see proposed design in issue body).
devops-cli-service commentedon Nov 5, 2026
Released in v0.61.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.61.0
devops-cli-service commentedon Nov 5, 2026
Live since 2026-11-05 12:32 UTC