Skip to content
CAI
Software that uses CAICheck a score

bryanedds/Prime

51.9

Adequate · 3 October 2026

19.2k

lines of production code

F#

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Prime is a modular F\# library that provides functional data structures, an Entity Component System (ECS), and a scripting engine with an interactive REPL. It offers immutable collections optimized for performance, a component-based architecture for entity management, and a domain-specific language (AMSL) for expression evaluation. The system is distributed as NuGet packages targeting .NET Standard 2.1 and includes comprehensive testing for its core components.

Features

Introduction of Prime functional collections and memory-efficient data structures

Prime now includes a suite of purely functional, immutable collections designed for performance in functional programming contexts. This adds FStack (a stack with fast iteration and amortized sqrt(n) concatenation), FList, FQueue, FDeque, FMap, and FSet, all featuring optimized equality checks and hash code caching to reduce allocation pressure. Additionally, the library introduces ForgetfulDictionary, a dictionary with access-age-based eviction for caching scenarios, and KeyedArray, a garbage-collected keyed array that supports automatic compaction to manage memory usage efficiently.

Prime/Prime · high confidence

Introduction of the AMSL Read-Eval-Print Loop (REPL)

A new interactive REPL has been added to the Prime scripting environment, allowing users to evaluate AMSL expressions directly via the console. The application initializes a scripting world, loads the AMSL prelude, and provides a command-line interface where users can input symbolic expressions (such as arithmetic operations or function definitions) and view their results immediately. It includes basic error handling for invalid inputs and offers specific commands like 'exit' to terminate the session and 'timings' to run performance benchmarks.

Prime/Prime.Scripting.Repl · high confidence

Introduction of the Prime.Ecs component library

The Prime.Ecs library has been added to the Prime namespace, providing a new Entity Component System implementation. This includes core types for entities, components, and archetypes, along with support for scheduled and unscheduled events, parallel task execution, and component storage with automatic resizing. The library also defines constants for array reserves and task sizes, and exposes a prelude with delegates for component statements and a subquery mini-language.

Prime/Prime.Ecs · high confidence

Behavioural changes

Prime NuGet packages updated to v11.5.2 with F\# 9 and netstandard2.1 support

The Prime.Nuget directory has been updated to publish packages for Prime, Prime.Ecs, and Prime.Scripting up to version 11.5.2. These nuspec files reflect a major platform migration from .NET Framework 4.0/4.5 to netstandard2.1 and an upgrade to FSharp.Core version 9.0.300. The package dependencies have also been standardized, replacing xunit with Csv (v2.0.93) and updating FParsec to v1.1.1. Additionally, the repository structure was consolidated by moving nuspec files from Prime.NuSpec to Prime.Nuget and correcting project URLs to point to the Prime repository.

Prime/Prime.Nuget · high confidence

Prime v5.0.0: Modularization, .NET 7 Port, and Updated Standards

Prime has been restructured into a modular library with the main engine, ECS, Scripting, and Tests separated into distinct projects, and the solution updated to target .NET 7. The public API now includes a metaprogramming system, functional collections, and an ECS library, while the coding standard has been simplified to enforce stricter correctness rules and forbid untested AI-generated code.

(repo-wide) · high confidence

Scripting engine refactored into standalone project with new data types and API changes

The Prime.Scripting module has been extracted into its own project, introducing support for new data types including Either and Record, and adding corresponding language keywords (e.g., \isEither\, \left\, \right\, \record\). The scripting API has been updated to use \ValueOption\ instead of \option\ for origins, renamed \toEmpty\/\toIdentity\ to \empty\/\identity\, and replaced \TryUpdate\/\Update\ with \TryAlter\/\Alter\. Additionally, the \BinaryFns\ type now supports \Option\ equality and comparison, and the \Pluggable\ type exposes an \FSharpType\ member.

Prime/Prime.Scripting · high confidence

Test coverage

Migrated test suite to NUnit and added coverage for ECS, scripting, and symbolic conversion

The test project has been migrated from xUnit to NUnit, updating all test attributes and assertions to use the NUnit framework. New tests have been added to verify the Entity Component System (ECS) query and event handling, the scripting engine's keyword and expression evaluation, and the symbolic converter's ability to handle abstract data types, generic collections (Stack, Queue, HashSet, Dictionary), and complex records. Existing property-based tests for lists, maps, sets, and random number generation have been updated to use FsCheck.NUnit, with improvements such as skipping the first sample run for timing accuracy and adding tests for SUList, SUMap, and SUSet variants.

Prime/Prime.Tests · high confidence

Dependencies

Prime project modernized to .NET Standard 2.1 and SDK-style format

The Prime library project has been migrated from the legacy .NET Framework 4.6 project format to the modern SDK-style format targeting .NET Standard 2.1. This change updates the build system, removes the legacy Packages.config in favor of direct PackageReference management, and upgrades the FSharp.Core dependency to version 10.0.101. Additionally, the project now references the Csv (2.0.93) and FParsec (1.1.1) packages, replacing the previous FParsec 1.0.3 reference.

(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 → 52 (-0.8)
  • Rubric changed (rubric-2026.09.13 → rubric-2026.10.1) — scores are not directly comparable.

Lenses

  • Code Health 60 → 59 (-1.2)
  • Architecture 99 → 99 (+0.8)
  • Maturity 54 → 51 (-2.6)
  • Readiness 38 → 38 (+0.0)
  • Security 100 → 100 (+0.0)

Resolved (6)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (7 lines × 2) (Prime/Prime/SymbolicConverter.fs)
  • Duplicated block (7 lines × 4) (Prime/Prime/SymbolicConverter.fs)
  • Near-duplicate member pair (68 shared lines) (Prime/Prime/TList.fs)
  • Near-duplicate member pair (75 shared lines) (Prime/Prime/TMap.fs)

New (14)

  • Documentation: no installation or build instructions (ReadMe.md)
  • Documentation: no usage examples (ReadMe.md)
  • Duplicated block (5 lines × 2) (Prime/Prime/SymbolicConverter.fs)
  • Duplicated block (5 lines × 4) (Prime/Prime/SymbolicConverter.fs)
  • Duplicated block (6–7 lines × 4) (Prime/Prime/SymbolicConverter.fs)
  • Duplicated block (7 lines × 7) (Prime/Prime/SymbolicConverter.fs)
  • Hotspot: Prime/Prime/SymbolicConverter.fs (Prime/Prime/SymbolicConverter.fs)
  • Near-duplicate member pair (68 shared lines) (Prime/Prime/STList.fs)
  • Near-duplicate member pair (75 shared lines) (Prime/Prime/STMap.fs)
  • No ADRs found
  • SymbolicConverter.OfSymbolInternal (cognitive 368) (Prime/Prime/SymbolicConverter.fs)
  • SymbolicConverter.OfSymbolInternal (cyclomatic 160) (Prime/Prime/SymbolicConverter.fs)
  • SymbolicConverter.ToSymbolInternal (cognitive 97) (Prime/Prime/SymbolicConverter.fs)
  • SymbolicConverter.ToSymbolInternal (cyclomatic 60) (Prime/Prime/SymbolicConverter.fs)

Changes since last survey

  • 8 commits — 6 feature/other, 2 fixes

By area

  • Prime/Prime — 4 commits
  • (repo) — 1 commit
  • Prime/Prime.Nuget — 1 commit
  • Prime/Prime.Scripting.Repl — 1 commit
  • Prime/Prime.Tests — 1 commit

Notable commits

  • fix: Fixed damn VS test running.
  • fix: Test naming fixes.
  • change: Added serialization for (S)UCollections (for #55).
  • change: Added serialization for SOSet and SOMap.
  • change: Merge branch 'master' of https://github.com/bryanedds/Prime
  • change: Release Prime.11.5.4.
  • change: Slight simplification of SymbolicConverter.Init.
  • change: Updated interactive script.

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

Survey your own repository

bryanedds/Prime 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 7feaed648f706232e65a8205178ed5c7ae873eb5 — 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.