Repository navigation
Description
What happened
About 10 of 37 plans drop an acceptance criterion of the issue (2975, 2980, 2982, 2985, 2986, 2987, 2988, 2990, 2994, 2972): for example #2980 drops the 5-run timing criterion and the 85% floor check, and #2990 has no task for the CLI exit code. No rule asks the model to map the criteria, and nothing checks it.
What should happen
- The reply has a
criterialist. Each entry holds the text of one acceptance criterion of the issue and the number of the group that delivers it, orpending-personwith a reason. check_proposalrefuses a reply that leaves an acceptance bullet of the issue unmapped.
Acceptance criteria
- A test with an issue of three criteria and a reply that maps two is refused.
- The
tasks.mdof a staged plan shows which group delivers which criterion.
Source
An evaluation on 2026-11-01 of the 37 docs(openspec): plan #N pull requests (35 merged, 2 open) found 34 that need fixes and 1 to reject. The per-PR reviews are in the comments of tracker #3005's thread and in .data/agent/scratch/plan-review.json of the owner's workstation. Related: #3005 (the kind of a task group: test for behavior, a repeatable check for other changes).
Proposed design
Problem statement
The stage job does not require the model to map each acceptance criterion of the issue to a task group. About 10 of 37 recent plans drop at least one criterion. No rule in the prompt asks for the mapping, and check_proposal does not verify it. The fix adds a criteria list to the reply schema and a check that refuses a reply with an unmapped criterion.
Acceptance criteria
Requirement: criteria field in reply
The stage reply SHALL include a criteria list in which each entry holds the text of one acceptance criterion of the issue and either the number of the group that delivers it or the string pending-person with a reason.
Scenario: reply with all criteria mapped
- WHEN The reply's criteria list contains an entry for every acceptance criterion of the issue, each with a group number or pending-person and a reason
- THEN check_proposal returns no problem for the criteria mapping
Requirement: unmapped criterion refused
check_proposal SHALL refuse a reply that leaves any acceptance bullet of the issue unmapped in the criteria list.
Scenario: reply missing one of three criteria
- WHEN The issue has three acceptance criteria and the reply's criteria list maps only two
- THEN check_proposal returns a problem naming the unmapped criterion
Requirement: tasks.md shows mapping
The tasks.md of a staged plan SHALL show which group delivers which acceptance criterion.
Scenario: staged plan tasks.md lists the mapping
- WHEN A plan is staged with criteria mapped to groups
- THEN tasks.md contains a section that lists each criterion text and its delivering group number or pending-person with reason
Existing Tool Considered
No open, maintained tool covers this need. The mapping is a project-specific validation rule for the stage job's reply schema. The project builds its own code: a pydantic field on the reply model, a pure validation function in check_proposal, a prompt line, a test, and a tasks.md rendering change. Written cost is about 100 lines of new code (roughly 1000 tokens) plus the test, and maintenance is limited to updating the field when the schema changes. Elapsed time is one focused agent session of 30 to 60 minutes.
Key questions
- Where does the criteria-mapping check live?: In check_proposal, the existing gate that the stage job runs on a reply. The check is a pure function of the reply and the issue body, following the same pattern as path_problems. [sources: docs/ROADMAP_WORKFLOW.md:176, openspec/changes/archive/2026-11-01-3010-stage-refuses-missing-paths/design.md:6]
- How does check_proposal compare the criteria in the reply against the criteria in the issue body?: Exact text match after trimming leading and trailing whitespace. The function collects the set of criterion texts from the issue body and the set from the reply's criteria list, then reports each text in the issue set that is absent from the reply set. This is deterministic and testable offline. (best practice) [sources: openspec/changes/archive/2026-11-01-3010-stage-refuses-missing-paths/design.md:6]
- Chosen: Exact text match after trim. Deterministic, testable offline, and the criteria come from the same issue body so the text is stable.
- Rejected: Fuzzy or semantic match. Adds a model call or a similarity library, which is overkill for text that comes from the same source.
- Rejected: Index-based match (first criterion to first entry). Fragile: the model may reorder or skip entries, and the check cannot tell a skip from a reorder.
- What is the shape of each entry in the criteria list?: An object with three keys: criterion (string, the text of the acceptance criterion), group (integer or the string pending-person), and reason (string, required when group is pending-person, optional otherwise). This is stated in the issue body. [sources: openspec/changes/archive/2026-10-30-2772-stage-group-files/design.md:5]
- How does tasks.md show the criterion-to-group mapping?: A dedicated section after the task groups, titled Criteria, lists each criterion text on one line followed by the delivering group number or pending-person with the reason. This keeps the group task lists uncluttered and makes the mapping easy to scan. (best practice) [sources: openspec/changes/archive/2026-10-30-2772-stage-group-files/design.md:5]
- Chosen: Dedicated Criteria section after the groups. Clear, scannable, and does not change the existing group task format.
- Rejected: Inline annotation in each group's task list. Clutters the task list and makes it harder to see which tasks belong to which criterion.
- Does the stage prompt need a new instruction to produce the criteria list?: Yes. The prompt roadmap_stage_change.md must state that the reply includes a criteria list and that every acceptance criterion of the issue must appear in it. The pydantic schema enforces the shape, and check_proposal enforces completeness. (best practice) [sources: docs/ROADMAP_WORKFLOW.md:177, openspec/changes/archive/2026-10-30-2772-stage-group-files/design.md:5]
- Chosen: Add a prompt line plus schema and check. The prompt guides the model, the schema enforces shape, and the check enforces completeness. All three layers follow the existing pattern.
- Rejected: Schema and check only, no prompt change. The model may not produce the field at all without a prompt instruction, causing a retry that wastes a turn.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 1, 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.Ten of thirty-seven plans drop criteria, but the pipeline still produces usable plans.Guarantees every acceptance criterion is covered by a task group, reducing missed requirements.Add a criteria list to the reply schema and one mapping check in check_proposal.Both add a check_proposal validation for stage job output, but 3017 checks group path ordering while the candidate checks criteria-to-group mapping.devops-cli-service commentedon Nov 1, 2026
Status set to Ready at 0dbd092 (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
Staged: branch
feat/3019-the-stage-job-maps-each-acceptance, draft pull request #3180. 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 15 model request(s), and used 470694 input tokens and 7487 output tokens. The tool calls, in order:
search_code({"text":"check_proposal"})search_code({"text":"path_problems"})read_file({"path":"src/devops_cli/roadmap/stage_change.py"})list_files({"directory":"src/devops_cli/roadmap"})read_file({"path":"src/devops_cli/roadmap/stage_change.py","start_line":80,"end_line":420})read_file({"path":"src/devops_cli/roadmap/stage_change.py","start_line":183,"end_line":520})read_file({"path":"src/devops_cli/roadmap/stage_change.py","start_line":274,"end_line":560})read_file({"path":"src/devops_cli/roadmap/stage_change.py","start_line":355,"end_line":700})read_file({"path":"src/devops_cli/roadmap/stage_change.py","start_line":436,"end_line":620})list_files({"directory":"tests/roadmap"})list_files({"directory":"src/devops_cli/roadmap"})search_code({"text":"def check_proposal"})search_code({"text":"class StageProposal"})search_code({"text":"def path_problems"})search_code({"text":"def _tasks_file"})read_file({"path":"src/devops_cli/roadmap/stage_change.py","start_line":200,"end_line":330})read_file({"path":"src/devops_cli/roadmap/stage_change.py","start_line":420,"end_line":500})read_file({"path":"src/devops_cli/roadmap/stage_change.py","start_line":286,"end_line":330})search_code({"text":"check_proposal("})read_file({"path":"src/devops_cli/roadmap/stage.py","start_line":620,"end_line":710})read_file({"path":"src/devops_cli/roadmap/stage_eval_gates.py","start_line":1,"end_line":130})read_file({"path":"src/devops_cli/roadmap/stage_eval_cases.py"})docs(openspec): archive the change of #3019
docs(openspec): plan #3187 group the roadmap job modules in subpackag…