Skip to main content

Crate Structure

laminae (meta-crate, feature-gated backends)
├── laminae-psyche       ← EgoBackend trait + Id/Superego pipeline
├── laminae-persona      ← Voice extraction, filter, DNA tracking
├── laminae-cortex       ← Edit tracking, pattern detection, instruction learning
├── laminae-shadow       ← Analyzer trait + static/LLM/sandbox stages
├── laminae-ironclad     ← Command whitelist + cross-platform sandbox + watchdog
├── laminae-glassbox     ← GlassboxLogger trait + validation + rate limiter
├── laminae-ollama       ← Standalone Ollama HTTP client
├── laminae-anthropic    ← Claude EgoBackend (feature: "anthropic")
├── laminae-openai       ← OpenAI-compatible EgoBackend (feature: "openai")
└── laminae-python       ← Python bindings via PyO3

Dependencies Between Crates

Each crate is independent except for these relationships:
CrateDepends OnReason
laminae-psychelaminae-ollamaId/Superego LLM calls
laminae-personalaminae-ollamaVoice extraction LLM calls
laminae-cortexlaminae-ollamaLLM-powered edit analysis
laminae-shadowlaminae-ollamaLLM adversarial review
laminae-ironcladlaminae-glassboxEvent logging
laminae-anthropiclaminae-psycheImplements EgoBackend
laminae-openailaminae-psycheImplements EgoBackend

WASM Compatibility

Crates are split into browser-safe and native-only:

Browser-safe (WASM)

laminae-glassbox — regex + string matchinglaminae-persona — voice filter (no extractor)laminae-cortex — edit tracking + pattern detection

Native-only

laminae-psyche — needs async runtimelaminae-shadow — needs process executionlaminae-ironclad — needs OS-level process controllaminae-ollama, laminae-anthropic, laminae-openai — HTTP clients
This separation is enforced at compile time via cfg gates. If you target WASM and try to import Shadow, it won’t compile.

Extension Points

TraitWhat You ImplementFirst-Party Implementations
EgoBackendPlug in any LLMClaudeBackend, OpenAIBackend
AnalyzerCustom Shadow analysis stagesStaticAnalyzer, SecretsAnalyzer, DependencyAnalyzer, LlmReviewer
GlassboxLoggerRoute events to your loggingTracingLogger
SandboxProviderCustom process sandboxingSeatbeltProvider, LinuxSandboxProvider, WindowsSandboxProvider, NoopProvider

Data Flow

User Message

    ├──→ Id (Ollama, creative)      ──→ Creative signal
    ├──→ Superego (Ollama, safety)  ──→ Safety signal

    ├──→ Ego (Your LLM + signals)   ──→ Raw response

    ├──→ Persona Voice Filter        ──→ Filtered response
    ├──→ Glassbox Output Validation  ──→ Validated response
    ├──→ Shadow Analysis (async)     ──→ Vulnerability report

    └──→ User