market-review

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

market-review · A 股市场每日复盘系统

market-review · A-share Market Daily Review System

调用语法

Invocation Syntax

/market-review [--force] [--module <模块名>]
  • 不带
    --module
    默认合成全部(6 模块 + review.md)
  • 模块名支持中英别名(详见 config.yaml
  • --force
    覆盖 TTL,强制重跑
/market-review [--force] [--module <module-name>]
  • Without
    --module
    , it defaults to synthesizing all (6 modules + review.md)
  • Module names support Chinese and English aliases (see config.yaml)
  • --force
    overrides TTL and forces a re-run

模块清单

Module List

模块主名TTL
大盘环境诊断
index
1 天
情绪周期定位
sentiment
1 天
主线与支线识别
mainline
1 天
资金行为监测
capital
1 天
盘后变量汇总
variables
1 天
明日作战地图
combatmap
1 天
ModuleMain NameTTL
Market Environment Diagnosis
index
1 day
Sentiment Cycle Positioning
sentiment
1 day
Main and Branch Line Identification
mainline
1 day
Capital Behavior Monitoring
capital
1 day
Post-Market Variables Summary
variables
1 day
Tomorrow's Combat Map
combatmap
1 day

自然语言路由

Natural Language Routing

用户说翻译
开始今日复盘
/market-review
今天市场怎么样
/market-review
复盘一下今天大盘
/market-review
明天能不能做
/market-review
今天的情绪周期是什么阶段
/market-review --module sentiment
重新跑一下今天复盘
/market-review --force
User SaysTranslation
Start today's review
/market-review
How's the market today
/market-review
Review today's market
/market-review
Can we trade tomorrow
/market-review
What stage is today's sentiment cycle in
/market-review --module sentiment
Re-run today's review
/market-review --force

强约束(含 Why)

Strong Constraints (Including Why)

ID约束Why
R1当日数据当日有效,
--date
默认取最近交易日,不加
--force
就复用已有 data.json
同一交易日盘后数据不会变,重复拉取浪费 API 配额
R2
--force
是打破 R1 的唯一方式,可作用到指定模块
--force --module index
避免 Agent "想做完整一点"就自作主张全部重跑
R3模块间 report.md 彼此不引用(不写"见模块一的结论"),只引用 data.json 中的原始数据模块解耦的核心保障
R4合成 review.md 时各模块独立应用 R1/R2模块六每次都重写(依赖前五模块最新输出)
R5单模块永不输出"明日作战地图"或仓位建议;仓位建议仅模块六产出仓位需要综合全部模块信息
R6每个模块 report.md 必须以
<!-- REVIEW_MODULE_START -->
段开头,标注模块名和交易日
合成时验证模块完整性和日期对齐
R7市场复盘绝不提个股核心边界铁律
R8Python 脚本只管 fetch 和校验,不生成 report.mdAgent 是 report.md 的唯一生产者
R9verify_facts 校验单模块 data.json↔report.md;verify_consistency 仅合成后跑跨模块一致性只在合并后才有意义
IDConstraintWhy
R1Same-day data is valid on the day,
--date
defaults to the latest trading day, reuse existing data.json without
--force
Post-market data for the same trading day won't change; repeated pulling wastes API quotas
R2
--force
is the only way to break R1, can be applied to a specified module with
--force --module index
Prevent the Agent from arbitrarily re-running all modules just to "do a complete job"
R3report.md files between modules do not reference each other (do not write "see conclusion in Module 1"), only reference raw data in data.jsonCore guarantee for module decoupling
R4When synthesizing review.md, each module independently applies R1/R2Module 6 is rewritten every time (depends on the latest output of the first five modules)
R5A single module never outputs "Tomorrow's Combat Map" or position suggestions; position suggestions are only produced by Module 6Positioning requires comprehensive information from all modules
R6Each module's report.md must start with the
<!-- REVIEW_MODULE_START -->
section, marking the module name and trading day
Verify module integrity and date alignment during synthesis
R7Market review never mentions individual stocksCore boundary rule
R8Python scripts only handle fetching and verification, do not generate report.mdAgent is the sole producer of report.md
R9verify_facts checks data.json ↔ report.md for a single module; verify_consistency only runs after synthesisCross-module consistency is only meaningful after merging

Agent 执行流程

Agent Execution Flow

完整复盘(例:
/market-review

Full Review (Example:
/market-review
)

1. 跑 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

Single Module (Example:
/market-review --module sentiment
)

1. 跑 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.json
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.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 ReadFile
When writing a module's report.mdreferences/modules/<m>.md
When writing data.jsonreferences/data-schema.md
When modifying configurationsconfig.yaml