Grand Diomande Research · Full HTML Reader

METAMORPHOSIS: Unified Agent OS — Summary Report

| System | Current State | UAOS Role | |---|---|---| | **Pulse v3** | `dual_runner.py` + MCP server + session JSONs | Development engine — executes autonomous dev sessions | | **Heartbeat v2** | `HEARTBEAT.md` + state JSON + main agent polling | Monitoring layer — periodic checks, alerts, proactive work | | **Dream Weaver / Noosphere** | `incubator.py` + `noosphere.py` + daemon + MCP + GitHub Actions engine | Incubation engine — idea exploration, evolution, emergence | | **Cadence** | `cadence_bridge.py` + governan

Agents That Account for Themselves technical note experiment writeup candidate score 24 .md

Full Public Reader

METAMORPHOSIS: Unified Agent OS — Summary Report

> Dream ID: dream_202601291857_a242e7
> Status: ✅ Design Complete
> Date: 2025-02-09

---

What Was Designed

A Unified Agent OS (UAOS) that merges four currently separate systems into one cohesive platform:

SystemCurrent StateUAOS Role
Pulse v3`dual_runner.py` + MCP server + session JSONsDevelopment engine — executes autonomous dev sessions
Heartbeat v2`HEARTBEAT.md` + state JSON + main agent pollingMonitoring layer — periodic checks, alerts, proactive work
Dream Weaver / Noosphere`incubator.py` + `noosphere.py` + daemon + MCP + GitHub Actions engineIncubation engine — idea exploration, evolution, emergence
Cadence`cadence_bridge.py` + governance markdown + Supabase syncOrchestration layer — multi-agent coordination, priority routing

---

Key Design Decisions

### 1. SQLite as the Unified State Store
Instead of scattered JSON files (`sessions/*.json`, `dreams.json`, `heartbeat-state.json`) and ad-hoc bridges (`noosphere_bridge.py`), a single SQLite database (`[home-path]`) holds all state. JSON blobs are used for subsystem-specific fields to maintain flexibility.

### 2. Event Bus Over File Watching
Systems currently discover each other's state by reading files. UAOS introduces an event bus with defined topics (`pulse.iteration.completed`, `dream.emerged`, `heartbeat.alert`, etc.). Cross-system reactions are registered as event listeners, not embedded in each system's code.

### 3. Formal Handoff Protocol
The dream-to-Pulse metamorphosis flow is currently manual. UAOS formalizes it with a `handoffs` table that tracks the full lifecycle: `pending → accepted → in_progress → completed`. Cadence can optionally gate handoffs through priority evaluation.

### 4. Unified Daemon
The Dream Weaver daemon runs alone today. UAOS replaces it with a multi-loop async daemon that handles dream evolution, heartbeat checks, event processing, handoff monitoring, and account reset — all in one process.

### 5. Additive Migration
No big-bang cutover. The 9-phase plan starts with a read-only import (Phase 1), moves to dual-writing (Phase 3), then cuts over to single-source-of-truth (Phase 6). Each phase has explicit rollback steps.

---

Deliverables

FileDescriptionLines
`ARCHITECTURE.md`Full architecture: current state analysis, unified design, event topics, handoff protocols, lifecycle model, cross-system learning, MCP unification, daemon design~660
`SHARED_STATE_SCHEMA.md`Complete SQLite schema, SharedContext data class, context builder queries, state sync adapters, data flow diagrams, config schema~750
`INTEGRATION_PLAN.md`9-phase migration plan with steps, rollback procedures, definitions of done, timeline (30 days), risk register, success criteria~600

---

Architecture Highlights

Cross-System Learning Loop

Pulse iterations → keyword extraction → Mycelium sensing → dream connection strengthening
                                                                        ↓
Dreams reach threshold → metamorphosis → enriched Pulse session with full dream context
                                                                        ↓
Pulse completes → artifacts linked back to origin dream → genealogy tracking

### Unified Entity Lifecycle
All entities (sessions, dreams, checks, agents) follow the same lifecycle:
`INCEPTION → ACTIVE → (SUSPENDED | BLOCKED | TRANSFORMED) → COMPLETED | TERMINATED`

Subsystem-specific phases map to this unified model (e.g., Pulse's `running` = `ACTIVE`, Dream Weaver's `metamorphosed` = `TRANSFORMED`).

### SharedContext
A single object any subsystem can query to understand the full system state — active sessions, gestating dreams, recent alerts, pending messages, hot keywords, account usage, and active handoffs. This replaces the ad-hoc state reading each system does today.

---

What This Enables

1. Dream → Code pipeline: A fuzzy idea incubates in Dream Weaver, emerges with a synthesis and recommended approach, and metamorphoses into a fully-contextualized Pulse session — all tracked end-to-end.

2. Cross-pollination at scale: Pulse iteration summaries feed keywords back into Dream Weaver's sensing layer, strengthening connections to related dreams. The system learns from its own work.

3. Intelligent scheduling: Cadence evaluates handoff priority against current Pulse load, account limits, and quiet hours before accepting work.

4. Full observability: Every inter-system interaction is logged as an event. `uaos.lineage` can trace any entity's full history across all systems.

5. Unified tooling: One MCP server, one daemon, one state database. No more bridge scripts.

---

Next Steps

1. Review this design with the human for feedback on priorities and scope
2. Phase 0 can start immediately — it's zero-risk (just creates files)
3. The critical path is Phase 0 → 1 → 3 → 4 → 5 → 6 (the state migration)
4. Phases 7 (enriched spawn) and 8 (Cadence) can run in parallel with 5-6
5. Consider whether to auto-accept metamorphosis handoffs or require human approval

---

This design preserves every existing capability while creating the connective tissue that turns four autonomous systems into one intelligent agent platform.

Promotion Decision

Attach run IDs, datasets, metrics, and reproduction commands.

Source Anchor

projects/dream-metamorphosis/unified-agent-os/SUMMARY.md

Detected Structure

Method · Evaluation · Code Anchors · Architecture