Last updated: 2026-06-29 Branch:
shadowrealm-v2Progress: 78 / 129 components shipped
ShadowRealm is a local-first, self-healing, model-agnostic cognitive operating system that cleans human input, reasons explicitly, routes intelligently, executes safely, learns from every interaction, and compounds memory over time.
Sophisticated inside. Clean outside. Always explainable.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONT DOOR β
β PromptNormalizer β IntentClassifier β ClarificationGate β
β β ReasoningEngine (ReAct Loop) β
ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ
β ROUTING LAYER β
β PantheonRouter β ModelRouter β DomainModelRegistry β
β TokenBudgetManager β GoalBudget β
ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ
β EXECUTION LAYER β
β SubAgentOrchestrator β TaskQueue β WorkerPool β
β PluginManager β SkillTrainer β OSActionExecutor β
β ChannelRouter β MCP Servers β
ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ
β MEMORY & LEARNING β
β MemoryVault β ContextCompressor β MemorySyncAgent β
β SelfReflectionLoop β CommunitySkillLibrary β
β EventStore β AuditLogger β VectorSearchIndex β
ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ
β OUTPUT LAYER β
β Response + Reasoning Trace (collapsible panel / side chat) β
β NotificationDispatcher β ChannelRouter β UI β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Track | IDs | Count | Status |
|---|---|---|---|
| Foundation | C1βC18 | 18 | β Complete |
| Data & Storage | C19βC36 | 18 | β Complete |
| Security & Auth | C37βC54 | 18 | β Complete |
| Observability | C55βC63 | 9 | β Complete |
| Task & Job Queue | C64βC66 | 3 | β Complete |
| Networking & HTTP | C67βC69 | 3 | β Complete |
| Event Sourcing & Audit | C70βC72 | 3 | β Complete |
| Search & Indexing | C73βC75 | 3 | β Complete |
| User & Session | C76βC78 | 3 | β Complete |
| Notification & Messaging | C79βC81 | 3 | π Sprint 23 |
| Permission & Policy | C82βC84 | 3 | Queued |
| Plugin & Extension | C85βC87 | 3 | Queued |
| AI / LLM Integration | C88βC90 | 3 | Queued |
| Workflow Engine | C91βC93 | 3 | Queued |
| Data Pipeline | C94βC96 | 3 | Queued |
| Multimodal & Media | C97βC99 | 3 | Queued |
| Testing Infrastructure | C100βC102 | 3 | Queued |
| Deployment & DevOps | C103βC105 | 3 | Queued |
| Integration Adapters | C106βC108 | 3 | Queued |
| Agent Identity Layer | C109βC111 | 3 | Queued |
| Memory Vault | C112βC114 | 3 | Queued |
| Operational Controls | C115βC117 | 3 | Queued |
| Model & Channel Routing | C118βC120 | 3 | Queued |
| Input Intelligence | C121βC123 | 3 | Queued |
| Self-Healing & Learning | C124βC126 | 3 | Queued |
| Ecosystem & Portability | C127βC129 | 3 | Queued |
| TOTAL | C1βC129 | 129 | 78 shipped |
Config loader, structured logger, error handler, event bus, plugin manager, service registry, CLI framework, env validator, task runner, feature flags, health probe, rate limiter core, circuit breaker, retry policy, dependency injector, signal handler, process manager, startup sequencer.
Database manager, migration engine, model registry, L1 memory cache, L2 disk cache, L3 distributed cache, file store, blob store, document store, graph store, time-series store, data validator, serialiser, query builder, connection pool, schema registry, data masker, backup manager.
JWT auth, OAuth2 provider, RBAC engine, request rate limiter, input validator, secret manager, AES-256-GCM encryption, key rotation, HMAC signer, TLS context manager, session token store, CSRF guard, IP allowlist, audit trail, content policy, threat model, security scanner, permission matrix.
Structured log aggregator, distributed trace collector, metrics collector, alert manager, dashboard data API, health checker, metrics registry, span exporter, diagnostics reporter.
TaskQueue (priority + retry + DLQ), JobScheduler (interval/cron/once), WorkerPool (thread drain + backoff).
HTTPClient (retry + auth), WebhookDispatcher (HMAC-signed), RateLimitedSession (token bucket).
EventStore (append-only + snapshots), AuditLogger (hash-chained), ChangeTracker (field diff + rollback).
FullTextIndex (FTS5/BM25), VectorSearchIndex (cosine + numpy), SearchRouter (hybrid RRF fusion).
UserStore (PBKDF2-HMAC-SHA256), SessionManager (CSPRNG + sliding TTL), UserPreferenceStore (namespaced + callbacks).
- C79
core/notification_dispatcher.pyβ Multi-channel fanout Β· dedup window Β· pluggable adapters Β· async delivery - C80
core/in_app_message_queue.pyβ SQLite inbox Β· read/unread/archived Β· topic threads Β· TTL Β· badge count - C81
core/email_composer.pyβ Template registry Β· {{var}} substitution Β· SMTP + pluggable transport Β· dry-run
- C82
core/permission_manager.pyβ Fine-grained permission graph (subject β action β resource) - C83
core/policy_engine.pyβ Declarative policy evaluation (allow/deny rules with conditions) - C84
core/access_control_list.pyβ Per-resource ACL with inheritance and override
- C85
core/plugin_registry.pyβ Versioned plugin manifest + dependency resolver - C86
core/plugin_sandbox.pyβ Isolated execution environment for untrusted plugins - C87
core/extension_loader.pyβ Hot-reload extensions without restart
- C88
core/llm_client.pyβ Unified LLM API (OpenAI / Anthropic / Gemini / Ollama) with streaming - C89
core/tool_registry.pyβ OpenAI function-calling spec compatible tool definitions - C90
core/llm_response_parser.pyβ Structured output extraction + validation from LLM responses
- C91
core/workflow_definition.pyβ Trigger β condition β action node graph schema (n8n-inspired) - C92
core/workflow_executor.pyβ DAG execution engine with branch, loop, parallel node types - C93
core/workflow_registry.pyβ Store, version, activate/deactivate named workflows
- C94
core/pipeline_builder.pyβ Composable ETL step chain with typed I/O contracts - C95
core/data_transformer.pyβ Map/filter/reduce/join operations on structured data - C96
core/pipeline_scheduler.pyβ Schedule + monitor data pipelines with cron or event triggers
- C97
core/media_processor.pyβ Image/audio/video metadata extraction + format conversion - C98
core/transcription_adapter.pyβ Speech-to-text bridge (Whisper + pluggable backends) - C99
core/vision_adapter.pyβ Image understanding bridge (vision model API wrapper)
- C100
core/test_harness.pyβ Agent behavior test runner with expected-output assertions - C101
core/mock_tool_registry.pyβ Deterministic mock tools for isolated agent testing - C102
core/regression_tracker.pyβ Track capability regressions across model/version changes
- C103
core/deployment_manager.pyβ Blue/green deployment orchestration with rollback - C104
core/config_drift_detector.pyβ Detect + alert on config drift from baseline - C105
core/release_gate.pyβ Automated pre-release checks (tests, security scan, health probes)
- C106
integrations/github_adapter.pyβ GitHub API: repos, issues, PRs, commits - C107
integrations/calendar_adapter.pyβ Calendar read/write (Google Calendar / iCal) - C108
integrations/browser_adapter.pyβ Headless browser automation (Playwright/Puppeteer bridge)
These sprints implement the cognitive OS layer β the features that separate ShadowRealm from a toolkit and make it a sovereign AI workspace.
Inspired by: Hermes soul.md, IBM watsonx workspace scoping, MIT persona research
- C109
core/soul_loader.pyβ Parse + validatesoul.mdpersona blueprints per agent - C110
core/agent_identity.pyβ Runtime identity object injected into every LLM prompt - C111
core/pantheon_router.pyβ Score + route tasks to best-fit persona/model combo (MIT reward model pattern)
Inspired by: Mem0 layered memory, Hermes memory.md, VectorSearchIndex (C74)
- C112
core/memory_vault.pyβ Unified markdown + SQLite + vector memory with context-injection API - C113
core/context_compressor.pyβ LLM-based summarisation + /compress trigger + auto-compress at budget - C114
core/memory_sync_agent.pyβ Scheduled export of memory state to GitHub (portable snapshot)
Inspired by: Hermes slash commands, AutoGen event-driven runtime, MIT SUPER-agent
- C115
core/command_parser.pyβ /q /background /reset /compress /model /stop inline parser - C116
core/goal_budget.pyβ N-turn constraint loop Β· auto-compress at exhaustion Β· power/economy/balanced modes - C117
core/sub_agent_orchestrator.pyβ Parallel sub-agents with isolated context windows + solvability scoring + result merge
Inspired by: Google Gemini model-agnostic routing, Hermes 22-channel pattern, CodeMender sandboxing
- C118
core/model_router.pyβ Dynamic LLM swap with cost-aware routing + Ollama offline fallback - C119
core/channel_router.pyβ Unified adapter: Telegram, Discord, Slack, WhatsApp, Matrix, Web - C120
core/os_action_executor.pyβ Sandboxed OS execution Β· permission gates Β· full audit trail
Inspired by: Query rewriting research, Google ReAct paper (Yao et al. 2023), IBM clarification gates
- C121
core/prompt_normalizer.pyβ Raw input β grammar fix β de-ambiguate β reconstructed clean query - C122
core/intent_classifier.pyβ Classify intent type β tool / skill / agent / model routing decision - C123
core/reasoning_engine.pyβ ReAct loop: Thought β Action β Observation β Thought + stored reasoning trace
Inspired by: Google CodeMender, AutoGen reflexion, Bloom's Taxonomy mastery model
- C124
core/self_reflection_loop.pyβ Error pattern detection β candidate fix generation β sandboxed validation β plugin registration - C125
core/token_budget_manager.pyβ Per-session token economy: power / balanced / economy modes, user-selectable - C126
core/domain_model_registry.pyβ Register + route to domain-specific models: law, science, psychology, physics, code
Inspired by: IBM watsonx workspace export, federated learning research, Bloom's mastery loop
- C127
core/workspace_exporter.pyβ Export full ShadowRealm context (agents, skills, memory, prefs) as portable ZIP - C128
core/community_skill_library.pyβ Opt-in anonymised skill submission + versioned community library - C129
core/skill_trainer.pyβ 3-stage mastery loop: Show (observe) β Practice (guided) β Demonstrate (independent + explain)
| Source | Principle Applied |
|---|---|
| MIT AI Agent Index 2025 | Autonomy levels, accountability per action, eval methodology |
| MIT SUPER-agent paper (arXiv:2410.02189) | Task decomposition, solvability scoring, reward model routing |
| ReAct paper β Yao et al. ICLR 2023 | ThoughtβActionβObservation loop, reasoning trace storage |
| IBM watsonx Orchestrate | Workspace isolation, role scoping, portable export |
| Google DeepMind CodeMender | Self-healing: detect β generate β validate β register |
| Google Gemini 2.5 reasoning traces | Explainable AI: visible reasoning panel alongside response |
| Microsoft AutoGen | Three-layer architecture: Core / AgentChat / Extensions |
| Mem0 | Layered memory: working / episodic / semantic |
| n8n / Zapier | Workflow engine: trigger β condition β action graph |
| Bloom's Taxonomy | Skill mastery: show β practice β demonstrate |
| Federated learning research | Community skill library: anonymised, opt-in, versioned |
- Zero external deps for core β every
core/module runs on stdlib alone - Least privilege β all agents operate under explicit permission grants (MIT autonomy principle)
- Local-first β full functionality without cloud; cloud features are strictly additive
- Compounding memory β context stacks across sessions; nothing is lost silently
- Model agnostic β swap any LLM backend without touching business logic
- Observable β every action is logged, audited, and always traceable
- Always explainable β every response carries a reasoning trace accessible on demand
- Self-healing β errors feed the reflection loop; the system gets smarter from failures
- Clean interface β sophisticated inside, minimal outside; power users go deep, casual users stay clean
- Portable β any user's full workspace can be exported, versioned, and restored