7.7 KiB
AI_ICT 主线裁剪审计 S1 2026-05-21 v1
0. 审计边界
本审计执行 docs/AI_ICT_实盘辅助分析决策助手ICT主线开发方案_2026-05-21_v1.md 的 S1。
目标不是立刻删除代码,而是先把交易员主线、System Ops、研究保留面、延期/废弃执行面分清楚,避免继续把复杂功能塞回盘中主界面。
硬边界保持不变:
execution_allowed=false
decision_support_ready=false
real_live_ready=false
must_not_trade=true
trade_permission_required=false
submit_cancel_or_live_execution_called=false
1. 审计方法
新增可重复扫描脚本:
python scripts/audit_trader_mainline_surfaces.py --output-json
扫描范围:
src/web/index.html的顶层导航、workspace sections、System Ops links。src/web/app.js与src/web/trader_mode.js的fetchJson/postJson前端 API 引用。src/api/server.py的显式 API routes。tests/unit/test_*.py中的 endpoint 测试引用。
本轮扫描结果:
top nav targets: 5
workspace sections: 19
system ops targets: 14
api routes: 80
frontend api references: 43
test endpoint references: 108
分类计数:
workspace sections:
- Mainline: 4
- System Ops: 10
- Research Only: 3
- Deprecated: 2
api routes:
- Mainline: 16
- System Ops: 26
- Research Only: 33
- Deprecated: 5
frontend api references:
- Mainline: 12
- System Ops: 20
- Research Only: 9
- Deprecated: 2
2. 顶层导航结论
当前顶层导航已经符合新方案:
| 导航入口 | 分类 | 结论 |
|---|---|---|
trader-mode / Trader Cockpit |
Mainline | 保留,盘中唯一首屏 |
strategy-backtest / Strategy Backtest |
Mainline | 保留,验证 ICT setup 是否有历史优势 |
trading-plan / Trading Plan |
Mainline | 保留,后续作为 Review Now 的上游硬门 |
journal / Journal |
Mainline | 保留,真实观察与盘后复盘入口 |
system-ops / System Ops |
System Ops | 保留,承接复杂诊断与旧功能 |
结论:顶层菜单不需要继续扩展;后续新增功能默认不得进入顶层导航。
3. Workspace Section 分类
| Section | 分类 | S1 决策 |
|---|---|---|
trader-mode |
Mainline | 保留,继续压缩为 ICT fast read |
strategy-backtest |
Mainline | 保留,后续深化 book-rule quality gate |
trading-plan |
Mainline | 保留,后续重构为书本顺序计划表 |
journal |
Mainline | 保留,后续对齐 Study Notes / Journal 闭环 |
system-ops |
System Ops | 保留,复杂能力的唯一入口 |
overview |
System Ops | 保留在 System Ops,不能回到主线 |
trading-status |
System Ops | 保留为诊断,不作为交易指令 |
runtime-supervisor |
System Ops | 保留为运行时诊断 |
decision-packet |
System Ops | 保留为审计材料,不作为盘中主屏 |
readiness |
System Ops | 保留,显示 readiness/trust 边界 |
session-focus |
System Ops | 保留为 ICT session 辅助诊断,后续可被 Trading Plan 引用 |
intraday-candidates |
System Ops | 保留为候选调试,不直接给交易员主屏 |
alerts |
System Ops | 保留为运营/告警质量诊断 |
candles |
System Ops | 保留为只读行情诊断 |
decision-assistant |
Research Only | 冻结主线扩张,仅作为研究/内部审计面 |
visual-reviews |
Research Only | 冻结主线扩张,不能替代书本链路 |
operator-console |
Research Only | 保留为内部研究/操作面,不进入主线 |
execution-tickets |
Deprecated | 当前不做交易,保留代码但不得突出展示为交易员主功能 |
position-management |
Deprecated | 当前不做实盘持仓管理,保留代码但不得进入主线 |
本轮不做物理删除。原因:Deprecated 不等于“确认无依赖”,仍需后续检查动态路由、测试覆盖和远端 smoke 影响。
4. API 分类结论
4.1 Mainline API
这些 API 直接服务 Trader Cockpit、Strategy Backtest、Trading Plan、Journal 或只读主线:
/health/candles/trading/backtests/trading/plans/trading/plans/latest/trading/plans/generate/trading/review-packet/trading/operator-notes/trading/shadow-paper/observe/trading/shadow-paper-validation/trading/journal/trading/journal/summary/trading/journal/generate/trading/research/weekly-review/trading/launch-readiness
结论:保留,后续必须全部映射到《ICT交易全书》的主线字段。
4.2 System Ops API
这些 API 保留用于运行时、数据、候选、告警和只读可用性诊断:
/trading/runtime-status/trading/runtime-watchdog/trading/runtime-incidents/trading/runtime/run-once/trading/maintenance-summary/trading/unattended-harness/trading/live-readiness/trading/broker-state/trading/market-state/trading/trust-score/trading/session-view/trading/candidates/trading/decision-packet/trading/alerts/*/trading/watch/run
结论:保留在 System Ops,不得作为交易员主线功能继续膨胀。
4.3 Research Only API
这些 API 来自历史 archive、workflow、external context、visual watch、research council、training 等长尾能力:
/trading/archive-baselines/trading/assistant-focus/trading/external-context-surface-history/trading/research-council/*/trading/visual-watch/*/trading/workflow-archive/*/training/*
结论:冻结主线扩张。只有当某个能力能明确服务 Range / Draw / Liquidity / MSS / FVG / Backtest / Plan / Journal 链路时,才允许被重新纳入主线。
4.4 Deprecated / Deferred Execution API
这些 API 带有执行、票据、持仓、OKX sandbox 或 reconciliation 语义:
/live-operation-audits/trading/okx-sandbox-preflight/trading/reconcile/trading/executions/trading/tickets/trading/candidates/{id}/build-ticket
结论:
- 当前只做实盘辅助分析,不做交易。
- 这些 API 不得进入 Trader Cockpit / Strategy Backtest / Trading Plan / Journal 主线。
- 代码暂时不删,保留在 System Ops / deferred execution 区域,等待用户明确进入执行阶段后再处理。
5. 删除准备结论
本轮没有发现可以立即物理删除且零风险的文件或 API。
原因:
- 多数旧能力仍有测试覆盖和前端引用。
execution-tickets/position-management虽然不属于当前阶段,但仍和 R2 paper / future execution evidence 历史代码交织。archive/workflow/external context虽偏离主线,但大量 API 与 operator workspace 测试仍覆盖,直接删除风险高。- 当前最重要的是防止它们回到交易员主界面,而不是为了“干净”破坏已有远端 smoke。
6. 后续裁剪规则
后续任何裁剪必须按以下顺序:
- 先确认是否服务《ICT交易全书》主线。
- 不服务主线但服务运行诊断的,迁到 System Ops。
- 不服务主线且只是研究长尾的,标记 Research Only 并冻结扩张。
- 带执行/下单/票据/持仓语义的,在当前阶段标记 Deprecated / Deferred Execution。
- 只有同时满足“无主线价值、无 System Ops 价值、无测试依赖、无前端引用、无远端 smoke 依赖、可回滚”时,才进入 Delete Candidate。
7. 下一步
S1 审计已经完成。下一步进入 S2:
ICT canonical taxonomy / rulebook registry
S2 目标是建立统一书本模型字典,让 Trader Cockpit focus、Strategy Backtest result、Trading Plan item、Journal note 都必须映射到《ICT交易全书》的固定链路。
下一步不应继续做 external context、archive、workflow、digest 长尾,也不应做 OKX trade permission / submit / cancel / fills。