deepen-plan

A command that expands an existing software plan with targeted research while keeping it tied to the user’s problem, system design, and definition of success.

In plain words
What is it for?
Use it to research best practices, performance ideas, user-interface improvements, edge cases, and similar implementations for major parts of a plan.
Why use it?
It helps prevent plans from becoming either too shallow or filled with generic suggestions that do not serve the original goal.

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/aegntic/compound-engineering/deepen-plan
Clone the repo
git clone --depth 1 https://github.com/aegntic/compound-engineering
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,676 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00029 $0.07676
Opus 5 $0.00015 $0.03838
Sonnet 5 $0.00006 $0.01535
Haiku 4.5 $0.00003 $0.00768

Measured 2d ago against content hash 13481fb11da2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

deepen-plan scanned grade B 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 2d ago.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

find .claude/docs -name "*.md" -type f 2>/dev/null
commands/deepen-plan.md · 794 lines

How it starts

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

Deepen Plan - Power Enhancement Mode

Introduction

Note: The current year is 2026. Use this when searching for recent documentation and best practices.

This command takes an existing plan (from /workflows:plan) and, when available, the architecture improvement artifact from /workflows:architecture. If no artifact exists yet, it must assemble an explicit architecture handoff contract from the plan instead of treating architecture as hidden context. Every enhancement is grounded in the plan's WHY artifacts -- the problem narrative, user story, architectural context, success criteria, the explicit architecture contract, and the plan's TDD/evidence contract -- so that deepening adds purpose-aligned depth, not generic complexity.

Each major element gets its own dedicated research sub-agent to find:

  • Best practices and industry patterns relevant to the user story
  • Performance optimizations that matter for the stated success criteria
  • UI/UX improvements (if applicable) aligned with the user's needs
  • Quality enhancements and edge cases that could threaten success criteria
  • Real-world implementation examples in similar architectural contexts

The result is a deeply grounded, production-ready plan that remains tightly coupled to WHY we're building it while honoring the deletion-test, interface, seam, and adapter decisions captured in the architecture artifact or explicit architecture handoff contract.

Plan File

<plan_path> #$ARGUMENTS </plan_path>

If the plan path above is empty:

  1. Check for recent plans: ls -la docs/plans/
  2. Ask the user: "Which plan would you like to deepen? Please provide the path (e.g., docs/plans/2026-01-15-feat-my-feature-plan.md)."

Do not proceed until you have a valid plan file path.

Main Tasks

1. Parse and Analyze Plan Structure

Read the full file on GitHub · 794 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. 2d ago First seen · 794 lines · 29 tokens per session scan B 13481fb11da2

Subscribe to this mod's changes

deepen-plan is a command published in the GitHub repository aegntic/compound-engineering (2 stars, last pushed 2mo ago), licensed MIT. It adds 29 tokens to every session and 7,676 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.