Automate complex decisions with control, scalability, and full traceability
The Rootlenses Rule System enables you to define, validate, and execute business decisions dynamically, without relying on rigid logic embedded in code.
This system transforms complex configurations into declarative rules that are easy to manage, audit, and evolve as the product grows.
It is designed for scenarios where flexibility, performance, and reliability are critical.
Why is a rule system a strategic asset—not just a technical layer?
In growing products, business decisions often end up:
- Scattered across forms
- Tightly coupled to the database
- Difficult to modify without deployments
- Prone to errors and inconsistent behavior
The Rule System centralizes these decisions into a single, explicit, and governable layer, allowing the product to respond quickly to change without compromising integrity.
The value lies not only in automating decisions, but in making them visible, auditable, and predictable.
Business rules: from implicit logic to explicit decisions
Rootlenses turns complex conditions into rules that can be:
- Read
- Validated
- Versioned
- Evaluated
- Compared
This ensures logic is no longer “hidden” in code but becomes part of the product’s operational model, accessible for analysis, governance, and continuous improvement.
Rule types: flexibility without losing structure
The system supports multiple rule types to cover different scenarios:
- Flow logic: decisions that govern operational workflows
- Event rules: rules that react to system events
- Schedule rules: time-based decisions or execution windows
Each rule can be applied:
- Globally
- Specifically per entity (for example, stack or agent)
- With clear priorities
This enables a clear and controlled decision hierarchy.
Metadata Registry: secure rules by design
The engine relies on a central metadata registry that explicitly defines:
- Which decision keys or events exist
- Which fields are allowed
- Which data types are accepted
- Which operators are valid in each context

What value does this provide?
- Prevents invalid rules at the source
- Enables dynamic, guided forms
- Guarantees frontend-backend consistency
- Allows the system to be extended without breaking existing rules
Metadata turns flexibility into safe flexibility.
Advanced validation: errors detected before impact
Every rule goes through a validation process that ensures:
- Correct structure
- Valid data types
- Compatible operators
- No conflicts or duplicates
Additionally, the system supports rule validation in dry-run mode, simulating execution with real or test context.
This prevents:
- Production errors
- Unexpected behaviors
- Inconsistent decisions
Versioning and traceability: decisions with history
Every modification to a rule:
- Generates a new version
- Preserves full history
- Identifies the author and timestamp of the change
This enables:
- Full auditability
- Version comparison
- Recovery from errors
- Controlled logic evolution
Decisions stop being ephemeral and become versioned product assets.
Evaluation engine: fast, deterministic, and scalable
The core of the system is designed under clear principles:
- No database reads at evaluation time
- Explicit and sanitized context
- Priority-based ordered evaluation
- Deterministic output
Each evaluation returns:
- The decision made
- The associated payload
- The rule that produced the result
This guarantees:
- Low latency
- High scalability
- Reproducible results
Caching and intelligent invalidation
Performance without losing control
The system incorporates multiple cache layers:
- In-memory cache for hot rules
- Distributed cache for results
- Invalidation by rule, entity, or context
- Short TTL to balance freshness and performance
This allows the system to scale without sacrificing consistency or control.
User interface: create rules without technical friction
From configuration and specific views, users can:
- Create and edit rules through guided forms
- Select rule type
- Choose decision keys or events
- Configure conditions and operators dynamically
The UI is built on top of metadata, ensuring:
- Consistency
- Security
- Ease of use
Logic migration: a unified system
Legacy functionalities such as:
- Retries
- Schedule offsets
- Execution windows
Are migrated into the Rule System, achieving:
- Less duplication
- Greater maintainability
- A single point of decision
Strategic product benefits
The Rule System enables:
- Evolution without constant deployments
- Reduced operational errors
- Scalable decision-making without added complexity
- Auditable and explainable behavior
- Clear separation between business logic and technical implementation
Risks avoided with a centralized rule system
Without this approach, teams often face:
- Duplicated logic that is hard to maintain
- Risky changes without historical traceability
- Silent production errors
- Excessive dependency on the technical team
Rootlenses eliminates these risks by turning logic into governed decisions.
The right approach: decisions that evolve with the product
The Rule System is not just an evaluation engine. It is a decision-making platform, where each rule:
- Is designed with intention
- Is validated with data
- Is versioned with control
- Is executed with performance
Rootlenses enables a continuous cycle where decisions learn, evolve, and scale alongside the business.