Skip to content

feat: implement complete MCP tool suite (53 tools, 190+ tests)#1

Merged
jflowers merged 1 commit intomainfrom
001-go-rewrite-phases
Apr 5, 2026
Merged

feat: implement complete MCP tool suite (53 tools, 190+ tests)#1
jflowers merged 1 commit intomainfrom
001-go-rewrite-phases

Conversation

@jflowers
Copy link
Copy Markdown
Contributor

@jflowers jflowers commented Apr 5, 2026

Summary

Complete Go implementation of cyborg-swarm's multi-agent coordination tools across 5 phases.

Phase 1: Hive + Swarm Mail (US1 + US2)

  • 7 new hive tools: hive_create_epic, hive_query, hive_start, hive_ready, hive_sync, hive_session_start, hive_session_end
  • 10 swarm mail tools: swarmmail_init, swarmmail_send, swarmmail_inbox, swarmmail_read_message, swarmmail_reserve, swarmmail_release, swarmmail_release_all, swarmmail_release_agent, swarmmail_ack, swarmmail_health
  • 3 new DB tables: sessions, messages, reservations

Phase 2: Swarm Orchestration (US3)

  • 24 swarm tools: decomposition, spawning, worktrees, progress, review, insights
  • Git worktree operations (create, merge, cleanup, list) via os/exec

Phase 3: Memory (US4)

  • 8 memory tools: 2 Dewey proxy (hivemind_store, hivemind_find) + 6 deprecated stubs

Phase 4: CLI (US5)

  • 4 new commands: doctor, stats, query, setup

Phase 5: Parity Testing (US6)

  • Shape comparison engine validates JSON response shapes
  • 20/20 tool fixtures match TypeScript cyborg-swarm responses

Metrics

Metric Value
MCP tools 53 (11 hive + 10 swarmmail + 24 swarm + 8 memory)
Tests 190+ across 12 packages
Binary size 15MB
Runtime deps 0
CLI commands 7
DB tables 7
Parity match 20/20 (100%)

Phases 1-5 of the Go rewrite of cyborg-swarm:

Phase 1 -- Hive + Swarm Mail:
- 7 new hive tools (epic, query, start, ready, sync, sessions)
- 10 swarm mail tools (init, send, inbox, reserve, release, ack)
- 3 new DB tables (sessions, messages, reservations)

Phase 2 -- Swarm Orchestration:
- 24 swarm tools (decompose, spawn, worktree, review, insights)
- Git worktree operations via os/exec
- Prompt generators for decomposition, review, and evaluation

Phase 3 -- Memory:
- 8 memory tools (2 Dewey proxy + 6 deprecated stubs)
- HTTP proxy client with structured DEWEY_UNAVAILABLE errors

Phase 4 -- CLI:
- doctor, stats, query, setup commands
- Preset SQL analytics queries

Phase 5 -- Parity Testing:
- Shape comparison engine for JSON response validation
- 20/20 tool fixtures match TypeScript response shapes

Code review fixes:
- Check DB error returns in swarm completion paths
- Delete dead SQL injection code (joinStringsSQL)
- Fix inbox LIKE query to use json_each() for exact matching
- Use errors.Is(err, sql.ErrNoRows) idiomatically
- Implement ready filter in hive_cells query
- Pass build-time version to MCP server
- Accept project_path in hive_sync tool

53 tools | 190+ tests | 15MB binary | zero runtime deps
@jflowers jflowers merged commit 8c1caf6 into main Apr 5, 2026
1 check passed
@jflowers jflowers deleted the 001-go-rewrite-phases branch April 5, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant