Ansible - MeshOps Coordination Skill
What This Is
Ansible is a distributed coordination layer that lets you operate across multiple OpenClaw gateways as one coordinated mesh.
Four pillars:
- Ring of Trust: invite/join handshake, auth-gate WebSocket tickets, ed25519-signed capability manifests, per-action safety gates, and token lifecycle.
- Mesh Sync: Yjs CRDT replication over Tailscale. Messages, tasks, context, and pulse remain durable across reconnects and restarts.
- Capability Routing: publish/unpublish capability contracts. Each contract references a delegation skill (requester) and an execution skill (executor).
- Lifecycle Ops: lock sweep, retention/pruning, coordinator sweep, and deployment hygiene.
Relationship Modes
- Friends/Employees (default): other nodes are different agents. Provide context and communicate explicitly.
- Hemispheres (advanced): mirrored instances of the same identity. Shared intent and direct communication.
Default to Friends/Employees unless explicitly told a node is a hemisphere.
Node Topology
- Backbone: always-on nodes (VPS/servers) that host Yjs WebSocket.
- Edge: intermittent nodes (laptops/desktops) that connect to backbone.
Human Visibility Contract (Required on Pickup)
When taking coordination work, maintain explicit lifecycle updates:
- ACK: confirm receipt and summarize intent.
- IN_PROGRESS: emit progress updates at meaningful checkpoints.
- DONE or BLOCKED: close with evidence, next action, and owner.
Use conversation_id consistently for all related updates.
Ring of Trust - Behavioral Rules
- Unknown nodes require invite-based admission. Do not bypass.
- High-risk capability publishes require human approval artifacts.
- Respect caller gates (
OPENCLAW_ALLOWED_CALLERS) and high-risk flags.
- Never expose tokens in plaintext messages/logs/shared state.
- When signature enforcement is on, only accept manifests signed by trusted publisher keys.
Gateway Compatibility Contract
- Validate plugin is installed and readable before assuming tool availability.
- Verify tier assumptions (backbone vs edge) before mutating coordination settings.
- Treat gateway runtime as source of truth for active topology and health.
Reliability Model
Source of Truth
Shared Yjs state is authoritative.
Delivery Semantics
- Durable: messages/tasks persist in shared state.
- Auto-dispatch: best-effort realtime injection into sessions.
- Heartbeat reconcile: periodic rescan recovers missed injections.
- Retry: transient dispatch failures retry with bounded backoff.
- Send receipts: notify configured operators when work is placed on mesh.
Operating Rules
- Verify pending work with
ansible_status and ansible_read_messages.
- If polling mode is used, always reply via
ansible_send_message.
- Use
corr:<messageId> for thread continuity.
- Listener behavior is optimization; sweep/reconcile is the backstop.
Capability Contracts
- A capability is a contract, not just a label.
- Contract includes delegation and execution skill references.
- Publishing updates routing eligibility mesh-wide.
- Provenance is verified against trusted publisher keys when configured.
- High-risk contracts require explicit approval artifacts.
- Unpublish removes eligibility immediately.
- Lifecycle evidence must capture install/wire outcomes.
Delegation Protocol
- Requester creates task with objective, context, acceptance criteria, and target policy (
to_agents or capability).
- Executor claims task and sends acceptance/ETA signal.
- Executor performs work, emits progress, and completes with structured result.
- Requester reports final outcome to human and/or downstream agents.
Coordinator Behavior
- Run sweep loops for stale locks, SLA drift, and backlog reconciliation.
- Prefer record-only escalation by default when blast radius is unclear.
- If DEGRADED, prioritize containment, visibility, and deterministic recovery.
Available Tools
Communication
| Tool |
Purpose |
ansible_send_message |
Send targeted or broadcast message across mesh |
ansible_read_messages |
Read unread messages (or full history) |
ansible_mark_read |
Mark messages as read |
ansible_delete_messages |
Admin-only emergency purge |
Task Delegation
| Tool |
Purpose |
ansible_delegate_task |
Create task for another node/agent set |
ansible_claim_task |
Claim pending task |
ansible_update_task |
Update task status/progress |
ansible_complete_task |
Complete task and notify requester |
ansible_find_task |
Resolve task by ID/title |
Context and Status
| Tool |
Purpose |
ansible_status |
Mesh health, unread, pending, and topology summary |
ansible_update_context |
Update shared context/threads/decisions |
Coordination and Governance
| Tool |
Purpose |
ansible_get_coordination |
Read coordinator configuration |
ansible_set_coordination_preference |
Set node coordinator preference |
ansible_set_coordination |
Switch coordinator (guarded) |
ansible_set_retention |
Configure closed-task retention/pruning |
ansible_get_delegation_policy |
Read delegation policy plus ACKs |
ansible_set_delegation_policy |
Publish/update delegation policy |
ansible_ack_delegation_policy |
Acknowledge policy version |
ansible_lock_sweep_status |
Inspect lock sweep health |
Capability Lifecycle
| Tool |
Purpose |
ansible_list_capabilities |
List published capability contracts |
ansible_capability_publish |
Publish/upgrade capability contract |
ansible_capability_unpublish |
Remove capability from routing |
ansible_capability_lifecycle_evidence |
Show install/wire evidence for version |
ansible_capability_health_summary |
Show success/error/latency summary |
When to Use Ansible
Use Ansible when work crosses gateways, needs durable coordination, or requires auditable delegation contracts.
Session Behavior
- Start by checking status and pending work.
- Prefer explicit delegation for capability-matched work.
- Keep humans in loop via lifecycle messages.
Message Protocol v1
- Always include enough context for independent execution.
- Use stable correlation IDs (
corr) and conversation IDs.
- Prefer structured payloads over freeform-only messaging.
Setup Playbooks
Follow plugin setup and gateway runbooks for topology bootstrap, auth-gate, and trust settings.
Delegation Management
- Keep delegation policy current and acknowledged across nodes.
- Treat capability publishes as contract releases.
- Roll back quickly when lifecycle evidence indicates drift or misfire.
1---2name: openclaw-skill-ansible3description: Ansible - MeshOps Coordination Skill4---56# Ansible - MeshOps Coordination Skill78## What This Is910Ansible is a distributed coordination layer that lets you operate across multiple OpenClaw gateways as one coordinated mesh.1112Four pillars:13141. Ring of Trust: invite/join handshake, auth-gate WebSocket tickets, ed25519-signed capability manifests, per-action safety gates, and token lifecycle.152. Mesh Sync: Yjs CRDT replication over Tailscale. Messages, tasks, context, and pulse remain durable across reconnects and restarts.163. Capability Routing: publish/unpublish capability contracts. Each contract references a delegation skill (requester) and an execution skill (executor).174. Lifecycle Ops: lock sweep, retention/pruning, coordinator sweep, and deployment hygiene.1819## Relationship Modes2021- Friends/Employees (default): other nodes are different agents. Provide context and communicate explicitly.22- Hemispheres (advanced): mirrored instances of the same identity. Shared intent and direct communication.2324Default to Friends/Employees unless explicitly told a node is a hemisphere.2526## Node Topology2728- Backbone: always-on nodes (VPS/servers) that host Yjs WebSocket.29- Edge: intermittent nodes (laptops/desktops) that connect to backbone.3031## Human Visibility Contract (Required on Pickup)3233When taking coordination work, maintain explicit lifecycle updates:34351. ACK: confirm receipt and summarize intent.362. IN_PROGRESS: emit progress updates at meaningful checkpoints.373. DONE or BLOCKED: close with evidence, next action, and owner.3839Use `conversation_id` consistently for all related updates.4041## Ring of Trust - Behavioral Rules4243- Unknown nodes require invite-based admission. Do not bypass.44- High-risk capability publishes require human approval artifacts.45- Respect caller gates (`OPENCLAW_ALLOWED_CALLERS`) and high-risk flags.46- Never expose tokens in plaintext messages/logs/shared state.47- When signature enforcement is on, only accept manifests signed by trusted publisher keys.4849## Gateway Compatibility Contract5051- Validate plugin is installed and readable before assuming tool availability.52- Verify tier assumptions (backbone vs edge) before mutating coordination settings.53- Treat gateway runtime as source of truth for active topology and health.5455## Reliability Model5657### Source of Truth5859Shared Yjs state is authoritative.6061### Delivery Semantics6263- Durable: messages/tasks persist in shared state.64- Auto-dispatch: best-effort realtime injection into sessions.65- Heartbeat reconcile: periodic rescan recovers missed injections.66- Retry: transient dispatch failures retry with bounded backoff.67- Send receipts: notify configured operators when work is placed on mesh.6869### Operating Rules7071- Verify pending work with `ansible_status` and `ansible_read_messages`.72- If polling mode is used, always reply via `ansible_send_message`.73- Use `corr:<messageId>` for thread continuity.74- Listener behavior is optimization; sweep/reconcile is the backstop.7576## Capability Contracts7778- A capability is a contract, not just a label.79- Contract includes delegation and execution skill references.80- Publishing updates routing eligibility mesh-wide.81- Provenance is verified against trusted publisher keys when configured.82- High-risk contracts require explicit approval artifacts.83- Unpublish removes eligibility immediately.84- Lifecycle evidence must capture install/wire outcomes.8586## Delegation Protocol87881. Requester creates task with objective, context, acceptance criteria, and target policy (`to_agents` or capability).892. Executor claims task and sends acceptance/ETA signal.903. Executor performs work, emits progress, and completes with structured result.914. Requester reports final outcome to human and/or downstream agents.9293## Coordinator Behavior9495- Run sweep loops for stale locks, SLA drift, and backlog reconciliation.96- Prefer record-only escalation by default when blast radius is unclear.97- If DEGRADED, prioritize containment, visibility, and deterministic recovery.9899## Available Tools100101### Communication102103| Tool | Purpose |104|------|---------|105| `ansible_send_message` | Send targeted or broadcast message across mesh |106| `ansible_read_messages` | Read unread messages (or full history) |107| `ansible_mark_read` | Mark messages as read |108| `ansible_delete_messages` | Admin-only emergency purge |109110### Task Delegation111112| Tool | Purpose |113|------|---------|114| `ansible_delegate_task` | Create task for another node/agent set |115| `ansible_claim_task` | Claim pending task |116| `ansible_update_task` | Update task status/progress |117| `ansible_complete_task` | Complete task and notify requester |118| `ansible_find_task` | Resolve task by ID/title |119120### Context and Status121122| Tool | Purpose |123|------|---------|124| `ansible_status` | Mesh health, unread, pending, and topology summary |125| `ansible_update_context` | Update shared context/threads/decisions |126127### Coordination and Governance128129| Tool | Purpose |130|------|---------|131| `ansible_get_coordination` | Read coordinator configuration |132| `ansible_set_coordination_preference` | Set node coordinator preference |133| `ansible_set_coordination` | Switch coordinator (guarded) |134| `ansible_set_retention` | Configure closed-task retention/pruning |135| `ansible_get_delegation_policy` | Read delegation policy plus ACKs |136| `ansible_set_delegation_policy` | Publish/update delegation policy |137| `ansible_ack_delegation_policy` | Acknowledge policy version |138| `ansible_lock_sweep_status` | Inspect lock sweep health |139140### Capability Lifecycle141142| Tool | Purpose |143|------|---------|144| `ansible_list_capabilities` | List published capability contracts |145| `ansible_capability_publish` | Publish/upgrade capability contract |146| `ansible_capability_unpublish` | Remove capability from routing |147| `ansible_capability_lifecycle_evidence` | Show install/wire evidence for version |148| `ansible_capability_health_summary` | Show success/error/latency summary |149150## When to Use Ansible151152Use Ansible when work crosses gateways, needs durable coordination, or requires auditable delegation contracts.153154## Session Behavior155156- Start by checking status and pending work.157- Prefer explicit delegation for capability-matched work.158- Keep humans in loop via lifecycle messages.159160## Message Protocol v1161162- Always include enough context for independent execution.163- Use stable correlation IDs (`corr`) and conversation IDs.164- Prefer structured payloads over freeform-only messaging.165166## Setup Playbooks167168Follow plugin setup and gateway runbooks for topology bootstrap, auth-gate, and trust settings.169170## Delegation Management171172- Keep delegation policy current and acknowledged across nodes.173- Treat capability publishes as contract releases.174- Roll back quickly when lifecycle evidence indicates drift or misfire.