Files
Chan/docs/ADR/ADR-001-package-layout.md
T
jackyu66gitandCursor 74dec4e50b refactor: 缠论引擎包化与 Web 分层(ECR-001)
将根目录引擎迁入 chanlun/ 并保留兼容 shim;拆分 TF_DF 与 web 服务;
前端模块化;strategies 改用 chanlun 导入;补充 ESS 文档与 golden 回归。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:48:20 +08:00

23 lines
771 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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)。