Save Plan
Turn the plan the user and agent just agreed on into a durable Markdown document in the user's home plans directory.
Workflow
Decide whether to create or update. If the user asks to revise an existing plan, update that file unless they ask for a new version. Before creating a new plan, quickly scan
$HOME/plansfor an existing file on the same topic.Capture only durable planning context: agreed direction, decisions, assumptions, constraints, file or system touchpoints, phases, risks, mitigations, validation, and next steps. Remove stale assumptions after direction changes. Do not use this directory for temporary scratch notes.
Choose the filename. Use a concise descriptive filename, for example
2026-04-13-feature-plan.md. Use aYYYY-MM-DDdate prefix, lowercase words, and hyphens for new plans unless updating.Write an implementation-oriented plan with a clear H1. Prefer concrete sections such as
Summary,Phases,Risks,Mitigations,Next Steps, andDone When; omit empty sections. Keep it actionable so a later agent can continue without reconstructing the chat.Resolve
<plugin-root>to the installedagent-opsplugin directory. Save new plans with the shared helper there; do not assume the consumer's current directory is this repository. Pipe the final Markdown content to<plugin-root>/scripts/save_artifact.pywith--kind plan, the title, and optional--plans-dir/--datevalues:python3 <plugin-root>/scripts/save_artifact.py --kind plan --title "Short Descriptive Plan" <<'EOF' # Short Descriptive Plan ## Summary Durable planning context here. EOFThe script creates the plans directory when needed and writes a collision-safe filename with a date prefix.
Tell the user the exact saved path and give a one-sentence summary of what the plan preserves.
Updating Existing Plans
- Preserve useful prior context, but delete obsolete assumptions after direction changes.
- When renaming for filename convention cleanup, keep the descriptive portion unchanged unless the user asks otherwise.
- Prefer editing the existing plan over creating duplicates.
Helper Script
<plugin-root>/scripts/save_artifact.py --kind plan accepts Markdown on stdin and writes it to the current user's plans directory by default:
python3 <plugin-root>/scripts/save_artifact.py --kind plan --title "Title" [--plans-dir path] [--date YYYY-MM-DD]
It prints the saved file path on success.