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
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

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  # Refresh goals in attention window
每个阶段结束后:
bash
Edit task_plan.md  # Mark [x], update status
存储信息时:
bash
Write notes.md     # Don't stuff context, store in file

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了解:
  • 真实任务示例
  • 复杂工作流模式