planning-with-files

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Planning with Files

使用文件进行规划

Work like Manus: Use persistent markdown files as your "working memory on disk."
像Manus一样工作:将持久化Markdown文件作为你的「磁盘上的工作记忆」。

Quick Start

快速开始

Before ANY complex task:
  1. Create
    task_plan.md
    in the working directory
  2. Define phases with checkboxes
  3. Update after each phase - mark [x] and change status
  4. Read before deciding - refresh goals in attention window
在执行任何复杂任务之前:
  1. 在工作目录中创建
    task_plan.md
  2. 用复选框定义阶段
  3. 完成每个阶段后更新 - 标记[x]并更改状态
  4. 做决策前阅读 - 在注意力窗口中刷新目标

The 3-File Pattern

三文件模式

For every non-trivial task, create THREE files:
FilePurposeWhen to Update
task_plan.md
Track phases and progressAfter each phase
notes.md
Store findings and researchDuring research
[deliverable].md
Final outputAt completion
对于所有非琐碎任务,创建三个文件:
文件用途更新时机
task_plan.md
跟踪阶段与进度完成每个阶段后
notes.md
存储研究发现研究过程中
[deliverable].md
最终输出完成任务时

Core Workflow

核心工作流

Loop 1: Create task_plan.md with goal and phases
Loop 2: Research → save to notes.md → update task_plan.md
Loop 3: Read notes.md → create deliverable → update task_plan.md
Loop 4: Deliver final output
循环1:创建包含目标和阶段的task_plan.md
循环2:研究 → 保存到notes.md → 更新task_plan.md
循环3:阅读notes.md → 创建交付物 → 更新task_plan.md
循环4:交付最终输出

The Loop in Detail

详细循环步骤

Before each major action:
bash
Read task_plan.md  # Refresh goals in attention window
After each phase:
bash
Edit task_plan.md  # Mark [x], update status
When storing information:
bash
Write notes.md     # Don't stuff context, store in file
执行每个主要操作前:
bash
Read task_plan.md  # 在注意力窗口中刷新目标
完成每个阶段后:
bash
Edit task_plan.md  # 标记[x],更新状态
存储信息时:
bash
Write notes.md     # 不要把内容塞进上下文,存储到文件中

task_plan.md Template

task_plan.md模板

Create this file FIRST for any complex task:
markdown
undefined
任何复杂任务都要先创建此文件:
markdown
undefined

Task Plan: [Brief Description]

Task Plan: [Brief Description]

Goal

Goal

[One sentence describing the end state]
[One sentence describing the end state]

Phases

Phases

  • Phase 1: Plan and setup
  • Phase 2: Research/gather information
  • Phase 3: Execute/build
  • Phase 4: Review and deliver
  • Phase 1: Plan and setup
  • Phase 2: Research/gather information
  • Phase 3: Execute/build
  • Phase 4: Review and deliver

Key Questions

Key Questions

  1. [Question to answer]
  2. [Question to answer]
  1. [Question to answer]
  2. [Question to answer]

Decisions Made

Decisions Made

Errors Encountered

Errors Encountered

Status

Status

Currently in Phase X - [What I'm doing now]
undefined
Currently in Phase X - [What I'm doing now]
undefined

notes.md Template

notes.md模板

For research and findings:
markdown
undefined
用于存储研究与发现:
markdown
undefined

Notes: [Topic]

Notes: [Topic]

Sources

Sources

Source 1: [Name]

Source 1: [Name]

  • URL: [link]
  • Key points:
    • [Finding]
    • [Finding]
  • URL: [link]
  • Key points:
    • [Finding]
    • [Finding]

Synthesized Findings

Synthesized Findings

[Category]

[Category]

  • [Finding]
  • [Finding]
undefined
  • [Finding]
  • [Finding]
undefined

Critical Rules

核心规则

1. ALWAYS Create Plan First

1. 始终先创建规划

Never start a complex task without
task_plan.md
. This is non-negotiable.
启动复杂任务前必须创建
task_plan.md
,这是硬性要求。

2. Read Before Decide

2. 做决策前先阅读

Before any major decision, read the plan file. This keeps goals in your attention window.
在做出任何重大决策前,阅读规划文件,确保目标始终在你的注意力范围内。

3. Update After Act

3. 行动后立即更新

After completing any phase, immediately update the plan file:
  • Mark completed phases with [x]
  • Update the Status section
  • Log any errors encountered
完成每个阶段后,立即更新规划文件:
  • 用[x]标记已完成的阶段
  • 更新「状态」部分
  • 记录遇到的所有错误

4. Store, Don't Stuff

4. 存储而非塞入

Large outputs go to files, not context. Keep only paths in working memory.
大型输出内容要存入文件,而非上下文。仅在工作记忆中保留文件路径。

5. Log All Errors

5. 记录所有错误

Every error goes in the "Errors Encountered" section. This builds knowledge for future tasks.
每个错误都要记录到「遇到的错误」部分,这将为未来任务积累知识。

When to Use This Pattern

何时使用此模式

Use 3-file pattern for:
  • Multi-step tasks (3+ steps)
  • Research tasks
  • Building/creating something
  • Tasks spanning multiple tool calls
  • Anything requiring organization
Skip for:
  • Simple questions
  • Single-file edits
  • Quick lookups
适合使用三文件模式的场景:
  • 多步骤任务(3步及以上)
  • 研究类任务
  • 构建/创作类任务
  • 需要调用多个工具的任务
  • 任何需要组织管理的任务
可跳过的场景:
  • 简单问题
  • 单文件编辑
  • 快速查询

Anti-Patterns to Avoid

需避免的反模式

Don'tDo Instead
Use TodoWrite for persistenceCreate
task_plan.md
file
State goals once and forgetRe-read plan before each decision
Hide errors and retryLog errors to plan file
Stuff everything in contextStore large content in files
Start executing immediatelyCreate plan file FIRST
不要做应该做
使用TodoWrite进行持久化创建
task_plan.md
文件
只声明一次目标就遗忘每次做决策前重新阅读规划
隐藏错误并重试将错误记录到规划文件中
把所有内容塞进上下文将大型内容存储到文件中
立即开始执行先创建规划文件

Advanced Patterns

进阶模式

See reference.md for:
  • Attention manipulation techniques
  • Error recovery patterns
  • Context optimization from Manus
See examples.md for:
  • Real task examples
  • Complex workflow patterns
查看reference.md了解:
  • 注意力管理技巧
  • 错误恢复模式
  • 来自Manus的上下文优化方案
查看examples.md了解:
  • 真实任务示例
  • 复杂工作流模式