Skip to content

feat(roadmap): refuse a plan with placeholder or cut text #3200

Closed

Description

@dan-petty

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, none as the whole text of Why, Feasibility, Existing Tool, a decision or a task). The bound is a named constant.
  • Feasibility holds evidence: when probes is not empty, feasibility must quote at least one line of probes, 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_tool must hold a number of tokens and a number of hours or minutes (rule 3 of AGENTS.md).
  • A verify command can fail: refuse true, : and exit 0 as a verify command.
  • 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.py that 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 why as x.
  • THEN check_proposal returns a problem that names why and 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_tool is todo.
  • THEN check_proposal returns a problem that names existing_tool and 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 probes holds def f(): pass and feasibility holds The function exists.
  • THEN check_proposal returns a problem that names feasibility and 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 probes holds def f(): pass and feasibility holds The probe shows def f(): pass.
  • THEN check_proposal returns 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_own is true and existing_tool is Pydantic can set a minimum length.
  • THEN check_proposal returns a problem that names existing_tool and 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 verify as true.
  • THEN check_proposal returns a problem that names the group and its verify command.

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 summary and 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_title receives 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 why as x.
  • THEN The problem text contains why and 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 why and an other defect for the content gate.
  • THEN replay_case marks the defect caught and 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, not none or pending.

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_proposal as a new content_problems function. 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 are x, placeholder, todo, tbd and none. 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 ok and n/a pass.
    • 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 = False to StageProposal. 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_own field. 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.
  • Which cost forms does existing_tool accept?: A number with an optional k and the word token or tokens, and a number with hour, hours, minute or minutes. 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.md asks for.
    • Rejected: Any number. A number alone gives no token or time cost.
    • Rejected: A fixed sentence. The model cannot know the exact sentence.
  • How do the probes reach the content gate?: check_proposal takes probes: Sequence[str] = (), and PlanUnderTest holds the same list. The check collapses whitespace and requires one probe line as an exact substring of feasibility. (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_title and delivery_title stop calling textwrap.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_title for a long issue title. The issue title is not the model's text, and the pull request form already judges it.
  • Which verify commands does the gate refuse?: It refuses exactly true, : and exit 0 after 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 true or exit 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.CONTENT and a Gate that catches DefectType.OTHER. Its check calls the same content function. Add the recorded placeholder plans as other defects 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_gates keys 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.
  • 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 feasibility quotes a probe or that existing_tool gives 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

  1. added
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 2, 2026
  2. devops-cli-service commented on Nov 2, 2026

    @devops-cli-service
    Contributor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It prevents wasted review rounds but does not block a release or break a build.
    • Value: Medium. It saves a person a review round per bad plan and stops fake verify commands from passing.
    • Effort: Medium. It adds several small checks, messages, and golden-set cases to an existing gate pattern.
    • Related: fix(roadmap): the stage job refuses a spec delta that the changed paths do not need #3013, which asks for a different change. Both add gates to check_proposal in stage_change.py, but #3013 checks spec-delta consistency while the candidate checks text content quality.
  3. added
    priority/p2-medium
    status/ready
    and removed
    status/new
    on Nov 2, 2026
  4. devops-cli-service commented on Nov 2, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 24ef67a (see proposed design in issue body).

  5. devops-cli-service commented on Nov 2, 2026

    @devops-cli-service
    Contributor

    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:

    1. Refuse placeholder text and a verify command that cannot fail: 33529 tokens
    2. Require a probe quote and a build cost: 30480 tokens
    3. Keep the full summary in both titles: 35778 tokens
    4. Add the content gate to the replay: 26370 tokens
    5. Record the placeholder plans in the golden set: 13816 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_wrong at specs, requirement "The summary of a plan is not cut"; group 3: The spec ties the bound to SUMMARY_MAX_CHARS, which is 60 in pull_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_code at group 1, verify command rule; specs "A verify command can fail": The form check in check_proposal already refuses any verify that does not start with uv run devops. That covers true, : and exit 0, so the new rule duplicates it and the group 1 test for true passes before any code change. Evidence: "def test_a_command_that_is_not_uv_run_devops_is_refused(verify: str) -> None:"
    • other at 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),"
    • other at group 5: The group creates only case.json for each new case. load_cases also needs issue.txt, plan.json and facts.json, so the new cases cannot load. Evidence: ""tests/fixtures/roadmap_eval/stage/placeholder-why/case.json","
  6. added 3 commits that reference this issue on Nov 2, 2026
  7. removed
    status/ready
    on Nov 3, 2026
  8. 2 remaining items

  9. added
    status/in-progress
    status/in-review
    and removed
    status/planned
    status/in-progress
    on Nov 3, 2026
  10. removed
    status/in-review
    on Nov 3, 2026
  11. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor
  12. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-03 20:33 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmaptype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions