# ADR 0007: hive-addons Plugin Architecture **Status**: Implemented **Date**: 2026-02-04 **Memory ID**: 20260204190741-1a2fba44 ## Context We need a plugin/addon system for hive-mcp to enable: 1. Community contributions without core bloat 2. Separating optional features (connectors, generators, importers) 3. Safe experimentation with new capabilities ## Decision ### Separation of Concerns - **hive-mcp (core)**: Protocols, loading mechanism, core features - **hive-addons (separate repo)**: Implementations, community contributions ### IAddon Protocol (in core) ```clojure (defprotocol IAddon (addon-id [this]) (addon-type [this]) ; :connector, :generator, :importer (capabilities [this]) (initialize! [this config]) (tools [this])) ; Returns MCP tool definitions ``` ### Loading Syntax (deps.edn + Doom hybrid) ```clojure {:addons {hive-agi/slack {:git/url "https://github.com/hive-agi/hive-addons" :git/sha "a1b2c3d" :addon/root "connectors/slack"} local/my-addon {:local/root "~/PP/my-addon"}}} ``` ### Addon Types - **connectors**: Bidirectional sync (Slack, GitHub, Notion) - **generators**: Output creation (diagrams, presentations) - **importers**: Input parsing (PDF, docs) - **mcp-bridge**: Proxy to foreign MCP servers (NEW) ## NIH Research Summary | System | Registry | Isolation | Key Insight | |--------|----------|-----------|-------------| | Polylith | deps.edn | In-process | Components + Bases pattern | | Doom Emacs | MELPA + straight.el | In-process | Recipe DSL is expressive | | Terraform | Registry | Subprocess (gRPC) | Protocol versioning | | Babashka Pods | N/A | Subprocess (bencode) | Any language, lightweight | ## Recommendations 1. **Registry**: deps.edn native (git/local/mvn), hive-registry later 2. **Dependencies**: tools.deps breadth-first + peer-dep metadata 3. **Isolation**: In-process for Clojure, Babashka pods for polyglot 4. **Loading**: Dynamic hot-reload, lazy opt-in ## Future: hive-registry MELPA-like registry for discovery and versioning.