Repository navigation
Description
What happened
Two parts of the task renderer add text to a plan that the plan does not need. They were found while fixing plan pull request #3157 (plan for #2670, a change of SECURITY.md only).
tasks_text(src/devops_cli/roadmap/stage_change.py:569) ends everytasks.mdwith a## Workflow follow-upsection and the bullet "Pending a person: review the diff in tuicr (tuicr -r ..HEAD)."openspec/config.yamlallows that bullet only for a change that alters code. A plan for a documents-only change gets it too.stage_task_documents(src/devops_cli/lang/en/messages.py:2990) writes the documents of a group into a task with a forced step to rundevops docs generate --sync-readme, for any group withdocumentation, whether or not a command, option or message changes. The model filled{work}with a bare path, and the task read "SECURITY.md, runuv run devops docs generate --sync-readme, and verify ...", which has no verb for the document.
What should happen
- The
tuicrbullet is added only when a group of the plan changes a path undersrc/. - The docs-regeneration step is added only for a group that changes a command, an option or a message (a path under
src/devops_cli/commands/orsrc/devops_cli/lang/), and the task names the document with a verb ("EditSECURITY.md: ..."). - The model's
documentationtext is checked for a verb, or the template builds the sentence from the path and a fixed verb, so a bare path cannot reach the task.
Source
Fixing the plan of #3157; the agent's notes (pr3157.md, rows 2 and 6). Related: #3200 (content gate), #3210 (prompt tests).
Scope from #3327
The prompt asks for "the documents that the step changes" (line 16 of src/devops_cli/ai/tasks/roadmap_stage_change.md), so the model writes a path. stage_task_documents (src/devops_cli/lang/en/messages.py:3246) writes {work}, and run ..., and _task_texts (stage_change.py:788) passes the text unchanged. The task then reads "docs/ROADMAP_WORKFLOW.md, and run uv run devops docs generate --sync-readme", with no verb. This breaks rule 9 of AGENTS.md. Plan pull requests #3283 and #3298 show it.
Add to this issue:
- Prompt. A prompt line says that
documentationstarts with an imperative verb, names each document, and isnullwhen the step changes no document. - Renderer. The renderer gives a verb to a text that starts with a path. The fixed verb is
Edit, as the design of this issue says, and it replacesUpdateof fix(roadmap): the stage prompt instructs the planner to write an action for group documentation #3327. A root document has no slash, so a test on/in the first word is not enough:SECURITY.mdmust also get the verb. - No double verb. The renderer keeps a text that already starts with a verb.
Document the fix in docs/TESTING.md(tests/roadmap/test_roadmap_stage_plan.py:726) stays as written, with noEdit Document. - Prompt only is not enough. A prompt is not a check, so the renderer rule stays.
- Criterion. All rendered tasks in a staged change pass the task grammar and start with an imperative verb.
- Tests. Add a test for a path-only group, a test for a text that starts with a verb, and a test for the prompt line.
- Second reader.
_DOCUMENTS_MARK(src/devops_cli/roadmap/plan_read.py:62, used at line 253) derives from the same template. It must still match the new template.
Evidence: 5 of 6 documentation fields in tests/fixtures/roadmap_eval/stage/*/plan.json start with a path. openspec/changes/3204-scaffold-a-command-and-a-test/tasks.md:9 starts with a path. openspec/changes/3308-the-plan-check-compares-a-number/tasks.md:43 and task 2.3 of openspec/changes/3433-refuse-a-plan-group-that-only/tasks.md have no action. Merged plan text is weak evidence, because dan-petty commits corrected several plans before their merge.
The line numbers in this issue moved: messages.py:2990 is now messages.py:3246, and stage_change.py:569 is now stage_change.py:835.
Cost of this part: about 2,000 tokens to build, about 500 tokens to keep and fix, and about 20 minutes elapsed.
Proposed design
Problem statement
The task renderer adds a tuicr review bullet to every plan. It also adds a documentation regeneration step to every documentation group and can render a bare path as a task. This change makes both additions conditional and makes a document task start with an imperative verb.
Acceptance criteria
Requirement: Tuicr bullet only for source changes
The task renderer SHALL add the tuicr review bullet only when at least one task group changes a path under src/.
Scenario: Documents-only plan omits tuicr bullet
- WHEN A plan has task groups that change no path under
src/. - THEN The rendered
tasks.mdcontains noPending a person: review the diff in tuicrbullet.
Requirement: Empty workflow follow-up section omitted
The task renderer SHALL omit the ## Workflow follow-up section when it has no bullet to write.
Scenario: No follow-up bullet leaves no section
- WHEN A plan has no workflow follow-up bullet.
- THEN The rendered
tasks.mdcontains no## Workflow follow-upheading.
Requirement: Tuicr bullet for source change
The task renderer SHALL add the tuicr review bullet when at least one task group changes a path under src/.
Scenario: Source change gets tuicr bullet
- WHEN A plan has one group that changes
src/devops_cli/roadmap/stage_change.py. - THEN The rendered
tasks.mdcontains the tuicr review bullet.
Requirement: Docs regeneration only for CLI changes
The task renderer SHALL add the devops docs generate --sync-readme step only to a documentation group that changes a path under src/devops_cli/commands/ or src/devops_cli/lang/.
Scenario: Security document group omits docs generation
- WHEN A documentation group changes only
SECURITY.md. - THEN The generated task contains no
uv run devops docs generate --sync-readmestep.
Requirement: Docs regeneration for command or message change
The task renderer SHALL add the devops docs generate --sync-readme step to a documentation group that changes a path under src/devops_cli/commands/ or src/devops_cli/lang/.
Scenario: Command change keeps docs generation
- WHEN A documentation group changes
src/devops_cli/commands/roadmap.py. - THEN The generated task contains
uv run devops docs generate --sync-readme.
Requirement: Document task starts with Edit for a path
The task renderer MUST prepend the fixed verb Edit to a documentation text that starts with a path.
Scenario: Root document path gets the Edit verb
- WHEN A documentation group supplies the document text
SECURITY.md. - THEN The rendered task starts with
Editand namesSECURITY.md.
Requirement: Document task keeps an existing verb
The task renderer MUST keep a documentation text that already starts with an imperative verb unchanged.
Scenario: Existing verb has no double verb
- WHEN A documentation group supplies the text
Document the fix in docs/TESTING.md. - THEN The rendered task starts with
Documentand does not containEdit Document.
Requirement: Documentation prompt names the verb rule
The stage prompt SHALL state that the documentation field starts with an imperative verb, names each document, and is null when the step changes no document.
Scenario: Prompt states the documentation rule
- WHEN A test reads the stage prompt file.
- THEN The prompt text states the imperative verb rule, the document naming rule, and the null rule.
Requirement: Rendered tasks start with an imperative verb
Every rendered task in a staged change SHALL start with an imperative verb and pass the task grammar.
Scenario: Rendered document task passes task grammar
- WHEN A staged change renders a group with a path-only documentation text.
- THEN Every rendered task starts with an imperative verb and passes the task grammar.
Requirement: Document mark still matches
The plan reader SHALL still find _DOCUMENTS_MARK in the rendered document task after the template change.
Scenario: Document mark matches the new template
- WHEN A documentation task renders from the new template.
- THEN
_DOCUMENTS_MARKis present in the task text and the partition returns the document work.
Existing Tool Considered
No alternatives check has run. No open, maintained tool covers this need: the change edits project-specific task templates in src/devops_cli/roadmap/stage_change.py and src/devops_cli/lang/en/messages.py. The change builds no replacement library. The written cost is about 2,000 tokens to build, about 500 tokens to keep and fix, and about 20 minutes elapsed.
Key questions
- Does
openspec/config.yamlallow the tuicr review bullet only for a change that alters code?: Yes. The tasks rule says that a change that alters code may end with the tuicr review bullet. [sources: openspec/config.yaml] - How should the renderer prevent a bare path in a documentation task?: Use the template to prepend the fixed verb
Editwhen the first word is a path: it contains/or names a file with an extension. Keep a text that starts with an imperative verb unchanged. This replaces theUpdateverb of fix(roadmap): the stage prompt instructs the planner to write an action for group documentation #3327. (best practice) [sources: src/devops_cli/lang/en/messages.py, src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_plan.py, openspec/config.yaml, AGENTS.md]- Chosen: Template with fixed verb Edit and path test. It gives a deterministic task, handles a root document such as
SECURITY.md, and keeps a text that already starts with a verb. - Rejected: Validate model text for a verb. A natural-language check is fragile and can accept a bad sentence.
- Rejected: Prompt-only instruction. A prompt cannot guarantee that the rendered task has a verb.
- Rejected: Test only for
/in the first word. A root document has no slash, soSECURITY.mdwould not get the verb.
- Chosen: Template with fixed verb Edit and path test. It gives a deterministic task, handles a root document such as
- Should the renderer keep a documentation text that already starts with an imperative verb?: Yes. The renderer keeps the text unchanged, so
Document the fix in docs/TESTING.mdstays as written and noEdit Documentappears. (best practice) [sources: tests/roadmap/test_roadmap_stage_plan.py, src/devops_cli/roadmap/stage_change.py, src/devops_cli/lang/en/messages.py]- Chosen: Keep the existing verb. It avoids a double verb and preserves a correct task text.
- Rejected: Always prepend Edit. It produces
Edit Documentand breaks the task grammar.
- Which documentation groups get the docs regeneration step?: Only a documentation group that changes a path under
src/devops_cli/commands/orsrc/devops_cli/lang/gets the step. (best practice) [sources: openspec/config.yaml, src/devops_cli/roadmap/stage_change.py, src/devops_cli/lang/en/messages.py]- Chosen: Command, option or message path. These paths change the CLI reference or user-facing messages, so the generated documentation changes.
- Rejected: Any documentation group. A documents-only change does not change generated CLI documentation.
- Rejected: Any path under src/. Most source changes do not change a command, an option or a message.
- Which plans get the tuicr review bullet?: A plan gets the bullet when at least one task group changes a path under
src/. (best practice) [sources: openspec/config.yaml, src/devops_cli/roadmap/stage_change.py]- Chosen: Any source path. The bullet is for code review, and any source change is code.
- Rejected: Every plan. A documents-only plan has no code diff for tuicr.
- Rejected: Only behavior groups. A refactor or a test change under
src/still needs code review.
- Should the stage prompt alone enforce the verb rule?: No. The prompt states the rule, and the renderer rule stays as the check. A prompt is not a check. (best practice) [sources: AGENTS.md, src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/roadmap/stage_change.py]
- Chosen: Prompt line and renderer rule. The renderer enforces the rule even when the model text starts with a path.
- Rejected: Prompt only. A prompt cannot guarantee that the rendered task has a verb.
- How does
_DOCUMENTS_MARKkeep matching the new document template?:_DOCUMENTS_MARKderives fromMESSAGES.roadmap.stage_task_documents. Keep the fixed text that it formats in the new template, so the plan reader still partitions the rendered task. [sources: src/devops_cli/roadmap/plan_read.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-05: none.
Tool: none found.
Activity
devops-cli-service commentedon Nov 2, 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.The renderer emits steps and malformed task text that confuse implement agents, but the plans still complete.Correct task text reduces agent errors and rework on documents-only plans.Two functions need conditional logic and a verb check, plus tests for the new branches.Both fix the stage job adding steps that a non-code group does not need, but #3005 removes the failing-test task while the candidate removes the tuicr bullet and the docs-regeneration step.devops-cli-service commentedon Nov 2, 2026
Status set to Ready at f082d5c (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 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:
placeholder
12 remaining items
docs(openspec): archive #3226 the task renderer change
Revert "docs(openspec): archive #3226 the task renderer change"
docs(openspec): plan #3226 Stop the task renderer adding unneeded steps
docs(openspec): archive #3226 the task renderer change
docs(openspec): plan #3226 Stop the task renderer adding unneeded steps
docs(openspec): plan #3226 render only the steps a plan needs
docs(openspec): split the regeneration step into its own requirement (#…
docs(openspec): archive the change (#3226)
devops-cli-service commentedon Nov 5, 2026
Released in v0.62.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.62.2
devops-cli-service commentedon Nov 5, 2026
Live since 2026-11-05 14:22 UTC