tasks-cli-rs 0.10.0

Markdown-based TODO task management CLI: each task is a Markdown file with YAML front matter
# tasks-cli-rs v0.1 Roadmap

## 已确认决策

| 项目 | 决策 |
|------|------|
| 范围 | 增删查改 + 编辑 + 详情 + 多库 + 过滤搜索 |
| 编辑 | `$EDITOR` 打开 .md + `tasks set` 字段级修改,都要 |
| ID | 短 ID(UUID 前 8 位)或顺序编号 |
| Schema | 一步到位,完整元数据(含 steps) |
| 过滤 | status / tag / priority / due / 文本搜索,语法简洁 |
| 验收 | 编译通过 + 单元测试 + 功能测试 |
| 模式 | 一人、milestone 驱动、逐步迭代 |
| 推迟项 | 同步(GitHub/WebDAV)、Kanban、stats、remind、steps DAG 拓扑 |

## Milestones

### M0 — 项目脚手架
- [x] 0.1 `cargo init`,依赖:clap, serde, serde_yaml, chrono, uuid, dirs, thiserror
- [x] 0.2 模块划分:`cli/`, `model/`, `storage/`, `library/`, `editor/`, `filter/`
- [x] 0.3 全局 config 加载(`~/.tasks-cli/config.toml`,默认值 + 用户覆盖,单测)

### M1 — 数据模型与存储层
- [x] 1.1 `Task` struct:id, title, status, priority, tags, created_at, started_at, due_date, completed_at, steps, body
- [x] 1.2 `Step` struct:id, title, status, due_date, depends_on
- [x] 1.3 YAML front matter + Markdown body 解析/写入(round-trip 单测)
- [x] 1.4 短 ID(UUID 前 8 位)+ 顺序编号映射(`.tasks-meta.toml` 计数器)
- [x] 1.5 slug 文件命名(中文/特殊字符处理)

### M2 — Library 管理
- [x] 2.1 `libraries.toml` 读写(name → path + current)
- [x] 2.2 `tasks lib add <name> <path>`
- [x] 2.3 `tasks lib list` / `tasks lib current`
- [x] 2.4 `tasks lib use <name>`
- [x] 2.5 `tasks lib remove <name>`(不删文件)

### M3 — 核心 CRUD
- [x] 3.1 `tasks new "title" [--priority] [--tag] [--due]`
- [x] 3.2 `tasks list [--dir]` 表格输出
- [x] 3.3 `tasks show <id>`(含 steps 进度)
- [x] 3.4 `tasks delete <id> [--force]`

### M4 — 生命周期与字段修改
- [x] 4.1 `tasks start/done/cancel/status` 状态流转 + 时间戳(状态机单测)
- [x] 4.2 `tasks set <id> --title/--priority/--due/--tag-add/--tag-remove`

### M5 — 编辑器集成
- [x] 5.1 检测链:`--editor` > `TASKS_EDITOR` > config > `$VISUAL` > `$EDITOR` > auto(SSH 判断)
- [x] 5.2 `tasks edit <id>`(保存后重新解析验证)
- [x] 5.3 `tasks edit --lib`

### M6 — 过滤、搜索与标签
- [x] 6.1 `tasks list --status/--tag/--priority/--due-before/--due-after` 组合过滤
- [x] 6.2 `tasks search "keyword"`(标题 + body)
- [x] 6.3 `tasks tag add/remove/list`

### M7 — 收尾
- [x] 7.1 thiserror 统一错误处理,无 panic 路径
- [x] 7.2 集成测试:new → start → set → done → list 完整工作流
- [x] 7.3 `--help` 文案、README 更新

## 执行顺序

```
M0 → M1 → M2 → M3 → M4 → (M5 | M6 并行) → M7
```