Wave 4 Dispatch Spec — Per-Item Enrichment (2026-05-04)
Wave goal: Wire the graph. Waves 1-3 created anchor hubs. Wave 4 adds peer cross-links to 88 existing files and creates 21 new per-item pages (webhook handlers + cron timers).
Two operation types in this wave (critical distinction from Waves 1-3):
- ENRICH — receive existing file content → add one section → output full file unchanged except for new section
- CREATE — generate new file from scratch (same as Waves 1-3)
Model routing (confirmed at Step 0 via model-selector popup)
| Sub-wave | Operation | Model | Dispatch | Est. cost |
|---|---|---|---|---|
| B1 — Agent peer enrichment | ENRICH | Gemma 4 26B | mcp__gemma__gemma_ask / gemma-generate.js | ~$0.008 |
| B2 — Skill compose chains | ENRICH | Gemma 4 26B | mcp__gemma__gemma_ask / gemma-generate.js | ~$0.007 |
| B3 — Webhook handler pages | CREATE | Sonnet (first 1) → Gemma 26B (rest 10) | Agent(model:“sonnet”) then gemma_ask | ~$0.015 |
| B4 — Cron timer pages | CREATE | Gemma 4 26B | mcp__gemma__gemma_ask / gemma-generate.js | ~$0.005 |
| Audit (AU-A/B/C) | AUDIT | Claude Haiku | Agent(model:“haiku”) | ~$0.010 |
| Total | ~$0.045 |
ENRICH prompt template (B1 and B2)
Use this template for ALL enrichment operations. Never truncate the existing file. Output the complete file.
SYSTEM: You are enriching an existing OpenClaw vault file.
RULE 1: Output the COMPLETE file content — every existing line preserved exactly.
RULE 2: Do NOT modify any existing frontmatter fields.
RULE 3: Do NOT change any existing wikilinks, headings, or body text.
RULE 4: Add ONLY the new section specified below.
RULE 5: No preamble, no explanation. Output starts with the first --- of frontmatter.
RULE 6: If the section to add already exists in the file, output the file unchanged.
INJECTION POINT: Insert the new section immediately before "## Recent activity" if that heading exists.
If "## Recent activity" does not exist, append the new section at the very end of the file.
EXISTING FILE CONTENT:
{paste complete existing _summary.md or skill.md content}
SOURCE DATA (for generating accurate cross-links):
{paste SOUL.md excerpt (B1) OR SKILL.md excerpt (B2) — key sections only, <3K tokens}
PEER CONTEXT (for wikilink path accuracy — use exact paths shown):
{paste 5 peer hub titles with their vault paths, e.g.:
- Aurora: [[wiki/agents/aurora/_summary]]
- Acquisitions process: [[wiki/_hubs/processes/acquisitions-lifecycle]]
- Skill: [[wiki/skills/acquisitions-outreach]]
}
SECTION TO ADD (B1 — agent enrichment):
## Frequent collaborators
[Generate 3-5 wikilinks to: (a) peer agents this agent directly calls or receives calls from, (b) process hubs that govern this agent's workflow, (c) integration hubs for platforms this agent uses. Use exact vault paths from PEER CONTEXT above.]
SECTION TO ADD (B2 — skill compose chains):
## Invokes / Invoked by
**Invokes:** [2-3 wikilinks to skills this skill calls or depends on]
**Invoked by:** [2-3 wikilinks to agents or skills that call this skill]
[Base these on the SKILL.md "When to trigger" and "allowed-tools" fields and any explicit agent references]
CREATE prompt template (B3 webhook handler pages)
Use this for new webhook-handler-page type. Sonnet authors the first (hubspot-handler); Gemma authors the rest using hubspot-handler as a format example.
SYSTEM: You are authoring a webhook-handler hub page for the OpenClaw vault.
Follow the spec exactly. Output ONLY the markdown file content.
No explanation, no preamble. Start with ---frontmatter---.
FRONTMATTER SPEC:
---
title: {Handler Name} — Webhook Handler
type: webhook-handler
handler-file: webhooks/{filename}.js
port: {port number or "internal"}
auth-method: {hmac-sig | query-param-token | oauth-push | internal}
service-unit: {systemd unit name}.service
hub: true
cluster: ["webhook", "integrations"]
ownership: claude-authored
lifecycle: active
audience: [henry, claude]
related:
- "[[wiki/_hubs/systems/webhook-architecture]]"
- "[[wiki/_hubs/integrations/{platform}]]"
- "[[wiki/agents/{downstream-agent}/_summary]]"
supersedes: []
blocks: []
depends-on: []
auto-link: true
---
BODY SECTIONS (all required):
## Overview
[1-2 sentences: what this handler does, which platform sends to it, what it triggers]
## Endpoint
[Public URL via Tailscale Funnel/Cloudflare Tunnel, port, and path]
## Auth method
[Exact auth: HMAC-SHA256 sig verification / query-param token / etc. Reference FUNNEL-REGISTRY if applicable]
## Payload shape
[Key fields received — base on actual handler code]
## Downstream dispatch
[Which agents, tools, or tables receive data after this handler fires]
## Dedup strategy
[How duplicate events are suppressed — processed_webhook_events table, idempotency key, etc.]
## Audit trail
[webhook_audit_log writes, local fallback, Discord alert path]
## Related
[3-5 wikilinks: integration hub, downstream agent, architecture hub, port-registry, FUNNEL-REGISTRY]
SOURCE DATA:
{paste first 80 lines of handler .js file}
{paste relevant FUNNEL-REGISTRY.md rows}
{paste integration KB doc summary if available}
FORMAT EXAMPLE (paste hubspot-handler.md after Sonnet authors it):
{paste completed first page as Gemma reference}
CREATE prompt template (B4 cron/timer pages)
SYSTEM: You are authoring a cron-timer hub page for the OpenClaw vault.
Follow the spec exactly. Output ONLY the markdown file content.
No explanation, no preamble. Start with ---frontmatter---.
FRONTMATTER SPEC:
---
title: {Timer Name} — Cron Timer
type: cron-timer
timer-unit: {name}.timer
service-unit: {name}.service
schedule: {human-readable: "every 15 min" / "daily 02:00 PT" / etc.}
hub: true
cluster: ["cron", "systems"]
ownership: claude-authored
lifecycle: active
audience: [henry, claude]
related:
- "[[wiki/_hubs/systems/cron-timer-registry]]"
- "[[wiki/agents/{owner-agent}/_summary]]"
supersedes: []
blocks: []
depends-on: []
auto-link: true
---
BODY SECTIONS (all required):
## Purpose
[What this timer does and why it matters operationally]
## Schedule
[Exact OnUnitActiveSec / OnCalendar value from unit file + human-readable translation]
## Service
[What the .service unit runs: script path, key args, env vars (no plaintext values)]
## Failure behavior
[What happens if the service fails: Discord alert? Retry? Silent fail?]
## Health signal
[How to verify it ran: log path, Discord message, Supabase row, or systemctl status]
## Related
[3-5 wikilinks: owner agent, relevant integration hub, cron-timer-registry]
SOURCE DATA:
{paste systemctl --user cat {timer}.timer output}
{paste systemctl --user cat {timer}.service output}
B1 — Agent target manifest (43 dirs, ENRICH _summary.md)
All in wiki/agents/<name>/_summary.md (canonical: ~/.openclaw/workspace/wiki/agents/) + vault.
Batch W4-S1 (15 agents): acquisitions · angel-calls · anthropic · atlas · auctionscout · aurora · backfill · betteracq · betterarbitrage · betterbets · bettercredit · betterfiles · betterhomeoffers · bettershowings · bettertrading
Batch W4-S2 (14 agents): bizintel · chatgpt · crowdfunding · david-socal · dealcmd · dispo · fund-calls · h2-calls · h3-calls · hhill-socal · investorlift · investorlift-angel · investorlift-h2 · investorlift-h3
Batch W4-S3 (14 agents): kimi · main · mktg · ops · prediction-trader · reri · research · ryan-norcal · social · solara · tablegames · tradelines · webops · (spare slot)
Source per agent: ~/.openclaw/agents/<name>/agent/SOUL.md (peer agents listed there) + wiki/_hubs/processes/ (which process hubs govern this agent)
Idempotency: If ## Frequent collaborators already exists in the file → skip, do not duplicate.
B2 — Skill target manifest (45 files, ENRICH)
All in wiki/skills/<name>.md (canonical + vault).
Batch W4-S4 (15 skills): 21st-dev · acq-analyze · acq-dispatch-test · acquisitions-followup · acquisitions-outreach · audit-before-architecting · aurora-model-swap · betterbets-ufc · betterfiles-autolabel · betterfiles-cda · betterfiles-dispo-emails · bulk-sms-split-test · cli-anything · composition-patterns · discord
Batch W4-S5 (15 skills): dispo-blast · dispo-learning-rollup · dispo-orphan-recovery · docx · frontend-design · gemma · gstack · horse-racing · hubspot-deal-ingest · il-marketplace-pull · mcp-builder · messaging-compliance-gate · messaging-vendor-kb-refresh · messaging-vendor-sandbox-tester · messaging-webhook-handler-template
Batch W4-S6 (15 skills): model-selector · model-usage · ocl-post-plan · ocl-pre-ship · pdf · perplexity · react-best-practices · session-logs · ui-ux-pro-max · vendor-sms-onboarding · video-split-test · wave-execute · web-design-guidelines · webapp-testing · xlsx
Source per skill: ~/.claude/skills/<name>/SKILL.md (the “When to invoke” + allowed-tools sections reveal what it invokes/is invoked by)
Idempotency: If ## Invokes / Invoked by already exists → skip.
B3 — Webhook handler target manifest (11 pages, CREATE)
Output path: wiki/webhooks/<name>.md (canonical: ~/.openclaw/workspace/wiki/webhooks/ — create dir if missing)
| Page | Source handler | Port | Auth |
|---|---|---|---|
| hubspot-handler.md | webhooks/hubspot-handler.js | 18790 | HMAC-SHA256 |
| quo-handler-enhanced.md | webhooks/quo-handler-enhanced.js | 18792 | HMAC-SHA256 |
| salesmessage-handler-v4.md | webhooks/salesmessage-handler-v4-complete.js | 18793 | query-param token |
| twilio-voice-handler.md | webhooks/twilio-voice-handler.js | 18797 | HMAC-SHA256 |
| gmail-push-handler.md | webhooks/gmail-push-handler.js | 18801 | OAuth push |
| imessage-handler.md | webhooks/imessage-handler.js | internal | internal |
| docusign-handler.md | webhooks/docusign-handler.js | 18790 (shared) | HMAC + WAF IP |
| dispo-api.md | webhooks/dispo-api.js | internal | internal |
| otc-handler.md | webhooks/otc-handler.js | internal | internal |
| betterfiles-chat-handler.md | webhooks/betterfiles-chat-handler.js | internal | internal |
| gchat-handler.md | webhooks/gchat-handler.js | internal | internal |
Sonnet does hubspot-handler.md first (new page type). Output becomes the format example for Gemma’s remaining 10.
Sub-agent W4-S7:
- Agent(model:“sonnet”) → generate hubspot-handler.md
- Write to canonical + vault
- Then: Gemma generates remaining 10 using hubspot-handler.md as FORMAT EXAMPLE in prompt
B4 — Cron timer target manifest (10 pages + 1 MOC update, CREATE)
Output path: wiki/cron/<name>.md (canonical: ~/.openclaw/workspace/wiki/cron/ — create dir if missing)
| Page | Timer unit | Schedule |
|---|---|---|
| openclaw-vault-sync.md | openclaw-vault-sync.timer | every 15 min |
| openclaw-vault-pull.md | openclaw-vault-pull.timer | every 5 min |
| memory-worker.md | memory-worker.timer | every 5 min |
| cost-monitor.md | cost-monitor.timer | every 5 min |
| security-audit-funnel.md | security-audit-funnel.timer | Mon 06:00 PT |
| webhook-health-monitor.md | webhook-health-monitor.timer | every 5 min |
| dashboard-metrics.md | dashboard-metrics.timer | every 5 min |
| sm-broadcast-sync.md | sm-broadcast-sync.timer | periodic |
| osil-reflexion-runner.md | osil-reflexion-runner.timer | periodic |
| perplexity-daily-summary.md | perplexity-daily-summary.timer | daily |
Also: Update wiki/_hubs/systems/cron-timer-registry.md to add the full 62-timer table (all from systemctl --user list-timers).
Source per page: systemctl --user cat <name>.timer + systemctl --user cat <name>.service
Sub-agent W4-S8 (Gemma).
Audit checklist (W4-AU-A/B/C, Haiku)
Same 9 checks as Waves 1-3:
AU-A:
- Inventory — all targets processed (43 enriched + 45 enriched + 11 created + 10 created)
- Cross-link resolution — no broken wikilinks introduced
- Frontmatter compliance — all created pages have required fields; all enriched pages frontmatter unchanged
AU-B: 4. Enrichment fidelity — no existing content was modified or truncated (B1, B2) 5. Section injection — “Frequent collaborators” and “Invokes / Invoked by” present and correctly placed 6. Asymmetry — if Agent A links to Agent B, B’s file also mentions A (directional only, not strict bidirectional)
AU-C:
7. Density cap — new per-item pages 15-40 wikilinks; enriched sections 3-5 links per section added
8. Secret sweep — no sk-ant-, xoxb-, AKIA, pat-na1-, plaintext tokens in any file
9. Canonical-vault parity — every written/enriched file exists at both canonical + vault path
Sub-agent roster
| Agent | Operation | Model | Targets |
|---|---|---|---|
| W4-PF | Pre-flight (inline) | Opus | Idempotency check all targets |
| W4-S0 | model-selector popup | Opus → AskUserQuestion | Confirm model per sub-wave |
| W4-S1 | B1 batch 1 | Gemma 26B | 15 agent _summary.md enrichments |
| W4-S2 | B1 batch 2 | Gemma 26B | 14 agent _summary.md enrichments |
| W4-S3 | B1 batch 3 | Gemma 26B | 14 agent _summary.md enrichments |
| W4-S4 | B2 batch 1 | Gemma 26B | 15 skill page enrichments |
| W4-S5 | B2 batch 2 | Gemma 26B | 15 skill page enrichments |
| W4-S6 | B2 batch 3 | Gemma 26B | 15 skill page enrichments |
| W4-S7 | B3 webhook pages | Sonnet (1) + Gemma 26B (10) | 11 new webhook handler pages |
| W4-S8 | B4 timer pages | Gemma 26B | 10 new timer pages + MOC update |
| W4-AU-A | Audit checks 1-3 | Haiku | Inventory + cross-links + frontmatter |
| W4-AU-B | Audit checks 4-6 | Haiku | Enrichment fidelity + graph cohesion |
| W4-AU-C | Audit checks 7-9 | Haiku | Density + secrets + parity |
| W4-PATCHER | Patches if needed | Sonnet | Apply AU findings |
| W4-RETRO | Morning brief + _index | Opus | Close out, update _index.md |
Expected outputs
| Metric | Wave 4 |
|---|---|
| Files enriched | 88 (43 agents + 45 skills) |
| Files created | 22 (11 webhook + 10 timer + 1 cron dir placeholder) |
| Wikilinks added | ~677 (+172 B1 + +135 B2 + +220 B3 + +150 B4) |
| Cumulative wikilinks | ~8,954 |
| Est. cost (spec) | ~$0.045 |
Reversibility
| Operation | Revert |
|---|---|
| B1/B2 enrichments | git revert <W4-commit-sha> in vault repo |
| B3/B4 new pages | rm wiki/webhooks/*.md wiki/cron/*.md + vault revert |
| Full W4 rollback | cd ~/openclaw-vault && git reset --hard <pre-W4-sha> (pre-W4 = current HEAD) |
Current vault HEAD before Wave 4: run cd ~/openclaw-vault && git log --oneline -1 at wave start and record.
Recent activity
- 2026-05-04: spec created (Henry auth — “write and do the wave 4 dispatch”)