Skip to content
Development
Command

/resume

Auto-detect and resume any interrupted Plan Cascade task. Detects mega-plan, hybrid-worktree, or hybrid-auto context and routes to the appropriate resume command.

From plugin
plan-cascade
14030 skills30 commands
Install
> /plugin marketplace add Taoidle/plan-cascade
> /plugin install plan-cascade@plan-cascade

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/resume

Context preview

What this command does when you run it.

Auto-detect and resume any interrupted Plan Cascade task. Detects mega-plan, hybrid-worktree, or hybrid-auto context and routes to the appropriate resume command.

Command definition

resume.md
description: "Auto-detect and resume any interrupted Plan Cascade task. Detects mega-plan, hybrid-worktree, or hybrid-auto context and routes to the appropriate resume command."

Plan Cascade - Universal Resume

Automatically detect and resume any interrupted Plan Cascade task.

Path Storage Modes

This command works with both new and legacy path storage modes and auto-detects which is active:

New Mode (Default)

Files are stored in user data directory:

  • **Windows**: `%APPDATA%/plan-cascade/<project-id>/`
  • **Unix/macOS**: `~/.plan-cascade/<project-id>/`

Detection checks:

  • `<user-dir>/mega-plan.json` for mega-plan tasks
  • `<user-dir>/.worktree/*/` for worktree tasks
  • `<user-dir>/prd.json` for hybrid-auto tasks

Legacy Mode

Files in project root:

  • `<project-root>/mega-plan.json`
  • `<project-root>/.worktree/*/`
  • `<project-root>/prd.json`

The command scans both locations for maximum compatibility.

Tool Usage Policy (CRITICAL)

**To avoid command confirmation prompts:**

1. **Use Read tool for file reading** - NEVER use `cat` via Bash 2. **Use Glob tool for finding files** - NEVER use `ls` or `find` via Bash 3. **Only use Bash for git commands**

Step 1: Detect Task Context

Check for various planning files to determine what type of task was interrupted.

1.1: Check for Mega Plan

# Get mega-plan path from PathResolver
MEGA_PLAN_PATH = uv run python -c "from plan_cascade.state.path_resolver import PathResolver; from pathlib import Path; print(PathResolver(Path.cwd()).get_mega_plan_path())"

Use Read tool to check if mega-plan.json exists:
  Read(MEGA_PLAN_PATH)

# Also check legacy location if different
If file not found and MEGA_PLAN_PATH != "mega-plan.json":
  Read("mega-plan.json")

If file exists and is valid JSON:
  CONTEXT = "mega-plan"
  Extract: goal, target_branch, features count

1.2: Check for Hybrid Worktree

Use Read tool to check for worktree config:
  Read(".planning-config.json")

If file exists and mode = "hybrid":
  CONTEXT = "hybrid-worktree"
  Extract: task_name, target_branch

1.3: Check for Worktrees Directory

# Get worktree base directory from PathResolver
WORKTREE_BASE = uv run python -c "from plan_cascade.state.path_resolver import PathResolver; from pathlib import Path; print(PathResolver(Path.cwd()).get_worktree_dir())"

Use Glob tool to find worktrees in new mode location:
  Glob("{WORKTREE_BASE}/*/.planning-config.json")
  Glob("{WORKTREE_BASE}/*/prd.json")

# Also check legacy location if different
If WORKTREE_BASE != ".worktree":
  Glob(".worktree/*/.planning-config.json")
  Glob(".worktree/*/prd.json")

If any worktrees found:
  CONTEXT = "has-worktrees"
  List all found worktrees

1.4: Check for Regular Hybrid Task

# Get PRD path from PathResolver
PRD_PATH = uv run python -c "from plan_cascade.state.path_resolver import PathResolver; from pathlib import Path; print(PathResolver(Path.cwd()).get_prd_path())"

Use Read tool to check for PRD:
  Read(PRD_PATH)

# Also check legacy location if different
If file not found and PRD_PATH != "prd.json":
  Read("prd.json")

If file exists and has stories:
  CONTEXT = "hybrid-auto"
  Extract: goal, stories count

1.5: No Task Found

If none of the above:
  CONTEXT = "none"

Step 2: Display Detection Result

============================================================
PLAN CASCADE - RESUME DETECTION
============================================================

{Based on CONTEXT, show what was found}

============================================================

If CONTEXT is "mega-plan":

Detected: MEGA PLAN

Project: {goal}
Target Branch: {target_branch}
Features: {count}

Status file: .mega-status.json {exists/missing}
Worktrees: {list any in .worktree/}

→ Will route to: /plan-cascade:mega-resume --auto-prd

If CONTEXT is "hybrid-worktree":

Detected: HYBRID WORKTREE

Task: {task_name}
Target Branch: {target_branch}
PRD: {exists/missing}

Current directory is a worktree.

→ Will route to: /plan-cascade:hybrid-resume --auto

If CONTEXT is "has-worktrees":

Detected: WORKTREES EXIST (but not currently in one)

Found worktrees:
  - .worktree/{name1}/ (PRD: {exists/missing})
  - .worktree/{name2}/ (PRD: {exists/missing})

Options:
  1. Resume mega-plan (if mega-plan.json exists)
  2. Navigate to a specific worktree and resume

→ Checking for mega-plan.json...

If CONTEXT is "hybrid-auto":

Detected: HYBRID AUTO (regular directory)

Goal: {goal}
Stories: {total} ({complete} complete, {pending} pending)

→ Will route to: /plan-cascade:hybrid-resume --auto

If CONTEXT is "none":

No interrupted task detected.

Checked for (new mode paths):
  ✗ {MEGA_PLAN_PATH} (not found)
  ✗ .planning-config.json (not found)
  ✗ {WORKTREE_BASE}/ directory (not found or empty)
  ✗ {PRD_PATH} (not found)

Also checked legacy locations:
  ✗ mega-plan.json (not found)
  ✗ .worktree/ directory (not found or empty)
  ✗ prd.json (not found)

To start a new task:
  /plan-cascade:auto "your task description"

Step 3: Route to Appropriate Resume Command (MANDATORY SKILL TOOL USAGE)

**CRITICAL: You MUST use the Skill tool to invoke resume commands. DO NOT attempt to execute the resume logic yourself - let the specialized skill handle it.**

Based on detected context, automatically invoke the correct resume command:

If CONTEXT is "mega-plan":

Display:

Routing to mega-resume...

**MANDATORY: Use the Skill tool to invoke the mega-resume command:**

Skill(skill="plan-cascade:mega-resume", args="--auto-prd")

**DO NOT try to resume the mega-plan yourself. The mega-resume skill will handle it.**

If CONTEXT is "hybrid-worktree" OR "hybrid-auto":

Display:

Routing to hybrid-resume...

**MANDATORY: Use the Skill tool to invoke the hybrid-resume command:**

Skill(skill="plan-cascade:hybrid-resume", args="--auto")

**DO NOT try to resume the hybrid task

Read more
Ships withplan-cascade

AI-Powered Cascading Development Framework Transform complex projects into parallel executable tasks with intelligent decomposition and multi-provider execution Why Plan Cascade? • Product Editions • Quick Start • Architecture

Get the whole plugin
Stats
141
Stars
11
Forks
Quiet
Maintenance
Rust
Language
MIT
License
6mo ago
Last commit
7mo ago
Created

Repo: Taoidle/plan-cascade

Other commands on plan-cascade.