Repository navigation
Description
Problem or Motivation
The plan of PR #3439 (for #3422) proves its premise with another open change's proposal, and not with the staged source. Its ## Feasibility says: "read_file on src/devops_cli/roadmap/stage_paths.py shows class StagedTree ... with a callers method that reads that checkout with git grep; the change folder openspec/changes/3307-the-plan-check-names-a-caller/proposal.md states it: 'StagedTree.read keeps the checkout, and StagedTree.callers returns the files of the commit that call a function, found with git grep.'"
#3307 is an open, unimplemented plan: it is in openspec/changes/3307-the-plan-check-names-a-caller/, and its only commits are docs(openspec): plan #3307 .... class StagedTree in src/devops_cli/roadmap/stage_paths.py:76 holds a list of tracked files; it has no callers method, and read returns that list and keeps no checkout. The #3439 plan copied the false premise from #3307's proposal and cited that proposal as read_file evidence. The stage gates accepted it, the service opened it as a draft plan, and a person then marked it plan/needs-fix.
The stage prompt src/devops_cli/ai/tasks/roadmap_stage_change.md lets a plan prove a premise with any text. It does not say that only the staged source is evidence, so a plan can cite another plan's proposal and pass.
Proposed Solution & Architectural Design
- Add a rule to the stage prompt
src/devops_cli/ai/tasks/roadmap_stage_change.md: a## Feasibilityline proves its claim with the source at the staged commit (aread_fileof the code, or a symbol the code defines), and never with theproposal.mdordesign.mdof a change that is not inopenspec/archive/. - Refuse in
check_proposalinsrc/devops_cli/roadmap/stage_change.pyafeasibilityline that citesopenspec/changes/<other>/proposal.mdordesign.mdfor a change that is not archived, because that text is a claim and not code. - Add a test in
tests/roadmap/test_roadmap_stage_content.pyandtests/roadmap/test_roadmap_stage_prompt_rules.pyfor the rule.
Target Subsystem
src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_content.py, tests/roadmap/test_roadmap_stage_prompt_rules.py.
Existing Tool Considered
The change extends the existing check_proposal text scan and the stage prompt; it adds no dependency. It builds about 3k tokens, costs about 0.5k tokens per year to keep and fix, and takes about half a day of elapsed time. It deletes no internal code.
Complements #3407, which refuses a class claim that quotes no code span. This change stops the service from treating another open plan as evidence in the first place.
Source: #3439
Alternatives check of 2026-11-07: partly.
Tool: vale-cli/vale (https://github.com/vale-cli/vale), MIT, last activity 2026-11-06, maintained.
Proposed design
Problem statement
The stage prompt lets a plan prove a premise with any text. The plan of PR #3439 cited another open change's proposal as evidence, and the gates accepted it. This change adds a prompt rule and a plan-check rule. A Feasibility line must cite the source at the staged commit. It must not cite the proposal or design of a change that is not archived.
Acceptance criteria
Requirement: Prompt rule names the staged source
The stage prompt SHALL state that a Feasibility line proves its claim with the source at the staged commit, and never with the proposal or design of a change that is not archived.
Scenario: The prompt states the evidence rule
- WHEN A test reads
src/devops_cli/ai/tasks/roadmap_stage_change.md. - THEN The text holds a rule that a Feasibility line cites the staged source and no unarchived change's
proposal.mdordesign.md.
Requirement: Open change's proposal is refused
The plan check MUST refuse a feasibility line that cites proposal.md or design.md under openspec/changes/ when the path is not under openspec/changes/archive/.
Scenario: A feasibility line cites another open change's proposal
- WHEN
proposal_evidence_problemsreads the feasibility lineopenspec/changes/3307-the-plan-check-names-a-caller/proposal.md states the method. - THEN It returns one problem that names the cited path and the rule.
Requirement: Archived change's proposal is accepted
The plan check MUST accept a feasibility line that cites the proposal.md or design.md of a change under openspec/changes/archive/.
Scenario: A feasibility line cites an archived change's design
- WHEN
proposal_evidence_problemsreads the feasibility lineopenspec/changes/archive/1234-old-change/design.md records the choice. - THEN It returns an empty list.
Requirement: Staged symbol is accepted
The plan check MUST accept a feasibility line that cites a symbol that the staged code defines.
Scenario: A feasibility line cites a symbol of the staged source
- WHEN
proposal_evidence_problemsreads the feasibility linesrc/devops_cli/roadmap/stage/stage_change.py:def check_proposal. - THEN It returns an empty list.
Requirement: The gate reports the rule's problem
content_problems MUST report the problems of proposal_evidence_problems.
Scenario: A reply cites an open change's proposal
- WHEN
content_problemsjudges aStageProposalwhose feasibility citesopenspec/changes/3307-the-plan-check-names-a-caller/proposal.md. - THEN The returned problems hold the text of the rule.
Requirement: The plan passes its own rule
The test of the change SHALL build the plan's own StageProposal and assert that content_problems returns no problem for it.
Scenario: The plan's own feasibility cites only the staged source
- WHEN The test builds the plan's own
StageProposalfrom this change. - THEN
content_problemsreturns an empty list.
Existing Tool Considered
Vale (https://github.com/vale-cli/vale, MIT, last activity 2026-11-06, maintained) partly covers the refusal. A custom regex rule can refuse a Feasibility line that cites openspec/changes/<change>/proposal.md or design.md. The openspec/changes/ path already limits the refusal to changes that are not archived. Vale lacks a structured read of the ## Feasibility lines that check_proposal parses. It cannot report the offending line to the stage gate. It adds no rule to the stage prompt. It cannot tell whether a claim is backed by the source at the staged commit. It reads the working tree, not the staged commit. OpenSpec validate --strict reads no proposal prose, and ADR 0010 rejected a forked schema with a feasibility artifact. The change builds its own check code: about 3k tokens to build, about 0.5k tokens per year to keep and fix, and about half a day of elapsed time. It deletes no internal code.
Key questions
- Which path shows that a change is archived?: A change is archived when its folder is under
openspec/changes/archive/. A folder underopenspec/changes/with noarchive/segment is open. (best practice) [sources: CONTEXT.md]- Chosen:
openspec/changes/archive/. The project glossary says the pull request archives the change intoopenspec/changes/archive/. - Rejected:
openspec/archive/. The issue body and the alternatives comment name it, but the project glossary does not.
- Chosen:
- Where does the refusal run?: In
proposal_evidence_problems, a new function insrc/devops_cli/roadmap/stage/stage_change.pythatcontent_problemscalls. The gate already reads the feasibility lines of each reply. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:2358, docs/ROADMAP_WORKFLOW.md:342]- Chosen: A rule in
stage_change.py. The gate parses the feasibility lines and reports each problem to the stage job. - Rejected: A Vale rule in CI. Vale reads the working tree, not the staged commit, and reports no line to the stage gate.
- Chosen: A rule in
- Which paths hold the stage gate and its tests?: The gate is
src/devops_cli/roadmap/stage/stage_change.py. The tests aretests/roadmap/stage/test_roadmap_stage_content.pyandtests/roadmap/stage/test_roadmap_stage_prompt_rules.py. The paths in the issue lack thestage/folder. [sources: src/devops_cli/roadmap/stage/stage_change.py:2358, tests/roadmap/stage/test_roadmap_stage_content.py, tests/roadmap/stage/test_roadmap_stage_prompt_rules.py] - Does the rule apply to the plan's own change folder?: Yes. The rule refuses a citation of any
proposal.mdordesign.mdunderopenspec/changes/that is not underopenspec/changes/archive/, the plan's own folder included. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/stage/stage_change.py:2358]- Chosen: Every unarchived change folder. The proposal of the plan is a claim too, and one rule covers both cases.
- Rejected: Another change's folder only. It needs a second condition and leaves the own proposal as evidence.
- Does Vale replace the plan-check rule?: No. Vale partly covers the refusal with a custom regex rule. It cannot report the offending line to the stage gate and reads no staged commit. The plan check keeps the rule, and the prompt states it. (best practice) [sources: docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md]
- Chosen: Keep the rule in
content_problems. The gate reads the feasibility lines on each reply, and the prompt states the rule. - Rejected: Adopt Vale alone. Vale cannot tell whether a claim is backed by the staged source, and it feeds no stage gate.
- Chosen: Keep the rule in
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 validation gap a human caught; no data loss or security risk, but it weakens pipeline trust.Prevents a class of false plans from passing the stage gate without human review.One prompt rule, one guard in check_proposal, and two test cases; the candidate estimates half a day.Both add feasibility checks to the stage plan, but #3407 verifies a class claim has a real code span while the candidate refuses a citation of another open change's proposal.md or design.md.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at 7cf8335 (see proposed design in issue body).
devops-cli-service commentedon Nov 4, 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
devops-cli-service commentedon Nov 5, 2026
Refine cannot set this item to Ready at d254410 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 7, 2026
Alternatives check: partly
Reason: The web searches returned only connection timeouts, so the judgement rests on the repository and package facts I read: Vale is an open, maintained prose linter, and OpenSpec and spec-kit are the other candidates. Vale's custom regex rules can refuse a Feasibility line that cites another change's
proposal.mdordesign.md, and theopenspec/changes/versusopenspec/archive/paths already separate open changes from archived ones, so it covers the refusal part. It cannot verify that a claim is proved by the source at the staged commit, nor feed the stage gate, so the prompt rule and the source-as-evidence requirement stay with the issue's own change.Tool: vale-cli/vale (https://github.com/vale-cli/vale)
Covers:
openspec/changes/<change>/proposal.mdordesign.md.openspec/archive/, a rule keyed on theopenspec/changes/path already limits the refusal to changes that are not archived.Lacks:
## Feasibilitylines thatcheck_proposalparses, so it cannot report the offending line to the stage gate.src/devops_cli/ai/tasks/roadmap_stage_change.md, so the planner still is not told that only the staged source is evidence.validate --strict, and ADR 0010 rejected a forked schema with afeasibilityartifact, so neither OpenSpec nor a spec-kit style analyze step supplies the check.Tools considered:
Searches run:
Sources:
Checked on 2026-11-07. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 13, 2026
Status set to Ready at 4ef7c6f (see proposed design in issue body).
fix(roadmap): refuse an open change's plan as feasibility evidence (#…
devops-cli-service commentedon Nov 14, 2026
Released in v0.138.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.138.0
devops-cli-service commentedon Nov 14, 2026
Live since 2026-11-14 15:02 UTC