Virgo: In-Editor Domain-Driven Design (DDD) & Visual Modeler

Turn messy PRDs, raw user stories, and chaotic code into formal, visual Domain-Driven Design (DDD) models and deterministic event-sourced backends.
Modern AI coding tools make writing code 10x cheaper, but verifying structural integrity, boundaries, and invariants 10x harder. Virgo shifts the paradigm: your Domain Model is the eternal source of truth; code is disposable exhaust.
⚡ What it Does in 30 Seconds
- Highlight text or code: Select any raw user story, markdown spec, or TypeScript/Java class.
- Reverse-Engineer to ADM: Extract an Application Domain Model (ADM) with mathematically verified Aggregate boundaries, Root Entities, and Value Objects.
- Live Multi-Lens Diagram Sidecar: Inspect your domain in real-time right inside your editor across multiple visual lenses.
- Deterministic Invariant Linter ($0 AI Cost): Detect boundary leaks, unencapsulated mutations, and Reference-by-ID violations instantly.
- One-Click Spring Boot Compilation: Compile the validated domain model directly into a clean, event-sourced Spring Boot REST API.
🚀 Key Features (v0.0.0)
🗺️ 1. Multi-Lens Diagram Viewer
Switch effortlessly between three distinct architectural lenses in the live Mermaid sidecar:
- Domain Aggregate Map (
graph TD): Static domain topology highlighting Aggregate Roots, Entities, Value Objects, and Enums without UML scalar clutter.
- Event Flow Map (
graph LR): Dynamic reactive chain visualizing how Actors issue Commands, mutate Aggregates, emit Domain Events, and trigger Policies across bounded contexts.
- State Machine Lens (
stateDiagram-v2): Detailed lifecycle state progressions (🔄 States: A → B → C) and transition guard conditions for any selected aggregate.
💬 2. Single-Question Conversational Refinement
Clarifying domain edge cases shouldn't feel like drowning in a wall of AI text:
- Single-Question Lock: The sidecar extracts ambiguities and prompts strictly one question at a time.
- Dynamic Derivation: Your answer is fed into a fresh conversational sub-session—subsequent questions adapt dynamically based on your business answers.
- Clean Focus: Prose rationale is neatly tucked behind a "See reasoning" toggle, keeping your editor workspace clean.
⚡ 3. Deterministic Invariant Linter (Zero Token Cost)
An in-editor AST linter enforcing strict Domain-Driven Design principles locally:
- Reference by ID: Flags when an aggregate field directly couples to another aggregate entity instead of using an ID.
- Root Entity Preservation: Prevents starved roots by ensuring every Aggregate Root owns its identifying and lifecycle state fields.
- Encapsulation & Drift: Flags unencapsulated mutations and schema drift before touching database migrations.
🔄 4. Zero-Cost AST Code Sync
Reverse-engineer existing codebases without making external API calls:
- Parses TypeScript, JavaScript, and Java files in your workspace using AST compilers and tokenizers.
- Automatically groups entities into candidate Aggregate boundaries and generates
VISUAL_ADM.md.
🛠️ Quick Start Guide
Step 1: Install & Authenticate
- Install directly from the VS Code Marketplace (search for
Virgo DDD or Virgo).
- Zero Config for GitHub Copilot: Out of the box, the extension rides your signed-in GitHub Copilot session via VS Code's Language Model API (
vscode.lm). No API keys to configure.
- BYOK (OpenAI / Anthropic): Don't use Copilot? Run
Visual ADM: Configure API Key (BYOK) to store your key in the secure OS keychain via VS Code SecretStorage.
Step 2: Model Your First Domain
- Open any markdown spec or code file.
- Highlight the text you want to model.
- Open Command Palette (
Cmd+Shift+P / Ctrl+Shift+P) and run:
Visual ADM: Generate from Selection
- The extension writes
VISUAL_ADM.md and launches the live interactive Domain Graph sidecar.
Step 3: Inspect & Validate
- Toggle between lenses using the View dropdown in the sidecar header.
- Run
Visual ADM: Validate Invariants to audit boundary integrity.
- Use the sidecar chat to answer clarifying questions and watch your domain graph adapt.
⚙️ Configuration Options
| Setting |
Default |
Description |
visualAdm.llmProvider |
copilot |
Foundation LLM: copilot (signed-in session), openai, or anthropic. |
visualAdm.llmModel |
"" |
Optional model family override (e.g. gpt-4o, claude-sonnet-4-6). Empty = auto. |
visualAdm.spoutApiUrl |
"" |
Simway Spout API base URL for compiling to Spring Boot. |
visualAdm.devMode |
false |
Unlocks developer-centric diagram lenses (e.g., State Machine Diagram) in the viewer. |
🧩 Commands Cheat Sheet
Visual ADM: Show Domain Graph — Open or focus the live Mermaid diagram sidecar.
Visual ADM: Generate from Selection — Reverse-engineer highlighted text or code into an ADM.
Visual ADM: Sync Code to ADM — Scan workspace TypeScript/Java files and generate an ADM ($0, no LLM).
Visual ADM: Validate Invariants — Run the deterministic DDD integrity linter.
Visual ADM: Deep Rule Audit — Perform an on-demand semantic BDD audit of your code against the ADM.
Visual ADM: Compile to Spring Boot Application — Compile the validated ADM into an event-sourced backend.
Built with passion by the Simway team. Shift the paradigm: maintain intent, not code.
| |