Messaging Vendor KB Refresh
Purpose
Keeps the vendor knowledge-base directories under workspace/knowledge-base/<vendor>/ in sync with each vendor’s published docs. Detects non-trivial changes via git diff and alerts Discord ops so operators review schema drift before it breaks production handlers.
Without this skill, KB docs decay silently as vendors update APIs, and handler bugs surface only at send time.
When to use
- Automatically via systemd timer
messaging-vendor-kb-refresh.timer(weekly, Mon 03:00 America/Los_Angeles) - Manually when a vendor announces an API breaking change
- After Phase 0A initial KB scaffolding to pull real content
- Before a Phase 1 smoke test to ensure current schema reference
Do NOT use for:
- First-time onboarding (use
download-vendor-kb.shdirectly with vendor-specific targets) - Pulling docs that require authentication (the wrapper only fetches public URLs)
Inputs
| Flag | Type | Required | Description |
|---|---|---|---|
--all | bool | no | Refresh every vendor with an entry in messaging_providers |
--vendor=<name> | string | no | Refresh only one vendor |
--since=<duration> | string | no (default 7d) | Force refetch of files older than this window |
--quiet | bool | no | Suppress per-file stdout; only emit diff summary |
Outputs
- Updated markdown files under
workspace/knowledge-base/<vendor>/*.md workspace/knowledge-base/<vendor>/.last_downloadedwith ISO timestamp- Git commit (if workspace is git-tracked):
refresh: vendor KB <date> - Discord
#opsalert viaDISCORD_OPS_WEBHOOKif cumulative git diff is >10 lines across any vendor - Stdout summary: per-vendor file-count delta + total lines changed
Acceptance tests
- Script completes in under 60 seconds per vendor
- If a remote URL returns 404 or timeout, the stale local copy is preserved and a warning is raised (not an error)
- Git commit created only when actual content changes exist
- Discord alert fires ONLY when diff >10 lines (first-run downloads are not considered “changes”)
- Running twice in succession produces no new git commit (idempotent)
.last_downloadedis updated on every successful fetch
Rollback behavior
- If a refresh introduces malformed docs, revert via
git reset --hard HEAD~1on the workspace - If Discord alerting misfires, mute the webhook url temporarily by setting
DISCORD_OPS_WEBHOOK=empty in master.env and re-run with--quiet - For persistent parser failures against a vendor’s docs, add that vendor’s KB dir to the skip list in
tools/messaging-vendor-kb-refresh.jsand open an issue to fix the fetcher
Related files
- Plan section: Section G.2 in
/home/opsadmin/.claude/plans/put-you-full-last-functional-sparrow.md - Implementation:
/home/opsadmin/.openclaw/tools/messaging-vendor-kb-refresh.js - Wrapped tool:
/home/opsadmin/.openclaw/tools/download-vendor-kb.sh - Systemd unit:
~/.config/systemd/user/messaging-vendor-kb-refresh.{timer,service} - Alert destination:
DISCORD_OPS_WEBHOOK(master.env)