Skills › Superpowers › executing-plans › task-start
task-start
28 lines · skills/executing-plans/scripts/task-start at 2ce8aa1
1#!/usr/bin/env bash
2# Begin one task of an inline plan execution in a single call: extract the
3# task's brief (via subagent-driven-development's task-brief, so both skills
4# share one workspace) and record BASE, the commit the task's review range is
5# cut from. One tool call instead of two, because every call in an inline
6# session is a turn that re-reads the whole context.
7#
8# Usage: task-start PLAN_FILE TASK_NUMBER
9# Prints:
10# brief: <path to the task's brief file>
11# base: <full SHA of HEAD>
12set -euo pipefail
14if [ $# -ne 2 ]; then
15 echo "usage: task-start PLAN_FILE TASK_NUMBER" >&2
16 exit 2
17fi
19plan=$1
20n=$2
21sdd="$(cd "$(dirname "$0")/../../subagent-driven-development/scripts" && pwd)"
23out=$("$sdd/task-brief" "$plan" "$n")
24brief=$(printf '%s\n' "$out" | sed -n 's/^wrote \(.*\): [0-9][0-9]* lines$/\1/p')
25[ -n "$brief" ] || { echo "task-brief did not report a path: $out" >&2; exit 1; }
27echo "brief: $brief"
28echo "base: $(git rev-parse HEAD)"