Repository navigation
Description
Problem
devops pr create refuses a plan body that follows the text of CONTRIBUTING.md, and its message names the wrong line.
CONTRIBUTING.md section 4 says that a plan pull request has "the line Plans #<issue> in place of Closes, then the Change: line". A delivery body has its text above Closes. So a reader puts the text above Plans. plan_body_problems in src/devops_cli/roadmap/pull_form.py reads the text only between the Plans line and the Change: line, so it finds no text.
Evidence on origin/main at f6d57ec, from uv run devops pr create --dry-run with the title docs(openspec): plan #3039 the verifier reads the repository:
- Text, then
Plans #3039, thenChange:gives:The text aboveCloseshas 0 characters. Write at least 20: what the change does, and why.The body has text, and a plan body has noClosesline. Plans #3039, then text, thenChange:passes.
The docstring of plan_body_problems has the same gap. It says that the Plans line stands where a delivery has Closes.
Expected
The form, its document and its message agree on one order. The refusal of a plan body names the Plans line and states where the text goes.
Acceptance criteria
- A test: a plan body with its text above
Plansgets a message that names thePlansline, or the form accepts that order. - CONTRIBUTING.md section 4 and the docstring of
plan_body_problemsstate the order that the form enforces.
Existing tool considered
None applies. The change is to the form text and its document. This is an existing check of this repository.
Related
Source: #3598
Proposed design
Problem statement
devops pr create refuses a plan body that follows CONTRIBUTING.md section 4. The document says that the Plans line takes the place of Closes, so a reader puts the text above Plans. The function plan_body_problems reads the text only between Plans and Change:, and its short-text message names Closes. The form, the document and the message must state one order: the text, then Plans #<issue>, then the Change: line.
Acceptance criteria
Requirement: Plan body text above Plans
plan_body_problems SHALL accept a plan body whose text is above the Plans line.
Scenario: Text above Plans
- WHEN A plan body holds the text, then
Plans #<issue>, then theChange:line of the active folder of the same issue. - THEN
plan_body_problems(body, issue)returns an empty list.
Requirement: Short plan body names Plans
The refusal of a plan body with too little text MUST name the Plans line and the minimum of 20 characters.
Scenario: Text below Plans
- WHEN A plan body holds fewer than 20 characters above
Plans, and its text sits betweenPlansandChange:. - THEN The message names
Plans, says that the text goes above it, and gives the minimum of 20 characters.
Requirement: Delivery message keeps Closes
The refusal of a delivery body with too little text SHALL still name the Closes line.
Scenario: Short delivery body
- WHEN A delivery body holds fewer than 20 characters above
Closes. - THEN The message names
Closesand holds noPlans.
Requirement: The document states one order
CONTRIBUTING.md section 4 and the docstring of plan_body_problems SHALL state that the text goes above the Plans line.
Scenario: The two texts
- WHEN A test reads section 4 of
CONTRIBUTING.mdand the docstring ofplan_body_problems. - THEN Both state that the text goes above
Plans, then theChange:line, and neither places the text between the two lines.
Requirement: The staged plan body passes the form
The body that the stage job writes for a draft plan pull request MUST pass plan_body_problems for its issue.
Scenario: A staged plan body
- WHEN The stage job builds the body of the draft plan pull request for an issue.
- THEN
plan_body_problems(body, issue)returns an empty list.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this need: the rule is the order of a plan body in CONTRIBUTING.md section 4 of this repository. The change edits plan_body_problems in src/devops_cli/roadmap/pull_form.py, adds one field to one message and adds tests. It builds no new code. The edit is about 30 lines, and it needs under an hour.
Key questions
- Which order does a plan body take: the text above
Plans, or the text betweenPlansandChange:?: The text goes above thePlansline, then thePlansline, then theChange:line. The form reads the text abovePlans. (best practice) [sources: CONTRIBUTING.md:151, src/devops_cli/roadmap/pull_form.py, openspec/changes/archive/2026-11-03-3314-pr-create-refuses-the-body-of-a/design.md:6]- Chosen: Text above Plans. The
Plansline takes the place ofCloses, and a delivery body puts its text aboveCloses. One order then holds for both forms, and CONTRIBUTING.md section 4 already states it. - Rejected: Text between Plans and Change. It contradicts CONTRIBUTING.md section 4 and the docstring, and it puts the text after the line that names the issue, unlike a delivery body.
- Chosen: Text above Plans. The
- How does the short-text message name the line that the text goes above?:
_text_problemstakes the name of the line, and the messageform_body_shorttakes an{anchor}field. A plan body then namesPlans, and a delivery body namesCloses. (best practice) [sources: src/devops_cli/roadmap/pull_form.py, src/devops_cli/lang/en/messages.py]- Chosen: One message with an anchor field. The text stays once in
lang/en/, and each form names its own line. The module keeps one rule for the two forms. - Rejected: A second message for the plan form. It duplicates the same text, and the two copies drift.
- Chosen: One message with an anchor field. The text stays once in
- Must the body that the stage job writes pass the plan form?: Yes. A test checks that the body that the stage job writes for a draft plan pull request passes
plan_body_problemsfor its issue. (best practice) [sources: src/devops_cli/roadmap/stage.py, src/devops_cli/roadmap/stage_change.py, docs/roadmap/plan-check.md:12]- Chosen: Check the staged body against the form. A form change alone can refuse every staged plan body and stop the stage job. The test holds the two in step.
- Rejected: Leave the staged body unchecked. The stage job then opens a draft pull request that the form refuses, and the defect returns.
- Which function holds the rule of a plan body, and which caller reads it?:
plan_body_problemsinsrc/devops_cli/roadmap/pull_form.pyholds the rule._form_checkedinsrc/devops_cli/commands/pr.pycalls it. [sources: src/devops_cli/roadmap/pull_form.py, src/devops_cli/commands/pr.py:1107] - Which documents state the order of a plan body?: Section 4 of
CONTRIBUTING.mdand the docstring ofplan_body_problemsstate the order. [sources: CONTRIBUTING.md:151, src/devops_cli/roadmap/pull_form.py] - Which message does a short plan body print now?: It prints
form_body_short, which namesCloses._text_problemsreads that message for the plan form and the delivery form. [sources: src/devops_cli/roadmap/pull_form.py, src/devops_cli/lang/en/messages.py] - Which tests cover the plan form and the pull request form?:
tests/roadmap/test_roadmap_pull_form.pycovers the functions of the module, andtests/commands/test_pr_form_check.pycovers the check ofdevops pr create. [sources: tests/roadmap/test_roadmap_pull_form.py, tests/commands/test_pr_form_check.py] - Which capability requirement does the order belong to?: The capability
pull-request-formholds the requirementA plan body has the Plans line and no closing keyword, and the change extends it with the order of the text. [sources: openspec/specs/pull-request-form/spec.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-07: none.
Tool: none found.
Activity
dan-petty commentedon Nov 5, 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.(pr)scope of the title gives the scope.The tool rejects valid input that follows the documented format, but a workaround exists by placing text below Plans.Users who follow CONTRIBUTING.md hit a confusing refusal, but they can reorder the text to pass.The change is to one validation function, its docstring, and one section of CONTRIBUTING.md.Both fix devops pr create plan body validation, but #3314 fixed recognition of Plans vs Closes while this fixes text position and the error message.devops-cli-service commentedon Nov 6, 2026
Status set to Ready at 662828d (see proposed design in issue body).
devops-cli-service commentedon Nov 7, 2026
Alternatives check: none
Reason: The searches for an open tool that validates the structure of a pull request body returned no provider answer, and the need is repository-internal: the order of the text, the
Plans #<issue>line and theChange:line in a plan body, checked byplan_body_problemsinsrc/devops_cli/roadmap/pull_form.py, with CONTRIBUTING.md section 4 and one message to match. No general PR-body or template linter could enforce this repository's own line order, so no tool or library covers it; the issue itself records that no alternative applies.Tool: none found
Lacks:
Plansline and still requires theChange:linePlansline, notCloses, in the short-text refusal of a plan bodyplan_body_problemsSearches run:
Checked on 2026-11-07. A person decides what this means for the item. The check changes no label and closes no issue.
test(pr): build the plan body with its text above Plans (#3662)
devops-cli-service commentedon Nov 14, 2026
Released in v0.139.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.139.0
devops-cli-service commentedon Nov 14, 2026
Live since 2026-11-14 17:02 UTC