HeartFlow 运维验证手册
将以下提示词粘贴到你的 AI 对话框中:
请根据 https://skillhub.cn/install/skillhub.md,安装 @user_fdb96f95/heartflow-operations。
技能介绍
你在对上哪类故障
跑完 heartflow_status 或改完代码再测 MCP,指标却仍是旧版本;hf.core 为 undefined、cycleCount 一直为 0;memoryLayers 三项全 0;heartflow_cognitive_check 在稳态仍给出 healthScore: 1 和 _fieldFlipAlert: "primary"。这些多是常驻进程与磁盘代码不同步、evolution getter 未挂载 core、内存统计字段映射错误,或健康分基线与 flip 告警阈值过松,而不是「随便重启就好」。
技能如何帮你拆问题
本手册按现象→根因→修复→验证组织条目。例如 MCP 滞后要明确工具读的是内存里的 MCP 进程;hf.core 问题指向 src/core/heartflow.js 的 evolution getter 需把实例挂到 this.core。memoryLayers 全 0 时先做诊断:核对 data/meaningful-memory.json,再查 src/mcp-server.js 里 memory.getStats 的字段映射。健康分相关则覆盖 agent-psychology.js 的 base/floor 与 decision-router.js 的 H < 0.4 守卫,并给出 node -e 类验证期望。
当需要「全面审计再并发修复」时,技能定义固定工作流:并行取数(heartflow_status(detail=full)、module_health、upgrade_stats、cognitive_check)、静态 grep 扫描、归类 runtime 问题、用 delegate_task(background=true) 并发委托子代理、主体验证后再一次性 commit,且 push 前排除 data/、node_modules/、.git、.memory/、backups/ 等运行时产物。
适用边界
手册面向 HeartFlow 代码库内的可写修复;相关技能 heartflow-self-evolution-driving、heartflow-audit-upgrade-push、heartflow-version-unify 标注为外部只读时勿在其范围外改动。静态审计里 == null 等合法惯用法不动;空 catch 以补注释为主,不盲目拆模块。
使用场景
- 改完 heartflow.js 后 MCP 仍报旧版本,需要确认是否该重启内存里的 MCP 进程
- heartflow_status 里 memoryLayers 全 0,要先区分缺 meaningful-memory 还是 mcp-server 统计映射错了
- 稳态下 cognitive_check 仍 healthScore=1,要按 psychology 与 decision-router 阈值逐项改并 node 验证
- 用户要求全面审计并并发修 runtime 指标,要按并行取数、delegate、验证、commit 顺序走完
适合人员
- 维护 HeartFlow MCP 服务、需要在发版后核对 heartflow_status 是否与磁盘代码一致的后端工程师
- 负责 meaningful-memory 与 memory.getStats 映射,要排查 memoryLayers 全 0 的数据/口径问题的排障同学
- 改 agent-psychology 与 decision-router,想让稳态 healthScore 回到 80–100 且不误报 primary 的 HeartFlow 核心贡献者
- 牵头「全面审计+并发修复」、要规范 delegate_task、git 排除 data 与 .memory 后 push 的仓库维护者