Files
Chan/docs/PROJECT_RULES.md
T
jackyu66gitandCursor df27b4dde8 refactor: ECR-002 拆分 runtime 包并加深 analyze 契约(已审)
将 web/services/runtime.py 拆为 runtime/ 子模块并保持门面兼容;补齐 ESS 文档、门面/契约/TF_DF 测试与 CODE_REVIEW Approve。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:15:23 +08:00

27 lines
1.3 KiB
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.
# 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`/api/analyze` 契约冻结于 ECR-001(可增不可删);结构继续演进见 ECR-002 Draft。
5. 双前端:`/` Lightweight + HTTP 刷新;`/chan_tv` Charting Library + WS。主站勿无 ECR 擅自接 WS。
6. `system_version``strategy_version`:策略资产变更须独立 ECR(L2+ 含 EXP)。
## 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
- 代码注释与提交说明优先中文。