SYSTEM VISION

Deploy 14 agent orchestration tools on a single machine — 7 boards, 7 CLI agents/harnesses — unified by a Slack/Mattermost communication layer, a shared memory system (SharedContext MCP + AGENTS.md), a local Ollama inference server, and a live dashboard with embedded terminal agents via ttyd. Every tool that discovers knowledge makes it available to every other tool in the stack.

14-Tool Inventory
7 orchestration boards + 7 CLI agents/harnesses on a single Apple M4 Pro machine
7 Orchestration Boards
#ToolPortPurposeOllamaMCP
1Claw-Kanban4011Lightweight task dispatch via # directivesInheritedT1 native
2Claw-Empire4018Strategic orchestration via $ CEO directivesNativeT1 native
3Vibe Kanban4012Worktree-isolated parallel devNoNative
4KaibanJS4013JS-native agent workflowsIndirect (proxy)Native
5AgentsBoard4014Jira-like AI task boardNoAPI-only
6OpenClaw4015Multi-provider messaging bridgeNativeBridge
7NanoClaw4016Secure containerized agents (Claude-only)NoT2 Claude.md
7 CLI Agents & Harnesses
#Toolttyd PortRoleOllama
8Droid7687Terminal coding agent (Factory.ai)Native BYOK
9Pi7688Minimal OSS coding agent toolkitNative ext
10Aider7682Git-native pair programmerNative
11Cline7683Autonomous plan-and-execute agentCloud API only
12Crush7684Glamorous terminal agent (LSP, MCP)Indirect (openai-compat)
13Plandex7685Large-task planner with diff sandboxSelf-host
14Amp7686Frontier coding agent (cloud-only)Not available
Local Ollama Model Stack
Apple M4 Pro · 64 GB unified memory · Budget: model file ≤38–45 GB
ModelSizeSpeedRole
qwen3-coder:30b 19 GB ~64 tok/s Default coding All tools
qwen3:32b ~20 GB ~15–22 tok/s General reasoning, planning
deepseek-r1:14b ~9 GB Fast Quick feedback, sanity checks
qwen2.5-coder:32b ~20 GB ~15 tok/s Cline local profile
devstral:24b ~15 GB ~20 tok/s Plandex secondary
Model Profiles (config/model-profiles.yml)
balanced
primary: qwen3-coder:30b · fallback: deepseek-r1:14b
fast
primary: qwen3:8b · fallback: deepseek-r1:8b
quality_local
primary: qwen2.5-coder:32b · fallback: qwen3-coder:30b
plandex_local
primary: qwen3:32b · fallback: devstral:24b
DO NOT RUN on M4 Pro: qwen3-coder:480b, deepseek-r1:70b, gpt-oss:120b — these exceed the 38–45 GB model budget.
Memory Architecture
Two complementary layers: AGENTS.md (declarative) + SharedContext MCP (dynamic, encrypted)
AGENTS.md (Filesystem)
Declarative, low-churn · Read by 12/14 tools
  • Project conventions + code style
  • Routing directives (# and $ patterns)
  • Active constraints + merge freezes
  • Cross-agent handoff notes
  • Tool-specific sections per agent
Location
project root / AGENTS.md
SharedContext MCP (SQLite)
Dynamic, structured · Read by 9/14 tools · AES-256-GCM encrypted
  • Semantic fact search across sessions
  • Conversation handoff between tools
  • Namespace-scoped isolation
  • High-frequency dynamic facts
MCP Tools Exposed
store_fact recall_facts list_facts delete_fact store_conversation recall_conversation
Memory Namespaces
project:<name>
Bug patterns, arch decisions
tool:<name>
Tool-specific preferences
global
Cross-project conventions
session:<id>
Conversation history for handoff
slack:<channel>
Thread context
MCP Connectivity by Tool
Connection TypeTools
Native MCP clientClaude Code, Cline, Crush, Amp, Droid, Vibe Kanban
Inherited from host CLIClaw-Kanban, Claw-Empire, NanoClaw
Bridge adapter neededAider (CLI wrapper), Plandex (context inject), Pi (extension), OpenClaw (skill), KaibanJS (JS adapter)
Not practicalAgentsBoard (API-only, no extension system)
Communication Layer
Slack (human ↔ bot) + Mattermost (bot ↔ bot) dual-channel architecture
Slack Bridge (Primary)
@slack/bolt · Socket Mode (no ngrok) · Port 4010 · SQLite thread persistence
Routing Rules:
  1. Channel message → look up slack-project-map.yml → route to project
  2. DM / Group DM → parse project:<name> → route
  3. Board mention (@claw-kanban) → route to board API
  4. Tool mention (tool:aider) → spawn CLI agent
  5. Thread continuity → channel_id + thread_ts → session in SQLite
  6. Fallback → help message listing all projects and boards
Bot scopes: chat:write, channels:history, groups:history, im:history, mpim:history · Safety: ignore bots, rate-limit 10 req/min/channel
Mattermost (Secondary · Bot ↔ Bot)
Team Edition in Docker + Postgres · Port 4020 · Bridge port 4021
Channel Layout:
#agent-bus
Inter-agent broadcast (all 14 tools)
#tool-claude, #tool-aider, etc.
Per-tool activity channels
#project-<name>
Per-project cross-tool coordination
POST /agent-bus
{ from_tool, message, project, priority } → broadcasts to #agent-bus
6-Phase Implementation Sequence
Run make <target> at each step — all phases scripted in the Makefile
1
Prerequisites
  • Node.js ≥22.16.0 (OpenClaw enforces)
  • pnpm, npx, python3, pip, git, docker, ttyd
  • All CLI agents: claude, aider, cline, crush, plandex, amp, droid
  • Ollama: ollama --version
  • Smoke test each CLI: <tool> --version
2
Install Tools
  • Clone all 7 boards (git clone → pnpm install)
  • Pin Claw-Empire v2.0.4, OpenClaw 2026.3.13
  • Install CLI harnesses (pip, npm, brew, curl)
  • Ollama: pull qwen3-coder:30b (19 GB), qwen3:32b, deepseek-r1:14b
  • Slack bridge: Bolt for JS + SQLite
3
Shared Memory
  • Clone SharedContext MCP → npm install → build
  • Generate recovery phrase → .env SHARED_MEMORY_RECOVERY_PHRASE
  • Configure MCP-native tools (Claude, Crush, Droid, Amp, Cline, Vibe)
  • Set up bridge adapters for Aider, Plandex, Pi
  • Create AGENTS.md template + sync script
4
Mattermost
  • docker-compose.yml (Team Edition + Postgres)
  • make mattermost-up → start containers
  • setup-mattermost.sh → admin + agent-hub bot + channels
  • Create mattermost-bridge/app.js (webhook router)
  • Configure outgoing webhook → bridge
5
Dashboard & Terminals
  • brew install ttyd
  • Express dashboard: launcher/server.js on :4000
  • Health grid: card per service, auto-refresh 10s, green/red badge
  • make ttyd-up → 8 ttyd instances (ports 7681–7688)
  • Embedded terminal iframes for all 8 CLI agents
6
Tests
  • Smoke: CLI version checks + provider adapters
  • Service boot: verify all ports 4010–4018, 7681–7688
  • Slack routing: channel → project, DM, thread continuity
  • Integration: cross-tool memory (Claude stores → Crush recalls)
  • Failure paths: missing keys, port conflicts, Docker unavailable
Key Makefile Commands
Setup Commands
make check-prereqsNode, CLIs, docker, ollama, ttyd
make installClone/scaffold all 14 tools
make ollama-setupPull recommended local models
make memory-setupInstall SharedContext MCP
make slack-setupApply Slack app manifest
make mattermost-setupStart MM + create bot/channels
Run / Test Commands
make startLaunch everything
make statusRunning services + ports
make ttyd-upLaunch 8 ttyd instances
make dashboard-upExpress dashboard on :4000
make testAll smoke + routing + integration
make memory-statusFact count per namespace, DB size
Key Design Decisions & Risks
DecisionRationale
Bolt bridge is primary Slack entry (not OpenClaw)OpenClaw daily releases can break routing. Bolt bridge is stable, single-purpose. OpenClaw's Slack adapter is optional complement.
Both Claw-Kanban AND Claw-Empire installedComplementary roles: Kanban = fast CLI dispatch, Empire = full orchestration with API/OAuth/messenger.
SharedContext MCP (not OpenMemory)SQLite-based, no Docker dependency, encrypted, lightweight. OpenMemory requires Postgres + Qdrant.
ttyd (not xterm.js + custom backend)Zero-code, one command per agent, embeddable iframe. xterm.js requires writing WebSocket/PTY server.
Node ≥22.16.0 (not ≥18)OpenClaw enforces at startup. Required.
AGENTS.md + SharedContext dual-layerAGENTS.md is universally readable (12/14 tools). SharedContext handles high-frequency dynamic facts. Neither alone is sufficient.
24 Acceptance Criteria
Core (1–4)
  1. make check-prereqs passes (Node ≥22.16.0)
  2. make install completes without manual intervention
  3. make start runs all 14 tools + bridges + Ollama + dashboard
  4. Dashboard shows health grid with working links at :4000
Boards + Agents (5–10)
  1. Claw-Kanban responds on port 4011
  2. Claw-Empire responds on 4018, CLI agent detected
  3. All 7 boards pass boot tests on assigned ports
  4. Each CLI agent responds to a trivial prompt
  5. Droid, Pi, Aider, Crush, Plandex respond via Ollama
  6. Amp responds via Sourcegraph free tier
Comms + Memory (11–24)
  1. Slack channel messages route to correct project
  2. Slack DMs route via project:<name> prefix
  3. Thread context preserved across follow-ups
  4. Mattermost starts on :4020, bot created
  5. Agent-bus broadcasts to all subscribed tools
  6. SharedContext MCP starts, memory.db created
  7. Cross-tool memory: Claude stores → Crush recalls
  8. Namespace isolation verified
  9. Claw-Kanban spawned agent inherits SharedContext
  10. AGENTS.md exists with all required sections
  11. /api/health returns all services status
  12. ttyd iframes are interactive in dashboard
  13. Health grid auto-refreshes every 10s
  14. make test passes all smoke, routing, integration, memory