# hierarchical-coordinator

hierarchical-coordinator — a coordinator subagent that splits a job into sub-tasks and hands them to worker agents through the claude-flow MCP server. Fits work that runs top-down.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 850 repo stars
- Author: ruvnet
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ruvnet/agentic-flow/tree/HEAD/agentic-flow/.claude/agents/swarm/hierarchical-coordinator.md
- Updated: 2026-10-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/hierarchical-coordinator

## What it does

This one sits at the top of a small hierarchy. It reads the task, cuts it into work packages, and spawns a worker for each: researcher, coder, analyst, tester. Spawning goes through `mcp__claude-flow__agent_spawn` with a capability list.

Two hooks wrap the run. The pre hook calls `mcp__claude-flow__swarm_init hierarchical --maxAgents=10 --strategy=adaptive`, saves coordination state to memory and starts monitoring at an interval of 5000. The post hook writes a detailed performance report, then runs `coordination_sync` to clean up.

Both hooks call `mcp__claude-flow__*` tools, so the claude-flow MCP server has to be connected first. Without it you get a markdown prompt full of dead calls. A separate path uses `AttentionService` from `agentdb` with hyperbolic attention and a queen weight of 1.5; that one needs the `agentdb` package installed.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/hierarchical-coordinator.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/hierarchical-coordinator.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/hierarchical-coordinator.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ruvnet/agentic-flow/tree/HEAD/agentic-flow/.claude/agents/swarm/hierarchical-coordinator.md

## When to use it
- break a large feature into sub-tasks and route them to the right worker
- run a swarm capped at 10 agents
- watch swarm state on a 5000 interval
- pull a performance report once the run ends
- settle clashing edits between a coder and a tester worker

## Example prompts
- Use hierarchical-coordinator to split this migration into sub-tasks and hand them to workers.
- Run the refactor through hierarchical-coordinator with no more than 10 agents.
- After the test run, have hierarchical-coordinator pull the swarm performance report.

## Similar
- [swarm-advanced](https://affpapa.org/en/nevibecode/skills/swarm-advanced.md) — skill · 1200 installs
- [performance-analysis](https://affpapa.org/en/nevibecode/skills/performance-analysis.md) — skill · 1200 installs
- [research-coordinator](https://affpapa.org/en/nevibecode/agents/research-coordinator.md) — subagent · 1673 installs
- [swarm](https://affpapa.org/en/nevibecode/skills/backnotprop-swarm.md) — skill · 10300 installs
- [agile-coordinator](https://affpapa.org/en/nevibecode/skills/agile-coordinator.md) — skill · 341 installs
- [gitea-coordinator](https://affpapa.org/en/nevibecode/skills/gitea-coordinator.md) — skill · 321 installs

From the same set: [ruvnet/agentic-flow](https://affpapa.org/en/nevibecode/by/ruvnet/agentic-flow.md) — 76 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
