plan

Reviewed at commit d1dd775 New version, not yet reviewed

Planning mode guidelines and context injection

Made by
Ben Drucker
What we checked

Adds planning guidelines to Claude's context when plan mode starts, adds delegation advice once a plan grows past 5,000 characters, and shows the plan's size in the status line near the 10,000-character limit. It denies presenting a plan that is unchanged, only appended to, or too large, with a reason Claude must act on. It sends nothing over the network.

Review details

Static review of the source at the pinned commit; not run. Registers session.start, session.end, session.compact, prompt.attachment (plan_mode, plan_mode_exit), tool.call for Write/Edit (reads the session's plan file after a write; adds the size warning or delegation.md as extra context; $.ui.status) and tool.call for ExitPlanMode (observes only). It reads its own references/guidelines.md and delegation.md with $.fs.read and reads the plan file named by the plan-mode reminder. It emits events through $.modEvents (declared dependency on the mod-events plugin). A command hook (PreToolUse on ExitPlanMode) runs hooks/gate.ts with bun: it denies a re-presented plan that is identical to the last one, keeps nearly every line of a denied plan, or exceeds 10k characters (at most twice). For this it stores a hash, the plan's line set and flags under /tmp/claude/<session id>/ (or CLAUDE_PLAN_MARKER_ROOT); these files persist outside the project and hold the plan text lines, which are Claude-written plan text and can include project details. It fails open on errors. Skills: plan:review has allowed-tools Agent only and tells Claude to spawn a clean-context reviewer agent that runs git diff and gh pr view / gh repo view to compare the diff with the approved plan; no installs. Needs bun on PATH for the gate. Changes since the previous review: shell scripts for context injection and the write-warn hook were replaced by the module, the eval harness was removed and moved out of the shipped hooks, guidelines were rewritten (checkpoint emoji conventions, delegation advice). No fetch, eval or network calls; npm dependencies (zod, agent SDK types) not reviewed.

What it uses
  • Reads your prompts: no
  • Sees tool calls: yes
  • Blocks or changes tool calls: yes
  • Reads or writes files: yes
  • Runs programs on your machine: yes
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Made this mod? Add a badge to your README

modsforClaude badge for plan

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/plan.svg)](https://modsforclaude.com/mods/plan/)

← All mods