Deep Planner
A planning, execution, and self-reflection protocol for complex agent tasks.
How It Works
The TodoList exists in two places simultaneously:
- - In the reply — visible to the user, updated as steps complete
- In
.todolist/ — persisted to disk, recoverable if context is truncated
Both stay in sync. The file is the backup; the conversation is the live view.
Execution Protocol
Step 0 — Resume or Start Fresh
Before anything else, check for interrupted tasks:
CODEBLOCK0
Step 1 — Parse the Request (internal, not shown to user)
Before generating a plan, resolve the following internally:
CODEBLOCK1
Only stop to ask about blockers — not details you can reasonably infer.
Consolidate all questions into a single message. Do not ask one at a time.
Step 2 — Generate the TodoList
Once the request is clear, output the plan and write it to disk simultaneously.
Format shown in the reply:
CODEBLOCK2
Write to disk at .todolist/YYYYMMDD-{task-name}.md using the file format below.
Step 3 — Execute Step by Step
Work through the TodoList in order. After each step completes:
- 1. Open the next reply with a status update — mark the step INLINECODE2
- Briefly describe what was produced (1–2 sentences)
- Update the file to reflect the new state
- Proceed to the next step
Reply header format (concise):
CODEBLOCK3
Pause and ask the user when:
- - A step is marked ❓ (critical information is missing)
- Reality diverges significantly from the plan and replanning is needed
- A tool call fails and there are multiple recovery paths to choose from
Step 4 — Wrap Up
When all steps are done:
- 1. Show the fully checked-off TodoList in the reply
- Run the post-completion reflection check (see below)
- Update the file: set
status: completed — leave the file in place, do not delete
Confidence Levels
Only annotate when uncertain. Do not label every step.
| Mark | Meaning | Action |
|---|
| (default) | Confident, proceed | Execute directly |
| ⚠️ |
May involve inference or outdated info | Execute, flag uncertainty in output |
| ❓ | Critical info missing | Pause, ask the user, then continue |
Post-Completion Reflection
Run internally after all steps finish. Only surface issues that actually exist.
CODEBLOCK4
If issues exist, append to the final reply:
> ⚠️ Note: {X} is based on inference — consider verifying {specific thing}.
Anti-Hallucination Rules
These constraints are non-negotiable:
- 1. No fabricated data — statistics, market figures, and research findings must have a source, or be explicitly labeled as estimates
- No fabricated citations — do not reference papers, reports, or news articles that may not exist
- Flag time-sensitive claims — anything described as "latest", "current", or "now" must note the knowledge cutoff date or recommend the user verify with a live search
- Be honest about limits — if a task is out of scope, say so clearly rather than producing low-confidence output
File Format
Path: INLINECODE4
CODEBLOCK6
Task Type Templates
For common task types, load the matching template from the reference file:
| Task Type | Reference |
|---|
| Research & analysis | INLINECODE5 |
| Content creation (articles, posts) |
references/task-types.md#content |
| Technical design |
references/task-types.md#technical |
| Data processing |
references/task-types.md#data |
| Multi-skill pipelines |
references/task-types.md#multi-skill |
Skill Coordination
This is a meta-skill. It plans and monitors; domain skills do the work.
CODEBLOCK7
Do not perform content generation, file operations, or network requests inside this skill. Delegate those to the appropriate tools and skills.
深度规划器
用于复杂智能体任务的规划、执行与自我反思协议。
工作原理
任务清单同时存在于两个位置:
- - 在回复中 — 对用户可见,随步骤完成实时更新
- 在.todolist/目录中 — 持久化存储至磁盘,上下文截断时可恢复
两者保持同步。文件是备份;对话是实时视图。
执行协议
第0步 — 恢复或重新开始
在执行任何操作前,检查是否有中断的任务:
扫描.todolist/目录,查找状态为进行中的文件
找到 → 读取文件,向用户展示当前状态,询问:继续还是重新开始?
未找到 → 进入第1步
第1步 — 解析请求(内部执行,不向用户展示)
在生成计划前,内部解决以下问题:
□ 核心目标是什么?(一句话概括)
□ 最终交付物是什么?(报告/代码/内容/操作序列/...)
□ 需要哪些工具或技能?(网络搜索/浏览器/代码执行/...)
□ 是否存在会导致完全不同执行路径的歧义?
是 → 先询问用户,再生成任务清单
否 → 做出合理假设,并在计划的假设模块中记录
仅在遇到阻碍时询问用户——而非你可以合理推断的细节。
将所有问题合并为一条消息。不要逐个提问。
第2步 — 生成任务清单
请求明确后,同时输出计划并写入磁盘。
回复中显示的格式:
markdown
📋 任务计划:{简短任务名称}
目标: {最终交付物的一行描述}
步骤数: {N}
- - [ ] 1. {步骤描述} {工具或技能}
- [ ] 2. {步骤描述} {工具或技能}
- [ ] 3. {步骤描述} 内部推理
- [ ] ...
💡 假设:{未经用户确认而做出的任何假设}
开始第1步 →
写入磁盘至.todolist/YYYYMMDD-{任务名称}.md,使用下方文件格式。
第3步 — 逐步执行
按顺序执行任务清单。每完成一步后:
- 1. 在下一个回复开头更新状态——将步骤标记为[x]
- 简要描述产出了什么(1-2句话)
- 更新文件以反映新状态
- 继续下一步
回复标题格式(简洁):
✅ 第2步完成 → 开始第3步...
在以下情况暂停并询问用户:
- - 某步骤标记为❓(关键信息缺失)
- 实际情况与计划严重偏离,需要重新规划
- 工具调用失败,且存在多个恢复路径可供选择
第4步 — 收尾
所有步骤完成后:
- 1. 在回复中展示完全勾选的任务清单
- 执行完成后的反思检查(见下文)
- 更新文件:设置status: completed — 保留文件,不删除
置信度标记
仅在不确定时标注。不要标记每一步。
可能涉及推断或过时信息 | 执行,在输出中标明不确定性 |
| ❓ | 关键信息缺失 | 暂停,询问用户,然后继续 |
完成后的反思
所有步骤完成后内部执行。仅呈现实际存在的问题。
□ 核心目标是否实现?
□ 我是否陈述了相信但未验证的内容? → 标记出来
□ 是否有⚠️步骤的结论需要附加说明?
□ 交付物是否完整,无遗漏?
如果存在问题,追加到最终回复中:
⚠️ 注意:{X}基于推断——建议验证{具体内容}。
反幻觉规则
以下约束不可协商:
- 1. 不编造数据 — 统计数据、市场数据和研究结果必须有来源,或明确标注为估算值
- 不编造引用 — 不引用可能不存在的论文、报告或新闻文章
- 标记时效性声明 — 任何描述为最新、当前或现在的内容必须注明知识截止日期,或建议用户通过实时搜索验证
- 诚实面对限制 — 如果任务超出范围,明确说明,而不是生成低置信度的输出
文件格式
路径:.todolist/YYYYMMDD-{任务名称}.md
markdown
{任务名称}
创建时间:YYYY-MM-DD HH:MM
状态:进行中 | 已完成
目标
{最终交付物的一行描述}
任务清单
- - [x] 1. {已完成步骤}
- [x] 2. {已完成步骤}
- [ ] 3. {当前步骤} ← 当前
- [ ] 4. {后续步骤}
假设与确认
- - 假设:{未经用户确认而推断的内容}
- 已确认:{用户明确回答的内容}
进度
{已完成}/{总计} 步骤完成
任务类型模板
对于常见任务类型,从参考文件中加载匹配的模板:
| 任务类型 | 参考 |
|---|
| 研究与分析 | references/task-types.md#research |
| 内容创作(文章、帖子) |
references/task-types.md#content |
| 技术设计 | references/task-types.md#technical |
| 数据处理 | references/task-types.md#data |
| 多技能流水线 | references/task-types.md#multi-skill |
技能协调
这是一个元技能。它负责规划与监控;领域技能负责执行具体工作。
用户请求
→ [深度规划器] 解析 + 规划 + 将任务清单写入磁盘
→ [网络搜索/浏览器] 信息收集步骤
→ [领域技能A] 内容或处理步骤
→ [领域技能B] 平台特定步骤
→ [深度规划器] 反思 + 将文件标记为已完成
不要在此技能内执行内容生成、文件操作或网络请求。将这些任务委托给适当的工具和技能。