prompt
FreeFilesystem as memory, context as cache — a prompt for long-horizon AI task planning
FreeFree tier
About prompt
A detailed prompt pattern for building a persistent-file planning agent designed for long-horizon, multi-step tasks. The prompt instructs the AI to treat the filesystem as durable working memory and the context window as volatile cache, using three mandatory Markdown files (task_plan.md, findings.md, progress.md) to track goals, discoveries, and session logs. It includes strict update schedules, fallback procedures for critical errors, and structured schemas for each file. Popularized by the Manus agent (acquired for ~$2B) and the OthmanAdi/planning-with-files Claude Code skill (21k+ stars).
Key Features
Treats filesystem as durable working memory and context window as volatile cache
Mandatory creation of three Markdown files: task_plan.md, findings.md, progress.md
Structured schemas for goals, phases, decisions, errors, discoveries, and session logs
Autosave after every action to persist decisions and discoveries
Strict update schedule (append-only for progress.md, overwrite for task_plan.md and findings.md after phases)
Fallback error tolerance with retry logic and critical error procedures
Context window management: drop stale content but keep retrievable on disk
Supports images and PDFs as discoveries in findings.md
Compatible with any system capable of file I/O (Claude Code, Manus, etc.)
Pros & Cons
Pros
- Enables persistent state across sessions by using filesystem as durable memory
- Reduces context window overload by offloading old information to disk
- Structured Markdown schemas provide clear and organized documentation
- Fault-tolerant with explicit error handling and fallback procedures
- Community-tested pattern with proven adoption (Manus, 21k+ stars on planning-with-files)
- Open source and free to use with any AI tool that supports file I/O
Cons
- Requires the AI to have file system access and the ability to create/read/write files
- Overkill for simple, single-step tasks that don't need persistent tracking
- Not a standalone application; it's a prompt that must be paired with a compatible AI agent
- Manual file management can be cumbersome if not automated
- Limited to text-based Markdown; not suitable for binary or structured data storage
Best For
Multi-step research projects requiring thorough documentation and traceabilityAI-driven software development with persistent task planning across sessionsLong-horizon agent workflows where context window limits are a concernAutomated data collection and analysis with structured loggingIterative problem-solving in environments with intermittent connectivityEducational AI experiments demonstrating memory management patterns
FAQ
What is the Persistent-File Planning Agent prompt?
It is a detailed system prompt designed for AI agents that need to handle long-horizon, multi-step tasks. It instructs the agent to use three Markdown files (task_plan.md, findings.md, progress.md) as persistent working memory, treating the filesystem as durable storage and the context window as volatile cache.
How do I use this prompt?
Copy the entire prompt from the GitHub repository (ai-boost/awesome-prompts) and provide it to an AI agent that supports file I/O operations (e.g., Claude Code, Manus). The agent will automatically create the three required files when starting a complex task.
What files are required by this prompt?
Three Markdown files are mandatory for any non-trivial task: task_plan.md (goal, phases, decisions, errors), findings.md (discoveries, facts, URLs, images), and progress.md (session log, errors, tests run).
Is this prompt free to use?
Yes, it is open source and hosted on GitHub under the ai-boost/awesome-prompts repository. You can use, modify, and distribute it freely.