Skip to content

feat(roadmap): map all issue requirements to a group #3253

Not planned
2 of 2 issues completed
Not planned

Description

@dan-petty

Problem

stage_criteria.py maps each item of an Acceptance criteria list to a group (#3180). An issue also holds other requirements: "What should happen" bullets, a named caller, a named file. A plan that drops one is not caught. Evidence from 2026-11-02:

Proposed change

  1. Extract the other requirement lines of the issue (bullets under the refined sections, and each named path, command or caller) into a list in the context, with an ID.
  2. Require ## Criteria (or a new ## Coverage part) to map each ID to a group or to a stated reason, as for the acceptance criteria.
  3. Add a check that a design decision (a line that starts with "Decision" or a numbered choice) has a task that names it, and that a scenario's WHEN clause names an input a test can set.
  4. The model verification pass receives the list.

Acceptance criteria

  1. A test shows that a plan that omits a named caller of the issue is refused with the caller named.
  2. A test shows that a plan that maps every line passes.
  3. The extraction and mapping are in the same module as the acceptance-criteria code, and the prompt is updated (test(roadmap): check the planner prompt against its rules #3210 test passes).
  4. A replay case from docs(openspec): plan #2916 One function decides draft readiness #3170 or docs(openspec): plan #2777 Label the stage and implement pull requests #3169 is in the golden set.

Related: #3180, #3182, #3200, #3246.

Dependencies

Proposed design

Problem statement

The staging planner maps only the acceptance criteria of an issue to task groups. A plan can drop other requirement lines: a named caller, a path, a command, a design decision. The change extracts these lines into the plan context with stable IDs. The plan must map each ID to a group or to a stated reason. The validator refuses a plan that leaves one out.

Acceptance criteria

Requirement: Requirement extraction

The staging context builder SHALL list each requirement line of the issue body with a stable ID.

Scenario: Named caller is listed

  • WHEN An issue body names devops pr ready in a bullet under a refined section.
  • THEN The context holds a requirement with kind command, text devops pr ready and ID REQ-001.

Requirement: Coverage mapping

The plan validator SHALL refuse a plan that gives no coverage entry for an extracted requirement ID.

Scenario: Unmapped requirement is refused

  • WHEN The issue holds three requirement lines and the plan gives coverage for two.
  • THEN Validation returns one problem that names REQ-003 and its text.

Requirement: Omitted caller

The plan validator MUST name the omitted caller in the error of a refused plan.

Scenario: Omitted caller is named

  • WHEN The issue names devops pr ready and the plan gives no coverage entry for its ID.
  • THEN The error message holds devops pr ready.

Requirement: Complete coverage

The plan validator SHALL accept a plan that gives a group number or a stated reason for each requirement ID.

Scenario: Full coverage passes

  • WHEN The plan gives a coverage entry for every extracted ID.
  • THEN No coverage problem is returned.

Requirement: Decision line coverage

The plan validator SHALL refuse a plan that gives no coverage entry for a Decision: line of the issue.

Scenario: Decision without coverage is refused

  • WHEN The issue holds the line Decision: use a stable ID and the plan gives no coverage entry for it.
  • THEN Validation returns a problem that quotes Decision: use a stable ID.

Requirement: Scenario WHEN input

The plan validator SHALL refuse a scenario whose WHEN clause names a person's intent and no settable input.

Scenario: Vague WHEN is refused

  • WHEN A spec delta scenario has the WHEN clause its author says so.
  • THEN Validation returns a problem that quotes its author says so.

Requirement: Coverage line in tasks

The change renderer SHALL list each requirement ID with its group or its reason in the ## Criteria section of tasks.md.

Scenario: Coverage line is rendered

  • WHEN The plan gives coverage for REQ-001 with group 1.
  • THEN tasks.md holds one line that starts with REQ-001 and names group 1.

Requirement: Split keeps coverage

The split reply SHALL carry the coverage list with the new group numbers.

Scenario: Split renumbers coverage

  • WHEN A plan over the budget is split and the reply gives group 2 for REQ-001.
  • THEN tasks.md names group 2 for REQ-001.

Requirement: Prompt names the coverage key

The stage prompt SHALL name the coverage key and the requirement IDs.

Scenario: Prompt holds the coverage key

  • WHEN The roadmap_stage_change prompt is loaded.
  • THEN It holds coverage and REQ-.

Existing Tool Considered

No alternatives check has run. markdown-it-py parses the issue body and OpenSpec checks the shape of a spec delta. Neither one maps the task groups of a plan to the requirement lines of an issue. The change builds that mapping in stage_criteria.py: about 45,000 tokens to build, 12,000 tokens per year to keep, 8,000 tokens to fix until stable, and about 3 engineer-days.

Key questions

  • Does the stage return text placeholder state why the premise fails?: No. The repository counts placeholder as a filler text, and the plan schema has no premise_failed key, so the return gives no evidence. [sources: tests/roadmap/test_roadmap_stage_plan.py, src/devops_cli/roadmap/stage_change.py]
  • Where does the extracted requirement list live, and how do its IDs form?: A requirements list in the plan context and in the reply. The IDs are REQ-001, REQ-002 in source order. Each item holds id, kind, text and source_line. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_criteria.py, tests/roadmap/test_roadmap_stage_plan.py]
    • Chosen: Structured context list with deterministic IDs. It gives the plan and the validator one stable key, and a test asserts it offline.
    • Rejected: Free text in the prompt only. The validator cannot name a missing requirement without a stable key.
    • Rejected: Parse the issue again in the validator. It duplicates the extraction and can give a different result.
  • Which issue lines count as a requirement, and which kind does each get?: Each bullet under a refined section, each backticked repository path, each backticked devops command, and each Decision: line. The kinds are bullet, path, command and decision. The acceptance-criteria list, the headings and the job record are left out. (best practice) [sources: src/devops_cli/roadmap/stage_criteria.py, tests/roadmap/test_roadmap_stage_text_lines.py]
    • Chosen: Deterministic Markdown and token scan. It is testable offline and it matches the examples of the issue.
    • Rejected: Model extraction. It is not deterministic and it adds a model call to every plan.
    • Rejected: Bullets only. It misses the named callers, paths and commands that the issue cites.
  • Where does the plan map each requirement ID?: In the existing ## Criteria section of tasks.md, from a new coverage list in the reply. The reply gives a group number or pending-person with a reason for each ID. (best practice) [sources: tests/roadmap/test_roadmap_stage_plan.py, src/devops_cli/roadmap/stage_criteria.py]
    • Chosen: Extend the existing ## Criteria section. The plan already holds the acceptance-criteria map there, so one section keeps the check and the reader in one place.
    • Rejected: Add a new ## Coverage section. It adds a second place to keep in sync and a second parser path.
  • How does the validator decide that a scenario WHEN clause names no settable input?: It refuses a clause that holds a phrase of a person's intent (says so, decides, wants, approves) and no backticked literal, path or value. It accepts every other clause. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_specs.py]
    • Chosen: Refuse a person-intent phrase with no settable input. It refuses the when its author says so case and it refuses no clause that names a value, a path or a literal.
    • Rejected: Refuse every clause with no backticked literal. It refuses valid clauses that name a state, such as a plan maps every extracted ID.
    • Rejected: Model judgement. It is not deterministic and it cannot be a gate.
  • Which module holds the extraction and the mapping?: stage_criteria.py, next to the acceptance-criteria code, so the plan check and the validator read one function. (best practice) [sources: src/devops_cli/roadmap/stage_criteria.py, src/devops_cli/roadmap/stage_change.py]
    • Chosen: Extend stage_criteria.py. It reuses the heading and list parse and the cut of the refine block that the module already has.
    • Rejected: A new module. It splits one issue-body parse over two modules and adds an import cycle risk.
  • Does the split reply carry the coverage list?: Yes. StageSplit holds the coverage list again, as it holds criteria, because a split moves the group numbers. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_plan.py]
    • Chosen: The split reply gives the list again. The group numbers change in a split, and a stale number maps a requirement to the wrong group.
    • Rejected: Keep the numbers of the first reply. A split renumbers the groups, so the old numbers name other groups.
  • Which open, maintained tool covers the extraction and the mapping?: markdown-it-py parses the body and OpenSpec checks the spec-delta shape. Neither maps plan groups to issue requirements, so the mapping stays in stage_criteria.py. (best practice) [sources: src/devops_cli/roadmap/stage_criteria.py, tests/support/openspec_scenarios.py]
    • Chosen: Extend the roadmap code with markdown-it-py. markdown-it-py is already a dependency of the module and it gives the token stream that the extraction needs.
    • Rejected: Add an external coverage library. No maintained library covers issue-to-plan coverage, and a new dependency adds cost.
    • Rejected: Use OpenSpec alone. OpenSpec checks a spec delta, not the coverage of the issue lines by a plan.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-06: partly.
Tool: itsallcode/openfasttrace (https://github.com/itsallcode/openfasttrace), GPL-3.0, last activity 2026-11-01, maintained.

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

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 improves plan completeness but does not block a release or fix a critical defect.
    • Value: Medium. Plans that drop a named caller or design decision cause rework, so broader coverage has real user value.
    • Effort: Medium. Requires new extraction logic, a mapping check, prompt updates, and golden-set replay tests.
    • Related: feat(roadmap): the stage job maps each acceptance criterion of the issue to a task group #3019, which asks for a different change. Both map issue requirements to task groups, but #3019 covers only acceptance criteria while the candidate adds other bullets, named callers, design decisions, and scenario checks.
  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 8b47ae2 (see proposed design in issue body).

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

    @devops-cli-service
    Contributor

    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

  6. added
    status/new
    status/ready
    and removed
    status/ready
    status/new
    on Nov 2, 2026
  7. 9 remaining items

  8. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    Stopped at group 1.

    Failure class: limit_reached.
    Action taken: none.
    Action left: raise_limit: raise the limit that the run went over.

    Step Status Attempts Tokens in/out Last failing command
    group 1 stopped 1 8014688/40944 -

    Reason:

    LimitReached: The step spent its budget `roadmap.implement.step_token_budget=8000000`.
    Refused commands: uv 1, other:07d59b47d4be 1, other:9fab4e1b4f7d 1. Other retries: 0.
    

    Last message of the agent (a claim that no check verified): Now I'll implement RequirementLine and requirement_lines.

    The item is Blocked, and the job will not run it. Fix the cause. Then comment implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits of roadmap.implement.digest_clears_per_class and roadmap.implement.digest_clears_per_item allow it.

    The job kept 2 work-in-progress commits on the branch feat/3253-map-all-issue-requirements-to-a on origin. The last is 03b5eeb6687acd374ebd37170567a00e639d1d1f. The job discarded only the work after it. The next run continues from it and does the tasks that are not ticked.

  9. added
    status/blocked
    and removed
    status/in-progress
    on Nov 7, 2026
  10. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    The runner Job devops-cli-runner-20261107-184136-051a ended: succeeded.
    Image digest: sha256:9a1af5a95b44197c2568d011d53c1b9a84748cf35f9721e302fe56d860d9ae06

    The last lines of its log:

    Tool call: shell, started: uv run devops ci --help | ...
    Tool call: shell, program uv, ok.
    Tool call: shell, started: uv run devops ci --help | ...
    Tool call: shell, program uv, ok.
    Tool call: shell, started: find . -name sgconfig*.yml -o -name ...
    Tool call: shell, program find, ok.
    Tool call: shell, started: ls tests/invariants
    Tool call: shell, program ls, ok.
    Tool call: shell, started: uv run devops ci test tests/invariants/test_source_tree.py
    Tool call: shell, program uv, ok.
    Tool call: read_file, ok.
    Tool call: edit_file, ok.
    Tool call: edit_file, ok.
    Tool call: shell, started: uv run python -c __import__("pathlib").Path(".data/agent/scratch/probe.py").unlink(missing_ok=<masked>
    Tool call: shell, program uv, ok.
    Tool call: shell, started: git status --short
    Tool call: shell, started: git diff --stat
    Tool call: shell, program git, ok.
    Tool call: shell, program git, ok.
    Tool call: shell, started: cat .pydantic-ai-harness/shell/b4c5a44a597c4707a02b8ec98a04ab5b/output.log
    Tool call: shell, started: cat .pydantic-ai-harness/shell/3ecefd9bb07b4a3e85e9dc5cf7e647be/output.log
    Tool call: shell, program cat, ok.
    Tool call: shell, program cat, ok.
    Tool call: read_file, ok.
    Tool call: read_file, ok.
    Tool call: shell, started: git status
    Tool call: shell, started: git diff --name-only HEAD
    Tool call: shell, program git, ok.
    Tool call: shell, program git, ok.
    Tool call: shell, started: git log --oneline -3
    Tool call: shell, started: git show --stat --oneline HEAD
    Tool call: shell, program git, ok.
    Tool call: shell, program git, ok.
    Tool call: shell, started: git show --stat --oneline f6153ab5
    Tool call: shell, program git, ok.
    Tool call: shell, started: uv run devops ci test tests/roadmap/stage/test_roadmap_stage_requirements.py
    Tool call: shell, program uv, ok.
    Failure class limit_reached. Action left: raise_limit.
    ✓ Took 0 item(s) to a ready pull request, stopped 1.
    Elapsed: 19m
    
  11. removed
    owner/service
    on Nov 7, 2026
  12. added a commit that references this issue on Nov 7, 2026
  13. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.

  14. dan-petty commented on Nov 30, 2026

    @dan-petty
    OwnerAuthor

    Triage under #6519 (owner instruction of 2026-11-30). This item adds or extends a hand-written gate, refusal, context block or plan-shape rule of the stage or implement job. #6519 found that 263 of about 900 issues in four weeks added gates and none replaced the engine; stage now runs on stock Coder, where the agent reads the repository itself and runs the OpenSpec checks in its loop. The code paths that this item names have also moved (for example src/devops_cli/roadmap/stage/stage_change.py). If the failure class still shows in graded attempts (plan_defect), file a new item from that evidence. Closed as not planned.

  15. removed
    status/blocked
    on Nov 30, 2026
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