mega-complete

A command that finishes a large project plan by removing its temporary planning files after the work is merged.

In plain words
What is it for?
Use it at the end of a multi-feature project to clean up files created during planning and execution.
Why use it?
It clears leftover plan records, status files, findings, and worktree folders once the project is complete.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/taoidle/plan-cascade/mega-complete
Clone the repo
git clone --depth 1 https://github.com/Taoidle/plan-cascade
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,713 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00031 $0.02713
Opus 5 $0.00015 $0.01357
Sonnet 5 $0.00006 $0.00543
Haiku 4.5 $0.00003 $0.00271

Measured yesterday against content hash a8e5077b5737, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

mega-complete scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf .agent-outputs
commands/mega-complete.md · 371 lines

How it starts

The opening of the file, as written. The whole thing — 371 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Complete Mega Plan

Complete the mega-plan by cleaning up remaining planning files.

Note: In the new batch-by-batch execution model, code merging happens automatically when each batch completes (via mega-approve). This command only performs final cleanup.

Path Storage Modes

This command works with both new and legacy path storage modes:

New Mode (Default)

Cleanup removes files from user data directory:

  • ~/.plan-cascade/<project-id>/mega-plan.json
  • ~/.plan-cascade/<project-id>/.state/.mega-status.json
  • ~/.plan-cascade/<project-id>/.worktree/ (remaining worktrees)
  • <project-root>/mega-findings.md (user-visible file in project root)

Legacy Mode

Cleanup removes files from project root:

  • <project-root>/mega-plan.json
  • <project-root>/.mega-status.json
  • <project-root>/.worktree/
  • <project-root>/mega-findings.md

The command auto-detects which mode is active.

Step 1: Verify Mega Plan Exists

# 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())" 2>/dev/null || echo "mega-plan.json")

if [ ! -f "$MEGA_PLAN_PATH" ]; then
    echo "No mega-plan.json found at: $MEGA_PLAN_PATH"
    echo "Nothing to complete."
    exit 0
fi

Step 2: Check Completion Status

Read .mega-status.json and mega-plan.json to verify:

  1. All batches have been completed
  2. All features have been merged

If any batches are still pending:

============================================================
CANNOT COMPLETE - BATCHES PENDING
============================================================

The following batches have not been completed:

  Batch 2:
    [ ] feature-003: Shopping Cart
    [ ] feature-004: Order Processing

Complete remaining batches first:
  /plan-cascade:mega-approve

Then run this command again.
============================================================

Read the full file on GitHub · 371 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 371 lines · 31 tokens per session scan C a8e5077b5737

Subscribe to this mod's changes

mega-complete is a command published in the GitHub repository Taoidle/plan-cascade (124 stars, last pushed 5mo ago), licensed MIT. It adds 31 tokens to every session and 2,713 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.