Skip to content
CAI
Software that uses CAICheck a score

cmeeren/Facil

64.8

Adequate · 15 November 2026

44.3k

lines of production code

F#

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Support for SQL Server temporary tables in generated code

The C\# runtime now supports the use of SQL Server temporary tables within generated scripts. This change introduces new internal components (\TempTableData\, \TempTableLoader\) to handle bulk loading of data into temporary tables and implements automatic cleanup logic via \TempTableCleanupScope\ to ensure temporary tables are dropped after execution, even in asynchronous contexts or when transactions are involved.

src/Facil.Runtime.CSharp · high confidence

Support for SQL script includes and enhanced code generation configuration

The generator now supports including other SQL scripts within templates using the \{{include "path"}}\ syntax, with safeguards against cycles and path traversal. Additionally, the configuration schema has been expanded to allow overriding column nullability, specifying parameter DTO kinds (inline, nominal, or skip), and configuring SQL date types (DateOnly or DateTime). The default generated module visibility has also changed from internal to public.

src/Facil.Generator · high confidence

Architecture

Adopts SLNX solution format and updates build infrastructure

The project has migrated from the legacy .sln format to the new SLNX solution format (Facil.slnx), which reorganizes the solution structure and includes new solution items like .fantomasignore and AGENTS.md. This change is accompanied by the removal of the AppVeyor CI configuration (appveyor.yml) and the addition of a global.json to pin the .NET SDK version to 10.0.303. Additionally, Directory.Build.props now enforces reproducible builds and sets the project version to 3.2.0.

(repo-wide) · high confidence

Behavioural changes

11 commits (0 fixes) modifying .agents/skills/release-facil

A change to existing behaviour in .agents/skills/release-facil — 11 commits, 4 files: “Add Facil release skill”; “Publish only the package matching the release tag”; “Prepare Facil 3.0.0 release”; and 8 more.

.agents/skills/release-facil · medium confidence · unverified

Added SQL Server type support in test database schema

The test database schema now includes user-defined table types for SQL Server's HierarchyId, spatial (Geometry and Geography), and MAX-length string/binary types, alongside existing types for identity columns and fixed-length strings. These additions enable regression testing for truncation behavior and fix previous exceptions related to MAX length Table-Valued Parameters.

src/TestDb/dbo/User Defined Types · high confidence

Agent skills directory symlinked

The .claude/skills path is now a symbolic link pointing to ../.agents/skills, centralizing agent skill definitions in the .agents directory while making them accessible via the .claude configuration.

.claude · high confidence

Expanded SQL Server type support and test coverage for table scripts

The table script generation logic now supports additional SQL Server data types, including hierarchyid, spatial types (geometry and geography), and sql\_variant, while also correctly handling computed columns, identity columns, and temporal tables by ignoring generated-always columns in insert/update scripts. These changes are validated by a comprehensive set of new test tables covering all supported types, nullability overrides, camel-case column names, and edge cases like tables with only primary key columns or full-text indexes.

src/TestDb/dbo/Tables · high confidence

Improved SQL type handling and script parsing in the generator

The code generator now uses a more robust lookup for SQL type names by querying both system and user type IDs, and introduces a new \SqlTypeInfo\ structure that includes a \SqlClientValueBridge\ to correctly map SQL \date\ types to F\# \DateOnly\ (backed by \DateTime\ at the client level). Script parsing has been upgraded to use the TSql170 parser (supporting newer SQL Server syntax) and includes specific handling for \sp\_executesql\ calls. Additionally, temporary table names are now rewritten to global temp tables with a unique prefix to prevent collisions, and size/precision logic for SQL parameters and metadata has been refined to handle edge cases like \NChar\/\NVarChar\ size adjustments and specific precision requirements for \Float\ and \Time\ types.

Facil.Generator · high confidence

Improved cancellation handling and support for temporary tables in SQL queries

The SQL execution layer in \src/Facil.Runtime\ now supports temporary tables within scripts, allowing users to create and use temp tables during query execution. Additionally, query cancellation behavior has been normalized: when a request is cancelled, the system now throws an \OperationCanceledException\ instead of a generic \SqlException\, providing clearer feedback to the application. The generated code utilities have been updated to pass transaction contexts and temporary table data through the execution pipeline, ensuring these features work correctly with both eager and lazy query modes.

src/Facil.Runtime · high confidence

Local generator build integration and configuration updates

The DbGen test project now includes a local MSBuild targets file that automatically invokes the Facil generator from the built output directory before compilation, ensuring the generator is available locally. The project configuration has been updated to use a connection string pointing to the local machine (Data Source=.) with encryption disabled, and the generator assembly version is set to 3.2.0.

src/DbTests.DbGen · high confidence

Move SQL test scripts to DbGen project and add support for hierarchyid and spatial types

The SQL test scripts located in src/DbTests.DbGen/SQL have been moved from the previous src/DbTests and src/TestOutput locations into this dedicated DbGen project, consolidating the test assets. This change also introduces new test scripts to support SQL Server hierarchyid and spatial types (GEOMETRY and GEOGRAPHY), including definitions for temp tables using these types, and adds scripts to test dynamic SQL scenarios such as parameterized queries, TVPs, and result set overrides.

src/DbTests.DbGen/SQL · high confidence

Test database schema and build configuration updated

The TestDb project has been migrated to the modern SDK-style format using Microsoft.Build.Sql 2.2.0, switching the schema provider to SQL Server 2017 (Sql170) and simplifying the project file structure. A new FullTextCatalog and View1 have been added to the schema, and the post-deployment script now explicitly inserts data into TableWithNullabilityOverride. Additionally, the local database connection string in LocalDB.publish.xml has been changed from (LocalDb)\\MSSQLLocalDB to the local default instance (.).

src/TestDb · high confidence

Updated database generator to version 3.2.0 with enhanced type and script support

The DbGen tool has been regenerated for version 3.2.0, introducing support for SQL Server's DateOnly type (mapped to .NET DateOnly), SQL hierarchyid, and spatial types. The generated code now correctly handles GENERATED ALWAYS columns (e.g., temporal tables) by ignoring them in insert/update scripts, preserves MAX Unicode parameter sizes, and improves batch matching by schema rather than column order. Additionally, the generator now automatically drops and cleans up temporary tables, supports shared SQL script fragments, and includes new batch insert/update/merge scripts.

DbTests.DbGen · high confidence

Test coverage

Added database integration tests for new SQL Server types and script features; Added smoke tests for package validation; Expanded test database stored procedures for advanced SQL type coverage; Unified package smoke testing infrastructure added.

Dependencies

Upgrade to .NET 10 and .NET Standard 2.0 with major dependency updates

The project has been unified to target .NET Standard 2.0 for the runtime libraries and .NET 10 for the generator and test projects, dropping support for older frameworks like .NET 5 and .NET Core 3.1. This change includes significant dependency upgrades, most notably updating Microsoft.Data.SqlClient from version 2.1.0 to 5.2.2 and Microsoft.SqlServer.TransactSql.ScriptDom from 150.x to 180.x, alongside updates to FSharp.Core (to 9.0.100 in tooling, 6.0.0 in runtime), Expecto, and Hedgehog. The package build process has also been restructured to explicitly target the net10.0 generator output.

(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

Baseline

  • First survey — no prior run to compare against. CAI 65.

Lenses

  • Code Health 77
  • Architecture 100
  • Maturity 62
  • Readiness 58
  • Security 70
  • Performance 100

Changes since last survey

  • 300 commits — 261 feature/other, 39 fixes

By area

  • (root) — 117 commits
  • src/Facil.Generator — 41 commits
  • .github/workflows — 40 commits
  • src/DbTests — 34 commits
  • src/DbTests.DbGen — 31 commits
  • .agents/skills — 8 commits
  • src/Facil.Package — 6 commits
  • src/TestDb — 6 commits
  • src/Facil.Runtime.CSharp — 4 commits
  • .config/dotnet-tools.json — 3 commits
  • .github/CONTRIBUTING.md — 2 commits
  • .idea/.idea.Facil — 2 commits
  • src/PackageTests — 2 commits
  • (repo) — 1 commit
  • .claude/skills — 1 commit
  • .github/dependabot.yml — 1 commit
  • src/Facil.Runtime — 1 commit

Notable commits

  • fix: FIx build script
  • fix: Fix .git-blame-ignore-revs
  • fix: Fix AppVeyor -> GitHub Actions in CONTRIBUTING.md
  • fix: Fix BuildValue falling back to DtoName during rule merges
  • fix: Fix CI
  • fix: Fix CI
  • fix: Fix CI build
  • fix: Fix CI build connection string
  • fix: Fix CI script
  • fix: Fix CI script
  • fix: Fix README examples and feature notes
  • fix: Fix build-time error for some queries when using connection strings with credentials but without 'Persist Security Info=true'
  • fix: Fix erroneous edit
  • fix: Fix error message containing "script script"
  • fix: Fix insertBatch source table column casing
  • fix: Fix lock file
  • fix: Fix path separators in GitHub Actions
  • fix: Fix readme
  • fix: Fix readme
  • fix: Fix readme
  • …and 280 more

Architecture

  • 1 containers · 3 bounded contexts · 0 dependency edges (baseline)

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

Survey your own repository

cmeeren/Facil 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 15 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 7291e9c9b37c311ec02c6270cea2a54a251a0a0d — the exact code this score is about.
  • Scored under rubric-2026.11.4 — 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.65+preprod-3c33c1882dc1.