🜂 MOON WITNESSING — EVENT FLOW & THING BOXES
# 🜂 MOON WITNESSING — EVENT FLOW & THING BOXES
## Overview
Data flows continuously.
Not all flow is kept. We choose what to witness.
A **Moon** is: > a captured event from a live stream, made persistent as a Thing.
---
## 🜁 Core Principle
> Ephemeral reality → selective capture → persistent memory
All systems emit events: - commands - state transitions - deploys - connections - rolls - actions
These are not different kinds of things.
They are: > **events in a stream**
---
## 🜃 Event Model
An event is:
- timestamp - type - context - participants (optional) - outcome (optional) - measurements (optional) - tags (optional)
### Examples
#### System Event ```yaml type: "ring.promoted" thing: "boot-new-feature" duration_ms: 128 actor: "hex" ```
#### Dice Roll ```yaml type: "dice.rolled" roller: "player-1" die: "d20" result: 17 modifier: +2 context: "combat" ```
#### Command Event ```yaml type: "command.invoked" command: "▲ ring swap" args: ["boot-v2", "cosmostack-config", "candidate-B"] ```
---
## 🜄 Layers of Capture
### 1. Ephemeral Flow - live only - not persisted - used for streaming / logs
---
### 2. Moon Things Persisted when: - significant - state-changing - narratively relevant - historically useful
Examples: - ring promoted - deploy completed - branch created - critical dice roll - player joined
---
### 3. Thing Boxes (Buckets)
A Thing Box is: > a container of related Moon events
Examples: - session box (all events in a session) - deploy box (all events in a deploy window) - party box (all rolls/actions for a party) - command box (operator activity)
---
## 🜅 System Architecture
### Event Source - `tracing` (Rust) - emits structured events
### Numeric Layer - `metrics` - counts, durations, gauges
### Moon Layer - custom transformation - selects events → creates Moon Things
### Storage - Moon Things persisted in Things DB - optionally grouped into Thing Boxes
---
## 🜆 Classification
Not all events become Moons.
### Ephemeral - high-frequency noise - internal steps
### Moon-worthy - meaningful transitions - important outcomes - rare or significant events
### Aggregated - collected into Boxes for analysis
---
## 🜇 The Bucket Model
> The system is a river. > We place buckets where it matters.
- tracing = river - metrics = gauges in the river - Moon layer = selective net - Thing Box = bucket on the bank
---
## 🜈 Multi-Domain Unity
Same mechanism applies to:
- runtime telemetry - command execution - deployment lifecycle - websocket activity - dice rolls - party actions - game sessions
> One flow. Many event types.
---
## 🜉 Observability → Ontology
Traditional systems: - observe → dashboard
Portal: - observe → **becomes part of the world**
Events are not just seen. They are: > **remembered as Things**
---
## 🜊 Final Principle
> Not everything should be stored. > But what is stored becomes history.