Repository navigation
Description
Problem or Motivation
When an issue renames or removes a CLI command (such as #3185 moving intake-eval to eval intake), the stage planner generates an added requirement stating that the command MUST NOT exist under the old name or alias.
However, existing capability specs under openspec/specs/<capability>/spec.md often contain multiple requirements that specify the old command syntax (for example, in PR #3228, five requirements in roadmap-intake-duplicates specified devops roadmap intake-eval SHALL...).
Because devops roadmap stage does not detect that the living spec references a command being removed:
- The planner generates only
addedrequirements and omitsmodifiedrequirements for the existing spec entries. - When the change proposal archives, the living spec contains contradictory requirements: one requirement stating the old command must not exist, and existing requirements stating the old command shall execute.
- Review finding 2 on PR docs(openspec): plan #3185 move intake-eval under roadmap eval #3228 noted: "After the archive the living spec says both that intake-eval SHALL run each case and that it MUST NOT exist."
Proposed Solution & Architectural Design
- In
src/devops_cli/roadmap/stage_references.py, prioritizespecsreferences when an issue cites command moves or renames, ensuring references inopenspec/specs/are explicitly surfaced to the planner. - Update
src/devops_cli/ai/tasks/roadmap_stage_change.mdto instruct the planner that when a command is removed or renamed, every requirement in the capability spec that specifies the old command must be updated undermodified. - In
src/devops_cli/roadmap/stage_change.py(orstage_eval_gates.py), add a validation check incheck_proposal: when an added requirement asserts that a command or option must not exist, verify that no un-modified requirement in the referenced capability still specifies that command name.
Target Subsystem
src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_references.py, src/devops_cli/ai/tasks/roadmap_stage_change.md
Existing Tool Considered
_spec_problems and check_proposal in stage_change.py already validate capability names, purpose lengths, and requirement keywords. Adding a check for obsolete command references in unchanged requirements prevents contradictory living specs without external tools. Cost to build: about 6,000 tokens and 45 minutes.
Proposed design
Problem statement
The stage planner can add a requirement that a CLI command MUST NOT exist. An unmodified base requirement of the same capability can still name that command. The archive then leaves two contradictory requirements in the living spec. The #3228 case is repaired in roadmap-intake-duplicates, but no check stops the next rename. This change adds a prompt rule and a deterministic check to check_proposal. It also lists spec files first in a references answer.
Acceptance criteria
Requirement: Spec files come first in a references answer
The references answer SHALL list a file under openspec/specs/ before a file under src/ when both hold the requested name.
Scenario: A command name exists in a spec and in source
- WHEN The tool
referencesanswers the namedevops roadmap intake, whichopenspec/specs/roadmap-intake-duplicates/spec.mdandsrc/devops_cli/roadmap/intake.pyboth hold. - THEN The answer lists the line of
openspec/specs/roadmap-intake-duplicates/spec.mdbefore the line ofsrc/devops_cli/roadmap/intake.py.
Requirement: The prompt requires a modified requirement for a renamed command
The stage prompt SHALL require a modified requirement for each base requirement that names a command or option that the issue removes or renames.
Scenario: The prompt states the rename rule
- WHEN A test reads
src/devops_cli/ai/tasks/roadmap_stage_change.md. - THEN The text holds a rule that names
modified, a command or option removal or rename, and each base requirement that names the old name.
Requirement: A stale base requirement is refused
check_proposal SHALL return a problem when an ADDED requirement says a command or option MUST NOT exist and an unmodified base requirement names it.
Scenario: An added removal leaves a base requirement unchanged
- WHEN A proposal adds a requirement that
devops roadmap intake-evalMUST NOT exist, and the base texts hold an unmodified requirement that names it. - THEN
check_proposalreturns a problem that namesdevops roadmap intake-evaland that base requirement.
Requirement: A complete removal update is accepted
check_proposal SHALL return no stale-command problem when every base requirement that names a removed command or option is in modified and omits the name.
Scenario: The planner updates every stale requirement
- WHEN A proposal adds a removal requirement for
devops roadmap intake-evaland lists each base requirement that names it inmodifiedwith text that omits the name. - THEN
check_proposalreturns no problem aboutdevops roadmap intake-eval.
Requirement: An option removal is checked
The stale-reference check SHALL treat an option such as --old in the same way as a command.
Scenario: An added requirement removes an option
- WHEN A proposal adds a requirement that
--oldMUST NOT exist, and an unmodified base requirement names--old. - THEN
check_proposalreturns a problem that names--old.
Requirement: The check needs the base requirement texts
check_proposal SHALL run the stale-reference check only when the caller passes the base requirement texts.
Scenario: A caller passes no base texts
- WHEN A proposal adds a requirement that
devops roadmap intake-evalMUST NOT exist, and the caller passes norequirement_texts. - THEN
check_proposalreturns no problem aboutdevops roadmap intake-eval.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers a check of this repository's own spec delta. The project extends _spec_problems and check_proposal in src/devops_cli/roadmap/stage_change.py. Build cost: about 8,000 tokens and 1 hour.
Key questions
- Does the reported contradiction still exist in the living spec at the staging commit?: No.
openspec/specs/roadmap-intake-duplicates/spec.mdnamesdevops roadmap intake-evalonly in the requirement that says it MUST NOT exist. The requirements that named it as a command to run now namedevops roadmap eval intake. The check is still missing, so the change tests it against constructed base texts. [sources: openspec/specs/roadmap-intake-duplicates/spec.md, src/devops_cli/roadmap/stage_change.py] - Where does the stale-command check run?: Add the check to
check_proposalinsrc/devops_cli/roadmap/stage_change.py. The stage job and the replay both call this function, so one rule covers both paths. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, docs/ROADMAP_WORKFLOW.md:275]- Chosen: Add the check to
check_proposal. The stage job and the replay both call it, so one rule covers both paths. - Rejected: Add the check only to
stage_eval_gates.py. The stage job would not refuse a bad reply before the replay. - Rejected: Add the rule only to the prompt. The model can ignore the rule, and no check stops the bad plan.
- Chosen: Add the check to
- How does
check_proposalread the base requirement texts?: Add an optionalrequirement_textskeyword tocheck_proposal.stage_specs.pyfills it from the base specs. When the caller passes no texts, the check skips, so the replay keeps its inputs. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_specs.py, docs/ROADMAP_WORKFLOW.md:275]- Chosen: Add an optional
requirement_textskeyword. It keepsrequirementsfor names, and a caller with no texts skips the check. - Rejected: Change
requirementsto hold texts. It breaks the duplicate-name check and every caller. - Rejected: Read the specs inside
check_proposal. The function gets no repository root, and the replay uses a thinned tree.
- Chosen: Add an optional
- How does the check find a removed command or option?: Extract spans that start with
devopsor--from an ADDED requirement whose text says MUST NOT or SHALL NOT. A small regular expression does the work, with no model call. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md]- Chosen: A small regular expression. It is deterministic, offline and easy to test.
- Rejected: A model call. The gate runs in the stage job and the replay with no model.
- Rejected: A full CLI parser. It cannot read a prose requirement and adds no value.
- Which base requirements must change?: Every base requirement that names the removed command or option must appear in
modified, and its new text must omit the name. An unmodified requirement is a problem. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md]- Chosen: Check the unmodified requirements and the new text. A modified text that keeps the old name still contradicts the removal.
- Rejected: Check only the unmodified requirements. It misses a modified text that keeps the old name.
- Rejected: Check only the modified requirements. It misses the original defect.
- Should
specscome first in_GROUPS?: Putspecsfirst in_GROUPSinsrc/devops_cli/roadmap/stage_references.py. When the character budget runs out, the answer then keeps the spec file before the source file. (best practice) [sources: src/devops_cli/roadmap/stage_references.py]- Chosen: Put
specsfirst. A reader sees the living spec of the command before its code, and the change is one line. - Rejected: Keep the current order. The answer lists source and test files before the living spec, which the issue asks to change.
- Rejected: Detect a rename in the issue text.
reference_answerreceives no issue text, so it adds coupling and a new path to test.
- Chosen: Put
- What does the change say about the stage eval score?: The pull request states the replay score of the same model before and after, as
docs/ROADMAP_WORKFLOW.mdasks. The score does not move, because the check needs base texts that no case holds. (best practice) [sources: docs/ROADMAP_WORKFLOW.md:275, docs/ROADMAP_WORKFLOW.md:276]- Chosen: State the replay score before and after, with no new case. The check needs base texts that no case holds, so the score does not move.
- Rejected: Add a golden-set case with gate
none. It lowers the share of defects that a gate judges and covers nothing. - Rejected: Extend the case facts with base spec texts. The replay reads no code and no git, and the facts hold a thinned tree.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-06: none.
Tool: none found.
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.
Contradictory living specs are a correctness defect but do not block builds or expose security risks.Preventing contradictory spec requirements preserves the integrity of the living spec for all downstream consumers.Three files change and a new validation rule is added, but the candidate estimates about 45 minutes of work.Both address the #3228 contradictory-spec case, but #3246 adds requirement text to the stage context while the candidate adds a post-hoc validation check and a planner prompt update.devops-cli-service commentedon Nov 3, 2026
Status set to Ready at 2eede7c (see proposed design in issue body).
devops-cli-service commentedon Nov 3, 2026
The stage job returned the item to New. The premise of the issue does not hold at the staging commit, so the job planned no change and opened no pull request.
Evidence:
placeholder
31 remaining items
devops-cli-service commentedon Nov 7, 2026
The runner Job devops-cli-runner-20261107-114512-bb94 ended: succeeded.
Image digest: sha256:a12d8a3601a2f9803ba6a7f77fe19fdcc27a4de30944a1e65fc19d08808e9eff
The last lines of its log:
docs(openspec): plan #3287 Refuse a plan that keeps a removed command
fix(roadmap): Read the statement of each base requirement (#3287)
fix(roadmap): Refuse a stale base requirement (#3287)
fix(roadmap): Give the check the base requirement texts of the job (#…
fix(roadmap): State the rename rule in the stage prompt (#3287)
fix(roadmap): List a living spec first in a references answer (#3287)
docs(openspec): archive the change (#3287)
fix(roadmap): Make check Plan Check pass (#3287)
devops-cli-service commentedon Nov 7, 2026
Released in v0.83.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.83.2
devops-cli-service commentedon Nov 7, 2026
Live since 2026-11-07 18:03 UTC
fix(roadmap): count a command as removed only when MUST NOT governs it (