Summary
task-brief toggles intask only on lines matching ^#+[ \t]+Task[ \t]+[0-9]+. Any other heading -- ## Self-review notes, ## Finishing, # Wave 2, a PR template appendix -- cannot turn it off, so the final task before such a heading absorbs the heading and everything under it until the next Task heading or EOF.
Evidence from this repository's own plans (v6.4.2, all flat-numbered)
7 of the 15 plans under docs/superpowers/plans/ leak a non-task section into their last task's brief, for example:
| Plan |
Task |
Leaks into the brief |
2026-07-06-sdd-plan-scoped-workspace.md |
5 |
## Self-review notes (author) |
2026-06-09-sdd-task-scoped-review-dispatch.md |
7 |
## Finishing |
2026-06-10-visual-companion-auth-hardening.md |
10 |
## Self-Review Checklist |
2026-05-06-lift-drill-into-evals.md |
15 |
the entire PR template |
Repro
bash skills/subagent-driven-development/scripts/task-brief docs/superpowers/plans/2026-07-06-sdd-plan-scoped-workspace.md 5 out.md
grep -n '^## Self-review' out.md # present; it is not part of Task 5
Expected
A task ends at the next heading (outside a code fence) whose level is the same as or shallower than the task heading, whether or not it is a Task heading. Deeper headings inside the task body stay.
Prior art searched: #2175/#2176, #2304, #2340 -- none touches the section boundary. Fence handling is out of scope here (#2304 covers it).
Environment: as in Issue A. Drafted by an AI agent with the submitter's review and approval.
Summary
task-brieftogglesintaskonly on lines matching^#+[ \t]+Task[ \t]+[0-9]+. Any other heading --## Self-review notes,## Finishing,# Wave 2, a PR template appendix -- cannot turn it off, so the final task before such a heading absorbs the heading and everything under it until the nextTaskheading or EOF.Evidence from this repository's own plans (v6.4.2, all flat-numbered)
7 of the 15 plans under
docs/superpowers/plans/leak a non-task section into their last task's brief, for example:2026-07-06-sdd-plan-scoped-workspace.md## Self-review notes (author)2026-06-09-sdd-task-scoped-review-dispatch.md## Finishing2026-06-10-visual-companion-auth-hardening.md## Self-Review Checklist2026-05-06-lift-drill-into-evals.mdRepro
Expected
A task ends at the next heading (outside a code fence) whose level is the same as or shallower than the task heading, whether or not it is a
Taskheading. Deeper headings inside the task body stay.Prior art searched: #2175/#2176, #2304, #2340 -- none touches the section boundary. Fence handling is out of scope here (#2304 covers it).
Environment: as in Issue A. Drafted by an AI agent with the submitter's review and approval.