---
mode: subagent
---

<!-- SPDX-License-Identifier: MIT -->
<!-- SPDX-FileCopyrightText: 2025-2026 Marcus Quinn -->

# t1327.6: Matterbridge Integration

## Origin

- **Created:** 2026-02-25
- **Session:** opencode:t1327.6-matterbridge-integration
- **Created by:** AI (auto-dispatch from t1327 plan)
- **Conversation context:** Part of t1327 SimpleX Chat agent series. This subtask adds Matterbridge integration to bridge SimpleX to Matrix and 40+ other platforms via matterbridge-simplex adapter.

## What

Enhance the existing `matterbridge.md` subagent doc and `matterbridge-helper.sh` script with:

1. **SimpleX-Matrix bridge documentation** via matterbridge-simplex adapter
2. **Docker Compose deployment template** for the 3-container stack (simplex-cli, matterbridge, node-app)
3. **Bidirectional message flow** documentation and configuration
4. **Privacy gradient** documentation — users choose their preferred privacy level
5. **Helper script enhancements** — `simplex-bridge` subcommand for managing the SimpleX adapter
6. **Config templates** — matterbridge.toml for SimpleX-Matrix bridging

## Why

Matterbridge enables unified messaging across 40+ platforms. The SimpleX adapter (matterbridge-simplex) bridges SimpleX's zero-knowledge messaging to Matrix, Telegram, Discord, Slack, IRC, etc. This creates a **privacy gradient** where users choose their preferred client while staying in the same conversation. Critical for the supervisor communications layer — agents and humans can communicate across platforms without forcing everyone onto one tool.

## How (Approach)

### Files to Modify

| File | Action | Purpose |
|------|--------|---------|
| `.agents/services/communications/matterbridge.md` | Enhance | Add SimpleX bridge section, Docker deployment, privacy gradient |
| `.agents/scripts/matterbridge-helper.sh` | Enhance | Add simplex-bridge, docker-up, docker-down subcommands |
| `.agents/configs/matterbridge-simplex-compose.yml` | Create | Docker Compose template for 3-container stack |
| `.agents/configs/matterbridge-simplex.toml.example` | Create | Config template for SimpleX-Matrix bridging |
| `todo/tasks/t1327.6-matterbridge-brief.md` | Create | This brief |

### Reference

- [matterbridge-simplex](https://github.com/UnkwUsr/matterbridge-simplex) — Node.js adapter (MIT)
- [matterbridge](https://github.com/42wim/matterbridge) — 40+ platform bridge (Apache-2.0)
- Existing `matterbridge.md` and `matterbridge-helper.sh` patterns

## Acceptance Criteria

- [ ] `matterbridge.md` documents SimpleX-Matrix bridge setup with Docker Compose
- [ ] `matterbridge.md` documents bidirectional message flow architecture
- [ ] `matterbridge.md` documents privacy gradient (SimpleX vs Matrix vs others)
- [ ] `matterbridge-helper.sh` has `simplex-bridge` subcommand for adapter management
- [ ] Docker Compose template exists for 3-container deployment
- [ ] Config template exists for SimpleX-Matrix bridging
- [ ] ShellCheck clean on helper script
- [ ] Markdown lint clean on docs

## Dependencies

- **Blocked by:** t1327.3 (simplex-helper.sh — for SimpleX CLI management)
- **Blocks:** t1327.11 (integration testing)
