elixir-toniq/norm
69.6
Adequate · 3 October 2026
1.5k
lines of production code
Elixir
primary language
2
measurements over time
What this system is
This system is an Elixir library designed for data validation, normalization, and property-based test data generation. It provides a protocol-based architecture to conform values against schemas and contracts, returning structured errors rather than raising exceptions by default. The library supports complex type specifications, including unions and intersections, and integrates with StreamData to generate valid test data for verified types.
Features
Initial project scaffolding and documentation
The repository is initialized with core configuration files including \.credo.exs\ for code linting, \.formatter.exs\ for Elixir formatting, and a \.gitignore\ that excludes Elixir Language Server artifacts. A comprehensive \README.md\ is added, documenting the library's capabilities for data validation, generation, and function contracts, while a \CHANGELOG.md\ and \LICENSE.md\ are also introduced to track history and licensing.
(repo-wide) · high confidence
Introduces core specification types and selection logic
This change adds the internal core modules that define how specifications are structured and validated. It introduces \Norm.Core.Schema\ for defining map/struct schemas, \Norm.Core.Selection\ for enforcing required keys within those schemas, and \Norm.Core.Collection\ for validating lists and maps with constraints like distinctness and count limits. It also adds \Norm.Core.AllOf\, \Norm.Core.AnyOf\, and \Norm.Core.Alt\ to support combining specifications (intersection, union, and alternative matching), along with \Norm.Core.Delegate\ for late-binding specs. These modules implement the \Norm.Conformer.Conformable\ protocol for validation and, when \StreamData\ is available, the \Norm.Generatable\ protocol for generating test data.
lib/norm/core · high confidence
Introduces value conformance and design-by-contract validation
This change adds the core infrastructure for validating and normalizing data structures. It introduces a \Norm.Conformer\ module with a protocol-based system to conform values (currently supporting Atoms and Tuples) and return structured errors. It also adds \Norm.Contract\, allowing users to define argument and return value specifications using a \@contract\ macro, which automatically validates inputs and outputs at runtime. Additionally, it includes \Norm.Generatable\ support for generating test data via \stream\_data\ and defines specific error types like \Norm.MismatchError\ and \Norm.GeneratorLibraryError\ to provide clear feedback when validation fails.
lib/norm · high confidence
Behavioural changes
Major API overhaul with dedicated conforming and generation modules
The library has been refactored to replace the previous inline predicate-based validation with a modular architecture using dedicated \Conformer\, \Generatable\, and \Generator\ modules. This change introduces a new \conform/2\ function that returns a success tuple containing either the conformed value or a list of errors, replacing the older error-raising behavior. A \conform!/2\ variant is provided for cases where raising a \MismatchError\ on failure is desired. Additionally, the \gen/1\ function now explicitly checks for the presence of the \StreamData\ library before attempting to generate values, raising a \GeneratorLibraryError\ if the dependency is missing, which makes \StreamData\ a truly optional dependency for validation-only use cases.
lib · high confidence
Removal of legacy config/config.exs file
The project has removed the legacy config/config.exs file, which previously used the deprecated Mix.Config module. This change eliminates the configuration file entirely, implying that application configuration is now handled elsewhere (likely via mix.exs or removed), and users should no longer rely on this file for environment or dependency settings.
config · high confidence
Test coverage
Added test coverage for core Norm specification features; Added test support modules for case templates and user structs; Added tests for contract validation and generator behavior; Added tests for primitive type generation; Expanded test coverage for schema validation, generation, and error reporting.
Dependencies
Update project dependencies and configuration
The project dependencies have been updated, locking Credo to version 1.7.13, ExDoc to 0.40.0, and StreamData to 1.2.0. The minimum supported Elixir version has been raised from 1.7 to 1.11, and the application configuration now enables contracts by default.
(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 69 → 70 (+0.6)
- Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 49 → 49 (+0.0)
- Readiness 77 → 78 (+1.7)
- Security 96 → 96 (+0.9)
Resolved (3)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (7 lines × 2) (lib/norm/errors.ex)
New (1)
- Duplicated block (10 lines × 2) (lib/norm/errors.ex)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
elixir-toniq/norm 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 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 0e5f68f1143ca0287d2795f13b27c6f886eaa5b7 — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-8fe32cd45d00.