refactor: 缠论引擎包化与 Web 分层(ECR-001)
将根目录引擎迁入 chanlun/ 并保留兼容 shim;拆分 TF_DF 与 web 服务; 前端模块化;strategies 改用 chanlun 导入;补充 ESS 文档与 golden 回归。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# Project Rules — chan
|
||||
|
||||
## Scope boundaries
|
||||
|
||||
1. `config/`、`strategies/`:Freqtrade 策略资产,默认只读;任何改动需独立 ECR。
|
||||
2. `chanlun/`:缠论引擎正式包;算法变更需 L2+ ECR + 回归基线。
|
||||
3. 根目录 `Chan*.py` / `TF_DF.py`:兼容 shim,保持 `from ChanLun import ChanLun` 可用。
|
||||
4. `web/`:可视化与 API;契约冻结于 ECR-001。
|
||||
|
||||
## Change levels
|
||||
|
||||
- L0 docs / L1 bugfix / L2 behavior / L3 architecture — 见 ESS CHANGE_MANAGEMENT。
|
||||
- 结构重构默认 L3;若触及缠论识别结果 → 升为 L2 并要求 RISK_REVIEW + EXP。
|
||||
|
||||
## Compatibility
|
||||
|
||||
- 正式导入:`from chanlun import ChanLun, TF_DF`;`from chanlun.core.ChanEnum import ...`
|
||||
- 根目录 `Chan*.py` / `TF_DF.py` 为兼容 shim(旧脚本可用);新代码与 strategies 应使用 `chanlun` 包
|
||||
- Web URL 与 `/api/analyze` 字段名/结构保持兼容
|
||||
- 策略文件通过 `sys.path.append(仓库根)` 保证能找到 `chanlun` 包
|
||||
|
||||
## Language
|
||||
|
||||
- 代码注释与提交说明优先中文。
|
||||
Reference in New Issue
Block a user