Lightweight, developer-friendly rule engine for .NET
RuleFlow is a lightweight, developer-friendly rule engine for .NET. You define rules with a fluent API, run them through IRuleEngine, and inspect outcomes—including explainability so you can see what ran, in what order, and why.
ToDebugView() / ToDebugJson() for structured, UI-friendly execution output| Lightweight | Focused API; core types are easy to learn and test |
| Developer-friendly | Fluent Rule / RuleSet builders; familiar C# lambdas |
| Explainability | RuleResult with RuleExecution, ActionExecution, and formatters |
| Debug DTO + JSON | ToDebugView() and ToDebugJson() for structured, UI-friendly execution output |
| Observability | Optional metrics, custom observers, zero overhead when disabled |
| Topic | Description |
|---|---|
| Getting started | Install, minimal example, run the playground |
| Rules | When, Then, ThenIf, Because, priority |
| Rule sets | RuleSet, groups, ordering |
| Explainability | RuleExecution, ActionExecution, debug string, debug DTO and JSON |
| Execution options | Stop on first match, filters, groups, explain toggle |
| Observability | Metrics, custom observers, performance monitoring |
| Persistence | RuleDefinition, registry, JSON definitions |
| Dynamic conditions | ConditionNode, operators, nested field paths |
| ASP.NET Core integration | AddRuleFlow() and DI |
Versions follow SemVer tags: vMAJOR.MINOR.PATCH (for example v0.1.0). Pushing a tag triggers the publish workflow; set the NUGET_API_KEY secret in the repository.
In the repository settings, enable Pages: Deploy from a branch, branch main, folder /docs. This site is Markdown in docs/ with the default Jekyll integration.
See the full changelog on GitHub: https://github.com/rubenrichtering/RuleFlow/CHANGELOG.md
Examples in this documentation mirror the RuleFlow.ConsoleSample scenarios under samples/RuleFlow.ConsoleSample/Playground/Scenarios/.