Planning with Files
Claude Code skill implementing Manus-style persistent markdown planning β the workflow pattern behind the $2B acquisition.
Overview
Work like Manus β the AI agent company Meta acquired for $2 billion.
This skill transforms your workflow to use persistent markdown files for planning, progress tracking, and knowledge storage. It implements the exact context engineering pattern that made Manus worth billions in just 8 months.
The Problem
Claude Code (and most AI agents) suffer from:
- Volatile memory β TodoWrite tool disappears on context reset
- Goal drift β After 50+ tool calls, original goals get forgotten
- Hidden errors β Failures aren't tracked, so the same mistakes repeat
- Context stuffing β Everything crammed into context instead of stored
The Solution: 3-File Pattern
For every complex task, create THREE files:
task_plan.md β Track phases and progress
findings.md β Store research and findings
progress.md β Session log and test results
The Core Principle
Context Window = RAM (volatile, limited)
Filesystem = Disk (persistent, unlimited)
β Anything important gets written to disk.
Key Features
Session Recovery (v2.2.0+)
When your context window fills up and you run /clear, this skill automatically recovers unsynced work from your previous session.
Optimal Workflow:
- Disable auto-compact in Claude Code settings (use full context window)
- Start a fresh session in your project
- Run
/planning-with-fileswhen ready to work on a complex task - Work until context fills up (Claude will warn you)
- Run
/clearto start fresh - Run
/planning-with-filesagain β it will automatically recover where you left off
Hook System
The skill uses three powerful hooks:
- PreToolUse Hook β Re-reads
task_plan.mdbefore major decisions - PostToolUse Hook β Reminds you to update status after file writes
- Stop Hook β Verifies completion before stopping
Cross-IDE Support
Fully supported on:
- β Claude Code (Plugin + SKILL.md)
- β Cursor (Rules)
- β Kilo Code (Rules)
- β OpenCode (Personal/Project Skill)
- β Codex (Personal Skill)
Quick Start
Installation
/plugin marketplace add OthmanAdi/planning-with-files
/plugin install planning-with-files@planning-with-files
Basic Usage
Once installed, Claude will automatically:
- Create
task_plan.mdbefore starting complex tasks - Re-read plan before major decisions (via PreToolUse hook)
- Remind you to update status after file writes (via PostToolUse hook)
- Store findings in
findings.mdinstead of stuffing context - Log errors for future reference
- Verify completion before stopping (via Stop hook)
Or invoke manually with /planning-with-files.
Key Rules
- Create Plan First β Never start without
task_plan.md - The 2-Action Rule β Save findings after every 2 view/browser operations
- Log ALL Errors β They help avoid repetition
- Never Repeat Failures β Track attempts, mutate approach
File Structure
For each complex task:
task_plan.md β Phases with checkboxes, progress tracking
findings.md β Research results, discoveries, important notes
progress.md β Session logs, test results, error history
The Manus Principles
| Principle | Implementation |
|---|---|
| Filesystem as memory | Store in files, not context |
| Attention manipulation | Re-read plan before decisions (hooks) |
| Error persistence | Log failures in plan file |
| Goal tracking | Checkboxes show progress |
| Completion verification | Stop hook checks all phases |
When to Use
Use this pattern for:
- Multi-step tasks (3+ steps)
- Research tasks
- Building/creating projects
- Tasks spanning many tool calls
Skip for:
- Simple questions
- Single-file edits
- Quick lookups
Use Cases
Complex Feature Development
Break down features into phases, track progress, and maintain context across sessions:
## Phase 1: Design
- [ ] Create architecture diagram
- [ ] Define API contracts
- [ ] Plan data model
## Phase 2: Implementation
- [ ] Implement core features
- [ ] Write tests
- [ ] Handle edge cases
## Phase 3: Testing
- [ ] Unit tests
- [ ] Integration tests
- [ ] Manual testing
Research Projects
Store findings systematically instead of losing them in context:
# Findings: AI Agent Architectures
## Key Resources
- [Paper] Agentic Workflows (Andrew Ng)
- [Repo] LangGraph examples
- [Tool] Claude Code skills
## Discoveries
- Multi-agent systems require careful orchestration
- State management is critical
- Tool calling needs explicit schemas
Session Recovery
Pick up where you left off even after context clears:
## Last Session Summary
Completed: Phase 1 & Phase 2
In Progress: Phase 3 (unit tests at 80%)
Next: Integration tests
## Recovered Context
From conversation after last plan update:
- Discussed edge case handling
- Decided on retry logic for API calls
- User provided feedback on test coverage
Technical Details
Template System
The skill includes customizable templates for:
task_plan.mdβ Planning document structurefindings.mdβ Research notes formatprogress.mdβ Session logging format
Helper Scripts
init-session.shβ Creates initial planning filescheck-complete.shβ Verifies all phases are done
IDE Integration
Each IDE has optimized installation:
- Claude Code: Plugin manifest + SKILL.md
- Cursor:
.cursor/rules/planning-with-files.md - Kilo Code:
.kilocode/rules/planning-with-files.md - OpenCode:
.opencode/directory setup - Codex:
.codex/installation guide
Best Practices
Planning
- Start with a clear goal
- Break into logical phases
- Use checkboxes for tracking
- Add acceptance criteria
Execution
- Update
progress.mdafter significant actions - Store findings in
findings.mdnot in context - Log errors with context
- Re-read plan before major decisions
Session Management
- Use
/clearwhen context fills up - Run
/planning-with-filesin new sessions - Review previous
progress.mdbefore starting - Archive completed projects
Limitations
- Requires manual file creation (hooks don't auto-create)
- Initial setup takes 1-2 minutes
- Needs discipline to maintain files
- Best for complex tasks, overkill for simple ones
Related Skills
- Agent workflow management
- Context engineering techniques
- Knowledge management systems
- Project planning and tracking
Example Workflow
User Request
Build a REST API for a todo app
Skill Response
Creates task_plan.md:
# TODO API Development
## Phase 1: Design
- [ ] Define endpoints (CRUD)
- [ ] Design data model
- [ ] Plan authentication
## Phase 2: Implementation
- [ ] Set up Express server
- [ ] Implement routes
- [ ] Add validation
- [ ] Connect database
## Phase 3: Testing
- [ ] Write unit tests
- [ ] Test API endpoints
- [ ] Handle errors
After 20 tool calls, context fills up:
User runs /clear
New session starts, runs /planning-with-files:
Recovered from previous session:
- Phase 1: β
Complete
- Phase 2: β³ In Progress (Express setup done, routes started)
- Phase 3: β Not started
Last context before reset:
- Working on route implementation
- Just added validation middleware
- Need to complete PUT /:id endpoint
User: "Continue where we left off"
Claude reads plan, resumes from Phase 2...
Community Impact
- 9,700+ GitHub stars
- 858 forks
- Featured in AI agent communities
- Used by teams worldwide
- Forked and customized for various workflows
License
MIT License β feel free to use, modify, and distribute.
Author: Ahmad Othman Ammar Adi
