Plan-first task creation — research, breakdown, risk analysis, then create tasks from approved plan. Usage: /doey-planned-task <goal>
doey task list 2>/dev/null || echo "No tasks"bash -c 'PD=$(grep "^PROJECT_DIR=" "$(tmux show-environment DOEY_RUNTIME 2>/dev/null | cut -d= -f2-)/session.env" 2>/dev/null | cut -d= -f2- | tr -d "\""); echo "${PD:-.}/.doey/plans"'bash -c 'PD=$(grep "^PROJECT_DIR=" "$(tmux show-environment DOEY_RUNTIME 2>/dev/null | cut -d= -f2-)/session.env" 2>/dev/null | cut -d= -f2- | tr -d "\""); ls "${PD:-.}/.doey/plans/"*.md 2>/dev/null | head -10 || echo "None"'Create a plan-first task from a natural-language goal. Goal from ARGUMENTS (if empty, use AskUserQuestion to ask, then stop).
Classify the goal:
/doey-instant-task insteadBefore writing anything, research the goal:
Structure findings into a plan with:
Determine next plan ID:
PD=$(grep '^PROJECT_DIR=' "$(tmux show-environment DOEY_RUNTIME 2>/dev/null | cut -d= -f2-)/session.env" 2>/dev/null | cut -d= -f2- | tr -d '"')
PLANS_DIR="${PD:-.}/.doey/plans"
mkdir -p "$PLANS_DIR"
PLAN_ID=$(( $(ls "$PLANS_DIR"/*.md 2>/dev/null | sed 's/.*\///' | grep -E '^[0-9]+\.md$' | sed 's/\.md//' | sort -n | tail -1) + 1 )) 2>/dev/null || PLAN_ID=1
echo "Next plan ID: $PLAN_ID"
Write the plan file using the Write tool to ${PLANS_DIR}/${PLAN_ID}.md:
---
plan_id: <PLAN_ID>