Skip to content
CAI
Software that uses CAICheck a score

mvcds/hubi

55.0

Adequate · 21 September 2026

1.1k

lines of production code

JavaScript

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Hubi is a command-line tool that parses domain-specific language definitions from YAML files and translates them into various source code artifacts. It supports multiple output formats, including Joi validation schemas, structured log data, static HTML documentation, and custom schema representations. The system manages token loading, attribute parsing, and dependency analysis to generate these translations, with optional file-watching capabilities for automated updates.

Features

Add LogTranslator to parse log data into structured objects

A new LogTranslator class has been added to the domain layer. It extends the base Translator to interpret log tokens, extracting their raw name, description, and attributes into a structured object format.

src/Domain/Objects/Translator/LogTranslator · high confidence

Add conditional logging service with environment and flag-based control

A new 'LogConditionally' service has been introduced to the domain layer, providing a mechanism to conditionally log messages. The service supports two modes of operation: it can be restricted by a boolean 'canLog' flag, or by comparing the current 'NODE\_ENV' against a specified environment string. Tests confirm that messages are printed when conditions are met and suppressed otherwise.

src/Domain/Services/LogConditionally · medium confidence

Add console logging for ubiquitous language translations

A new use case, LogUbiquitousLanguageIntoConsole, has been introduced to handle the final step of the translation pipeline. This component retrieves the translated files, iterates through each lexicon item, and logs the resulting translated text to the console. The implementation relies on the existing UsesTranslator and TranslateDomainFilesToUbiquitousLanguage services, with a corresponding test suite verifying the interaction with these dependencies.

src/Domain/UseCases/LogUbiquitousLanguageIntoConsole · high confidence

Add deprecation object to domain models

A new Deprecated class has been introduced in the domain layer to handle deprecation metadata for objects. This class accepts a name and a deprecation configuration, allowing consumers to access structured deprecation messages and error flags, thereby providing a clearer interface for marking and reading deprecation status.

src/Domain/Objects/Deprecated · high confidence

Add token loading service with validation

A new LoadsTokens service has been introduced to load token definitions from YAML fixture files. The service reads files matching a glob pattern, parses them into UbiquitousToken entities, and enforces uniqueness for both token names and aliases. It will throw errors if duplicate names or aliases are detected, ensuring data integrity during the tokenization process.

src/Domain/Services/LoadsTokens · high confidence

Added Joi schema translator

A new translator has been introduced to convert domain objects into Joi validation schemas. This addition allows the system to generate JavaScript files containing Joi schema definitions, enabling runtime validation for data structures.

src/Domain/Objects/Translator/JoiTranslator · high confidence

Added Joi translation for argument and range attributes

The codebase now supports translating function argument counts and numeric range constraints into Joi validation schemas. New modules in the Attribute directory handle generating \.minArity\/\.maxArity\ chains for arguments and \.min\/\.max\ chains for numeric ranges, with corresponding factory functions and unit tests.

src/Domain/Objects/Translator/JoiTranslator/Attribute · high confidence

Added RequiresAttribute service and tests

A new 'RequiresAttribute' service has been introduced to validate that specific attributes are present and not null or undefined in a given data object. The implementation includes a corresponding test suite that verifies error handling for missing or null values, as well as invalid usage scenarios.

src/Domain/Services/RequiresAttribute · high confidence

Added file-based translation use case with optional file-watching

A new use case, SaveUbiquitousLanguageIntoFile, has been introduced to translate domain files into source files and save them to disk. The implementation supports multiple translators (ubi, log, site, joi) and allows specifying an output directory or writing to the same folder as the source. A key addition is the 'watch' flag, which, when enabled, uses glob-watcher to monitor file changes and automatically re-run the translation process upon add, change, or remove events.

src/Domain/UseCases/SaveUbiquitousLanguageIntoFile · high confidence

Added fixture files for the File domain model

Added new fixture files for the File domain model, including JSON, Joi, log, site, and UBI schema definitions. The File model includes a 'name' (string, required, max 255), 'content' (array of floats), and 'size' (integer, deprecated, default 0). The site fixture generates an HTML page displaying these attributes in a table, while the Joi fixture provides validation rules.

src/Domain/UseCases/SaveUbiquitousLanguageIntoFile/fixture · high confidence

Initial project scaffolding and CI/CD configuration

The repository was initialized with essential configuration files to support development workflows and automated releases. This includes setting up Husky for pre-commit and commit-msg hooks (using lint-staged and commitlint), configuring .editorconfig for consistent code formatting, and defining .gitattributes for binary file handling. A .nvmrc file specifies Node.js version v13.1.0. The project also introduces a semantic-release workflow via .releaserc.yaml and a Travis CI build matrix (.travis.yml) that runs tests, generates coverage, and triggers releases on the master branch. Additionally, standard documentation files like README.md, CONTRIBUTING.md, and CODE\_OF\_CONDUCT.md were added to guide contributors and establish community standards.

(repo-wide) · high confidence

Introduce AttributeParser to handle diverse data types

The system now includes an AttributeParser that automatically detects and parses various data types—including strings, booleans, dates, floats, integers, JSON, objects, arrays, functions, and tokens—into corresponding attribute instances. This parser also supports deprecation metadata and allows for function-based attributes, providing a unified way to process different attribute formats.

src/Domain/Objects/AttributeParser · high confidence

Introduce Translation object for dependency and dependent analysis

A new Translation object has been added to the domain layer, providing methods to analyze the dependency graph of translation items. The implementation includes logic to calculate both dependencies (what a translation item relies on) and dependents (what relies on a specific item) by traversing a lexicon map. This allows users to inspect the structural relationships between translation tokens and their attributes, facilitating deeper analysis of source file structures.

src/Domain/Objects/Translation · high confidence

Introduce UbiTranslator for schema-based translation

A new UbiTranslator component has been added to the Domain/Objects/Translator directory. It provides a mechanism to interpret tokens by applying a Pug template to generate a schema representation. This change introduces a specific translation logic that converts attribute data into a structured schema format, supporting required fields and array types.

src/Domain/Objects/Translator/UbiTranslator · medium confidence

Introduce UbiquitousLanguage object for token-based translation

A new UbiquitousLanguage domain object has been added to manage a collection of language tokens. This object validates incoming data against a schema, stores tokens in a Map, and provides a translateEachToken method that iterates over tokens to produce a translated output. The implementation includes a corresponding YAML schema definition that describes the structure of the Ubiquitous Language, including its name, description, and attributes for tokens.

src/Domain/Objects/UbiquitousLanguage · high confidence

Introduce UbiquitousToken entity with domain file support

A new UbiquitousToken entity has been added to the domain layer, allowing users to define pieces of the ubiquitous language with structured attributes, aliases, and abstract configuration. The entity is backed by a YAML domain file that specifies metadata such as name, description, and comments, while the JavaScript implementation handles parsing attributes and managing aliases. This change enables more granular control over domain objects, supporting features like abstract tokens that do not require translation and can be shared across projects.

src/Domain/Entities · high confidence

Introduce a new name normalization service

A new service has been introduced to handle name normalization, which converts text to lowercase and replaces spaces with hyphens.

src/Domain/Services/NormalizeName · high confidence

Introduce new CLI entry points for logging and saving ubiquitous language objects

The CLI now exposes two new executable scripts, \hubi-log\ and \hubi-save\, which provide command-line interfaces for logging and saving ubiquitous language objects respectively. The \hubi-log\ command accepts a glob pattern and a translator type to output domain data to the console. The \hubi-save\ command allows users to specify an output folder, a glob pattern, a translator type, and a watch mode to monitor file changes. These scripts utilize the \commander\ library for argument parsing and expose options for verbose logging, pattern matching, and file watching.

src/CLI · high confidence

Introduce site translation for ubiquitous language

A new SiteTranslator is introduced to generate a static HTML site from the ubiquitous language. The implementation renders a structured page using a Pug template that displays tokens as expandable details with their attributes, descriptions, and default values. The output is processed through HTML Tidy for formatting, and the resulting HTML includes a header with hubi attribution and a GitHub fork ribbon.

src/Domain/Objects/Translator/SiteTranslator · medium confidence

Introduce structured attribute types and decorators

The attribute parser now supports a comprehensive set of typed attributes (String, Boolean, Date, Float, Integer, JSON, Object, Function, and Array) each with specific type handling. A new decorator system (Range) allows attributes to carry min/max constraints, and the factory provides standardized creation for primitives, arrays, and deprecated states. This restructures how attributes are defined, validated, and extended within the domain model.

src/Domain/Objects/AttributeParser/Attributes · high confidence

Introduce the Translator domain object

Added a new Translator class in src/Domain/Objects/Translator that acts as an abstract concept for interpreting ubiquitous language tokens to generate source files. The implementation includes a translate method that processes tokens via an injectable interpretToken function and a configurable createLexicon step, returning a Translation object. The component is defined as an abstract class with an alias to 'Plugin', indicating it serves as a base for specific translation implementations.

src/Domain/Objects/Translator · high confidence

Behavioural changes

Add support for Joi translator

The UsesTranslator service now includes the Joi translator alongside the existing Ubi, Log, and Site translators. Users can now select 'joi' as a valid translator name; attempting to use an unknown translator name will result in an error.

src/Domain/Services/UsesTranslator · high confidence

Added coverage.sh script for running unit and integration tests

A new shell script named coverage.sh has been added to the scripts directory. This script executes both unit and integration tests using npm, addressing issues where coverage was not running properly.

scripts · low confidence

Test coverage

Added BDD tests for the Translate Domain Files to Ubiquitous Language use case

A new feature file and step definitions have been added for the TranslateDomainFilesToUbiquitousLanguage use case. The tests verify that the use case correctly reads glob patterns, loads tokens from files, and accurately calculates dependencies and dependents for various scenarios, including referenceless tokens, missing referenced tokens, and simple references between entities like 'engine', 'car', and 'driver'.

src/Domain/UseCases/TranslateDomainFilesToUbiquitousLanguage · high confidence

Dependencies

Initial release of Hubi v4.9.1

The Hubi package is introduced as a new dependency, providing a 'Humanitarian ubiquitous language helper' CLI tool. This release establishes the project's baseline with Node.js \>=13.1.0, npm \>=5.6.0, and Yarn \>=1.15.2, alongside a suite of dependencies including Commander, Joi, and Mocha for testing and linting.

(dependencies) · high confidence

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

How this codebase got here

Score

  • CAI 53 → 55 (+1.8)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 61 → 63 (+2.3)
  • Architecture 69 → 69 (+0.0)
  • Maturity 47 → 50 (+2.8)
  • Readiness 52 → 51 (-0.7)
  • Security 75 → 72 (-2.6)
  • Accessibility 74 (new)

Resolved (56)

  • Coverage not included — suite not readable by the collector
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • …and 36 more

New (87)

  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • High CVE: [GHSA redacted] (yarn.lock)
  • …and 67 more

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

Survey your own repository

mvcds/hubi 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 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit afb8299d684b652ada39e1cdc2a6d3671ff5ee9c — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.