Skip to content
CAI
Software that uses CAICheck a score

michalkowal/FluentSpecification

63.7

Adequate · 21 September 2026

13.2k

lines of production code

C#

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

FluentSpecification is a .NET library that implements the Specification pattern to provide a fluent, composable API for object validation and data filtering. It allows developers to construct complex, reusable validation rules that can be combined using logical operators and translated into LINQ expressions for database queries. The system includes built-in validators for common scenarios like email and credit card formats, as well as utilities for property and type checking.

Features

Add composite specification implementations

The FluentSpecification.Core.Composite namespace now includes new classes for composing specifications: AndSpecification and OrSpecification for logical AND/OR combinations, NotSpecification for logical negation, CastSpecification for type conversion checks, and PropertySpecification for validating object properties. These classes implement the IComplexSpecification interface and provide both direct evaluation and LINQ expression generation capabilities.

src/FluentSpecification.Core/Composite · high confidence

Adds built-in specification implementations for common validation scenarios

The FluentSpecification library now includes a suite of built-in specifications to simplify common validation tasks. This includes base abstractions for comparing values (BaseCompareSpecification, BaseBetweenSpecification) and collections (BaseCollectionSpecification), as well as concrete implementations for checking if a collection is empty, contains an element, or satisfies a condition for all/any elements. Additionally, the library provides ready-to-use validators for email addresses, credit card numbers, and string emptiness, along with JetBrains annotation attributes to improve static analysis and IDE support.

src/FluentSpecification · high confidence

Introduce complex specification support and validation result generation

The FluentSpecification.Core library now provides a more robust validation and composition model. Users can now convert specifications into LINQ expressions or predicates, and combine them using logical operators (And, Or, Not) via extension methods on the SpecificationCore class. The library also introduces a TranslatableSpecification that allows for custom error message generation based on the candidate value, and a SpecificationResultGenerator to help construct detailed validation results. These changes enable more expressive and composable specification patterns.

src/FluentSpecification.Core · medium confidence

Introduce generic specification interfaces and validation result types

The FluentSpecification.Abstractions library now exposes a comprehensive set of generic interfaces to support complex, composable, and LINQ-enabled specifications. New interfaces include IComplexSpecification for validation and LINQ support, ICompositeSpecification for composing multiple specifications, ILinqSpecification for lambda-based queries, and INegatableSpecification/INegatableLinqSpecification for handling NOT conditions. Additionally, the validation model has been expanded with IValidationSpecification and INegatableValidationSpecification, which return a SpecificationResult containing a list of FailedSpecification objects. This allows consumers to access detailed error information and trace messages for each failed specification, improving debugging and error reporting.

src/FluentSpecification.Abstractions · high confidence

New utility classes for fluent specification composition and expression handling

The FluentSpecification.Core library now includes new utility classes in the Utils namespace to support fluent API composition of specifications. This includes proxy classes (AndFluentProxy, AndNotFluentProxy, OrFluentProxy, OrNotFluentProxy) that enable chaining logical AND/OR operations on specifications. Additionally, ExpressionComposer and ExpressionParameterRebinder provide helper methods for composing LINQ expressions, while SpecificationResultExtensions adds methods to merge failed specification parameters. These utilities allow developers to build complex validation logic more expressively.

src/FluentSpecification.Core/Utils · high confidence

Architecture

Project structure and build configuration initialization

The repository's \src\ directory is reorganized with new build infrastructure: a \global.json\ pins the .NET Core SDK to version 3.1.102, and a shared \Shared.msbuild\ file defines multi-targeting for .NET Standard 1.1/1.6/2.0 and .NET Framework 4.5.2. Assembly metadata is centralized in \SolutionInfo.cs\, while \AssemblyInfo.cs\ and \AssemblyInfo.PublicKey.cs\ configure internal visibility and strong-name signing. The solution file (\FluentSpecification.sln\) is updated to include the new project structure, and a \FluentSpecification.sln.DotSettings\ file is added to suppress specific Resharper warnings.

src · high confidence

Behavioural changes

Added NuGet configuration for package sources

A new NuGet configuration file has been added to the project, explicitly defining the official NuGet.org v3 package source. This change ensures that package restoration uses the correct protocol and endpoint for retrieving dependencies.

.nuget · medium confidence

Build system updated to Cake 3.0.1 and .NET 4.5.2

The build system has been upgraded to use Cake.Recipe 3.0.1 and Cake 1.3.0, with the .NET Framework target changed from .NET Standard to .NET Framework 4.5.2. The build scripts (build.ps1, build.sh) and configuration files (build.cake, appveyor.yml) have been updated to reflect these changes, including the use of the .NET Core runner and updated tool versions for Coveralls and Resharper.

(repo-wide) · high confidence

Test coverage

Added integration tests for composite specifications and data fixtures; Added mock implementations and unit tests for specification types; Added test data for specification validation scenarios; Added unit tests for ComplexSpecification, SpecificationAdapter, and TranslatableSpecification; Added unit tests for composite and cast specifications; Added unit tests for specification API methods; Added unit tests for the Specification API.

Dependencies

Updated Cake build tool to version 1.3.0

The Cake build tool dependency has been updated to version 1.3.0, ensuring the project uses the latest features and fixes from the Cake ecosystem for the build process.

(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

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 68 → 64 (-4.4)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 86 → 73 (-12.9)
  • Architecture 98 → 98 (-0.1)
  • Maturity 61 → 61 (+0.0)
  • Readiness 64 → 56 (-7.9)
  • Security 81 → 85 (+4.8)

Resolved (19)

  • BarePragmaDisable (src/FluentSpecification.Abstractions/Annotations.cs)
  • BarePragmaDisable (src/FluentSpecification.Core/Annotations.cs)
  • BarePragmaDisable (src/FluentSpecification.Integration.Tests/Annotations.cs)
  • BarePragmaDisable (src/FluentSpecification.Tests.Sdk/Annotations.cs)
  • BarePragmaDisable (src/FluentSpecification.Tests/Annotations.cs)
  • BarePragmaDisable (src/FluentSpecification/Annotations.cs)
  • Bounded contexts not declared
  • Build did not complete in the analyzer
  • High CVE: Microsoft.NETCore.App 1.1.2
  • High CVE: Microsoft.NETCore.App 1.1.2
  • High CVE: Microsoft.NETCore.App 2.2.0
  • High CVE: Microsoft.NETCore.App 2.2.0
  • Medium CVE: Microsoft.NETCore.App 2.2.0
  • No exposed public API
  • Test runner surfaced no tests
  • The NuGet package graph diagram is static and does not show the full project hierarchy, so readers cannot tell which packages depend on FluentSpecification.Abstractions or FluentSpecification.Core. (docs/input/docs/usage/installation.md)
  • dormant codebase — no living knowledge left to concentrate
  • redundant comment (src/FluentSpecification.Abstractions/Annotations.cs)
  • redundant comment (src/FluentSpecification.Abstractions/Annotations.cs)

New (19)

  • Duplicated block (16 lines × 2) (src/FluentSpecification/Common/ExclusiveBetweenSpecification.cs)
  • Duplicated block (17 lines × 3) (src/FluentSpecification.Abstractions/Annotations.cs)
  • Duplicated block (17 lines × 3) (src/FluentSpecification.Abstractions/Annotations.cs)
  • Duplicated block (7 lines × 3) (src/FluentSpecification.Core/Composite/CastSpecification.Validation.cs)
  • FileScopedPragmaDisable (src/FluentSpecification.Abstractions/Annotations.cs)
  • FileScopedPragmaDisable (src/FluentSpecification.Core/Annotations.cs)
  • FileScopedPragmaDisable (src/FluentSpecification.Integration.Tests/Annotations.cs)
  • FileScopedPragmaDisable (src/FluentSpecification.Tests.Sdk/Annotations.cs)
  • FileScopedPragmaDisable (src/FluentSpecification.Tests/Annotations.cs)
  • FileScopedPragmaDisable (src/FluentSpecification/Annotations.cs)
  • High CVE: Microsoft.NETCore.App 1.1.2
  • High CVE: Microsoft.NETCore.App 2.2.0
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Inconsistent method naming due to a typo/redundancy. The first method name contains a duplicated word 'Between' ('LengthBetweenBetween') which appears to be a typo, whereas the second method correctly uses 'InclusiveBetween'.
  • Inconsistent naming convention for API invocation tests. Most tests follow the pattern 'Invoke[Operation]Property_Return[Type]Specification' or 'Invoke[Operation]_Return[Type]Specification'. However, 'MultipleSpecificationsWIthNotLinqSpecification_ReturnOneItem' uses 'WIth' (capital W typo) and 'NotLinqSpecification' which is structurally different from the standard 'Invoke[Type]_Return[Type]' pattern. Additionally, there is a mix of returning 'PropertySpecification' vs 'NotSpecification' vs 'EqualSpecification' etc., but the primary inconsistency is the typo 'WIth' and the non-standard 'NotLinqSpecification' phrasing compared to the clean 'Invoke..._Return...' pattern.
  • No dependency advisory monitoring
  • redundant comment (src/FluentSpecification.Core/Composite/CastSpecification.cs)
  • redundant comment (src/FluentSpecification.Core/Utils/ExpressionComposer.cs)

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

Survey your own repository

michalkowal/FluentSpecification 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 96be7fde4e0eb445a512f153816f290e3143ccec — 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-28e75b8e3254.