Skip to content

执行任务: MG-P0P1-2025Q4

字数
740 字
阅读时间
4 分钟

状态追踪

  • [x] TODO
  • [ ] DOING
  • [ ] DONE

工具使用记录

  • [x] Filesystem
  • [ ] Code-Reasoning
  • [ ] Context7
  • [ ] Serena

验证清单

  • [ ] 编译通过
  • [ ] 单测通过
  • [ ] 满足约束
  • [ ] 性能达标

里程碑分解(P0/P1)

Milestone 1 · 情绪打卡闭环(Week 1,FR1)

  • [ ] 构建 cloudfunctions/checkinRecorder/index.jsgetToday / create / listRecent / stats 分支,落库 checkins 集合并做幂等校验。
  • [ ] 新增 database/checkins.collection.json & 索引脚本,覆盖 user_id + checkin_date 去重与时间序查询。
  • [ ] 调整 miniprogram/services/checkins.js 解析逻辑,支持情绪强度、标签、今日打卡数等字段并移除 Mock 默认值。
  • [ ] 扩展 miniprogram/pages/today/index.js + pages/today/components,接入新数据源、情绪强度滑杆、心情轮/趋势可视化。
  • [ ] 在 miniprogram/utils/telemetry.js 补齐 mood_checkin_* 事件上报与失败告警。

Milestone 2 · AI 微建议(Week 2,FR2)

  • [ ] 实现 cloudfunctions/suggestionOrchestrator/index.js:串联 Dify 会话、降级缓存与 suggestions 集合写入。
  • [ ] 定义 database/suggestions.collection.json,含 user_idstatuspriority_rank 索引及 TTL 字段。
  • [ ] 改造 miniprogram/services/suggestions.js,统一 fetch/accept/skip 请求并回传来源元数据。
  • [ ] 调整 miniprogram/pages/today/index.js 微建议卡片的加载、兜底提示及重试逻辑。
  • [ ] 规划 cloudfunctions/taskWorkflow/index.js acceptSuggestion 分支,把建议转化为任务并写回状态。

Milestone 3 · 树洞安全与守护(Week 3,FR4)

  • [ ] 扩展 cloudfunctions/treeholeModeration/index.js 支持 riskDetectionhashCheck、批量模式,返回统一结构。
  • [ ] 对接 cloudfunctions/sosRelay/index.js,实现 R3/R4 预警通知与 risk_alerts 集合写入。
  • [ ] 优化 cloudfunctions/postService/index.js 发布流程:先审核→重复校验→高风险触发 sosRelay→状态写回。
  • [ ] 更新 miniprogram/services/cloud-post.js / services/forum.js,跑通审核提示、风险清单与失败回显。
  • [ ] 完成 miniprogram/packages/community/post-editor/* 自检面板,暴露风险提示与守护入口。

Milestone 4 · REBT 日记闭环(Week 4,FR5)

  • [ ] 搭建 cloudfunctions/journalService(新建)或等效云函数,处理 REBT 模板生成、草稿持久化、媒体引用。
  • [ ] 制定 database/journals.collection.json & database/journal_insights.json 索引策略,覆盖 REBT 字段。
  • [ ] 重写 miniprogram/services/journals.js 数据获取与筛选,支持时间范围、标签过滤、REBT 结构体。
  • [ ] 补充 miniprogram/packages/journal/essay-edit/* 的 REBT 引导文案、分步保存与校验。
  • [ ] 联动任务闭环:在 cloudfunctions/taskWorkflow/index.js 添加日记回执、建议转任务的交叉引用。

依赖与风险提示

  • CloudBase 集合尚未建表:Milestone 1、2、4 需先补齐数据库与索引脚本。
  • Dify 工作流稳定性未知:Milestone 2 需设计重试与离线兜底。
  • 高风险内容处置需要人工流程:Milestone 3 要同步值班规范并测试 sosRelay

贡献者

The avatar of contributor named as Cai Hongyu Cai Hongyu

文件历史

撰写