[EPIC] Mosaic Component Architecture #162

Closed
opened 2026-02-01 07:23:20 +00:00 by jason.woltje · 0 comments
Owner

Overview

Implement the Mosaic Component Architecture - the execution infrastructure that wraps OpenClaw with Mosaic's control layer.

Architecture Document:

Strategic Decision

OpenClaw as execution engine, Mosaic as control layer.

  • Use OpenClaw's 355+ contributor-maintained agent swarm
  • Mosaic provides Guard Rails, Quality Rails, and Job Tracking
  • Wrapper approach now, evaluate after M2

Components

Component Dedicated Function
@mosaic Gitea bot - webhook receiver
mosaic-stitcher Workflow orchestration, job sequencing
mosaic-bridge Chat integrations (Discord/Mattermost/Slack)
mosaic-runner Read-only context gathering
mosaic-weaver Write operations (code implementation)
mosaic-inspector Quality gate validation
mosaic-herald Status reporting, PR comments

Implementation Phases

Phase 1: Core Infrastructure

  • INFRA-001: Add BullMQ dependencies
  • INFRA-002: Database schema for runner_jobs, job_steps, job_events
  • INFRA-003: BullMQ module setup

Phase 2: Stitcher Service

  • INFRA-004: Stitcher module structure
  • INFRA-005: Runner jobs CRUD and queue submission
  • INFRA-006: Job steps tracking
  • INFRA-007: Job events and audit logging

Phase 3: Chat Integration

  • INFRA-008: mosaic-bridge module for Discord
  • INFRA-009: Command parsing (@mosaic fix, status, cancel)
  • INFRA-010: Status updates via herald

Phase 4: Real-time Status

  • INFRA-011: WebSocket gateway for job events
  • INFRA-012: SSE endpoint for CLI consumers

Phase 5: Integration

  • INFRA-013: End-to-end test harness
  • INFRA-014: Integration with M4.1 coordinator

Relationship to M4.1

M4.1 (Non-AI Coordinator) provides orchestration logic - when to assign agents, context monitoring, quality gate enforcement.

M4.2 (This epic) provides execution infrastructure - how jobs run, tracking, OpenClaw integration.

The coordinator uses this infrastructure to dispatch and monitor jobs.

Success Criteria

  • Jobs can be created via API and chat commands
  • Job steps are tracked with granular progress
  • Events are persisted to PostgreSQL audit log
  • Real-time updates via WebSocket
  • Quality gates integrate with existing QualityGate model
## Overview Implement the Mosaic Component Architecture - the execution infrastructure that wraps OpenClaw with Mosaic's control layer. **Architecture Document:** ## Strategic Decision **OpenClaw as execution engine, Mosaic as control layer.** - Use OpenClaw's 355+ contributor-maintained agent swarm - Mosaic provides Guard Rails, Quality Rails, and Job Tracking - Wrapper approach now, evaluate after M2 ## Components | Component | Dedicated Function | |-----------|-------------------| | **@mosaic** | Gitea bot - webhook receiver | | **mosaic-stitcher** | Workflow orchestration, job sequencing | | **mosaic-bridge** | Chat integrations (Discord/Mattermost/Slack) | | **mosaic-runner** | Read-only context gathering | | **mosaic-weaver** | Write operations (code implementation) | | **mosaic-inspector** | Quality gate validation | | **mosaic-herald** | Status reporting, PR comments | ## Implementation Phases ### Phase 1: Core Infrastructure - [ ] INFRA-001: Add BullMQ dependencies - [ ] INFRA-002: Database schema for runner_jobs, job_steps, job_events - [ ] INFRA-003: BullMQ module setup ### Phase 2: Stitcher Service - [ ] INFRA-004: Stitcher module structure - [ ] INFRA-005: Runner jobs CRUD and queue submission - [ ] INFRA-006: Job steps tracking - [ ] INFRA-007: Job events and audit logging ### Phase 3: Chat Integration - [ ] INFRA-008: mosaic-bridge module for Discord - [ ] INFRA-009: Command parsing (@mosaic fix, status, cancel) - [ ] INFRA-010: Status updates via herald ### Phase 4: Real-time Status - [ ] INFRA-011: WebSocket gateway for job events - [ ] INFRA-012: SSE endpoint for CLI consumers ### Phase 5: Integration - [ ] INFRA-013: End-to-end test harness - [ ] INFRA-014: Integration with M4.1 coordinator ## Relationship to M4.1 M4.1 (Non-AI Coordinator) provides **orchestration logic** - when to assign agents, context monitoring, quality gate enforcement. M4.2 (This epic) provides **execution infrastructure** - how jobs run, tracking, OpenClaw integration. The coordinator uses this infrastructure to dispatch and monitor jobs. ## Success Criteria - [ ] Jobs can be created via API and chat commands - [ ] Job steps are tracked with granular progress - [ ] Events are persisted to PostgreSQL audit log - [ ] Real-time updates via WebSocket - [ ] Quality gates integrate with existing QualityGate model
jason.woltje added this to the M4.2-Infrastructure (0.0.4) milestone 2026-02-01 07:23:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#162