Repository navigation
Description
Problem or Motivation
The stage job checks that the keys of a plan are not blank, and nothing more about the text. In a review of the open plan PRs, four plans carried placeholder text: #3167 ("x" in Why, Feasibility and Existing Tool Considered, true as a verify command), #3175, #3174 and the first plan of #3012. Several titles end in ... because staging_title and delivery_title cut the summary with textwrap.shorten. A plan like that passes every gate, opens a pull request, and costs a person a review round before a later implement Job can use it.
Proposed Solution & Architectural Design
Add a content gate to check_proposal, and a form check to the title:
- Placeholder text: refuse a text field that is shorter than a bound, or that holds only a placeholder word (
x,placeholder,todo,tbd,noneas the whole text of Why, Feasibility, Existing Tool, a decision or a task). The bound is a named constant. - Feasibility holds evidence: when
probesis not empty,feasibilitymust quote at least one line ofprobes, word for word. The prompt already asks for this, and no check enforces it. - Existing tool holds a cost: when the plan builds its own code,
existing_toolmust hold a number of tokens and a number of hours or minutes (rule 3 of AGENTS.md). - A verify command can fail: refuse
true,:andexit 0as averifycommand. - No cut title: the summary of the model has a bound of 40 characters. A summary over the bound goes back to the model once, as other refusals do, and the job never writes
.... The same rule applies to the title of the delivery pull request. - Each refusal has a message in
lang/en/messages.pythat names the field, so the retry tells the model what to fix. - Add the recorded placeholder plans to the golden set as defects of the type
other, with a gate, so the replay proves the gate on real cases.
Target Subsystem
src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_eval_gates.py, src/devops_cli/lang/en/messages.py, tests/fixtures/roadmap_eval/stage.
Existing Tool Considered
Pydantic can set a minimum length and a pattern on a field. It cannot check that a text quotes another field or holds a cost. The project already builds these gates in stage_change.py (#3013, #3017, #3019), so this adds to them. Cost to build: about 80k tokens and 4 hours. To keep: a few small functions and their tests.
Related: the pull request form in feat(pr): build and check the title and body of a pull request; #3153 (the model review); #3039.
Proposed design
Problem statement
The stage job accepts plan text that is a placeholder or cut. Four plans passed the gates with x, todo, a true verify command, or a title that ended in .... A person then spent a review round on a plan that no implement job can use. The change adds content checks to check_proposal, refuses a cut summary, and proves the checks on the golden set.
Acceptance criteria
Requirement: Content gate runs in check_proposal
The stage job SHALL run the content checks inside check_proposal, so the job and the replay use one rule set.
Scenario: Short why is refused
- WHEN A plan gives
whyasx. - THEN
check_proposalreturns a problem that nameswhyand the minimum length.
Requirement: Placeholder word refused
The content gate SHALL refuse a field whose whole text is a placeholder word.
Scenario: Placeholder existing tool
- WHEN
existing_toolistodo. - THEN
check_proposalreturns a problem that namesexisting_tooland the placeholder rule.
Requirement: Feasibility quotes a probe
When probes is not empty, the content gate SHALL refuse a feasibility list that quotes no probe line word for word.
Scenario: No quoted probe
- WHEN
probesholdsdef f(): passandfeasibilityholdsThe function exists. - THEN
check_proposalreturns a problem that namesfeasibilityand the quote rule.
Requirement: Feasibility accepts a probe quote
The content gate SHALL accept a feasibility list that holds one probe line word for word.
Scenario: Exact probe quote
- WHEN
probesholdsdef f(): passandfeasibilityholdsThe probe shows def f(): pass. - THEN
check_proposalreturns no quote problem.
Requirement: Existing tool holds a build cost
A plan that sets builds_own to true SHALL give a token count and a time in existing_tool.
Scenario: Build cost missing
- WHEN
builds_ownis true andexisting_toolisPydantic can set a minimum length. - THEN
check_proposalreturns a problem that namesexisting_tooland the cost rule.
Requirement: Verify command can fail
The content gate SHALL refuse true, : and exit 0 as the verify command of a group.
Scenario: True verify command
- WHEN A group gives
verifyastrue. - THEN
check_proposalreturns a problem that names the group and itsverifycommand.
Requirement: Stage summary has a bound
The stage plan SHALL refuse a summary over 40 characters or one that ends with ....
Scenario: Long summary
- WHEN A reply gives a summary of 41 characters.
- THEN The schema returns a problem that names
summaryand the 40-character bound.
Requirement: Title is not cut
staging_title and delivery_title SHALL use the full summary and SHALL NOT add ....
Scenario: Long delivery summary
- WHEN
delivery_titlereceives an issue title with a summary longer than the bound. - THEN The returned title ends with the full summary and holds no added
....
Requirement: Refusal names the field
Each content refusal SHALL use a message in lang/en/messages.py that names the field.
Scenario: Placeholder message
- WHEN The content gate refuses
whyasx. - THEN The problem text contains
whyand the new placeholder message.
Requirement: Replay catches a placeholder plan
The stage replay SHALL catch a recorded placeholder plan as a defect of type other with the content gate.
Scenario: Placeholder case replayed
- WHEN A golden-set case has a placeholder in
whyand anotherdefect for the content gate. - THEN
replay_casemarks the defectcaughtand reports no failure.
Requirement: Content gate is visible to the replay
gate_for(DefectType.OTHER) SHALL return the content gate name.
Scenario: Gate lookup
- WHEN The replay asks for the gate of
DefectType.OTHER. - THEN The answer is
content, notnoneorpending.
Existing Tool Considered
No alternatives check has run. Pydantic is an open, maintained library that enforces a minimum length and a pattern on a field. It cannot check that feasibility quotes a probe or that existing_tool gives a cost. The project extends the gates in src/devops_cli/roadmap/stage_change.py. The body records about 80k tokens and 4 hours to build, and a few small functions and tests to keep.
Key questions
- Where does the content gate run?: It runs in
check_proposalas a newcontent_problemsfunction. The job and the replay then use one rule set. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_eval_gates.py]- Chosen: New content function in check_proposal. The stage job and the replay call check_proposal, so one path holds the rule.
- Rejected: Check only in the stage job. The replay would not prove the rule on the golden set.
- Rejected: Check only in stage_eval_gates. The job would accept the plan before the gate.
- What bound and placeholder list does the content gate use?: The bound is
PLAN_FIELD_MIN_CHARS = 10. The placeholder words arex,placeholder,todo,tbdandnone. The check strips whitespace and trailing punctuation, and compares the text in lower case. (best practice) [sources: src/devops_cli/roadmap/stage_change.py]- Chosen: 10 characters and the five words. It refuses the recorded cases and leaves a short real sentence.
- Rejected: 1 character and the five words. It lets
okandn/apass. - Rejected: 50 characters and the five words. It refuses valid short fields such as a decision.
- How does the gate know that the plan builds its own code?: Add
builds_own: bool = FalsetoStageProposal. The prompt asks the model to set it. The cost rule applies only when it is true. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, AGENTS.md]- Chosen: Explicit
builds_ownfield. The gate reads a fact, not a phrase. - Rejected: Infer from words in
existing_tool. A phrase match is fragile and can refuse a good plan. - Rejected: Require a cost in every
existing_tool. A plan that adopts a tool needs no build cost.
- Chosen: Explicit
- Which cost forms does
existing_toolaccept?: A number with an optionalkand the wordtokenortokens, and a number withhour,hours,minuteorminutes. The match ignores case. (best practice) [sources: AGENTS.md]- Chosen: Token count and time with the stated units. It matches the cost form that rule 3 of
AGENTS.mdasks for. - Rejected: Any number. A number alone gives no token or time cost.
- Rejected: A fixed sentence. The model cannot know the exact sentence.
- Chosen: Token count and time with the stated units. It matches the cost form that rule 3 of
- How do the probes reach the content gate?:
check_proposaltakesprobes: Sequence[str] = (), andPlanUnderTestholds the same list. The check collapses whitespace and requires one probe line as an exact substring offeasibility. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_eval_gates.py, src/devops_cli/roadmap/stage_probe.py]- Chosen: Optional probes parameter and PlanUnderTest field. The job passes the probe lines, and the replay can pass the recorded lines.
- Rejected: Read probes from the issue body. The issue body does not hold the probe lines.
- Rejected: Check only in the job. The replay cannot prove the rule.
- What title bound and title behavior apply?: The stage summary has a bound of 40 characters. A summary over the bound or one that ends with
...returns to the model as a schema problem.staging_titleanddelivery_titlestop callingtextwrap.shorten. The pull request form keeps the length and cut checks for the delivery title. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/lang/en/messages.py]- Chosen: Bound the model summary and remove shortening. The model can correct the text, and the job never writes
.... - Rejected: Keep
textwrap.shorten. It writes...and hides the real summary. - Rejected: Raise in
delivery_titlefor a long issue title. The issue title is not the model's text, and the pull request form already judges it.
- Chosen: Bound the model summary and remove shortening. The model can correct the text, and the job never writes
- Which
verifycommands does the gate refuse?: It refuses exactlytrue,:andexit 0after it strips whitespace. It does not refuse a command that contains one of them. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_eval_gates.py]- Chosen: Exact three commands. The recorded defect is an exact command that cannot fail.
- Rejected: Any command with
trueorexit 0. A real command can contain these words in an argument. - Rejected: No verify check. The plan can pass with a command that always passes.
- How does the replay expose the content gate?: Add
GateName.CONTENTand aGatethat catchesDefectType.OTHER. Its check calls the same content function. Add the recorded placeholder plans asotherdefects with that gate. (best practice) [sources: src/devops_cli/roadmap/stage_eval_gates.py, src/devops_cli/roadmap/stage_change.py]- Chosen: New content gate for
DefectType.OTHER. The replay maps one defect type to one gate and reports the result. - Rejected: Reuse the paths gate.
run_gateskeys by gate name, and the paths gate catches another type. - Rejected: Leave the defect pending. A pending defect fails nothing, so the replay would not prove the rule.
- Chosen: New content gate for
- Which tool covers the need?: No alternatives check has run. Pydantic enforces a minimum length and a pattern. It cannot check a quote or a cost. The project extends its gates. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, AGENTS.md]
- Chosen: Extend the project gates. Pydantic cannot express the cross-field rules, and the project already keeps these gates.
- Rejected: Pydantic alone. It cannot check that
feasibilityquotes a probe or thatexisting_toolgives a cost. - Rejected: A new validation library. No open tool covers these project rules, and a new dependency adds cost.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
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.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.It prevents wasted review rounds but does not block a release or break a build.It saves a person a review round per bad plan and stops fake verify commands from passing.It adds several small checks, messages, and golden-set cases to an existing gate pattern.Both add gates to check_proposal in stage_change.py, but #3013 checks spec-delta consistency while the candidate checks text content quality.devops-cli-service commentedon Nov 2, 2026
Status set to Ready at 24ef67a (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
Staged: branch
feat/3200-refuse-a-plan-with-placeholder-or, draft pull request #3260. 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 4 model request(s), and used 318971 input tokens and 25008 output tokens. The model made no tool call.
A model review of the plan found these points. They stop no draft, and a person judges them:
spec_delta_wrongat specs, requirement "The summary of a plan is not cut"; group 3: The spec ties the bound toSUMMARY_MAX_CHARS, which is 60 inpull_form.py. The scenario expects a 41-character summary to fail on a 40-character bound, so no test can assert both. Evidence: "SUMMARY_MAX_CHARS: Final[int] = 60"ignores_existing_codeat group 1, verify command rule; specs "A verify command can fail": The form check incheck_proposalalready refuses anyverifythat does not start withuv run devops. That coverstrue,:andexit 0, so the new rule duplicates it and the group 1 test fortruepasses before any code change. Evidence: "def test_a_command_that_is_not_uv_run_devops_is_refused(verify: str) -> None:"otherat group 4 and group 5: Existing tests assert the exact set of gates and the exact counts. The new CONTENT gate and the two new cases break them. Group 4 updates only its own new tests, and group 5 updates only the case-count test. Evidence: "GateName.CRITERIA: (False, 0),"otherat group 5: The group creates onlycase.jsonfor each new case.load_casesalso needsissue.txt,plan.jsonandfacts.json, so the new cases cannot load. Evidence: ""tests/fixtures/roadmap_eval/stage/placeholder-why/case.json","docs(openspec): plan #3200 Refuse placeholder and cut plan text
docs(openspec): fix plan #3200 summary bound and probe plumbing
docs(openspec): plan #3200 Refuse placeholder and cut plan text (#3260)
2 remaining items
fix(roadmap): count the implement title like the CI check (#3319)
fix(roadmap): check the plan title in the stage job (#3360)
devops-cli-service commentedon Nov 3, 2026
Released in v0.53.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.53.0
devops-cli-service commentedon Nov 3, 2026
Live since 2026-11-03 20:33 UTC
fix(roadmap): refuse an overlong title summary at stage (#3381)
feat(roadmap): name every caller of a changed function (#4047)
feat(roadmap): check a plan number against its constant (#4073)
fix(roadmap): the constants gate reads only a stated value (#5042)
fix(roadmap): the constants gate reads 6_500 and no new value (#5080)