Persist task context across sessions and channels by maintaining per-task files.
Each task gets a single markdown file in tasks/. The file IS the memory —
independent of session history, compaction, or channel.
SituationActionNew task/project mentionedCreate task file + update indexProgress/decision on existing taskUpdate that task fileSession start (bootstrap)Read _INDEX.mdUser references a taskRead that task file, respond with contextUser signals leaving ("先这样", "回家再说")Ensure all discussed tasks are updated
Location: {workspace}/tasks/
text
tasks/
├── _INDEX.md # Task index (auto-maintained)
├── project-alpha.md # One file per task
└── weekly-report.md
markdown
# [Task Name]
- **状态:** 进行中 | 暂停 | 待启动 | 已完成 | 已搁置
- **优先级:** 高 | 中 | 低
- **创建时间:** YYYY-MM-DD
- **最后更新:** YYYY-MM-DD
- **标签:** #tag1 #tag2
## 目标
[One sentence: what this task achieves]
## 背景
[Why this task exists, origin context]
## 进展记录
### YYYY-MM-DD
- What was done
- Key decisions made
## 待办
- [ ] TODO item
- [x] Completed item
## 关键信息
[Core facts that must persist: configs, links, accounts, constraints]
## 相关文件
- File description: path/to/file
Rules:
[x] when complete_INDEX.md)#markdown
# 任务索引
## 🟢 进行中
| 任务 | 状态 | 最后更新 | 优先级 |
|------|------|---------|--------|
## 🟡 暂停
| 任务 | 状态 | 最后更新 | 优先级 |
|------|------|---------|--------|
## ⚪ 已完成
| 任务 | 完成时间 |
|------|---------|
Maintain this file whenever a task's status changes.
tasks/{task-name}.md using the template above_INDEX.md under 进行中_INDEX.md_INDEX.mdtasks/archive/_INDEX.md- for spaces