Add ICT book mainline governance docs

This commit is contained in:
Codex
2026-05-21 08:27:12 +08:00
parent 02c31262f9
commit d7a4330d30
18 changed files with 297 additions and 7 deletions
+18
View File
@@ -21,3 +21,21 @@ Do not skip skills, ignore gstack errors, or work around missing gstack.
Using gstack skills: After install, skills like /qa, /ship, /review, /investigate,
and /browse are available. Use /browse for all web browsing.
Use ~/.Codex/skills/gstack/... for gstack file paths (the global path).
## Hard mainline requirement
All AI-assisted work in this repo must strictly follow `docs/ICT交易全书_出版终校版.md` and the governance anchor `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`.
Before choosing or implementing any slice, verify that it serves the ICT book chain:
```text
Range / Draw / Location
-> Liquidity / Sweep / Inducement / Path
-> Displacement / MSS / FVG / Retest / Session
-> backtest evidence
-> pre-market plan
-> intraday unique focus or no-trade reason
-> journal / study-notes feedback
```
If a requested or inferred task does not map to this chain, do not promote it into the trader-facing product. Put necessary operational surfaces under System Ops, or stop and document the mismatch. Do not restart external-context/archive/digest/workflow/handoff long-tail work unless it directly supports the ICT book mainline.
+18
View File
@@ -21,3 +21,21 @@ Do not skip skills, ignore gstack errors, or work around missing gstack.
Using gstack skills: After install, skills like /qa, /ship, /review, /investigate,
and /browse are available. Use /browse for all web browsing.
Use ~/.claude/skills/gstack/... for gstack file paths (the global path).
## Hard mainline requirement
All AI-assisted work in this repo must strictly follow `docs/ICT交易全书_出版终校版.md` and the governance anchor `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`.
Before choosing or implementing any slice, verify that it serves the ICT book chain:
```text
Range / Draw / Location
-> Liquidity / Sweep / Inducement / Path
-> Displacement / MSS / FVG / Retest / Session
-> backtest evidence
-> pre-market plan
-> intraday unique focus or no-trade reason
-> journal / study-notes feedback
```
If a requested or inferred task does not map to this chain, do not promote it into the trader-facing product. Put necessary operational surfaces under System Ops, or stop and document the mismatch. Do not restart external-context/archive/digest/workflow/handoff long-tail work unless it directly supports the ICT book mainline.
+5 -2
View File
@@ -3,7 +3,8 @@
## Kickoff In This Repo
```text
Read README.md, TASKS.md, SESSION.md, RUNBOOK.md, then inspect git status and the relevant code.
Read README.md, TASKS.md, SESSION.md, RUNBOOK.md, docs/ICT交易全书_出版终校版.md, and docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md, then inspect git status and the relevant code.
Before selecting a slice, verify that it maps to the ICT book chain: Range/Draw/Location -> Liquidity/Sweep/Path -> Displacement/MSS/FVG/Retest/Session -> backtest -> plan -> intraday focus/no-trade -> journal feedback.
Give me a short execution plan and then implement the highest-priority task.
Run the listed validation commands after changes.
Update SESSION.md and TASKS.md before you stop.
@@ -13,8 +14,9 @@ Update SESSION.md and TASKS.md before you stop.
```text
Continue ai-exchange.
First read README.md, TASKS.md, SESSION.md, RUNBOOK.md and inspect git status and the current branch.
First read README.md, TASKS.md, SESSION.md, RUNBOOK.md, docs/ICT交易全书_出版终校版.md, and docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md, then inspect git status and the current branch.
Then continue from the Exact Next Step in SESSION.md.
Do not continue any external-context/archive/digest/workflow/handoff long-tail work unless it directly supports the ICT book mainline.
Implement the change, run validation, and update SESSION.md and TASKS.md before stopping.
```
@@ -33,4 +35,5 @@ Before stopping, finish the current atomic change if possible.
Run validation commands.
Update SESSION.md with Completed In Last Session, Exact Next Step, and Risks Or Open Questions.
Move finished items in TASKS.md.
Confirm that the next step still follows docs/ICT交易全书_出版终校版.md and docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md.
```
+18
View File
@@ -9,6 +9,24 @@ See `docs/` for architecture, database, rule, and migration references.
Database connectivity defaults to a 5 second PostgreSQL connect timeout. Override with `DATABASE_CONNECT_TIMEOUT` when needed.
Set `MIGRATIONS_OUTPUT_JSON=1` when running `run_migrations.py` for a machine-readable migration summary.
## Hard mainline requirement
All trading-analysis development must strictly follow `docs/ICT交易全书_出版终校版.md` and `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`.
The trader-facing product must stay on this chain:
```text
Range / Draw / Location
-> Liquidity / Sweep / Inducement / Path
-> Displacement / MSS / FVG / Retest / Session
-> backtest evidence
-> pre-market plan
-> intraday unique focus or no-trade reason
-> journal / study-notes feedback
```
Any capability that cannot serve this chain must stay out of the trader-facing UI and, if still needed for operations, belongs under System Ops.
## Current closed loop
当前主线可运行链路:
+21
View File
@@ -7,6 +7,27 @@
- Main local API port: `8000`
- Default branch observed during setup: `main`
## Hard Mainline Requirement
Before running a development, deploy, or smoke loop for trading-analysis work, confirm that the requested slice follows:
- `docs/ICT交易全书_出版终校版.md`
- `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`
Required product chain:
```text
Range / Draw / Location
-> Liquidity / Sweep / Inducement / Path
-> Displacement / MSS / FVG / Retest / Session
-> backtest evidence
-> pre-market plan
-> intraday unique focus or no-trade reason
-> journal / study-notes feedback
```
If the work cannot map to that chain, do not deploy it as a trader-facing feature.
## Setup
```bash
+10 -2
View File
@@ -2,7 +2,15 @@
## Current Goal
Automation execution-layer PXX remains closed and its known scope stays frozen. Under explicit user direction, the active product phase has shifted from broad Decision Assistant expansion to mainline correction: follow `docs/AI_ICT_主线纠偏与功能裁剪方案_2026-05-20_v1.md`, keep only Trader Cockpit / Strategy Backtest / Trading Plan / Journal / System Ops in the trader-facing shell, and productize existing ICT backtest evidence before adding any new feature surface.
Automation execution-layer PXX remains closed and its known scope stays frozen. Under explicit user direction, the active product phase has shifted from broad Decision Assistant expansion to mainline correction: strictly follow `docs/ICT交易全书_出版终校版.md`, `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`, and `docs/AI_ICT_主线纠偏与功能裁剪方案_2026-05-20_v1.md`; keep only Trader Cockpit / Strategy Backtest / Trading Plan / Journal / System Ops in the trader-facing shell; productize existing ICT backtest evidence before adding any new feature surface.
## Hard Mainline Gate
- Highest-priority rule: every trading-analysis slice must map to `docs/ICT交易全书_出版终校版.md`.
- Required chain: Range / Draw / Location -> Liquidity / Sweep / Inducement / Path -> Displacement / MSS / FVG / Retest / Session -> backtest evidence -> pre-market plan -> intraday unique focus or no-trade reason -> journal / study-notes feedback.
- If a slice does not serve this chain, it must not enter the trader-facing product; necessary diagnostics belong under `System Ops`.
- Do not restart external-context/archive/digest/workflow/handoff long-tail work unless it directly supports the ICT book mainline.
- This gate overrides older backlog items, old phase plans, and ambiguous prompts.
## Current Branch
@@ -824,7 +832,7 @@ Automation execution-layer PXX remains closed and its known scope stays frozen.
## Exact Next Step
Next continue Step 4 of `docs/AI_ICT_主线纠偏与功能裁剪方案_2026-05-20_v1.md`: compress Trader Cockpit further so the first screen uses the new backtest evidence to answer only `now / reason / wait / risk / historical edge / boundary`. Do not restart external-context/archive/digest long-tail work, do not create order-submission features, and do not fabricate R2 paper samples; R2 evidence collection remains live but secondary to the current trader-facing mainline correction. Keep `execution_allowed`, `decision_support_ready`, `real_live_ready`, risk governor, trust bucket, and operator confirmation protocol unchanged.
Next continue Step 4 of `docs/AI_ICT_主线纠偏与功能裁剪方案_2026-05-20_v1.md` under the hard mainline gate in `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`: compress Trader Cockpit further so the first screen uses ICT book order plus the new backtest evidence to answer only `now / reason / wait / risk / historical edge / boundary`. Do not restart external-context/archive/digest long-tail work, do not create order-submission features, and do not fabricate R2 paper samples; R2 evidence collection remains live but secondary to the current trader-facing mainline correction. Keep `execution_allowed`, `decision_support_ready`, `real_live_ready`, risk governor, trust bucket, and operator confirmation protocol unchanged.
## Validation Commands Used Recently
+4 -1
View File
@@ -5,6 +5,9 @@
- [x] Autonomous mode enabled
- [x] No per-stage confirmation required
- [x] Each stage must close the loop through implementation, validation, deploy/smoke when possible, and state writeback
- [x] Hard mainline gate active: every trading-analysis task must strictly follow `docs/ICT交易全书_出版终校版.md` and `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`
- [x] Any task that cannot map to Range/Draw/Location -> Liquidity/Sweep/Path -> Displacement/MSS/FVG/Retest/Session -> backtest -> plan -> intraday focus/no-trade -> journal feedback must not enter the trader-facing product
- [x] External-context/archive/digest/workflow/handoff long-tail work stays frozen unless it directly supports the ICT book mainline
- [x] P0-P6 Research Council phase expansion is frozen
- [x] P6 `no_op_healthy` must not create Research Council P7/P8
- [x] Stable monitor quality may enter automation execution-layer P7
@@ -928,7 +931,7 @@
- [x] Existing UI i18n/R2 gate polish follow-up: existing Trader Mode/readiness/shadow-paper labels now translate runtime/gate jargon such as `Auto refresh`, `All Trust`, `Incident Journal`, `Live Readiness`, `paper_ticket_sample_gate`, and `operator_feedback_count`; R2 evidence window now follows canonical `failed_criteria`, remote browser audit has no repeated first-screen Chinese phrases and only 13 active-view English tokens left; deploy smoke, remote ops smoke, read-only live smoke, focused tests, static checks, and full unit (`790`) passed
- [x] Session Focus dynamic Chinese label follow-up: existing i18n now translates reported dynamic session-focus labels/values (`ASIA`, `NY_PM`, `status`, `window`, `candidates`, `executable`, `open executions`, `alerts`, `recommendation`, `action hint`, `incomplete`, `observe @ n/a`, `avoid_new_risk`, `review_alerts`); remote browser audit on `/trader-mode#session-focus` passed with no reported English leftovers and no console errors
- [x] Trader mainline Step 3 Strategy Backtest productization: added read-only `/trading/backtests`, Strategy Backtest workbench controls, latest-run summary, quality gate explanation, R metrics, equity curve, top sessions, failure reasons, recent run list, Chinese labels for backtest gate reasons, and resilient candle/backtest failure fallback; full unit (`791`), deploy smoke, remote ops smoke, readonly live smoke, remote backtest endpoint smoke, and browser audit passed
- [ ] Trader mainline Step 4 cockpit recompression: use Strategy Backtest evidence on Trader Cockpit first screen and reduce it to now / reason / wait / risk / historical edge / boundary
- [ ] Trader mainline Step 4 cockpit recompression: under the hard ICT book mainline gate, use Strategy Backtest evidence on Trader Cockpit first screen and reduce it to now / reason / wait / risk / historical edge / boundary
- [ ] R2 paper-ticket sample gate is waiting on a real executable candidate; do not fabricate paper tickets from blocked candidates
- [ ] R2 operator feedback sample gate still needs 2 more real feedback samples (`operator_feedback_count=3/5`)
- [ ] R2 weekly review visible gate still needs a real execution-derived journal/weekly review entry (`weekly_review_entry_count=0`)
@@ -1,5 +1,23 @@
# AI_ICT 主线纠偏与功能裁剪方案 2026-05-20 v1
## 0. 硬性主线约束
本方案受 `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md` 约束。
后续所有裁剪、开发、验收和状态回写,必须严格遵循 `docs/ICT交易全书_出版终校版.md` 的主线。任何旧 backlog、旧增强计划、旧自动化切片或临时想法与该要求冲突时,以《ICT交易全书》主线为准。
交易员主界面只允许服务以下链路:
```text
Range / Draw / Location
-> Liquidity / Sweep / Inducement / Path
-> Displacement / MSS / FVG / Retest / Session
-> backtest evidence
-> pre-market plan
-> intraday unique focus or no-trade reason
-> journal / study-notes feedback
```
## 1. 结论
当前系统已经明显偏离最初目标。
@@ -1,5 +1,26 @@
# AI ICT 全自动开发执行流程 v1
## 0. 硬性主线约束
任何自动化流程在选择切片前,必须先读取并服从:
- `docs/ICT交易全书_出版终校版.md`
- `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`
若自动化流程、旧阶段计划、历史 backlog 或临时 prompt 与《ICT交易全书》主线冲突,必须停止该切片进入交易员主界面,并改为回到书本主线。
自动化只允许推进能映射到以下链路的交易分析工作:
```text
Range / Draw / Location
-> Liquidity / Sweep / Inducement / Path
-> Displacement / MSS / FVG / Retest / Session
-> backtest evidence
-> pre-market plan
-> intraday unique focus or no-trade reason
-> journal / study-notes feedback
```
## 1. 目标
本流程用于约束后续 `ai-exchange` 项目的默认推进方式。
@@ -1,5 +1,15 @@
# AI_ICT 分析助手主线增强开发计划 2026-05-14 v1
## 0. 当前硬性约束
本计划是历史增强计划,后续继续使用时必须服从:
- `docs/ICT交易全书_出版终校版.md`
- `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`
- `docs/AI_ICT_主线纠偏与功能裁剪方案_2026-05-20_v1.md`
若本计划中的 archive、external context、workflow、digest、handoff 等增强方向与《ICT交易全书》主线冲突,或者不能直接服务 `Range / Draw / Location -> Liquidity / Sweep / Path -> Displacement / MSS / FVG / Retest / Session -> backtest -> plan -> intraday focus/no-trade -> journal feedback`,则不得继续作为交易员主界面开发任务。
## 1. 目标
本计划只围绕当前“分析助手”主线推进,不展开真实交易、OKX live submit、默认自动下单、live adapter 开闸。
@@ -1,5 +1,13 @@
# AI_ICT 实盘交易分析决策助手下一阶段开发方案 v1
## 0. 硬性主线约束
本方案必须服从 `docs/ICT交易全书_出版终校版.md``docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`
后续任何“分析助手”能力都必须先服务《ICT交易全书》主线:Range / Draw / Location、Liquidity / Sweep / Path、Displacement / MSS / FVG / Retest / Session、backtest evidence、plan、intraday focus/no-trade、journal feedback。
不能映射到这条链路的 archive、external context、digest、workflow、handoff 或运营化能力,不得继续进入交易员主界面。
## 1. 目标
本方案面向“实盘交易分析决策助手”,不做真实交易闭环,不做 OKX 真实下单,不做 live adapter 扩展。
@@ -11,6 +11,13 @@
根依据:
- `docs/ICT交易全书_出版终校版.md`
- `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`
硬性要求:
- 本计划以及后续任何实盘交易分析开发,必须严格遵循《ICT交易全书》的主线。
- 若旧需求、旧 backlog、自动化阶段或临时需求与书本主线冲突,以《ICT交易全书》主线为准。
- 不能映射到 `Range / Draw / Location -> Liquidity / Sweep / Path -> Displacement / MSS / FVG / Retest / Session -> backtest -> plan -> intraday focus/no-trade -> journal feedback` 的能力,不得进入交易员主界面。
开发原则:
@@ -1,5 +1,23 @@
# AI ICT 实盘辅助决策系统开发方案 v2
## 0. 硬性主线约束
本方案必须服从 `docs/ICT交易全书_出版终校版.md``docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`
“可上线”只能表示系统更好地辅助交易员按《ICT交易全书》主线完成分析、回测、计划、盘中确认和复盘,不表示扩展为泛化 AI 工作台、产品运营平台或自动交易系统。
交易员主界面必须围绕:
```text
Range / Draw / Location
-> Liquidity / Sweep / Path
-> Displacement / MSS / FVG / Retest / Session
-> backtest evidence
-> plan
-> intraday focus or no-trade
-> journal feedback
```
## 1. 文档目标
本方案用于定义下一轮开发目标:
@@ -517,4 +535,3 @@
- 新增更多 setup 模型
- 新增更多 LLM 叙事能力
- 真实自动下单
@@ -1,5 +1,23 @@
# AI_ICT 实盘辅助分析决策助手上线必做清单 2026-05-18 v1
## 0. 硬性主线约束
本上线清单只允许服务 `docs/ICT交易全书_出版终校版.md``docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md` 定义的主线。
上线必做项必须帮助交易员更快完成:
```text
Range / Draw / Location
-> Liquidity / Sweep / Path
-> Displacement / MSS / FVG / Retest / Session
-> backtest evidence
-> plan
-> intraday focus or no-trade
-> journal feedback
```
不能服务该链路的能力,不得作为上线必做项,也不得进入交易员首屏。
## 目标边界
上线目标是:
@@ -1,5 +1,23 @@
# AI_ICT 实盘辅助分析决策助手使用说明 2026-05-18 v1
## 0. 使用边界与主线
本系统的使用必须严格遵循 `docs/ICT交易全书_出版终校版.md``docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`
交易员使用时只应把它当作《ICT交易全书》主线的只读辅助工具:
```text
Range / Draw / Location
-> Liquidity / Sweep / Path
-> Displacement / MSS / FVG / Retest / Session
-> backtest evidence
-> plan
-> intraday focus or no-trade
-> journal feedback
```
如果页面输出不能帮助你回答“现在是否值得看、为什么、等什么确认、风险在哪里、历史是否有优势”,就不应把它作为盘中决策依据。
## 1. 文档目的
本文档面向系统 operator,说明如何使用 AI_ICT 进行只读实盘辅助分析决策。
@@ -1,5 +1,11 @@
# AI_ICT 实盘辅助分析决策助手可用性评估与补齐方案 2026-05-17 v1
## 0. 硬性主线约束
本评估与后续补齐方案必须服从 `docs/ICT交易全书_出版终校版.md``docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`
系统是否“可用”,不再以功能数量判断,而以是否帮助交易员按《ICT交易全书》主线完成 `Range / Draw / Location -> Liquidity / Sweep / Path -> Displacement / MSS / FVG / Retest / Session -> backtest -> plan -> intraday focus/no-trade -> journal feedback` 判断。
## 1. 结论
当前系统**可以作为受限的实盘辅助分析决策助手使用**,但不能作为直接指导下单的实盘交易系统使用。
@@ -0,0 +1,67 @@
# AI_ICT 硬性主线约束:必须遵循《ICT交易全书》 2026-05-21 v1
## 1. 最高优先级
从本文件生效起,`ai-exchange` 的交易分析、回测、Trader Cockpit、Trading Plan、Journal、System Ops 与后续所有开发任务,必须严格遵循 `docs/ICT交易全书_出版终校版.md` 的主线。
若任何旧文档、旧任务、历史 backlog、临时 prompt、自动化切片或实现建议与本约束冲突,以本约束为准。
## 2. 唯一交易策略主线
系统只能围绕《ICT交易全书》的交易流程推进:
```text
目标与空间主线:Range / Draw / Location
-> 流动性主线:Liquidity / Sweep / Inducement / Path
-> 结构与执行主线:Displacement / MSS / FVG / Retest / Session
-> 历史回测验证
-> 盘前计划
-> 盘中唯一候选或不交易理由
-> 盘后 Journal / Study Notes 回灌
```
任何交易策略、页面、API、指标、文案、自动化任务、候选排序、回测摘要和复盘输出,都必须能明确映射到以上链路。
## 3. 禁止偏离
除非明确服务上述书本主线,否则不得继续扩展以下长尾:
- external context 长尾
- archive 深水区
- digest / workflow / handoff / queue 运营化长尾
- 与 ICT 书本确认链无关的泛化 AI 工作台能力
- 未经回测质量门证明的策略晋级
- 把系统输出包装成买卖指令、下单建议或自动交易信号
已有能力可以保留在 `System Ops` 或研发/审计视角中,但不得重新推回交易员主界面。
## 4. 每轮开发必须执行的主线检查
每轮开发在进入实现前,必须回答并写入相应状态文档:
1. 本轮切片对应《ICT交易全书》的哪条主线:目标空间、流动性、结构执行、回测、盘前、盘中、盘后。
2. 它是否让交易员更快回答:现在是否值得看、为什么、等什么确认、风险在哪里、历史是否有优势。
3. 它是否会增加交易员主界面复杂度;如果会,默认拒绝或放入 `System Ops`
4. 它是否改变 `execution_allowed``decision_support_ready``real_live_ready`、risk governor、trust bucket 或 operator confirmation protocol;除非用户明确进入对应阶段,否则禁止改变。
5. 它是否需要真实样本;需要时不得伪造 paper ticket、paper execution、operator feedback 或 weekly review evidence。
## 5. 闭环验收口径
一个切片只有同时满足以下条件,才允许标记为闭环:
- 交易策略表达与 `docs/ICT交易全书_出版终校版.md` 对齐。
- 交易员主界面没有新增不必要复杂度。
- 回测或质量门结果清楚说明是否可用、为什么不可用、下一步等什么。
- 文档、代码、测试和远端 smoke 状态一致。
- 没有绕过只读辅助边界,没有启用真实下单或自动交易。
## 6. 当前推荐下一步
继续 `docs/AI_ICT_主线纠偏与功能裁剪方案_2026-05-20_v1.md` 的 Step 4
```text
Trader Cockpit 重新压缩:
现在 / 原因 / 等待 / 风险 / 历史优势 / 边界
```
该压缩必须把 Strategy Backtest 的质量门和历史优势作为首屏证据之一,而不是继续堆叠新的功能模块。
@@ -1,4 +1,15 @@
# AI_ICT 闇€姹傛枃妗e墿浣欏姛鑳戒笌寤舵湡椤规竻鍗?2026-05-14 v1
# AI_ICT 闇€姹傛枃妗e墿浣欏姛鑳戒笌寤舵湡椤规竻鍗?2026-05-14 v1
## 0. HARD MAINLINE GATE / 硬性主线约束
This backlog is historical and must not be used as an independent source of new feature work.
Before reopening any item from this file, the item must pass:
- `docs/ICT交易全书_出版终校版.md`
- `docs/AI_ICT_硬性主线约束_必须遵循ICT交易全书_2026-05-21_v1.md`
- `docs/AI_ICT_主线纠偏与功能裁剪方案_2026-05-20_v1.md`
If an item cannot directly support the ICT book chain `Range / Draw / Location -> Liquidity / Sweep / Path -> Displacement / MSS / FVG / Retest / Session -> backtest -> plan -> intraday focus/no-trade -> journal feedback`, it must stay deferred and must not enter the trader-facing UI.
## 1. 瀵圭収鑼冨洿