Skip to content

DevDiff Codebase Architecture & Monorepo Topology

This document details the monorepo architecture of DevDiff. DevDiff is organized as a unified pnpm workspace containing 14 specialized packages, native VS Code extension components, universal MCP server modules, and a VitePress documentation portal.


Package Dependency Graph


Workspace Packages Directory

Package PathPackage NameResponsibility & Scope
packages/core@eldrex/coreCore AST engine, AI provider router, redaction engine v2, network guard, persistent memory, and HallucinationGuard.
packages/cli@eldrex/cliCommand-line interface (devdiff agent, prompt, security, memory, mcp, disclose, study).
packages/vscodedevdiffNative VS Code extension with 4 sidebar panels, full-tab chat window, DevTools suite, and standalone esbuild bundle.
packages/plugin-sdk@eldrex/plugin-sdkTypeScript SDK and DevDiffDevTools test harness, mock generators, validator, and performance profiler.
packages/mcp@eldrex/mcpUniversal Model Context Protocol (MCP) server exposing 16 tools with automated multi-IDE configuration installer.
packages/gateway@eldrex/gatewayAI provider gateway, multi-agent swarm consensus coordinator, and Mermaid sanitizer v2.
packages/antigravity@eldrex/antigravityWorker thread isolation engine (IDEGuardian), 24/7 background scheduler, and SKILL.md generator.
packages/personas@eldrex/personas9 built-in release personas (developer, ceo, educator, pm, compliance, robot, data-analyst, journalist, study-buddy).
packages/connectors@eldrex/connectorsStreaming changelog webhook delivery connectors (Slack, Discord, MS Teams, Telegram, WhatsApp).
packages/vite-plugin@eldrex/viteVite dev server Hot Module Replacement (HMR) changelog overlay and build-time security gates.
packages/integrations/openclaw@eldrex/openclawOpenClaw supervisor v2 agent orchestration with subtask graph decomposition.
packages/create-devdiff-appcreate-devdiff-appProject scaffolding CLI for custom DevDiff applications, plugins, and MCP servers.
docs/devdiff-docsVitePress documentation portal with on-device vector search.

Architectural Principles

  1. Local-First & Air-Gapped: Core analysis, AST parsing, and local inference operate with zero external cloud dependencies.
  2. Zero-Impact IDE Performance: The VS Code extension isolates AI operations and memory indexing to worker threads, strictly keeping memory under 256MB.
  3. Strict Immutability & Impartial Quality: Quality gates (OutputQualityGate, CompletenessValidator) guarantee generated changelogs are never incomplete or cut off.