planarchive

planarchive is a command for Claude Code from TheWayWithin/agent-11. It costs 18 tokens per session (6,471 once invoked), scanned A, original, MIT.

A command that moves completed or outdated material from project-plan.md and progress.md into archive files. It uses content meaning, size, and duplication to decide what should leave the active tracking files.

In plain words
What is it for?
Use it to archive finished phases, old entries, resolved issues, and duplicated content, with summaries of what was moved.
Why use it?
It keeps current project plans shorter and easier for an agent to read while preserving the historical record. It also reduces repeated information between tracking files.

Command for Claude Code

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 commands/thewaywithin/agent-11/planarchive
Clone the repo
git clone --depth 1 https://github.com/TheWayWithin/agent-11

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for planarchive

README.md
[![agentmods](https://agentmods.dev/badge/commands/thewaywithin/agent-11/planarchive.svg)](https://agentmods.dev/commands/thewaywithin/agent-11/planarchive)
Your own site
<a href="https://agentmods.dev/commands/thewaywithin/agent-11/planarchive"><img src="https://agentmods.dev/badge/commands/thewaywithin/agent-11/planarchive.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,471 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.1 $0.00018 $0.06471
Opus 5 $0.00009 $0.03236
Sonnet 5 $0.00004 $0.01294
Haiku 4.5 $0.00002 $0.00647

Measured today against content hash 0a89774c1202, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

planarchive 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 today.

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.

.claude/commands/planarchive.md · 835 lines

How it starts

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

PLAN ARCHIVE COMMAND 📦

Command: /planarchive [options]

Purpose: Intelligently archive completed/stale content from tracking files using semantic analysis, size-based triggers, and duplication detection to keep them lean and token-efficient while preserving full historical record.

WHAT IS PLANARCHIVE?

PlanArchive is an intelligent content manager that uses semantic analysis to understand what content is truly active vs completed. It moves completed phases, old entries, and resolved issues from active tracking files (project-plan.md, progress.md) to archive files. This reduces token overhead when agents read these files while preserving complete project history.

Key Innovation: Unlike simple date-based archival, PlanArchive understands completion status, recognizes duplicated content, and generates summaries automatically.

KEY FEATURES

  • Semantic Analysis: Understands completion status, dates, and section hierarchy
  • Size-Based Triggers: Automatically archives large completed sections
  • Duplication Detection: Identifies content duplicated across tracking files
  • Smart Summaries: Auto-generates concise summaries of archived content
  • User Control: Multiple modes (aggressive, analyze, target-based)
  • Token Optimization: Reports estimated token savings
  • Safe Archival: Preserves all content in archive files (reversible)

USAGE

# Interactive mode - analyze and confirm
/planarchive

# Analyze mode - see what WOULD be archived with reasoning
/planarchive --analyze

# Aggressive mode - archive ALL completed work regardless of age
/planarchive --aggressive

# Target size mode - archive until reaching specific line count
/planarchive --target-lines=1200

# Check for duplicates across tracking files
/planarchive --check-duplicates

# Archive entries older than 7 days (default: 14)
/planarchive --days=7

# Dry run - preview without making changes
/planarchive --dry-run

# Force mode - no confirmation prompts
/planarchive --force

# Archive only progress.md
/planarchive --progress-only

# Archive only project-plan.md
/planarchive --plan-only

# Disable summary generation (keep full content)
/planarchive --no-summaries

Read the full file on GitHub · 835 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. today First seen · 835 lines · 18 tokens per session scan A 0a89774c1202

Subscribe to this mod's changes

planarchive is a command published in the GitHub repository TheWayWithin/agent-11 (15 stars, last pushed 13d ago), licensed MIT. It adds 18 tokens to every session and 6,471 once invoked, about $0.0001 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-09-04.