# Planning with Files

> Keeps the agent's plan in three markdown files on disk, so /clear doesn't erase it

- Category: Agents & Automation / Agent Skills & Plugins
- Language: Shell
- Licence: MIT
- Repository: https://github.com/OthmanAdi/planning-with-files
- Website: https://www.skills.sh/othmanadi/planning-with-files/planning-with-files
- Canonical page: https://ai-tldr.dev/tools/planning-with-files/

## In short

Planning with Files is an agent skill for coding agents and long-running agent tasks. It keeps three markdown files on disk — task_plan.md, findings.md and progress.md — and uses lifecycle hooks to inject the relevant planning context back into the conversation each turn. It sits in the Agent Skills & Plugins category of the Agents & Automation tools and is open-source, written in Shell and licensed MIT.

## Overview

Planning with Files is an agent skill for coding agents and long-running agent tasks. It keeps three markdown files on disk — task_plan.md, findings.md and progress.md — and uses lifecycle hooks to inject the relevant planning context back into the conversation each turn. The plan therefore outlives the context window: it survives /clear, compaction and crashes, because it was never only in context to begin with.

The design choice the project leans on is that a hook is not a prompt. A skill the model is asked to consult is something it may or may not consult; a UserPromptSubmit hook that writes a ===BEGIN PLAN DATA=== block from task_plan.md into context fires regardless. The same mechanism doubles as a defence against context rot on long tasks, where the original plan drifts out of the model's effective attention well before it drops out of the window.

Recovery reads project files only. Reading same-project local agent session records — for aggregate counts or bounded replay — requires an explicit catchup mode rather than happening by default. The project publishes its own evaluation numbers in docs/evals.md, including a 96.7% assertion pass rate (29/30) and 3 of 3 blind A/B wins; a historical internal benchmark measured recovery in 5.0 turns with the files on disk against 13.3 for a raw agent, though that figure predates the current project-files-only default and the README flags it as historical evidence rather than a fresh measurement. It installs across 60+ agents through the Agent Skills standard, with native plugins for Claude Code, Codex CLI, Pi and Hermes Agent.

## What it does

- Three plan files on disk — task_plan.md, findings.md, progress.md — that outlive the context window
- Lifecycle hooks re-inject selected planning context every turn, rather than relying on the model choosing to re-read the plan
- Automatic session recovery after /clear, compaction or a crash, reading project files only; transcript catchup is an explicit opt-in mode
- A deterministic completion gate, plus /plan and /plan-doctor slash commands on the plugin routes
- Installs on 60+ agents via the Agent Skills standard, with native plugins for Claude Code, Codex CLI, Pi and Hermes Agent
- Published evaluations in docs/evals.md: 96.7% assertion pass rate (29/30), 3 of 3 blind A/B wins, 706-test suite

## Getting started

Install routes differ in what they ship. Only the plugin routes register hooks — and the hooks are the mechanism that makes this different from a plain prompt — so prefer a plugin route if you can, then verify.

1. Claude Code (plugin route — skill, hooks and slash commands)

   The fullest install: ships the skill, the lifecycle hooks and the slash commands.

```text
/plugin marketplace add OthmanAdi/planning-with-files
/plugin install planning-with-files@planning-with-files
```

2. Any other agent, via the Agent Skills standard

   One line, 60+ agents. This lands the skill and its frontmatter hooks; see the note below about hook registration.

```bash
npx skills add OthmanAdi/planning-with-files --skill planning-with-files -g
```

3. Pin a version, or install into Pi / Hermes

   The npm package carries SKILL.md, scripts/ and templates/, for vendoring a pinned version into a repo; on its own it does not register hooks. Pi and Hermes Agent have native routes that do.

```bash
npm install planning-with-files

# Pi Coding Agent — same package, wired up
pi install npm:planning-with-files

# Hermes Agent (Nous Research)
hermes skills install OthmanAdi/planning-with-files/.hermes/skills/planning-with-files --yes
hermes plugins install OthmanAdi/planning-with-files/.hermes/plugins/planning-with-files
hermes plugins enable planning-with-files
```

4. Use it, and verify the hooks fired

   Type /plan on the plugin routes, or just ask the agent to plan the task — the skill also self-triggers on multi-step work. Skill-route installs can end up silently hook-less if project trust was not accepted or frontmatter hooks did not register, so run /plan-doctor to check.

```text
/plan
/plan-doctor
```

## When to use it

- Resume a long refactor after /clear or a compaction without restating the goal or rediscovering finished work
- Run a multi-hour or overnight agent task where the plan must outlive many context resets
- Coordinate an orchestrator with workers or subagents against a shared plan on disk
- Keep an agent anchored to its original plan on long tasks, where the plan would otherwise drift out of effective attention
