← Back to Plugins
Tools

Devclaw

laurentenhoor By laurentenhoor ⭐ 3 stars 👁 28 views ▲ 1 votes

Multi-project dev/qa pipeline orchestration plugin for OpenClaw

GitHub

Configuration Example

{
  "projects": {
    "-1234567890": {
      "name": "my-webapp",
      "repo": "~/git/my-webapp",
      "groupName": "Dev - My Webapp",
      "baseBranch": "development",
      "autoChain": true,
      "dev": {
        "active": false,
        "issueId": null,
        "model": "medior",
        "sessions": {
          "junior": "agent:orchestrator:subagent:a9e4d078-...",
          "medior": "agent:orchestrator:subagent:b3f5c912-...",
          "senior": null
        }
      },
      "qa": {
        "active": false,
        "issueId": null,
        "model": "qa",
        "sessions": {
          "qa": "agent:orchestrator:subagent:18707821-..."
        }
      }
    }
  }
}

README

<p align="center">
  <img src="assets/DevClaw.png" width="300" alt="DevClaw Logo">
</p>

# DevClaw - Development Plugin for OpenClaw

**Every group chat becomes an autonomous development team.**

Add the agent to a Telegram/WhatsApp group, point it at a GitLab/GitHub repo โ€” that group now has an **orchestrator** managing the backlog, a **DEV** worker session writing code, and a **QA** worker session reviewing it. All autonomous. Add another group, get another team. Each project runs in complete isolation with its own task queue, workers, and session state.

DevClaw is the [OpenClaw](https://openclaw.ai) plugin that makes this work.

## Why

[OpenClaw](https://openclaw.ai) is great at giving AI agents the ability to develop software โ€” spawn worker sessions, manage sessions, work with code. But running a real multi-project development pipeline exposes a gap: the orchestration layer between "agent can write code" and "agent reliably manages multiple projects" is brittle. Every task involves 10+ coordinated steps across GitLab labels, session state, model selection, and audit logging. Agents forget steps, corrupt state, null out session IDs they should preserve, or pick the wrong model for the job.

DevClaw fills that gap with guardrails. It gives the orchestrator atomic tools that make it impossible to forget a label transition, lose a session reference, or skip an audit log entry. The complexity of multi-project orchestration moves from agent instructions (that LLMs follow imperfectly) into deterministic code (that runs the same way every time).

## The idea

One orchestrator agent manages all your projects. It reads task backlogs, creates issues, decides priorities, and delegates work. For each task, DevClaw assigns a developer from your **team** โ€” a junior, medior, or senior dev writes the code, then a QA engineer reviews it. Every Telegram/WhatsApp group is a separate project โ€” the orchestrator keeps them completely isolated while managing them all from a single process.

DevClaw gives the orchestrator seven tools that replace hundreds of lines of manual orchestration logic. Instead of following a 10-step checklist per task (fetch issue, check labels, pick model, check for existing session, transition label, dispatch task, update state, log audit event...), it calls `task_pickup` and the plugin handles everything atomically โ€” including session dispatch. Workers call `task_complete` themselves for atomic state updates, and can file follow-up issues via `task_create`.

## Developer tiers

DevClaw uses a developer seniority model. Each tier maps to a configurable LLM model:

| Tier       | Role                | Default model                 | Assigns to                                        |
| ---------- | ------------------- | ----------------------------- | ------------------------------------------------- |
| **junior** | Junior developer    | `anthropic/claude-haiku-4-5`  | Typos, single-file fixes, simple changes          |
| **medior** | Mid-level developer | `anthropic/claude-sonnet-4-5` | Features, bug fixes, multi-file changes           |
| **senior** | Senior developer    | `anthropic/claude-opus-4-5`   | Architecture, migrations, system-wide refactoring |
| **qa**     | QA engineer         | `anthropic/claude-sonnet-4-5` | Code review, test validation                      |

Configure which model each tier uses during setup or in `openclaw.json` plugin config.

## How it works

```mermaid
graph TB
    subgraph "Group Chat A"
        direction TB
        A_O["๐ŸŽฏ Orchestrator"]
        A_GL[GitLab Issues]
        A_DEV["๐Ÿ”ง DEV (worker session)"]
        A_QA["๐Ÿ” QA (worker session)"]
        A_O -->|task_pickup| A_GL
        A_O -->|task_pickup dispatches| A_DEV
        A_O -->|task_pickup dispatches| A_QA
    end

    subgraph "Group Chat B"
        direction TB
        B_O["๐ŸŽฏ Orchestrator"]
        B_GL[GitLab Issues]
        B_DEV["๐Ÿ”ง DEV (worker session)"]
        B_QA["๐Ÿ” QA (worker session)"]
        B_O -->|task_pickup| B_GL
        B_O -->|task_pickup dispatches| B_DEV
        B_O -->|task_pickup dispatches| B_QA
    end

    subgraph "Group Chat C"
        direction TB
        C_O["๐ŸŽฏ Orchestrator"]
        C_GL[GitLab Issues]
        C_DEV["๐Ÿ”ง DEV (worker session)"]
        C_QA["๐Ÿ” QA (worker session)"]
        C_O -->|task_pickup| C_GL
        C_O -->|task_pickup dispatches| C_DEV
        C_O -->|task_pickup dispatches| C_QA
    end

    AGENT["Single OpenClaw Agent"]
    AGENT --- A_O
    AGENT --- B_O
    AGENT --- C_O
```

It's the same agent process โ€” but each group chat gives it a different project context. The orchestrator role, the workers, the task queue, and all state are fully isolated per group.

## Task lifecycle

Every task (GitLab issue) moves through a fixed pipeline of label states. Issues are created by the orchestrator agent or by worker sessions โ€” not manually. DevClaw tools handle every transition atomically โ€” label change, state update, audit log, and session management in a single call.

```mermaid
stateDiagram-v2
    [*] --> Planning
    Planning --> ToDo: Ready for development

    ToDo --> Doing: task_pickup (DEV)
    Doing --> ToTest: task_complete (DEV done)

    ToTest --> Testing: task_pickup (QA) or auto-chain
    Testing --> Done: task_complete (QA pass)
    Testing --> ToImprove: task_complete (QA fail)
    Testing --> Refining: task_complete (QA refine)

    ToImprove --> Doing: task_pickup (DEV fix) or auto-chain
    Refining --> ToDo: Human decision

    Done --> [*]
```

### Worker self-reporting

Workers (DEV/QA sub-agent sessions) call `task_complete` directly when they finish โ€” no orchestrator involvement needed for the state transition. Workers can also call `task_create` to file follow-up issues they discover during work.

### Auto-chaining

When a project has `autoChain: true`, `task_complete` automatically dispatches the next step:

- **DEV "done"** โ†’ QA is dispatched immediately (using the qa tier)
- **QA "fail"** โ†’ DEV fix is dispatched immediately (reuses previous DEV tier)
- **QA "pass" / "refine"** โ†’ no chaining (pipeline done or needs human input)

When `autoChain` is false, `task_complete` returns a `nextAction` hint for the orchestrator to act on.

## Session reuse

Worker sessions are expensive to start โ€” each new spawn requires the session to read the full codebase (~50K tokens). DevClaw maintains **separate sessions per tier per role** (session-per-tier design). When a medior dev finishes task A and picks up task B on the same project, the plugin detects the existing session and sends the task directly โ€” no new session needed.

The plugin handles session dispatch internally via OpenClaw CLI. The orchestrator agent never calls `sessions_spawn` or `sessions_send` โ€” it just calls `task_pickup` and the plugin does the rest.

```mermaid
sequenceDiagram
    participant O as Orchestrator
    participant DC as DevClaw Plugin
    participant GL as GitLab
    participant S as Worker Session

    O->>DC: task_pickup({ issueId: 42, role: "dev" })
    DC->>GL: Fetch issue, verify label
    DC->>DC: Assign tier (junior/medior/senior)
    DC->>DC: Check existing session for assigned tier
    DC->>GL: Transition label (To Do โ†’ Doing)
    DC->>S: Dispatch task via CLI (create or reuse session)
    DC->>DC: Update projects.json, write audit log
    DC-->>O: { success: true, announcement: "๐Ÿ”ง DEV (medior) picking up #42" }
```

## Developer assignment

The orchestrator LLM evaluates each issue's title, description, and labels to assign the appropriate developer tier, then passes it to `task_pickup` via the `model` parameter. This gives the LLM full context for the decision โ€” it can weigh factors like codebase familiarity, task dependencies, and recent failure history that keyword matching would miss.

The keyword heuristic in `model-selector.ts` serves as a **fallback only**, used when the orchestrator omits the `model` parameter.

| Tier   | Role                | When                                                        |
| ------ | ------------------- | ----------------------------------------------------------- |
| junior | Junior developer    | Typos, CSS, renames, copy changes                           |
| medior | Mid-level developer | Features, bug fixes, multi-file changes                     |
| senior | Senior developer    | Architecture, migrations, security, system-wide refactoring |
| qa     | QA engineer         | All QA tasks (code review, test validation)                 |

## State management

All project state lives in a single `memory/projects.json` file in the orchestrator's workspace, keyed by Telegram group ID:

```json
{
  "projects": {
    "-1234567890": {
      "name": "my-webapp",
      "repo": "~/git/my-webapp",
      "groupName": "Dev - My Webapp",
      "baseBranch": "development",
      "autoChain": true,
      "dev": {
        "active": false,
        "issueId": null,
        "model": "medior",
        "sessions": {
          "junior": "agent:orchestrator:subagent:a9e4d078-...",
          "medior": "agent:orchestrator:subagent:b3f5c912-...",
          "senior": null
        }
      },
      "qa": {
        "active": false,
        "issueId": null,
        "model": "qa",
        "sessions": {
          "qa": "agent:orchestrator:subagent:18707821-..."
        }
      }
    }
  }
}
```

Key design decisions:

- **Session-per-tier** โ€” each tier gets its own worker session, accumulating context independently. Tier selection maps directly to a session key.
- **Sessions preserved on completion** โ€” when a worker completes a task, `sessions` map is **preserved** (only `active` and `issueId` are cleared). This enables session reuse on the next pickup.
- **Plugin-controlled dispatch** โ€” the plugin creates and dispatches to sessions via OpenClaw CLI (`sessions.patch` + `openclaw agent`). The orchestrator agent never calls `sessions_spawn` or `sessions_send`.
- **Sessions persist indefinitely** โ€” no auto-cleanup. `session_health` han
tools

Comments

Sign in to leave a comment

Loading comments...