Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Executes implementation plans by dispatching isolated subagents per task with two-stage spec and code quality review.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
scripts/task-brief
1#!/usr/bin/env bash2# Extract one task's full text from an implementation plan into a file the3# implementer reads in one call, so the task text never has to be pasted4# through the controller's context.5#6# Usage: task-brief PLAN_FILE TASK_NUMBER [OUTFILE]7# Default OUTFILE: <repo-root>/.superpowers/sdd/task-<N>-brief.md8# (per worktree; concurrent runs in the same working tree share it).9set -euo pipefail1011if [ $# -lt 2 ] || [ $# -gt 3 ]; then12echo "usage: task-brief PLAN_FILE TASK_NUMBER [OUTFILE]" >&213exit 214fi1516plan=$117n=$218[ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }1920if [ $# -eq 3 ]; then21out=$322else23dir=$("$(cd "$(dirname "$0")" && pwd)/sdd-workspace")24out="$dir/task-${n}-brief.md"25fi2627awk -v n="$n" '28/^```/ { infence = !infence }29!infence && /^#+[ \t]+Task[ \t]+[0-9]+/ {30intask = ($0 ~ ("^#+[ \t]+Task[ \t]+" n "([^0-9]|$)"))31}32intask { print }33' "$plan" > "$out"3435if [ ! -s "$out" ]; then36echo "task ${n} not found in ${plan} (no heading matching 'Task ${n}')" >&237exit 338fi3940echo "wrote ${out}: $(wc -l < "$out" | tr -d ' ') lines"41