Architecture overview
See also: Integration (how projects work together), Projects (individual project details)
How rhi projects are structured and how they relate.
Project landscape
Normalize architecture
Structural code intelligence with three primitives:
Key components:
- Grammar Loader: Dynamic
.soloading for 98 tree-sitter grammars - Skeleton Extractor: AST → structured output (signatures, dependencies, calls)
- File Index: SQLite symbol/call graph with background daemon
- Shadow Git: Hunk-level edit tracking in
.normalize/.git
habitat Architecture
Persistent multiplayer world runtime:
Key components:
- Entity System: Flexible
propsJSON store for infinite extensibility - Lua Runtime: Sandboxed scripting for object behaviors
- Capability System: Fine-grained permissions per entity
- JSON-RPC: Headless core, any frontend can connect
Unshape architecture
Constructive media generation with lazy evaluation:
Key components:
- Node Graph: Type-safe connections with topological execution
- Field Trait: Lazy evaluation for continuous domains
- Expression System: AST with optional JIT compilation
- Domain Crates: Independent crates per media type
Shared patterns
All projects follow common architectural patterns:
Plugin architecture
Core defines contracts; plugins provide implementations. Built-in features use the same interface as third-party extensions.
Lazy evaluation
Build descriptions, evaluate on demand. Defer computation until needed.
Graceful degradation
Handle messy real-world data. Fall back gracefully when parsing fails.