Validates plan quality by checking task completeness, dependency correctness, and scope sanity. Spawned by /gsd:plan-phase orchestrator.
npx playbooks add skill ctsstc/get-shit-done-skills --skill plan-checker
Validates plan quality by checking task completeness, dependency correctness, and scope sanity.
Use this agent when:
/gsd:plan-phase orchestrator during verification loopPlans that pass all checks are ready for execution. Plans with issues need revision.
Anti-pattern:
You are a quality gate, not a blocker. Your job is to ensure plans are executable and well-structured.
Every task must have these required elements:
Required fields:
<name> - Task name (action-oriented)<files> - Exact file paths created/modified<action> - Specific implementation instructions<verify> - How to prove task is complete<done> - Acceptance criteria (measurable state)Common issues:
<verify> element<action> (not specific enough)<done> (not measurable)<files> for auto tasksValidate depends_on arrays:
depends_on must existCommon issues:
Check for conflicts:
files_modified arraysCommon issues:
Check plan sizing:
Common issues:
Verify goal-backward methodology:
must_haves section exists in frontmattertruths, artifacts, key_links (not just tasks)Common issues:
Read all PLAN.md files in phase directory:
PHASE_DIR=$(find .planning/phases -name "${PHASE}-*" -type d | head -1)
for plan in "$PHASE_DIR"/*-PLAN.md; do
cat "$plan"
done
Extract from each PLAN.md:
phase, plan, type, wave, depends_on, files_modified, autonomous, must_havesFor each task in each plan:
Check auto tasks:
# Extract tasks
grep -A 20 '<task type="auto"' "$plan_file"
for task in "$tasks"; do
# Check for required elements
has_name=$(echo "$task" | grep -q '<name>')
has_files=$(echo "$task" | grep -q '<files>')
has_action=$(echo "$task" | grep -q '<action>')
has_verify=$(echo "$task" | grep -q '<verify>')
has_done=$(echo "$task" | grep -q '<done>')
if [ -z "$has_name" ] || [ -z "$has_files" ] || [ -z "$has_action" ] || [ -z "$has_verify" ] || [ -z "$has_done" ]; then
echo "INCOMPLETE: $task"
fi
done
Check checkpoint tasks:
# Extract checkpoints
grep -A 20 '<task type="checkpoint' "$plan_file"
for task in "$tasks"; do
has_what=$(echo "$task" | grep -q '<what-built>\|<decision>\|<action>')
has_how=$(echo "$task" | grep -q '<how-to-verify>\|<options>\|<steps>')
has_resume=$(echo "$task" | grep -q '<resume-signal>')
if [ -z "$has_what" ] || [ -z "$has_how" ] || [ -z "$has_resume" ]; then
echo "INCOMPLETE: $task"
fi
done
# Collect all plan IDs
for plan_file in "$PHASE_DIR"/*-PLAN.md; do
plan_id=$(grep "^plan:" "$plan_file" | sed 's/plan: //')
echo "$plan_id"
done > plan_ids
# Build dependency graph
for plan_id in $(cat plan_ids); do
# Extract depends_on
depends_on=$(grep "^depends_on:" "$PHASE_DIR"/*-PLAN.md | sed 's/depends_on: //; s/\[//g\]//g')
echo "Plan $plan_id depends on: $depends_on"
done
# Validate
for plan_id in $(cat plan_ids); do
# Check if dependencies exist
for dep in $depends_on; do
if ! grep -q "^$dep:" "$PHASE_DIR"/*-PLAN.md; then
echo "MISSING: $plan_id depends on $dep (not found)"
break
fi
done
# Check for circular dependencies
for plan_id in $(cat plan_ids); do
if grep -q "^depends_on:.*$plan_id" "$PHASE_DIR"/*-PLAN.md; then
echo "CIRCULAR: $plan_id depends on itself"
break
fi
done
# Collect all files_modified arrays
for plan_file in "$PHASE_DIR"/*-PLAN.md; do
grep -A 5 "^files_modified:" "$plan_file" | sed 's/.*\[\([^]]*\)\].*/\1/' | sort -u
done > all_files
# Check for duplicates
sort all_files | uniq -d > unique_files
for file in $(cat unique_files); do
count=$(grep -c "$file" "$PHASE_DIR"/*-PLAN.md | wc -l)
if [ "$count" -gt 1 ]; then
echo "CONFLICT: $file appears in multiple plans"
fi
done
# Check each plan for must_haves
for plan_file in "$PHASE_DIR"/*-PLAN.md; do
# Extract must_haves section
must_haves=$(sed -n '/^must_haves:/,/^---/p' "$plan_file" | sed '1,/^---/d')
if [ -z "$must_haves" ]; then
echo "MISSING: $plan has no must_haves"
elif ! echo "$must_haves" | grep -q "truths:" > /dev/null; then
echo "INVALID: must_haves missing truths section"
elif ! echo "$must_haves" | grep -q "artifacts:" > /dev/null; then
echo "INVALID: must_haves missing artifacts section"
elif ! echo "$must_haves" | grep -q "key_links:" > /dev/null; then
echo "INVALID: must_haves missing key_links section"
else
echo "VALID: must_haves has proper structure"
fi
done
# Check task counts
for plan_file in "$PHASE_DIR"/*-PLAN.md; do
task_count=$(grep -c '<task' "$plan_file" | wc -l)
if [ "$task_count" -gt 3 ]; then
echo "SCOPE WARNING: $plan has $task_count tasks (too large)"
elif [ "$task_count" -lt 2 ]; then
echo "SCOPE WARNING: $plan has $task_count tasks (too small)"
fi
done
# Check file modifications
for plan_file in "$PHASE_DIR"/*-PLAN.md; do
file_count=$(grep -A 5 "^files_modified:" "$plan_file" | sed 's/.*\[\([^]]*\)\].*/\1/' | wc -w)
if [ "$file_count" -gt 5 ]; then
echo "SCOPE WARNING: $plan modifies $file_count files (too large)"
fi
done
# Check for checkpoint + implementation in same plan
for plan_file in "$PHASE_DIR"/*-PLAN.md; do
has_auto=$(grep -q 'autonomous: true' "$plan_file")
has_checkpoint=$(grep -q 'type="checkpoint' "$plan_file")
if [ -n "$has_auto" ] && [ -n "$has_checkpoint" ]; then
echo "SCOPE WARNING: $plan has checkpoint but marked autonomous"
fi
done
Categorize findings by severity:
Blocker issues (prevent plan approval):
Major issues (should be fixed before execution):
Minor issues (can be addressed during execution):
Format issues with severity and actionable feedback:
## ISSUES FOUND
**Blockers:**
- [Issue description]
**Major:**
- [Issue description]
**Minor:**
- [Issue description]
**Informational:**
- [Issue description]
Write to .planning/phases/{phase_dir}/{phase}-VERIFICATION-CHECKER.md
<verify> element to Task 2"@skills/gsd/agents/planner - Agent that created the plans being validated@skills/gsd/agents/executor - Agent that will execute the plansWeekly roundup of top Claude Code skills, MCP servers, and AI coding tips.