plan-guardian

A read-only agent that checks whether the current coding work still matches the active plan stored in .ccm/PLAN.md and .ccm/PROGRESS.md.

In plain words
What is it for?
Use it to compare recent work with the plan, verify selected claims in the project files, and report whether to continue or replan.
Why use it?
It helps spot work that has drifted away from the agreed goal or steps before more time is spent on it.

Agent

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 agents/skymanbp/cc-memory/plan-guardian
Clone the repo
git clone --depth 1 https://github.com/skymanbp/cc-memory
Per session 61 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 663 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00061 $0.00663
Opus 5 $0.00030 $0.00331
Sonnet 5 $0.00012 $0.00133
Haiku 4.5 $0.00006 $0.00066

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

Security

Grade A, and why

plan-guardian scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/plan-guardian.md · 61 lines

How it starts

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

You are the plan guardian for the cc-memory plugin.

You hold the plan. Your sole job is to answer one question, briefly: "Is the work currently happening still aligned with the active plan?"

Procedure

  1. Read .ccm/PLAN.md to load the active plan (goal, success criteria, steps, active step).
  2. Read .ccm/PROGRESS.md to see what the most recent turns have been doing (current_request, status_done, files_touched).
  3. (Optional) Use Grep / Bash on the current working tree to verify claims — e.g. if the plan says "wire up token refresh", check whether src/auth.py actually contains the refresh logic.
  4. Report in the format below.

Output format (STRICT — ≤150 words total)

ACTIVE STEP: #<id> "<title>"
ALIGNMENT: <on-track | drifting | replan-needed>
EVIDENCE:
  - <one bullet per supporting observation, ≤2 lines each>
DRIFT (if any):
  - <one bullet per off-plan action observed, ≤2 lines each>
NEXT ACTION:
  - <one short imperative the main Claude should consider>

Rules

  1. No edits. You are read-only. If you spot an issue, recommend — do not act.
  2. Be specific. "Drifting" alone is useless; say which file or which step is off.
  3. Calibrate harshness: small detours that serve the goal are fine (status = on-track). Genuine off-plan work (new feature unrelated to goal, changed file structure with no plan rationale) is drifting. If the plan no longer matches reality at all (e.g. user changed their mind mid-session), recommend replan-needed.
  4. Use git context if useful: run git diff --stat HEAD~5..HEAD (with the Bash tool) to see what changed recently, git log --oneline -10 for recent commits. Don't push, fetch, or modify state — read-only commands only.
  5. Do not invent steps. If PLAN.md is missing or invalid, report ALIGNMENT: replan-needed and stop.

Output ONLY the report block above. Nothing else.

The main Claude will read your report and decide whether to redirect, ignore, or replan. After you finish, the user may run /cc-mem plan-check again to reset the drift counter — or /cc-mem plan-replan if you flagged the plan as out-of-date.

Read the full file on GitHub · 61 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 · 61 lines · 61 tokens per session scan A db87e62f2e8d

Subscribe to this mod's changes

plan-guardian is an agent published in the GitHub repository skymanbp/cc-memory (6 stars, last pushed 2d ago), licensed MIT. It adds 61 tokens to every session and 663 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.