Skip to content
CAI
Software that uses CAICheck a score

G-Research/ShapeSifter

66.8

Adequate · 3 October 2026

726

lines of production code

F#

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

ShapeSifter is an F\# library designed for type-safe datatype-generic programming, enabling compile-time reflection and runtime analysis of complex type structures. It provides utilities to deconstruct primitives, collections, records, and unions into heterogeneous lists, facilitating bi-directional conversion and type-level pattern matching. The system includes a comprehensive test suite and enforces code formatting standards via Git hooks to maintain code quality.

Features

Initial release of ShapeSifter for F\# type-safe datatype-generic programming

ShapeSifter is introduced as a library for type-safe datatype-generic programming in F\#. It provides the \tType\<'a\>\ function and active patterns in the \Patterns\ module to reflectively determine the structure of a type at compile time, returning evidence via \Teq\ (from the TypeEquality library). Users can match on primitives, collections, options, maps, tuples, functions, dictionaries, records, and unions. For records, the library exposes field data, a heterogeneous list of field types, and a converter to interchange between the record and its field values, enabling type-safe manipulation of complex data structures.

(repo-wide) · high confidence

ShapeSifter library introduces type-level pattern matching and conversion crates

The ShapeSifter library now provides a comprehensive set of tools for runtime type analysis and conversion. It introduces 'TeqCrates' for types like arrays, lists, options, maps, and sets, which allow users to check if a runtime type matches a specific generic structure and extract type parameters. Additionally, it adds 'ConvCrates' for F\# tuples, records, and discriminated unions, enabling bi-directional conversion between these native types and heterogeneous lists (HList) or SumOfProducts structures. These capabilities are exposed through a unified set of active patterns in the \Patterns\ module (e.g., \\|Tuple\|\, \\|Record\|\, \\|Array\|\), allowing users to deconstruct and analyze complex types at runtime in a type-safe manner.

ShapeSifter · high confidence

Behavioural changes

Pre-push hook enforces Fantomas code formatting

A new pre-push Git hook has been added that automatically checks code formatting using Fantomas before allowing a push. If the code is not properly formatted, the push is blocked and an error message is displayed, prompting the user to run \dotnet fantomas .\ to fix the issues.

hooks · high confidence

Test coverage

Initial test suite for ShapeSifter core patterns and utilities

Added a comprehensive set of NUnit tests in the ShapeSifter.Test project to verify the library's type-level pattern matching capabilities. The tests cover active patterns for basic types (int, string, unit), collections (list, array, map, tuple), and functional types (function, pair). It also includes specific validation for discriminated union and record types, ensuring that custom attributes on union cases and record fields are correctly extracted and filtered. Additionally, the suite includes a CSV parsing example to demonstrate practical usage of the type conversion patterns, and an API surface test to ensure public API stability.

ShapeSifter.Test · high confidence

Dependencies

Initial project structure and dependency configuration for ShapeSifter

This change introduces the foundational project files for the ShapeSifter solution, establishing the library, test suite, and analyzer components. The main library (ShapeSifter) targets .NET Standard 2.0 and depends on HeterogeneousCollections 1.1.7 and FSharp.Core 4.5.0. The test project (ShapeSifter.Test) targets .NET 10.0 and utilizes NUnit 4.6.1, FsUnit 7.1.1, and the ApiSurface 5.0.8 package for testing. Additionally, an analyzers project is added to manage G-Research.FSharp.Analyzers 0.23.0.

(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 67 → 67 (-0.5)
  • Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.

Lenses

  • Code Health 91 → 91 (+0.0)
  • Architecture 95 → 94 (-0.8)
  • Maturity 50 → 50 (+0.0)
  • Readiness 78 → 78 (-0.1)
  • Security 85 → 82 (-3.0)

New (1)

  • Outdated: NUnit

Changes since last survey

  • 1 commits — 1 feature/other, 0 fixes

By area

  • .github/workflows — 1 commit

Notable commits

  • change: Bump github/codeql-action/upload-sarif from 4.37.9 to 4.38.2 (#104)

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

Survey your own repository

G-Research/ShapeSifter 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 c37f79191aaa9b40aa2ee55caa4d678e61c89514 — 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-4f4226d619ea.