Skip to content

fix(roadmap): the stage plan keeps the decisions of the refine block #3384

Closed

Description

@dan-petty

Problem

PR #3323 planned issue #3307 with ## Decisions set to None. and ## Rejected alternatives set to None.. The refine block in the issue body holds five key questions, each with a Chosen decision and its rejected alternatives, and an Existing Tool Considered section with the build cost. The stage planner wrote none of them.

src/devops_cli/ai/tasks/roadmap_stage_change.md asks the model to record decisions and rejected alternatives, but it never tells the planner that the issue body holds the refine block. content_problems in src/devops_cli/roadmap/stage_change.py checks only the texts that the reply gives, so an empty design passes. The refine run is wasted and the implement step must investigate the same questions again.

Proposed change

  1. In the stage change prompt, say that the block between <!-- devops-roadmap-refine:start --> and <!-- devops-roadmap-refine:end --> holds a proposed design, and require the planner to carry its Chosen decisions and Rejected alternatives into decisions and rejected.
  2. In src/devops_cli/roadmap/stage_change.py, when the issue body holds a refine block with at least one Chosen or Rejected line, refuse a plan whose decisions or rejected list is empty. Put the parser next to acceptance_criteria in src/devops_cli/roadmap/stage_criteria.py, which already cuts the refine block from the body.
  3. Add cases in tests/roadmap/test_roadmap_stage_content.py.

Acceptance criteria

  1. A test holds an issue body with a refine block that has two Chosen decisions and one Rejected alternative, and asserts that check_proposal refuses a plan with no decision and no rejected alternative.
  2. A test asserts that the same plan passes when it holds one decision and one rejected alternative.
  3. A test asserts that the stage change prompt tells the planner to reuse the refine block.

Source: #3323

Alternatives check of 2026-11-06: none.
Tool: none found.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 3, 2026
  2. dan-petty commented on Nov 3, 2026

    @dan-petty
    OwnerAuthor

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

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The refine run is wasted and the implement step repeats work, but the pipeline still completes.
    • Value: Medium. Users lose a completed refine step and must re-investigate the same questions.
    • Effort: Medium. Requires a prompt edit, a validation check, a parser helper, and three test cases in identified files.
    • Related: feat(roadmap): Require a rejected alternative with a fact #3257, which asks for a different change. Both concern rejected alternatives in a plan, but 3257 asks the plan to explain why the nearest alternative was rejected, while the candidate asks the stage planner to preserve decisions already recorded in the refine block.
  3. added
    priority/p2-medium
    on Nov 3, 2026
  4. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Tool: none found

    Lacks:

    • The need is a change inside this project: a prompt edit in src/devops_cli/ai/tasks/roadmap_stage_change.md and a guard in content_problems in src/devops_cli/roadmap/stage_change.py, which no external tool supplies.
    • The refine block is delimited by the project's own markers <!-- devops-roadmap-refine:start --> and [end-marker], so no general markdown or section parser knows what a Chosen or Rejected line is.
    • No external library can enforce that a generated plan's decisions and rejected alternatives are non-empty when the issue body holds at least one Chosen or Rejected line; the issue asks for a helper beside acceptance_criteria in src/devops_cli/roadmap/stage_criteria.py.
    • The web searches returned errors and no tool fact was found that covers the need, so no candidate tool can be named.

    Searches run:

    • python library extract sections from markdown issue body delimited by HTML comments
    • python validate LLM structured output requires non-empty list of decisions guardrails
    • markdown-it-py extract sections between HTML comment markers
    • markdown section parser python
    • guardrails-ai validate structured LLM output
    • python parse markdown headings into sections library
    • mistune
    • roadmap stage planner prompt reuse refine block decisions
    • pydantic-ai output validator non-empty list
    • "refine" block parser roadmap issue body python

    Sources:

    Checked on 2026-11-06. A person decides what this means for the item. The check changes no label and closes no issue.

  5. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    Evidence from #5390 (diagnosis of the fix-plan path on 2026-11-13). The same cause also affects the reviewer. Add the reviewer scope to this item.

    Proposed addition:

    1. Write one definition of binding criteria in openspec/specs/roadmap-stage/criteria/spec.md: the Chosen decisions of the refine block bind the plan, together with the list that a person wrote.
    2. Use that one definition in roadmap_stage_change.md and in roadmap_stage_verify.md. A test asserts that both prompts hold the same definition.
    3. Data fix for fix(roadmap): decision points need cuts for shadow and run in async code #5272, with no code: put the owner-approved seventh class into its Acceptance Criteria. Then one fix-plan attempt on docs(openspec): plan #5272 Require cuts for shadow and time each decision #5390 can add the class and its failed series.

    Related: #5409 (a later review judges each earlier finding and the answer of the planner).

  6. added
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 16, 2026
  7. removed
    status/in-progress
    owner/agent
    on Nov 17, 2026
  8. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor
  9. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-17 03:03 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/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions