plugins/ruflo-loop-workers/README.md
Cache-aware /loop workers and CronCreate background automation. Substrate plugin for every recurring task in the ruflo family.
/plugin marketplace add ruvnet/ruflo
/plugin install ruflo-loop-workers@ruflo
/loop with ScheduleWakeup (delay <270s for prompt cache hits)ruflo-core plugin (provides MCP server)@claude-flow/cli v3.6 major+minor.bash plugins/ruflo-loop-workers/scripts/smoke.sh is the contract.All defined at v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:
| Tool | Purpose |
|---|---|
hooks_worker-list | List available workers and their triggers |
hooks_worker-dispatch | Dispatch a worker run with --trigger <worker-name> and optional --scope |
hooks_worker-status | Inspect a running worker |
hooks_worker-detect | Detect which workers should fire based on context |
hooks_worker-cancel | Cancel a running worker |
| Trigger | Consumer plugin | Purpose |
|---|---|---|
ultralearn | ruflo-intelligence | Bootstrap learning corpus from a deep codebase scan |
optimize | ruflo-cost-tracker, ruflo-intelligence | Performance + cost optimization recommendations |
consolidate | ruflo-intelligence, ruflo-agentdb | EWC++ memory consolidation |
predict | ruflo-intelligence | Predictive routing for upcoming tasks |
audit | ruflo-security-audit, ruflo-aidefence | Security + compliance audit pass |
map | ruflo-knowledge-graph | Build/refresh entity-relation knowledge graph |
preload | ruflo-core, ruflo-rag-memory | Warm caches before high-frequency operations |
deepdive | ruflo-goals (deep-research) | Multi-source investigation pass |
document | ruflo-docs | Generate API docs + drift detection |
refactor | ruflo-jujutsu | Diff-aware refactor recommendations |
benchmark | ruflo-cost-tracker, ruflo-iot-cognitum | Perf benchmarks |
testgaps | ruflo-testgen | Coverage gap detection + test generation |
Invocation pattern (CLI + MCP):
# CLI
npx @claude-flow/cli@latest hooks worker dispatch --trigger document --scope api
# MCP
mcp tool call hooks_worker-dispatch --json -- '{"trigger": "document", "scope": "api"}'
This plugin pairs with ruflo-autopilot ADR-0001 which owns the 270s cache-aware ScheduleWakeup heartbeat contract. Recommended fallback heartbeat is 270 seconds — under the 5-minute prompt-cache TTL so the next wake-up reads conversation context cached. Going past 300s pays a cache-miss; rounding to 5 minutes is the worst-of-both case.
For event-driven loops, arm a Monitor and let the 270s wake be the safety net.
This plugin owns the worker-history AgentDB namespace (kebab-case, follows the convention from ruflo-agentdb ADR-0001 §"Namespace convention"). Reserved namespaces (pattern, claude-memories, default) MUST NOT be shadowed.
worker-history records dispatch events, durations, success/failure verdicts. Accessed via memory_* tools (namespace-routed).
bash plugins/ruflo-loop-workers/scripts/smoke.sh
# Expected: "12 passed, 0 failed"
ruflo-autopilot — owns the 270s cache-aware /loop heartbeat contractruflo-docs, ruflo-security-audit, ruflo-testgen, ruflo-knowledge-graph, etc. — worker-trigger consumers per the table aboveruflo-agentdb — namespace convention owner; backing store for worker-history