diff options
| author | Jesse Vincent <jesse@fsck.com> | 2026-10-22 22:32:48 +0000 |
|---|---|---|
| committer | Jesse Vincent <jesse@fsck.com> | 2026-10-23 03:38:19 +0000 |
| commit | 750ba92008b88850f6ab321706c7f840bbfff503 (patch) | |
| tree | d13ce7fd72c1c8616ed889b9147b63e1b1132f7e /skills/subagent-driven-development/scripts/task-brief | |
| parent | f75c01fd9b320060c301e2c6591dfc74a8436f15 (diff) | |
fix(sdd): task-brief says when a plan's task headings are not in Englishfix/2459-2496-task-brief-headings
task-brief recognizes only the English word `Task` in a task heading.
writing-plans' template shows `### Task N:` but never says the word is
machine-read, so a model writing a plan in Spanish writes `## Tarea 1:`.
task-brief and task-start then report "task 1 not found in plan-es.md
(no heading matching 'Task 1')", which reads as "this plan has no task 1"
and sends the controller looking for a task that is on line 3 (#2496).
When a plan has no Task headings at all, task-brief now prints, before the
existing not-found line, that task headings must use the English word
"Task" whatever the plan's language, and lists up to five headings shaped
like tasks (`<word> <id-with-a-digit>`). A plan that has Task headings,
just not the requested one, still gets only the not-found line, so asking
for Task 9 of an eight-task plan stays quiet.
This deliberately does not accept other words. Plans commonly carry
`Phase 1`, `Chunk 2` and `Step 1` headings, and a word-agnostic rule
would turn them into tasks. Keeping the word fixed in the plans
themselves is a writing-plans wording change, which needs evals.
Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
Diffstat (limited to 'skills/subagent-driven-development/scripts/task-brief')
| -rwxr-xr-x | skills/subagent-driven-development/scripts/task-brief | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/skills/subagent-driven-development/scripts/task-brief b/skills/subagent-driven-development/scripts/task-brief index 3d4bd02..d95cd59 100755 --- a/skills/subagent-driven-development/scripts/task-brief +++ b/skills/subagent-driven-development/scripts/task-brief @@ -36,12 +36,18 @@ fi # whose ID extends the requested one with a letter or dot is a sub-task and # stays in its brief (### Task 7 keeps #### Task 7a), as it always has. # Depth alone is not enough: plans drift from "## Task 1" to "### Task 2". +# +# The word stays the English literal "Task", whatever language the rest of +# the plan is in. A plan with no Task headings at all usually translated it +# ("## Tarea 1"), so list the headings shaped like tasks before the +# not-found error instead of implying the plan has no task 1 (#2496). awk -v n="$n" ' /^```/ { infence = !infence } !infence && /^#+[ \t]+Task[ \t]/ { id = $0 sub(/^#+[ \t]+Task[ \t]+/, "", id) if (match(id, /^[A-Za-z0-9]+(\.[A-Za-z0-9]+)*/) && substr(id, 1, RLENGTH) ~ /[0-9]/) { + tasks++ id = substr(id, 1, RLENGTH) match($0, /^#+/) subtask = intask && RLENGTH > level && substr(id, 1, length(n)) == n \ @@ -52,7 +58,14 @@ awk -v n="$n" ' } } } + !infence && /^#+[ \t]+[^ \t]+[ \t]+[A-Za-z0-9.]*[0-9]/ && shaped < 5 { shaped_heading[++shaped] = $0 } intask { print } + END { + if (!tasks && shaped) { + print "task-brief: no task headings found. Task headings must use the English word \"Task\" (\"### Task 1: ...\"), even when the rest of the plan is in another language. Headings shaped like tasks:" | "cat >&2" + for (i = 1; i <= shaped; i++) print " " shaped_heading[i] | "cat >&2" + } + } ' "$plan" > "$out" if [ ! -s "$out" ]; then |
