IMPLEMENTATION PLAYBOOK
Final Tech Plan
14 Tools
Apple M4 Pro · 64 GB
macOS · Ollama-first
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
Local Ollama Model Stack
Apple M4 Pro · 64 GB unified memory · Budget: model file ≤38–45 GB
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 Type | Tools |
|---|---|
| Native MCP client | Claude Code, Cline, Crush, Amp, Droid, Vibe Kanban |
| Inherited from host CLI | Claw-Kanban, Claw-Empire, NanoClaw |
| Bridge adapter needed | Aider (CLI wrapper), Plandex (context inject), Pi (extension), OpenClaw (skill), KaibanJS (JS adapter) |
| Not practical | AgentsBoard (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:
- Channel message → look up slack-project-map.yml → route to project
- DM / Group DM → parse
project:<name>→ route - Board mention (@claw-kanban) → route to board API
- Tool mention (
tool:aider) → spawn CLI agent - Thread continuity → channel_id + thread_ts → session in SQLite
- 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 Makefile1
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, ttydmake installClone/scaffold all 14 toolsmake ollama-setupPull recommended local modelsmake memory-setupInstall SharedContext MCPmake slack-setupApply Slack app manifestmake mattermost-setupStart MM + create bot/channelsRun / Test Commands
make startLaunch everythingmake statusRunning services + portsmake ttyd-upLaunch 8 ttyd instancesmake dashboard-upExpress dashboard on :4000make testAll smoke + routing + integrationmake memory-statusFact count per namespace, DB sizeKey Design Decisions & Risks
| Decision | Rationale |
|---|---|
| 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 installed | Complementary 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-layer | AGENTS.md is universally readable (12/14 tools). SharedContext handles high-frequency dynamic facts. Neither alone is sufficient. |
24 Acceptance Criteria
Core (1–4)
- make check-prereqs passes (Node ≥22.16.0)
- make install completes without manual intervention
- make start runs all 14 tools + bridges + Ollama + dashboard
- Dashboard shows health grid with working links at :4000
Boards + Agents (5–10)
- Claw-Kanban responds on port 4011
- Claw-Empire responds on 4018, CLI agent detected
- All 7 boards pass boot tests on assigned ports
- Each CLI agent responds to a trivial prompt
- Droid, Pi, Aider, Crush, Plandex respond via Ollama
- Amp responds via Sourcegraph free tier
Comms + Memory (11–24)
- Slack channel messages route to correct project
- Slack DMs route via project:<name> prefix
- Thread context preserved across follow-ups
- Mattermost starts on :4020, bot created
- Agent-bus broadcasts to all subscribed tools
- SharedContext MCP starts, memory.db created
- Cross-tool memory: Claude stores → Crush recalls
- Namespace isolation verified
- Claw-Kanban spawned agent inherits SharedContext
- AGENTS.md exists with all required sections
- /api/health returns all services status
- ttyd iframes are interactive in dashboard
- Health grid auto-refreshes every 10s
- make test passes all smoke, routing, integration, memory