diff --git a/docs/wave-2026-03-scope.md b/docs/wave-2026-03-scope.md new file mode 100644 index 0000000..49011df --- /dev/null +++ b/docs/wave-2026-03-scope.md @@ -0,0 +1,106 @@ +# 本波开发范围说明 + +> Date: 2026-03-29 +> Wave: 2026-03 (Calendar & Proposal 重构) + +--- + +## 一、两条功能线概述 + +本波开发包含两条独立的功能线: + +### 功能线 1:Calendar 日程系统(独立功能线) + +全新功能模块,为 HarborForge 增加日程调度能力。 + +**包含内容:** +- `TimeSlot` 日程槽模型与 CRUD API +- `SchedulePlan` 周期性计划模型与管理 API +- Agent 状态管理(Idle / Busy / OnCall / Exhausted / Offline) +- `MinimumWorkload` 最小工作量配置 +- Plan 虚拟 slot 标识与物化策略 +- Overlap 校验与 Workload warning 规则 +- 不可变过去 slot 规则 +- Agent 心跳唤醒机制与 Exhausted 恢复 +- 前端 Calendar 页面 +- CLI `hf calendar` 命令组 +- OpenClaw 插件 Calendar 心跳联动 + +### 功能线 2:Proposal / Essential / Story restricted(项目结构调整线) + +对已有的 Propose 流程进行重构和增强。 + +**包含内容:** +- `Propose` → `Proposal` 统一重命名 +- 新增 `Essential` 概念及数据模型 +- `EssentialCode` 编码规则 +- Proposal Accept 语义变更:遍历 Essential 批量生成 story task +- `story/*` 整个大类设为 restricted,仅允许通过 Proposal Accept 创建 +- 清理旧 `feat_task_id` 语义 +- 前端 Proposal 详情页 Essential 管理 +- CLI Proposal Essential 子命令 + +--- + +## 二、两条线的交叉点 + +两条功能线设计上相互独立,交叉点仅限于以下层面: + +| 交叉点 | 说明 | +|--------|------| +| `event_data` | Calendar 的 TimeSlot 通过 `event_data` JSON 字段引用 Task/Essential code,但不直接依赖 Proposal/Essential 的数据模型 | +| Agent 调度引用层 | Calendar 心跳唤醒 Agent 执行任务时,任务可能是 story task(由 Proposal Accept 生成),但 Calendar 只关心 task code,不关心其来源 | + +**关键原则:** +- Calendar 不直接 FK 到 Essential 或 Proposal 表 +- Proposal/Essential 不直接 FK 到 TimeSlot 或 SchedulePlan 表 +- 两者通过 code 引用(字符串)松耦合 +- 可以独立开发、独立测试、独立部署 + +--- + +## 三、本波必须完成 vs 仅设计保留 + +### ✅ 必须本波完成 + +#### Calendar 线 + +| 范围 | 任务 ID 区间 | 说明 | +|------|-------------|------| +| 后端基础模型 | BE-CAL-001 ~ BE-CAL-008 | TimeSlot、SchedulePlan、Agent 扩展、MinimumWorkload、物化策略、overlap/warning/不可变规则 | +| 后端 API | BE-CAL-API-001 ~ BE-CAL-API-007 | 日程 CRUD、计划 CRUD、date-list | +| 后端 Agent 协作 | BE-AGT-001 ~ BE-AGT-004 | 心跳查询、状态流转、多 slot 竞争、Exhausted 恢复 | +| 前端 | FE-CAL-001 ~ FE-CAL-005 | 页面骨架、slot 列表、计划列表、CRUD 交互、状态提示 | +| CLI | CLI-CAL-001 ~ CLI-CAL-010 | `hf calendar` 全部子命令 | +| 插件 | PLG-CAL-001 ~ PLG-CAL-004 | 心跳格式、唤醒处理、Deferred 分支、ScheduledGatewayRestart | + +#### Proposal 线 + +| 范围 | 任务 ID 区间 | 说明 | +|------|-------------|------| +| 后端 | BE-PR-001 ~ BE-PR-011 | 重命名、Essential 模型/schema/API、Accept 重构、story restricted、测试 | +| 前端 | FE-PR-001 ~ FE-PR-005 | 重命名、Essential 列表/表单、Accept milestone 选择、story 限制 | +| CLI | CLI-PR-001 ~ CLI-PR-004 | 重命名、Essential 命令、Accept 更新、story 限制 | + +#### 文档与测试 + +| 范围 | 任务 ID 区间 | 说明 | +|------|-------------|------| +| 文档 | DOC-001 ~ DOC-003 | 范围说明、迁移说明、验收清单 | +| 测试 | TEST-* | 各子模块测试补充 | + +### 📐 仅设计保留(不在本波实现) + +| 内容 | 说明 | +|------|------| +| Entertainment 事件子类型 | `event_data` 中 Entertainment 的具体结构待设计 | +| 用户级时区支持 | 本波统一使用服务器时区 | +| 前端日程表详细 UI 设计 | 本波实现基础功能骨架,精细 UI 留后续迭代 | +| Agent 唤醒的提示词模板 | 本波实现唤醒机制,提示词模板留后续打磨 | +| Proposal/Essential 数据迁移工具 | 旧数据兼容读取即可,自动化迁移工具留后续 | + +--- + +## 四、Bug Fix(附带修复) + +- **acc-mgr 密码修改限制**:后端禁止修改 acc-mgr 用户密码;前端隐藏修改密码入口 diff --git a/plans/TASKLIST.md b/plans/TASKLIST.md index f08debf..a344d65 100644 --- a/plans/TASKLIST.md +++ b/plans/TASKLIST.md @@ -1,379 +1,379 @@ # TASKLIST.md -> 说明:如果某个进行中的 Task 没有完全完成,或者在执行过程中遇到 block,需要在该 Task 下继续拆分若干子 TODO item:本次开发中已经完成的部分标记为已完成,block / pending / 尚未完成的部分标记为未完成。 +> 说明:如果某个进行中的 Task 没有完全完成,或者在执行过程中遇到 block,需要在该 Task 下继续拆分若干子 TODO item:本次开发中已经完成的部分标记为已完成,block / pending / 尚未完成的部分标记为未完成。 > -> 拆分原则:尽量保证 Task 之间相互独立;每个 Task 最好只改动一个子模块(如 `HarborForge.Backend` / `HarborForge.Frontend` / `HarborForge.Cli` / `HarborForge.OpenclawPlugin` / 根目录文档),避免一次任务同时横跨多个子模块。只有在确实无法避免时,才建立跨模块 Task。 +> 拆分原则:尽量保证 Task 之间相互独立;每个 Task 最好只改动一个子模块(如 `HarborForge.Backend` / `HarborForge.Frontend` / `HarborForge.Cli` / `HarborForge.OpenclawPlugin` / 根目录文档),避免一次任务同时横跨多个子模块。只有在确实无法避免时,才建立跨模块 Task。 --- # TODOLIST -## A. Root / Docs(根目录与规划文档) +## A. Root / Docs(根目录与规划文档) -- [ ] DOC-001:整理本波开发范围说明(root docs only) - - [ ] 明确 Calendar 属于独立功能线 - - [ ] 明确 Proposal / Essential 属于项目结构调整线 - - [ ] 明确两条线的交叉点仅限 `event_data` / Agent 调度引用层 - - [ ] 将“必须本波完成”和“仅设计保留”区分写清楚 +- [x] DOC-001:整理本波开发范围说明(root docs only) + - [x] 明确 Calendar 属于独立功能线 + - [x] 明确 Proposal / Essential 属于项目结构调整线 + - [x] 明确两条线的交叉点仅限 `event_data` / Agent 调度引用层 + - [x] 将"必须本波完成"和"仅设计保留"区分写清楚 -- [ ] DOC-002:整理 Proposal / Essential / Story restricted 的迁移说明(root docs only) +- [ ] DOC-002:整理 Proposal / Essential / Story restricted 的迁移说明(root docs only) - [ ] 说明 `Propose -> Proposal` 的命名调整 - [ ] 说明 `Proposal Accept` 语义变化 - [ ] 说明 `story/*` 改为 restricted 的影响面 - [ ] 说明旧数据和旧接口的兼容策略 -- [ ] DOC-003:整理 Calendar 验收清单(root docs only) +- [ ] DOC-003:整理 Calendar 验收清单(root docs only) - [ ] 列出后端验收项 - [ ] 列出前端验收项 - [ ] 列出 CLI 验收项 - [ ] 列出插件联动验收项 -## B. HarborForge.Backend — Proposal / Essential / Story restricted +## B. HarborForge.Backend - Proposal / Essential / Story restricted -- [ ] BE-PR-001:后端统一重命名 `Propose` 概念为 `Proposal`(backend only) +- [ ] BE-PR-001:后端统一重命名 `Propose` 概念为 `Proposal`(backend only) - [ ] 盘点 `models / schemas / routers / services / tests` 中 `propose` 命名 - [ ] 明确保留兼容别名还是直接切换 - [ ] 输出重命名影响清单 -- [ ] BE-PR-002:新增 Proposal 数据模型调整(backend only) +- [ ] BE-PR-002:新增 Proposal 数据模型调整(backend only) - [ ] 调整 Proposal 模型命名与字段注释 - [ ] 确认 Proposal 与 `project_id / created_by_id / feat_task_id` 的后续关系 - [ ] 标记 `feat_task_id` 是否废弃或替换 -- [ ] BE-PR-003:新增 Essential 模型(backend only) +- [ ] BE-PR-003:新增 Essential 模型(backend only) - [ ] 新增 `Essential` SQLAlchemy model - [ ] 增加 `proposal_id` 外键 - [ ] 增加 `essential_code` - [ ] 增加 `type / title / description / created_by_id / created_at / updated_at` -- [ ] BE-PR-004:实现 EssentialCode 编码规则(backend only) +- [ ] BE-PR-004:实现 EssentialCode 编码规则(backend only) - [ ] 参考现有 `ProjectCode / MilestoneCode / TaskCode / ProposeCode` 生成方式 - [ ] 设计 Essential code 前缀 - [ ] 实现唯一编号生成逻辑 - [ ] 明确是否需要独立 counter 表 -- [ ] BE-PR-005:新增 Essential 的 schema 定义(backend only) +- [ ] BE-PR-005:新增 Essential 的 schema 定义(backend only) - [ ] 新增 create schema - [ ] 新增 update schema - [ ] 新增 response schema - [ ] 新增 Proposal detail 中嵌套 Essential 的返回结构 -- [ ] BE-PR-006:新增 Proposal 下 Essential CRUD API(backend only) +- [ ] BE-PR-006:新增 Proposal 下 Essential CRUD API(backend only) - [ ] 实现创建 Essential - [ ] 实现编辑 Essential - [ ] 实现删除 Essential - [ ] 实现 Proposal 详情返回 Essential 列表 -- [ ] BE-PR-007:重构 Proposal Accept 逻辑(backend only) - - [ ] 移除“accept 后生成单个 `story/feature` task”的旧逻辑 +- [ ] BE-PR-007:重构 Proposal Accept 逻辑(backend only) + - [ ] 移除"accept 后生成单个 `story/feature` task"的旧逻辑 - [ ] Accept 时要求显式选择目标 Milestone - [ ] 遍历 Proposal 下全部 Essential - [ ] 按 Essential.type 生成对应 `story/*` task - [ ] 保证批量创建在一个事务中完成 -- [ ] BE-PR-008:补充 Proposal Accept 追踪字段/关系(backend only) +- [ ] BE-PR-008:补充 Proposal Accept 追踪字段/关系(backend only) - [ ] 明确 Proposal 与生成 tasks 的映射方式 - [ ] 设计是用反查字段、关联表还是事件记录 - [ ] 实现最小可用追踪能力 -- [ ] BE-PR-009:收紧 Task 类型规则,限制全部 `story/*`(backend only) +- [ ] BE-PR-009:收紧 Task 类型规则,限制全部 `story/*`(backend only) - [ ] 更新 `TASK_SUBTYPE_MAP` 相关约束 - [ ] 将所有 `story/*` 组合标记为 restricted - [ ] 禁止通用 create endpoint 直接创建任何 story - [ ] 保留内部受控入口用于 Proposal Accept -- [ ] BE-PR-010:清理旧的 `feat_task_id` 语义(backend only) +- [ ] BE-PR-010:清理旧的 `feat_task_id` 语义(backend only) - [ ] 判断字段是否保留但废弃 - - [ ] 如果废弃,给出兼容读取策略 - - [ ] 如果替换,落地新的字段或关联方式 + - [ ] 如果废弃,给出兼容读取策略 + - [ ] 如果替换,落地新的字段或关联方式 -- [ ] BE-PR-011:补 Proposal / Essential / Story restricted 的后端测试(backend only) +- [ ] BE-PR-011:补 Proposal / Essential / Story restricted 的后端测试(backend only) - [ ] Essential CRUD 测试 - [ ] Proposal Accept 批量生成 story task 测试 - [ ] 非受控入口创建 `story/*` 的失败测试 - [ ] 兼容旧 proposal 数据的测试 -## C. HarborForge.Backend — Calendar 基础模型与规则 +## C. HarborForge.Backend - Calendar 基础模型与规则 -- [ ] BE-CAL-001:新增 Calendar 基础模型 `TimeSlot`(backend only) +- [ ] BE-CAL-001:新增 Calendar 基础模型 `TimeSlot`(backend only) - [ ] 新增表结构 - [ ] 定义 slot status / slot type / event type 枚举 - [ ] 定义时间字段与时长字段 - [ ] 定义 `plan_id` 关联 -- [ ] BE-CAL-002:新增 Calendar 基础模型 `SchedulePlan`(backend only) +- [ ] BE-CAL-002:新增 Calendar 基础模型 `SchedulePlan`(backend only) - [ ] 新增表结构 - [ ] 定义 `at_time / on_day / on_week / on_month` - [ ] 加入层级参数校验约束 - [ ] 处理 user 归属关系 -- [ ] BE-CAL-003:新增 Agent 扩展字段(backend only) +- [ ] BE-CAL-003:新增 Agent 扩展字段(backend only) - [ ] 为 Agent 增加 `status / last_heartbeat` - [ ] 增加 `exhausted_at / recovery_at / exhaust_reason` - [ ] 明确与现有 user / monitor 标识的关系 -- [ ] BE-CAL-004:实现 MinimumWorkload 存储方案(backend only) +- [ ] BE-CAL-004:实现 MinimumWorkload 存储方案(backend only) - [ ] 确定 JSON 字段还是独立表 - [ ] 实现用户级配置读写 - [ ] 提供后续校验调用入口 -- [ ] BE-CAL-005:实现 Plan 虚拟 slot 标识与物化策略(backend only) +- [ ] BE-CAL-005:实现 Plan 虚拟 slot 标识与物化策略(backend only) - [ ] 实现 `plan-{plan_id}-{date}` 标识规则 - [ ] 实现虚拟 slot 转真实 slot 的物化逻辑 - [ ] 实现 edit / cancel 后断开 plan 关联 -- [ ] BE-CAL-006:实现 Calendar overlap 校验(backend only) +- [ ] BE-CAL-006:实现 Calendar overlap 校验(backend only) - [ ] 校验同日时间冲突 - [ ] 返回明确的冲突错误信息 - [ ] 区分 create 与 edit 两种场景 -- [ ] BE-CAL-007:实现 MinimumWorkload warning 规则(backend only) +- [ ] BE-CAL-007:实现 MinimumWorkload warning 规则(backend only) - [ ] 计算 daily / weekly / monthly / yearly 工作量 - - [ ] 不阻止提交,仅返回 warning + - [ ] 不阻止提交,仅返回 warning - [ ] 统一 warning 数据结构 -- [ ] BE-CAL-008:实现不可修改过去 slot 的规则(backend only) +- [ ] BE-CAL-008:实现不可修改过去 slot 的规则(backend only) - [ ] 禁止 edit 过去 slot - [ ] 禁止 cancel 过去 slot - [ ] 保证 plan-edit / plan-cancel 不追溯过去已物化 slot -## D. HarborForge.Backend — Calendar API +## D. HarborForge.Backend - Calendar API -- [ ] BE-CAL-API-001:实现单次日程创建 API(backend only) +- [ ] BE-CAL-API-001:实现单次日程创建 API(backend only) - [ ] 创建 slot - [ ] 支持 job/system/event_data - [ ] 接入 overlap 与 workload warning -- [ ] BE-CAL-API-002:实现某日 Calendar 查询 API(backend only) +- [ ] BE-CAL-API-002:实现某日 Calendar 查询 API(backend only) - [ ] 返回真实 slot - [ ] 合成当日 plan 虚拟 slot - [ ] 输出统一排序结构 -- [ ] BE-CAL-API-003:实现 Calendar 编辑 API(backend only) +- [ ] BE-CAL-API-003:实现 Calendar 编辑 API(backend only) - [ ] 支持真实 slot 编辑 - [ ] 支持虚拟 slot 编辑并触发物化 - [ ] 返回编辑后的真实结果 -- [ ] BE-CAL-API-004:实现 Calendar 取消 API(backend only) +- [ ] BE-CAL-API-004:实现 Calendar 取消 API(backend only) - [ ] 支持真实 slot cancel - [ ] 支持虚拟 slot cancel 并触发物化 - [ ] 处理状态字段更新 -- [ ] BE-CAL-API-005:实现 plan-schedule / plan-list API(backend only) +- [ ] BE-CAL-API-005:实现 plan-schedule / plan-list API(backend only) - [ ] 创建计划 - [ ] 列出计划 - [ ] 返回计划规则字段 -- [ ] BE-CAL-API-006:实现 plan-edit / plan-cancel API(backend only) +- [ ] BE-CAL-API-006:实现 plan-edit / plan-cancel API(backend only) - [ ] 编辑计划 - [ ] 取消计划 - [ ] 不追溯已物化过去数据 -- [ ] BE-CAL-API-007:实现 date-list API(backend only) +- [ ] BE-CAL-API-007:实现 date-list API(backend only) - [ ] 仅列出有已物化未来 slot 的日期 - [ ] 排除纯 plan 未物化日期 -## E. HarborForge.Backend — Agent / Plugin Calendar 协作 +## E. HarborForge.Backend - Agent / Plugin Calendar 协作 -- [ ] BE-AGT-001:定义心跳查询待执行 slot 的服务层(backend only) +- [ ] BE-AGT-001:定义心跳查询待执行 slot 的服务层(backend only) - [ ] 筛选当天 `NotStarted / Deferred` - [ ] 仅返回 `scheduled_at` 已过的 slot - [ ] 按优先级排序 -- [ ] BE-AGT-002:实现 Agent 状态流转服务(backend only) +- [ ] BE-AGT-002:实现 Agent 状态流转服务(backend only) - [ ] Idle -> Busy / OnCall - [ ] Busy / OnCall -> Idle - [ ] 超时无心跳 -> Offline - [ ] API 配额错误 -> Exhausted -- [ ] BE-AGT-003:实现多 slot 竞争处理(backend only) +- [ ] BE-AGT-003:实现多 slot 竞争处理(backend only) - [ ] 选最高 priority 执行 - [ ] 其余 slot 标记 Deferred - [ ] Deferred slot 自动 priority += 1 -- [ ] BE-AGT-004:实现 Exhausted 恢复时间解析(backend only) +- [ ] BE-AGT-004:实现 Exhausted 恢复时间解析(backend only) - [ ] 解析 retry-after / reset in / resets at - [ ] 解析失败时默认 5 小时 - [ ] 到期恢复 Idle -## F. HarborForge.Frontend — Proposal / Essential / Story restricted +## F. HarborForge.Frontend - Proposal / Essential / Story restricted -- [ ] FE-PR-001:前端统一重命名 Propose -> Proposal(frontend only) +- [ ] FE-PR-001:前端统一重命名 Propose -> Proposal(frontend only) - [ ] 调整页面标题与菜单文案 - [ ] 调整类型名与 API 调用命名 - [ ] 清理旧 propose 文案 -- [ ] FE-PR-002:Proposal 详情页增加 Essential 列表区(frontend only) +- [ ] FE-PR-002:Proposal 详情页增加 Essential 列表区(frontend only) - [ ] 展示 Essential 列表 - [ ] 展示 Essential type / code / title - [ ] 处理空状态 -- [ ] FE-PR-003:新增 Essential 创建/编辑表单(frontend only) +- [ ] FE-PR-003:新增 Essential 创建/编辑表单(frontend only) - [ ] 创建表单 - [ ] 编辑表单 - [ ] type 选择器 - [ ] 提交后局部刷新 -- [ ] FE-PR-004:Proposal Accept 增加目标 Milestone 选择(frontend only) +- [ ] FE-PR-004:Proposal Accept 增加目标 Milestone 选择(frontend only) - [ ] Accept 前展示 milestone 选择控件 - [ ] 校验必须选择 milestone - [ ] 展示 Accept 成功后的生成结果 -- [ ] FE-PR-005:限制前端直接创建 `story/*`(frontend only) +- [ ] FE-PR-005:限制前端直接创建 `story/*`(frontend only) - [ ] 从 Task 创建入口移除 story - [ ] 或将 story 整体设为不可选 - [ ] 调整相关提示文案 -## G. HarborForge.Frontend — Calendar +## G. HarborForge.Frontend - Calendar -- [ ] FE-CAL-001:新增 Calendar 页面基础骨架(frontend only) +- [ ] FE-CAL-001:新增 Calendar 页面基础骨架(frontend only) - [ ] 增加路由入口 - [ ] 增加侧边栏入口 - [ ] 增加基础页面布局 -- [ ] FE-CAL-002:实现某日 slot 列表展示(frontend only) +- [ ] FE-CAL-002:实现某日 slot 列表展示(frontend only) - [ ] 展示时间轴或列表 - [ ] 区分真实 slot 与 plan 虚拟 slot - [ ] 展示状态 / 类型 / 时长 / 优先级 -- [ ] FE-CAL-003:实现计划列表展示(frontend only) +- [ ] FE-CAL-003:实现计划列表展示(frontend only) - [ ] 展示计划规则 - [ ] 展示周期参数 - [ ] 支持跳转编辑 -- [ ] FE-CAL-004:实现创建 / 编辑 / 取消日程交互(frontend only) +- [ ] FE-CAL-004:实现创建 / 编辑 / 取消日程交互(frontend only) - [ ] 新建 slot 表单 - [ ] 编辑 slot 表单 - [ ] cancel 操作确认 - [ ] 展示后端 warning -- [ ] FE-CAL-005:实现 Deferred / Exhausted / overlap 等状态提示(frontend only) +- [ ] FE-CAL-005:实现 Deferred / Exhausted / overlap 等状态提示(frontend only) - [ ] Deferred 提示 - [ ] overlap 报错展示 - [ ] workload warning 展示 - [ ] Exhausted 状态展示 -## H. HarborForge.Cli — Proposal / Essential / Story restricted +## H. HarborForge.Cli - Proposal / Essential / Story restricted -- [ ] CLI-PR-001:统一 CLI 文案 `propose -> proposal`(cli only) +- [ ] CLI-PR-001:统一 CLI 文案 `propose -> proposal`(cli only) - [ ] 调整命令 help 文案 - [ ] 调整输出文本 - [ ] 评估命令名是否兼容保留 `hf propose` -- [ ] CLI-PR-002:新增 Essential 相关命令(cli only) +- [ ] CLI-PR-002:新增 Essential 相关命令(cli only) - [ ] `hf proposal essential list` - [ ] `hf proposal essential create` - [ ] `hf proposal essential update` - [ ] `hf proposal essential delete` -- [ ] CLI-PR-003:更新 Proposal Accept CLI(cli only) +- [ ] CLI-PR-003:更新 Proposal Accept CLI(cli only) - [ ] Accept 时支持传入 milestone - [ ] 展示批量生成的 task 结果 - [ ] 更新帮助文案 -- [ ] CLI-PR-004:限制 CLI 直接创建 `story/*`(cli only) +- [ ] CLI-PR-004:限制 CLI 直接创建 `story/*`(cli only) - [ ] 阻止 story 类型直建 - [ ] 返回明确错误提示 - [ ] 提示改走 Proposal Accept -## I. HarborForge.Cli — Calendar +## I. HarborForge.Cli - Calendar -- [ ] CLI-CAL-001:新增 `hf calendar` 命令组骨架(cli only) +- [ ] CLI-CAL-001:新增 `hf calendar` 命令组骨架(cli only) - [ ] 注册命令组 - [ ] 增加 help surface - [ ] 增加 brief help -- [ ] CLI-CAL-002:实现 `hf calendar schedule`(cli only) +- [ ] CLI-CAL-002:实现 `hf calendar schedule`(cli only) - [ ] 参数解析 - [ ] 请求构造 - [ ] 结果输出 -- [ ] CLI-CAL-003:实现 `hf calendar show`(cli only) +- [ ] CLI-CAL-003:实现 `hf calendar show`(cli only) - [ ] 日期参数 - [ ] 列表输出 - [ ] JSON 输出 -- [ ] CLI-CAL-004:实现 `hf calendar edit`(cli only) +- [ ] CLI-CAL-004:实现 `hf calendar edit`(cli only) - [ ] 支持 slot-id 与 date - [ ] PATCH/POST 适配 - [ ] 输出 warning / error -- [ ] CLI-CAL-005:实现 `hf calendar cancel`(cli only) +- [ ] CLI-CAL-005:实现 `hf calendar cancel`(cli only) - [ ] 支持 slot-id 与 date - [ ] 输出结果 -- [ ] CLI-CAL-006:实现 `hf calendar date-list`(cli only) +- [ ] CLI-CAL-006:实现 `hf calendar date-list`(cli only) - [ ] 列出未来已物化日期 - [ ] 适配 JSON 输出 -- [ ] CLI-CAL-007:实现 `hf calendar plan-schedule`(cli only) +- [ ] CLI-CAL-007:实现 `hf calendar plan-schedule`(cli only) - [ ] 参数解析 `--at --on-day --on-week --on-month` - [ ] 请求构造 - [ ] 输出结果 -- [ ] CLI-CAL-008:实现 `hf calendar plan-list`(cli only) +- [ ] CLI-CAL-008:实现 `hf calendar plan-list`(cli only) - [ ] 列表输出 - [ ] JSON 输出 -- [ ] CLI-CAL-009:实现 `hf calendar plan-edit`(cli only) +- [ ] CLI-CAL-009:实现 `hf calendar plan-edit`(cli only) - [ ] 参数解析 - [ ] 请求发送 - [ ] 输出结果 -- [ ] CLI-CAL-010:实现 `hf calendar plan-cancel`(cli only) +- [ ] CLI-CAL-010:实现 `hf calendar plan-cancel`(cli only) - [ ] 参数解析 - [ ] 请求发送 - [ ] 输出结果 ## J. HarborForge.OpenclawPlugin / Monitor 联动 -- [ ] PLG-CAL-001:插件侧定义 Calendar 心跳请求格式(plugin only) +- [ ] PLG-CAL-001:插件侧定义 Calendar 心跳请求格式(plugin only) - [ ] 明确 claw_identifier 传递方式 - [ ] 明确 agent_id 传递方式 - [ ] 明确返回 slot 列表结构 -- [ ] PLG-CAL-002:插件侧处理待执行 slot 唤醒(plugin only) +- [ ] PLG-CAL-002:插件侧处理待执行 slot 唤醒(plugin only) - [ ] Idle 时唤醒 agent - [ ] 透传任务上下文 - [ ] 执行前更新 attended / started_at / status -- [ ] PLG-CAL-003:插件侧处理非 Idle / Deferred 分支(plugin only) +- [ ] PLG-CAL-003:插件侧处理非 Idle / Deferred 分支(plugin only) - [ ] Agent 非 Idle 时上报 Deferred - [ ] 处理多 slot 重排后的重新规划 -- [ ] PLG-CAL-004:插件侧处理 ScheduledGatewayRestart(plugin only) +- [ ] PLG-CAL-004:插件侧处理 ScheduledGatewayRestart(plugin only) - [ ] 收到事件后持久化状态 - [ ] 发送最终心跳 - [ ] 暂停定时任务 -## K. Tests / Integration(按子模块分别补,不混做) +## K. Tests / Integration(按子模块分别补,不混做) -- [ ] TEST-BE-CAL-001:补 Calendar backend 测试(backend tests only) +- [ ] TEST-BE-CAL-001:补 Calendar backend 测试(backend tests only) - [ ] 模型测试 - [ ] API 测试 - [ ] overlap / warning / materialize 测试 -- [ ] TEST-BE-PR-001:补 Proposal / Essential backend 测试(backend tests only) +- [ ] TEST-BE-PR-001:补 Proposal / Essential backend 测试(backend tests only) - [ ] Essential CRUD - [ ] Accept 生成 story tasks - [ ] story restricted -- [ ] TEST-FE-CAL-001:补 Calendar 前端测试(frontend tests only) +- [ ] TEST-FE-CAL-001:补 Calendar 前端测试(frontend tests only) - [ ] 页面渲染 - [ ] 表单交互 - [ ] warning / error 展示 -- [ ] TEST-FE-PR-001:补 Proposal / Essential 前端测试(frontend tests only) +- [ ] TEST-FE-PR-001:补 Proposal / Essential 前端测试(frontend tests only) - [ ] Essential 列表与表单 - [ ] Accept milestone 选择 - [ ] story 创建入口限制 -- [ ] TEST-CLI-CAL-001:补 Calendar CLI 测试(cli tests only) +- [ ] TEST-CLI-CAL-001:补 Calendar CLI 测试(cli tests only) - [ ] 命令解析 - [ ] JSON 输出 - [ ] 错误输出 -- [ ] TEST-CLI-PR-001:补 Proposal / Essential CLI 测试(cli tests only) +- [ ] TEST-CLI-PR-001:补 Proposal / Essential CLI 测试(cli tests only) - [ ] Essential 子命令 - [ ] accept milestone 参数 - [ ] story 限制提示