diff options
| author | Jesse Vincent <jesse@fsck.com> | 2026-10-22 22:31:14 +0000 |
|---|---|---|
| committer | Jesse Vincent <jesse@fsck.com> | 2026-10-23 03:38:19 +0000 |
| commit | f75c01fd9b320060c301e2c6591dfc74a8436f15 (patch) | |
| tree | 56f1e02460ebe2aa835f36582521cd6e80adf564 /tests/opencode/test-plugin-loading.sh | |
| parent | b58deb3b948d4c305feeac122700100419ee2777 (diff) | |
fix(sdd): task-brief recognizes alphanumeric task IDs and matches them whole
task-brief only treated `Task` followed by digits as a task heading, and
found the requested task by splicing TASK_NUMBER into a regex followed
by `([^0-9]|$)`. Plans that number tasks by lane (`### Task A1`,
`### Task B2`) could not be extracted at all: `task-brief plan.md A1`
exits 3 "task A1 not found" (#2459). Among 1,288 distinct plans in Jesse's
own repositories, 19 plans have such headings (262 headings, IDs like A1,
M3a, F.2, W0), and none of those tasks could be briefed.
The same splice made the match a prefix match: Task 6 also took a sibling
Task 6b (#2175), Task 1 took Task 1.1 and 1.2, Task 2.1 took Task 201
because `.` is any character, and an ID like `6(` crashed awk (#2405).
A task heading is now `Task` followed by an ID made of letters and digits,
optionally dot-separated, that contains at least one digit. The digit is
what keeps `## Task Overview` or `#### Task notes` from becoming a task
boundary. awk extracts the heading's ID and compares it to TASK_NUMBER as
a whole string, so TASK_NUMBER never reaches awk as a regex.
A deeper Task heading whose ID extends the requested one with a letter or
dot is a sub-task and stays in the parent's brief, as the prefix match
happened to do before: plans in that corpus nest `#### Task 1a` under
`### Task 1`, and a Task 1 brief without its sub-tasks would lose most of
its requirements. A sub-task's own brief ends at its next sibling. Depth
alone is not the test, because plans also drift from `## Task 1` to
`### Task 2`, and those are siblings.
The heading word stays the English literal `Task`, which is what
writing-plans' template uses. Widening it to any word would turn the
`Phase 1`, `Chunk 2` and `Step 1` headings that plans commonly carry
(308, 182 and 56 of them in the same corpus) into tasks.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
Diffstat (limited to 'tests/opencode/test-plugin-loading.sh')
0 files changed, 0 insertions, 0 deletions
