summaryrefslogtreecommitdiff
path: root/skills/subagent-driven-development/scripts/task-brief
diff options
context:
space:
mode:
authorJesse Vincent <jesse@primeradiant.com>2026-09-18 17:28:09 -0700
committerJesse Vincent <jesse@primeradiant.com>2026-09-18 17:28:09 -0700
commitcffb7c95b64524cd59ddb4d1c9d2c2675482315e (patch)
tree38263673a455cdf894f19301aa284009d7edb1d8 /skills/subagent-driven-development/scripts/task-brief
parent835c5f951cce3e169b755218a9d8f26b5854f0d5 (diff)
Plans as directories, and a boundary check before each next planplan-directories
A plan is a directory: 00-header.md plus one NN-<task>.md per task. The brief for task N is the header plus that file; sdd-workspace, task-brief, review-package, task-start and task-done take a file or a directory. Before starting the next plan in a set, executors run scripts/plan-boundary, which names every identifier the plan consumes from earlier plans that the code as built does not contain, in the next plan and in every later plan's Plan Set entry, and fix the plan until it prints clean. Measured: the directory form executes the same as the file form (inline 9/9, SDD 6/6, same cost) and plans at the same volume; the gate kept a five-plan set consistent with the code 2/2 against a planted cross-plan naming conflict, where a per-ruling duty managed 0/2.
Diffstat (limited to 'skills/subagent-driven-development/scripts/task-brief')
-rwxr-xr-xskills/subagent-driven-development/scripts/task-brief10
1 files changed, 9 insertions, 1 deletions
diff --git a/skills/subagent-driven-development/scripts/task-brief b/skills/subagent-driven-development/scripts/task-brief
index b49fc54..dd6994c 100755
--- a/skills/subagent-driven-development/scripts/task-brief
+++ b/skills/subagent-driven-development/scripts/task-brief
@@ -16,7 +16,7 @@ fi
plan=$1
n=$2
-[ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
+[ -e "$plan" ] || { echo "no such plan: $plan" >&2; exit 2; }
if [ $# -eq 3 ]; then
out=$3
@@ -27,6 +27,14 @@ else
out="$dir/task-${n}-brief.md"
fi
+if [ -d "$plan" ]; then
+ # directory plan: the shared header, then this task's own file
+ task=$(ls "$plan"/[0-9][0-9]-*.md 2>/dev/null | awk -v n="$n" '{ f=$0; sub(/.*\//,"",f); if (f+0==n) print $0 }' | head -1)
+ [ -n "$task" ] || { echo "task ${n} not found in ${plan} (no [0-9][0-9]-*.md numbered ${n})" >&2; exit 3; }
+ { [ -f "$plan/00-header.md" ] && cat "$plan/00-header.md"; echo; cat "$task"; } > "$out"
+ echo "wrote ${out}: $(wc -l < "$out" | tr -d ' ') lines"
+ exit 0
+fi
awk -v n="$n" '
/^```/ { infence = !infence }
!infence && /^#+[ \t]+Task[ \t]+[0-9]+/ {