Repository navigation
Description
Problem
The stage job plans task groups for an OpenSpec change. src/devops_cli/ai/tasks/roadmap_stage_change.md defines the documentation key of groups:
documentation, the documents that the step changes, or null when it changes none;
Because the prompt asks for "the documents that the step changes", the model emits only the file path (such as docs/ROADMAP_WORKFLOW.md or src/devops_cli/ai/tasks/roadmap_stage_change.md).
_task_texts in src/devops_cli/roadmap/stage_change.py formats documentation tasks with texts.stage_task_documents:
stage_task_documents: str = "{work}, and run \{command}`\n - Verification: `uv run devops ci docs` passes"`
When group.documentation holds only a file path, the resulting task becomes:
- [ ] 6.2 docs/ROADMAP_WORKFLOW.md, and run \uv run devops docs generate --sync-readme``
This text lacks an imperative verb. It breaks rule 9 of AGENTS.md (ASD-STE100) and produces malformed tasks in plans (for example in #3283 and #3298).
Proposed change
- Update
src/devops_cli/ai/tasks/roadmap_stage_change.mdto instruct the model to provide an action starting with an imperative verb fordocumentation(for example "Update docs/ROADMAP_WORKFLOW.md"), or null when the step changes no document. - In
_task_textsorStageGroupvalidation insrc/devops_cli/roadmap/stage_change.py, check ifgroup.documentationstarts with a repository path and no verb; prepend an action verb such as "Update" so rendered task lines always begin with an imperative verb. - Add a test in
tests/roadmap/test_roadmap_stage_plan.pyortests/roadmap/test_roadmap_stage_form.pyasserting that rendered documentation tasks start with an imperative verb.
Acceptance criteria
- A test asserts that
StageGroupwithdocumentation="docs/ROADMAP_WORKFLOW.md"renders as a task with an imperative verb. - A test asserts that
roadmap_stage_change.mdinstructs the model to begindocumentationwith an imperative verb. - All rendered task items in staged changes pass task grammar and start with an imperative verb.
Source: #3298
Proposed design
Problem statement
The stage planner can write only a file path in a group's documentation field. The renderer then writes a documentation task that starts with a path and no imperative verb. The task breaks the ASD-STE100 rule and makes malformed plans.
Acceptance criteria
Requirement: Stage prompt states the documentation action
The stage change prompt SHALL tell the model to start the documentation text with an imperative verb, to name each document that the step changes, and to write null when it changes none.
Scenario: The prompt states the documentation form
- WHEN the stage change prompt is loaded
- THEN the prompt says that
documentationstarts with an imperative verb, names the documents, and isnullwhen the step changes no document.
Requirement: Path-only documentation renders a task with a verb
A StageGroup with a path-only documentation value MUST render a documentation task that starts with an imperative verb.
Scenario: Documentation holds only a file path
- WHEN a
StageGrouphasdocumentationset todocs/ROADMAP_WORKFLOW.md - THEN the rendered
tasks.mdtask starts withUpdate docs/ROADMAP_WORKFLOW.mdand then runsuv run devops docs generate --sync-readme.
Requirement: Documentation action stays unchanged
The renderer MUST keep a documentation text that already starts with an imperative verb.
Scenario: Documentation holds an action
- WHEN a
StageGrouphasdocumentationset toDocument the fix in docs/TESTING.md - THEN the rendered task starts with
Document the fix inand holds noUpdate Documenttext.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this repository-specific stage prompt and task renderer. The change builds its own code: about 2,000 tokens to build, about 500 tokens to keep and fix, and about 20 minutes of elapsed time. It deletes no internal code.
Key questions
- What does the current prompt and renderer do with
documentation?: The prompt asks for the documents that the step changes. The renderer writes{work}, and run ...directly. A path-only value has no imperative verb. [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/roadmap/stage_change.py] - Where should the renderer add the missing imperative verb?: In
_task_texts, prependUpdatewhen thedocumentationtext starts with a repository path: its first token contains/and no whitespace. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_plan.py, AGENTS.md]- Chosen: Normalize in
_task_texts. The acceptance criterion gives a path-onlyStageGroupand expects a rendered task with a verb. The renderer is the last step beforetasks.md. - Rejected: Reject path-only
documentationinStageGroup. A rejection does not meet the criterion that a path-only group renders with a verb. It also sends the model another error. - Rejected: Change only the prompt. A prompt is not a check. The model can still write a path, as the issue shows.
- Chosen: Normalize in
- How should the prompt describe the
documentationkey?: The prompt should say thatdocumentationis an action that starts with an imperative verb and names each document, ornullwhen the step changes none. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, AGENTS.md]- Chosen: State the action and the verb. The model needs the shape of the text, not only the files. The wording matches the renderer rule.
- Rejected: Keep the documents-only wording. This is the current wording that produces a path-only text.
- Rejected: Give an example only. An example alone does not state the rule.
- Which test module should hold the renderer test?:
tests/roadmap/test_roadmap_stage_plan.py, because it already renders groups throughrender_changeand asserts task lines. (best practice) [sources: tests/roadmap/test_roadmap_stage_plan.py, tests/roadmap/test_roadmap_stage_form.py]- Chosen:
tests/roadmap/test_roadmap_stage_plan.py. It already has the render helper and task-line assertions. - Rejected:
tests/roadmap/test_roadmap_stage_form.py. It checks prompt examples and path forms, not the rendered task line.
- Chosen:
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.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.It produces invalid task grammar in plans but does not block a user workflow.Malformed task text breaks the ASD-STE100 rule and confuses the implement step, but plans still render.The fix is a prompt wording change, a small validation guard, and one test.Both touch the stage_task_documents template in stage_change.py, but #3226 removes unneeded workflow bullets while this candidate adds an imperative verb to the documentation field.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
The stage job returned the item to New. The premise of the issue does not hold at the staging commit, so the job planned no change and opened no pull request.
Evidence:
x
dan-petty commentedon Nov 4, 2026
This item moves into #3226. Both change the same renderer text,
stage_task_documents, and #3327 is the verb half of it.What moved, in the section
Scope from #3327of #3226: the prompt line fordocumentation, the rule that a text with a verb stays unchanged, the criterion that all rendered tasks start with a verb, the tests, the examples, the cost, and the need to keep_DOCUMENTS_MARKinsrc/devops_cli/roadmap/plan_read.py:62working.One choice changed. #3226 says
Editand #3327 saysUpdatefor a bare path. The fixed verb isEdit.Proof that the defect stays:
src/devops_cli/lang/en/messages.py:3246still writes{work}, and run, andsrc/devops_cli/roadmap/stage_change.py:788passes the text unchanged. The stage comment of 2026-11-03T04:44Z gave the evidencex, which is no finding. This item has no change folder, no open pull request and no parent issue.