Skip to main content
Glama
README.md
# AIWorkHub

<div align="center">
  <img src="docs/assets/aiworkhub-hero.svg" alt="AIWorkHub — an AI manager for coding agents" width="100%">
</div>

<p align="center">
  <strong>An AI manager that runs Claude Code, Codex and Copilot as its workers.</strong><br>
  An open-source control plane for multi-model AI coding agents: it splits a large project into work cards, sends each card to the cheapest model that can do it, reviews every change against tests before it lands in your tree — and it is building AIWorkHub itself.
</p>

**Proof, from this repository's own history:**

- 1,984 commits since 2026-07-20, written through its own task loop
- 347 work cards accepted into its own tree
- 651 times a worker's change was sent back with code-level findings
- 621 independent reviewer passes
- 620 test files, about 262k lines of Python

**What makes it different:**

- Semantic edit: workers change hash-verified line ranges, never rewrite whole files.
- Review loop: mechanical gates and tests run first, then an independent reviewer reads the code; the manager accepts, returns with findings, or blocks — the same turn.

<p align="center">
  <a href="https://github.com/shrec/AIWorkHub/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/shrec/AIWorkHub/actions/workflows/ci.yml/badge.svg"></a>
  <a href="https://shrec.github.io/AIWorkHub/"><img alt="Website" src="https://img.shields.io/badge/website-AIWorkHub-1687e8.svg"></a>
  <a href="https://github.com/shrec/AIWorkHub/releases"><img alt="Release" src="https://img.shields.io/github/v/release/shrec/AIWorkHub?include_prereleases&sort=semver"></a>
  <a href="LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-2dd4bf.svg"></a>
  <img alt="Python 3.12+" src="https://img.shields.io/badge/Python-3.12%2B-38bdf8.svg">
  <img alt="VS Code 1.93+" src="https://img.shields.io/badge/VS%20Code-1.93%2B-0ea5e9.svg">
  <a href="https://glama.ai/mcp/servers/shrec/AIWorkHub"><img alt="AIWorkhub MCP server – quality and maintenance score on Glama" src="https://glama.ai/mcp/servers/shrec/AIWorkHub/badges/score.svg"></a>
  <a href="https://lobehub.com/mcp/shrec-aiworkhub"><img alt="AIWorkHub MCP server rating on LobeHub" src="https://lobehub.com/badge/mcp/shrec-aiworkhub"></a>
</p>

<p align="center">
  <a href="https://glama.ai/mcp/servers/shrec/AIWorkHub"><img alt="AIWorkhub MCP server – quality and maintenance score on Glama" src="https://glama.ai/mcp/servers/shrec/AIWorkHub/badges/card.svg"></a>
  <a href="https://lobehub.com/mcp/shrec-aiworkhub"><img alt="AIWorkHub MCP server on LobeHub" src="https://lobehub.com/badge/mcp-full/shrec-aiworkhub"></a>
</p>

<!-- mcp-name: io.github.shrec/aiworkhub -->

![AIWorkHub task and review loop](docs/assets/demo/aiworkhub-task-review-loop.gif)

## What AIWorkHub is

AIWorkHub is a VS Code extension and an MCP server. You talk to one **manager**
AI. It splits your goal into **task cards** and hands each card to a **worker**
AI (Codex, Claude, Copilot-hosted models, DeepSeek, GLM and others). Nothing
lands in your tree until independent review and measured validation accept it.

Every repository owns its own `.aiworkhub/` state. There is no AIWorkHub cloud
account, and the MCP server speaks stdio only.

## How it works

```mermaid
flowchart LR
    A[Task card] --> B[Isolated worker worktree]
    B --> C[Validation gates]
    C --> D[Reviewer lenses]
    D --> E{Accept or reject}
    E -->|accept| F[Promoted into your tree]
    E -->|reject| G[NeedFix ledger]
    G --> A
```

1. **Card.** The manager writes a bounded card: objective, acceptance criteria,
   dependencies, allowed writes and validation.
2. **Isolated worker.** A worker runs the exact card in its own worktree, with
   Source Graph and repository context. It never finalizes its own work.
3. **Validation gates.** Mechanical checks and the card's declared tests run
   first.
4. **Reviewer lenses.** Independent correctness, security and code-quality
   reviewers read the candidate. One aggregate decision packet reaches the
   manager.
5. **Accept or reject.** The manager promotes verified work, or rejects it with
   exact residual work.
6. **NeedFix ledger.** Findings are tracked as NeedFix records until a verified
   fix resolves them.

### Architecture at a glance

<div align="center">
  <img src="docs/assets/aiworkhub-block-diagram.png" alt="AIWorkHub system architecture block diagram" width="100%">
  <br>
  <em>The complete AIWorkHub control plane, execution, evidence and improvement loop.</em>
</div>

<div align="center">
  <img src="docs/assets/aiworkhub-source-graph-architecture.png" alt="AIWorkHub Source Graph architecture" width="100%">
  <br>
  <em>Incremental Source Graph refresh, index, query, semantic-edit and review-overlay paths.</em>
</div>

## Key features

- **Multi-provider workforce routing.** Cards are routed to models by cost and
  observed outcome: premium models for hard judgment and review, cheaper capable
  models for bounded work.
- **Source Graph.** A repository-local, incrementally refreshed code index
  (including Dart) that gives managers and workers bounded symbol, call, test and
  impact queries instead of broad file scans, across exactly 38 Source Graph
  query modes. The exact-target modes are `file`, `function`, `class`, `body`,
  `bodygrep` and `deps`. Workers change hash-verified line ranges through
  semantic edit, not whole-file rewrites. See the full-resolution
  <a href="site/assets/aiworkhub-source-graph-architecture.svg">Source Graph architecture diagram</a>
  for the complete index and query pipeline.
- **Sandboxed workers.** Worker processes run inside a Windows AppContainer or a
  Linux Landlock sandbox with explicit write scopes.
- **NeedFix on the dashboard.** The dashboard groups NeedFix records by work
  state, so open, in-progress and finished work are visible at a glance.
- **Callback loop.** When a worker reaches review, a durable callback wakes the
  verified manager chat. A callback is a wake-up, not an approval.
- **Release cut.** `scripts/release_cut.py` runs a release as one ordered run
  (version, changelog and README checks, host suite, VSIX package, release commit,
  receipt, tag) and stops at the first failing step.
- **Context that persists.** Session Manager, AI Memory and KB are
  repository-scoped and available to managers and workers.

## Everything AIWorkHub does today

### Manager & task loop
- ✅ **Task cards** — bounded cards with objective, acceptance criteria, dependencies, allowed writes and validation.
- ✅ **Task DAG** — a card runs only after the cards it depends on are finished.
- ✅ **Isolated worktrees** — each worker runs in its own worktree under `.aiworkhub/runtime/`, never in your checkout.
- ✅ **Rework from retained work** — a returned card resumes from its hash-pinned predecessor workspace with bounded feedback.
- ✅ **Concurrency cap** — several workers run at once; `AIWORKHUB_MAX_PROCESSES` caps how many.

### Workers & routing
- ✅ **Claude Code and Codex CLI workers** — logged-in Claude Code and Codex CLIs run cards as shell-free, cancellable processes.
- ✅ **VS Code Language Model bridge** — Copilot-hosted and other models authorized in VS Code work credential-free, also over Remote-SSH.
- ✅ **OpenCode workers** — OpenCode runs cards with only the AIWorkHub worker MCP tools permitted.
- ✅ **DeepSeek and GLM routes** — dedicated adapters route cards to DeepSeek and GLM models.
- ✅ **Cost-aware routing** — cards go to models by cost and observed outcome; premium models get hard judgment and review.
- ✅ **Claude advisor setting** — `aiworkhub.claudeAdvisorModel` (off, opus, sonnet) lets Claude workers consult a stronger model mid-task.

### Review & acceptance
- ✅ **Gates first** — mechanical quality gates and the card's declared tests run before any reviewer reads the change.
- ✅ **Reviewer lenses** — independent correctness, security and code-quality reviewers feed one decision packet.
- ✅ **No blind passes** — a reviewer report without inspection evidence leaves its lens blind, never verified.
- ✅ **Auto-accept lane** — clean low/medium-risk candidates with green gates and zero findings are accepted automatically.
- ✅ **Manager correction** — the manager can land a small exact fix while accepting; a receipt mismatch restores the tree.
- ✅ **Reject with findings** — a candidate goes back to its worker with concrete code-level findings and exact residual work.
- ✅ **Incremental validation reuse** — an accept retry reruns only failed or changed validation rows, keyed by input digest.
- ✅ **Neighbour-test reruns** — tests near the change run at finalization; a red result is compared against the base.

### Sandbox & security
- ✅ **Windows AppContainer** — Windows workers run inside an AppContainer sandbox with explicit write scopes.
- ✅ **Linux Landlock** — Linux workers run under a Landlock sandbox with explicit write scopes.
- ✅ **read_roots and deny_read** — `read_roots` turns the sandbox into a read allow-list; `deny_read` globs hide matching files.
- ✅ **Write scopes** — a worker may change only its card's `allowed_writes`; other paths are refused.
- ✅ **Gated mutations** — writes and launches stay off until `AIWORKHUB_ALLOW_WRITES=1` / `AIWORKHUB_ALLOW_LAUNCH=1`.

### Source Graph & semantic edit
- ✅ **Source Graph index** — a repository-local, incrementally refreshed code index, including Dart and plain-text config files.
- ✅ **38 query modes** — bounded focus, slice, context, calls, trace and more, plus exact `file`, `function`, `class`, `body`, `deps`.
- ✅ **bodygrep** — exact literal search over indexed file bodies, with line numbers.
- ✅ **Change-aware modes** — `diff`, `impact` and `testmap` relate a change to the symbols and tests it touches.
- ✅ **Semantic edit** — workers replace one hash-verified line range at a time instead of rewriting whole files.

### Context
- ✅ **Session Manager, AI Memory and KB** — repository-scoped current state, durable lessons and project docs for every seat.
- ✅ **Write intents** — workers propose context changes; a verified manager accepts or rejects each one.
- ✅ **Manager Context Graph** — opt-in search over prior manager conversations, with range and related lookups.
- ✅ **Two-machine sync** — KB and AI Memory journals merge between machines and converge on identical rows, deletes included.

### NeedFix & roadmap ledgers
- ✅ **NeedFix ledger** — bugs, ideas and risks are tracked as NeedFix records until a verified fix resolves them.
- ✅ **Roadmap registry** — manager-approved outcomes, milestones and dependencies with an append-only event history.
- ✅ **Wave mini-roadmaps** — open a wave per milestone, attach goals and tasks, and read its completion verdict.

### Callbacks & manager mailbox
- ✅ **Durable callbacks** — a deduplicated outbox wakes the verified manager when a worker reaches review.
- ✅ **Claude Code wake-up** — `aiworkhub_claude_callback_wait` / `_ack` long-poll; `manager_callback_watch --follow` streams callbacks.
- ✅ **Manager mailbox** — an inbox-only manager, such as a Codex sidebar chat, reads its callbacks from a manager inbox.
- ✅ **WorkHub Mail** — hubs exchange reports and threaded receipts, with an opt-in LAN transport and pairing.

### VS Code dashboard
- ✅ **Dashboard** — Activity Bar launcher and editor-tab dashboard over the repository's own MCP stdio session; no HTTP port.
- ✅ **Initialize and Preflight** — one idempotent action creates `.aiworkhub/`; Preflight shows which model routes are ready.
- ✅ **Built-in Manager chat** — a dashboard Manager seat that is woken automatically when a worker finishes.
- ✅ **Review, NeedFix and Roadmap views** — inspect evidence, see NeedFix by work state and dependencies in a read-only Roadmap.

### Release tooling
- ✅ **release_cut.py** — version, changelog and README checks, host suite, VSIX, commit, receipt and tag in one ordered run.
- ✅ **WSL suite** — on Windows, the cut also runs the tests in WSL on a git archive of HEAD.
- ✅ **Resumable cuts** — a rerun resumes from the failed test nodes plus what changed since.

### MCP server
- ✅ **stdio MCP server** — stdio only, with separate manager and worker tool surfaces and no cloud account.
- ✅ **uvx and Docker** — run it with `uvx aiworkhub` or from the Docker image, with writes and launches off by default.

## Install and quick start

### VS Code

1. Install **AIWorkHub** from the
   [VS Code Marketplace](https://marketplace.visualstudio.com/search?term=AIWorkHub&target=VSCode),
   or download the VSIX from the latest
   [GitHub release](https://github.com/shrec/AIWorkHub/releases) and run
   `code --install-extension ./aiworkhub-<version>.vsix`.
2. Open a Git repository and run **AIWorkHub: Open Dashboard**.
3. Choose **Initialize AIWorkHub** once. It is explicit and idempotent: it
   creates `.aiworkhub/` and starts the first Source Graph index.
4. Open a **new** Codex, Claude or other MCP-capable chat after initializing, so
   the chat discovers the repository's MCP tools.
5. Describe the outcome you want. The manager creates cards and launches
   workers; you inspect the evidence in **Review** and accept or reject.

The built-in dashboard **Manager** chat and Claude Code are woken automatically
when a worker finishes. A Codex sidebar chat is inbox-only and polls the review
queue itself; see [Callback delivery](docs/CALLBACKS.md#manager-transports).

### Any MCP client

AIWorkHub speaks MCP over stdio, so any MCP client can run it against a
repository.

**Option A: uvx.** Add the server to your client's MCP configuration (until the PyPI package is published, use the release wheel: `"args": ["--from", "/path/to/aiworkhub-<version>-py3-none-any.whl", "aiworkhub"]`):

```json
{
  "mcpServers": {
    "aiworkhub": {
      "command": "uvx",
      "args": ["aiworkhub"],
      "env": {
        "AIWORKHUB_REPO_ROOT": "/path/to/your/repo"
      }
    }
  }
}
```

**Option B: Docker.** Build the image from an AIWorkHub checkout, then run it
from the repository you want managed:

```bash
docker build -t aiworkhub-mcp .
docker run -i --rm -v "$PWD:/workspace/repo" aiworkhub-mcp
```

The image defaults to `AIWORKHUB_REPO_ROOT=/workspace/repo` with writes and
launches off.

Writes and worker launches are off by default. Enable them only in a trusted
manager process with `AIWORKHUB_ALLOW_WRITES=1` and `AIWORKHUB_ALLOW_LAUNCH=1`.
`AIWORKHUB_MAX_PROCESSES` caps concurrent workers. Launched workers never
inherit the manager's launch capability.

## Requirements

- VS Code 1.93 or newer for the extension.
- Python 3.12 or newer for the MCP runtime (the extension packages its own).
- At least one authenticated model route: an editor Language Model provider or a
  logged-in Codex or Claude Code CLI. AIWorkHub does not copy or proxy
  credentials. The Dashboard's Preflight shows which routes are ready.
- Linux, macOS, native Windows, WSL and Remote-SSH are supported; Linux is the
  canonical development and validation host.

## Measured claims and limits

- **semantic-edit-historical-cap-boundary**: historical capped a/b observation at 20k/200k ops shows a 29.329% reduction; this is a capped historical sample, not eligible as a live guarantee.
- **context-bundle-v2-structural-only**: structural-only validation; live fleet remeasurement pending.

## What's new in 0.13.29

- The independent reviewer judges changed lines against the repository's own development rules; `aiworkhub_manager_development_rules` shows, validates and explains that manifest, and manager bootstrap says on first contact whether the repository declares rules and quality checks.
- Source Graph `impact` says whether its caller list is complete (`result_state`, `incomplete_reason`) instead of returning a confident zero.
- The doctor names the repair tool for each `processing` card whose worker died, and SDLC metrics report accepted tasks per hour.
- A dead owner's promotion marker no longer blocks promotion, and stranded callback batches are reclaimed.
- The full release history is in [CHANGELOG.md](CHANGELOG.md).

## Documentation

| Guide | Covers |
| --- | --- |
| [Getting Started](docs/GETTING_STARTED.md) | First run, manager prompts, Remote-SSH, recovery |
| [Architecture](docs/ARCHITECTURE.md) | The whole system and its control loop |
| [Source Graph](docs/SOURCE_GRAPH.md) | Index, query modes and semantic edit |
| [Manager Context Graph](docs/CONTEXT_GRAPH.md) | Opt-in manager conversation evidence |
| [Callbacks](docs/CALLBACKS.md) | Callback delivery per client |
| [Benchmarks](docs/BENCHMARKS.md) | Measured benefits and their limits |
| [Publishing](docs/PUBLISHING.md) | Release channels and owner setup |
| [Roadmap](docs/PRODUCT_ROADMAP.md) | Where the product is going |

Also: [Security policy](SECURITY.md), [Contributing](CONTRIBUTING.md),
[Product site](https://shrec.github.io/AIWorkHub/).

## Development

```bash
python -m pip install -e ".[dev]"
ruff check src/aiworkhub scripts tests
mypy
python -m pytest -q
npm --prefix vscode-extension install
npm --prefix vscode-extension test
```

AIWorkHub is open source under the [MIT License](LICENSE).

TDQS

B3.3/5.0

Scored across 115 tools

Disambiguation3/5

Tools are namespaced by domain (task_, agent_, needfix_, roadmap_, manager_, source_graph_) and most descriptions carry explicit 'use X for Y; use Z for W' routing hints, which rescues a lot. However there is real overlap: claude_callback_wait/ack are declared aliases of manager_callback_wait/ack, and review-queue questions are answered by review_packet, completion_inbox, task_codex_handoff and agent_accept_preview with only subtly different scopes. Recovery/retry paths (agent_retry_finalization, task_retry_terminal, task_recover_blocked_rework, task_reroute_launch_identity, manager_reconcile_dead_processing) are likewise distinguishable only by careful reading.

Naming Consistency4/5

Names are uniformly snake_case with a stable domain prefix and an action or resource suffix (task_create, task_show, needfix_add, needfix_archive, roadmap_link_task). A minority break the verb_noun shape into noun phrases (manager_session_current_state, manager_workforce_catalog, repo_current, task_health), but the convention is still predictable and readable.

Tool Count1/5

115 tools is far beyond what an agent can hold in view and well past the 50+ threshold, even granting the platform covers tasks, agents, needfixes, roadmap, skills, recipes, storage and diagnostics. Many tools are thin variations (aliases, preview/status pairs, single-field dispose/ack operations) that inflate the surface rather than each earning a distinct place.

Completeness4/5

Coverage is unusually deep: full task lifecycle (create, template, amend, launch, accept, reject, retry, reroute, supersede, archive), agent process control, needfix triage-to-conversion, roadmap, KB/AI-memory, skills, recipes, cost and health probes. Minor gaps remain, e.g. skills can be proposed, evidenced and measured but there is no explicit retirement/activation action tool, and reviewer-hold resolution exists without a symmetric list surface.

Maintenance

ActivityActive
ResponsivenessLimited data