todo-task-run
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTarget TODO file: $ARGUMENTS
目标TODO文件:$ARGUMENTS
Usage
使用方法
/todo-task-run <file_path>/todo-task-run <file_path>Arguments
参数
- (required): Path to the TODO file to execute
file_path
- (必填):要执行的TODO文件路径
file_path
📋 Development Rules
📋 开发规则
🚨 Guardrails (Prohibited Actions)
🚨 防护规则(禁止操作)
CRITICAL - Forward-Only Policy:
- ❌ NEVER use ,
git reset,git restore, or any rollback commandsgit revert - ✅ Always move forward: Fix errors with new changes, not by undoing previous ones
重要 - 仅向前推进原则:
- ❌ 禁止使用、
git reset、git restore或任何回滚命令git revert - ✅ 始终向前推进:通过新的修改修复错误,而非撤销之前的操作
Task Completion Procedure
任务完成流程
IMPORTANT: When completing a task, be sure to follow these steps:
- Update checkbox immediately after task execution - Change to
- [ ]to mark completion- [x] - Document related files - List names of created/modified files
重要提示:完成任务时,请务必遵循以下步骤:
- 任务执行后立即更新复选框 - 将改为
- [ ]以标记完成- [x] - 记录相关文件 - 列出创建/修改的文件名
📚 Reference Documentation
📚 参考文档
- todo-task-planning skill
- key-guidelines skill
- todo-task-planning 技能
- key-guidelines 技能
Core Guidelines
核心准则
Before starting any task, read and follow
/key-guidelines在开始任何任务之前,请阅读并遵循
/key-guidelinesCommand Overview
命令概述
The command is designed as a generic task runner - it takes a pre-existing TODO.md file and systematically executes ALL tasks defined within it until completion.
/todo-task-run/todo-task-runRole and Responsibility
角色与职责
- Complete Execution: Execute ALL tasks in TODO.md sequentially until every task is marked
- [x] - Progress Management: Orchestrate task execution, manage progress, and coordinate the overall workflow
- Continuous Operation: Continue executing tasks until completion or blocker - NEVER stop prematurely
- Not for planning: This command does NOT create tasks or convert requirements into actionable items
- Task planning: Use to convert requirements into a structured TODO.md before using this command
/todo-task-planning - Task Runner Focus: Act as a task runner, delegating individual work to subagents as much as possible
- 完整执行:按顺序执行TODO.md中的所有任务,直至每个任务都标记为
- [x] - 进度管理:编排任务执行、管理进度并协调整体工作流
- 持续运行:持续执行任务直至完成或遇到阻塞——绝不提前停止
- 不负责规划:此命令不创建任务,也不将需求转化为可执行项
- 任务规划:使用将需求转化为结构化的TODO.md后,再使用此命令
/todo-task-planning - 专注任务运行:作为任务运行器,尽可能将具体工作委托给子代理
Execution Guarantee
执行保证
This command guarantees:
- ✅ Every task will be executed in sequential order
- ✅ No tasks will be skipped unless explicitly blocked
- ✅ Session continues until all tasks are complete or a blocker is encountered
- ✅ Incomplete tasks will NOT be left unfinished without user awareness
此命令保证:
- ✅ 所有任务将按顺序执行
- ✅ 除非明确阻塞,否则不会跳过任何任务
- ✅ 会话将持续到所有任务完成或遇到阻塞
- ✅ 未完成的任务不会在用户不知情的情况下遗留
Relationship with todo-task-planning
与todo-task-planning的关系
- Planning phase (): Analyze requirements → Create TODO.md with actionable tasks
/todo-task-planning - Execution phase (this command): Orchestrate task execution → Manage progress → Integrate completion status → Coordinate overall workflow
- 规划阶段():分析需求 → 创建包含可执行任务的TODO.md
/todo-task-planning - 执行阶段(此命令):编排任务执行 → 管理进度 → 整合完成状态 → 协调整体工作流
Command Invocation
命令调用
/todo-task-run TODO.md/todo-task-run TODO.mdProcessing Flow
处理流程
⚠️ CRITICAL EXECUTION POLICY:
This command MUST execute ALL tasks in TODO.md sequentially, completing every task:
- ✅ Execute tasks one by one in the order they appear
- ✅ After each task completion, check for remaining incomplete tasks
- ✅ Continue executing until ALL tasks are marked
- [x] - ❌ NEVER end the session while incomplete tasks remain
- ❌ NEVER skip tasks unless explicitly blocked
Session Continuation Rule:
The session ONLY ends when ONE of these conditions is met:
- ✅ All tasks in TODO.md are marked (complete)
- [x] - 🚧 A task is blocked and requires user intervention
- ❌ An unrecoverable error occurs
⚠️ 重要执行策略:
此命令必须按顺序执行TODO.md中的所有任务,完成每一项任务:
- ✅ 按出现顺序逐个执行任务
- ✅ 每个任务完成后,检查剩余未完成任务
- ✅ 持续执行直至所有任务标记为
- [x] - ❌ 未完成任务存在时,绝不结束会话
- ❌ 除非明确阻塞,否则绝不跳过任务
Prerequisites
会话延续规则
Input Contract
—
This command expects a TODO.md file with the following format:
- Tasks must be written as markdown checkboxes (for incomplete,
- [ ]for complete)- [x] - The file should contain actionable task items
- No strict schema validation is required - the command adapts to your task structure
仅当满足以下条件之一时,会话才会结束:
- ✅ TODO.md中的所有任务都标记为(已完成)
- [x] - 🚧 任务被阻塞,需要用户干预
- ❌ 发生无法恢复的错误
Initial Setup (Using Task Tool)
前提条件
—
输入约定
- Read TODO.md file specified in $ARGUMENTS
- Classify each task by subagent type:
- Scan task descriptions for keywords (explore, investigate, implement, etc.)
- Pre-determine subagent type for each task based on Subagent Classification Rules
- Identify task dependencies (which tasks need results from previous tasks)
- Log classification results for transparency
此命令期望TODO.md文件符合以下格式:
- 任务必须以Markdown复选框形式编写(表示未完成,
- [ ]表示已完成)- [x] - 文件应包含可执行的任务项
- 无需严格的 schema 验证——命令会适配你的任务结构
Subagent Classification Rules
初始设置(使用Task工具)
When executing tasks, select the appropriate subagent based on task characteristics:
-
Implementation Tasks (implement, add, create, update features) → Use general-purpose subagent
- Examples: Adding new features, modifying existing code, creating files
- Standard implementation work without specific subagent requirements
-
Investigation Tasks (explore, investigate, research) → Usesubagent
Explore- Examples: Codebase exploration, finding files, analyzing patterns
- Specialized in comprehensive codebase analysis and discovery
- 读取$ARGUMENTS中指定的TODO.md文件
- 按子代理类型分类每个任务:
- 扫描任务描述中的关键词(explore、investigate、implement等)
- 根据子代理分类规则预先确定每个任务的子代理类型
- 识别任务依赖(哪些任务需要之前任务的结果)
- 记录分类结果以保证透明度
Memory File Initialization
子代理分类规则
CRITICAL: Before starting task execution, initialize memory system:
执行任务时,根据任务特征选择合适的子代理:
-
实现任务(implement、add、create、update功能)→ 使用通用子代理
- 示例:添加新功能、修改现有代码、创建文件
- 无特定子代理要求的标准实现工作
-
调查任务(explore、investigate、research)→ 使用子代理
Explore- 示例:代码库探索、查找文件、分析模式
- 专门用于全面的代码库分析与发现
1. Variable Initialization
内存文件初始化
At the start of task execution, declare context accumulation variables:
TASK_CONTEXT = {} # Store context across tasks
MEMORY_FILES = {} # Track active memory file paths
INVESTIGATION_FINDINGS = [] # Accumulate investigation results重要:开始任务执行前,请初始化内存系统:
2. Load Existing Memory Files
1. 变量初始化
Before executing any task, check and load relevant existing memory files:
- Planning files: - Contains task breakdown and strategy
/docs/memory/planning/*.md - Exploration files: - Contains codebase analysis results
/docs/memory/explorations/*.md - Pattern files: - Contains reusable technical patterns
/docs/memory/patterns/*.md - Investigation files: - Contains previous problem-solving insights
/docs/memory/investigation-*.md
任务执行开始时,声明上下文累积变量:
TASK_CONTEXT = {} # Store context across tasks
MEMORY_FILES = {} # Track active memory file paths
INVESTIGATION_FINDINGS = [] # Accumulate investigation results3. Context Accumulation Strategy
2. 加载现有内存文件
As tasks progress:
- Store task execution results in for use in subsequent tasks
TASK_CONTEXT - Reference previous task outputs to inform current task decisions
- Document learnings and context in TODO.md task notes
- Link related memory files to build comprehensive understanding
执行任何任务前,检查并加载相关的现有内存文件:
- 规划文件:- 包含任务分解与策略
/docs/memory/planning/*.md - 探索文件:- 包含代码库分析结果
/docs/memory/explorations/*.md - 模式文件:- 包含可复用的技术模式
/docs/memory/patterns/*.md - 调查文件:- 包含之前的问题解决见解
/docs/memory/investigation-*.md
Task Execution: Sequential Task Tool Orchestration
3. 上下文累积策略
⚠️ CRITICAL: Sequential Execution Pattern Required
All tasks MUST be executed sequentially using the Task tool. Each task's results inform the next task's context.
随着任务推进:
- 将任务执行结果存储在中,供后续任务使用
TASK_CONTEXT - 参考之前的任务输出以指导当前任务的决策
- 在TODO.md的任务注释中记录学习内容与上下文
- 关联相关内存文件以构建全面的认知
Execution Pattern Overview
任务执行:Task工具的顺序编排
typescript
// Sequential execution pattern
const task_1_result = await Task({ subagent_type: "[subagent_type]", ... });
// ⚠️ WAIT for task_1 to complete, THEN proceed
const task_2_result = await Task({ subagent_type: "[subagent_type]", ... });
// ⚠️ WAIT for task_2 to complete, THEN proceed
const task_3_result = await Task({ subagent_type: "[subagent_type]", ... });
// ❌ WRONG: Parallel execution (DO NOT DO THIS)
Promise.all([
Task({ subagent_type: "...", ... }),
Task({ subagent_type: "...", ... }) // Tasks must be sequential!
]);⚠️ 重要:必须采用顺序执行模式
所有任务必须使用Task工具按顺序执行。每个任务的结果为下一个任务提供上下文。
Task Classification and Subagent Selection
执行模式概述
Before executing each task, determine the appropriate subagent based on task characteristics (see "Subagent Classification Rules" section):
- Implementation Tasks → (or omit parameter)
subagent_type: "general-purpose" - Investigation Tasks →
subagent_type: "Explore"
typescript
// 顺序执行模式
const task_1_result = await Task({ subagent_type: "[subagent_type]", ... });
// ⚠️ 等待task_1完成后,再继续
const task_2_result = await Task({ subagent_type: "[subagent_type]", ... });
// ⚠️ 等待task_2完成后,再继续
const task_3_result = await Task({ subagent_type: "[subagent_type]", ... });
// ❌ 错误:并行执行(禁止这样做)
Promise.all([
Task({ subagent_type: "...", ... }),
Task({ subagent_type: "...", ... }) // 任务必须按顺序执行!
]);Task Tool Execution Template
任务分类与子代理选择
For each incomplete task () in TODO.md, execute using this pattern:
- [ ]typescript
const task_N_result = await Task({
subagent_type: "[determined_subagent_type]", // From classification rules
description: "Execute task N: [task title from TODO.md]",
prompt: `
## 📋 Development Rules (MUST Follow)
### 🚨 Guardrails (Prohibited Actions)
**CRITICAL - Forward-Only Policy:**
- ❌ NEVER use \`git reset\`, \`git restore\`, \`git revert\`, or any rollback commands
- ✅ Always move forward: Fix errors with new changes, not by undoing previous ones
### Task Completion Procedure
1. Update checkbox immediately after task execution (\`- [ ]\` → \`- [x]\`)
2. Document related files (list names of created/modified files)
## Task Context
**Current Task:** [Full task description from TODO.md]
**Task Number:** N of [total_tasks]
**Target File:** ${$ARGUMENTS}
## Previous Task Results
${task_N-1_result?.summary || "This is the first task"}
${task_N-1_result?.files_modified || ""}
${task_N-1_result?.key_findings || ""}
## Memory Files
${MEMORY_FILES.planning || ""}
${MEMORY_FILES.exploration || ""}
${MEMORY_FILES.patterns || ""}
## Task-Specific Instructions
### For Investigation Tasks (Explore subagent):
1. Create investigation memory file at start:
- Path: \`/docs/memory/investigation-YYYY-MM-DD-{topic}.md\`
- Record findings immediately during investigation
- Save technical patterns in \`/docs/memory/patterns/\`
2. Document discoveries and insights for future reference
3. Include links to related documentation
### For Implementation Tasks (General-purpose subagent):
1. Follow existing code patterns discovered in exploration
2. Adhere to YAGNI principle (implement only what's necessary)
3. Reference memory files for context and technical patterns
4. Record implementation context in TODO.md task notes
## Required Steps After Task Completion
1. **Update TODO.md file** (${$ARGUMENTS})
- Change completed task: \`- [ ]\` → \`- [x]\`
- Add related file information below task
- Record implementation details and notes
- Format example:
\`\`\`markdown
- [x] Task title
- Files: \`path/to/file1.rb\`, \`path/to/file2.rb\`
- Notes: Brief description of implementation
\`\`\`
2. **Save investigation results** (for investigation tasks)
- Consolidate insights in investigation memory file
- Record technical discoveries for future reference
- Link to related documentation and patterns
3. **Update TODO.md with execution context**
- Add task notes: implementation details, decisions, learnings
- Record blockers with 🚧 marker if encountered
- Document context for next task in task description
4. **Report results**
- Summarize changes made
- List modified/created files with absolute paths
- Note any issues or blockers encountered
- Provide context for next task
5. **⚠️ MANDATORY: Check for remaining tasks**
- See "Execution Checkpoints" section (Lines 482-612) for detailed 3-step procedure
- Must re-read TODO.md, detect `- [ ]` pattern, and branch appropriately
## Expected Output Format
Return structured results for context accumulation:
\`\`\`typescript
{
summary: "Brief description of what was accomplished",
files_modified: ["absolute/path/to/file1", "absolute/path/to/file2"],
key_findings: "Important discoveries or decisions (for investigation tasks)",
blockers: "Any issues encountered (if applicable)",
context_for_next_task: "Information needed by subsequent tasks"
}
\`\`\`
`
});执行每个任务前,根据任务特征确定合适的子代理(详见“子代理分类规则”部分):
- 实现任务 → (或省略参数)
subagent_type: "general-purpose" - 调查任务 →
subagent_type: "Explore"
Context Accumulation Between Tasks
Task工具执行模板
Critical Pattern: Each task's results must be passed to the next task through the parameter.
prompttypescript
// Task 1
const task_1_result = await Task({
subagent_type: "Explore",
description: "Investigate codebase for feature X",
prompt: `[instructions]`
});
// Task 2 receives task_1_result in context
const task_2_result = await Task({
subagent_type: "general-purpose",
description: "Implement feature X based on investigation",
prompt: `
## Previous Task Results
${task_1_result.summary}
Files discovered: ${task_1_result.files_modified.join(', ')}
Key findings: ${task_1_result.key_findings}
[rest of task 2 instructions]
`
});对于TODO.md中的每个未完成任务(),按以下模式执行:
- [ ]typescript
const task_N_result = await Task({
subagent_type: "[determined_subagent_type]", // 来自分类规则
description: "Execute task N: [task title from TODO.md]",
prompt: `
## 📋 开发规则(必须遵守)
### 🚨 防护规则(禁止操作)
**重要 - 仅向前推进原则:**
- ❌ 禁止使用\`git reset\`、\`git restore\`、\`git revert\`或任何回滚命令
- ✅ 始终向前推进:通过新的修改修复错误,而非撤销之前的操作
### 任务完成流程
1. 任务执行后立即更新复选框(\`- [ ]\` → \`- [x]\`)
2. 记录相关文件(列出创建/修改的文件名)
## 任务上下文
**当前任务:** [TODO.md中的完整任务描述]
**任务编号:** N / [总任务数]
**目标文件:** ${$ARGUMENTS}
## 上一个任务结果
${task_N-1_result?.summary || "这是第一个任务"}
${task_N-1_result?.files_modified || ""}
${task_N-1_result?.key_findings || ""}
## 内存文件
${MEMORY_FILES.planning || ""}
${MEMORY_FILES.exploration || ""}
${MEMORY_FILES.patterns || ""}
## 任务特定说明
### 针对调查任务(Explore子代理):
1. 开始时创建调查内存文件:
- 路径:\`/docs/memory/investigation-YYYY-MM-DD-{topic}.md\`
- 调查过程中立即记录发现
- 将技术模式保存到\`/docs/memory/patterns/\`
2. 记录发现与见解,供未来参考
3. 包含相关文档的链接
### 针对实现任务(通用子代理):
1. 遵循探索阶段发现的现有代码模式
2. 遵守YAGNI原则(仅实现必要的功能)
3. 参考内存文件获取上下文与技术模式
4. 在TODO.md的任务注释中记录实现上下文
## 任务完成后的必填步骤
1. **更新TODO.md文件**(${$ARGUMENTS})
- 将已完成任务的\`- [ ]\`改为\`- [x]\`
- 在任务下方添加相关文件信息
- 记录实现细节与注释
- 格式示例:
\`\`\`markdown
- [x] 任务标题
- 文件:\`path/to/file1.rb\`、\`path/to/file2.rb\`
- 注释:实现的简要描述
\`\`\`
2. **保存调查结果**(针对调查任务)
- 在调查内存文件中整合见解
- 记录技术发现,供未来参考
- 关联相关文档与模式
3. **在TODO.md中更新执行上下文**
- 添加任务注释:实现细节、决策、学习内容
- 若遇到阻塞,使用🚧标记记录
- 在任务描述中为下一个任务记录上下文
4. **报告结果**
- 总结所做的修改
- 列出修改/创建的文件的绝对路径
- 记录遇到的任何问题或阻塞
- 为下一个任务提供上下文
5. **⚠️ 必须操作:检查剩余任务**
- 详见“执行检查点”部分(第482-612行)的三步流程
- 必须重新读取TODO.md,检测`- [ ]`模式,并做出相应分支决策
## 预期输出格式
返回结构化结果以累积上下文:
\`\`\`typescript
{
summary: "所完成工作的简要描述",
files_modified: ["absolute/path/to/file1", "absolute/path/to/file2"],
key_findings: "重要发现或决策(针对调查任务)",
blockers: "遇到的任何问题(如有)",
context_for_next_task: "后续任务所需的信息"
}
\`\`\`
`
});Verification Gates After Each Task
任务间的上下文累积
⚠️ MANDATORY: After each Task tool execution, verify success before proceeding:
typescript
const task_N_result = await Task({ ... });
// Verification gate
if (!task_N_result || task_N_result.blockers) {
// Handle error:
// 1. Mark task with 🚧 in TODO.md
// 2. Record blocker in TODO.md with context
// 3. Report to user with details
// 4. STOP execution until blocker is resolved
throw new Error(`Task N blocked: ${task_N_result.blockers}`);
}
// Verify expected outputs exist
if (!task_N_result.summary || !task_N_result.files_modified) {
// Task completed but didn't return expected format
// Log warning but continue if non-critical
}
// ✅ Verification passed, proceed to next task
const task_N+1_result = await Task({ ... });关键模式:每个任务的结果必须通过参数传递给下一个任务。
prompttypescript
// 任务1
const task_1_result = await Task({
subagent_type: "Explore",
description: "Investigate codebase for feature X",
prompt: `[指令内容]`
});
// 任务2接收task_1_result作为上下文
const task_2_result = await Task({
subagent_type: "general-purpose",
description: "Implement feature X based on investigation",
prompt: `
## 上一个任务结果
${task_1_result.summary}
发现的文件:${task_1_result.files_modified.join(', ')}
关键发现:${task_1_result.key_findings}
[任务2的其余指令]
`
});Error Handling Protocol
每个任务后的验证关卡
When a task encounters an error or blocker:
CRITICAL - Forward-Only Error Recovery:
- ❌ NEVER use ,
git reset,git restoreto undo errorsgit revert - ✅ Create new changes to fix errors - Keep the history transparent
- ✅ If code is broken, fix it forward - Add corrections, don't erase mistakes
Error Recovery Steps:
-
Mark task status in TODO.md:markdown
- [ ] 🚧 Task title (BLOCKED: reason for blockage) -
Record blocker details in TODO.md:markdown
- [ ] 🚧 Task title (BLOCKED: reason) - 🚧 Blocker: [Detailed description] - 🔧 Attempted: [What was tried] - 📋 Next steps: [How to resolve] - ⚠️ Recovery: Fix forward, not rollback -
Report to user:
- Clear description of the blocker
- Impact on subsequent tasks
- Recommended resolution steps
- Plan for forward-only fix
-
STOP execution:
- DO NOT proceed to next task
- DO NOT rollback changes
- Wait for user intervention or blocker resolution
-
After blocker resolution:
- Once the user resolves the blocker or provides guidance
- Re-read TODO.md to check current task status
- If task is now unblocked, resume execution from that task
- Continue with normal Task Execution Loop
- IMPORTANT: DO NOT skip remaining tasks - continue until ALL tasks are complete
⚠️ 必须操作:每次Task工具执行后,在继续之前验证执行成功:
typescript
const task_N_result = await Task({ ... });
// 验证关卡
if (!task_N_result || task_N_result.blockers) {
// 处理错误:
// 1. 在TODO.md中用🚧标记任务
// 2. 在TODO.md中记录阻塞的上下文
// 3. 向用户报告详细信息
// 4. 停止执行,直至阻塞解决
throw new Error(`Task N blocked: ${task_N_result.blockers}`);
}
// 验证预期输出是否存在
if (!task_N_result.summary || !task_N_result.files_modified) {
// 任务已完成,但未返回预期格式
// 记录警告,若非关键问题则继续执行
}
// ✅ 验证通过,继续下一个任务
const task_N+1_result = await Task({ ... });Task Execution Loop
错误处理协议
High-Level Flow Diagram:
╔═══════════════════════════════════════════════════════════════════════════╗
║ TASK EXECUTION LOOP FLOW ║
╚═══════════════════════════════════════════════════════════════════════════╝
START: Read TODO.md and identify first incomplete task
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ PHASE 1: TASK EXECUTION │
│ ───────────────────────── │
│ │
│ 1. Read TODO.md → identify next incomplete task (`- [ ]`) │
│ 2. Classify task → determine subagent_type │
│ 3. Execute Task tool with accumulated context │
│ 4. Verify completion (verification gate) │
│ 5. Update TODO.md status (`- [ ]` → `- [x]`) │
│ 6. Store task result for next task's context │
│ │
└────────────────────────────┬────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ 🚨 PHASE 2: CONTINUATION CHECK PROCEDURE (MANDATORY GATE) │
│ ──────────────────────────────────────────────────────── │
│ │
│ Step 1: Re-read TODO.md from disk │
│ const todo_content = await Read({ file_path: $ARGUMENTS }) │
│ │
│ Step 2: Detect incomplete tasks │
│ const has_incomplete_tasks = todo_content.includes('- [ ]') │
│ │
│ Step 3: Branch Decision ──────────────┐ │
│ │ │
└─────────────────────────────────────────┼────────────────────────────────┘
│
┌─────────────────────┴────────────────────┐
│ │
▼ ▼
┌───────────────────────┐ ┌────────────────────────┐
│ has_incomplete_tasks │ │ has_incomplete_tasks │
│ === true │ │ === false │
└───────────────────────┘ └────────────────────────┘
│ │
│ │
▼ ▼
┌───────────────────────┐ ┌────────────────────────┐
│ PATH A: │ │ PATH B: │
│ CONTINUE LOOP │ │ FINAL COMPLETION │
│ │ │ │
│ ✅ Execute next task │ │ ✅ Verify ALL [x] │
│ via Task tool │ │ ✅ Add timestamp │
│ │ │ ✅ Generate report │
│ ❌ DO NOT proceed to │ │ ✅ End session │
│ Final Completion │ │ │
│ │ │ │
│ ❌ DO NOT end session│ │ 🎯 COMPLETE │
└───────────────────────┘ └────────────────────────┘
│ │
│ │
│ (loop back to PHASE 1) END
│
└──────────────┐
│
▼
Return to PHASE 1: Execute next taskCritical Decision Points:
-
Verification Gate (After each task): Did the task complete successfully?
- ✅ YES → Continue to Continuation Check
- ❌ NO → Mark blocker (), report to user, STOP
🚧
-
Continuation Check Gate (Mandatory after EACH task): Are there incomplete tasks?
- ✅ YES (found) → PATH A: Continue to next task (loop back to PHASE 1)
- [ ] - ✅ NO (all ) → PATH B: Proceed to Final Completion Process
- [x]
- ✅ YES (
Loop Termination Conditions:
- ✅ Normal completion: All tasks marked → Final Completion Process
- [x] - 🚧 Blocked: Task encounters blocker → STOP, report to user
- ❌ Error: Unrecoverable error → STOP, report to user
Repeat the Task tool pattern for each incomplete task until:
- All tasks are marked (completed), OR
- [x] - A task is blocked with marker (stop and report)
🚧
Execution Flow:
- Read TODO.md and identify next incomplete task ()
- [ ] - Classify task and determine
subagent_type - Execute Task tool with accumulated context
- Verify task completion (verification gate)
- Update TODO.md status (→
- [ ])- [x] - Store task result for next task's context
- CRITICAL: After each task completion, IMMEDIATELY re-read TODO.md and check for remaining incomplete tasks
- If ANY incomplete tasks remain (), IMMEDIATELY continue to next task (return to step 1)
- [ ] - ONLY proceed to "Final Completion Process" when ALL tasks are marked
- [x]
⚠️ MANDATORY CONTINUATION CHECK:
See "Execution Checkpoints" section (Lines 482-612) for the required 3-step procedure that MUST be executed after EACH task completion.
当任务遇到错误或阻塞时:
重要 - 仅向前推进的错误恢复:
- ❌ **禁止使用、
git reset、git restore**撤销错误git revert - ✅ 通过新的修改修复错误 - 保持历史透明
- ✅ 若代码出现问题,向前修复 - 添加修正,而非删除错误
错误恢复步骤:
-
在TODO.md中标记任务状态:markdown
- [ ] 🚧 任务标题(已阻塞:阻塞原因) -
在TODO.md中记录阻塞详情:markdown
- [ ] 🚧 任务标题(已阻塞:原因) - 🚧 阻塞:[详细描述] - 🔧 已尝试:[所做的尝试] - 📋 下一步:[解决方法] - ⚠️ 恢复方式:向前修复,而非回滚 -
向用户报告:
- 清晰描述阻塞情况
- 说明对后续任务的影响
- 建议解决步骤
- 规划仅向前推进的修复方案
-
停止执行:
- 不要继续执行下一个任务
- 不要回滚修改
- 等待用户干预或阻塞解决
-
阻塞解决后:
- 用户解决阻塞或提供指导后
- 重新读取TODO.md以检查当前任务状态
- 若任务已解除阻塞,从该任务恢复执行
- 继续正常的任务执行循环
- 重要:不要跳过剩余任务——继续执行直至所有任务完成
Execution Checkpoints: 3-Step Post-Task Procedure
任务执行循环
⚠️ CRITICAL: Execute After EVERY Task Completion
After each Task tool execution completes, you MUST execute this 3-step checkpoint procedure:
╔════════════════════════════════════════════════════════════════╗
║ 🎯 EXECUTION CHECKPOINT - POST-TASK VERIFICATION ║
║ ───────────────────────────────────────────────────────── ║
║ ║
║ Execute this 3-step procedure after EVERY task completion: ║
║ ║
║ ┌──────────────────────────────────────────────────────┐ ║
║ │ STEP 1: Re-read TODO.md from disk │ ║
║ │ ↓ │ ║
║ │ const todo = await Read({ file_path: ... }) │ ║
║ │ │ ║
║ │ Purpose: Get fresh state, not stale in-memory data │ ║
║ └──────────────────────────────────────────────────────┘ ║
║ │ ║
║ ▼ ║
║ ┌──────────────────────────────────────────────────────┐ ║
║ │ STEP 2: Check for '- [ ]' pattern existence │ ║
║ │ ↓ │ ║
║ │ const has_incomplete = todo.includes('- [ ]') │ ║
║ │ │ ║
║ │ Purpose: Detect if ANY incomplete tasks remain │ ║
║ └──────────────────────────────────────────────────────┘ ║
║ │ ║
║ ▼ ║
║ ┌──────────────────────────────────────────────────────┐ ║
║ │ STEP 3: Branch decision based on detection result │ ║
║ │ │ ║
║ │ if (has_incomplete === true) { │ ║
║ │ → Continue to next task (loop back to PHASE 1) │ ║
║ │ → DO NOT end session │ ║
║ │ } else { │ ║
║ │ → Proceed to Final Completion Process │ ║
║ │ → Safe to end session after final steps │ ║
║ │ } │ ║
║ │ │ ║
║ │ Purpose: Prevent premature session termination │ ║
║ └──────────────────────────────────────────────────────┘ ║
║ ║
╚════════════════════════════════════════════════════════════════╝Checkpoint Implementation Code:
typescript
// ════════════════════════════════════════════════════════════════
// EXECUTION CHECKPOINT - Execute after EVERY task completion
// ════════════════════════════════════════════════════════════════
// STEP 1: Re-read TODO.md from disk
const todo_content = await Read({ file_path: $ARGUMENTS });
// STEP 2: Check for '- [ ]' pattern existence
const has_incomplete_tasks = todo_content.includes('- [ ]');
// STEP 3: Branch decision
if (has_incomplete_tasks) {
// ✅ PATH A: At least one incomplete task exists
// → MUST continue to next task
// → CANNOT proceed to Final Completion Process
// → CANNOT end session
console.log('✅ Checkpoint: Incomplete tasks detected, continuing loop...');
// Return to PHASE 1: Execute next task
const next_task_result = await Task({
subagent_type: "[determined_type]",
description: "Execute next incomplete task",
prompt: `[task instructions with accumulated context]`
});
// After next task completes, return to this checkpoint (recursive loop)
} else {
// ✅ PATH B: NO incomplete tasks remain
// → All tasks are marked '- [x]'
// → Safe to proceed to Final Completion Process
// → Session can end after final steps
console.log('✅ Checkpoint: All tasks complete, proceeding to final steps...');
// Proceed to "Final Completion Process" section
}Checkpoint Failure Indicators:
If you find yourself in any of these situations, the checkpoint was not executed correctly:
| ❌ Failure Indicator | ✅ Correct Action |
|---|---|
Ending session while | Execute checkpoint → Detect incomplete tasks → Continue loop |
| Proceeding to Final Completion without reading TODO.md | Execute STEP 1: Re-read file from disk |
| Assuming all tasks done based on in-memory state | Execute STEP 2: Explicit pattern detection |
| Skipping checkpoint "because task seemed final" | ALWAYS execute checkpoint after EVERY task |
Visual Reminder - When to Execute:
Task Execution Timeline:
════════════════════════════════════════════════════════════════
Task N-1 Task N 🎯 CHECKPOINT Task N+1
│ │ │ │
│ │ │ │
▼ ▼ ▼ ▼
[Execute] → [Complete] → [3-Step Check] → [Continue/End]
[Update TODO] │
├─ Step 1: Read
├─ Step 2: Detect
└─ Step 3: Branch
│
├─ Found [ ] → Next Task
└─ All [x] → Final Steps
🚨 CRITICAL: Checkpoint executes AFTER TODO.md update, BEFORE next decisionConnection to Continuation Check Procedure:
This checkpoint procedure is the in-loop implementation of the "Continuation Check Procedure" section (Lines 614-701):
- Checkpoint = Execution code after each task (what you DO)
- Continuation Check Procedure = Detailed specification (what it MEANS)
Both sections describe the same mandatory 3-step process from different perspectives. The checkpoint ensures continuous execution until completion.
高层级流程图:
╔═══════════════════════════════════════════════════════════════════════════╗
║ 任务执行循环流程 ║
╚═══════════════════════════════════════════════════════════════════════════╝
开始:读取TODO.md并识别第一个未完成任务
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ 阶段1:任务执行 │
│ ───────────────────────── │
│ │
│ 1. 读取TODO.md → 识别下一个未完成任务(`- [ ]`) │
│ 2. 分类任务 → 确定subagent_type │
│ 3. 使用累积的上下文执行Task工具 │
│ 4. 验证完成情况(验证关卡) │
│ 5. 更新TODO.md状态(`- [ ]` → `- [x]`) │
│ 6. 存储任务结果,供下一个任务使用 │
│ │
└────────────────────────────┬────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ 🚨 阶段2:延续检查流程(必须执行的关卡) │
│ ──────────────────────────────────────────────────────── │
│ │
│ 步骤1:从磁盘重新读取TODO.md │
│ const todo_content = await Read({ file_path: $ARGUMENTS }) │
│ │
│ 步骤2:检测未完成任务 │
│ const has_incomplete_tasks = todo_content.includes('- [ ]') │
│ │
│ 步骤3:分支决策 ──────────────┐ │
│ │
└─────────────────────────────────────────┼────────────────────────────────┘
│
┌─────────────────────┴────────────────────┐
│ │
▼ ▼
┌───────────────────────┐ ┌────────────────────────┐
│ 存在未完成任务 │ │ 无未完成任务 │
│ === true │ │ === false │
└───────────────────────┘ └────────────────────────┘
│ │
│ │
▼ ▼
┌───────────────────────┐ ┌────────────────────────┐
│ 路径A: │ │ 路径B: │
│ 继续循环 │ │ 最终完成 │
│ │ │ │
│ ✅ 执行下一个任务 │ │ ✅ 验证所有任务为[x] │
│ 通过Task工具 │ │ ✅ 添加时间戳 │
│ │ │ ✅ 生成报告 │
│ ❌ 不要进入最终完成流程 │ │ ✅ 结束会话 │
│ │ │ │
│ ❌ 不要结束会话 │ │ │
└───────────────────────┘ └────────────────────────┘
│ │
│ │
│ (循环回到阶段1) 结束
│
└──────────────┐
│
▼
返回阶段1:执行下一个任务关键决策点:
-
验证关卡(每个任务后):任务是否成功完成?
- ✅ 是 → 进入延续检查
- ❌ 否 → 标记阻塞(),向用户报告,停止执行
🚧
-
延续检查关卡(每个任务后必须执行):是否存在未完成任务?
- ✅ 是(发现)→ 路径A:继续下一个任务(循环回到阶段1)
- [ ] - ✅ 否(所有任务为)→ 路径B:进入最终完成流程
- [x]
- ✅ 是(发现
循环终止条件:
- ✅ 正常完成:所有任务标记为→ 进入最终完成流程
- [x] - 🚧 已阻塞:任务遇到阻塞 → 停止执行,向用户报告
- ❌ 错误:发生无法恢复的错误 → 停止执行,向用户报告
对每个未完成任务重复Task工具模式,直到:
- 所有任务标记为(已完成),或
- [x] - 任务被标记为阻塞(停止并报告)
🚧
执行流程:
- 读取TODO.md并识别下一个未完成任务()
- [ ] - 分类任务并确定
subagent_type - 使用累积的上下文执行Task工具
- 验证任务完成情况(验证关卡)
- 更新TODO.md状态(→
- [ ])- [x] - 存储任务结果,供下一个任务使用
- 重要:每个任务完成后,立即重新读取TODO.md并检查剩余未完成任务
- 若存在任何未完成任务(),立即继续下一个任务(回到步骤1)
- [ ] - 仅当所有任务标记为时,才进入“最终完成流程”
- [x]
⚠️ 必须执行的延续检查:
详见“执行检查点”部分(第482-612行)的必填三步流程,必须在每个任务完成后执行。
Continuation Check Procedure
执行检查点:任务后的三步流程
⚠️ MANDATORY GATE: This procedure is the critical decision point between task execution and final completion.
After completing each task, you MUST execute this 3-step continuation check procedure:
⚠️ 重要:每个任务完成后必须执行
每次Task工具执行完成后,必须执行以下三步检查点流程:
╔════════════════════════════════════════════════════════════════╗
║ 🎯 执行检查点 - 任务后验证 ║
║ ───────────────────────────────────────────────────────── ║
║ ║
║ 每个任务完成后必须执行此三步流程: ║
║ ║
║ ┌──────────────────────────────────────────────────────┐ ║
║ │ 步骤1:从磁盘重新读取TODO.md │ ║
║ │ ↓ │ ║
║ │ const todo = await Read({ file_path: ... }) │ ║
║ │ │ ║
║ │ 目的:获取最新状态,而非内存中的过期数据 │ ║
║ └──────────────────────────────────────────────────────┘ ║
║ │ ║
║ ▼ ║
║ ┌──────────────────────────────────────────────────────┐ ║
║ │ 步骤2:检查是否存在'- [ ]'模式 │ ║
║ │ ↓ │ ║
║ │ const has_incomplete = todo.includes('- [ ]') │ ║
║ │ │ ║
║ │ 目的:检测是否存在未完成任务 │ ║
║ └──────────────────────────────────────────────────────┘ ║
║ │ ║
║ ▼ ║
║ ┌──────────────────────────────────────────────────────┐ ║
║ │ 步骤3:根据检测结果做出分支决策 │ ║
║ │ │ ║
║ │ if (has_incomplete === true) { │ ║
║ │ → 继续下一个任务(循环回到阶段1) │ ║
║ │ → 不要结束会话 │ ║
║ │ } else { │ ║
║ │ → 进入最终完成流程 │ ║
║ │ → 完成最终步骤后可安全结束会话 │ ║
║ │ } │ ║
║ │ │ ║
║ │ 目的:防止会话提前终止 │ ║
║ └──────────────────────────────────────────────────────┘ ║
║ ║
╚════════════════════════════════════════════════════════════════╝检查点实现代码:
typescript
// ════════════════════════════════════════════════════════════════
// 执行检查点 - 每个任务完成后执行
// ════════════════════════════════════════════════════════════════
// 步骤1:从磁盘重新读取TODO.md
const todo_content = await Read({ file_path: $ARGUMENTS });
// 步骤2:检查是否存在'- [ ]'模式
const has_incomplete_tasks = todo_content.includes('- [ ]');
// 步骤3:分支决策
if (has_incomplete_tasks) {
// ✅ 路径A:存在至少一个未完成任务
// → 必须继续下一个任务
// → 不能进入最终完成流程
// → 不能结束会话
console.log('✅ 检查点:检测到未完成任务,继续循环...');
// 返回阶段1:执行下一个任务
const next_task_result = await Task({
subagent_type: "[determined_type]",
description: "Execute next incomplete task",
prompt: `[包含累积上下文的任务指令]`
});
// 下一个任务完成后,回到此检查点(递归循环)
} else {
// ✅ 路径B:无未完成任务
// → 所有任务标记为'- [x]'
// → 可安全进入最终完成流程
// → 完成最终步骤后可结束会话
console.log('✅ 检查点:所有任务完成,进入最终步骤...');
// 进入“最终完成流程”部分
}检查点失败迹象:
若出现以下情况,说明检查点未正确执行:
| ❌ 失败迹象 | ✅ 正确操作 |
|---|---|
TODO.md中存在 | 执行检查点 → 检测未完成任务 → 继续循环 |
| 未读取TODO.md就进入最终完成流程 | 执行步骤1:从磁盘重新读取文件 |
| 根据内存中的状态假设所有任务已完成 | 执行步骤2:显式检测模式 |
| 因为“任务看起来是最后一个”而跳过检查点 | 每个任务完成后都必须执行检查点 |
视觉提醒 - 执行时机:
任务执行时间线:
════════════════════════════════════════════════════════════════
任务N-1 任务N 🎯 检查点 任务N+1
│ │ │ │
│ │ │ │
▼ ▼ ▼ ▼
[执行] → [完成] → [三步检查] → [继续/结束]
[更新TODO] │
├─ 步骤1:读取
├─ 步骤2:检测
└─ 步骤3:分支
│
├─ 发现[ ] → 下一个任务
└─ 全为[x] → 最终步骤
🚨 重要:检查点在更新TODO.md后、下一个决策前执行与延续检查流程的关联:
此检查点流程是“延续检查流程”部分(第614-701行)的循环内实现:
- 检查点 = 每个任务后执行的代码(具体操作)
- 延续检查流程 = 详细规范(含义)
两部分从不同角度描述了同一个必须执行的三步流程。检查点确保执行持续到完成。
Step 1: Re-read TODO.md
延续检查流程
Why this is mandatory:
- TODO.md is the single source of truth for task completion status
- The file may have been updated by the previous Task execution
- In-memory state may be stale - always read from disk
⚠️ 必须执行的关卡:这是任务执行与最终完成之间的关键决策点。
完成每个任务后,必须执行此三步延续检查流程:
Step 2: Detect Incomplete Tasks
步骤1:重新读取TODO.md
Detection logic:
- Pattern found → At least one task remains incomplete
- Pattern not found → All tasks are complete ()
- [x]
(See Lines 532-571 in "Execution Checkpoints" for implementation code)
为什么必须这样做:
- TODO.md是任务完成状态的唯一可信来源
- 文件可能已被上一个Task执行更新
- 内存中的状态可能过期——始终从磁盘读取
Step 3: Branch Decision
步骤2:检测未完成任务
┌─────────────────────────────────────────────────────┐
│ Continuation Check Decision Tree │
└─────────────────────────────────────────────────────┘
│
▼
┌────────────────────────────────┐
│ has_incomplete_tasks? │
└────────────────────────────────┘
/ \
/ \
YES NO
│ │
▼ ▼
┌──────────────────┐ ┌─────────────────────┐
│ ✅ Continue Loop │ │ ✅ Final Completion │
│ │ │ │
│ - Execute next │ │ - Verify ALL tasks │
│ task via Task │ │ are [x] │
│ tool │ │ - Add completion │
│ │ │ timestamp │
│ - DO NOT proceed │ │ - Generate final │
│ to Final │ │ report │
│ Completion │ │ │
│ │ │ - End session │
│ - DO NOT end │ │ │
│ session │ │ │
└──────────────────┘ └─────────────────────┘
│
│ (loop continues)
▼
Return to Step 1 after
next task completion检测逻辑:
- 找到模式 → 至少有一个任务未完成
- 未找到模式 → 所有任务已完成()
- [x]
(详见“执行检查点”部分第532-571行的实现代码)
Implementation Template
步骤3:分支决策
See Lines 532-571 in "Execution Checkpoints" section for complete implementation code with detailed comments.
⚠️ WARNING: Common Mistakes to Avoid:
| ❌ WRONG | ✅ CORRECT |
|---|---|
Proceeding to Final Completion while | Always check TODO.md before final steps |
| Ending session with incomplete tasks | Continue loop until all |
| Assuming all tasks are done without checking | Explicit file read + pattern detection |
| Using stale in-memory state | Fresh |
Visual Reminder:
╔═══════════════════════════════════════════════════════════╗
║ 🚨 CRITICAL CHECKPOINT ║
║ ║
║ Before proceeding to Final Completion Process: ║
║ ║
║ ✅ Read TODO.md from disk ║
║ ✅ Check for '- [ ]' pattern ║
║ ✅ If found → Continue to next task ║
║ ✅ If NOT found → Proceed to Final Completion ║
║ ║
║ This gate prevents premature session termination ║
╚═══════════════════════════════════════════════════════════╝┌─────────────────────────────────────────────────────┐
│ 延续检查决策树 │
└─────────────────────────────────────────────────────┘
│
▼
┌────────────────────────────────┐
│ 是否存在未完成任务? │
└────────────────────────────────┘
/ \
/ \
是 否
│ │
▼ ▼
┌──────────────────┐ ┌─────────────────────┐
│ ✅ 继续循环 │ │ ✅ 最终完成 │
│ │ │ │
│ - 通过Task工具执行下一个任务 │ │ - 验证所有任务为[x] │
│ │ │ - 添加完成时间戳 │
│ - 不要进入最终完成流程 │ │ - 生成最终报告 │
│ │ │ │
│ - 不要结束会话 │ │ - 结束会话 │
└──────────────────┘ └─────────────────────┘
│
│ (循环继续)
▼
下一个任务完成后返回步骤1Error Handling and Investigation
实现模板
When encountering errors or unexpected issues during task execution:
CRITICAL - Forward-Only Error Recovery:
- ❌ NEVER use ,
git reset,git restoreto undo errorsgit revert - ✅ Always fix forward with new changes - Preserve complete history
- ✅ Document the fix - Record why the error occurred and how it was resolved
详见“执行检查点”部分第532-571行的完整实现代码及详细注释。
⚠️ 警告:需避免的常见错误:
| ❌ 错误操作 | ✅ 正确操作 |
|---|---|
存在 | 进入最终步骤前始终检查TODO.md |
| 存在未完成任务时结束会话 | 继续循环直至所有任务为 |
| 未检查就假设所有任务已完成 | 显式读取文件 + 检测模式 |
| 使用内存中的过期状态 | 每次都调用新鲜的 |
视觉提醒:
╔═══════════════════════════════════════════════════════════╗
║ 🚨 重要检查点 ║
║ ║
║ 进入最终完成流程前: ║
║ ║
║ ✅ 从磁盘读取TODO.md ║
║ ✅ 检查是否存在'- [ ]'模式 ║
║ ✅ 若存在 → 继续下一个任务 ║
║ ✅ 若不存在 → 进入最终完成流程 ║
║ ║
║ 此关卡防止会话提前终止 ║
╚═══════════════════════════════════════════════════════════╝Hybrid Investigation Approach
错误处理与调查
- Reference existing memory files: Check for previous investigations on similar issues
/docs/memory/ - Investigate as needed: If no relevant documentation exists or the issue is novel, conduct investigation
- Document findings: Record new insights in appropriate memory files for future reference
任务执行过程中遇到错误或意外问题时:
重要 - 仅向前推进的错误恢复:
- ❌ **禁止使用、
git reset、git restore**撤销错误git revert - ✅ 始终通过新的修改向前修复 - 保留完整历史
- ✅ 记录修复过程 - 记录错误发生的原因及解决方法
Error Recovery Workflow
混合调查方法
- Identify the error: Understand the root cause through debugging or investigation
- Consult documentation: Review existing memory files and reference documentation
- Resolve the issue: Apply fixes based on documented patterns or new solutions
- IMPORTANT: Create new changes for fixes, do not rollback
- Update memory: If new patterns or solutions emerge, document them in
/docs/memory/patterns/- Record what went wrong and how it was fixed
- Document lessons learned for future tasks
- Continue execution: Resume task execution after resolving the error
- 参考现有内存文件:检查中是否有针对类似问题的之前调查
/docs/memory/ - 按需调查:若无相关文档或问题为新问题,则进行调查
- 记录发现:将新见解记录到相应的内存文件中,供未来参考
When to Create Memory Files
错误恢复工作流
- New technical patterns: Document reusable solutions in
/docs/memory/patterns/ - Complex investigations: Create investigation files when debugging takes significant effort
- System insights: Record important technical discoveries about the codebase or infrastructure
- 识别错误:通过调试或调查理解根本原因
- 查阅文档:查看现有内存文件与参考文档
- 解决问题:根据文档模式或新解决方案应用修复
- 重要:通过新修改修复,不要回滚
- 更新内存:若出现新模式或解决方案,记录到
/docs/memory/patterns/- 记录问题所在及解决方法
- 记录经验教训,供未来任务使用
- 继续执行:解决错误后恢复任务执行
Final Completion Process (Using Task Tool)
何时创建内存文件
╔═══════════════════════════════════════════════════════════════════════════╗
║ 🚨 CRITICAL PREREQUISITE CHECK ║
║ ║
║ This section is ONLY accessible after: ║
║ 1. Executing "Execution Checkpoints" 3-step procedure (Lines 482-612) ║
║ 2. Passing "Continuation Check Procedure" gate (Lines 614-701) ║
║ 3. Confirming PATH B (Final Completion) - NO '- [ ]' in TODO.md ║
║ ║
║ If '- [ ]' exists → Return to Task Execution Loop (PATH A) ║
║ Only proceed if ALL tasks are '- [x]' (PATH B confirmed) ║
╚═══════════════════════════════════════════════════════════════════════════╝⚠️ MANDATORY VERIFICATION:
This section is ONLY accessible if the Continuation Check Procedure (Lines 614-701) returned PATH B (all tasks complete).
Before proceeding, verify:
- ✅ Continuation Check completed (3-step procedure executed)
- ✅ ALL tasks marked (no
- [x]pattern exists)- [ ] - ✅ No blocked tasks (no markers)
🚧
(See Lines 532-571 in "Execution Checkpoints" for verification code template)
Required steps upon all tasks completion:
- Final update of file specified in $ARGUMENTS:
- Confirm all tasks are in completed state ()
- [x] - Add completion date/time and overall implementation summary
- Record reference information for future maintenance
- Confirm all tasks are in completed state (
- Final consolidation of investigation results:
- Final organization of all investigation results in memory file
- Record project-wide impact and future prospects
- Prepare in a form that can be utilized as reference information for similar tasks
Final Report to User:
After completing all final steps, provide a comprehensive summary:
- ✅ Total tasks completed: [N] out of [N]
- ✅ All tasks status: Complete
- ✅ Files modified: [List of all files]
- ✅ Next steps: [If applicable]
- 新技术模式:将可复用的解决方案记录到
/docs/memory/patterns/ - 复杂调查:调试花费大量时间时创建调查文件
- 系统见解:记录关于代码库或基础设施的重要技术发现
—
最终完成流程(使用Task工具)
—
╔═══════════════════════════════════════════════════════════════════════════╗
║ 🚨 重要前置检查 ║
║ ║
║ 仅在满足以下条件后才能进入此部分: ║
║ 1. 执行了“执行检查点”三步流程(第482-612行) ║
║ 2. 通过了“延续检查流程”关卡(第614-701行) ║
║ 3. 确认路径B(最终完成)- TODO.md中无'- [ ]' ║
║ ║
║ 若存在'- [ ]' → 返回任务执行循环(路径A) ║
║ 仅当所有任务为'- [x]'时才能继续(已确认路径B) ║
╚═══════════════════════════════════════════════════════════════════════════╝⚠️ 必须验证:
仅当延续检查流程(第614-701行)返回路径B(所有任务完成)时,才能进入此部分。
继续前,请验证:
- ✅ 已完成延续检查(执行了三步流程)
- ✅ 所有任务标记为(无
- [x]模式)- [ ] - ✅ 无阻塞任务(无标记)
🚧
(详见“执行检查点”部分第532-571行的验证代码模板)
所有任务完成后的必填步骤:
- 最终更新$ARGUMENTS中指定的文件:
- 确认所有任务处于已完成状态()
- [x] - 添加完成日期/时间与整体实现摘要
- 记录参考信息,供未来维护使用
- 确认所有任务处于已完成状态(
- 最终整合调查结果:
- 在内存文件中最终整理所有调查结果
- 记录项目整体影响与未来展望
- 整理成可作为类似任务参考信息的形式
向用户提交最终报告:
完成所有最终步骤后,提供全面的摘要:
- ✅ 已完成任务总数:[N] / [N]
- ✅ 所有任务状态:已完成
- ✅ 修改的文件:[所有文件列表]
- ✅ 下一步:(如有)