Repository navigation
Description
Problem
StageProposal in src/devops_cli/roadmap/stage_change.py defines the model reply schema for staging plans.
test_the_top_level_keys_of_the_reply_are_the_fields_of_the_proposal in tests/roadmap/test_roadmap_stage_prompt_rules.py asserts that every field in StageProposal.model_fields matches a - \`:bullet insrc/devops_cli/ai/tasks/roadmap_stage_change.md` under "The reply has these keys and no other".
When a plan proposes adding a field to StageProposal (for example dependencies in #3252), the staging planner often adds the behavior rule but forgets the matching reply key bullet. When an agent implements the change, the prompt test fails immediately.
The stage check does not verify that plans modifying StageProposal include the prompt reply key update in their tasks.
Proposed change
- In
src/devops_cli/roadmap/stage_eval_gates.pyorstage_specs.py, add a check when a plan touchesStageProposalinstage_change.py. - When a plan adds a field to
StageProposal, require the plan tasks to include updatingsrc/devops_cli/ai/tasks/roadmap_stage_change.mdwith the new reply key bullet. - Add a test in
tests/roadmap/test_roadmap_stage_prompt_rules.pyortest_roadmap_stage_plan.pyasserting that plans adding aStageProposalfield must schedule updating the prompt keys.
Acceptance criteria
- A test asserts that a plan adding a field to
StageProposalwithout updating the prompt reply keys is refused with an informative message. - A plan adding a field to
StageProposalthat specifies both the prompt key bullet and the prompt rule passes the check.
Source: #3298
Proposed design
Problem statement
The stage prompt test fails after implementation when a plan adds a field to StageProposal and forgets the matching reply-key bullet. The stage job does not check the plan for the prompt update. This change adds a deterministic gate and tests that refuse the incomplete plan at staging time.
Acceptance criteria
Requirement: Prompt key gate refuses a missing prompt update
The stage gate SHALL refuse a plan that adds a field to StageProposal and does not update the reply-key bullet in src/devops_cli/ai/tasks/roadmap_stage_change.md.
Scenario: Missing reply key
- WHEN A plan changes
src/devops_cli/roadmap/stage_change.pywith a field addition toStageProposaland no group changes the prompt file. - THEN The gate returns a problem that names
src/devops_cli/ai/tasks/roadmap_stage_change.mdand the missing reply key.
Requirement: Prompt key gate accepts the prompt update
The stage gate SHALL accept a plan that adds a field to StageProposal when a group updates both the reply-key bullet and the rule in src/devops_cli/ai/tasks/roadmap_stage_change.md.
Scenario: Prompt key and rule present
- WHEN A plan changes
src/devops_cli/roadmap/stage_change.pywith a field addition toStageProposaland one group updates the prompt file with the new reply key and its rule. - THEN The prompt-key gate returns no problem.
Requirement: Replay counts the prompt key defect
The stage replay SHALL catch a recorded prompt-key defect with the new gate.
Scenario: Recorded missing prompt key
- WHEN A golden case holds a plan with a
StageProposalfield addition and no prompt update. - THEN The replay reports the defect as caught by the prompt-key gate.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this project-specific plan gate. The change builds its own code. The written cost is about 5,000 output tokens to build, keep and fix it, and about 1 hour of elapsed time. It deletes no internal code.
Key questions
- Which test fails when
StageProposalgains a field without a prompt reply key?:test_the_top_level_keys_of_the_reply_are_the_fields_of_the_proposalintests/roadmap/test_roadmap_stage_prompt_rules.pycompares the fields ofStageProposalwith the reply-key bullets insrc/devops_cli/ai/tasks/roadmap_stage_change.md. [sources: tests/roadmap/test_roadmap_stage_prompt_rules.py, src/devops_cli/roadmap/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md] - Where should the stage job check that a
StageProposalfield addition updates the prompt reply keys?: Add a deterministic gate insrc/devops_cli/roadmap/stage_eval_gates.pyand run it in the stage gate set. (best practice) [sources: src/devops_cli/roadmap/stage_eval_gates.py, tests/roadmap/test_roadmap_stage_prompt_rules.py, src/devops_cli/ai/tasks/roadmap_stage_change.md]- Chosen: New gate in
stage_eval_gates.py. The stage gate set is deterministic and replayable, and the replay records a named defect. - Rejected: Add only to
check_proposal. The golden replay would not name the defect and could miss a regression. - Rejected: Rely on the prompt test. The prompt test fails after implementation, not during staging.
- Chosen: New gate in
- How does the gate identify a plan that adds a field to
StageProposal?: The gate reads a group that changessrc/devops_cli/roadmap/stage_change.pyand whose title, implementation, or documentation namesStageProposaland the wordfield. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md, tests/roadmap/test_roadmap_stage_prompt_rules.py]- Chosen: Text marker in the group. The plan has no diff, so a deterministic text marker is the only offline signal.
- Rejected: Any change to
stage_change.py. It refuses validator and docstring edits that add no field. - Rejected: Parse a patch. The staging plan holds no patch.
- What must the plan update in the prompt to pass the gate?: A group must change
src/devops_cli/ai/tasks/roadmap_stage_change.mdand its text must name the new reply key bullet and the behavior rule for that key. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, tests/roadmap/test_roadmap_stage_prompt_rules.py]- Rejected: Require the prompt file change only. It accepts a plan that names no reply key.
- Chosen: Require the prompt file change and text that names the reply key and rule. It matches the prompt test and the issue.
- Rejected: Require only the test change. The prompt test checks the prompt file, not the test.
- Which defect type and gate name should record the prompt-key failure?: Add
DefectType.PROMPT_KEY_MISSINGandGateName.PROMPT_KEYS, and register oneGatethat catches the new type. (best practice) [sources: src/devops_cli/roadmap/stage_eval_gates.py, src/devops_cli/roadmap/stage_eval_cases.py]- Chosen: New defect type and gate. The replay reports the defect by its own name.
- Rejected: Reuse
MISSING_PATH. The defect is not a missing path and the message would mislead. - Rejected: Reuse
CRITERION_DROPPED. The defect is not an acceptance criterion.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 3, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.It prevents a recurring class of prompt-test failures but does not block current delivery.It removes a known source of implement-stage failures when a StageProposal field is added.It requires a new check in stage_eval_gates or stage_specs plus a test in the roadmap test suite.Both items guard the relationship between StageProposal and roadmap_stage_change.md, but #3202 checks the prompt content against other documents while the candidate checks that a plan includes a prompt update task.devops-cli-service commentedon Nov 3, 2026
Status set to Ready at 7df9244 (see proposed design in issue body).
devops-cli-service commentedon Nov 3, 2026
Staged: branch
feat/3328-the-stage-probe-checks-prompt-reply, draft pull request #3336. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
The plan run made 2 model request(s), and used 148873 input tokens and 8490 output tokens. The model made no tool call.
A model review of the plan found these points. They stop no draft, and a person judges them:
otherat group 1 and group 2: A new gate and a new recorded case break existing tests of the replay that assert exact counts. No group updates those assertions. The gate totals,len(defects) == 72andreport.judged() == (64, 299)all change. The plan also adds nogoodcase for its second eval scenario. Evidence: "GateName.CRITERIA: (False, 0),"dan-petty commentedon Nov 3, 2026
PR #3333 (the plan for #3320) is a concrete case. The plan adds a field to
StageProposaland changes no bullet insrc/devops_cli/ai/tasks/roadmap_stage_change.md.test_the_top_level_keys_of_the_reply_are_the_fields_of_the_proposalcompares those bullets withStageProposal.model_fields, so the added field would fail the suite at implementation time. I corrected the plan in commit98fe254: group 1 now changes the prompt and the prompt-rules test. This issue is the gate that should refuse the incomplete plan before a draft opens.docs(openspec): correct the code citations in the plan of #3328
docs(openspec): plan #3328 gate a plan that adds a StageProposal field (
[-]feat(roadmap): the stage probe checks prompt reply keys when StageProposal adds a field[/-][+]feat(roadmap): gate a plan that adds a StageProposal field[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 72 characters, and the limit is 60. The type and the scope stay.
feat(roadmap): the stage probe checks prompt reply keys when StageProposal adds a fieldfeat(roadmap): gate a plan that adds a StageProposal fieldfeat(roadmap): gate a plan that adds a StageProposal field
feat(roadmap): accept a plan referencing valid DefectType members (#4160
feat(roadmap): gate a plan that adds a StageProposal field
devops-cli-service commentedon Nov 8, 2026
Released in v0.90.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.90.0
devops-cli-service commentedon Nov 8, 2026
Live since 2026-11-08 15:26 UTC