Repository navigation
Description
Problem or Motivation
The stage planner can create task groups that pack no files. When the model writes an implementation task that omits the changed file paths in backtick code spans, step_files.py finds no files to pack.
The check _size_problems then fails with group-no-files. This blocks the plan pull request.
Proposed Solution & Architectural Design
- Stage Prompt: Update
src/devops_cli/ai/tasks/roadmap_stage_change.mdto state thatimplementationmust name every path inchangesin a code span. - Validation: In
StageGroupvalidation orrender_change, ensure the task implementation references the paths ofchanges.
Target Subsystem
SDLC, Git & PR Governance
Existing Tool Considered
Built-in roadmap stage prompt and validation in src/devops_cli/roadmap/.
Dependencies
- chore(roadmap): hold incremental stage and implement work #6521 (hold: incremental work on the stage, implement and fix-checks jobs waits for the re-architecture)
Proposed design
Problem statement
The stage planner can write an implementation task that omits changed file paths from backtick code spans. step_files.py then finds no files to pack. _size_problems fails the plan pull request with group-no-files. The change makes the prompt and StageGroup validation require every path in changes in a code span.
Acceptance criteria
Requirement: Prompt requires changed paths
The roadmap stage prompt MUST tell the planner to name every path in changes in a backtick code span in the task implementation.
Scenario: Prompt states the code span rule
- WHEN The roadmap stage prompt is read.
- THEN It states that
implementationnames every path inchangesin a backtick code span.
Requirement: Missing changed path is rejected
The StageGroup model MUST reject a group whose implementation omits any path in changes from a backtick code span.
Scenario: A group omits one changed path
- WHEN A
StageGrouphas two paths inchangesand itsimplementationnames only one in a backtick code span. - THEN Validation fails and the error names the missing path.
Requirement: Validation lists every missing path
The StageGroup validation error MUST name every path in changes that the implementation does not contain in a backtick code span.
Scenario: A group omits two changed paths
- WHEN A
StageGrouphas three paths inchangesand itsimplementationnames only one in a backtick code span. - THEN The validation error names both omitted paths.
Requirement: Complete group passes
The StageGroup model SHALL accept a group whose implementation contains every path in changes in a backtick code span.
Scenario: A group names every changed path
- WHEN A
StageGrouphas each path inchangesas a backtick code span in itsimplementation. - THEN Validation returns no error for the changed paths.
Existing Tool Considered
No check has run. The body names only the internal roadmap prompt and validation. No open, maintained tool or library covers this need. The change builds its own check in StageGroup. Estimated cost: 15k tokens and 3 hours to build, keep and fix the check.
Key questions
- Which check produces
group-no-filesfor a task group with no packed files?:_size_problemsinplan_check.pyproducesgroup-no-fileswhen a task group packs no files. [sources: src/devops_cli/roadmap/plan_check.py:409, src/devops_cli/roadmap/plan_check.py:529] - Where must the changed-path code span rule live?: Add a
StageGroupmodel validator that runs beforerender_changeand returns a content fault to the model. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py, openspec/changes/archive/2026-10-30-2772-stage-group-files/design.md]- Chosen:
StageGroupmodel validator. It rejects a bad group before rendering, and the stage retry can correct the reply. - Rejected:
render_change. It runs after the model reply and cannot return a structured correction. - Rejected:
plan_check._size_problems. It detects the fault only after the plan files exist and blocks the plan pull request.
- Chosen:
- What must the stage prompt say about changed paths?: Tell the planner that
implementationmust name every path inchangesin a backtick code span. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, tests/roadmap/stage/test_roadmap_stage_prompt_rules.py]- Chosen: State the rule in the stage prompt. The model reads the rule before it writes a task group.
- Rejected: Rely on validation only. The model gets no instruction and needs more correction retries.
- Rejected: Rely on the prompt only. A model can still omit a path and block the plan pull request.
- What counts as naming a path in a code span?: A path counts when a backtick code span contains exactly that path. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/roadmap/stage/stage_change.py]
- Chosen: Exact code span content. It is unambiguous and matches the prompt rule to write every path in a code span.
- Rejected: Substring match. A longer path can satisfy a shorter path and hide the omission.
- Rejected: Path with optional line number. It adds a form that the prompt does not state and tests must cover.
- Should
_size_problemskeep thegroup-no-filescheck?: Keep it as a final guard. Do not remove it. (best practice) [sources: src/devops_cli/roadmap/plan_check.py:409]- Chosen: Keep
group-no-files. It protects against any packing defect that the schema does not catch. - Rejected: Remove it. It would hide a real failure and weaken the plan check.
- Chosen: Keep
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.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.Prevents a recurring group-no-files failure but does not block all stage work.Reduces failed plan pull requests and improves stage reliability for users.Requires a prompt edit plus a validation rule in StageGroup or render_change.Both target the same prompt file and the same goal of requiring file paths in code spans, but the candidate adds a validation check and focuses on changes paths while 3978 is prompt-only and broader.dan-petty commentedon Nov 8, 2026
Pull request #4112 reproduces this problem. The stage planner generated two groups for issue #3296. Group 1 changed
src/devops_cli/roadmap/stage/stage_change.pyandsrc/devops_cli/lang/en/messages.py. The task text omitted both paths from backtick code spans.step_files.pypacked zero files for Group 1.devops roadmap plan-check 4112failed withgroup-no-files.Adding both file paths in backtick code spans to task 1.1 resolved the check error. This confirms that the stage prompt and schema must enforce file paths in backtick code spans for implementation tasks.
devops-cli-service commentedon Nov 8, 2026
Status set to Ready at bfe0192 (see proposed design in issue body).
devops-cli-service commentedon Nov 10, 2026
Alternatives check: none
Reason: Two searches found no open tool that checks a generated task's text for every changed path in a backtick code span. The need is specific to this project: the
StageGroupmodel, itschangesfield and the stage prompt. A generic Markdown parser could extract code spans, but the check is a small validator that the project's own model has to hold.Tool: none found
Lacks:
changesappears in a code span ofimplementationroadmap_stage_change.mdSearches run:
Checked on 2026-11-10. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 18, 2026
Plan state: branch
feat/4025-enforce-that-tasks-name-every-changed, draft pull request #6280. The pull request plans the item and closes no issue. The stage job and the step fix-plan edit this comment, and a comment of each run tells what the run did.The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:
13 remaining items
devops-cli-service commentedon Nov 18, 2026
Owner question: The step "group 1" stopped with a plan defect: the plan does not hold. Amend the plan or split the item?
Options
Recommendation: Amend the plan: the step follows the plan, so a step that cannot follow it names a defect of the plan.
Evidence
devops-cli-service commentedon Nov 18, 2026
Stopped at group 1.
Failure class:
plan_defect.Action taken: none.
Action left:
wait: wait for a person.Reason:
Last message of the agent (a claim that no check verified): I reverted the work because the plan cannot pass its own census. Here is what I found. What I did (then reverted, as a plan-request keeps no file): - Wrote
tests/roadmap/stage/test_roadmap_stage_group_paths.pywithtest_one_omitted_path,test_two_omitted_paths,test_every_changed_path_namedandtest_the_plan_of_this_change_passes_the_content_rule. On the base the first two failed for the right reason (content_problemsgave no problem for the omitted path); the plan-of-this-change literal was clean. - Added_changed_path_span_problemstosrc/devops_cli/roadmap/stage/stage_change.py, the messagestage_implementation_missing_pathstosrc/devops_cli/lang/en/messages.py, and the call incontent_problems.uv run devops ci test tests/roadmap/stage/test_roadmap_stage_group_paths.pythen passed (4 passed). - Applied the builder edit of group 2 to measure the census.uv run devops ci test tests/roadmap/stagegave 547 failed without it and 150 failed with it; 171 lines name the new message. The failures span about 40 modules that no group of the plan changes (for exampletests/roadmap/stage/test_roadmap_stage_content.pyasserts an exact problem count,test_roadmap_stage_self_acceptance.pyreplays the #3972 plan that names 2 of its 3 changed paths, andtest_roadmap_stage_eval_gates.pyreplays the seven recorded good plans). So task 2.1's verification (uv run devops ci test tests/roadmappasses) cannot hold, and the plan has no group that mayThe item is Blocked, and the job will not run it. Fix the cause. Then comment
implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits ofroadmap.implement.digest_clears_per_classandroadmap.implement.digest_clears_per_itemallow it.dan-petty commentedon Nov 20, 2026
Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.
dan-petty commentedon Nov 24, 2026
Amend the plan.
dan-petty commentedon Nov 30, 2026
Triage under #6519 (owner instruction of 2026-11-30). A prompt rule and a validation for the stage job are incremental plan-shape work; the check
group-no-filesnow lives insrc/devops_cli/roadmap/plan_check.pyand the stage runs on stock Coder. If the failure still shows in graded attempts, file a new item from that evidence. Closed as not planned.