feat: complete production workflow migration

This commit is contained in:
2026-08-06 14:29:57 +08:00
parent 7f215e79c4
commit 8df5266abb
448 changed files with 56937 additions and 14619 deletions
+24 -31
View File
@@ -1,38 +1,31 @@
{
"schema_version": 2,
"schema_version": 3,
"workflows": [
{"id":"content.metrics.daily","module":"content_marketing","trigger":"scheduled","execution":{"entry":"data/tools/daily_run.bat"},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_DailyRun"}},
{"id":"content.marketing_report.daily","module":"content_marketing","trigger":"scheduled","execution":{"entry":"data/tools/daily_marketing_report.bat"},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_DailyMarketingReport"}},
{"id":"content.relogin.weekly","module":"content_marketing","trigger":"scheduled","execution":{"entry":"data/tools/friday_relogin.bat"},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_FridayRelogin"}},
{"id":"content.self_operated.weekly","module":"content_marketing","trigger":"scheduled","execution":{"entry":"data/tools/monday_self_run.bat"},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_MondaySelf"}},
{"id":"content.creator_report.monthly","module":"content_marketing","trigger":"scheduled","execution":{"entry":"data/tools/monthly_creator_report.bat"},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_MonthlyCreatorReport"}},
{"id":"content.summary.monthly","module":"content_marketing","trigger":"scheduled","execution":{"entry":"data/tools/monthly_summary.bat"},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_MonthlySummary"}},
{"id":"content.cooperations.daily","module":"content_marketing","trigger":"scheduled","execution":{"entry":"data/tools/sync_cooperations.bat"},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_SyncCooperations"}},
{"id":"content.comments.weekly","module":"content_marketing","trigger":"scheduled","execution":{"entry":"data/tools/weekly_comment_scrape.bat"},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_WeeklyCommentScrape"}},
{"id":"content.summary.weekly","module":"content_marketing","trigger":"scheduled","execution":{"entry":"data/tools/weekly_summary.bat"},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_WeeklySummary"}},
{"id":"content.metrics.daily","module":"content_marketing","trigger":"scheduled","execution":{"steps":[{"id":"collect_collaborators","name":"采集合作达人指标","description":"按每日范围并行抓取合作达人在 B站、小红书蒲公英和抖音星图的曝光等指标,生成各平台采集结果。","data_flow":{"sources":[{"system":"飞书","label":"合作达人及内容清单"},{"system":"内容平台","label":"B站、小红书蒲公英与抖音星图指标"}],"processing":["按业务日期拆分平台采集任务","并行抓取合作内容曝光与互动指标"],"destinations":[{"system":"本地采集产物","label":"合作达人多平台指标结果"}]},"entry":"run_all.py","args":["--daily-scope"]},{"id":"refresh_self_mapping","name":"刷新自营款式映射","description":"从飞书索引刷新自营账号、款式与多维表映射,供后续自营采集准确定位目标记录。","data_flow":{"sources":[{"system":"飞书","label":"内容索引、账号与款式配置"}],"processing":["刷新自营账号、款式和多维表对应关系"],"destinations":[{"system":"本地映射","label":"自营账号、款式与目标表索引"}]},"entry":"data/tools/refresh_self_mapping.py","depends_on":["collect_collaborators"],"run_after_failure":true},{"id":"collect_self_bilibili","name":"采集自营 B站指标","description":"读取自营映射中的 B站笔记链接,通过公开 API 获取播放量和发布时间并回填对应飞书表。","data_flow":{"sources":[{"system":"本地映射","label":"自营 B站笔记链接"},{"system":"B站公开 API","label":"播放量与发布时间"}],"processing":["按映射定位自营笔记并读取公开指标"],"destinations":[{"system":"飞书","label":"自营 B站内容指标表"},{"system":"本地采集产物","label":"B站自营指标结果"}]},"entry":"self_bilibili_scraper.py","depends_on":["refresh_self_mapping"],"run_after_failure":true},{"id":"collect_self_douyin","name":"采集自营抖音指标","description":"使用蝉妈妈登录态导出自营抖音视频数据,解析曝光指标并回填飞书自营表。","data_flow":{"sources":[{"system":"本地映射","label":"自营抖音账号与款式"},{"system":"蝉妈妈","label":"已登录的抖音视频导出数据"}],"processing":["导出自营视频数据并解析曝光指标"],"destinations":[{"system":"飞书","label":"自营抖音内容指标表"},{"system":"本地采集产物","label":"抖音自营指标结果"}]},"entry":"chanmama_scraper.py","depends_on":["collect_self_bilibili"],"run_after_failure":true},{"id":"sync","name":"同步曝光指标入库","description":"汇总本轮合作与自营曝光结果,按记录映射更新或补建 PostgreSQL 内容笔记数据。","data_flow":{"sources":[{"system":"本轮采集产物","label":"合作达人及自营内容指标"},{"system":"本地映射","label":"内容记录对应关系"}],"processing":["合并各平台指标并匹配内容记录","更新已有记录或补建缺失记录"],"destinations":[{"system":"PostgreSQL","label":"内容笔记与曝光指标"}]},"entry":"data/tools/sync_metrics_to_cmt_notes.py","depends_on":["collect_self_douyin"],"run_after_failure":true}]},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_DailyRun"},"note":"每日先采集合作达人,再通过专有自营映射、B站和蝉妈妈脚本采集自营笔记;各阶段保留批处理继续执行语义,最终任一步失败则工作流失败。"},
{"id":"content.marketing_report.daily","module":"content_marketing","trigger":"scheduled","execution":{"steps":[{"id":"generate_and_send","name":"生成并发送营销日报","description":"聚合各款式内容与评论分析,生成一页全域种草日报并发送给飞书负责人。","data_flow":{"sources":[{"system":"PostgreSQL","label":"内容、经营、评论与达人数据","detail":"款式指标、笔记、评论、合作和画像等"},{"system":"飞书","label":"款式、负责人及素材配置"}],"processing":["聚合业务事实与款式表现","调用 Hermes 生成营销分析","生成图表和 Markdown 日报"],"destinations":[{"system":"本地报告","label":"Markdown 日报与 PNG 数据看板"},{"system":"飞书","label":"负责人日报卡片","condition":"正式执行且启用 --send"}]},"entry":"daily_marketing_report.py","args":["--send"]}]},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_DailyMarketingReport"}},
{"id":"content.relogin.weekly","module":"content_marketing","trigger":"scheduled","execution":{"steps":[{"id":"relogin","name":"刷新内容平台登录态","description":"并行启动五个平台的二维码重新登录流程,按配置轮次重试,持久化登录状态并通知结果。","data_flow":{"sources":[{"system":"内容平台","label":"五个平台登录页与当前会话状态"}],"processing":["并行发起二维码登录并按轮次重试","校验并持久化新的登录会话"],"destinations":[{"system":"浏览器状态","label":"各平台 Cookie 与 storage state"},{"system":"飞书","label":"登录刷新结果通知"}]},"entry":"data/tools/friday_relogin_parallel.py","args":["--max-attempts","3","--round-timeout","300","--screenshot-delay","60"]}]},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_FridayRelogin"}},
{"id":"content.creator_report.monthly","module":"content_marketing","trigger":"scheduled","execution":{"steps":[{"id":"generate","name":"生成达人合作月报","description":"从 PostgreSQL 读取达人、款式和合作数据,生成完整的报价与合作分析报告。","data_flow":{"sources":[{"system":"PostgreSQL","label":"达人、款式、合作与内容表现数据"}],"processing":["统计达人报价、合作和内容效果","生成月度筛选与报价分析"],"destinations":[{"system":"本地报告","label":"达人合作月报 Markdown"},{"system":"飞书文档","label":"达人合作分析报告"},{"system":"PostgreSQL","label":"月报记录与报告链接"}]},"entry":"data/tools/generate_creator_report.py"}]},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_MonthlyCreatorReport"}},
{"id":"content.summary.monthly","module":"content_marketing","trigger":"scheduled","execution":{"steps":[{"id":"summarize","name":"生成内容月度汇总","description":"分析上月各款全部笔记并做跨平台横向对比,生成飞书文档、回写生命进程表并入库。","data_flow":{"sources":[{"system":"PostgreSQL","label":"上月各款内容、互动与评论数据"},{"system":"飞书","label":"款式与生命进程配置"}],"processing":["按款式分析全部笔记","完成跨平台对比与月度总结"],"destinations":[{"system":"飞书文档","label":"内容月度报告"},{"system":"飞书","label":"款式生命进程表"},{"system":"PostgreSQL","label":"月度汇总结果"}]},"entry":"monthly_summary_all.py","args":["--max-workers","4"]}]},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_MonthlySummary"}},
{"id":"content.cooperations.daily","module":"content_marketing","trigger":"scheduled","execution":{"steps":[{"id":"sync","name":"同步达人合作记录","description":"遍历飞书款式合作表,幂等写入或更新 PostgreSQL 中的达人属性和合作记录。","data_flow":{"sources":[{"system":"飞书","label":"各款式达人合作表"}],"processing":["刷新款式映射并规范化达人合作字段","按业务主键幂等新增或更新"],"destinations":[{"system":"PostgreSQL","label":"达人档案与合作记录"}]},"entry":"data/tools/sync_cooperations.py","args":["--refresh-mapping"]}]},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_SyncCooperations"}},
{"id":"content.comments.weekly","module":"content_marketing","trigger":"scheduled","execution":{"steps":[{"id":"bilibili","name":"重采 B站评论","description":"从数据库读取 B站视频,重新采集互动指标和评论,替换评论表数据并保存本地产物。","data_flow":{"sources":[{"system":"PostgreSQL","label":"B站视频清单"},{"system":"B站","label":"视频互动指标与评论"}],"processing":["逐条重新采集视频互动和评论"],"destinations":[{"system":"PostgreSQL","label":"B站评论与互动指标"},{"system":"本地采集产物","label":"B站评论结果"}]},"entry":"data/tools/batch_rescrape_bilibili.py"},{"id":"xiaohongshu","name":"重采小红书评论","description":"从数据库读取小红书笔记,重新采集互动指标和评论,替换评论表数据并保存本地产物。","data_flow":{"sources":[{"system":"PostgreSQL","label":"小红书笔记清单"},{"system":"小红书","label":"笔记互动指标与评论"}],"processing":["逐条重新采集笔记互动和评论"],"destinations":[{"system":"PostgreSQL","label":"小红书评论与互动指标"},{"system":"本地采集产物","label":"小红书评论结果"}]},"entry":"data/tools/batch_rescrape_xiaohongshu.py"},{"id":"douyin","name":"重采抖音评论","description":"从数据库读取抖音视频,重新采集互动指标和评论,替换评论表数据并保存本地产物。","data_flow":{"sources":[{"system":"PostgreSQL","label":"抖音视频清单"},{"system":"抖音","label":"视频互动指标与评论"}],"processing":["逐条重新采集视频互动和评论"],"destinations":[{"system":"PostgreSQL","label":"抖音评论与互动指标"},{"system":"本地采集产物","label":"抖音评论结果"}]},"entry":"data/tools/batch_rescrape_douyin.py"}]},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_WeeklyCommentScrape"},"note":"保留来源批处理语义:三平台并行启动、全部等待,任一平台失败则工作流最终失败。"},
{"id":"content.summary.weekly","module":"content_marketing","trigger":"scheduled","execution":{"steps":[{"id":"summarize","name":"生成内容周度汇总","description":"分析上周各款新增笔记,调用模型生成综合评级,创建飞书周报并回写生命进程表。","data_flow":{"sources":[{"system":"PostgreSQL","label":"上周各款新增笔记与互动数据"},{"system":"飞书","label":"款式与生命进程配置"}],"processing":["按款式汇总新增内容","调用模型生成评级与周度分析"],"destinations":[{"system":"飞书文档","label":"内容周报"},{"system":"飞书","label":"款式生命进程表"},{"system":"PostgreSQL","label":"周度汇总结果"}]},"entry":"weekly_summary_all.py","args":["--max-workers","4"]}]},"provenance":{"source_project":"content","task_name":"YingxiaoYunying_WeeklySummary"}},
{"id":"shop.metrics.weekly","module":"shop_intelligence","trigger":"scheduled","execution":{"entry":"runners/run_shop.py"},"provenance":{"source_project":"shop","task_name":"shop-data-collection"}},
{"id":"shop.competitor.weekly","module":"shop_intelligence","trigger":"scheduled","execution":{"entry":"runners/run_peer_store.py"},"provenance":{"source_project":"shop","task_name":"peer-store-data-collection"}},
{"id":"shop.metrics.weekly","module":"shop_intelligence","trigger":"scheduled","execution":{"steps":[{"id":"jd","name":"采集京东店铺经营指标","description":"独立采集京东店铺经营数据,生成本次产物并写入 PostgreSQL;生产模式写入飞书 Base。","data_flow":{"sources":[{"system":"京东商智","label":"店铺经营指标"}],"processing":["按业务日期采集并规范化京东店铺数据"],"destinations":[{"system":"本地采集产物","label":"京东店铺指标"},{"system":"PostgreSQL","label":"店铺经营指标"},{"system":"飞书 Base","label":"京东店铺周数据","condition":"正式执行"}]},"entry":"runners/run_shop.py","args":["--platform","jd"]},{"id":"dy","name":"采集抖音店铺经营指标","description":"独立采集抖音店铺经营数据,生成本次产物并写入 PostgreSQL;生产模式写入飞书 Base。","data_flow":{"sources":[{"system":"抖音电商罗盘","label":"店铺经营指标"}],"processing":["按业务日期采集并规范化抖音店铺数据"],"destinations":[{"system":"本地采集产物","label":"抖音店铺指标"},{"system":"PostgreSQL","label":"店铺经营指标"},{"system":"飞书 Base","label":"抖音店铺周数据","condition":"正式执行"}]},"entry":"runners/run_shop.py","args":["--platform","dy"]},{"id":"tm","name":"采集天猫店铺经营指标","description":"独立采集天猫店铺经营数据,生成本次产物并写入 PostgreSQL;按原逻辑不写飞书店铺表。","data_flow":{"sources":[{"system":"天猫生意参谋","label":"店铺经营指标"}],"processing":["按业务日期采集并规范化天猫店铺数据"],"destinations":[{"system":"本地采集产物","label":"天猫店铺指标"},{"system":"PostgreSQL","label":"店铺经营指标"}]},"entry":"runners/run_shop.py","args":["--platform","tm"]}]},"provenance":{"source_project":"shop","task_name":"shop-data-collection"},"note":"三个平台作为独立 LangGraph 节点并行执行,分别入库和收敛错误,单个平台失败不阻断其他平台。"},
{"id":"shop.competitor.weekly","module":"shop_intelligence","trigger":"scheduled","execution":{"steps":[{"id":"jd","name":"采集京东竞店经营指标","description":"独立采集京东竞店排行,生成本次产物并写入 PostgreSQL;生产模式写入飞书 Base。","data_flow":{"sources":[{"system":"京东商智","label":"竞店排行与经营指标"}],"processing":["采集目标竞店并规范化排行数据"],"destinations":[{"system":"本地采集产物","label":"京东竞店指标"},{"system":"PostgreSQL","label":"竞店经营指标"},{"system":"飞书 Base","label":"京东竞店周数据","condition":"正式执行"}]},"entry":"runners/run_peer_store.py","args":["--platform","jd"]},{"id":"dy","name":"采集抖音竞店经营指标","description":"独立采集抖音竞店排行,生成本次产物并写入 PostgreSQL;生产模式写入飞书 Base。","data_flow":{"sources":[{"system":"抖音电商罗盘","label":"竞店排行与经营指标"}],"processing":["采集目标竞店并规范化排行数据"],"destinations":[{"system":"本地采集产物","label":"抖音竞店指标"},{"system":"PostgreSQL","label":"竞店经营指标"},{"system":"飞书 Base","label":"抖音竞店周数据","condition":"正式执行"}]},"entry":"runners/run_peer_store.py","args":["--platform","dy"]}]},"provenance":{"source_project":"shop","task_name":"peer-store-data-collection"},"note":"京东和抖音作为独立 LangGraph 节点并行执行,分别入库和收敛错误,单个平台失败不阻断另一个平台;当前无天猫竞店采集任务。"},
{"id":"shop.jd_self_operated.daily","module":"shop_intelligence","trigger":"scheduled","execution":{"steps":[{"id":"brand","name":"采集京东自营品牌业绩","description":"按业务日期采集京东自营品牌维度业绩,保存原始产物并写入 PostgreSQL。","data_flow":{"sources":[{"system":"京东自营后台","label":"品牌维度经营数据"}],"processing":["按业务日期采集并整理品牌业绩"],"destinations":[{"system":"本地原始产物","label":"品牌业绩数据"},{"system":"PostgreSQL","label":"京东自营品牌日指标"}]},"entry":"collectors/jd_self_operated_brand_daily.py","args":["--start-date","{business_date}","--end-date","{business_date}","--headless"],"timeout_seconds":600},{"id":"product","name":"采集京东自营商品业绩","description":"按业务日期逐页采集京东自营商品维度业绩,保存原始产物并写入 PostgreSQL。","data_flow":{"sources":[{"system":"京东自营后台","label":"商品维度经营数据"}],"processing":["逐页采集商品明细并整理日业绩"],"destinations":[{"system":"本地原始产物","label":"商品业绩数据"},{"system":"PostgreSQL","label":"京东自营商品日指标"}]},"entry":"collectors/jd_self_operated_product_daily.py","args":["--start-date","{business_date}","--end-date","{business_date}","--headless"],"depends_on":["brand"],"run_after_failure":true,"timeout_seconds":1800}]},"provenance":{"source_project":"shop","task_name":"京东自营昨日业绩每日采集"},"note":"每天采集计划日期前一天;品牌失败仍继续商品,任一步失败则工作流失败。"},
{"id":"shop.douyin_price_appeal","module":"shop_intelligence","trigger":"scheduled","execution":{"steps":[{"id":"dy","name":"提交抖音待改价申诉","description":"复用店铺周采集的抖音商家账号 Cookie 与 Profile,打开活动广场;待改价不为 0 时逐条进入立即改价,兼容“申诉”和“发起申诉”入口,全选 SKU,并以固定原因提交申诉。","data_flow":{"sources":[{"system":"抖音电商","label":"活动广场待改价商品"},{"system":"浏览器状态","label":"店铺周采集账号 Cookie 与 Profile"}],"processing":["检查待改价数量并打开待处理列表","逐条进入立即改价并兼容两种申诉入口","全选 SKU,选择“对议价价格存疑 / 认为识别有误,该规格没有这么低的价格”并提交"],"destinations":[{"system":"抖音电商","label":"待改价议价申诉","condition":"正式执行(控制台或定时调度)"}]},"entry":"collectors/dy_store_competitor_store_scraping.py","args":["--price-appeal","--execute"],"timeout_seconds":1800,"replay_policy":"idempotent"}]},"provenance":{"source_project":"shop","task_name":"douyin-price-appeal-daily"},"note":"每天 08:00、16:00、22:00 自动执行;仍可在控制台手动执行。每个时点都会重新扫描,已申诉商品不会再次出现可申诉入口;安全预演不访问抖音也不提交申诉。"},
{"id":"product.persona.daily","module":"product_commerce","trigger":"scheduled","execution":{"steps":[{"id":"collect","name":"采集三平台人群画像","description":"并行运行天猫、抖音和京东人群画像采集器,等待全部完成并写入对应飞书多维表。","data_flow":{"sources":[{"system":"天猫、抖音与京东","label":"商品人群画像后台数据"},{"system":"本地配置","label":"款式与目标表映射"}],"processing":["并行采集三平台画像","统一画像维度并匹配款式"],"destinations":[{"system":"飞书多维表","label":"各平台商品人群画像"}]},"entry":"run_daily_persona.py","args":["--date","{business_date}"]}]},"provenance":{"source_project":"product","task_name":"PersonaDailyCollect"}},
{"id":"product.daily","module":"product_commerce","trigger":"scheduled","execution":{"steps":[{"id":"collect_analyze_publish","name":"采集、汇总并发布商品日报","description":"按业务日期采集 ERP 与三平台数据,完成汇总分析、导出并写入飞书日报记录。","data_flow":{"sources":[{"system":"ERP","label":"商品库存与销售数据"},{"system":"天猫、京东与抖音","label":"商品经营指标"}],"processing":["按业务日期采集各数据源","汇总并分析商品经营表现","导出日报记录"],"destinations":[{"system":"本地日报产物","label":"商品经营汇总与导出文件"},{"system":"飞书","label":"商品日报记录"}]},"entry":"orchestrate_daily_collection.py","args":["--target-date","{business_date}","--stages","collect,analyze,export,insert"]}]},"provenance":{"source_project":"product","task_name":"ProductCollectorDailyCollect"}},
{"id":"product.alert.daily","module":"product_commerce","trigger":"scheduled","execution":{"steps":[{"id":"detect_and_notify","name":"检测并通知销量下滑","description":"检测连续销量下滑,幂等记录告警事件,并通过 Hermes 与飞书通知配置对象。","data_flow":{"sources":[{"system":"PostgreSQL","label":"商品日销量与历史趋势"},{"system":"告警配置","label":"检测规则与通知对象"}],"processing":["检测连续销量下滑","调用 Hermes 生成告警说明","幂等判定是否需要通知"],"destinations":[{"system":"PostgreSQL","label":"销量告警事件"},{"system":"飞书","label":"配置对象告警通知","condition":"命中规则且未重复发送"}]},"entry":"commands/run_alerts.py"}]},"provenance":{"source_project":"product","task_name":"ProductCollectorSalesAlert"}},
{"id":"product.import.daily","module":"product_commerce","trigger":"scheduled","execution":{"steps":[{"id":"import","name":"导入商品日报原始数据","description":"扫描业务日期前一天的三平台原始报表,统一字段后幂等写入 PostgreSQL 商品日指标表。","replay_policy":"idempotent","data_flow":{"sources":[{"system":"本地原始报表","label":"天猫、京东与抖音商品日报"}],"processing":["按业务日期定位报表","统一三平台字段并校验记录","按业务主键幂等导入"],"destinations":[{"system":"PostgreSQL","label":"商品日经营指标"}]},"entry":"commands/import_daily.py"}]},"provenance":{"source_project":"product","task_name":"ProductDailyImport"}},
{"id":"product.style_analysis.interval","module":"product_commerce","trigger":"scheduled","execution":{"steps":[{"id":"analyze","name":"生成款式周期分析","description":"聚合每个款式最近 3 天经营指标,调用 Hermes 分析,创建飞书文档并保存报告链接。","data_flow":{"sources":[{"system":"PostgreSQL","label":"最近 3 天款式经营指标"},{"system":"款式配置","label":"待分析款式与最小分析间隔"}],"processing":["聚合款式周期指标","调用 Hermes 生成经营分析","跳过分析间隔未满足的款式"],"destinations":[{"system":"飞书文档","label":"款式周期分析报告"},{"system":"PostgreSQL","label":"报告链接与分析状态"}]},"entry":"analyze_style_with_hermes.py","args":["--all-styles","--days","3","--min-interval-days","3","--skip-existing","--end-date","{business_date}"]}]},"provenance":{"source_project":"product","task_name":"StyleAnalysisEvery3Days"}},
{"id":"product.main_image.weekly","module":"product_commerce","trigger":"scheduled","execution":{"steps":[{"id":"jd","name":"采集京东主图表现","description":"采集京东款式主图及曝光、点击指标,保存 JSON,并写入每款飞书主图表和 PostgreSQL。","data_flow":{"sources":[{"system":"京东商智","label":"款式主图、曝光与点击指标"},{"system":"本地配置","label":"款式与飞书目标表映射"}],"processing":["采集并按款式整理京东主图表现"],"destinations":[{"system":"本地 JSON","label":"京东主图采集结果"},{"system":"飞书","label":"各款式京东主图表"},{"system":"PostgreSQL","label":"京东主图表现指标"}]},"entry":"run_weekly_jd_main_image.py","args":["--date","{business_date}","--headless"]},{"id":"tmall","name":"采集天猫主图表现","description":"采集天猫万相台款式主图聚合指标,保存 JSON,并写入每款飞书主图表和 PostgreSQL。","data_flow":{"sources":[{"system":"天猫万相台","label":"款式主图聚合表现"},{"system":"本地配置","label":"款式与飞书目标表映射"}],"processing":["采集并按款式整理天猫主图表现"],"destinations":[{"system":"本地 JSON","label":"天猫主图采集结果"},{"system":"飞书","label":"各款式天猫主图表"},{"system":"PostgreSQL","label":"天猫主图表现指标"}]},"entry":"run_weekly_main_image.py","args":["--date","{business_date}","--headless"]}]},"provenance":{"source_project":"product","task_name":"WeeklyJdAndTmallMainImageCollect"},"note":"每周日 08:30 并行执行京东与天猫万相主图采集;两个平台分别完成 PG 入库和飞书插入,资源、状态及失败互不影响。任一平台失败时另一个仍继续,工作流最终报告具体的平台错误。"},
{"id":"product.sales_sheet.daily","module":"product_commerce","trigger":"scheduled","execution":{"steps":[{"id":"sync","name":"刷新商品月度销量表","description":"全量读取预算产品与款式主表,不按预算月份过滤款式;所选月份只控制聚水潭查询区间和飞书目标月份页。","replay_policy":"idempotent","data_flow":{"sources":[{"system":"飞书多维表格","label":"全部预算产品、目标销量、款式名与 ERP 款式编码"},{"system":"聚水潭商品主体分析","label":"所选自然月全渠道自定义销量与自定义退货量"}],"processing":["合并预算 Base 与款式主表的全量款式并匹配 ERP 编码","按所选月月初到月末逐 ERP 编码生成一次全渠道报表","累加全部商品行和同款全部 ERP 编码并计算退货率、实销和目标达成率"],"destinations":[{"system":"飞书电子表格","label":"当月产品销量页","condition":"正式执行"}]},"entry":"sync_monthly_sales_sheet.py","args":["--month","{business_date}","--execute","--allow-missing-erp-as-zero"]}]},"provenance":{"source_project":"product","task_name":"ProductMonthlySalesSheetDailySync"},"note":"同名月份页幂等覆盖;月份只控制聚水潭自然月区间与目标页,产品全集不按预算月份筛选;抓取和校验全部 ERP 报表成功后才清空写入;无 ERP 编码产品按 0 写入;缺页时复制最近历史月份页继承格式。"},
{"id":"product.persona.daily","module":"product_commerce","trigger":"scheduled","execution":{"entry":"run_daily_persona.py"},"provenance":{"source_project":"product","task_name":"PersonaDailyCollect"}},
{"id":"product.daily","module":"product_commerce","trigger":"scheduled","execution":{"entry":"orchestrate_daily_collection.py","args":["--stages","collect,analyze,export,insert"]},"provenance":{"source_project":"product","task_name":"ProductCollectorDailyCollect"}},
{"id":"product.alert.daily","module":"product_commerce","trigger":"scheduled","execution":{"entry":"commands/run_alerts.py"},"provenance":{"source_project":"product","task_name":"ProductCollectorSalesAlert"}},
{"id":"product.import.daily","module":"product_commerce","trigger":"scheduled","execution":{"entry":"commands/import_daily.py"},"provenance":{"source_project":"product","task_name":"ProductDailyImport"}},
{"id":"product.style_analysis.interval","module":"product_commerce","trigger":"scheduled","execution":{"entry":"analyze_style_with_hermes.py","args":["--all-styles","--days","3","--min-interval-days","3","--skip-existing"]},"provenance":{"source_project":"product","task_name":"StyleAnalysisEvery3Days"}},
{"id":"product.main_image.jd.weekly","module":"product_commerce","trigger":"scheduled","execution":{"entry":"run_weekly_jd_main_image.py","args":["--headless"]},"provenance":{"source_project":"product","task_name":"WeeklyJdMainImageCollect"}},
{"id":"product.main_image.weekly","module":"product_commerce","trigger":"scheduled","execution":{"entry":"run_weekly_main_image.py","args":["--headless"]},"provenance":{"source_project":"product","task_name":"WeeklyMainImageCollect"}},
{"id":"supply.purchase_confirmation.daily","module":"supply_chain","trigger":"scheduled","execution":{"steps":[{"id":"collect_analyze_notify","name":"生成采购确认通知","description":"从 ERP 识别库存缺口商品并检查协议到货时间,写入 PostgreSQL 后发送采购确认通知。","replay_policy":"idempotent","data_flow":{"sources":[{"system":"ERP","label":"商品库存、在途与采购数据"},{"system":"采购配置","label":"协议到货时间与确认规则"}],"processing":["识别库存缺口商品","核对协议到货时间并生成确认项"],"destinations":[{"system":"PostgreSQL","label":"采购确认处理记录"},{"system":"飞书","label":"采购确认通知"}]},"entry":"run.py","args":["mcp-run","purchase-confirmation"]}]},"provenance":{"source_project":"supply","task_name":"auto-flow-purchase-confirmation"}},
{"id":"supply.replenishment.weekly","module":"supply_chain","trigger":"scheduled","execution":{"steps":[{"id":"collect_analyze_notify","name":"生成并发送补货建议","description":"导出 ERP 库存并计算补货量,写入 PostgreSQL 与飞书多维表,最后发送补货结果通知。","replay_policy":"idempotent","data_flow":{"sources":[{"system":"ERP","label":"库存、销售与商品数据"},{"system":"补货配置","label":"SKU 范围与补货规则"}],"processing":["导出并规范化库存数据","按规则计算建议补货量","生成补货批次结果"],"destinations":[{"system":"PostgreSQL","label":"补货批次与建议明细"},{"system":"飞书多维表","label":"补货建议记录"},{"system":"飞书","label":"补货结果通知"}]},"entry":"run.py","args":["mcp-run","replenishment"]}]},"provenance":{"source_project":"supply","task_name":"auto-flow-replenishment"}},
{"id":"supply.replenishment_alert.daily","module":"supply_chain","trigger":"scheduled","execution":{"steps":[{"id":"collect_analyze_notify","name":"生成库存阈值预警","description":"依据配置 SKU 和库存阈值生成预警并写入 PostgreSQL,仅在存在预警时发送业务通知。","replay_policy":"idempotent","data_flow":{"sources":[{"system":"ERP","label":"SKU 当前库存"},{"system":"预警配置","label":"监控 SKU 与库存阈值"}],"processing":["比较当前库存与配置阈值","生成需要处理的库存预警"],"destinations":[{"system":"PostgreSQL","label":"库存阈值预警记录"},{"system":"飞书","label":"库存预警通知","condition":"存在命中阈值的 SKU"}]},"entry":"run.py","args":["mcp-run","replenishment-alert"]}]},"provenance":{"source_project":"supply","task_name":"auto-flow-replenishment-alert"}},
{"id":"supply.purchase_confirmation.daily","module":"supply_chain","trigger":"scheduled","execution":{"entry":"run.py","args":["mcp-run","purchase-confirmation"]},"provenance":{"source_project":"supply","task_name":"auto-flow-purchase-confirmation"}},
{"id":"supply.replenishment.weekly","module":"supply_chain","trigger":"scheduled","execution":{"entry":"run.py","args":["mcp-run","replenishment"]},"provenance":{"source_project":"supply","task_name":"auto-flow-replenishment"}},
{"id":"supply.replenishment_alert.daily","module":"supply_chain","trigger":"scheduled","execution":{"entry":"run.py","args":["mcp-run","replenishment-alert"]},"provenance":{"source_project":"supply","task_name":"auto-flow-replenishment-alert"}},
{"id":"content.mapping.refresh","module":"content_marketing","trigger":"manual","execution":{"entry":"data/tools/rebuild_mapping.py"},"provenance":{"source_project":"content"}},
{"id":"content.retry_failed","module":"content_marketing","trigger":"manual","execution":{"entry":"data/tools/retry_failed.py"},"provenance":{"source_project":"content"}},
{"id":"content.metrics.backfill","module":"content_marketing","trigger":"manual","execution":{"entry":"data/tools/daily_run_with_backfill.bat"},"provenance":{"source_project":"content"}},
{"id":"product.backfill","module":"product_commerce","trigger":"manual","execution":{"entry":"backfill_collect.py"},"provenance":{"source_project":"product"}},
{"id":"product.market_rank","module":"product_commerce","trigger":"manual","execution":{"entry":"orchestrate_market_rank_collection.py"},"provenance":{"source_project":"product"},"note":"A launcher exists but no matching system task is registered."},
{"id":"product.review_collection","module":"product_commerce","trigger":"manual","execution":{"entry":"orchestrate_review_collection.py"},"provenance":{"source_project":"product"}},
{"id":"supply.purchase_order_update","module":"supply_chain","trigger":"manual","execution":{"entry":"run.py","args":["mcp-run","purchase-order-update"]},"provenance":{"source_project":"supply"}},
{"id":"product.weekly_aggregate.documented_missing","module":"product_commerce","trigger":"unavailable","execution":{"entry":"run_weekly_collect.py"},"provenance":{"source_project":"product"},"note":"Documented in README but the entry file and scheduled task are absent."}
{"id":"product.market_rank","module":"product_commerce","trigger":"scheduled","execution":{"steps":[{"id":"collect_analyze_publish","name":"采集并发布三平台市场排行","description":"并行采集天猫、京东和抖音市场排行,汇总平台结果并发送飞书报告链接。","data_flow":{"sources":[{"system":"天猫、京东与抖音","label":"市场商品排行与表现数据"},{"system":"本地配置","label":"类目、关键词与采集范围"}],"processing":["并行采集三平台排行","汇总平台结果并生成市场分析","归档报告并准备通知"],"destinations":[{"system":"本地报告产物","label":"三平台市场排行结果"},{"system":"飞书","label":"市场排行报告链接与通知"}]},"entry":"orchestrate_market_rank_collection.py","args":["--report-date","{business_date}"]}]},"provenance":{"source_project":"product","task_name":"三平台市场排行周采集"},"note":"每周一 10:00 由项目内 Python 调度器触发。"}
]
}