Skip to content

fix(roadmap): ignore struck-through checklist items in acceptance criteria #4024

Description

@dan-petty

Problem Description

The acceptance criteria parser extracts checklist items that have strikethrough markup. When a maintainer strikes out an item, the parser still treats it as an active requirement.

The regex _TASK_MARK does not match lines with leading ~~. The planner must then plan and validate dropped criteria.

Reproduction Steps

  1. Add a struck-through checklist item under Acceptance criteria: - ~~[ ] Dropped item~~.
  2. Call devops_cli.roadmap.stage.stage_criteria.acceptance_criteria(body).
  3. Inspect the returned list.

Expected vs Actual Behavior

Expected: Struck-through checklist items are ignored as cancelled criteria.

Actual: The parser returns the struck-through text as an active criterion.

Environment Diagnostics

  • DevOps CLI Version: 0.82.0
  • Python Version: 3.14.10
  • OS & Architecture: Linux x86_64
  • Execution Environment: DevContainer

Logs, Traces, or Terminal Output

acceptance_criteria("## Acceptance criteria\n\n- ~~[ ] Dropped criterion~~")
# Returns: ['~~[ ] Dropped criterion~~']

Proposed design

Problem statement

The acceptance criteria parser returns struck-through checklist items as active criteria. A maintainer uses strikethrough to cancel a criterion. The planner then plans and validates criteria that the maintainer dropped. The parser must ignore such items.

Acceptance criteria

Requirement: Ignore struck-through unchecked item

The acceptance criteria parser SHALL omit a checklist item when a strikethrough span starts before its task marker and closes after its text.

Scenario: Unchecked struck item

  • WHEN the acceptance criteria section contains - ~~[ ] Dropped criterion~~
  • THEN acceptance_criteria(body) returns an empty list.

Requirement: Ignore struck-through checked item

The acceptance criteria parser SHALL omit a checklist item with a checked task marker inside a strikethrough span.

Scenario: Checked struck item

  • WHEN the acceptance criteria section contains - ~~[x] Dropped criterion~~
  • THEN acceptance_criteria(body) returns an empty list.

Requirement: Keep active checklist items

The acceptance criteria parser SHALL return every non-struck checklist item in its original order.

Scenario: Mixed checklist

  • WHEN the section contains - ~~[ ] Dropped~~, - [ ] Kept one, and - [x] Kept two
  • THEN acceptance_criteria(body) returns ['Kept one', 'Kept two'].

Requirement: Keep inline strikethrough in an active item

The acceptance criteria parser SHALL keep a non-struck checklist item that contains ~~ only inside its text.

Scenario: Inline strike in active item

  • WHEN the section contains - [ ] Keep ~~this~~ text
  • THEN acceptance_criteria(body) returns ['Keep ~~this~~ text'].

Existing Tool Considered

No alternatives check has run. No open, maintained tool or library covers this repository-specific acceptance-criteria rule. The change edits the existing parser in src/devops_cli/roadmap/stage/stage_criteria.py and adds tests. The written cost is about 1,500 tokens to build and test, and under one hour of elapsed time. The existing unit tests keep it, and the change adds no new dependency.

Key questions

  • Which Markdown form marks a checklist item as cancelled for the acceptance criteria parser?: Use the GFM strikethrough span that starts before the task marker and closes after the item text. Ignore ~~[ ] ...~~ and ~~[x] ...~~; keep an active marker with inline ~~ in its text. (best practice) [sources: src/devops_cli/roadmap/stage/stage_criteria.py:44, src/devops_cli/roadmap/stage/stage_criteria.py:137]
    • Chosen: Leading strikethrough around the task marker. Matches the reported ~~[ ] form and the GFM strikethrough span.
    • Rejected: Any item that contains ~~. It would hide active criteria that use inline strikethrough.
    • Rejected: Only checked struck items. The reported dropped item is unchecked, so it must be ignored too.
  • Where should the parser detect the strikethrough span?: Check the raw token content before _TASK_MARK.sub removes the task marker. Skip the token when the leading span closes after the item text. (best practice) [sources: src/devops_cli/roadmap/stage/stage_criteria.py:137, src/devops_cli/roadmap/stage/stage_criteria.py:219]
    • Chosen: Check raw token content before marker removal. It preserves the leading ~~ that identifies the cancelled item.
    • Rejected: Filter the extracted string after marker removal. The marker removal loses the leading context and can match ordinary text.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-10: partly.
Tool: markdown-it-py (https://pypi.org/project/markdown-it-py), MIT License, last activity 2026-05-07, maintained.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 7, 2026
  2. dan-petty commented on Nov 7, 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. Cancelled criteria are still planned, but only issues that use strikethrough are affected.
    • Value: Medium. Prevents the planner from scheduling work on criteria a maintainer has explicitly dropped.
    • Effort: Low. A single regex or filter change in the acceptance_criteria function.
    • 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 items work on the acceptance-criteria pipeline, but #3019 maps criteria to task groups while the candidate fixes the parser to drop struck-through items.
  3. added
    priority/p2-medium
    on Nov 7, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 8, 2026
  5. devops-cli-service commented on Nov 8, 2026

    @devops-cli-service
    Contributor

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

  6. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Reason: markdown-it-py is a maintained MIT-licensed CommonMark/GFM parser. Its strikethrough rule can detect a ~~ span, so it could replace a regex check. The issue's acceptance-criteria rule (skip an item whose leading strike span wraps the task marker, keep inline strikethrough) is repo-specific and must still be written in stage_criteria.py. No library gives the whole rule.

    Tool: markdown-it-py (https://pypi.org/project/markdown-it-py)

    • License: MIT License
    • Last activity: 2026-05-07
    • Maintained: yes

    Covers:

    • Maintained Markdown parser with GFM strikethrough (~~) span recognition
    • Can tokenize list items so a span can be checked structurally instead of by regex

    Lacks:

    • Knowing that a strike span around a task marker means a cancelled acceptance criterion
    • Extracting the acceptance-criteria section and returning item text in order
    • Parsing [ ] and [x] task markers inside a strike span (the span wraps the marker, so the marker is not a leading token)

    Tools considered:

    Searches run:

    • markdown-it-py strikethrough GFM task list items parser python, results: 5

    Sources:

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

  7. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 14, 2026
  8. added 4 commits that reference this issue on Nov 14, 2026
  9. removed
    status/in-review
    on Nov 14, 2026
  10. added a commit that references this issue on Nov 14, 2026
  11. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-14 15:02 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/lowpriority/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