Skip to content
CAI
Software that uses CAICheck a score

DomainLang/DomainLang

56.8

Adequate · 9 November 2026

25.5k

lines of production code

TypeScript

primary language

6

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

DomainLang is a Domain-Driven Design tooling suite that provides a DSL for defining domains, bounded contexts, and context maps. It features a CLI for project scaffolding and dependency management, a VS Code extension with language server support for real-time validation and diagram visualization, and a browser-based playground for interactive model editing. The system enforces strict DDD patterns through comprehensive validation rules and generates visual context maps to illustrate relationships between bounded contexts.

How it got here

2021–2025 — DomainLang initial release and tooling

22 changes.

This period established the DomainLang project as a multi-package workspace, introducing the core language library, a CLI interface, and a VS Code extension with LSP support. It focused on building comprehensive language services, including parsing, validation, and diagram visualization, while implementing a manifest-centric architecture for dependency management. Extensive test suites were added to ensure robustness across parsing, linking, and scoping features.

2026 — CLI tooling and documentation expansion

24 changes.

This period focused on expanding the DomainLang CLI with comprehensive package management, project scaffolding, and a branded interactive UI. It also introduced a Model Query SDK for type-safe model traversal and established a VitePress documentation site featuring interactive railroad diagrams. Significant effort was dedicated to ensuring reliability through extensive test coverage across the LSP, CLI, and diagram generation components.

Features

Add multi-file project example with shared vocabulary and path aliases

A new example project demonstrates how to structure a DomainLang codebase across multiple files, featuring a shared vocabulary file, domain-specific models, and a project manifest (model.yaml) that configures path aliases for clean imports and declares external package dependencies.

dsl/domain-lang/examples/multi-file-project · high confidence

Automated post-processing of railroad diagrams for theming and documentation

A new script has been added to post-process railroad diagram SVGs generated by langium-cli. This script cleans the SVGs for VitePress theming by removing hardcoded colors and replacing them with CSS variables to support dark mode, extracts rule descriptions from grammar JSDoc comments, and generates a manifest.json file that organizes diagrams by rule categories for better documentation structure.

dsl/domain-lang/packages/language/scripts · high confidence

Comprehensive validation rules for DomainLang models and manifests

The language package now enforces a full suite of validation checks on DomainLang models and manifest files. Bounded contexts must include a description and a domain reference, and warnings are raised if classification or team assignments are specified in both inline and block forms. Domains are required to have a vision statement, and circular subdomain hierarchies are detected and reported as errors. Context and domain maps must contain at least one element, and duplicate relationships within a context map are flagged. Integration patterns (such as Anti-Corruption Layer, Conformist, Open Host Service, Supplier, and Customer) are validated to ensure they are placed on the correct upstream or downstream side of relationships. The system also validates import statements for file existence, workspace boundaries, and cycles, and enforces schema rules on model.yaml manifests, including required fields for publishable packages and valid SemVer versions.

dsl/domain-lang/packages/language/src/validation · high confidence

Initial LSP server entry point with manifest diagnostics and diagram support

The extension now includes a dedicated language server entry point (main.ts) that initializes the DomainLang LSP connection and registers core services. This change introduces automatic validation of model.yaml files, sending diagnostics to the editor when the manifest changes or is deleted. It also enables interactive diagram generation via Sprotty handlers and registers custom LSP request handlers for language model tools, providing users with real-time feedback on configuration files and visual diagram capabilities within the IDE.

dsl/domain-lang/packages/extension/src/language · high confidence

Initial VitePress documentation site configuration

The site now uses VitePress for documentation, featuring a custom syntax highlighting grammar for DomainLang, a structured navigation system with guides, references, and examples, and dynamic base URL support for GitHub Pages and Cloudflare deployment. The configuration includes metadata for SEO, social links, footer information with sponsor attribution, and local search functionality.

site/.vitepress · high confidence

Initial release of the DomainLang VS Code extension

This change introduces the VS Code extension package for DomainLang, enabling users to define domains, bounded contexts, and context maps using a \.dlang\ syntax with full editor support. The extension provides syntax highlighting, IntelliSense, real-time validation, and navigation features for \.dlang\ files. It also exposes four AI language model tools (\domainlang\_validate\, \domainlang\_list\, \domainlang\_get\, \domainlang\_explain\) for use with VS Code agents like Copilot. The package includes configuration for building the extension and language server via esbuild, language configuration for comments and brackets, and documentation in the README.

dsl/domain-lang/packages/extension · high confidence

Interactive syntax diagrams with navigation and theming

The documentation site now includes interactive railroad diagrams for grammar rules. A new VitePress theme registers two Vue components: \SyntaxDiagrams\, which provides a searchable, category-organized explorer of all rules, and \RailroadDiagram\, which renders individual diagrams with zoom, pan, and clickable non-terminal references that navigate to other rules. The theme also applies brand-specific colors (cyan/blue) and ensures images are visible in both light and dark modes.

site/.vitepress/theme · high confidence

Introduce DomainLang CLI entry point with custom help and error handling

The CLI now features a dedicated entry point (main.ts) that uses yargs for command parsing and routing, integrating with Ink for rich terminal UI and falling back to direct output for JSON or quiet modes. It provides a custom help screen, handles version display, and implements graceful error handling that outputs JSON errors in JSON mode or user-friendly messages with command suggestions in other modes.

dsl/domain-lang/packages/cli/src · high confidence

Introduce Model Query SDK for fluent, type-safe model traversal

The SDK now provides a read-only, query-focused API for DomainLang models, enabling fluent, lazy-evaluation chains and O(1) indexed lookups by FQN, name, team, and classification. It exposes entry points tailored to deployment targets: \fromDocument()\ and \fromServices()\ for zero-copy LSP integration, \loadModelFromText()\ for browser-safe in-memory parsing, and \loadModel()\ (Node.js only) for CLI usage with automatic multi-file import graph traversal. AST nodes are augmented with computed properties such as \effectiveClassification\, \effectiveTeam\, \metadataMap\, and \fqn\, alongside helper methods like \hasClassification()\ and \hasType()\. The SDK also includes file and workspace validation capabilities, pattern-matching utilities for integration patterns (e.g., OpenHostService, Conformist), and serializers for LSP/MCP tool responses.

dsl/domain-lang/packages/language/src/sdk · high confidence

Introduce context map diagram visualization in the webview

The webview now renders a context map diagram using Sprotty, displaying bounded contexts as ellipses and relationships as edges with DDD-style annotations (U/D badges, partnership/separate-ways styles). This includes new CSS for theme-aware styling, a dependency-injection configuration for the diagram container, and custom view implementations for nodes, edges, and labels.

dsl/domain-lang/packages/extension/src/webview · high confidence

Introduces a new branded UI component library for the CLI

The CLI now features a comprehensive set of new React components built on Ink, providing a consistent and branded user experience. This includes a responsive Header with ASCII art branding that adapts to terminal width, a Footer displaying version and working directory, and a Banner component for styled status messages. Additional utility components such as ProgressBar, MultiProgressBar, Spinner, StatusMessage, Table, List, Divider, and KeyboardHints are now available to standardize feedback and data display across the tool.

dsl/domain-lang/packages/cli/src/ui · high confidence

New CLI package management service layer

The CLI now includes a comprehensive service layer for managing project dependencies, introducing new capabilities for resolving, installing, and analyzing packages. Users can now benefit from a robust dependency resolution engine that discovers transitive dependencies, enforces version constraints using a "Latest Wins" strategy, and generates reproducible lock files with pinned commit hashes. The installation process supports integrity verification via SHA-512 hashes, offers a "frozen" mode for CI environments to prevent lock file modifications, and includes a "force" mode to bypass the cache. To ensure secure access to private repositories, the system implements a credential provider with a priority chain (environment variables, git credential helpers, and public access) and includes security hardening such as input validation to prevent protocol injection. Additionally, the CLI provides tools for visualizing dependency trees, detecting circular dependencies, and enforcing organizational governance policies, including allowed/blocked sources and stability requirements.

dsl/domain-lang/packages/cli/src/services · high confidence

New DomainLang demo application with Node.js shims for web bundling

A new demo package has been added to the DomainLang workspace, providing a Vue-based web application served via Vite on port 5173. To enable Node.js-specific modules (such as fs, path, and worker\_threads) to function within the browser environment, the configuration includes specific Vite aliases that redirect these imports to corresponding shim files located in the src/shims directory. The build is configured to output ES modules and is scoped under the base path /DomainLang/demo/.

dsl/domain-lang/packages/demo · high confidence

New LSP features: code actions, context-aware completion, and enhanced outline symbols

The DomainLang LSP now provides several new capabilities to improve the editing experience. Code actions allow users to quickly fix import validation errors by adding missing dependencies to model.yaml, creating the manifest file, or running installation commands. Completion is now context-aware and grammar-aligned, offering snippets for creating domains, bounded contexts, and other constructs, while also handling import string completions and segmented dotted paths. The Outline view and breadcrumbs are enriched with meaningful icons and detail text (such as visions, descriptions, and relationship summaries) via a custom document symbol provider and node kind provider. Additionally, a code lens provider adds an 'Open diagram' action for context maps, and a new formatter handles indentation and spacing for block-based constructs and relationships.

dsl/domain-lang/packages/language/src/lsp · high confidence

New browser-based DomainLang playground demo

A new interactive web demo has been added to the DomainLang package, allowing users to edit .dlang models in a Monaco editor and instantly view the resulting AST and diagnostics in the browser. The application is supported by a set of Node.js environment shims (fs, path, os, child\_process, worker\_threads, util) that replace unavailable browser APIs with safe stubs, enabling the Langium-based language services to run client-side without server dependencies.

dsl/domain-lang/packages/demo/src · high confidence

New context map diagram generation and layout

Users can now generate context map diagrams that visualize bounded contexts and their relationships using standard DDD notation. The new generator renders contexts as ellipses and relationships as edges with upstream/downstream annotations and integration pattern labels. Layout is handled by an ELK-based configurator that arranges nodes in a top-to-bottom layered structure, placing upstream contexts above downstream ones.

dsl/domain-lang/packages/language/src/diagram · high confidence

New diagram visualization and AI-powered language model tools

The DomainLang extension now includes a diagram panel that renders context maps for .dlang files via a dedicated webview, accessible through the 'domainlang.diagram.open' command. Additionally, it registers four new Language Model tools (validate, list, get, explain) that allow users to interact with the language server through VS Code's AI capabilities, enabling validation, entity querying, and code explanation directly from the editor.

dsl/domain-lang/packages/extension/src/extension · high confidence

New package management and project scaffolding commands

The CLI now includes a full suite of package management and project setup commands. Users can initialize new projects with \dlang init\, which scaffolds a \model.yaml\, entry file, and directory structure from templates. Dependencies are managed via \dlang add\ (adds to \model.yaml\ and runs install), \dlang remove\ (removes from manifest and lock file, cleans cache), and \dlang install\ (resolves and locks dependencies with integrity verification). Additional maintenance commands include \dlang cache-clear\ to free disk space, \dlang outdated\ to check for available updates, and \dlang help\ to display the full command list. These commands share a unified infrastructure that supports both rich interactive UIs via Ink and machine-readable JSON output.

dsl/domain-lang/packages/cli/src/commands · high confidence

Standardized CLI exit codes and unified non-interactive command runner

The CLI now provides standardized Unix-style exit codes (e.g., VALIDATION\_ERROR, PARSE\_ERROR) with type-safe definitions and human-readable descriptions, improving CI/CD integration reliability. Additionally, a new \runDirect\ utility replaces scattered per-command runners, offering a single generic implementation that handles JSON, quiet, and error output formatting for non-interactive modes, while \output-mode\ utilities centralize the parsing of flags like \--json\, \--quiet\, and \--no-color\.

dsl/domain-lang/packages/cli/src/utils · high confidence

Behavioural changes

DomainLang language package restructured with context map diagrams and LSP security hardening

The language package has been reorganized into a modular structure, introducing a new context map diagram generator and layout engine for visualizing bounded context relationships. The language server (LSP) has been hardened with security checks to prevent arbitrary file loading via the DOMAINLANG\_ENTRY environment variable, and now supports custom request handlers for VS Code Language Model Tools. The grammar has been updated to support direct property access, standardized keyword casing, and new metadata element definitions, while dependency management logic has been moved to the CLI package to streamline the language service.

dsl/domain-lang/packages/language/src · high confidence

Enforce commit message standards and run tests on pre-commit

The \dsl/domain-lang\ package now enforces commit message conventions via a \commit-msg\ hook that runs \commitlint\ within the package directory, and automatically runs \npm test\ before every commit via a \pre-commit\ hook. This ensures that all commit messages adhere to the defined format and that the package's test suite passes before changes are recorded.

dsl/domain-lang/.husky · high confidence

Enforce strict code quality and linting standards

The DomainLang workspace now enforces strict code quality through ESLint and commitlint. An ESLint configuration is applied to TypeScript files, disallowing implicit \any\ types and unused variables, while warning on explicit function return types and non-null assertions. Generated syntaxes and scripts are excluded from linting to prevent false positives. Additionally, commit messages are validated against the conventional commit standard to ensure consistent history.

dsl/domain-lang · high confidence

New manifest-centric workspace and import resolution services

The language service now introduces a suite of new modules in the services directory to support a manifest-centric workspace model. This includes a ManifestManager for discovering workspace roots via model.yaml, an ImportResolver that handles local, alias, and external dependency resolution with targeted caching, and an ImportGraph service to recursively build dependency graphs from entry files. Supporting infrastructure includes a structured LSP logger for debugging, runtime settings for trace control, manifest utility functions for file discovery, a PackageBoundaryDetector for scoping external packages, and a PerformanceOptimizer for caching lock files and manifests. These changes shift the underlying architecture from ad-hoc file handling to a structured, cache-aware, and manifest-driven approach.

dsl/domain-lang/packages/language/src/services · high confidence

Structured hover documentation with keyword explanations and rich context

The LSP hover provider now generates rich, structured Markdown documentation for DomainLang elements. It includes a comprehensive keyword dictionary that provides instant definitions and documentation links for all language keywords, operators, and DDD relationship patterns (such as ACL, OHS, and Shared Kernel). For domain constructs like Bounded Contexts and Domains, hovers now display detailed signatures, effective team and classification assignments, and sections for terminology, decisions, and relationships, all formatted consistently with native VS Code styling.

dsl/domain-lang/packages/language/src/lsp/hover · high confidence

Updated DSL examples to reflect new grammar and syntax

The example files in dsl/domain-lang/examples have been updated to align with recent grammar changes, including the adoption of lowercase shorthands (e.g., 'bc' instead of 'BoundedContext') and the removal of the ContextGroup concept. New examples demonstrate metadata definitions, import aliases, and multi-reference scenarios, while existing files like banking-system.dlang and healthcare-system.dlang have been corrected to fix syntax errors and ensure consistency with the new keyword casing rules.

dsl/domain-lang/examples · high confidence

Updated README with CI badges, SonarQube metrics, and sponsorship info

The project README now displays CI status, SonarQube coverage, security rating, and vulnerability badges, alongside a prerelease warning and sponsorship acknowledgment from thinkability. A new sonar-project.properties file configures SonarQube analysis for the language, CLI, and extension packages, defining source/test paths, exclusions, and LCOV coverage report locations.

(repo-wide) · high confidence

Test coverage

Added E2E tests for import resolution and cached package handling; Added comprehensive LSP test coverage; Added comprehensive linking tests for cross-reference resolution; Added comprehensive parsing tests for DSL grammar rules; Added comprehensive test coverage for scoping, import resolution, and reference validation; Added comprehensive test coverage for the DomainLang SDK; Added comprehensive validation test coverage for the domain language; Added integration tests for CLI package lifecycle, query, and validation commands; Added resilience tests for import parsing and standalone file handling; Added shared test utilities for DomainLang parsing and validation; Added snapshot tests for CLI help and validate commands; Added test coverage for language services; Added tests for context map diagram generation; Added tests for language model tools and diagram panel; Added tests for manifest utility functions; Added tests for multi-target reference resolution; Added unit tests for CLI UI components and utilities; New test utilities for Ink-based CLI components; Updated CLI help snapshot to reflect new command structure.

Dependencies

Initial release of DomainLang 0.14.2 with multi-package workspace structure

This change introduces the initial version 0.14.2 of the DomainLang project, establishing a multi-package npm workspace that separates the codebase into four distinct packages: the core language library (@domainlang/language), the command-line interface (@domainlang/cli), the VS Code extension (vscode-domainlang), and a demo application (domain-lang-demo). The project is configured to run on Node.js 22 and requires VS Code version 1.109.0 or higher. Key dependencies include Langium 4.2.0 for language processing, React 19 and Ink 7 for the CLI interface, and VitePress 1.6.3 for the documentation site.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 51 → 57 (+6.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 74 → 74 (+0.1)
  • Architecture 87 → 85 (-2.0)
  • Maturity 42 → 64 (+22.1)
  • Readiness 57 → 52 (-4.7)
  • Security 54 → 55 (+1.7)
  • Performance 60 → 60 (+0.0)

Resolved (54)

  • High CVE: [GHSA redacted] (dsl/domain-lang/package-lock.json)
  • High CVE: [GHSA redacted] (dsl/domain-lang/package-lock.json)
  • High CVE: [GHSA redacted] (dsl/domain-lang/package-lock.json)
  • High CVE: [GHSA redacted] (dsl/domain-lang/package-lock.json)
  • Low coverage: dsl/domain-lang/packages/cli/src/commands/command-runner.ts (dsl/domain-lang/packages/cli/src/commands/command-runner.ts)
  • Low coverage: dsl/domain-lang/packages/cli/src/commands/query.tsx (dsl/domain-lang/packages/cli/src/commands/query.tsx)
  • Low coverage: dsl/domain-lang/packages/cli/src/test-utils/render.tsx (dsl/domain-lang/packages/cli/src/test-utils/render.tsx)
  • Low coverage: dsl/domain-lang/packages/cli/src/ui/components/Footer.tsx (dsl/domain-lang/packages/cli/src/ui/components/Footer.tsx)
  • Low coverage: dsl/domain-lang/packages/cli/src/ui/components/ProgressBar.tsx (dsl/domain-lang/packages/cli/src/ui/components/ProgressBar.tsx)
  • Low coverage: dsl/domain-lang/packages/language/src/diagram/context-map-diagram-generator.ts (dsl/domain-lang/packages/language/src/diagram/context-map-diagram-generator.ts)
  • Low coverage: dsl/domain-lang/packages/language/src/diagram/context-map-layout-configurator.ts (dsl/domain-lang/packages/language/src/diagram/context-map-layout-configurator.ts)
  • Low coverage: dsl/domain-lang/packages/language/src/diagram/elk-layout-factory.ts (dsl/domain-lang/packages/language/src/diagram/elk-layout-factory.ts)
  • Low coverage: dsl/domain-lang/packages/language/src/domain-lang-module.ts (dsl/domain-lang/packages/language/src/domain-lang-module.ts)
  • Low coverage: dsl/domain-lang/packages/language/src/lsp/domain-lang-code-actions.ts (dsl/domain-lang/packages/language/src/lsp/domain-lang-code-actions.ts)
  • Low coverage: dsl/domain-lang/packages/language/src/lsp/domain-lang-code-lens-provider.ts (dsl/domain-lang/packages/language/src/lsp/domain-lang-code-lens-provider.ts)
  • Low coverage: dsl/domain-lang/packages/language/src/lsp/domain-lang-completion.ts (dsl/domain-lang/packages/language/src/lsp/domain-lang-completion.ts)
  • Low coverage: dsl/domain-lang/packages/language/src/lsp/domain-lang-document-symbol-provider.ts (dsl/domain-lang/packages/language/src/lsp/domain-lang-document-symbol-provider.ts)
  • Low coverage: dsl/domain-lang/packages/language/src/lsp/domain-lang-formatter.ts (dsl/domain-lang/packages/language/src/lsp/domain-lang-formatter.ts)
  • Low coverage: dsl/domain-lang/packages/language/src/lsp/domain-lang-index-manager.ts (dsl/domain-lang/packages/language/src/lsp/domain-lang-index-manager.ts)
  • Low coverage: dsl/domain-lang/packages/language/src/lsp/domain-lang-node-kind-provider.ts (dsl/domain-lang/packages/language/src/lsp/domain-lang-node-kind-provider.ts)
  • …and 34 more

New (48)

  • Classify ADR enforcement: ADR 004: Layered architecture review and remediation plan (adr/004-layered-architecture-review.md)
  • Classify ADR enforcement: ADR-003: Import Aliases and Package-Boundary Transitive Scoping (adr/003-import-alias-and-package-scope.md)
  • Classify ADR enforcement: Architecture Review: DomainLang Implementation (adr/002-architectural-review-2025.md)
  • High CVE: [CVE redacted] (dsl/domain-lang/package-lock.json)
  • High CVE: [GHSA redacted] (site/package-lock.json)
  • High CVE: [GHSA redacted] (dsl/domain-lang/package-lock.json)
  • High CVE: [GHSA redacted] (dsl/domain-lang/package-lock.json)
  • High CVE: [GHSA redacted] (site/package-lock.json)
  • High CVE: [GHSA redacted] (site/package-lock.json)
  • High CVE: [GHSA redacted] (dsl/domain-lang/package-lock.json)
  • High CVE: [GHSA redacted] (dsl/domain-lang/package-lock.json)
  • High vulnerability: [GHSA redacted] (site/package-lock.json)
  • Medium CVE: [GHSA redacted] (dsl/domain-lang/package-lock.json)
  • Medium CVE: [GHSA redacted] (dsl/domain-lang/package-lock.json)
  • doc comments repeat the names (dsl/domain-lang/packages/cli/src/commands/query.tsx)
  • doc comments repeat the names (dsl/domain-lang/packages/language/src/lsp/domain-lang-completion.ts)
  • redundant comment (dsl/domain-lang/packages/cli/src/commands/add.tsx)
  • redundant comment (dsl/domain-lang/packages/cli/src/commands/init.tsx)
  • redundant comment (dsl/domain-lang/packages/cli/src/services/dependency-resolver.ts)
  • redundant comment (dsl/domain-lang/packages/cli/src/services/dependency-resolver.ts)
  • …and 28 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

DomainLang/DomainLang was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 9 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 6693671bfd0ae471c04052223b06ebfc59a4c30d — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-bb0cb800cd0f.