Repository navigation
Description
Problem or Motivation
The stage job asks each plan that changes a stage prompt for a prompt sentence test.
src/devops_cli/roadmap/stage/stage_change.pyholdsPROMPT_RULE_TEST(tests/roadmap/stage/test_roadmap_stage_prompt_rules.py). The stage check refuses a plan that changes aroadmap_stage_*.mdprompt and does not list that file asverify.src/devops_cli/ai/tasks/roadmap_stage_change.mdandroadmap_stage_split.mdgive the planner the same rule.openspec/specs/roadmap-stage/self-rules/spec.mdholds the requirement.
Owner direction of 2026-11-25: remove the tests that hold a sentence of a real document or prompt, because each edit of the text then needs an edit of a test. #7243 removes the sentence tests. While the rule above stays, the planner adds new ones. #6080 removed the same kind of rule for config value tests.
Other living specs still say that a test reads a document and finds a sentence, for example scenarios of openspec/specs/agent-instructions/spec.md. #7243 corrects five requirements. The others are not read yet.
Proposed Solution
Disposition: change the code, the prompts and the specs.
- Remove
PROMPT_RULE_TESTand its check from the stage job, and the rule from the two prompts. - A plan that changes a prompt names a replay or an evaluation run as its proof (
devops roadmap eval), or a contract test that compares the prompt with a value of the source code (model fields, enum values, limits). - Read the living specs for scenarios whose proof is a sentence test, and give each a command proof or remove it.
Proof: tests of the stage check with a plan that changes a prompt and names no sentence test. uv run devops ci --check --only openspec,docs passes.
Existing Tool Considered
devops roadmap eval replays recorded cases with no model call. No new mechanism.
Alternatives check of 2026-11-25: partly.
Tool: promptfoo/promptfoo (https://github.com/promptfoo/promptfoo), MIT, last activity 2026-11-25, maintained.
Reason: Searches found promptfoo, an open prompt-evaluation tool that runs declarative test cases with assertions and cached responses, so it covers the eval proof; it cannot remove the stage rule, edit the prompts or fix the living specs, and the repo's own replay already exists.
Covers:
- Declarative test cases for prompt changes
- Deterministic assertions such as contains, equals, regex, JSON
- Cached responses avoid repeated model calls in CI
Lacks:
- Cannot remove PROMPT_RULE_TEST or its stage check
- Does not edit the two planner prompts or spec scenarios
- Adds a Node eval path beside the in-repo replay
- No check of prompt text against source-code constants
Proposed design
Problem statement
The stage job refuses a plan that changes a stage prompt unless the plan lists the prompt sentence test. That rule makes each prompt edit need a test edit and conflicts with the owner direction of 2026-11-25. The change removes the rule, its constants and the rule text in the two planner prompts. It updates the self-rules spec. The broad audit of other living specs is deferred.
Acceptance criteria
Requirement: Stage check accepts a prompt change with no sentence test
The stage proposal check SHALL accept a plan that changes a roadmap_stage_*.md prompt and lists no prompt sentence test.
Scenario: Prompt change with a replay proof
- WHEN a test builds a
StageProposalthat changessrc/devops_cli/ai/tasks/roadmap_stage_split.mdand namesuv run devops roadmap eval stage --replayas itsverify - THEN
content_problemsreturns no problem that namestests/roadmap/stage/test_roadmap_stage_prompt_rules.pyorPROMPT_RULE_TEST.
Requirement: Prompt rule test constants removed
The stage change module SHALL define no PROMPT_RULE_TEST constant and no _LEGACY_PROMPT_RULE_TEST constant.
Scenario: Stage module has no prompt rule constant
- WHEN a test imports
devops_cli.roadmap.stage.stage_change - THEN the module has no attribute
PROMPT_RULE_TESTand no attribute_LEGACY_PROMPT_RULE_TEST.
Requirement: Planner prompts name a replay or contract proof
The two stage planner prompts SHALL name a replay or evaluation run or a contract test as the proof for a prompt change and SHALL name no prompt sentence test.
Scenario: Prompt rule text removed from the planner prompts
- WHEN the change runs
rg -n 'PROMPT_RULE_TEST|test_roadmap_stage_prompt_rules' src/devops_cli/ai/tasks/roadmap_stage_change.md src/devops_cli/ai/tasks/roadmap_stage_split.md - THEN the command exits 1 with no match, and
rg -n 'devops roadmap eval|contract test'on the same files exits 0 with a match.
Requirement: Self-rules spec removes the prompt sentence test
The roadmap-stage/self-rules spec SHALL hold no requirement that a plan which changes a stage prompt list the prompt sentence test.
Scenario: Self-rules spec passes OpenSpec validation
- WHEN the change runs
uv run devops ci --check --only openspec - THEN the command exits 0 and
rg -n 'prompt sentence test|PROMPT_RULE_TEST' openspec/specs/roadmap-stage/self-rules/spec.mdexits 1 with no match.
Requirement: Docs and OpenSpec checks pass
The change MUST pass the OpenSpec and docs checks.
Scenario: OpenSpec and docs rows pass
- WHEN the change runs
uv run devops ci --check --only openspec,docs - THEN the command exits 0.
Existing Tool Considered
The alternatives check of 2026-11-25 in the issue body gives partly for promptfoo/promptfoo (MIT, maintained). The block lists what the tool covers and lacks. The proposal does not adopt promptfoo. It removes PROMPT_RULE_TEST and its stage check in code, edits the two planner prompts and the self-rules spec, and keeps the in-repo devops roadmap eval replay. It adds no Node eval path.
Key questions
- Where does the stage job require the prompt sentence test?:
PROMPT_RULE_TESTis atsrc/devops_cli/roadmap/stage/stage_change.py:223. The test is attests/roadmap/stage/test_roadmap_stage_content.py:716. The rule is inopenspec/specs/roadmap-stage/self-rules/spec.mdand the two prompts aresrc/devops_cli/ai/tasks/roadmap_stage_change.mdandroadmap_stage_split.md. [sources: src/devops_cli/roadmap/stage/stage_change.py:223, tests/roadmap/stage/test_roadmap_stage_content.py:716, openspec/specs/roadmap-stage/self-rules/spec.md, src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/ai/tasks/roadmap_stage_split.md] - Which proof replaces the prompt sentence test for a plan that changes a stage prompt?: A plan uses
uv run devops roadmap eval stage --replayoruv run devops roadmap eval stage --limit <n>, or a contract test that compares prompt text with a source-code constant. The stage check accepts the plan withoutPROMPT_RULE_TEST. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py, src/devops_cli/commands/roadmap_eval_stage.py, AGENTS.md]- Chosen: Replay, eval run or contract test. It proves a prompt change without a test that holds a sentence of the prompt.
- Rejected: Prompt sentence test. The owner direction of 2026-11-25 removes tests that hold a sentence of a real document or prompt.
- Should this change adopt promptfoo for prompt evaluation?: No. The alternatives check gives
partlyfor promptfoo/promptfoo. It covers declarative prompt cases and cached responses. It lacks removal of the stage rule, the prompt and spec edits, and a source-constant check. The in-repo replay already gives the eval proof. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py]- Chosen: Keep the in-repo replay. The check gives
partly; the tool adds a Node eval path and does not make the code, prompt and spec edits. - Rejected: Adopt promptfoo. It covers prompt cases but not the removal of the stage rule, the prompt edits or the spec edits.
- Chosen: Keep the in-repo replay. The check gives
- Should the stage check refuse a prompt change that names no replay or contract proof?: No. The issue proof requires a plan that changes a prompt and names no sentence test to pass. The two prompts instruct the planner to name a replay, eval or contract proof. The stage check removes the sentence-test refusal and adds no new refusal. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/ai/tasks/roadmap_stage_split.md]
- Chosen: Remove only the sentence-test refusal. It matches the issue proof and the owner direction.
- Rejected: Add a replay-proof refusal. The issue does not ask for a new refusal, and the proof plan names no sentence test only.
- How should the change treat the other living specs that ask for a sentence test?: The change updates the
roadmap-stage/self-rulesspec that holds the removed rule. It defers the broad audit of other living specs to a new issue. That issue gives each remaining scenario a command proof or removes it. (best practice) [sources: openspec/specs/roadmap-stage/self-rules/spec.md, openspec/specs/agent-instructions/spec.md, openspec/config.yaml]- Chosen: Update the self-rules spec and defer the broad audit. The stage rule fix is workable now. The other specs have no known list, and test(tests): remove tests that hold a sentence of a document #7243 already corrects five requirements.
- Rejected: Audit every living spec in this change. The scope is not known and would delay the stage check fix.
- Rejected: Change no living spec. The self-rules spec would keep the removed rule.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 25, 2026
Both touch the same test file and prompt rules, but #4657 reads rules from openspec while the candidate removes the sentence-test requirement and replaces it with eval replay proof.devops-cli-service commentedon Nov 25, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (7)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Released in v0.244.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.244.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 05:10 UTC