Repository navigation
Description
Problem
When the stage planner generates task groups for a schema enum addition or change, it can place the schema definition change in one group and the prompt document updates in a later group.
In issue #3251, the stage planner created five groups:
- "Add the manifest kind to the schema and its render" (added
GroupKind.MANIFESTtostage_change.py) - "Refuse an other group that changes a case path"
- "Refuse a manifest verify that runs no case"
- "Name the manifest kind in the planner prompts" (updated
roadmap_stage_change.md) - "Replay the hand-written plan of docs(openspec): plan #2950 Add alternatives coverage metrics and alert #3173"
However, tests/roadmap/stage/test_roadmap_stage_prompt_rules.py asserts that GroupKind and roadmap_stage_change.md stay synchronized (test_the_prompt_and_the_document_keep_the_same_phrase_of_a_rule).
Because Group 1 added the enum value without updating the prompt document, Group 1 failed the test suite in isolation. This broke the implement step and stopped incremental commits.
Expected
The stage planner prompts or stage validation must co-locate schema enum changes with their corresponding prompt document updates in the same group. When a plan changes an enum or constant checked by an invariant test against a prompt or documentation file, both the code definition and the prompt updates must be in the same task group.
Acceptance criteria
- The stage planner prompt in
roadmap_stage_change.mdinstructs the model to put prompt updates in the same group as the schema enum or constant changes that they describe. - The stage group validation or prompt test checks that schema enum modifications co-locate with prompt updates.
Feasibility
The stage planner prompt in src/devops_cli/ai/tasks/roadmap_stage_change.md and src/devops_cli/roadmap/stage/ owns group formation rules.
Adding an explicit co-location instruction to the prompt prevents split groupings that break invariant tests.
Existing tool considered
None. This is an internal stage planning rule in DevOps CLI.
Cost
Build: about 15k tokens and 0.5 hours. Keep: 0 cost. Fix: about 2k tokens and 0.1 hours.
Related
Found during evaluation of #3251 / PR #3981. Related to #3210.
Proposed design
Problem statement
The stage planner can put a schema enum or constant change in one task group and the prompt update it requires in a later group. Then an invariant test fails in the first group and stops incremental commits. The change makes the planner co-locate those changes and adds a prompt-rule test.
Acceptance criteria
Requirement: Co-locate schema and prompt changes
The stage planner prompt SHALL instruct the model to put a prompt document update in the same task group as the schema enum or constant change that the update describes.
Scenario: A plan changes a schema enum with a prompt update
- WHEN A plan changes an enum or a constant that an invariant test compares with a prompt document.
- THEN The prompt tells the model to put the prompt document update in the same group as that enum or constant change.
Requirement: Pin the co-location rule with a test
The prompt-rule test SHALL fail when roadmap_stage_change.md omits the co-location rule.
Scenario: The co-location sentence is removed
- WHEN The co-location sentence is removed from
roadmap_stage_change.md. - THEN
tests/roadmap/stage/test_roadmap_stage_prompt_rules.pyfails and names the missing rule.
Existing Tool Considered
No alternatives check has run. No open, maintained tool covers this internal stage-planner rule. The project builds its own prompt and test at about 15k tokens and 0.5 hours to build, 2k tokens and 0.1 hours to fix, and no keep cost.
Key questions
- Where does the co-location rule belong?: Put the rule in
src/devops_cli/ai/tasks/roadmap_stage_change.md. The planner reads this prompt. Add a matching assertion intests/roadmap/stage/test_roadmap_stage_prompt_rules.py. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, tests/roadmap/stage/test_roadmap_stage_prompt_rules.py]- Chosen: Prompt rule with a prompt-rule test. The planner reads the prompt, and the test fails when a later edit removes the rule.
- Rejected: Stage validator only. The validator reads paths and text, so it cannot tell which prompt sentence describes an enum or constant change.
- Rejected: Prompt rule only. No test fails when the rule is removed.
- Which test module and test name pin the new rule?: Add
test_the_stage_prompt_requires_prompt_updates_in_the_same_group_as_schema_changestotests/roadmap/stage/test_roadmap_stage_prompt_rules.py. (best practice) [sources: tests/roadmap/stage/test_roadmap_stage_prompt_rules.py]- Chosen: New test in the existing prompt-rule module. The module already reads
roadmap_stage_change.mdand checks its rules. - Rejected: Add the sentence to
_SHARED._SHAREDholds phrases that a document and the prompt both keep, and this rule has no second document. - Rejected: Add a new test module. A new module adds no value for one prompt rule.
- Chosen: New test in the existing prompt-rule module. The module already reads
- Should the stage validator reject a split group?: No. The check sees paths and text, not the semantic link between an enum value and its prompt sentence. The prompt rule and its test are the reliable fix. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md]
- Chosen: Prompt rule and prompt-rule test. The rule is a planning instruction, and the prompt test can pin it.
- Rejected: Validator rule in
check_proposal. The validator cannot infer the matching prompt sentence from the group paths and text.
- Which test compares
GroupKindwith the planner prompt?:test_the_prompts_name_the_kinds_of_a_group_as_the_enum_doesintests/roadmap/stage/test_roadmap_stage_prompt_rules.pycompares eachGroupKindvalue with the prompt. [sources: tests/roadmap/stage/test_roadmap_stage_prompt_rules.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-10: none.
Tool: none found.
Activity
dan-petty commentedon Nov 7, 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.The bug breaks the implement step and incremental commits for any enum addition that has a prompt invariant test.It unblocks a recurring workflow pattern where schema enums and prompt docs must change together.The body estimates about 0.5 hours to add a prompt instruction and a validation check.Both keep schema definitions and prompt documentation synchronized, but #3328 gates plans that add a StageProposal field while the candidate co-locates enum changes with prompt updates in the same group.devops-cli-service commentedon Nov 8, 2026
Status set to Ready at b9c88de (see proposed design in issue body).
devops-cli-service commentedon Nov 10, 2026
Alternatives check: none
Reason: One search found no tool for this need. The need is a rule in the project's own stage-planner prompt, plus a test that pins it. It is not a general capability that an outside library supplies, so the issue's "no existing tool" assessment stands.
Tool: none found
Lacks:
Searches run:
Checked on 2026-11-10. A person decides what this means for the item. The check changes no label and closes no issue.
chore(main): release 0.138.0 (#5690)
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