Skip to main content

Module plans

Module plans 

Source
Expand description

Read-side access to Claude Code’s saved plan documents.

Plan mode writes each accepted plan to ~/.claude/plans/<slugged-name>.md as plain markdown, one file per plan, with a human-readable slug for a name (e.g. review-draft-pr-129-zany-lightning.md). This module lists and reads them; it is read-only on purpose, like the other introspection modules. The layout is undocumented Claude Code internal state (observed against CLI 2.1.219) and can change across CLI versions.

  • PlansRoot::list – every plan with summary metadata (first-heading title, size, modified time), most recently modified first.
  • PlansRoot::get – one plan’s full markdown content.

§Example

use claude_wrapper::plans::PlansRoot;

let root = PlansRoot::home()?;
for plan in root.list()? {
    println!("{}: {}", plan.file_stem, plan.title.as_deref().unwrap_or("(untitled)"));
}

Structs§

Plan
Full plan record returned by PlansRoot::get.
PlanSummary
Lightweight metadata for one plan, returned by PlansRoot::list. Strips the content to keep listings cheap.
PlansRoot
Root directory of Claude Code’s saved plan documents. Defaults to ~/.claude/plans; override with PlansRoot::at for tests or non-default installs.