Data Flows
How data moves through the 88.pi ecosystem from session start to task completion.
Primary Flow
session_start
│
├─→ load brain (.voyager/brain.md)
│ └─→ BrainManager.load() → inject into system context
│
├─→ recall episodes (similarity search)
│ └─→ MemoryRecall.search() → inject relevant history
│
├─→ load ralph effectiveness matrix
│ └─→ RalphUniversal.getReport() → inject adapter recommendations
│
▼
task received
│
├─→ TaskAnalyzer.analyze(task)
│ └─→ categorize: code | test | refactor | docs | research
│ └─→ complexity: simple | moderate | complex
│ └─→ skill: matched skill from registry
│
├─→ StrategyPlanner.plan(analysis)
│ └─→ RalphUniversal.getRecommendation(category)
│ └─→ select adapter + approach
│ └─→ configure exit strategy
│
├─→ ExecutionRouter.route(plan)
│ ├─→ [simple] → StandaloneRunner.execute()
│ └─→ [complex] → LoopEngine.execute()
│ ├─→ CircuitBreaker.check()
│ ├─→ adapter call → response
│ ├─→ ResponseAnalyzer.analyze(response)
│ ├─→ CircuitBreaker.record(metrics)
│ ├─→ ProgressTracker.stream(event)
│ └─→ repeat until exit
│
├─→ QualityGates.validate(output)
│ └─→ 7-dimension validation
│ └─→ pass → continue | fail → back to loop
│
├─→ SelfReflection.reflect(result)
│ └─→ extract learnings
│ └─→ generate reflections
│
├─→ EpisodeRecorder.record(episode)
│ └─→ SimpleMemBridge.store(episodes, id, data)
│
├─→ RalphUniversal.recordUsage(category, adapter, success)
│ └─→ update effectiveness matrix
│
├─→ BrainManager.update(entry)
│ └─→ append observation + loop status
│
└─→ Bridge.stream(result)
└─→ send to external client via WebSocket/SSEData Types by Stage
| Stage | Data In | Data Out |
|---|---|---|
| Brain Load | .voyager/brain.md | BrainState |
| Episode Recall | query string | Episode[] |
| Task Analysis | task description | TaskAnalysis |
| Strategy Planning | analysis + ralph rec | ExecutionPlan |
| Execution | plan + context | IterationResult[] |
| Quality Gate | output + criteria | ValidationResult |
| Reflection | result + context | Reflection[] |
| Episode Record | all metadata | Episode |
| Ralph Update | category + outcome | Updated matrix |
| Brain Update | observations | Updated brain.md |
| Bridge Stream | final result | Client event |
Stream Events
The bridge streams events to external clients in real-time:
type StreamEvent =
| { type: 'session_start'; sessionId: string }
| { type: 'task_received'; task: string }
| { type: 'plan_created'; plan: ExecutionPlan }
| { type: 'iteration_start'; iteration: number }
| { type: 'iteration_end'; iteration: number; result: IterationResult }
| { type: 'circuit_update'; state: string }
| { type: 'quality_check'; result: ValidationResult }
| { type: 'episode_recorded'; episode: Episode }
| { type: 'session_end'; summary: SessionSummary }Every stage produces observable events. The bridge ensures external clients see the full execution trace, not just the final result. This is the Glass Box principle in action — complete transparency.
Error Flows
When an error occurs mid-flow:
error at any stage
│
├─→ CircuitBreaker.recordError(error)
│ └─→ may trigger circuit open
│
├─→ ResponseAnalyzer.detectStuckLoop(errorHistory)
│ └─→ may trigger stuck signal
│
├─→ bridge.stream({ type: 'error', error })
│
└─→ either:
├─→ retry (loop continues)
├─→ exit (strategy decides)
└─→ circuit open (immediate halt)