Skip to content

fix(tracker): find acceptance criteria under level 2 to 4 headings - #809

Merged
dean0x merged 2 commits into
mainfrom
fix/808-criteria-heading-level
Nov 23, 2026
Merged

dean0x merged 2 commits into
mainfrom
fix/808-criteria-heading-level

Conversation

@dean0x

@dean0x dean0x commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

The GitHub issue fetch now finds the acceptance criteria under a ##, ### or #### heading. Before this change, only a ## heading started the section.

Changes

  • src/assets/mds/tracker/_github.mds, step "Extract Issue Data": the awk rule reads the heading level. A level 2, 3 or 4 heading named "Acceptance criteria" starts the section. The match ignores case and accepts a colon.
  • The section ends at the next heading of the same level or a higher level. A deeper heading stays inside the section. A # line inside a code fence is not a heading.
  • tests/tracker/setup-task-common.test.ts: new cases for ###, ####, a deeper heading, a higher heading, and # or ##### headings. A known-bad probe shows that the old rule finds no criteria under ###.
  • The Jira and Linear fetch steps have no such rule. They do not change.
  • CHANGELOG: one Fixed entry.

Closes #808

The GitHub issue fetch now starts the criteria section at a ##, ### or
#### heading. The section ends at the next heading of the same level or
a higher level. A deeper heading stays inside the section.

Closes #808
A # line inside a code fence is not a heading. It no longer ends the
acceptance criteria section.
@dean0x

dean0x commented Nov 23, 2026

Copy link
Copy Markdown
Owner Author

Evidence (head 4444ab4)

Acceptance criteria

AC Result Proof (tests/tracker/setup-task-common.test.ts)
AC-1: a level 2, 3 or 4 heading starts the block (any case, optional colon) PASS ## cases, "a ### heading starts the section", "a #### heading with a colon". "a # or ##### heading starts no section".
AC-2: the next heading of the same or a higher level ends the block PASS "a following ### ends it", "a second ### heading ends a ### section", "a higher-level # heading ends a ### section".
AC-3: a deeper heading inside the block does not end it PASS "a nested ### stays inside", "a nested ##### stays inside".
AC-4: tests for ##, ###, #### and no heading PASS All cases above, and "no heading". A known-bad probe shows that the old rule finds no criteria under ###.

Checks

  • npm run build: exit 0.
  • 23 affected test files (tests/tracker, MDS, Git agent, provider guards): 1250 tests pass, 0 fail.
  • CI at this head: build-and-test (22), macos-bash32-hooks and security/snyk pass.
  • Snyk Code scan of the changed test folder: 0 issues.

Review (one round, regression focus)

  • Fixed: a # line inside a code fence ended the section. The rule now skips heading logic between fence lines. A test covers it.
  • Not changed: ##Acceptance criteria with no space still starts a section, as before. ##Notes with no space does not end it, as before.

@dean0x
dean0x merged commit 51476c6 into main Nov 23, 2026
3 checks passed
@dean0x
dean0x deleted the fix/808-criteria-heading-level branch November 23, 2026 11:25
@dean0x dean0x mentioned this pull request Nov 24, 2026
dean0x added a commit that referenced this pull request Nov 24, 2026
## Summary

This PR sets the version to 3.21.0 and moves the `[Unreleased]` notes to
the 3.21.0 section. After the merge, a `v3.21.0` tag on the merge commit
starts the release workflow.

## Changes

- `package.json` and `package-lock.json`: version 3.20.0 to 3.21.0.
- `CHANGELOG.md`: new `## [3.21.0] - 2026-11-24` section, new empty
`[Unreleased]` section, and the 3.21.0 compare link.
- `CHANGELOG.md`: the `[Unreleased]` compare link now starts at
`v3.21.0`. It started at `v3.8.0` before.

## Shipped in 3.21.0

- #794: Code Mode flag (closes #792).
- #810: week forecast in the status line (closes #805).
- #811: working memory is opt-in, and the note has an 8 KB limit (closes
#807).
- #809: acceptance criteria under level 2 to 4 headings (closes #808).

## Breaking Changes

None. Working memory is off by default for new installs. Existing
installs keep their choice. `devflow memory --enable` turns it on.

## Testing

- `npm run build`: pass.
- `npm run test`: 417 files, 20084 passed, 8 skipped, 0 failed.
- `npm run test:integration`: 5 files, 55 passed.
- `npm run version:bump -- 3.21.0` a second time changes no file.
- The tests ran on the base commit c8282b1. This PR changes only the
version and the changelog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub issue fetch: a ### Acceptance criteria heading gives no criteria

1 participant