market-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesemarket-review · A 股市场每日复盘系统
market-review · A-share Market Daily Review System
调用语法
Invocation Syntax
/market-review [--force] [--module <模块名>]- 不带 默认合成全部(6 模块 + review.md)
--module - 模块名支持中英别名(详见 config.yaml)
- 覆盖 TTL,强制重跑
--force
/market-review [--force] [--module <module-name>]- Without , it defaults to synthesizing all (6 modules + review.md)
--module - Module names support Chinese and English aliases (see config.yaml)
- overrides TTL and forces a re-run
--force
模块清单
Module List
| 模块 | 主名 | TTL |
|---|---|---|
| 大盘环境诊断 | | 1 天 |
| 情绪周期定位 | | 1 天 |
| 主线与支线识别 | | 1 天 |
| 资金行为监测 | | 1 天 |
| 盘后变量汇总 | | 1 天 |
| 明日作战地图 | | 1 天 |
| Module | Main Name | TTL |
|---|---|---|
| Market Environment Diagnosis | | 1 day |
| Sentiment Cycle Positioning | | 1 day |
| Main and Branch Line Identification | | 1 day |
| Capital Behavior Monitoring | | 1 day |
| Post-Market Variables Summary | | 1 day |
| Tomorrow's Combat Map | | 1 day |
自然语言路由
Natural Language Routing
| 用户说 | 翻译 |
|---|---|
| 开始今日复盘 | |
| 今天市场怎么样 | |
| 复盘一下今天大盘 | |
| 明天能不能做 | |
| 今天的情绪周期是什么阶段 | |
| 重新跑一下今天复盘 | |
| User Says | Translation |
|---|---|
| Start today's review | |
| How's the market today | |
| Review today's market | |
| Can we trade tomorrow | |
| What stage is today's sentiment cycle in | |
| Re-run today's review | |
强约束(含 Why)
Strong Constraints (Including Why)
| ID | 约束 | Why |
|---|---|---|
| R1 | 当日数据当日有效, | 同一交易日盘后数据不会变,重复拉取浪费 API 配额 |
| R2 | | 避免 Agent "想做完整一点"就自作主张全部重跑 |
| R3 | 模块间 report.md 彼此不引用(不写"见模块一的结论"),只引用 data.json 中的原始数据 | 模块解耦的核心保障 |
| R4 | 合成 review.md 时各模块独立应用 R1/R2 | 模块六每次都重写(依赖前五模块最新输出) |
| R5 | 单模块永不输出"明日作战地图"或仓位建议;仓位建议仅模块六产出 | 仓位需要综合全部模块信息 |
| R6 | 每个模块 report.md 必须以 | 合成时验证模块完整性和日期对齐 |
| R7 | 市场复盘绝不提个股 | 核心边界铁律 |
| R8 | Python 脚本只管 fetch 和校验,不生成 report.md | Agent 是 report.md 的唯一生产者 |
| R9 | verify_facts 校验单模块 data.json↔report.md;verify_consistency 仅合成后跑 | 跨模块一致性只在合并后才有意义 |
| ID | Constraint | Why |
|---|---|---|
| R1 | Same-day data is valid on the day, | Post-market data for the same trading day won't change; repeated pulling wastes API quotas |
| R2 | | Prevent the Agent from arbitrarily re-running all modules just to "do a complete job" |
| R3 | report.md files between modules do not reference each other (do not write "see conclusion in Module 1"), only reference raw data in data.json | Core guarantee for module decoupling |
| R4 | When synthesizing review.md, each module independently applies R1/R2 | Module 6 is rewritten every time (depends on the latest output of the first five modules) |
| R5 | A single module never outputs "Tomorrow's Combat Map" or position suggestions; position suggestions are only produced by Module 6 | Positioning requires comprehensive information from all modules |
| R6 | Each module's report.md must start with the | Verify module integrity and date alignment during synthesis |
| R7 | Market review never mentions individual stocks | Core boundary rule |
| R8 | Python scripts only handle fetching and verification, do not generate report.md | Agent is the sole producer of report.md |
| R9 | verify_facts checks data.json ↔ report.md for a single module; verify_consistency only runs after synthesis | Cross-module consistency is only meaningful after merging |
Agent 执行流程
Agent Execution Flow
完整复盘(例:/market-review
)
/market-reviewFull Review (Example: /market-review
)
/market-review1. 跑 python scripts/run_review.py --date <today> [--force]
2. 解析 stdout 输出(JSONL):
- status=reuse → 直接读 <module>/<ymd>/report.md 给用户
- status=data_ready → 读 data.json + references/modules/<m>.md
写 <module>/<today>/report.md
跑 python scripts/verify_facts.py --module <m> --ymd <today>
3. 对每个 needs_report_md=true 的模块循环执行步骤 2
4. Agent 读 6 份 report.md,合成 output/<today>/review.md
5. 跑 python scripts/verify_consistency.py --ymd <today>
6. 跑 python scripts/record_eval.py --ymd <today>
7. 把 review.md 内容反馈给用户1. Run python scripts/run_review.py --date <today> [--force]
2. Parse stdout output (JSONL):
- status=reuse → Directly read <module>/<ymd>/report.md for the user
- status=data_ready → Read data.json + references/modules/<m>.md
Write <module>/<today>/report.md
Run python scripts/verify_facts.py --module <m> --ymd <today>
3. Loop step 2 for each module where needs_report_md=true
4. Agent reads 6 report.md files and synthesizes output/<today>/review.md
5. Run python scripts/verify_consistency.py --ymd <today>
6. Run python scripts/record_eval.py --ymd <today>
7. Feed the content of review.md back to the user单模块(例:/market-review --module sentiment
)
/market-review --module sentimentSingle Module (Example: /market-review --module sentiment
)
/market-review --module sentiment1. 跑 python scripts/run_review.py --date <today> --module sentiment [--force]
2. 解析 stdout:
- status=reuse → 直接读 report.md
- status=data_ready → Agent 写 report.md → verify_facts
3. 把 report.md 内容反馈给用户1. Run python scripts/run_review.py --date <today> --module sentiment [--force]
2. Parse stdout:
- status=reuse → Directly read report.md
- status=data_ready → Agent writes report.md → verify_facts
3. Feed the content of report.md back to the user输出结构
Output Structure
output/
└── <YYYY-MM-DD>/
├── index/{data.json, report.md}
├── sentiment/{data.json, report.md}
├── mainline/{data.json, report.md}
├── capital/{data.json, report.md}
├── variables/{data.json, report.md}
├── combatmap/{data.json, market_data.json, report.md}
├── review.md
└── eval.jsonoutput/
└── <YYYY-MM-DD>/
├── index/{data.json, report.md}
├── sentiment/{data.json, report.md}
├── mainline/{data.json, report.md}
├── capital/{data.json, report.md}
├── variables/{data.json, report.md}
├── combatmap/{data.json, market_data.json, report.md}
├── review.md
└── eval.json配置
Configuration
模块 TTL、别名、默认行为见 config.yaml。用户可直接编辑。
Module TTL, aliases, and default behaviors are in config.yaml. Users can edit directly.
关键文档
Key Documents
| 何时读 | 文件 |
|---|---|
| 写某个模块 report.md 时 | references/modules/<m>.md |
| 写 data.json 时 | references/data-schema.md |
| 配置改动 | config.yaml |
| When to Read | File |
|---|---|
| When writing a module's report.md | references/modules/<m>.md |
| When writing data.json | references/data-schema.md |
| When modifying configurations | config.yaml |