plans

package
v0.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package plans is the user-level store of saved plans — one markdown file per plan under ~/.memcode/plans, mirroring Claude Code's ~/.claude/plans. A plan is written the moment it's presented for approval and updated in place across revisions, so it outlives the session and can be re-opened later by asking the agent to recall it (the recall_plan tool). Plain markdown, no frontmatter: the file IS the plan, renderable as-is. User-level (not per-repo) so plans accumulate in one place.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() (string, error)

Dir is the user-level plans directory (~/.memcode/plans). Created on demand by Save.

func Read

func Read(slug string) (string, error)

Read returns the markdown of one saved plan.

func Save

func Save(slug, plan string) (string, error)

Save writes the plan markdown to ~/.memcode/plans/<slug>.md, creating the dir if needed. An empty slug mints a fresh memorable one (adjective-gerund-noun, like Claude Code's plan names); pass a returned slug back to UPDATE the same file across revisions of one plan. Returns the slug used so the caller can reuse it.

Types

type Ref

type Ref struct {
	Slug  string
	Title string
	Saved time.Time
	Path  string
}

Ref is one saved plan's metadata, for listing.

func List

func List() ([]Ref, error)

List returns saved plans, newest first (by file modtime).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL