Skip to main content

Morphee — Progress & Next Steps

Last Updated: March 3, 2026 (Hub + Swarm architecture — PostgreSQL, runner API, deploy scripts, auth — 26 brain files, 233 brain tests, 714 morphee-core total, 288 bench-cli tests)

See also:


Unified Paradigm: Knowledge Pipeline + Runtime Hierarchy

IMPORTANT: The roadmap uses version-driven layers (not numbered phases). The architecture is unified by two core concepts:

Knowledge Pipeline

Every piece of knowledge in Morphee flows through a lifecycle: USE → EXTRACT → COMPILE → SHARE → INSTALL → USE. A Space (family recipes, classroom curriculum, team runbook) can be extracted, PII-stripped, compiled into an installable Integration, shared via the marketplace, and installed into another Space. Knowledge flows up the compilation chain as it matures.

Runtime Hierarchy (BaseMorphRuntime)

All execution goes through a unified BaseMorphRuntime contract. The VectorRouter tries the cheapest option first:

LevelRuntimeWhat runsCost
VectorRouterDirect memory recall (0.92 threshold)Free
0LLMRuntimeRaw reasoning, creative tasks$$$ (last resort)
1PythonRuntimeStructured skills, orchestration$
2JSRuntimeCanvas components, interactive UI$
3WasmRuntimeCompiled extensions (JIRA, GitHub, Notion)¢

Version Layers

VersionNameStatus
V0.9Product Completeness✅ SHIPPED Feb 19, 2026
V1.0OpenMorph + Canvas-First + Offline-First✅ SHIPPED Feb 21, 2026
V1.2Extension Ecosystem (WASM)✅ SHIPPED Feb 21, 2026
V1.3Multimodal Interaction✅ SHIPPED Feb 22, 2026
V1.5Local AI (candle/GGUF, Whisper, TTS)✅ SHIPPED Feb 22, 2026
V1.6Canvas V2 + Store AutomationIN PROGRESS
V2.0Unified Rust EngineSHIPPED Feb 28, 2026 — Python backend retired
V2.1Knowledge MarketplacePlanned
V2.5+Future/OptionalPlanned

See ROADMAP.md for full details, architecture.md for Runtime Hierarchy, CHANGELOG.md for shipped version details.


Recently Completed

Brain Evolution — Prediction, Substrats, Method Neurons, Telemetry & Bench Infra (Mar 1-3, 2026)

Major brain architecture upgrade: 26 files, ~10,000 lines, 233 brain tests. Added substrat index (problem type recognition via Gaussian clustering, 36 tests), method neurons (learned procedures with hippocampus→neocortex→cerebellum maturation, 10 tests), prediction system (surprise-driven learning, 10 tests), telemetry (structured decision capture, 6 tests), enhanced recall (substrat-scoped search), enhanced dream consolidation (phases 7-9: mitosis, clustering, method neuron birth).

Bench infrastructure: Hub + Swarm architecture — PostgreSQL backend (3 migration files), dashboard migrated from SQLite to pg, runner REST API (11 endpoints, token-authenticated), HTTP Basic Auth for dashboard UI, independent runner deployment via docker-compose.runner.yml, Rust RunnerClient (register/heartbeat/submit), deploy scripts (hub/runner/status), Prometheus metrics. Docker builds for benchmarking (8GB/4CPU) and Coolify production.

Context: Brain actively benchmarked through Kaggle AIMO math competition. Math demonstrates abstraction and pattern recognition. Learned knowledge → first shareable bundles for V2.1 Knowledge Marketplace. Open-source launch planned after tournament.

New files: substrat_index.rs, method_neuron.rs, prediction.rs, telemetry.rs (morphee-core), brain_store.rs, commands/brain.rs, runner_client.rs (bench-cli), Dockerfile, Dockerfile.dashboard, docker-compose.bench.yml, docker-compose.coolify.yml, docker-compose.runner.yml, prometheus.yml, run-remote.sh, deploy-hub.sh, deploy-runner.sh, runner-status.sh (bench), migrations/001_bench_tables.sql, migrations/002_brain_tables.sql, migrations/003_runners_table.sql, Brain.tsx, Runners.tsx, brain.ts, runners.ts, runner-api.ts, auth.ts, dashboard-auth.ts (dashboard) Tests: morphee-core: 714 with fractal-brain (233 brain tests across 26 files). bench-cli: 288 tests. Design docs: features/fractal-brain.md, features/brain-telemetry.md, features/brain-critical-analysis.md, BENCH_DEPLOYMENT.md

Digital Organism Architecture — Universal Recursive Intelligence (Feb 28 – Mar 1, 2026)

Extended the Fractal Brain module into a full Digital Organism Architecture: everything is an Organism (neurons, spaces, groups, LLMs, WASM modules). Same trait, same lifecycle, every scale. Pattern: receive signal → recall → respond → learn. Now 26 brain module files, ~10,000 lines, 233 tests (evolved from initial 21 files/167 tests).

Organism core (#[cfg(feature = "fractal-brain")]):

  • organism.rs — Universal Organism trait, Scale enum (Neuron→Network), Health metrics
  • signal.rsBrainSignal, Activation, Modality (Text/Audio/Scalar/Image/Structured/Event), SignalContext
  • edge.rs — Directed weighted Edge, EdgeKind (5 kinds), AdaptiveFilter
  • substrat.rsSubstratEncoder trait, BertSubstrat, TokenState
  • grammar/Grammar trait, TextGrammar, AudioGrammar stub

Signal propagation & execution:

  • executor.rs (645 lines, 12 tests) — SignalGraphExecutor with safety bounds (depth/fanout/budget), SignalTrace
  • space_organism.rs (536 lines, 16 tests) — First production impl Organism, NeuronMemory recall, Pipeline fallback
  • llm_organism.rs (237 lines, 6 tests) — LLM as organism (Scale::Experience)
  • wasm_organism.rs (224 lines, 4 tests) — WASM module as organism

Reward & consolidation:

  • reward.rs (564 lines, 14 tests) — Confidence tracking, quarantine, temporal decay, branch-level blame
  • dream.rs (473 lines, 8 tests) — 5-phase DreamConsolidator (reward cleanup, pruning, merge, mitosis)
  • dream_scheduler.rs (216 lines, 4 tests) — Background dream timer with trigger/cancel
  • lifecycle.rs (280 lines, 6 tests) — MitosisDetector, DecayPolicy

Multi-space & infrastructure:

  • space_registry.rs (380 lines, 11 tests) — SpaceOrganismRegistry, cross-space edges, export/import
  • store.rs (459 lines, 11 tests) — NeuronStore trait + InMemoryNeuronStore + FileNeuronStore + SqliteNeuronStore
  • proto_convert.rs (408 lines, 8 tests) — Proto ↔ Rust conversions (gated behind grpc)
  • proto/organism.proto (212 lines) — 7 gRPC RPCs: Send, Learn, Observe, GetOrganism, ListOrganisms, TriggerDream, Chat

Events: NeuronTreeBuilt, NeuronRecalled, OrganismEdgeFormed, OrganismMitosis, OrganismFusion, DreamCycleCompleted, SignalPropagated

Tests: 233 brain module tests (26 files). morphee-core: 714 tests with fractal-brain (661 unit + 52 integration + 1 doc). Zero regressions.

Design doc: features/fractal-brain.md

Fractal Brain — Neuron-based Knowledge Representation (Feb 28, 2026)

Implemented structural recall system in morphee-core that treats embedding vectors as neurons in a fractal tree. Three recall modes replace flat cosine search: Exact (replay stored solution, 0 LLM calls), Variation (substitute parameters, 0 LLM calls), Novel (full LLM, store tree). Per-token BERT hidden states are recursively segmented by trajectory direction changes. This is the foundation layer that the Digital Organism architecture builds upon.

Core brain modules: neuron.rs, fingerprint.rs, segmenter.rs, store.rs, recall.rs, dream.rs

Integration:

  • Feature-gated: fractal-brain = [] in morphee-core
  • TokenActivation struct + embed_tokens() added to Embedder trait (candle_impl)
  • NeuronContext (6 dims) added to RL state encoder
  • NeuronRecallStrategy wired into bench-cli pipeline: direct_tool → neuron_recall → knowledge_recall → adaptive
  • Design doc: features/fractal-brain.md

Python Backend Retired — V2.0 Complete (Feb 28, 2026)

The Python/FastAPI backend has been fully replaced by morphee-server (Rust/axum). All docker-compose files, CI/CD workflows, nginx configs, Vite proxy, and documentation updated. The backend/ directory is kept for reference but marked as deprecated.

Changes:

  • docker-compose.dev.ymlbackend service → morphee-server (port 3000)
  • docker-compose.prod.yml, docker-compose.yml — same transition
  • frontend/vite.config.ts — proxy default port 8000 → 3000
  • nginx/nginx.conf — upstream backend:8000morphee-server:3000, /api/ → 301 redirect to /v1/
  • .github/workflows/ci.yml — Python pytest job → Rust cargo test job
  • All documentation updated to reference morphee-server

RL Policy Network — Learned Action Selection (Feb 28, 2026)

Implemented neural policy gradient (Contextual Bandit + REINFORCE) in morphee-core. A small candle MLP (~60K params) learns which route/strategy works best for each domain. Replaces epsilon-greedy with learned action selection. Model is always derivable from ExperienceStore — no need to transfer weights.

New module: crates/morphee-core/src/providers/rl_policy/ (5 files)

  • PolicyNetwork — 3-layer candle MLP (input→128→64→N_actions), softmax output, safetensors save/load
  • PolicyTrainer — PPO-clip with value head baseline, entropy regularization, AdamW optimizer (upgraded from REINFORCE)
  • ReplayBuffer — Fixed-capacity FIFO for experience replay, deferred reward assignment
  • ActionSpace — Dynamic registry of routes (4 default) + strategies (registered at runtime)
  • PolicySelector — Orchestrator implementing Strategy + DomainClassifier traits, LinUCB primary + neural PPO secondary
  • LinUcbSelector — Linear UCB contextual bandit with sliding window, Cholesky decomposition, no cold start
  • HierarchicalActionSpace — 2-level selection (category → sub-arm), falls back to flat via config
  • StateEncoder — Rich state encoding: embedding (384) + user (10) + temporal (4) + conversation (4) + budget (4) = 406 dims
  • RewardDecomposer — Multi-objective reward: correctness, latency, cost, privacy with configurable weight presets
  • GroupPrior — Knowledge transfer via LinUCB A/b matrix averaging + binary bundle export/import

Integration:

  • Feature-gated: rl-policy = ["dep:candle-core", "dep:candle-nn"]
  • AdaptiveStrategy delegates to PolicySelector when active, falls back to epsilon-greedy
  • FeedbackLoop feeds rewards to PolicySelector on signal received
  • bench-cli wired with PolicySelector + stats output (action probability bar chart)
  • New events: PolicyUpdated, PolicyLoaded, LinUcbUpdated, RewardDecomposed
  • Design doc: features/rl-policy-design.md, ADR: decisions/ADR-012.md

Tests: 6 integration tests + ~94 unit tests for RL policy. morphee-core total: 600 tests (547 unit + 52 integration + 1 doc). bench-cli: 196 tests. All pass.


bench-cli Continuous Optimizer + Dashboard Upgrade (Feb 28, 2026)

Upgraded bench-cli from single-run optimizer to continuous optimization loop with pause/resume, warm-starting, and time-bounded runs. Dashboard upgraded from read-only event log to a command-and-control center with run management and convergence visualization.

Continuous Optimizer (morphee-core + bench-cli):

  • ContinuousOptimizer in morphee-core — time-bounded loops (max_duration), warm-start from past trials, checkpoint callbacks for incremental persistence, Arc<AtomicBool> stop signal for graceful Ctrl+C shutdown
  • StudyStore upgraded — status column (running/paused/completed), last_trial_id, incremental save_trial(), best_study_for_domain(), migration for existing DBs
  • optimize command rewrite — --resume flag (warm-start from past study), --hours (time-bounded), Ctrl+C handler (double Ctrl+C force exits)
  • optimize status subcommand — lists all studies with status badges
  • optimize best <domain> subcommand — shows best config, generates bench/profiles/optimized-{domain}.yaml, displays convergence history
  • from_optimizer_config() — converts optimizer best_config into StrategyProfile YAML

Dashboard Upgrade (bench-cli):

  • ProcessManager — tracks spawned bench/optimizer child processes with stop signals
  • 8 new REST endpoints: POST /api/runs (trigger bench run), GET /api/runs (list), GET /api/runs/:id (details), GET /api/optimizer/studies/:id/trials (convergence data), GET /api/optimizer/best/:domain, POST /api/optimizer/start, POST /api/optimizer/stop/:id, plus existing stats/studies/ws
  • Enhanced HTML dashboard — 4 stat cards, tabbed interface (Runs/Optimizer/Domains/Events), run control form, SVG convergence chart (trial score + running best), SVG radar chart for domain accuracy, status badges, study table with "View Trials"

New event types (morphee-core):

  • RunProgress { run_id, problem_index, total, current_accuracy } — emitted from bench loop for real-time progress
  • OptimizerPaused { study_id, domain, trials_completed, best_score } — emitted on graceful shutdown

Key files:

  • crates/morphee-core/src/providers/optimizer.rs — ContinuousOptimizer
  • crates/morphee-core/src/events/types.rs — RunProgress, OptimizerPaused events
  • bench/cli/src/optimizer/study_store.rs — status tracking, incremental saves
  • bench/cli/src/commands/optimize.rs — subcommands, resume, Ctrl+C
  • bench/cli/src/commands/dashboard.rs — ProcessManager, 8 new endpoints, enhanced UI
  • bench/cli/src/commands/bench.rs — RunProgress event emission
  • bench/cli/src/profile/mod.rs — from_optimizer_config()

Tests: 19 new tests in this phase. bench-cli total: 196 tests. morphee-core total: 514 tests (461 unit + 52 integration + 1 doc). All pass.


V2.0 Phase D: WASM Extension Migration — Complete (Feb 27, 2026)

Real WASM execution engine replacing all stubs. Extensions run sandboxed code with host functions for HTTP, vault, logging, consent, and events. All 6 extensions (echo + 5 integrations) build for wasm32-wasip1 and execute via wasmer.

Sub-Phases:

  • D1: Real Wasmer Execution Engine — wasmer 5.x behind wasm/wasm-cranelift/wasm-singlepass feature gates. Guest ABI: alloc(size)->ptr, describe()->ptr, execute(ptr,len)->ptr. WASI stub imports for fd_write/environ_get/environ_sizes_get/proc_exit. Echo extension runs end-to-end.
  • D2: Host Functions — 6 host function categories: __morphee_http_request (SSRF-safe), __morphee_vault_get/set, __morphee_log, __morphee_check_consent, __morphee_emit_event. Permission enforcement per function. SSRF protection blocks private IPs, localhost, link-local, cloud metadata, non-HTTP schemes.
  • D3: Server Wiring + WASM Binary StorageWasmBytesStore (PostgreSQL BYTEA), upload_wasm endpoint (magic byte validation + FNV-1a hash), runtime-aware install/uninstall/execute, startup reload of enabled modules.
  • D4: Integration Extensions + Audit Logging — All 5 integration extensions (GitHub, Slack, JIRA, Notion, Linear) rewritten with real host function calls (vault_get for tokens, http_request for API calls). extension_audit_log table + ExtensionAuditStore. Audit recording on every execution. scripts/build-extensions.sh for bulk WASM builds.

Key files:

  • crates/morphee-core/src/providers/extensions/wasm_runtime.rs — real wasmer execution engine
  • crates/morphee-core/src/providers/extensions/host.rs — host functions + SSRF protection
  • sdk/morphee-sdk-rust/src/host.rs — guest-side host function wrappers
  • crates/morphee-server/src/persistence/extension_audit.rs — audit log persistence
  • crates/morphee-server/src/handlers/extensions.rs — upload, install, execute, audit endpoints
  • extensions/{echo,github,jira,slack,notion,linear}/src/lib.rs — all 6 extensions with real host function calls

Tests: morphee-core 514 tests with wasm-cranelift (461 unit + 52 integration + 1 doc), morphee-server 153 tests (71 unit + 82 integration). All pass.


V2.0 Phase C: CRUD + Auth Migration — Complete (Feb 27, 2026)

Migrating all remaining Python backend endpoints to morphee-server. Phase C implements ~160 handlers across 19 persistence modules (users, groups, invites, spaces, tasks, canvas, identity, SSO, OAuth, notifications, ACL, consents, extensions, interfaces, onboarding, knowledge, neurons, trust, push tokens).

Status: Complete — all 19 persistence stores implemented with full SQL migrations, all handlers have real implementations. Frontend URL cutover (/api//v1/) complete with 12 new endpoints (pin/unpin/react/edit messages, regenerate, sync-local, component-event, approve, interface name-based config, oauth status).

Phase C Sub-Phases:

  • C1: GoTrue Proxy + User CRUD — signup/signin/refresh/signout, profile, password change, GDPR export/delete, consents, step-up auth (in-memory challenge store with 5-min TTL)
  • C2: Groups + Members + Invites — group CRUD, member management, email invites, invite links, accept/decline, parent consent (token verification + resend)
  • C3: Spaces + Tasks + Canvas — space CRUD + stats + morph path + sync-status, task CRUD + state machine (pause/resume/cancel), canvas CRUD + JSONB components/positions/sections + legacy state shim
  • C4: Identity + SSO + OAuth — child CRUD + child auth (Morphee JWT), biometric register/verify, auth methods/sessions, SSO authorize + callback (GoTrue code exchange), OAuth authorize + callback + disconnect
  • C5: Notifications + Push + ACL + Onboarding — notification CRUD + unread count + preferences, push token register/unregister, ACL grant/revoke/check/list + monitoring, onboarding quick-setup + SSE chat
  • C6: Interfaces + Extensions + Frontend URL Cutover — interface list/actions/configs CRUD + execute, extension catalog/install/uninstall/execute/audit/enable/disable/permissions/limits, frontend /api//v1/ cutover complete (12 new endpoints, ~70 frontend path updates, Vite proxy reconfigured)

Key infrastructure:

  • AppState.with_database(pool) — wires all 17 persistence stores from a single PgPool
  • AppState.with_gotrue(client) — real GoTrue HTTP client for auth proxying
  • AppState.run_migrations() — runs all 17 CREATE TABLE IF NOT EXISTS migrations sequentially
  • GoTrueClient.exchange_code() — SSO/OAuth authorization code exchange via GoTrue PKCE
  • In-memory step-up challenge store — LazyLock<Mutex<HashMap>> with 5-min TTL eviction
  • Parent consent tracking — consent token + verified flag + parent email on child_identities

Tests: 153 morphee-server tests (71 unit + 82 integration), all pass. morphee-core 514 tests with wasm-cranelift.

Files: 19 persistence modules, 19 handler modules, state.rs (builder pattern), config.rs (3 new env vars), main.rs (real DB wiring), gotrue.rs (exchange_code).


V2.0 Phase E: Knowledge Network — Complete (Feb 27, 2026)

Federated knowledge sharing, specialist neurons, quality scoring, and B2B trust chains.

Status: Complete — all 20 endpoints fully implemented and wired in production. Ed25519 signature verification on bundle publish. Background tasks for periodic quality recalculation and neuron health checks. Neuron auto-discovery from database on startup. 21 integration tests.

Implemented:

  • Shared Experiences (4 endpoints): contribute (anonymized), vector search (pgvector HNSW), domain stats, quality scoring
  • Knowledge Bundles (5 endpoints): publish (Ed25519 signature verified), list (filter by domain/quality), get, delete (owner-gated), quality scoring
  • Federated Git Sync (3 endpoints): push (apply bundle), pull (create bundle), status per group
  • Trust Roots (3 endpoints): create (Ed25519 public key), list, delete (group-gated), expiration checking
  • Specialist Neurons (3 endpoints): list active, domain stats, proxy process to specialist
  • Core Services:
    • git_sync.rs — bare repo management, git bundle create/apply via git2 + spawn_blocking
    • neuron_router.rs — service discovery, health checks, request proxying with auth forwarding
    • quality.rs — 4D scoring (accuracy 40%, freshness 20%, usage 20%, trust 20%) with exponential decay
    • anonymization.rs — SHA-256 hashing for PII-stripped experience contributions
    • shared_experiences persistence — pgvector 384-dim HNSW index, dedup via input_hash+domain+route UNIQUE
    • GDPR erasure — cascade delete + decrement logic for group erasure
  • Production wiring:
    • main.rswith_knowledge_database() creates all 7 stores + GitSyncManager + NeuronRouter
    • run_knowledge_migrations() — runs all 5 Phase E table migrations
    • Neuron auto-discovery — loads active neurons from DB into router on startup
    • Background quality recalculation — tokio::spawn interval loop (configurable via MORPHEE_QUALITY_REFRESH_INTERVAL_SECS, default 3600)
    • Background neuron health checks — periodic health pings (configurable via MORPHEE_NEURON_HEALTH_CHECK_SECS, default 60)
    • Ed25519 signature verification on bundle publish via state.auth.verify_knowledge()
    • Trust root expiration checking at bundle publish time

V2.0 Phase B: AI Endpoints Migration (Feb 27, 2026)

Migrated all AI-related endpoints from Python to morphee-server. Full chat (SSE streaming), memory, skills, conversations, search, and embed endpoints — all with PostgreSQL persistence and group-based isolation.

morphee-core — Tool calling + Cloud LLM + Orchestrator:

  • ToolCall, ToolResult, ToolDefinition, AssistantResponse, StopReason types in types.rs
  • Message extended with tool_calls and tool_results fields + constructors (Message::user(), ::assistant(), ::system(), ::tool_results())
  • ToolCallingInferencer trait — generate_with_tools() and generate_with_tools_stream()
  • Orchestrator trait — run() returns OrchestratorEventStream
  • ToolExecutor trait — execute_tool() + requires_approval()
  • OrchestratorEvent enum — TextDelta, ToolUse, ToolResult, ApprovalRequest, Done, Error
  • AnthropicInferencer — cloud LLM via Anthropic Messages API, feature-gated behind cloud-llm
  • AgentOrchestrator — agentic tool-calling loop with approval channels and max-turns safety
  • New feature: cloud-llm = ["dep:reqwest"]
  • New dep: tokio-stream

morphee-server — 5 new handler modules + persistence:

  • handlers/chat.rsPOST /v1/chat SSE streaming chat via Pipeline
  • handlers/conversations.rs — full CRUD: list, create, get, update (PATCH), delete + list messages
  • handlers/memory.rs — store (embed + VectorDB insert), search (vector similarity), delete, embed
  • handlers/skills.rs — full CRUD: list, create, get, update (PUT), delete
  • handlers/search.rs — unified GET /v1/search?q=...&types=... across conversations, memory, skills
  • persistence/conversations.rsconversations table with group/user indexes
  • persistence/messages.rsmessages table with FK cascade to conversations, JSONB tool_calls/tool_results
  • persistence/skills.rsskills table with JSONB definition, run_count, enabled flag

New routes (14): POST /v1/chat, GET/POST /v1/conversations, GET/PATCH/DELETE /v1/conversations/{id}, GET /v1/conversations/{id}/messages, POST /v1/memory, GET /v1/memory/search, DELETE /v1/memory/{id}, POST /v1/embed, GET/POST /v1/skills, GET/PUT/DELETE /v1/skills/{id}, GET /v1/search

Tests: +75 morphee-core tests (351 total: 298 unit + 52 integration + 1 doc), +20 morphee-server tests (40 total). All pass. Tauri app unaffected.

Files: 11 new, 14 modified.

V2.0 Phase A: morphee-server Foundation (Feb 27, 2026)

Server foundation for V2.0 Unified Rust Engine (ADR-011). Auth, sessions, WebSocket, PostgresVectorDB — all compiling and tested. Python backend remains alive; nothing retired yet.

morphee-core — Auth trait + 3 providers:

  • Auth trait (5 methods: verify_token, issue_token, sign_knowledge, verify_knowledge, trusted_signers)
  • Identity, AuthProvider, KnowledgeSignature types
  • SupabaseAuth — GoTrue HMAC-SHA256 JWT verification
  • MorpheeAuth — Ed25519 knowledge signing + Morphee JWT issuance (child/service accounts)
  • CompositeAuth — routes by JWT iss claim, falls through providers
  • New deps: jsonwebtoken, ed25519-dalek, sha2; postgres feature gate for sqlx/pgvector

morphee-server — 6 new modules:

  • ServerConfig — from MORPHEE_* env vars (host, port, database_url, jwt_secret, signing_key, max_sessions, rate_limit, cors)
  • SessionManager — multi-tenant MorpheeContext pool keyed by group_id, LRU eviction
  • AuthIdentity — axum extractor (Authorization: Bearer <token>Identity)
  • RateLimiter — token-bucket per IP
  • PostgresVectorDB — pgvector HNSW index, implements VectorDB trait
  • WebSocket handler — auth-first protocol, EventBus forwarding, process/signal over WS

New routes (6): POST /v1/auth/verify, POST /v1/auth/token, GET /v1/auth/signers, POST /v1/knowledge/sign, POST /v1/knowledge/verify, GET /v1/ws

Binary: morphee-server entrypoint (main.rs) with CompositeAuth stack, tracing, graceful startup.

Tests: +10 auth unit tests (morphee-core) + 4 auth integration tests (morphee-server) = 74 total server-side tests passing. Tauri app unaffected.

Files: 15 new, 16 modified. 3,215 lines added.

bench-cli Pipeline Integration — Phase 3 Complete (Feb 27, 2026)

bench-cli now uses morphee-core's full Pipeline + Strategy instead of raw LlmProvider calls. 7 morphee-core traits bridged, ~30 components exercised, 52 tests pass.

Trait bridges (7):

  • CandleInferencerInferencer — wraps LlmProvider with Mutex for GGUF inference
  • BenchScorerScorer — Kaggle-style penalized scoring with 4 dimensions
  • BenchDomainClassifierDomainClassifier — regex-based math domain classification
  • BenchRouterRouter — domain + difficulty → Route enum mapping
  • BenchMiddlewareMiddleware — anti-pattern detection on pipeline results
  • InMemoryExperienceStoreExperienceStore — morphee-core built-in, tracks feedback
  • Pipeline*StrategyStrategy — 4 strategies: single_shot, parallel_trials (majority vote), code_execution (Python sandbox), ensemble (cascade)

Strategy integration: --strategy CLI flag selects morphee-core Strategy wrapping the Pipeline. Commands use strategy.process() with RuntimeBudget. Ensemble cascades code_execution → parallel_trials → single_shot. Metadata enriched with answer, consistency, vote counts, deterministic flag.

Optimizer upgrade: Three-tier evaluation (cached experience → real pipeline execution → baseline fallback). Early stopping on perfect score.

Files: 6 new, 10 modified. See BENCH-CLI.md for architecture and next steps.

morphee-core Phase 3 — All Traits Implemented (Feb 27, 2026)

All 15 async traits in morphee-core now have concrete, tested implementations. The crate is production-complete.

New providers (6):

  • FileKnowledgeStore — plain filesystem KnowledgeStore (save/read/delete/list, path traversal protection)
  • GitKnowledgeStore — git-backed KnowledgeStore (every save creates a commit, spawn_blocking for git2)
  • LocalModelRegistry — filesystem ModelRegistry with HF catalog (Phi-4 Mini Q4, Llama 3.2), feature-gated download
  • KeywordDomainClassifier — keyword + centroid-based DomainClassifier (math/coding/language/science/creative defaults, builder pattern)
  • WasmExecutorExecutor trait adapter over existing WasmRuntime (bridges HashMap API, sync list_modules)
  • PipelineLifecycle — composite Lifecycle (ordered startup, reverse shutdown, resilient to errors)

New compilation (2):

  • CompiledPattern — serializable deterministic pattern for Wasm-level promotion
  • PatternCompiler — real Compiler with count-based LlmRaw→Skill + accuracy-gated Skill→Wasm promotion

Fixed adaptive components:

  • AdaptiveRouter — now uses DomainClassifier for domain-aware routing, best_route_for_domain returns actual Route (not string)
  • AdaptiveStrategy — async select_strategy with experience-based exploit (groups by strategy, picks highest avg score)
  • FeedbackLoopbest_route_for_domain returns Option<Route>, exposes experience_store() accessor

Tests: +50 unit tests (276 total), +10 integration tests (52 total). Tauri crate + frontend TypeScript compile clean.

Files: 8 new, 7 modified. See MORPHEE-CORE.md for architecture.

Spaces Page Redesign — Unified Tree Explorer (Feb 26, 2026)

Replaced master/detail split with a unified tree-based view. Fixed broken parent_space_id end-to-end.

  • Backend fix: parent_space_id added to SpaceCreate and SpaceUpdate models, INSERT query, and updatable column allowlist — sub-spaces now persist correctly
  • Stats endpoint: GET /api/spaces/stats — returns conversation/canvas/task counts and last activity per space via LATERAL JOINs
  • SpaceTreeNode: New tree row component with inline editing, stats badges, last activity, action dropdown (Edit, Create sub-space, Move to..., Delete)
  • Spaces.tsx rewrite: Unified tree view with search (auto-expands parents of matches), re-parenting via Move dialog, recursive tree rendering
  • i18n: 8 new EN/FR keys (search, lastActive, noActivity, moveTo, makeTopLevel, moveDialog, actions)
  • Cleanup: Deleted SpaceList.tsx, SpaceDetail.tsx and their tests (replaced by SpaceTreeNode + inline Spaces.tsx)
  • Tests: 12 SpaceTreeNode + 14 Spaces page + 6 backend = 32 new tests

Phase C1+C2: Adaptive Layouts + Extension Components (Feb 26, 2026)

5 canvas layout modes, section model, 4 new renderers, 8 new AI tools, dynamic component registry, and extension sandbox.

  • Layout modes: freeform, page, grid, sidebar, split — with CanvasLayoutSwitch UI and SectionCard for structured layouts
  • Section model: CanvasSection with SectionLayout variants; AI can add/remove/move sections via tools
  • New renderers: section_header, hero_banner, divider, text_block — page-layout content components
  • Backend AI tools (8): set_layout, add_section, remove_section, move_to_section, show_section_header, show_hero_banner, show_divider, show_text_block
  • Extension system: ComponentRegistry (dynamic renderer registration), ExtensionLoader (manifest-based loading), ExtensionSandbox (iframe isolation)
  • DB migration: 20260225200000_canvas_layout_sections.sql — adds layout_mode and sections columns to canvases table
  • i18n: EN/FR translations for all layout modes, section actions, and new component types
  • Layout intelligence: AI system prompt updated with layout selection guidance
  • Tests: ~67 new tests (37 layout + 20 renderer/registry + 10 backend)

Phase B: Named Canvases (Feb 25, 2026)

Multiple named canvases per space with tabs UI, CRUD API, and AI tool integration.

  • Database: canvases table with unique name constraint per group+space, data migrated from canvas_states
  • Backend API: 8 endpoints — list, create, get, save, rename, delete + legacy /state shims
  • Frontend Store: canvasStore (Zustand) for canvas list/CRUD/active selection, componentStore updated for canvasId-based load/save with race-condition fix
  • CanvasTabs UI: Tab bar with inline rename (double-click/F2), context menu, delete confirmation, keyboard nav
  • AI Tools: frontend__create_canvas(name) and frontend__switch_canvas(canvas_name) actions + ToolCallCard handler
  • i18n: EN/FR translations for all canvas tab strings
  • Tests: 25 new tests (11 canvasStore + 10 CanvasTabs + 4 backend canvas actions)

Cross-Audit Fix Sprint (Feb 25, 2026)

Fixed 40+ audit findings across all 8 audit types in a single pass. 53 files changed.

  • Security: EncryptionService raises on invalid key, SQL parameterization in identity_service, password max length, vault entropy hardening, path traversal prevention in morph_discover
  • Code: Session refresh wrapped in FOR UPDATE transaction, bare except narrowing, useAuth loading state fix, Permissions-Policy microphone fix, CI migration error handling, Docker image pinning (7 monitoring images), resource limits
  • i18n: 10+ components converted from hardcoded strings to t() calls, ~37 new EN/FR translation keys
  • A11y: CanvasCard keyboard drag, AlertDialog for archive confirmation, TableRenderer ARIA, decorative icon aria-hidden, badge aria-label
  • Performance: APNs JWT async, DB query optimization, bundle chunking, render optimizations
  • Legal: Push notification PII filter, notification retention policy (90/180 days), GDPR Art. 82 carve-out, cookie/data docs updated
  • Docs: test-results.md summary table, COOLIFY_DEPLOYMENT.md phase renumbering, testing.md date
  • Product: Calendar + Inbox nav items added to Sidebar

E2E Visual Dashboard (Feb 25, 2026)

A standalone dashboard for browsing E2E simulation results, generating scenarios with AI, and interactively exploring the app with an AI co-pilot. Located at e2e/dashboard/.

cd e2e/dashboard && npm run dev   # http://localhost:5174
  • 6 pages: Dashboard (charts), Test Runs, Run Detail, Scenario Detail, Scenarios (AI generator), Co-pilot
  • Express API (port 3939) serving reports, trends, scenarios, and WebSocket co-pilot
  • Morphee-branded dark theme with animations and Recharts visualizations
  • See e2e/dashboard/README.md for full documentation

V1.6 — Canvas V2 + Store Automation (In Progress)

Two parallel work streams shipping together:

Canvas V2 — Adaptive Layout Engine

  • Phase A: Canvas persistence (canvas_states table, positions, minimization)
  • Phase B: Named canvases (multiple canvases per space, full CRUD API, canvases table, canvasStore, SpaceTreeSelector)
  • Phase C1: Adaptive layouts (5 layout modes: freeform/page/grid/sidebar/split, section model, AI layout selection)
  • Phase C2: Extension components (dynamic registry, JSRuntime sandbox, AI auto-discovery)

Store Automation (Fastlane + ASO)

  • Fastlane configuration (Fastfile, Appfile, Gemfile)
  • 13 Fastlane lanes (6 iOS, 6 Android, 1 cross-platform validation)
  • ASO-optimized metadata (en-US, fr-FR, 8 more locales ready)
  • Automated screenshot generation (48 screenshots via Playwright)
  • Automated promo video generation (per locale)
  • Tag-based CI/CD routing (rc → beta → production)
  • Physical device testing (iOS + Android)
  • App Store + Google Play first submission

V2.0 Complete

  • V0.9 tech debt (code quality audit items + branding M-DESIGN-003)
  • SSO Tier 2 (GitHub, Discord, Slack) Deferred to V2.1
  • Python backend retirement ✅ morphee-server covers all routes, Python backend retired Feb 28, 2026

Feature Ideas Lab

30 deep-dive feature explorations for future versions, scored and ranked. See docs/ideas/README.md for the full priority dashboard, dependency graph, and recommended build order.

Top 7 (Tier 1 — Build Next):

RankIdeaScoreEffortVersion
1Rituals Engine38/40M (3-4w)V2.0
2Canvas Blueprints36/40M (3-4w)V1.6+
3AI Personas per Space36/40S-M (2-3w)V1.6+
4Focus & Deep Work Mode34/40S-M (2-3w)V1.8
5Habit Tracker & Wellness32/40S-M (2-3w)V2.0
6Achievement System32/40M (3-4w)V2.0
7Recipe & Meal Intelligence31/40M (3-4w)V2.0

All 30 ideas by category: Productivity (5), Canvas & UX (4), Family & Kids (4), Engagement (3), Education (2), Communication (3), Platform (4), AI & Intelligence (2), Infrastructure (2), Physical World (1)


V2.0 — Unified Rust Engine (Next)

Decision: ADR-011 | Design: features/unified-rust-engine.md

Replace the Python backend with morphee-server (axum + tonic) wrapping morphee-core. Same Pipeline runs everywhere. Server's unique value = shared intelligence.

Phase A: Server Foundation ✅ (Feb 27, 2026)

  • morphee-server crate (axum + tonic skeleton)
  • Auth trait + SupabaseAuth + MorpheeAuth + CompositeAuth
  • Knowledge signing (Ed25519, sign/verify, trust chains)
  • PostgresVectorDB (pgvector + HNSW, sqlx)
  • Session manager (multi-tenant Pipeline pool)
  • Health, CORS, rate limiting, SSE streaming, WebSocket

Phase B: AI Endpoints Migration ✅ (Feb 27, 2026)

  • Chat endpoint → morphee-server (Pipeline.process + SSE)
  • Embed endpoint → morphee-server (Embedder trait)
  • Memory search/insert → morphee-server (VectorDB + KnowledgeStore)
  • Skills endpoints → morphee-server (Compiler + Strategy)
  • Conversations CRUD → morphee-server (PostgreSQL persistence)
  • Unified search → morphee-server (conversations + memory + skills)
  • Cloud LLM (AnthropicInferencer) + Orchestrator in morphee-core
  • Python backend proxies AI calls to morphee-server

Phase C: CRUD + Auth Migration ✅ (Feb 27, 2026)

  • User/Group/Space CRUD → axum + sqlx (19 persistence modules)
  • Task/Canvas CRUD → axum + sqlx
  • OAuth callbacks (Google, Apple, Microsoft)
  • Notification system (EventBus replaces Redis pub/sub)
  • Data export, settings service
  • Python backend retired

Phase D: WASM Extension Migration ✅ (Feb 27, 2026)

  • Real wasmer WASM execution engine
  • Host functions (HTTP, vault, logging, consent, events) + SSRF protection
  • Server wiring + binary storage (PostgreSQL BYTEA)
  • All 5 integration extensions + echo, building for wasm32-wasip1
  • Extension audit logging

Phase E: Knowledge Network ✅ (Feb 27, 2026)

  • Shared ExperienceStore (PostgreSQL, multi-tenant aggregation)
  • Experience anonymization pipeline
  • Knowledge signing integration (Auth trait, Ed25519)
  • Federated git sync endpoints
  • Specialist neuron routing + auto-scaling
  • Knowledge quality scoring

Monitoring & Analytics

  • PostHog analytics (opt-in, PII scrubbing)
  • Prometheus /metrics endpoint + custom metrics
  • 5 Grafana dashboards (API, LLM, Memory, Users, Errors)
  • Alert rules (error rate spike, LLM timeout)

Channels (as WASM extensions)

  • WhatsApp Business API extension
  • Telegram Bot extension
  • Email IMAP/SMTP extension

V2.1 — Knowledge Marketplace (Planned)

  • Marketplace UI (browse, search, categories, ratings)
  • Bundle publishing (PII strip, package, sign, upload)
  • Bundle installation (verify signature, register with Pipeline)
  • Stripe Connect payments (70% creator, 30% Morphee)
  • B2B private marketplace (corporate knowledge distribution)
  • Creator dashboard (installs, revenue, usage analytics)
  • Trust badges (verified creator, signed by Morphee CA)

V2.5+ — Future / Optional

  • Self-Aware AI Development — Morphee reads/explains/improves her own codebase
  • Crypto Marketplace — MorphCoin, data exchange, DAO governance (deprioritized, needs external audit)

Audit Status Summary

Last Audit Date: February 21, 2026 | Completion Rate: 179/274 items (65.3%)

Audit TypeDone/TotalRateNotes
Legal (GDPR)64/6598.5%1 remaining: organizational DPAs
Security66/6995.7%3 Low items remaining
Accessibility41/4689.1%WCAG 2.1 AA compliant
Performance26/3378.8%7 Low deferred
Code Quality34/7247.2%38 items (accepted tech debt)
Product8/2828.6%Professional integrations deferred to V1.2
i18n0/120%Foundation complete, frontend translation WIP
Documentation7/978%2 items remaining

See audits/ for detailed findings.


Quick Commands

# Start infrastructure + morphee-server (Docker)
docker compose -f docker-compose.dev.yml up -d
curl http://localhost:3000/health

# Or: start infrastructure only, run server natively
docker compose -f docker-compose.v2.yml up -d
source .env.v2 && cargo run -p morphee-server

# Start frontend
cd frontend && npm run dev

# Run tests
cargo test -p morphee-core --features rl-policy # 600 tests
cargo test -p morphee-core --features fractal-brain # 714 tests (233 brain)
cargo test -p morphee-server # 153 tests
cargo test -p bench-cli # 284 tests
cd frontend && npx vitest run # 3,465 tests
cd frontend && npm run test:e2e # 66 tests

# E2E Dashboard — browse results, generate scenarios, AI co-pilot
cd e2e/dashboard && npm run dev # http://localhost:5174

# Refresh documentation
./scripts/docs-refresh.sh

Documentation

DocumentPurpose
ROADMAP.mdVision, concepts, all phases
CHANGELOG.mdShipped version history (full details)
architecture.mdSystem architecture + diagrams
CODEBASE.mdCodebase map, integrations, Tauri commands
DOCUMENTATION.mdHow docs work (meta-documentation)
interfaces.mdIntegration/Interface system
api.mdAPI reference
testing.mdTesting guide
test-results.mdTest results snapshot
deployment.mdProduction deployment
decisions/Architecture Decision Records (ADR-011: Unified Rust Engine)
features/unified-rust-engine.mdV2.0 design: morphee-server, Auth trait, knowledge network
features/fractal-brain.mdFractal Brain + Digital Organism architecture (26 files, 233 tests)
features/brain-critical-analysis.mdBrain critical analysis — honest assessment of strengths and gaps
features/digital-brain-vision.mdDigital Brain Vision — nature-inspired neuron growth, maturation, prediction
architecture/MORPHEE-CORE.mdmorphee-core architecture + migration plan
troubleshooting.mdCommon issues
stories/Persona-based user stories