diff --git a/scripts/mofin_health.py b/scripts/mofin_health.py
index 21b943e3..c24f48bf 100644
--- a/scripts/mofin_health.py
+++ b/scripts/mofin_health.py
@@ -242,6 +242,337 @@ NODE_DESC = {
"未分类": "未被规则匹配的cron自动归入此",
}
+# ── 数据流详细描述 ──
+# 每张表说明:存什么 + 谁写入(为什么+写什么) + 谁读取(为什么+读什么) + 综合总结
+FLOW_DETAIL = {
+ "signal_news": {
+ "summary": "全系统信号/新闻的统一存储表,所有宏观分析、风险扫描、小果分析的输出汇聚地,也是下游消费脚本的输入源。7个写入方汇聚不同来源信号,5个读取方按需消费。",
+ "writers": {
+ "macro_context_collector": "写入宏观新闻原始数据(标题+摘要+分类),供后续风险扫描消费",
+ "xiaoguo_news_processor": "写入小果LLM处理后的新闻情感分析结果",
+ "macro_signal_consumer": "写入宏观风险信号判定结果(等级+来源+建议)",
+ "divergence_detector": "写入跨市场背离检测信号(A股/港股/美股指数对)",
+ "xiaoguo_signal_consumer": "写入小果扫描发现的个股/板块信号",
+ "mofin_news": "写入外部财经常规新闻采集结果",
+ "xiaoguo_scanner": "写入小果独立扫描的市场机会信号",
+ },
+ "readers": {
+ "macro_signal_consumer": "读取原始宏观新闻和信号,判定风险等级并生成建议",
+ "system_audit": "读取信号表行数/更新时间,审计数据管道是否畅通",
+ "intraday_health_check": "读取最新信号,检查盘中是否有新的风险信号到达",
+ "xiaoguo_signal_consumer": "读取小果相关信号,生成买入/卖出建议",
+ "server": "读取信号数据供Web Dashboard展示",
+ },
+ },
+ "holdings": {
+ "summary": "当前持仓表,是系统最核心的数据表之一。import_holding_xls从券商文件导入持仓,mofin_db在价格刷新时更新市值。下游脚本读取持仓做策略分析和推送。",
+ "writers": {
+ "mofin_db": "写入price_monitor刷新后的持仓最新市值(通过write_holdings_batch)",
+ "import_holding_xls": "从券商holding.xls导入最新持仓数量/成本/市值",
+ },
+ "readers": {
+ "stale_push_wlin": "读取持仓列表+最新价格,检查是否进入买入区/触发止损",
+ "mofin_db": "内部读取(get_price_from_db等函数)",
+ "system_audit": "读取持仓总数/品种分布,审计持仓完整性",
+ "server": "读取持仓数据供Web Dashboard展示",
+ "prepare_report_data": "读取持仓数据用于生成分析报告",
+ "mo_data": "通过read_portfolio()读取持仓结构化数据",
+ },
+ },
+ "portfolio_summary": {
+ "summary": "组合汇总表(id=1单行),记录总资产=持股市值+可用资金+冻结资金。每笔导入或价格刷新后更新。",
+ "writers": {
+ "mofin_db": "价格监控刷新总市值后更新total_mv/total_assets",
+ "import_holding_xls": "导入持仓后更新cash/frozen/total_assets",
+ },
+ "readers": {
+ "import_holding_xls": "读取当前汇总信息,验证导入后是否正确",
+ "mo_data": "通过read_portfolio()读取组合汇总",
+ "price_monitor": "读取当前现金/市值,计算总资产变动",
+ "prepare_report_data": "读取总资产/现金数据用于报告",
+ "server": "读取汇总数据供Dashboard展示",
+ },
+ },
+ "holding_strategies": {
+ "summary": "策略数据表,记录每只持仓/自选股的策略配置(买入价/止损/止盈/目标价/分析维度等)。多写入方按各自职责更新不同字段。",
+ "writers": {
+ "data_governance": "归档过期策略、修复异常策略数据",
+ "sync_decisions_to_db": "从JSON同步策略到DB",
+ "mofin_db": "策略写入(内部函数)",
+ "strategy_review": "策略复盘后更新执行结果和评级",
+ },
+ "readers": {
+ "data_governance": "读取所有活跃策略,检查缺失和异常",
+ "per_stock_reassess": "读取个股策略配置,判断是否需要重评",
+ "mo_data": "通过read_decisions()读取策略数据",
+ "stale_push_wlin": "读取买入区/止损/止盈配置,检查价格触发",
+ },
+ },
+ "live_prices": {
+ "summary": "实时价格缓存表,price_monitor每2分钟写入全量持仓/自选价格。所有脚本必须通过mo_data.get_price()读取——先读此表,无数据才调API。单一写入、多方读取。",
+ "writers": {
+ "mofin_db": "price_monitor调用write_live_prices写入最新价格",
+ "mo_data": "get_price()兜底时从API拉取价格后写回此表",
+ },
+ "readers": {
+ "mo_data": "get_price()/get_prices_batch()优先从此表读取价格",
+ "mofin_db": "内部读取(get_price_from_db)",
+ "system_audit": "读取价格更新时间和数据量",
+ "verify_reassess_pipeline": "验证重评管道是否有最新价格",
+ },
+ },
+ "price_events": {
+ "summary": "价格触发事件表,价格进入/离开买入区或触发止损止盈时记录事件。用于审计和重评触发。",
+ "writers": {
+ "mofin_db": "price_monitor检测到价格区间变化时写入事件记录",
+ },
+ "readers": {
+ "mofin_db": "查询历史事件判断是否触发重评",
+ },
+ },
+ "cash_log": {
+ "summary": "资金流水表,每次资金变动(入金/出金/冻结/解冻)记录一条日志。审计用。",
+ "writers": {
+ "mofin_db": "通过write_cash_log记录资金变动",
+ "mo_data": "write_cash_log函数入口",
+ },
+ "readers": {
+ "prepare_report_data": "读取现金变动历史用于报告",
+ "mofin_db": "内部查询最近流水",
+ },
+ },
+ "market_snapshots": {
+ "summary": "市场快照表,market_watch每10分钟采集全市场大盘指数+板块涨跌+上涨下跌家数。下游用于判断市场情绪。",
+ "writers": {
+ "mofin_db": "market_watch采集后写入快照数据",
+ },
+ "readers": {
+ "market_screener": "读取最新板块快照,判断热点板块",
+ "prepare_report_data": "读取市场情绪数据用于报告",
+ "mofin_db": "内部查询最新快照",
+ "system_audit": "审计数据新鲜度",
+ },
+ },
+ "sector_snapshots": {
+ "summary": "板块快照表,market_watch按板块写入涨跌/领涨股/资金流向。market_screener据此判断行业热点。",
+ "writers": {
+ "mofin_db": "market_watch采集后写入各板块数据",
+ },
+ "readers": {
+ "market_screener": "读取板块涨跌排名,筛选热点行业",
+ "strategy_lifecycle": "读取板块数据用于策略生命周期管理",
+ "mofin_db": "内部查询",
+ "trend_detector": "读取板块趋势数据用于趋势检测",
+ },
+ },
+ "sector_signals": {
+ "summary": "板块信号表,多源汇聚的板块级别信号(新闻情感+趋势+资金流向)。用于判断行业轮动。",
+ "writers": {
+ "mofin_news": "写入新闻分析得出的板块信号",
+ "xiaoguo_news_processor": "写入小果LLM分析的板块情感信号",
+ "trend_detector": "写入技术面趋势检测到的板块信号",
+ },
+ "readers": {
+ "server": "读取供Dashboard展示",
+ "mofin_news": "读取已有信号做增量更新",
+ "xiaoguo_news_processor": "读取已有信号避免重复写入",
+ "trend_detector": "读取信号辅助趋势判定",
+ },
+ },
+ "macro_context_log": {
+ "summary": "宏观上下文日志,refresh_macro_context每30分钟采集大盘指数/市场情绪/资金面数据。下游多个脚本按需读取最新宏观状态。",
+ "writers": {
+ "refresh_macro_context": "每30分钟采集上证/深证/创业板/恒指等指数+情绪指标",
+ },
+ "readers": {
+ "stale_push_wlin": "读取大盘情绪用于策略推送的宏观背景",
+ "divergence_detector": "读取多市场指数数据做背离检测",
+ "system_audit": "审计数据采集是否正常",
+ "xiaoguo_signal_consumer": "读取宏观情绪辅助信号判定",
+ },
+ },
+ "macro_raw_news": {
+ "summary": "宏观新闻原始数据表,macro_context_collector采集的未经处理的财经新闻。供后续清洗和分析。",
+ "writers": {
+ "macro_context_collector": "从财经网站采集原始新闻标题+URL+摘要",
+ },
+ "readers": {
+ "macro_context_collector": "读取最近新闻hash避免重复采集",
+ "system_audit": "审计新闻采集量",
+ },
+ },
+ "accuracy_stats": {
+ "summary": "策略准确率统计表,strategy_review复盘后写入各策略的正确/错误/待定计数。",
+ "writers": {
+ "strategy_review": "策略复盘后更新准确率统计",
+ },
+ "readers": {
+ "mofin_db": "读取统计结果用于报告",
+ },
+ },
+ "advice_timeline": {
+ "summary": "建议时间线表,记录每条推送建议的时间/内容/状态。用于审计和对账。",
+ "writers": {
+ "advice_reconciliation": "每周对账时写入对账结果",
+ },
+ "readers": {
+ "advice_reconciliation": "读取历史建议做对账",
+ "mofin_db": "内部查询",
+ },
+ },
+ "candidate_score_history": {
+ "summary": "候选股评分历史表,记录每次全市场筛选时对候选股的评分。用于评分变化追踪。",
+ "writers": {
+ "mofin_db": "market_screener筛选结果写入评分记录",
+ },
+ "readers": {
+ "mofin_db": "查询评分历史供展示",
+ },
+ },
+ "candidates": {
+ "summary": "候选股池表,market_screener筛选出的值得关注的个股。包含评分/买入区/止损/目标价。",
+ "writers": {
+ "mofin_db": "market_screener写入候选股",
+ "market_screener": "直接写入候选股列表",
+ },
+ "readers": {
+ "mofin_db": "读取候选股数据供展示和后续处理",
+ },
+ },
+ "capital_flow_cache": {
+ "summary": "资金流向缓存表,capital_flow_collector采集的板块资金流入流出数据。",
+ "writers": {
+ "mofin_db": "写入板块资金流向数据",
+ },
+ "readers": {
+ "mofin_db": "读取缓存数据",
+ },
+ },
+ "health_check_log": {
+ "summary": "健康检查日志表,morning_health_check每次运行记录检查结果。用于追踪系统健康历史。",
+ "writers": {
+ "morning_health_check": "每日开盘前体检后写入检查结果",
+ },
+ "readers": {
+ "morning_health_check": "读取历史检查结果比较变化",
+ },
+ },
+ "mtf_cache": {
+ "summary": "多周期技术指标缓存,refresh_mtf_cache计算MA5/MA20/MA60/支撑阻力位等。下游技术分析脚本从缓存读取避免重复计算。",
+ "writers": {
+ "multi_timeframe": "计算并写入多周期MA/支撑阻力位",
+ "mofin_db": "内部写入函数",
+ },
+ "readers": {
+ "multi_timeframe": "读取已有缓存判断是否需要刷新",
+ "technical_analysis": "读取MA/支撑阻力位用于技术分析",
+ "mofin_db": "内部读取",
+ },
+ },
+ "stock_fundamentals": {
+ "summary": "基本面数据表,存储PE/PB/ROE/市值等财务指标。",
+ "writers": {
+ "mofin_db": "基本面数据采集后写入",
+ },
+ "readers": {
+ "strategy_lifecycle": "读取基本面数据用于策略评估",
+ },
+ },
+ "stock_sectors": {
+ "summary": "股票-板块映射表,记录每只股票所属行业板块。多脚本用于行业分类和板块归因。",
+ "writers": {
+ "mofin_db": "股票行业分类数据写入",
+ },
+ "readers": {
+ "xiaoguo_news_processor": "按行业分类新闻",
+ "mofin_news": "按行业归类新闻",
+ "mofin_db": "内部查询",
+ "strategy_lifecycle": "读取行业信息用于策略决策",
+ },
+ },
+ "stocks": {
+ "summary": "全量股票代码表,所有A股/港股基础信息。供各脚本按code查询股票名称/市场。",
+ "writers": {
+ "mofin_db": "初始化时导入全量股票代码",
+ },
+ "readers": {
+ "mofin_news": "按股票代码查找新闻",
+ "xiaoguo_news_processor": "按股票代码过滤新闻",
+ "mofin_db": "内部查询",
+ "trend_detector": "按股票代码获取数据",
+ },
+ },
+ "strategy_evaluations": {
+ "summary": "策略评估结果表,策略评估脚本每次运行记录评估得分/等级/评语。",
+ "writers": {
+ "mofin_collect": "策略评估前采集数据并写入评估结果",
+ },
+ "readers": {
+ "verify_reassess_pipeline": "读取评估结果验证管道完整性",
+ "mofin_db": "内部查询",
+ "system_audit": "审计评估是否按时执行",
+ },
+ },
+ "strategy_feedback": {
+ "summary": "策略反馈表,记录用户对建议的反馈(采纳/忽略/修改)。用于策略自学习。",
+ "writers": {
+ "mofin_db": "写入反馈数据",
+ "server": "通过Web提交反馈后写入",
+ },
+ "readers": {
+ "mofin_db": "读取反馈用于分析和展示",
+ },
+ },
+ "todos": {
+ "summary": "待办事项表,各脚本发现异常时写入TODO,self_todo_executor每10分钟执行修复。异常发现→自动修复的闭环。",
+ "writers": {
+ "morning_health_check": "体检发现异常写入TODO",
+ "intraday_health_check": "盘中自检发现异常写入TODO",
+ "strategy-staleness-check": "策略过期检测写入TODO",
+ "self_todo_executor": "执行完成后更新TODO状态",
+ "preflight_verify": "开盘前验证失败写入TODO",
+ },
+ "readers": {
+ "morning_health_check": "读取待处理的TODO",
+ "self_todo_executor": "读取待处理的TODO并执行fix_action",
+ "strategy-staleness-check": "读取TODO避免重复写入",
+ "intraday_health_check": "读取TODO检查自愈进度",
+ },
+ },
+ "watchlist_stocks": {
+ "summary": "自选股表,系统自动维护的观察列表。与持仓表分离,用于跟踪潜在买入机会。",
+ "writers": {
+ "per_stock_reassess": "策略重评时更新自选状态",
+ "mofin_db": "内部写入函数",
+ },
+ "readers": {
+ "per_stock_reassess": "读取自选列表做重评",
+ "stock_quote": "读取自选代码拉取行情",
+ "mo_alphasift_bridge": "读取自选供Alpha分析",
+ "mo_data": "通过read_watchlist()读取自选数据",
+ },
+ },
+ "xiaoguo_scan_tracker": {
+ "summary": "小果扫描追踪表,记录每次小果扫描的状态/耗时/结果数量。用于监控小果服务健康。",
+ "writers": {
+ "xiaoguo_scanner": "每次扫描完成后写入状态和统计",
+ },
+ "readers": {
+ "server": "读取扫描状态供Dashboard展示",
+ "xiaoguo_scanner": "读取上次扫描时间判断是否需要全量扫描",
+ },
+ },
+ "state_meta": {
+ "summary": "状态元数据表,记录各服务的状态追踪信息(如扫描偏移量/最新处理ID)。",
+ "writers": {
+ "xiaoguo_scanner": "写入扫描进度偏移量",
+ },
+ "readers": {
+ "xiaoguo_scanner": "读取上次处理位置继续增量处理",
+ },
+ },
+}
+
def build_feature_tree(cron_jobs, db_stats):
# 硬编码分类规则:标签→匹配关键词
@@ -491,6 +822,10 @@ def build_report():
}
if not writers and tname in _manual_writers:
writers = _manual_writers[tname]
+
+ # 数据流详细描述
+ flow_detail = FLOW_DETAIL.get(tname, {})
+
has_input = len(writers) > 0
has_output = len(readers) > 0
# 排除系统表
@@ -517,6 +852,7 @@ def build_report():
"orphan": flow_status in ("orphan", "read_only", "write_only"),
"flow_status": flow_status,
"warn": flow_status != "healthy",
+ "flow_detail": flow_detail,
})
# JSON文件
diff --git a/static/mofin_health.html b/static/mofin_health.html
index 236ead5b..05c39322 100644
--- a/static/mofin_health.html
+++ b/static/mofin_health.html
@@ -170,24 +170,43 @@ function renderDataFlow(entities, jsonFiles, architecture) {
const w = e.writers || [];
const r = e.readers || [];
if (w.length === 0 && r.length === 0) return;
+ const fd = e.flow_detail || {};
+ const wDesc = fd.writers || {};
+ const rDesc = fd.readers || {};
html += '
';
- html += `
🗄️ ${e.name}
`;
- html += `
${e.desc||''} · ${e.rows}行
`;
+ html += `
🗄️ ${e.name}
`;
+ html += `
${e.desc||''}
`;
+ // 综合总结
+ if (fd.summary) {
+ html += `
📌 ${fd.summary}
`;
+ }
- // 写入方
+ // 写入方(带详细说明)
if (w.length > 0) {
html += '
';
- html += '
✏️ 写入: ';
- html += w.map(s => `
${s}`).join(' ');
+ html += '
✏️ 写入: ';
+ w.forEach(wn => {
+ const desc = wDesc[wn] || '';
+ html += `
`;
+ html += `${wn}`;
+ if (desc) html += `— ${desc}`;
+ html += `
`;
+ });
html += '
';
}
- // 读取方
+ // 读取方(带详细说明)
if (r.length > 0) {
html += '
';
- html += '
📖 读取: ';
- html += r.map(s => `
${s}`).join(' ');
+ html += '
📖 读取: ';
+ r.forEach(rn => {
+ const desc = rDesc[rn] || '';
+ html += `
`;
+ html += `${rn}`;
+ if (desc) html += `— ${desc}`;
+ html += `
`;
+ });
html += '
';
}
diff --git a/static/mofin_health.json b/static/mofin_health.json
index 53f9ec5a..8e416ca9 100644
--- a/static/mofin_health.json
+++ b/static/mofin_health.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-09 00:24:10",
+ "generated_at": "2026-07-09 08:46:53",
"feature_tree": {
"label": "MoFin 系统",
"status": "ok",
@@ -11,6 +11,7 @@
{
"label": "市场快照",
"status": "ok",
+ "desc": "每10分钟采集全市场板块和指数快照",
"pipes": [
{
"name": "市场数据采集",
@@ -26,6 +27,7 @@
{
"label": "宏观新闻",
"status": "ok",
+ "desc": "采集宏观新闻和财经资讯",
"pipes": [
{
"name": "宏观采集-早盘",
@@ -50,6 +52,7 @@
{
"label": "价格监控",
"status": "ok",
+ "desc": "每2分钟刷新持仓/自选实时价格→写入live_prices",
"pipes": [
{
"name": "价格监控-高频",
@@ -74,6 +77,7 @@
{
"label": "小果扫描",
"status": "ok",
+ "desc": "小果独立扫描潜在机会",
"pipes": [
{
"name": "小果独立扫描",
@@ -89,6 +93,7 @@
{
"label": "资金流采集",
"status": "ok",
+ "desc": "盘中采集板块资金流向",
"pipes": [
{
"name": "资金流采集-盘中",
@@ -104,6 +109,7 @@
{
"label": "宏观上下文刷新",
"status": "ok",
+ "desc": "刷新大盘指数/市场情绪",
"pipes": [
{
"name": "宏观上下文刷新-每30分",
@@ -118,6 +124,7 @@
},
{
"label": "宏观新闻采集 (macro_context_collector.py)",
+ "desc": "采集宏观新闻",
"status": "ok",
"pipes": [
{
@@ -125,7 +132,7 @@
"script": "macro_context_collector.py",
"schedule": "*/30 8-15 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T15:30",
+ "last_run": "2026-07-09T08:30",
"type": "no_agent",
"profile": "position-analyst"
}
@@ -133,6 +140,7 @@
},
{
"label": "宏观新闻采集-周末 (macro_context_collector.py)",
+ "desc": "周末宏观新闻采集",
"status": "ok",
"pipes": [
{
@@ -146,7 +154,8 @@
}
]
}
- ]
+ ],
+ "desc": "从腾讯/东财/小果采集原始行情、新闻、资金流数据"
},
{
"label": "策略分析",
@@ -154,11 +163,13 @@
"children": [
{
"label": "策略重评",
- "status": "ok"
+ "status": "ok",
+ "desc": "价格偏离买入区或策略过期时自动重评"
},
{
"label": "持仓自选新鲜度检查",
"status": "ok",
+ "desc": "检查策略是否过期或价格严重偏离",
"pipes": [
{
"name": "策略时效性检查(日)",
@@ -174,6 +185,7 @@
{
"label": "自选买入区提醒",
"status": "ok",
+ "desc": "自选进入买入区时推送提醒",
"pipes": [
{
"name": "自选买入区提醒-盘前午间尾盘",
@@ -198,6 +210,7 @@
{
"label": "策略评估",
"status": "ok",
+ "desc": "每日/每周策略效果评估",
"pipes": [
{
"name": "策略评估-每周",
@@ -231,6 +244,7 @@
{
"label": "分支自成长",
"status": "ok",
+ "desc": "策略分支探索和剪枝",
"pipes": [
{
"name": "分支自成长-盘中",
@@ -246,13 +260,14 @@
{
"label": "元自成长",
"status": "ok",
+ "desc": "系统元层级自我进化",
"pipes": [
{
"name": "元自成长-每日",
"script": "meta_growth.py",
"schedule": "45 0,12 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T12:45",
+ "last_run": "2026-07-09T00:45",
"type": "no_agent",
"profile": "position-analyst"
}
@@ -260,6 +275,7 @@
},
{
"label": "分支剪枝-每日 (prune_branches.py)",
+ "desc": "修剪已失效的策略分支",
"status": "ok",
"pipes": [
{
@@ -275,6 +291,7 @@
},
{
"label": "自选股自动重评-周末 (stale_detector.py)",
+ "desc": "周末批量重评自选股策略",
"status": null,
"pipes": [
{
@@ -288,7 +305,8 @@
}
]
}
- ]
+ ],
+ "desc": "策略评估、新鲜度检查、重评和成长分析"
},
{
"label": "推荐推送",
@@ -297,6 +315,7 @@
{
"label": "MoFin盘前中监控",
"status": "ok",
+ "desc": "上午盘中实时监控+推送",
"pipes": [
{
"name": "MoFin 盘前中监控",
@@ -312,6 +331,7 @@
{
"label": "MoFin午后监控",
"status": "ok",
+ "desc": "下午盘中实时监控+推送",
"pipes": [
{
"name": "MoFin 午后监控",
@@ -327,6 +347,7 @@
{
"label": "cron报告推XMPP",
"status": "ok",
+ "desc": "cron报告通过XMPP推送到手机",
"pipes": [
{
"name": "cron报告推XMPP-每5分",
@@ -342,6 +363,7 @@
{
"label": "开盘简报",
"status": "ok",
+ "desc": "每日开盘前市场简报",
"pipes": [
{
"name": "开盘简报",
@@ -357,6 +379,7 @@
{
"label": "收盘简报",
"status": "ok",
+ "desc": "每日收盘后市场简报",
"pipes": [
{
"name": "收盘简报",
@@ -372,6 +395,7 @@
{
"label": "市场精选推荐",
"status": "ok",
+ "desc": "每日全市场潜力股精推",
"pipes": [
{
"name": "市场精选推荐-每日",
@@ -386,6 +410,7 @@
},
{
"label": "系统健康检查-开盘前 (system_health_check.py)",
+ "desc": "开盘前检查所有核心组件是否正常",
"status": "ok",
"pipes": [
{
@@ -401,6 +426,7 @@
},
{
"label": "多周期缓存刷新-开盘前 (refresh_mtf_cache.py)",
+ "desc": "开盘前刷新技术指标缓存",
"status": "ok",
"pipes": [
{
@@ -416,6 +442,7 @@
},
{
"label": "MoFin 系统常规体检-开盘前 (morning_health_check.py)",
+ "desc": "开盘前8:00全面系统体检",
"status": "ok",
"pipes": [
{
@@ -423,7 +450,7 @@
"script": "morning_health_check.py",
"schedule": "0 8 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T08:01",
+ "last_run": "2026-07-09T08:01",
"type": "no_agent",
"profile": "position-analyst"
}
@@ -431,14 +458,15 @@
},
{
"label": "开盘前钉对钉验证 (preflight_verify.py)",
- "status": null,
+ "desc": "开盘前15项验证(脚本同步/DB完整性/资产公式)",
+ "status": "error",
"pipes": [
{
"name": "开盘前钉对钉验证",
"script": "preflight_verify.py",
"schedule": "30 8 * * 1-5",
- "status": null,
- "last_run": "",
+ "status": "error",
+ "last_run": "2026-07-09T08:30",
"type": "no_agent",
"profile": "position-analyst"
}
@@ -446,6 +474,7 @@
},
{
"label": "cron-推XMPP中继 (cron_to_xmpp.py)",
+ "desc": "将cron输出通过XMPP中继推送",
"status": "ok",
"pipes": [
{
@@ -459,7 +488,8 @@
}
]
}
- ]
+ ],
+ "desc": "生成简报、推荐并推送到XMPP"
},
{
"label": "风险监控",
@@ -468,13 +498,14 @@
{
"label": "宏观风险扫描",
"status": "ok",
+ "desc": "从新闻中检测系统性风险",
"pipes": [
{
"name": "宏观风险扫描",
"script": null,
"schedule": "30 8 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T08:39",
+ "last_run": "2026-07-09T08:45",
"type": "LLM",
"profile": "position-analyst"
},
@@ -501,6 +532,7 @@
{
"label": "宏观风险信号消费",
"status": "ok",
+ "desc": "消费宏观风险信号并生成建议",
"pipes": [
{
"name": "宏观风险信号消费",
@@ -516,13 +548,14 @@
{
"label": "跨市场背离检测",
"status": "ok",
+ "desc": "检测A股/港股/美股指数背离",
"pipes": [
{
"name": "跨市场背离检测",
"script": "divergence_detector.py",
"schedule": "*/30 8-15 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T15:30",
+ "last_run": "2026-07-09T08:30",
"type": "no_agent",
"profile": "position-analyst"
},
@@ -539,6 +572,7 @@
},
{
"label": "小果信号消费-盘中 (xiaoguo_signal_consumer.py)",
+ "desc": "盘中消费小果扫描信号",
"status": "ok",
"pipes": [
{
@@ -552,7 +586,8 @@
}
]
}
- ]
+ ],
+ "desc": "宏观风险信号、跨市场背离检测"
},
{
"label": "自检/审计",
@@ -561,6 +596,7 @@
{
"label": "系统全局审计",
"status": "ok",
+ "desc": "7维度系统全面审计",
"pipes": [
{
"name": "系统全局审计",
@@ -576,6 +612,7 @@
{
"label": "全局cron健康监控",
"status": "ok",
+ "desc": "监控所有cron的运行状态",
"pipes": [
{
"name": "全局cron健康监控-每10分",
@@ -591,6 +628,7 @@
{
"label": "重评管道审计",
"status": "ok",
+ "desc": "审计策略重评管道完整性",
"pipes": [
{
"name": "重评管道审计-每30分",
@@ -606,6 +644,7 @@
{
"label": "健康监控数据采集",
"status": "ok",
+ "desc": "采集健康数据供Dashboard展示",
"pipes": [
{
"name": "健康监控数据采集-每15分",
@@ -620,6 +659,7 @@
},
{
"label": "硬编码扫描-每日 (hardcode_scanner.py)",
+ "desc": "扫描脚本中的硬编码参数",
"status": "ok",
"pipes": [
{
@@ -635,6 +675,7 @@
},
{
"label": "盘中自检-高频 (intraday_health_check.py)",
+ "desc": "每15分钟盘中自检",
"status": "ok",
"pipes": [
{
@@ -650,6 +691,7 @@
},
{
"label": "数据治理-每周 (data_governance.py)",
+ "desc": "每周数据治理",
"status": "ok",
"pipes": [
{
@@ -665,6 +707,7 @@
},
{
"label": "记忆守卫-每日 (memory_guardian.py)",
+ "desc": "每日记忆优化",
"status": "ok",
"pipes": [
{
@@ -672,13 +715,14 @@
"script": "memory_guardian.py",
"schedule": "0 7 * * *",
"status": "ok",
- "last_run": "2026-07-08T07:01",
+ "last_run": "2026-07-09T07:01",
"type": "no_agent",
"profile": "position-analyst"
}
]
}
- ]
+ ],
+ "desc": "系统健康检查、监控采集、审计"
},
{
"label": "执行/修复",
@@ -687,13 +731,14 @@
{
"label": "自愈执行器",
"status": "ok",
+ "desc": "每10分钟自动处理TODO列表",
"pipes": [
{
"name": "自愈执行器-TODO自动处理",
"script": "self_todo_executor.py",
"schedule": "*/10 8-22 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T22:50",
+ "last_run": "2026-07-09T08:40",
"type": "no_agent",
"profile": "position-analyst"
}
@@ -702,6 +747,7 @@
{
"label": "策略质量门禁",
"status": "ok",
+ "desc": "新策略必须通过9维验证才能写入",
"pipes": [
{
"name": "策略质量门禁-重评跟进",
@@ -717,6 +763,7 @@
{
"label": "自选自动清理",
"status": "ok",
+ "desc": "开盘前清理过期自选数据",
"pipes": [
{
"name": "自选自动清理-开盘前",
@@ -732,6 +779,7 @@
{
"label": "建议对账",
"status": "ok",
+ "desc": "每周对账校验建议准确性",
"pipes": [
{
"name": "建议对账-每周",
@@ -744,7 +792,8 @@
}
]
}
- ]
+ ],
+ "desc": "自愈系统、门禁跟进、清理修复"
},
{
"label": "持仓复查",
@@ -753,6 +802,7 @@
{
"label": "持仓基本面复查",
"status": "ok",
+ "desc": "每周持仓基本面深度复查",
"pipes": [
{
"name": "分析师-持仓复查",
@@ -768,6 +818,7 @@
{
"label": "策略复盘",
"status": "ok",
+ "desc": "每日策略执行复盘",
"pipes": [
{
"name": "策略复盘-每日",
@@ -780,7 +831,8 @@
}
]
}
- ]
+ ],
+ "desc": "持仓基本面复查和策略复盘"
},
{
"label": "信号消费",
@@ -789,6 +841,7 @@
{
"label": "小果情感分析",
"status": "ok",
+ "desc": "收盘后对持仓/自选做新闻情感分析",
"pipes": [
{
"name": "小果情感分析",
@@ -803,9 +856,11 @@
},
{
"label": "宏观风险信号消费-盘中",
- "status": "ok"
+ "status": "ok",
+ "desc": "盘中消费宏观风险信号"
}
- ]
+ ],
+ "desc": "消费小果情感分析和宏观风险信号"
},
{
"label": "持仓监控",
@@ -813,6 +868,7 @@
"children": [
{
"label": "300308入场信号紧盯 (monitor_300308.py)",
+ "desc": "300308入场信号(13:00-14:00)",
"status": "ok",
"pipes": [
{
@@ -828,6 +884,7 @@
},
{
"label": "300308午后紧盯 (300308_monitor.py)",
+ "desc": "300308午后监控(13:00-15:00含止损)",
"status": "ok",
"pipes": [
{
@@ -843,6 +900,7 @@
},
{
"label": "多周期缓存刷新-盘中 (refresh_mtf_cache.py)",
+ "desc": "盘中刷新技术指标缓存",
"status": "ok",
"pipes": [
{
@@ -864,6 +922,7 @@
"children": [
{
"label": "知识萃取-盘后 (None)",
+ "desc": "盘后从分析报告中萃取可复用知识",
"status": "ok",
"pipes": [
{
@@ -879,6 +938,7 @@
},
{
"label": "区间维护 (None)",
+ "desc": "每30分钟维护买入区",
"status": "unknown",
"pipes": [
{
@@ -894,6 +954,7 @@
},
{
"label": "知微洞察生成 (market_insight.py)",
+ "desc": "生成每日市场洞察(15:35)",
"status": "ok",
"pipes": [
{
@@ -909,6 +970,7 @@
},
{
"label": "小果市场筛选-全市场 (market_screener.py)",
+ "desc": "小果筛选全市场关注板块",
"status": "ok",
"pipes": [
{
@@ -924,6 +986,7 @@
},
{
"label": "数据同步-dashboard (sync_dashboard.py)",
+ "desc": "同步数据到Dashboard",
"status": "ok",
"pipes": [
{
@@ -945,6 +1008,7 @@
"children": [
{
"label": "state.db真空整理-每周 (vacuum_state_db.py)",
+ "desc": "每周DB真空整理",
"status": null,
"pipes": [
{
@@ -977,15 +1041,24 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "策略准确率统计表,strategy_review复盘后写入各策略的正确/错误/待定计数。",
+ "writers": {
+ "strategy_review": "策略复盘后更新准确率统计"
+ },
+ "readers": {
+ "mofin_db": "读取统计结果用于报告"
+ }
+ }
},
{
"name": "advice_timeline",
"desc": "建议执行时间线",
"rows": 12735,
"readers": [
- "mofin_db",
- "advice_reconciliation"
+ "advice_reconciliation",
+ "mofin_db"
],
"writers": [
"advice_reconciliation"
@@ -994,7 +1067,17 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "建议时间线表,记录每条推送建议的时间/内容/状态。用于审计和对账。",
+ "writers": {
+ "advice_reconciliation": "每周对账时写入对账结果"
+ },
+ "readers": {
+ "advice_reconciliation": "读取历史建议做对账",
+ "mofin_db": "内部查询"
+ }
+ }
},
{
"name": "candidate_score_history",
@@ -1010,7 +1093,16 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "候选股评分历史表,记录每次全市场筛选时对候选股的评分。用于评分变化追踪。",
+ "writers": {
+ "mofin_db": "market_screener筛选结果写入评分记录"
+ },
+ "readers": {
+ "mofin_db": "查询评分历史供展示"
+ }
+ }
},
{
"name": "candidates",
@@ -1027,7 +1119,17 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "候选股池表,market_screener筛选出的值得关注的个股。包含评分/买入区/止损/目标价。",
+ "writers": {
+ "mofin_db": "market_screener写入候选股",
+ "market_screener": "直接写入候选股列表"
+ },
+ "readers": {
+ "mofin_db": "读取候选股数据供展示和后续处理"
+ }
+ }
},
{
"name": "capital_flow_cache",
@@ -1043,15 +1145,24 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "资金流向缓存表,capital_flow_collector采集的板块资金流入流出数据。",
+ "writers": {
+ "mofin_db": "写入板块资金流向数据"
+ },
+ "readers": {
+ "mofin_db": "读取缓存数据"
+ }
+ }
},
{
"name": "cash_log",
"desc": "资金变动记录",
"rows": 15,
"readers": [
- "mofin_db",
- "prepare_report_data"
+ "prepare_report_data",
+ "mofin_db"
],
"writers": [
"mofin_db",
@@ -1061,12 +1172,23 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "资金流水表,每次资金变动(入金/出金/冻结/解冻)记录一条日志。审计用。",
+ "writers": {
+ "mofin_db": "通过write_cash_log记录资金变动",
+ "mo_data": "write_cash_log函数入口"
+ },
+ "readers": {
+ "prepare_report_data": "读取现金变动历史用于报告",
+ "mofin_db": "内部查询最近流水"
+ }
+ }
},
{
"name": "health_check_log",
"desc": "健康检查日志",
- "rows": 12,
+ "rows": 13,
"readers": [
"morning_health_check"
],
@@ -1077,60 +1199,99 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "健康检查日志表,morning_health_check每次运行记录检查结果。用于追踪系统健康历史。",
+ "writers": {
+ "morning_health_check": "每日开盘前体检后写入检查结果"
+ },
+ "readers": {
+ "morning_health_check": "读取历史检查结果比较变化"
+ }
+ }
},
{
"name": "holding_strategies",
"desc": "每只股票的完整策略参数",
"rows": 37,
"readers": [
- "sync_decisions_to_db",
- "pre-flight-check",
+ "data_governance",
+ "mofin_db",
"mo_data",
"strategy_lifecycle",
- "mofin_db",
+ "mofin_collect",
+ "run_all_tests",
+ "verify_reassess_pipeline",
"stale_push_wlin",
"system_audit",
- "run_all_tests",
- "system_health_check",
- "per_stock_reassess"
+ "system_health_check"
],
"writers": [
- "mofin_db",
"data_governance",
- "sync_decisions_to_db"
+ "sync_decisions_to_db",
+ "mofin_db"
],
"has_input": true,
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "策略数据表,记录每只持仓/自选股的策略配置(买入价/止损/止盈/目标价/分析维度等)。多写入方按各自职责更新不同字段。",
+ "writers": {
+ "data_governance": "归档过期策略、修复异常策略数据",
+ "sync_decisions_to_db": "从JSON同步策略到DB",
+ "mofin_db": "策略写入(内部函数)",
+ "strategy_review": "策略复盘后更新执行结果和评级"
+ },
+ "readers": {
+ "data_governance": "读取所有活跃策略,检查缺失和异常",
+ "per_stock_reassess": "读取个股策略配置,判断是否需要重评",
+ "mo_data": "通过read_decisions()读取策略数据",
+ "stale_push_wlin": "读取买入区/止损/止盈配置,检查价格触发"
+ }
+ }
},
{
"name": "holdings",
"desc": "当前持仓(权威源)",
"rows": 19,
"readers": [
- "mofin_db",
- "system_audit",
- "run_all_tests",
+ "price_monitor",
+ "strategy_lifecycle",
+ "trend_detector",
"prepare_recommendation",
- "mofin_collect",
- "mo_data",
+ "per_stock_reassess",
"import_holding_xls",
- "refresh_mtf_cache",
- "mo_alphasift_bridge",
- "trend_detector"
+ "xiaoguo_scanner",
+ "mo_data",
+ "mofin_collect",
+ "run_all_tests"
],
"writers": [
- "mofin_db",
- "import_holding_xls"
+ "import_holding_xls",
+ "mofin_db"
],
"has_input": true,
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "当前持仓表,是系统最核心的数据表之一。import_holding_xls从券商文件导入持仓,mofin_db在价格刷新时更新市值。下游脚本读取持仓做策略分析和推送。",
+ "writers": {
+ "mofin_db": "写入price_monitor刷新后的持仓最新市值(通过write_holdings_batch)",
+ "import_holding_xls": "从券商holding.xls导入最新持仓数量/成本/市值"
+ },
+ "readers": {
+ "stale_push_wlin": "读取持仓列表+最新价格,检查是否进入买入区/触发止损",
+ "mofin_db": "内部读取(get_price_from_db等函数)",
+ "system_audit": "读取持仓总数/品种分布,审计持仓完整性",
+ "server": "读取持仓数据供Web Dashboard展示",
+ "prepare_report_data": "读取持仓数据用于生成分析报告",
+ "mo_data": "通过read_portfolio()读取持仓结构化数据"
+ }
+ }
},
{
"name": "live_prices",
@@ -1138,10 +1299,10 @@
"rows": 20,
"readers": [
"cron_health_monitor",
- "mofin_db",
- "system_audit",
+ "mo_data",
"verify_reassess_pipeline",
- "mo_data"
+ "system_audit",
+ "mofin_db"
],
"writers": [
"mofin_db",
@@ -1151,7 +1312,20 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "实时价格缓存表,price_monitor每2分钟写入全量持仓/自选价格。所有脚本必须通过mo_data.get_price()读取——先读此表,无数据才调API。单一写入、多方读取。",
+ "writers": {
+ "mofin_db": "price_monitor调用write_live_prices写入最新价格",
+ "mo_data": "get_price()兜底时从API拉取价格后写回此表"
+ },
+ "readers": {
+ "mo_data": "get_price()/get_prices_batch()优先从此表读取价格",
+ "mofin_db": "内部读取(get_price_from_db)",
+ "system_audit": "读取价格更新时间和数据量",
+ "verify_reassess_pipeline": "验证重评管道是否有最新价格"
+ }
+ }
},
{
"name": "macro_context_log",
@@ -1159,12 +1333,12 @@
"rows": 12,
"readers": [
"strategy_lifecycle",
- "stock_profile",
"strategy_tree",
- "stale_push_wlin",
+ "divergence_detector",
"system_audit",
"xiaoguo_signal_consumer",
- "divergence_detector"
+ "stale_push_wlin",
+ "stock_profile"
],
"writers": [
"refresh_macro_context"
@@ -1173,12 +1347,24 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "宏观上下文日志,refresh_macro_context每30分钟采集大盘指数/市场情绪/资金面数据。下游多个脚本按需读取最新宏观状态。",
+ "writers": {
+ "refresh_macro_context": "每30分钟采集上证/深证/创业板/恒指等指数+情绪指标"
+ },
+ "readers": {
+ "stale_push_wlin": "读取大盘情绪用于策略推送的宏观背景",
+ "divergence_detector": "读取多市场指数数据做背离检测",
+ "system_audit": "审计数据采集是否正常",
+ "xiaoguo_signal_consumer": "读取宏观情绪辅助信号判定"
+ }
+ }
},
{
"name": "macro_raw_news",
"desc": "宏观新闻原始数据",
- "rows": 8259,
+ "rows": 8484,
"readers": [
"macro_context_collector",
"system_audit"
@@ -1190,16 +1376,26 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "宏观新闻原始数据表,macro_context_collector采集的未经处理的财经新闻。供后续清洗和分析。",
+ "writers": {
+ "macro_context_collector": "从财经网站采集原始新闻标题+URL+摘要"
+ },
+ "readers": {
+ "macro_context_collector": "读取最近新闻hash避免重复采集",
+ "system_audit": "审计新闻采集量"
+ }
+ }
},
{
"name": "market_snapshots",
"desc": "大盘指数快照(每10分)",
"rows": 548,
"readers": [
- "trend_detector",
- "prepare_report_data",
"mofin_db",
+ "prepare_report_data",
+ "trend_detector",
"system_audit",
"market_screener",
"mofin_query"
@@ -1211,16 +1407,28 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "市场快照表,market_watch每10分钟采集全市场大盘指数+板块涨跌+上涨下跌家数。下游用于判断市场情绪。",
+ "writers": {
+ "mofin_db": "market_watch采集后写入快照数据"
+ },
+ "readers": {
+ "market_screener": "读取最新板块快照,判断热点板块",
+ "prepare_report_data": "读取市场情绪数据用于报告",
+ "mofin_db": "内部查询最新快照",
+ "system_audit": "审计数据新鲜度"
+ }
+ }
},
{
"name": "mtf_cache",
"desc": "多周期均线缓存",
"rows": 37,
"readers": [
+ "technical_analysis",
"mofin_db",
- "multi_timeframe",
- "technical_analysis"
+ "multi_timeframe"
],
"writers": [
"mofin_db",
@@ -1230,29 +1438,55 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "多周期技术指标缓存,refresh_mtf_cache计算MA5/MA20/MA60/支撑阻力位等。下游技术分析脚本从缓存读取避免重复计算。",
+ "writers": {
+ "multi_timeframe": "计算并写入多周期MA/支撑阻力位",
+ "mofin_db": "内部写入函数"
+ },
+ "readers": {
+ "multi_timeframe": "读取已有缓存判断是否需要刷新",
+ "technical_analysis": "读取MA/支撑阻力位用于技术分析",
+ "mofin_db": "内部读取"
+ }
+ }
},
{
"name": "portfolio_summary",
"desc": "总资产/现金/仓位汇总",
"rows": 1,
"readers": [
- "preflight_verify",
- "prepare_report_data",
- "import_holding_xls",
"mofin_db",
+ "mo_data",
+ "prepare_report_data",
"price_monitor",
- "mo_data"
+ "preflight_verify",
+ "import_holding_xls"
],
"writers": [
- "mofin_db",
- "import_holding_xls"
+ "import_holding_xls",
+ "mofin_db"
],
"has_input": true,
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "组合汇总表(id=1单行),记录总资产=持股市值+可用资金+冻结资金。每笔导入或价格刷新后更新。",
+ "writers": {
+ "mofin_db": "价格监控刷新总市值后更新total_mv/total_assets",
+ "import_holding_xls": "导入持仓后更新cash/frozen/total_assets"
+ },
+ "readers": {
+ "import_holding_xls": "读取当前汇总信息,验证导入后是否正确",
+ "mo_data": "通过read_portfolio()读取组合汇总",
+ "price_monitor": "读取当前现金/市值,计算总资产变动",
+ "prepare_report_data": "读取总资产/现金数据用于报告",
+ "server": "读取汇总数据供Dashboard展示"
+ }
+ }
},
{
"name": "price_events",
@@ -1268,7 +1502,16 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "价格触发事件表,价格进入/离开买入区或触发止损止盈时记录事件。用于审计和重评触发。",
+ "writers": {
+ "mofin_db": "price_monitor检测到价格区间变化时写入事件记录"
+ },
+ "readers": {
+ "mofin_db": "查询历史事件判断是否触发重评"
+ }
+ }
},
{
"name": "sector_signals",
@@ -1277,8 +1520,8 @@
"readers": [
"xiaoguo_news_processor",
"mofin_news",
- "server",
- "trend_detector"
+ "trend_detector",
+ "server"
],
"writers": [
"xiaoguo_news_processor",
@@ -1289,17 +1532,31 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "板块信号表,多源汇聚的板块级别信号(新闻情感+趋势+资金流向)。用于判断行业轮动。",
+ "writers": {
+ "mofin_news": "写入新闻分析得出的板块信号",
+ "xiaoguo_news_processor": "写入小果LLM分析的板块情感信号",
+ "trend_detector": "写入技术面趋势检测到的板块信号"
+ },
+ "readers": {
+ "server": "读取供Dashboard展示",
+ "mofin_news": "读取已有信号做增量更新",
+ "xiaoguo_news_processor": "读取已有信号避免重复写入",
+ "trend_detector": "读取信号辅助趋势判定"
+ }
+ }
},
{
"name": "sector_snapshots",
"desc": "行业板块数据",
"rows": 44230,
"readers": [
- "market_screener",
- "mofin_db",
"trend_detector",
- "strategy_lifecycle"
+ "mofin_db",
+ "strategy_lifecycle",
+ "market_screener"
],
"writers": [
"mofin_db"
@@ -1308,33 +1565,64 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "板块快照表,market_watch按板块写入涨跌/领涨股/资金流向。market_screener据此判断行业热点。",
+ "writers": {
+ "mofin_db": "market_watch采集后写入各板块数据"
+ },
+ "readers": {
+ "market_screener": "读取板块涨跌排名,筛选热点行业",
+ "strategy_lifecycle": "读取板块数据用于策略生命周期管理",
+ "mofin_db": "内部查询",
+ "trend_detector": "读取板块趋势数据用于趋势检测"
+ }
+ }
},
{
"name": "signal_news",
"desc": "信号相关新闻",
- "rows": 1026,
+ "rows": 1028,
"readers": [
- "macro_signal_consumer",
- "intraday_health_check",
"system_audit",
+ "macro_signal_consumer",
"xiaoguo_signal_consumer",
- "server"
+ "server",
+ "intraday_health_check"
],
"writers": [
+ "mofin_news",
+ "divergence_detector",
"macro_signal_consumer",
+ "xiaoguo_signal_consumer",
"macro_context_collector",
"xiaoguo_news_processor",
- "mofin_news",
- "xiaoguo_signal_consumer",
- "divergence_detector",
"xiaoguo_scanner"
],
"has_input": true,
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "全系统信号/新闻的统一存储表,所有宏观分析、风险扫描、小果分析的输出汇聚地,也是下游消费脚本的输入源。7个写入方汇聚不同来源信号,5个读取方按需消费。",
+ "writers": {
+ "macro_context_collector": "写入宏观新闻原始数据(标题+摘要+分类),供后续风险扫描消费",
+ "xiaoguo_news_processor": "写入小果LLM处理后的新闻情感分析结果",
+ "macro_signal_consumer": "写入宏观风险信号判定结果(等级+来源+建议)",
+ "divergence_detector": "写入跨市场背离检测信号(A股/港股/美股指数对)",
+ "xiaoguo_signal_consumer": "写入小果扫描发现的个股/板块信号",
+ "mofin_news": "写入外部财经常规新闻采集结果",
+ "xiaoguo_scanner": "写入小果独立扫描的市场机会信号"
+ },
+ "readers": {
+ "macro_signal_consumer": "读取原始宏观新闻和信号,判定风险等级并生成建议",
+ "system_audit": "读取信号表行数/更新时间,审计数据管道是否畅通",
+ "intraday_health_check": "读取最新信号,检查盘中是否有新的风险信号到达",
+ "xiaoguo_signal_consumer": "读取小果相关信号,生成买入/卖出建议",
+ "server": "读取信号数据供Web Dashboard展示"
+ }
+ }
},
{
"name": "state_meta",
@@ -1350,7 +1638,16 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "状态元数据表,记录各服务的状态追踪信息(如扫描偏移量/最新处理ID)。",
+ "writers": {
+ "xiaoguo_scanner": "写入扫描进度偏移量"
+ },
+ "readers": {
+ "xiaoguo_scanner": "读取上次处理位置继续增量处理"
+ }
+ }
},
{
"name": "stock_fundamentals",
@@ -1366,18 +1663,27 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "基本面数据表,存储PE/PB/ROE/市值等财务指标。",
+ "writers": {
+ "mofin_db": "基本面数据采集后写入"
+ },
+ "readers": {
+ "strategy_lifecycle": "读取基本面数据用于策略评估"
+ }
+ }
},
{
"name": "stock_sectors",
"desc": "股票行业映射",
"rows": 62,
"readers": [
- "trend_detector",
+ "mofin_news",
"strategy_lifecycle",
- "mofin_db",
+ "trend_detector",
"xiaoguo_news_processor",
- "mofin_news"
+ "mofin_db"
],
"writers": [
"mofin_db"
@@ -1386,17 +1692,29 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "股票-板块映射表,记录每只股票所属行业板块。多脚本用于行业分类和板块归因。",
+ "writers": {
+ "mofin_db": "股票行业分类数据写入"
+ },
+ "readers": {
+ "xiaoguo_news_processor": "按行业分类新闻",
+ "mofin_news": "按行业归类新闻",
+ "mofin_db": "内部查询",
+ "strategy_lifecycle": "读取行业信息用于策略决策"
+ }
+ }
},
{
"name": "stocks",
"desc": "全量股票代码",
"rows": 87,
"readers": [
- "mofin_db",
- "xiaoguo_news_processor",
"mofin_news",
- "trend_detector"
+ "mofin_db",
+ "trend_detector",
+ "xiaoguo_news_processor"
],
"writers": [
"mofin_db"
@@ -1405,7 +1723,19 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "全量股票代码表,所有A股/港股基础信息。供各脚本按code查询股票名称/市场。",
+ "writers": {
+ "mofin_db": "初始化时导入全量股票代码"
+ },
+ "readers": {
+ "mofin_news": "按股票代码查找新闻",
+ "xiaoguo_news_processor": "按股票代码过滤新闻",
+ "mofin_db": "内部查询",
+ "trend_detector": "按股票代码获取数据"
+ }
+ }
},
{
"name": "strategy_evaluations",
@@ -1413,8 +1743,8 @@
"rows": 217,
"readers": [
"mofin_db",
- "system_audit",
- "verify_reassess_pipeline"
+ "verify_reassess_pipeline",
+ "system_audit"
],
"writers": [
"mofin_collect"
@@ -1423,7 +1753,18 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "策略评估结果表,策略评估脚本每次运行记录评估得分/等级/评语。",
+ "writers": {
+ "mofin_collect": "策略评估前采集数据并写入评估结果"
+ },
+ "readers": {
+ "verify_reassess_pipeline": "读取评估结果验证管道完整性",
+ "mofin_db": "内部查询",
+ "system_audit": "审计评估是否按时执行"
+ }
+ }
},
{
"name": "strategy_feedback",
@@ -1440,47 +1781,73 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "策略反馈表,记录用户对建议的反馈(采纳/忽略/修改)。用于策略自学习。",
+ "writers": {
+ "mofin_db": "写入反馈数据",
+ "server": "通过Web提交反馈后写入"
+ },
+ "readers": {
+ "mofin_db": "读取反馈用于分析和展示"
+ }
+ }
},
{
"name": "todos",
"desc": "自愈任务队列",
- "rows": 61,
+ "rows": 62,
"readers": [
- "morning_health_check",
+ "intraday_health_check",
"self_todo_executor",
"strategy-staleness-check",
- "intraday_health_check"
+ "morning_health_check"
],
"writers": [
- "morning_health_check",
"preflight_verify",
- "self_todo_executor",
- "strategy-staleness-check",
+ "mofin_collect",
+ "morning_health_check",
"intraday_health_check",
- "mofin_collect"
+ "self_todo_executor",
+ "strategy-staleness-check"
],
"has_input": true,
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "待办事项表,各脚本发现异常时写入TODO,self_todo_executor每10分钟执行修复。异常发现→自动修复的闭环。",
+ "writers": {
+ "morning_health_check": "体检发现异常写入TODO",
+ "intraday_health_check": "盘中自检发现异常写入TODO",
+ "strategy-staleness-check": "策略过期检测写入TODO",
+ "self_todo_executor": "执行完成后更新TODO状态",
+ "preflight_verify": "开盘前验证失败写入TODO"
+ },
+ "readers": {
+ "morning_health_check": "读取待处理的TODO",
+ "self_todo_executor": "读取待处理的TODO并执行fix_action",
+ "strategy-staleness-check": "读取TODO避免重复写入",
+ "intraday_health_check": "读取TODO检查自愈进度"
+ }
+ }
},
{
"name": "watchlist_stocks",
"desc": "自选股列表",
"rows": 43,
"readers": [
- "mo_data",
- "trend_detector",
- "stale_detector",
- "refresh_mtf_cache",
"mo_alphasift_bridge",
- "mofin_db",
- "stale_push_wlin",
"xiaoguo_scanner",
+ "mofin_db",
+ "mo_data",
+ "price_monitor",
+ "trend_detector",
+ "mofin_collect",
"run_all_tests",
- "xiaoguo_signal_consumer"
+ "refresh_mtf_cache",
+ "stale_detector"
],
"writers": [
"mofin_db",
@@ -1490,15 +1857,28 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "自选股表,系统自动维护的观察列表。与持仓表分离,用于跟踪潜在买入机会。",
+ "writers": {
+ "per_stock_reassess": "策略重评时更新自选状态",
+ "mofin_db": "内部写入函数"
+ },
+ "readers": {
+ "per_stock_reassess": "读取自选列表做重评",
+ "stock_quote": "读取自选代码拉取行情",
+ "mo_alphasift_bridge": "读取自选供Alpha分析",
+ "mo_data": "通过read_watchlist()读取自选数据"
+ }
+ }
},
{
"name": "xiaoguo_scan_tracker",
"desc": "小果扫描跟踪",
"rows": 488,
"readers": [
- "server",
- "xiaoguo_scanner"
+ "xiaoguo_scanner",
+ "server"
],
"writers": [
"xiaoguo_scanner"
@@ -1507,7 +1887,17 @@
"has_output": true,
"orphan": false,
"flow_status": "healthy",
- "warn": false
+ "warn": false,
+ "flow_detail": {
+ "summary": "小果扫描追踪表,记录每次小果扫描的状态/耗时/结果数量。用于监控小果服务健康。",
+ "writers": {
+ "xiaoguo_scanner": "每次扫描完成后写入状态和统计"
+ },
+ "readers": {
+ "server": "读取扫描状态供Dashboard展示",
+ "xiaoguo_scanner": "读取上次扫描时间判断是否需要全量扫描"
+ }
+ }
}
],
"json_files": [
@@ -1604,10 +1994,10 @@
{
"name": "growth_registry.json",
"desc": "",
- "size_kb": 1.7,
+ "size_kb": 1.3,
"readers": [],
"writers": [],
- "last_modified": "07-08 12:45",
+ "last_modified": "07-09 00:45",
"warn": true
},
{
@@ -1625,7 +2015,7 @@
"size_kb": 12.2,
"readers": [],
"writers": [],
- "last_modified": "07-08 09:59",
+ "last_modified": "07-09 08:00",
"warn": true
},
{
@@ -1658,19 +2048,19 @@
{
"name": "macro_risk_state.json",
"desc": "宏观风险状态(采集器写入)",
- "size_kb": 0.6,
+ "size_kb": 2.8,
"readers": [],
"writers": [],
- "last_modified": "07-08 15:50",
+ "last_modified": "07-09 08:00",
"warn": true
},
{
"name": "mofin_health.json",
"desc": "健康监控数据",
- "size_kb": 67.2,
+ "size_kb": 70.9,
"readers": [],
"writers": [],
- "last_modified": "07-09 00:23",
+ "last_modified": "07-09 08:32",
"warn": true
},
{
@@ -1694,19 +2084,19 @@
{
"name": "pipeline_registry.json",
"desc": "",
- "size_kb": 22.8,
+ "size_kb": 26.1,
"readers": [],
"writers": [],
- "last_modified": "07-08 08:01",
+ "last_modified": "07-09 08:01",
"warn": true
},
{
"name": "preflight_result.json",
"desc": "",
- "size_kb": 2.2,
+ "size_kb": 2.1,
"readers": [],
"writers": [],
- "last_modified": "07-08 23:27",
+ "last_modified": "07-09 08:30",
"warn": true
},
{
@@ -1906,7 +2296,7 @@
"script": "morning_health_check.py",
"schedule": "0 8 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T08:01:34",
+ "last_run": "2026-07-09T08:01:32",
"profile": "position-analyst"
},
{
@@ -1915,7 +2305,7 @@
"script": "bot_monitor.sh",
"schedule": "every 60m",
"status": "ok",
- "last_run": "2026-07-08T23:47:23",
+ "last_run": "2026-07-09T07:50:40",
"profile": "default"
},
{
@@ -1942,7 +2332,7 @@
"script": null,
"schedule": "0 * * * *",
"status": "ok",
- "last_run": "2026-07-09T00:11:33",
+ "last_run": "2026-07-09T08:20:50",
"profile": "default"
},
{
@@ -1960,7 +2350,7 @@
"script": "wiki_health_aggregate.py",
"schedule": "0 3 * * *",
"status": "ok",
- "last_run": "2026-07-08T03:07:57",
+ "last_run": "2026-07-09T03:10:16",
"profile": "default"
},
{
@@ -1969,7 +2359,7 @@
"script": "xiaoguo_quick_scan.py",
"schedule": "*/15 * * * *",
"status": "ok",
- "last_run": "2026-07-09T00:15:46",
+ "last_run": "2026-07-09T08:45:58",
"profile": "default"
},
{
@@ -1978,7 +2368,7 @@
"script": "xiaoguo_tunnel_watchdog.sh",
"schedule": "*/5 * * * *",
"status": "error",
- "last_run": "2026-07-09T00:22:51",
+ "last_run": "2026-07-09T08:42:57",
"profile": "default"
},
{
@@ -2005,7 +2395,7 @@
"script": "meta_growth.py",
"schedule": "45 0,12 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T12:45:19",
+ "last_run": "2026-07-09T00:45:05",
"profile": "position-analyst"
},
{
@@ -2068,7 +2458,7 @@
"script": "",
"schedule": "{'kind': 'cron', 'expr': '*/10 * * * *'}",
"status": "ok",
- "last_run": "2026-07-09T00:21:09",
+ "last_run": "2026-07-09T08:41:43",
"profile": "default"
},
{
@@ -2086,7 +2476,7 @@
"script": "macro_context_collector.py",
"schedule": "*/30 8-15 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T15:30:36",
+ "last_run": "2026-07-09T08:30:24",
"profile": "position-analyst"
},
{
@@ -2131,7 +2521,7 @@
"script": null,
"schedule": "30 8 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T08:39:56",
+ "last_run": "2026-07-09T08:45:15",
"profile": "position-analyst"
},
{
@@ -2229,8 +2619,8 @@
"type": "no_agent",
"script": "preflight_verify.py",
"schedule": "30 8 * * 1-5",
- "status": null,
- "last_run": "None",
+ "status": "error",
+ "last_run": "2026-07-09T08:30:32",
"profile": "position-analyst"
},
{
@@ -2311,7 +2701,7 @@
"script": null,
"schedule": "30 8 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T08:39:50",
+ "last_run": "2026-07-09T08:39:00",
"profile": "default"
},
{
@@ -2419,7 +2809,7 @@
"script": "self_todo_executor.py",
"schedule": "*/10 8-22 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T22:50:40",
+ "last_run": "2026-07-09T08:40:23",
"profile": "position-analyst"
},
{
@@ -2491,7 +2881,7 @@
"script": "memory_guardian.py",
"schedule": "0 7 * * *",
"status": "ok",
- "last_run": "2026-07-08T07:01:31",
+ "last_run": "2026-07-09T07:01:47",
"profile": "position-analyst"
},
{
@@ -2499,8 +2889,8 @@
"type": "no_agent",
"script": "memory_guardian.py",
"schedule": "0 7 * * *",
- "status": "ok",
- "last_run": "2026-07-08T07:02:21",
+ "status": "error",
+ "last_run": "2026-07-09T07:02:13",
"profile": "default"
},
{
@@ -2518,7 +2908,7 @@
"script": "divergence_detector.py",
"schedule": "*/30 8-15 * * 1-5",
"status": "ok",
- "last_run": "2026-07-08T15:30:36",
+ "last_run": "2026-07-09T08:30:22",
"profile": "position-analyst"
},
{