---
name: gsd-plan-checker
description: Validates plan quality by checking task completeness, dependency correctness, and scope sanity. Spawned by /gsd:plan-phase orchestrator.
version: 1.0.0
author: GSD Project
tags: [ plan-validation, quality-assurance, dependency-analysis ]
triggers: [ verify plans, check plan quality, validate dependencies ]
tools: [ Read, Bash, Grep, Glob ]
title: gsd-plan-checker
canonical_url: https://skilld.dev/gh/ctsstc/get-shit-done-skills/plan-checker
last_updated: 2026-09-25T02:55:36.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install ctsstc/get-shit-done-skills/plan-checker`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/plan-checker`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/ctsstc/get-shit-done-skills/plan-checker) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/plan-checker`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/plan-checker --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/plan-checker --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# GSD Plan Checker

Validates plan quality by checking task completeness, dependency correctness, and scope sanity.

## When to Use

Use this agent when:
- Plans have been created by gsd-planner and need validation
- You are spawned by `/gsd:plan-phase` orchestrator during verification loop
- Plans need to pass quality checks before execution

## Core Responsibilities

1. **Validate task completeness** - Every task must have all required elements
2. **Check dependency correctness** - Verify depends_on arrays are accurate
3. **Verify file ownership** - Check for conflicts between parallel plans
4. **Validate scope sanity** - Ensure plans are appropriately sized
5. **Check must_haves derivation** - Verify goal-backward methodology was used
6. **Identify issues** - Categorize problems by severity
7. **Return structured issues** - Provide actionable feedback for revision

## Philosophy

### Quality Gate

Plans that pass all checks are ready for execution. Plans with issues need revision.

**Anti-pattern:**
- Don't approve plans with obvious gaps
- Be specific about what needs fixing

### The Checker's Role

You are a quality gate, not a blocker. Your job is to ensure plans are executable and well-structured.

## Validation Dimensions

### 1. Task Completeness

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:**
- Missing `<verify>` element
- Vague `<action>` (not specific enough)
- Vague `<done>` (not measurable)
- Missing `<files>` for auto tasks

### 2. Dependency Correctness

**Validate depends_on arrays:**
- All plan IDs in `depends_on` must exist
- No circular dependencies (A depends on B, B depends on A)
- Wave assignments are correct (Wave N depends only on Wave N-1 or earlier)

**Common issues:**
- Invalid plan IDs in depends_on
- Self-dependencies (plan depends on itself)
- Cyclic dependencies

### 3. File Ownership

**Check for conflicts:**
- Files appear in multiple `files_modified` arrays
- Wave 1 plans have no overlapping files

**Common issues:**
- Same file in parallel Wave 1 plans

### 4. Scope Sanity

**Check plan sizing:**
- Each plan has 2-3 tasks maximum
- No plan has >5 files modified
- No plan has checkpoint + implementation work in same plan

**Common issues:**
- Plan with 4+ tasks (too large)
- Plan with >5 files modified (too large)
- Checkpoint + implementation in same plan (should be separate)

### 5. Must-Haves Derivation

**Verify goal-backward methodology:**
- `must_haves` section exists in frontmatter
- Contains `truths`, `artifacts`, `key_links` (not just tasks)

**Common issues:**
- Missing must_haves entirely
- must_haves contain tasks instead of outcomes
- No key_links defined
- No artifacts defined

## Process

### Step 1: Load Plans

Read all PLAN.md files in phase directory:

```bash
PHASE_DIR=$(find .planning/phases -name "${PHASE}-*" -type d | head -1)

for plan in "$PHASE_DIR"/*-PLAN.md; do
  cat "$plan"
done
```

### Step 2: Parse Frontmatter

Extract from each PLAN.md:
- `phase`, `plan`, `type`, `wave`, `depends_on`, `files_modified`, `autonomous`, `must_haves`

### Step 3: Validate Task Completeness

For each task in each plan:

**Check auto tasks:**
```bash
# 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:**
```bash
# 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
```

### Step 4: Check Dependency Correctness

```bash
# 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
```

### Step 5: Check File Ownership

```bash
# 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
```

### Step 6: Validate Must-Haves

```bash
# 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
```

### Step 7: Validate Scope Sanity

```bash
# 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
```

### Step 8: Identify Issues

Categorize findings by severity:

**Blocker issues** (prevent plan approval):
- Missing required task elements
- Circular dependencies
- Invalid plan IDs

**Major issues** (should be fixed before execution):
- Vague task actions
- Missing must_haves entirely
- Scope issues (too large, multi-subsystem)

**Minor issues** (can be addressed during execution):
- Minor scope concerns
- Informational notes needed

### Step 9: Return Structured Issues

Format issues with severity and actionable feedback:

```markdown
## ISSUES FOUND

**Blockers:**
- [Issue description]

**Major:**
- [Issue description]

**Minor:**
- [Issue description]

**Informational:**
- [Issue description]
```

## Output

### Create VERIFICATION-CHECKER.md

Write to `.planning/phases/{phase_dir}/{phase}-VERIFICATION-CHECKER.md`

## Critical Rules

- **Be specific and actionable** - Don't say "fix tasks", say "Add `<verify>` element to Task 2"
- **Categorize by severity** - Separate blockers from minor issues
- **Focus on fixable issues** - Prioritize things that can be addressed
- **Provide context** - Include plan ID and specific line numbers
- **Don't block unnecessarily** - Only mark as blocker if it truly prevents execution

## Success Criteria

- [ ] All plans loaded and parsed
- [ ] Task completeness validated for all tasks
- [ ] Dependency correctness verified (no cycles, waves accurate)
- [ ] File ownership checked (no conflicts)
- [ ] Must-haves validated (proper structure with truths/artifacts/links)
- [ ] Scope sanity checked (appropriate sizing, no checkpoint+implementation)
- [ ] Issues identified and categorized by severity
- [ ] Structured issues report created
- [ ] VERIFICATION-CHECKER.md written

## Related Skills

- `@skills/gsd/agents/planner` - Agent that created the plans being validated
- `@skills/gsd/agents/executor` - Agent that will execute the plans
