← 返回
未分类 中文

Willow System Health

Audit the Willow local AI stack for subsystem failures, drift, and resource bloat. Use when a user asks to check Willow health, diagnose a slow or broken Wil...
审计Willow本地AI栈的子系统故障、漂移和资源膨胀。当用户要求检查Willow健康状态、诊断缓慢或损坏的Willow时使用。
rudi193-cmd
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 303
下载
💾 0
安装
1
版本
#latest

概述

Willow System Health

Audit the Willow local AI stack across three cadenced tiers. Each tier adds depth — boot checks are instant, daily checks catch drift, weekly checks catch structural rot.

TierWhen to runFocus
------------------------------------------------------------------------------------------------------
bootEvery new sessionCore services up, orphaned forks, open tasks
dailyOnce per dayKB growth, session bloat, store bloat, dead Ollama models
weeklySunday or first session of the weekFork audit, Postgres vacuum estimate, full diagnostics

Trigger

Use this skill when the user:

  • Asks to check, audit, or verify Willow health
  • Reports Willow is slow, unresponsive, or giving stale answers
  • Wants to know if Postgres, Ollama, or MCP are running
  • Asks about open forks, open tasks, or store bloat
  • Wants a weekly deep diagnostic

Step 1 — Determine the tier

Ask or infer from context. Default to boot if the user just wants a quick check.

User phraseTier
-----------------------------------------------
"quick check", "is Willow up"boot
"daily check", "how's the KB growing"daily
"weekly", "deep check", "full diagnostic"weekly
"all", "everything"all

Step 2 — Run the diagnostic script

python3 {baseDir}/scripts/system_health.py --check boot
python3 {baseDir}/scripts/system_health.py --check daily
python3 {baseDir}/scripts/system_health.py --check weekly
python3 {baseDir}/scripts/system_health.py --check all

Optional flags:

  • --willow-dir PATH — override default ~/.willow/ store path
  • --repo PATH — override default Willow git repo path (for fork audit)
  • --json — machine-readable output

Step 3 — Interpret the report

The script prints a per-subsystem table followed by a summary:

WILLOW SYSTEM HEALTH — boot (2026-04-24 09:15)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SUBSYSTEM          STATUS     DETAIL
Postgres           HEALTHY    connection ok
Ollama             HEALTHY    3 models loaded
MCP server         HEALTHY    responding at 127.0.0.1:7337
Orphaned forks     WARN       2 worktrees unmerged >7d
Open tasks         HEALTHY    4 open tasks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SUMMARY
  Tier checked  : boot
  HEALTHY       : 3
  WARN          : 1
  CRITICAL      : 0

HEALTHY — no action needed.

WARN — review recommended. Suggest specific next action (see table below).

CRITICAL — service is down or threshold severely exceeded. Block-level recommendation.

FlagSuggested action
---------------------------------------------------------------------------------------------------
Postgres CRITICALCheck systemctl status postgresql or pg_lsclusters
Ollama CRITICALRun ollama serve or check systemctl status ollama
MCP CRITICALRun willow restart or check ~/.willow/server.log
Orphaned forks WARNShow fork list, ask user which to merge or delete
Sessions WARN (>500)Run willow jeles cleanup --dry-run then confirm
Store collections WARN (>150)Run python3 scripts/system_health.py --check daily --json for detail
Dead Ollama models WARNRun ollama rm after confirmation
Postgres bloat WARNRun VACUUM ANALYZE in psql; schedule during off-hours

Step 4 — Enforce config drift (boot tier)

The boot check includes a drift watchdog. If any of these fail, flag CRITICAL:

  • Ollama reachable at 127.0.0.1:11434
  • MCP server socket alive (default 127.0.0.1:7337)
  • Postgres connection succeeds with default Willow credentials

Drift means something changed the environment — not the code. Check recent git log, system updates, or port conflicts first before spelunking source.

Step 5 — Offer cleanup actions

After reporting, offer numbered actions the user can pick:

  1. Merge or delete orphaned forks (show list first)
  2. Archive old Jeles sessions (willow jeles cleanup)
  3. Remove dead Ollama models (ollama rm )
  4. Run Postgres VACUUM ANALYZE
  5. Skip — report only, no changes

Always confirm before any destructive action.

Step 6 — Execute with confirmation

For each cleanup action:

  • Show exactly what will be changed
  • Confirm before proceeding
  • Report what was done

After cleanup, offer to re-run the diagnostic to confirm health improved.

Memory writes

If the user has opted into memory writes, append a dated summary to memory/YYYY-MM-DD.md:

## Willow system health — {timestamp}
- Tier: boot/daily/weekly
- CRITICAL: N subsystems
- WARN: N subsystems
- Actions taken: (list or "none")

Append-only. Do not overwrite existing entries.

Notes

  • Boot checks are safe to run at any time — read-only, no side effects.
  • Daily and weekly checks may be slow (Postgres queries, git commands). Warn the user if running in a latency-sensitive session.
  • Fork audit uses git worktree list in the Willow repo. Default path is ~/github/willow-1.9 — override with --repo.
  • Ollama dead-model detection uses ollama list and compares to last-access timestamps if available; falls back to listing all models as WARN.
  • This skill does not modify the Postgres schema or Willow config directly — it reports and suggests; the user confirms all changes.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 23:21 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Willow Context Sentinel

rudi193-cmd
用于检查当前会话是否接近上下文限制,并决定是否压缩、交接或继续。实现级联...
★ 0 📥 352

Willow Memory Health

rudi193-cmd
审核OpenClaw代理的记忆,检查过时、冗余、暗记录和矛盾内容。用于用户要求检查记忆健康状态或清理旧记忆时。
★ 0 📥 340

Willow External Guard

rudi193-cmd
当Willow需要摄入、总结或处理外部内容时使用——如网页抓取、Jeles入站消息、语料库考古文件或子代理输出。
★ 0 📥 324