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:
jackyu66git
2026-08-05 18:48:20 +08:00
co-authored by Cursor
parent e2e45bc1bc
commit 74dec4e50b
160 changed files with 25576 additions and 23104 deletions
+22
View File
@@ -0,0 +1,22 @@
# ADR-001: 包布局与兼容 shim
**Status:** Accepted
**Date:** 2026-08-05
**ECR:** ECR-001
## Context
根目录扁平模块被 strategies 与 web 通过模块名直接 import;完全改名会破坏 Freqtrade 策略。需要正式包边界,同时零改 `strategies/`
## Decision
1. 正式包名:`chanlun``core` / `pipeline` / `indicators` / `analysis`)。
2. 根目录保留同名 shim 文件,再导出公共符号。
3. Web 使用 Flask blueprints + services;前端 JS 模块化,不引入 TS 构建。
4. `TF_DF` 保留门面类名与公开方法,内部委托 builders。
## Consequences
- 策略无需修改。
- 长期可逐步引导新代码 `from chanlun import ...`
- shim 需保持至策略侧显式迁移(另立 ECR)。