OpenClaw Supervisor Swarm & Automation β
DevDiff integrates with OpenClaw environments for local-first, privacy-respecting LLM routing, task delegation, and multi-agent swarm orchestration.
Beginning in DevDiff v1.0.5, the OpenClaw Supervisor manages automated pipelines, error recovery, package verification, and interactive human reviews.
π Supervisor configuration (supervisor-pipeline.yaml) β
Orchestrate your development agents by placing a supervisor-pipeline.yaml automation script inside your repository's .devdiff/automations/ directory. This script configures roles, routing models, thresholds, and delegation rules:
version: "1.0"
pipeline:
name: "OpenClaw Swarm Supervisor"
defaultModel: "ollama://qwen2.5-coder:7b"
agents:
- name: "writer"
role: "Changelog synthesis and formatting"
model: "ollama://qwen2.5-coder:7b"
confidenceThreshold: 80
- name: "security_reviewer"
role: "Security scanner and dependency auditor"
model: "ollama://llama3.2:3b"
confidenceThreshold: 90
- name: "compliance_officer"
role: "License and framework compliance verification"
model: "ollama://llama3.2:3b"
confidenceThreshold: 90
tasks:
- id: "diff_analysis"
description: "Analyze git diff for logic changes"
assignedTo: "writer"
- id: "security_scan"
description: "Check diffs for security vulnerabilities"
assignedTo: "security_reviewer"
dependsOn: "diff_analysis"Once defined, the DevDiff core orchestrator swarms the task analysis across your local agents and synthesizes the finalized changelog.
π οΈ Resilient Diagnostics & Error Recovery β
The OpenClaw supervisor wraps all agent tasks in a resilient error recovery handler that intercepts failures and auto-retries tasks with fallbacks.
The handler diagnoses and recovers from:
- Connection Refusal: Auto-starts local Ollama endpoints or switches to backup cloud models.
- Context Length Overflow: Intelligently prunes unnecessary diff files, removes test code, and reduces the token payload.
- Output Hallucinations: Detects if an agent returns invalid JSON format or empty outputs, re-prompting with strict schema validations.
- Model Timeouts: Retries the request using faster, lightweight local models (e.g.
llama3.2:3b) to ensure completion.
π¦ Dependency Auto-Installation β
To save developer setup time, the supervisor contains an automated Dependency Manager that checks for missing local packages and models on startup:
- Package Managers: Auto-detects active package tools (
npm,pnpm,yarn,bun). - Missing Dependencies: Identifies missing CLI binaries or configurations.
- Auto-Install: Promptlessly runs
pnpm addor system installations to configure the environment, ensuring all agent dependencies are linked.
π€ Human-in-the-Loop Interruption β
If an agent finishes analysis with a low confidence score, or detects a critical concern (like a security flag), the supervisor halts the pipeline and starts the Human Review System:
βββββββββββββββββββββββββββββββββββββββββββββββ
β π€ HUMAN REVIEW REQUESTED β
βββββββββββββββββββββββββββββββββββββββββββββββ€
β Type: security_finding β
β Confidence: 45 β
β Priority: CRITICAL β
βββββββββββββββββββββββββββββββββββββββββββββββ€
β AI Output: β
β Found critical CVE vulnerability in databaseβ
βββββββββββββββββββββββββββββββββββββββββββββββ€
β Evidence: β
β β’ package.json β
βββββββββββββββββββββββββββββββββββββββββββββββ
Options:
[A] Approve β Accept AI output as-is
[R] Reject β Discard AI output, retry with different approach
[M] Modify β Edit the AI output
[D] Delegate β Send to another AI agentReview Modes: β
- Interactive (TTY): Prompts the developer in their terminal with options:
[A] Approve,[R] Reject,[M] Modify, or[D] Delegate(routes to another model). - Non-Interactive (CI/CD): When running in automated environments (like GitHub Actions), the system bypasses interactive prompts, logs warnings, and falls back to a safe confidence resolution.