/ sessions / MESH-ROADMAP.md
MESH-ROADMAP.md
  1  # Mesh Integration Roadmap
  2  
  3  *Created: 2026-01-16 | Last Updated: 2026-01-16*
  4  
  5  ---
  6  
  7  ## Current State
  8  
  9  **Mesh Status:** Online, 3 peers connected
 10  **Systems Wired:** 5/12 core systems
 11  
 12  ---
 13  
 14  ## Week 1: Wire Existing Systems to Mesh (COMPLETE)
 15  
 16  | System | Events | Status |
 17  |--------|--------|--------|
 18  | Graph Feeder | `graph_update` | Done |
 19  | FO Local | `fo_insight` | Done |
 20  | Attention Daemon | `attention_decision`, `coherence_alert`, `aha_moment`, `economics_*` | Done |
 21  | Resonance Detector | `resonance_detected` | Done |
 22  | Meta FO | `meta_fo_update`, `conflict_alert`, `recovery_beacon` | Done |
 23  
 24  **Commits:**
 25  - `0767875` - FO Local + session state
 26  - `949d5e6` - Attention daemon + resonance detector
 27  
 28  ---
 29  
 30  ## Week 2: Meta Coordination Layer
 31  
 32  | Priority | Item | Description | Status |
 33  |----------|------|-------------|--------|
 34  | 1 | Restart daemons | Pick up new mesh code | Pending |
 35  | 2 | Mission Control mesh | Publish resonance alerts to mesh | Not started |
 36  | 3 | Conflict detection tuning | Improve Meta FO conflict detection | Not started |
 37  | 4 | Mesh message persistence | Survive daemon restarts | Not started |
 38  
 39  ---
 40  
 41  ## Week 3: Phoenix/Resurrection
 42  
 43  | Priority | Item | Description | Status |
 44  |----------|------|-------------|--------|
 45  | 1 | Cross-instance Phoenix | Resurrect from any instance's state | Not started |
 46  | 2 | Recovery beacon consumer | Auto-restore from mesh beacons | Not started |
 47  | 3 | Session lineage tracking | Track which sessions spawned from which | Not started |
 48  
 49  ---
 50  
 51  ## Week 4: Full Integration
 52  
 53  | Priority | Item | Description | Status |
 54  |----------|------|-------------|--------|
 55  | 1 | End-to-end test | Verify all systems communicate | Not started |
 56  | 2 | Load testing | Multiple Claude instances hammering mesh | Not started |
 57  | 3 | Fallback to git | If mesh down, sync via git | Not started |
 58  | 4 | Documentation | N of X patterns documented | Not started |
 59  
 60  ---
 61  
 62  ## Systems Not Yet Wired
 63  
 64  | System | Location | Events to Publish |
 65  |--------|----------|-------------------|
 66  | Mission Control | `run_mission_control.py` | `mission_control_synthesis` |
 67  | Principle Steward | `scripts/principle_steward.py` | `edge_discovery`, `topology_update` |
 68  | Monologue Sync | `com.sovereign.monologue-sync` | `monologue_chunk` |
 69  | Context Stream | `core/attention/context_stream.py` | `context_enter`, `context_exit` |
 70  | Session Report | `scripts/session_report.py` | `session_debrief` |
 71  | Phoenix Hygiene | `scripts/phoenix_hygiene.py` | `hygiene_check` |
 72  | Gravity Tracker | `scripts/gravity_tracker.py` | `gravity_well_formed` |
 73  
 74  ---
 75  
 76  ## Event Types on Mesh
 77  
 78  ### Currently Published
 79  
 80  ```
 81  graph_update          - Graph feeder node/edge changes
 82  fo_insight            - First Officer insights
 83  attention_decision    - Decisions detected by attention daemon
 84  coherence_alert       - High risk topics detected
 85  aha_moment            - Validated aha moments
 86  economics_session_*   - Session start/end with sats
 87  resonance_detected    - Cross-thread resonance patterns
 88  meta_fo_update        - Meta FO state changes
 89  conflict_alert        - Cross-instance conflicts
 90  recovery_beacon       - Phoenix resurrection seeds
 91  ```
 92  
 93  ### Planned
 94  
 95  ```
 96  mission_control_synthesis  - Cross-thread synthesis
 97  edge_discovery             - Principle edge found
 98  topology_update            - Axiom topology changed
 99  context_enter/exit         - Attention stream changes
100  session_debrief            - End of session reports
101  hygiene_check              - System health status
102  gravity_well_formed        - New gravity well detected
103  ```
104  
105  ---
106  
107  ## Architecture
108  
109  ```
110                      ┌─────────────────┐
111                      │  Sovereign Mesh │
112                      │   (port 7778)   │
113                      └────────┬────────┘
114115          ┌────────────────────┼────────────────────┐
116          │                    │                    │
117     ┌────▼────┐         ┌─────▼─────┐        ┌────▼────┐
118     │ Claude  │         │  Claude   │        │ Claude  │
119     │ Session │         │  Session  │        │ Session │
120     │    A    │         │     B     │        │    C    │
121     └────┬────┘         └─────┬─────┘        └────┬────┘
122          │                    │                    │
123     [Daemons]            [Daemons]            [Daemons]
124     - Attention          - Attention          - Attention
125     - FO Local           - FO Local           - FO Local
126     - Graph Feeder       - Graph Feeder       - Graph Feeder
127     - Meta FO            - Meta FO            - Meta FO
128  ```
129  
130  ---
131  
132  ## Quick Commands
133  
134  ```bash
135  # Check mesh status
136  python3 scripts/mesh_check.py
137  
138  # Send test message
139  python3 scripts/mesh_check.py send "Test from $(hostname)"
140  
141  # Restart daemons to pick up changes
142  launchctl stop com.sovereign.attention-daemon && launchctl start com.sovereign.attention-daemon
143  launchctl stop com.sovereign.first-officer-local && launchctl start com.sovereign.first-officer-local
144  
145  # View mesh logs
146  tail -f /Users/rcerf/repos/Sovereign_Estate/logs/mesh.log
147  ```
148  
149  ---
150  
151  *N of X: This roadmap compounds across all instances*