Skip to content
CAI
Software that uses CAICheck a score

MoiraeSoftware/Myriad

57.9

Adequate · 13 November 2026

1.9k

lines of production code

F#

primary language

8

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Myriad is a .NET code generation tool for F\# that uses a plugin-based architecture to automatically produce helper code for records and discriminated unions. It integrates with the build process via MSBuild and supports configuration through TOML files, allowing users to generate lenses, fields, and case-handling utilities. The system features a stable public API, design-time IDE support, and a structured R&D process for exploring compiler service capabilities.

How it got here

2019 — Myriad 1.0 release and CLI introduction

8 changes.

This period focused on stabilizing the Myriad code generator for its 1.0.0 release, introducing a new CLI with TOML configuration and plugin support, and restructuring the solution into modular projects. The work included implementing MSBuild integration via a dedicated SDK package, adding core AST manipulation and diagnostics capabilities, and establishing comprehensive integration tests to validate the new features.

2020–2026 — Plugin system and experimental R&D

4 changes.

This period focused on introducing a configurable, attribute-driven code generation plugin system for records, unions, and lenses, alongside the establishment of a structured R&D methodology with an experiment backlog. The work also included adding sample projects to demonstrate the new code generation capabilities and verify runtime reflection behavior.

Features

Add RuntimeConsumer sample to verify erased member reflection

A new sample program (Program.fs) has been added to the RuntimeConsumer artifact directory. This sample creates a Person record instance and uses the MyriadPreview type provider to access its fields via runtime dynamic reflection, verifying that the values match direct field access. This serves as a test case to ensure that erased members correctly read values from a compiled instance, independent of the provider's design-time machinery.

RuntimeConsumer · high confidence

Added Example sample project with generated code

A new sample project named 'Example' has been added to the samples directory, including a solution file, a configuration file (myriad.toml), and source files. The sample demonstrates the usage of the Myriad code generator by defining record types (Test1, Test2) with a specific attribute and including the corresponding generated code (Generated.fs) that provides accessor and mapping functions for these fields.

samples · high confidence

Initial experiment backlog and methodology documentation for Myriad R&D

The \experiments/\ directory now includes structured documentation for the Myriad research and development process, including a comprehensive backlog (\BACKLOG.md\) tracking hypotheses and engineering gaps, a findings digest (\FINDINGS.md\) synthesizing results from thirty experimental quartets (Q001–Q030), and a detailed README (\README.md\) outlining the experimental methodology. This entry also adds the initial hypothesis, design, and results documentation for the first quartet (Q001), which investigates in-process FCS hosting and typed code generation, providing the foundational context for subsequent experiments.

experiments · high confidence

Introduce Myriad CLI with TOML configuration and plugin support

The Myriad command-line interface is now implemented in src/Myriad/Program.fs, enabling users to configure code generation via a myriad.toml file and load external generator plugins. The CLI supports batch processing through a manifest file, allows filtering specific generators, and passes configuration keys and additional parameters to the generation pipeline. This change introduces dependencies on Argu for argument parsing, Tomlyn for TOML handling, and McMaster.NETCore.Plugins for dynamic plugin loading.

src/Myriad · high confidence

Introduce configurable code generation plugins for records, unions, and lenses

The Myriad.Plugins library now provides a structured, attribute-driven code generation system. Users can apply attributes like \[Lenses\], \[Fields\], and \[DuCases\] to types to automatically generate helper modules. The Lenses generator creates getter/setter pairs for record fields and single-case discriminated unions, with support for a custom wrapper type and a 'piped setter' configuration option. The Fields generator produces map and create functions for records, while the DUCases generator adds toString, fromString, toTag, and isCase helpers for discriminated unions. All generators support configuration via attributes or a global config key, allowing control over namespaces and qualification.

src/Myriad.Plugins · high confidence

Introduce core AST manipulation, diagnostics, and configuration capabilities

Myriad.Core now provides foundational support for parsing and generating F\# code via Fantomas.FCS, including helpers for building AST nodes (AstExtensions.fs) and extracting literal bindings from attributes (Ast.fs). The library adds a diagnostics API (Diagnostics.fs, Types.fs) allowing generators to report warnings and errors as MSBuild-compatible messages without aborting the build, and integrates .editorconfig support (EditorConfig.fs) to read formatting preferences. Additionally, it introduces an inline generation mode (Generation.fs) that appends output to input files and defines the IMyriadGenerator interface with context and project path support.

src/Myriad.Core · high confidence

Introduced Myriad.Sdk package for MSBuild integration

Added a new Myriad.Sdk package that provides MSBuild integration between Myriad and .NET SDK projects. The package targets netstandard2.1, disables implicit framework references and build output, and includes MSBuild props and targets files for multi-targeting support. It references the main Myriad package via PackageDownload to ensure version alignment and avoid NuGet conflicts.

src/Myriad.Sdk · high confidence

Architecture

Solution structure reorganized into separate projects

The solution file has been restructured to split the codebase into distinct projects: Myriad, Myriad.Core, and Myriad.Plugins. This change also updates the solution to reference existing test projects (Myriad.Plugins.Example1 and Myriad.IntegrationPluginTests) that were previously located outside the src directory, effectively moving them into the solution's build graph.

src · high confidence

Behavioural changes

Myriad 1.0.0 release with design-time build support and single-process generation

Myriad has reached version 1.0.0, marking its public API as stable. This release introduces several key behavioral improvements: generated code is no longer written if unchanged, preventing unnecessary file timestamp updates and editor noise; the tool now runs once per project via a manifest file instead of spawning a separate process for each input file, improving startup performance; and the design-time build gate has been removed, allowing generated members to appear in IDEs without a full build. Additionally, the project now multi-targets .NET 8 and .NET 9, and inline generation output no longer appends an extra blank line.

(repo-wide) · high confidence

Test coverage

Added example plugin generators to test diagnostics and inline generation; Added integration test suite for the Myriad code generator.

Dependencies

Standardized experiment artifacts to .NET 8/9 and FCS 43.9.101

The project files for the experiment artifacts (located under experiments/Q\*) have been updated to target .NET 8.0 or .NET 9.0 and reference FSharp.Compiler.Service version 43.9.101. This change aligns the experimental harnesses with the latest compiler service version and modern .NET runtimes, ensuring consistent dependency shapes across the various type-provider and code-generation spikes.

(dependencies) · high confidence

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

How this codebase got here

Score

  • CAI 56 → 58 (+2.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 81 → 81 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 56 → 61 (+4.6)
  • Readiness 46 → 46 (+0.0)
  • Security 62 → 68 (+6.7)

Resolved (3)

  • Coverage not measured — no coverage collector is wired up
  • End-of-life runtime: .NET net9.0 (test/Myriad.Plugins.Example1/Myriad.Plugins.Example1.fsproj)
  • No ADRs found

New (1)

  • No ADRs found (src/Myriad/Myriad.fsproj)

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

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

Survey your own repository

MoiraeSoftware/Myriad 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 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 10a899c248936162379728a8b13103a0b3dbd8a2 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.61+preprod-b8b1a43ae4c3.