Back to Workflow & Productivity

planning-with-files

AI workflowtask planningcode project managementpersistent contextdeveloper toolsmulti-step tasksAI assistantfile-based development
⭐ 23.4kπŸ“„ MITπŸ•’ 2026-06-16Source β†—

Install this skill

npx skills add othmanadi/planning-with-files

Works across Claude Code, Cursor, Codex, Copilot & Antigravity

The planning-with-files skill provides a structured framework for managing long-running coding and research tasks by shifting state management from the volatile agent context window to persistent files on disk. By forcing the agent to maintain specific Markdown files like task_plan.md, findings.md, and progress.md, it prevents data loss during extended sessions or complex multi-step operations. It mandates a formal protocol for handling errors, requiring agents to record failed attempts and pivot strategies after the second failure. The system treats the local filesystem as a reliable 'working memory,' ensuring that goals, research results, and incremental progress are accessible even if the AI's short-term memory buffer is exhausted or interrupted. It enforces disciplined documentation throughout the development lifecycle.

When to Use This Skill

  • β€’Building full-stack features that require multiple distinct coding phases
  • β€’Conducting deep-dive technical research on undocumented APIs
  • β€’Executing long-running refactoring tasks that span multiple sessions
  • β€’Managing complex debugging workflows that require systematic trial and error

How to Invoke This Skill

Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:

  • β€œLet's start a new project using the planning-with-files workflow
  • β€œInitialize planning files for this development task
  • β€œCreate the task_plan.md and setup the documentation structure
  • β€œI have a complex task, let's track it in the project root
  • β€œBegin the multi-step plan using the template system

Pro Tips

  • πŸ’‘Regularly commit your planning files (`task_plan.md`, `findings.md`, `progress.md`) to version control alongside your code. This creates an auditable trail of your AI's reasoning and progress, invaluable for team collaboration or revisiting old projects.
  • πŸ’‘Before executing any significant changes, review the generated `task_plan.md` carefully. Treat it as a contract with your AI, modifying it to align perfectly with your expectations and constraints. This pre-planning step minimizes costly re-dos.
  • πŸ’‘Leverage the session recovery feature by running the `session-catchup.py` script proactively after any unexpected disconnect or `/clear`. This ensures no valuable context or in-progress work is lost, allowing for seamless continuation.

What this skill does

  • β€’Synchronizes work state across sessions using automatic script-based catchup
  • β€’Forces structured tracking of project phases via standardized Markdown templates
  • β€’Mandates an error-logging protocol to prevent repetitive failed actions
  • β€’Implements a 3-strike escalation rule for stubborn technical blockers
  • β€’Requires archival of multimodal dataβ€”like browser search resultsβ€”into text files

When not to use it

  • βœ•Quick, one-shot code modifications or syntax corrections
  • βœ•Simple informational queries that do not require file generation
  • βœ•Tasks that are completed in fewer than three logical steps

Example workflow

  1. Execute the session catchup script to ensure environment consistency
  2. Generate the initial task_plan.md based on current project requirements
  3. Execute the first development phase and record results in progress.md
  4. Summarize technical findings into findings.md after tool usage
  5. Review all files at the start of every new interaction to verify state
  6. Update phase status in task_plan.md upon completion

Prerequisites

  • –Python 3 installed on the host machine
  • –Permission to create files in the active directory

Pitfalls & limitations

  • !Forgetting to update the markdown files after completing a step
  • !Overloading findings.md with redundant information instead of actionable insights
  • !Failing to execute the catchup script when returning to a dormant project

FAQ

Where should I store the planning files?
Always keep them in the root of your project directory, never inside the skill installation folder.
What happens if an action fails twice?
The protocol requires you to switch to an entirely different approach, tool, or library rather than repeating the same failed command.
Do I need to read the plan every time?
Yes, reading the plan before major decisions helps re-orient your attention window and ensures alignment with the original goals.

How it compares

Unlike standard agent interactions where context is lost or inferred, this skill forces a persistent, explicit external state that remains consistent even if the chat history is purged or a new session begins.

Source & trust

⭐ 23k starsπŸ“„ MITπŸ•’ Updated 2026-06-16
πŸ“„ Full skill instructions β€” original source: othmanadi/planning-with-files
# Planning with Files

Work like Manus: Use persistent markdown files as your "working memory on disk."

## FIRST: Check for Previous Session (v2.2.0)

**Before starting work**, check for unsynced context from a previous session:

# Linux/macOS
$(command -v python3 || command -v python) ${CLAUDE_PLUGIN_ROOT}/scripts/session-catchup.py "$(pwd)"


# Windows PowerShell
& (Get-Command python -ErrorAction SilentlyContinue).Source "$env:USERPROFILE\.claude\skills\planning-with-files\scripts\session-catchup.py" (Get-Location)


If catchup report shows unsynced context:
1. Run git diff --stat to see actual code changes
2. Read current planning files
3. Update planning files based on catchup + git diff
4. Then proceed with task

## Important: Where Files Go

- **Templates** are in ${CLAUDE_PLUGIN_ROOT}/templates/
- **Your planning files** go in **your project directory**

| Location | What Goes There |
|----------|-----------------|
| Skill directory (${CLAUDE_PLUGIN_ROOT}/) | Templates, scripts, reference docs |
| Your project directory | task_plan.md, findings.md, progress.md |

## Quick Start

Before ANY complex task:

1. **Create task_plan.md** β€” Use [templates/task_plan.md](templates/task_plan.md) as reference
2. **Create findings.md** β€” Use [templates/findings.md](templates/findings.md) as reference
3. **Create progress.md** β€” Use [templates/progress.md](templates/progress.md) as reference
4. **Re-read plan before decisions** β€” Refreshes goals in attention window
5. **Update after each phase** β€” Mark complete, log errors

> **Note:** Planning files go in your project root, not the skill installation folder.

## The Core Pattern

Context Window = RAM (volatile, limited)
Filesystem = Disk (persistent, unlimited)

β†’ Anything important gets written to disk.


## File Purposes

| File | Purpose | When to Update |
|------|---------|----------------|
| task_plan.md | Phases, progress, decisions | After each phase |
| findings.md | Research, discoveries | After ANY discovery |
| progress.md | Session log, test results | Throughout session |

## Critical Rules

### 1. Create Plan First
Never start a complex task without task_plan.md. Non-negotiable.

### 2. The 2-Action Rule
> "After every 2 view/browser/search operations, IMMEDIATELY save key findings to text files."

This prevents visual/multimodal information from being lost.

### 3. Read Before Decide
Before major decisions, read the plan file. This keeps goals in your attention window.

### 4. Update After Act
After completing any phase:
- Mark phase status: in_progress β†’ complete
- Log any errors encountered
- Note files created/modified

### 5. Log ALL Errors
Every error goes in the plan file. This builds knowledge and prevents repetition.

## Errors Encountered
| Error | Attempt | Resolution |
|-------|---------|------------|
| FileNotFoundError | 1 | Created default config |
| API timeout | 2 | Added retry logic |


### 6. Never Repeat Failures
if action_failed:
next_action != same_action

Track what you tried. Mutate the approach.

## The 3-Strike Error Protocol

ATTEMPT 1: Diagnose & Fix
β†’ Read error carefully
β†’ Identify root cause
β†’ Apply targeted fix

ATTEMPT 2: Alternative Approach
β†’ Same error? Try different method
β†’ Different tool? Different library?
β†’ NEVER repeat exact same failing action

ATTEMPT 3: Broader Rethink
β†’ Question assumptions
β†’ Search for solutions
β†’ Consider updating the plan

AFTER 3 FAILURES: Escalate to User
β†’ Explain what you tried
β†’ Share the specific error
β†’ Ask for guidance


## Read vs Write Decision Matrix

| Situation | Action | Reason |
|-----------|--------|--------|
| Just wrote a file | DON'T read | Content still in context |
| Viewed image/PDF | Write findings NOW | Multimodal β†’ text before lost |
| Browser returned data | Write to file | Screenshots don't persist |
| Starting new phase | Read plan/findings | Re-orient if context stale |
| Error occurred | Read relevant file | Need current state to fix |
| Resuming after gap | Read all planning files | Recover state |

## The 5-Question Reboot Test

If you can answer these, your context management is solid:

| Question | Answer Source |
|----------|---------------|
| Where am I? | Current phase in task_plan.md |
| Where am I going? | Remaining phases |
| What's the goal? | Goal statement in plan |
| What have I learned? | findings.md |
| What have I done? | progress.md |

## When to Use This Pattern

**Use for:**
- Multi-step tasks (3+ steps)
- Research tasks
- Building/creating projects
- Tasks spanning many tool calls
- Anything requiring organization

**Skip for:**
- Simple questions
- Single-file edits
- Quick lookups

## Templates

Copy these templates to start:

- [templates/task_plan.md](templates/task_plan.md) β€” Phase tracking
- [templates/findings.md](templates/findings.md) β€” Research storage
- [templates/progress.md](templates/progress.md) β€” Session logging

## Scripts

Helper scripts for automation:

- scripts/init-session.sh β€” Initialize all planning files
- scripts/check-complete.sh β€” Verify all phases complete
- scripts/session-catchup.py β€” Recover context from previous session (v2.2.0)

## Advanced Topics

- **Manus Principles:** See [reference.md](reference.md)
- **Real Examples:** See [examples.md](examples.md)

## Anti-Patterns

| Don't | Do Instead |
|-------|------------|
| Use TodoWrite for persistence | Create task_plan.md file |
| State goals once and forget | Re-read plan before decisions |
| Hide errors and retry silently | Log errors to plan file |
| Stuff everything in context | Store large content in files |
| Start executing immediately | Create plan file FIRST |
| Repeat failed actions | Track attempts, mutate approach |
| Create files in skill directory | Create files in your project |

How to Use This Skill Unit

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/skills/planning-with-files/
  3. Save the file as SKILL.md
  4. The agent will automatically discover the skill based on its description.

Option B: Global Installation (All Agents)

Save the file to these locations to make it available across all projects:

  • Claude Code: ~/.claude/skills/othmanadi/planning-with-files/planning-with-files/SKILL.md
  • Cursor: ~/.cursor/skills/othmanadi/planning-with-files/planning-with-files/SKILL.md
  • Antigravity: ~/.gemini/antigravity/skills/othmanadi/planning-with-files/planning-with-files/SKILL.md

πŸš€ Install with CLI:
npx skills add othmanadi/planning-with-files

Read the Master Guide: Mastering Agent Skills β†’

Recommended Rules

View more rules β†’

Recommended Workflows

View more workflows β†’

Recommended MCP Servers

View more MCP servers β†’

Take It Further

Maximize your productivity with these powerful resources

πŸ“‹

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
πŸ“–

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide

How to use this Skill in Claude Code & Cursor

For Claude Code (CLI)

To use this skill in Claude Code, copy the rule content into your project's custom instructions or follow our Add-Skill CLI guide. This ensures Claude follows your standards during every code generation.

For Cursor & Windsurf

For Cursor or Windsurf, individual skills are best used in the "Rules for AI" section. This specific unit helps the agent avoid workflow & productivity issues, leading to cleaner, more efficient code.

Why the skill format matters: the standardized Agent Skills format lets your AI agent load detailed instructions only when they are relevant, keeping your prompt clean while improving results.

Source & attribution

This skill is categorized under Workflow & Productivity and is published by othmanadi, maintained in othmanadi/planning-with-files.

← Browse All Agent Skills
Sponsored AI assistant. Recommendations may be paid.