AIGuiders.Platform.Modeling.Cockpit.Rules 0.1.0

dotnet add package AIGuiders.Platform.Modeling.Cockpit.Rules --version 0.1.0
                    
NuGet\Install-Package AIGuiders.Platform.Modeling.Cockpit.Rules -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AIGuiders.Platform.Modeling.Cockpit.Rules" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AIGuiders.Platform.Modeling.Cockpit.Rules" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="AIGuiders.Platform.Modeling.Cockpit.Rules" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AIGuiders.Platform.Modeling.Cockpit.Rules --version 0.1.0
                    
#r "nuget: AIGuiders.Platform.Modeling.Cockpit.Rules, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AIGuiders.Platform.Modeling.Cockpit.Rules@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AIGuiders.Platform.Modeling.Cockpit.Rules&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=AIGuiders.Platform.Modeling.Cockpit.Rules&version=0.1.0
                    
Install as a Cake Tool

AIGuiders.Platform.Modeling.Cockpit.Rules

Headless cockpit rule evaluation: a rule graph with boolean expressions over facts, evaluated with a per-rule match trace.

What you get

  • RulesEval.evaluate — run every rule of a CockpitRuleGraph against a facts map; returns one RuleMatchTrace per rule (RuleId + Matched)
  • RulesEval.evalExpr — evaluate a single boolean expression node:
    • literals (bool / non-empty string / int)
    • FactRef — fact present and non-null means true
    • Compare / And / Or / Not
  • Expression nodes come from AIGuiders.Platform.Modeling.Gdl.Parse.CockpitLogic (the rule-graph quarry)

Quick start

open AIGuiders.Platform.Modeling.Cockpit.Rules

// rules parsed from cockpit rule GDL (Gdl.Parse.CockpitLogic)
let traces = RulesEval.evaluate graph (Map [ "nightMode", box true ])

// traces = [ { RuleId = "dim-at-night"; Matched = true }; ... ]

Problem

  • Cockpit annunciator rules ("which lamp lights given which facts") reappear per surface; hand-rolled evaluation means the same if-trees in every host, with no trace of which rule matched.

Solution

  • Rules stay data (a parsed graph), evaluation stays pure, and every run returns a per-rule trace — explainable annunciation instead of scattered boolean logic.
  • Battle-tested as the headless evaluator behind the cockpit rule quarry (ADR-0057).

When not to use

  • You need rich typed values and arithmetic in conditions — expressions here are boolean/presence/compare over obj facts; heavier evaluation needs a real rules engine.
  • You need rule authoring/parsing — take Gdl.Parse.CockpitLogic for the quarry; this package only evaluates the parsed graph.

Learn more


MIT · Source & issues · part of the Guiders federation

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 84 10/24/2026