Skip to content

fix(roadmap): the stage check asks no prompt sentence test #7246

Done

Description

@dan-petty

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.py holds PROMPT_RULE_TEST (tests/roadmap/stage/test_roadmap_stage_prompt_rules.py). The stage check refuses a plan that changes a roadmap_stage_*.md prompt and does not list that file as verify.
  • src/devops_cli/ai/tasks/roadmap_stage_change.md and roadmap_stage_split.md give the planner the same rule.
  • openspec/specs/roadmap-stage/self-rules/spec.md holds 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_TEST and 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 StageProposal that changes src/devops_cli/ai/tasks/roadmap_stage_split.md and names uv run devops roadmap eval stage --replay as its verify
  • THEN content_problems returns no problem that names tests/roadmap/stage/test_roadmap_stage_prompt_rules.py or PROMPT_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_TEST and 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.md exits 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_TEST is at src/devops_cli/roadmap/stage/stage_change.py:223. The test is at tests/roadmap/stage/test_roadmap_stage_content.py:716. The rule is in openspec/specs/roadmap-stage/self-rules/spec.md and the two prompts are src/devops_cli/ai/tasks/roadmap_stage_change.md and roadmap_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 --replay or uv 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 without PROMPT_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 partly for 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.
  • 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-rules spec 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.

Moved to new items

#7564

Activity

  1. added
    type/bug
    source/agent
    scope/roadmap
    on Nov 25, 2026
  2. dan-petty commented on Nov 25, 2026

    @dan-petty
    OwnerAuthor
  3. added
    status/new
    value/medium
    effort/medium
    priority/p2-medium
    on Nov 25, 2026
  4. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    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:

    • promptfoo evaluate prompts assertions CI test cases, results: 5
    • open source prompt regression testing replay recorded cases without model call, results: 5
    • "promptfoo" assertions cached responses replay, results: 5
    • promptfoo github prompt evaluation test cases, results: 5
    • deepeval prompt evaluation pytest assertions, results: 5
    • promptfoo, results: 5
    • promptfoo docker image testing evaluating red-teaming LLM apps, results: 5

    Sources:

  5. added
    status/ready
    and removed
    status/new
    on Nov 28, 2026
  6. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.

  7. added
    owner/agent
    status/in-progress
    and removed
    status/ready
    on Nov 29, 2026
  8. removed
    status/in-progress
    owner/agent
    on Nov 29, 2026
  9. devops-cli-service commented on Nov 29, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-29 05:10 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions