Skip to content

v3.2.0 - Jungian Intelligence Layer

Choose a tag to compare

@ckaraca ckaraca released this 02 Mar 17:42
86159db

What's New

Jungian Intelligence Layer

Four cognitive capabilities inspired by Jungian psychology, layered on top of the existing memory ring architecture:

Synchronicity Detection

Temporal co-occurrence analysis across anonymized profiles. Discovers patterns invisible to individual users:

  • Co-occurrence: "After using file_read, users frequently use file_write"
  • Failure correlation: Time-of-day and tool-specific failure clustering
  • Emergent workflows: Common 3-step tool sequences (e.g., search → read → write)

Uses TABLESAMPLE BERNOULLI for efficient sampling on large datasets with privacy-preserving profile_hash (HMAC-SHA256).

Dream Processing

Batch memory consolidation inspired by sleep cycles. Runs during off-peak hours:

  • Clusters semantically similar memories using cosine similarity (configurable threshold)
  • Merges redundant memories while preserving distinct insights
  • Discovers cross-memory connections that weren't visible in real-time
  • Advisory lock protection prevents concurrent processing

Archetype-Driven Behavior

Context-aware pattern delivery using four Jungian archetypes:

  • Shadow: Surfaces failure patterns and error recovery strategies
  • Sage: Delivers validated knowledge and best practices
  • Hero: Provides workflow guidance and procedural steps
  • Trickster: Suggests creative alternatives after consecutive failures

Deterministic weight calculation based on context (outcome, observation type, failure count) — no LLM calls, fully predictable.

Individuation Metrics

Per-profile maturity scoring (0–100) across four dimensions:

  • Memory Depth (0–25): Ring diversity, decay survival, shock recovery
  • Learning Velocity (0–25): Weekly rate, relevance quality, reinforcement
  • Collective Contribution (0–25): CBP promotions, pattern diversity, feedback
  • Self-Awareness (0–25): Search usage, access engagement, dream consolidation

Five maturity levels: nascent → developing → established → mature → individuated.

MCP Tools (@pluggedin/pluggedin-mcp-proxy v2.1.0)

  • pluggedin_memory_search_with_context — Archetype-enhanced memory search that returns personal memories + collective patterns filtered through Shadow/Sage/Hero/Trickster based on context
  • pluggedin_memory_individuation — Get individuation score with component breakdown, trend, and personalized tips

Claude Code Plugin (pluggedin-plugin)

  • PreToolUse hook: Archetype-routed pattern injection before tool execution
  • PostToolUse hook: Temporal event recording for synchronicity detection
  • SessionStart hook: Individuation score display on session start

SEO Improvements

  • www → non-www permanent redirect (fixes duplicate canonical issues)
  • Public user profiles added to sitemap (/to/{username})
  • Blog slug typo redirect fix

Technical Details

  • Database: 3 new tables (temporal_events, dream_consolidations, individuation_snapshots) with partial indexes
  • Privacy: All cross-profile analysis uses anonymized profile_hash, never raw UUIDs
  • Security: 8 rounds of code review hardening (PR #139) — race condition fixes, batched deletions, SQL injection prevention, CHECK constraints
  • Performance: TABLESAMPLE BERNOULLI sampling, batched 10k-row deletions, advisory locks, in-memory LRU cache for individuation scores
  • Configuration: All thresholds configurable via environment variables with clamped bounds
  • Tests: 32 unit tests covering archetype routing, individuation helpers, synchronicity formatting, and constants validation
  • Migration: pnpm db:generate && pnpm db:migrate (single consolidated migration 0096_shiny_scream)

Ecosystem Versions

Package Version
pluggedin-app v3.2.0
@pluggedin/pluggedin-mcp-proxy v2.1.0
pluggedin-plugin (Claude Code) v3.2.0 hooks

Full Changelog: v3.1.0...v3.2.0