You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
buffer_platform/openspec/archive/trade-reflection-system/.comet/handoff/design-context.md

1.6 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

OpenSpec Handoff Context: trade-reflection-system

Source

  • proposal.md: openspec/changes/trade-reflection-system/proposal.md

Why

当前交易复盘模块只提供事后统计能力缺少人工反思→AI提炼→经验沉淀的学习闭环。需要构建完整的交易反思系统。

Capabilities (New)

  • trade-reflection: 每笔交易的结构化反思(模板+自由文本)和自由打标签
  • daily-reflection: 当日交易整体反思(多维度总结)
  • trade-pairing: 跨日交易自动配对(按品种+方向+时间段),支持手动修正
  • ai-reanalysis: 基于反思内容的AI重新分析提炼经验教训
  • experience-library: 历史经验库,支持搜索、标签筛选、分类视图、时间线视图
  • trade-tagging: 交易标签系统(预设+自定义标签管理)

Capabilities (Modified)

  • trade-review: 交易记录展示从纯统计视图扩展为支持反思、标签、AI重新分析的交互视图

Impact

  • 受影响代码: app/api/trade_review.py, app/analysis_models.py, app/static/futures_analysis.js
  • 数据库变更: TradeRecord表扩展 + 新增4-5个表
  • 不影响: 结算单解析、K线数据获取、复盘计划生成、品种分析主页

Key Decisions (from exploration)

  • 跨日交易: 自动配对+手动补充(按品种+方向+时间段)
  • 反思形式: 模板+自由文本
  • 当日反思: 独立反思+维度选择
  • 经验提炼: AI辅助+人工编辑
  • 标签系统: 预设+自定义
  • 经验库展示: 列表+搜索+标签筛选+分类视图+时间线视图(组合使用)
  • AI重新分析: 只重新分析已写反思的交易(单笔触发)
  • 执行前需做Demo确认交互