fix: align TodoWrite memory model with task system docs

This commit is contained in:
Gui-Yue
2026-05-21 23:31:30 +08:00
parent 1baf1aca5a
commit 6d48bc978b
17 changed files with 85 additions and 72 deletions

View File

@@ -16,7 +16,7 @@ The agent receives a project: set up a database, write APIs, add tests. It uses
You can't build the roof before laying the foundation. Tasks have ordering. Task dependencies should form a Directed Acyclic Graph (DAG); the teaching version only demonstrates `blockedBy` checking, without cycle detection.
s05's TodoWrite is a list. No dependencies, no persistence — when the conversation ends, the list is gone. What you need is a **task system**: each task is a JSON file, tasks have `blockedBy` dependencies, and they persist across sessions on disk.
s05's TodoWrite is an execution checklist for the current task, kept in session memory. What you need here is a **task system**: each task is a JSON file, tasks have `blockedBy` dependencies, and they persist across sessions on disk.
---
@@ -30,11 +30,13 @@ TodoWrite vs Task System:
| | TodoWrite (s05) | Task System (s12) |
|---|---|---|
| Storage | In-memory list | `.tasks/` JSON files |
| Dependencies | None | `blockedBy` dependency graph |
| Persistence | Lost when conversation ends | Cross-session |
| Multi-agent | None | `owner` field |
| Status | checked / unchecked | pending → in_progress → completed |
| Role | Execution checklist for the current task | Recoverable task system |
| Storage | In-process / session state | `.tasks/{id}.json` |
| Dependencies | None | `blockedBy` / `blocks` graph |
| Lifecycle | Current session / current task | Cross-session |
| Coordination | No task claiming | `owner` / claim |
| Status | pending / in_progress / completed | pending / in_progress / completed |
| Granularity | The agent's own steps | Tasks that can be claimed, tracked, and unblocked |
---

View File

@@ -16,7 +16,7 @@ Agent がプロジェクトを受けたデータベース構築、API 実装
屋根を先に建てて基礎を後から打つことはできない。タスクには順序がある。タスクの依存関係は有向非巡回グラフDAGを形成すべき教学版は `blockedBy` チェックのみをデモし、循環検出は実装していない。
s05 の TodoWrite はリスト。依存関係も永続化もなく、会話が終わればリストも消える。必要なのは**タスクシステム**:各タスクは JSON ファイル、タスク間に `blockedBy` 依存関係、ディスク上でセッションをまたいで永続化。
s05 の TodoWrite は現在のタスクの実行チェックリストで、セッションメモリに保持される。ここで必要なのは**タスクシステム**:各タスクは JSON ファイル、タスク間に `blockedBy` 依存関係、ディスク上でセッションをまたいで永続化。
---
@@ -30,11 +30,13 @@ TodoWrite vs Task System
| | TodoWrite (s05) | Task System (s12) |
|---|---|---|
| ストレージ | メモリ内リスト | `.tasks/` JSON ファイル |
| 依存関係 | なし | `blockedBy` 依存グラフ |
| 永続性 | 会話終了で消失 | セッション横断 |
| マルチ Agent | なし | `owner` フィールド |
| ステータス | checked / unchecked | pending → in_progress → completed |
| 位置づけ | 現在のタスクの実行チェックリスト | 復旧可能なタスクシステム |
| ストレージ | プロセス内 / セッション状態 | `.tasks/{id}.json` |
| 依存関係 | なし | `blockedBy` / `blocks` グラフ |
| ライフサイクル | 現在のセッション / 現在のタスク | セッション横断 |
| 分担 | タスク認識を扱わない | `owner` / claim |
| ステータス | pending / in_progress / completed | pending / in_progress / completed |
| 粒度 | Agent 自身の手順 | 認識・追跡・アンロックできるタスク |
---

View File

@@ -16,7 +16,7 @@ Agent 接到一个项目:搭数据库、写 API、加测试。它用 s05 的 T
盖房子不能先盖屋顶再打地基。任务之间有先后。任务依赖应该形成有向无环图DAG教学版只演示 `blockedBy` 检查,没有实现环检测。
s05 的 TodoWrite 是一个列表。没有依赖关系、没有持久化、对话结束列表就没了。你需要的是**任务系统**:每个任务是一个 JSON 文件,任务之间有 `blockedBy` 依赖,跨会话持久化在磁盘上。
s05 的 TodoWrite 是当前任务的执行清单,保存在会话内存中。这里需要的是**任务系统**:每个任务是一个 JSON 文件,任务之间有 `blockedBy` 依赖,跨会话持久化在磁盘上。
---
@@ -30,11 +30,13 @@ TodoWrite vs Task System
| | TodoWrite (s05) | Task System (s12) |
|---|---|---|
| 存储 | 内存列表 | `.tasks/` JSON 文件 |
| 依赖 | 无 | `blockedBy` 依赖图 |
| 持久性 | 对话结束即丢 | 跨会话 |
| 多 Agent | 无 | `owner` 字段 |
| 状态 | checked / unchecked | pending → in_progress → completed |
| 定位 | 当前任务的执行清单 | 可恢复的任务系统 |
| 存储 | 进程内 / 会话状态 | `.tasks/{id}.json` |
| 依赖 | 无 | `blockedBy` / `blocks` 依赖图 |
| 生命周期 | 当前会话 / 当前任务 | 跨会话保留 |
| 分工 | 不负责任务认领 | `owner` / claim |
| 状态 | pending / in_progress / completed | pending / in_progress / completed |
| 粒度 | Agent 自己的步骤 | 可被认领、追踪、解锁的任务 |
---
@@ -277,4 +279,4 @@ CC 的任务系统有四个工具(不是教学版的一个通用 Task 工具
</details>
<!-- translation-sync: zh@v1, en@v0, ja@v0 -->
<!-- translation-sync: zh@v1, en@v1, ja@v1 -->