Skip to content
CAI
Software that uses CAICheck a score

SchlenkR/Trulla

52.5

Weak · 3 October 2026

15.4k

lines of production code

F#

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Trulla is a templating system that compiles \.trulla\ template files into statically typed code for both C\# and F\# environments. It provides a C\# source generator and an F\# type provider to enable design-time type safety and runtime rendering of templates against .NET objects. The system also includes a Node.js CLI for generating TypeScript output and a core library handling parsing, type inference, and constraint solving.

Features

Add build, pack, and publish automation scripts

Introduced a new F\# build script (build.fsx) and supporting PowerShell helpers (packAll.ps1, publishAllToNuget.ps1, test\_TP\_SG.ps1) to automate the build, packaging, and publishing of the Trulla Type Provider and Source Generator projects. The build script manages targets for cleaning, building, packing, formatting, and publishing NuGet packages to the configured server, while the PowerShell scripts provide convenient entry points for these operations.

scripts · high confidence

Added C\# source generation for template rendering

The core source generator now includes a new C\# code generation module (Renderer.fs) that converts template solutions into C\# source code. This implementation generates C\# record types for data models and a static rendering class that uses StringBuilder to output the final text, supporting features like variable interpolation, loops, and conditional blocks. A test script and example output file are also included to demonstrate the generated C\# code structure.

src/SourceGenerator/Trulla.SourceGenerator.Core · high confidence

Introduce F\# template type provider with design-time code generation

The TypeProvider location now includes the core implementation for a design-time type provider (TrullaProvider.fs) that generates F\# types from string templates. This includes the ProviderCompiler (ProviderCompiler.fs) which resolves template structures into record types and a Render method, and the runtime support (TpRuntime.fs, TpRegistration.fs) to execute the rendering. The change also adds a comprehensive test suite (ProviderTests.Nuget/Program.fs, Tests/TpExamples.fs) validating the provider's behavior with various template patterns, as well as F\# script-based development aids (Fiddle/CodeGen, Fiddle/Parsing, Fiddle/Typing) for interactive parsing, type inference, and code generation testing.

src/TypeProvider · high confidence

Introduce Node.js CLI for Trulla template rendering

Adds a new command-line interface for the Trulla templating engine, allowing users to compile \.trulla\ template files into TypeScript code. The CLI accepts input and output directory arguments (\-i\ and \-o\) to process templates recursively, leveraging the underlying F\# solver and renderer to generate statically typed, safe template output.

src/NodeCli · high confidence

Introduces Trulla template engine core library

Adds the foundational components for the Trulla templating system within src/Common/CoreFiles, including a parser (Parsing.fs) for template syntax, an abstract syntax tree definition (Ast.fs), a type inference engine (Inference.fs) to resolve variable types, and a solver (Solver.fs) to unify constraints. It also provides a reflection-based renderer (ReflectionRenderer.fs) that processes templates against .NET objects, supporting features like variable interpolation, loops, and conditional blocks, along with supporting utilities and test helpers.

src/Common · high confidence

Introduces a new F\# parser combinator library

Adds a new \parser.fsx\ file in the \fiddle/ParserCombinator\ directory that implements a foundational parser combinator library. This library provides core types for parsing (such as \Parser\, \ParseResult\, and \ParseError\), utility functions for string matching and position tracking, and a builder interface (\ParserBuilder\) that enables declarative parsing logic using F\# computation expressions. It also includes specific combinators for sequencing, binding, and looping, along with a specialized \ParserConcatBuilder\ for constructing string parsers.

fiddle/ParserCombinator · high confidence

Behavioural changes

10 commits (0 fixes) modifying fiddle

A change to existing behaviour in fiddle — 10 commits, 13 files.

artwork, fiddle · medium confidence · unverified

Trulla source version bump to 1.4.2

The Trulla library version has been updated to 1.4.2. This release notes the switch from FParsec to TheBlunt as the parsing engine (introduced in 1.4.0) and retains the C\# source generator added in 1.3.0. The solution file has been reorganized to group the SourceGenerator, TypeProvider, and NodeCli projects into logical folders.

src · high confidence

Test coverage

Added Nuget-based source generator test project with Trulla template support; Added initial test suite for C\# source generation.

Dependencies

Initial project structure and dependency configuration for Trulla

This change introduces the foundational project files and dependency configurations for the Trulla codebase, establishing the build structure for the Node CLI, .NET Source Generator, and F\# Type Provider components. It defines the .NET target frameworks (net6.0, net7.0, netstandard2.0) and specifies key library versions, including FSharp.Core 6.0.7, Microsoft.CodeAnalysis 4.7.0, and Fable 4.1.1, while also setting up the test infrastructure with NUnit 3.13.3 and FsUnit 5.0.1.

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

Lenses

  • Code Health 91 → 92 (+1.7)
  • Architecture 96 → 100 (+3.8)
  • Maturity 41 → 41 (+0.0)
  • Readiness 36 → 38 (+2.0)
  • Security 99 → 84 (-15.3)

Resolved (4)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no licence statement (README.md)
  • Documentation: no usage examples (README.md)
  • Tests outside the analyzed solution

New (7)

  • End-of-life runtime: .NET net6.0
  • End-of-life runtime: .NET net7.0
  • No test project references GeneratorTests.Nuget (src/SourceGenerator/GeneratorTests.Nuget/GeneratorTests.Nuget.csproj)
  • No test project references NodeCli (src/NodeCli/Cli/NodeCli.fsproj)
  • No test project references ProviderTests.Nuget (src/TypeProvider/ProviderTests.Nuget/ProviderTests.Nuget.fsproj)
  • No test project references Trulla.SourceGenerator (src/SourceGenerator/Trulla.SourceGenerator/Trulla.SourceGenerator.csproj)
  • Outdated: FSharp.Core

Architecture

  • Containers 1 added · 0 removed · contexts 0 added · 0 removed · edges 0 added · 0 removed

Added containers (1)

  • cli:GeneratorTests.Nuget

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

Survey your own repository

SchlenkR/Trulla 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 010923069d212cc0461da3aff70c790f60ddeec7 — 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.