Native Rule Debugging and Enterprise-Grade Decision Tracing

Why Decision Logic Is Traditionally Difficult to Debug

Decision automation systems are often introduced to make business logic easier to manage, but they frequently create a new challenge: visibility.

When a business rule produces an unexpected result, development teams typically need to answer questions such as:

  • Which condition failed?
  • Which condition succeeded?
  • What data values were used during evaluation?
  • Which rule action executed?
  • Why was a setter applied?
  • What did the source object look like at the moment the decision was made?
  • What changed between the beginning and end of evaluation?
  • Which version of the rule was running when the decision was made?

Most rule engines provide limited logging or proprietary monitoring tools, forcing organizations to rely on external platforms, custom instrumentation, or vendor-hosted services to investigate decision outcomes.

As decision automation becomes increasingly critical to underwriting, compliance, fraud detection, eligibility determination, pricing, and operational workflows, this lack of visibility becomes a business risk rather than merely a technical inconvenience. And as AI agents begin to propose and write business logic, being able to see exactly how a rule reaches its result matters more, not less.

Code Effects answers these questions at three levels:

  • In development, with a native Visual Studio debugger for business rules.
  • Before a rule goes live, with tests in the Rule Repository that show the decision path of every run.
  • In production, with a programmable tracer you control, or with the ready-made Audit library that records each decision for replay and explanation.

The First Native Rule Debugger in the Industry

Code Effects 6 introduced something that, to our knowledge, does not exist anywhere else in the decision automation industry:

A native Visual Studio debugger for business rules.

Rules can now be debugged directly inside your own application, using your own code, your own source objects, and your existing development environment.

There is no separate designer application.
There is no proprietary monitoring portal.
There is no cloud-hosted debugging service.
There is no requirement to transmit sensitive business logic, security context, or data outside of your environment.

Instead, rule execution becomes a first-class citizen of your application's debugging experience.

Debug Rules Like You Debug Code

The new tracing architecture allows developers to place breakpoints directly into the rule evaluation process. At every breakpoint, teams can inspect:

  • The current rule expression being evaluated
  • The XML representation of the active expression
  • The outcome of every condition
  • The outcome of every calculation
  • The outcome of every value setter
  • The outcome of every action method
  • The execution path taken through the rule
  • The current state of the source object

This transforms rules from opaque configuration artifacts into fully observable execution components. When a decision behaves unexpectedly, teams no longer need to speculate about what happened. They can see the exact evaluation sequence that produced the result.

The debugger works the same way whether a rule was written by a person in the Rule Editor or by AI, and whether it comes from your own storage or from the live versions in the Rule Repository: it is the same Rule XML, compiled and evaluated by the same engine.

Compare Original Data to Current Data

One particularly powerful capability is access to the original source object throughout the debugging session. This enables developers to compare:

  • Data before evaluation began
  • Data during evaluation
  • Data after setters and actions execute

For execution-type rules, where setters and actions can modify application state, this visibility is invaluable.

Teams can immediately identify:

  • Which values changed
  • Which rule element caused the change
  • Whether the change was expected
  • Whether downstream actions are receiving correct data

This dramatically reduces troubleshooting time for complex decision workflows.

See the Decision Path Before a Rule Goes Live

Debugging is for developers. Business users need the same visibility without opening Visual Studio, and Code Effects 7 gives it to them in the Rule Repository.

A test runs a new rule, a proposed version or a draft against your application's real classes with values users enter, before anything is saved. Exploration tests answer what-if questions; expectation tests define the outcome the rule must produce and report whether it passes or fails. Each run shows:

  • The decision path through the rule
  • The conditions that were satisfied
  • The conditions that prevented a result
  • The resulting data values
  • The actions involved in the outcome

Tests can be saved, built from value templates, and run in batches of up to 350 whenever a rule changes. Methods and actions that should not execute during a test can name substitute test methods, so a test never has to call code that changes real systems. This is effectively a simulation of a proposed change on your real classes, shown step by step, before the change reaches production.

Beyond Debugging: A Universal Decision Tracing Platform

The true strategic value of this feature extends far beyond debugging. The same tracing delegate used by Visual Studio can also be used programmatically by your application. This effectively turns Code Effects into an enterprise-grade decision tracing platform. Organizations can capture:

  • Every rule evaluation
  • Every condition result
  • Every calculation result
  • Every setter execution
  • Every action method invocation
  • Every branch taken
  • Every decision outcome
  • Every data point involved in the decision

And because the tracing logic runs entirely inside your own code, you decide what to collect, where to store it, and how long to retain it.

Build the Audit Trail You Need Today - and Tomorrow

Business requirements evolve. Compliance requirements evolve. Audit requirements evolve. The information that is irrelevant today may become mission-critical tomorrow.

The tracing delegate gives organizations complete ownership of their decision telemetry.

You can build anything from simple diagnostic logging to comprehensive decision intelligence systems, including:

  • Regulatory audit trails
  • Compliance reporting
  • Decision explainability systems
  • Fraud investigation support
  • Customer dispute analysis
  • Operational analytics
  • Performance monitoring
  • Rule effectiveness measurement
  • Historical decision reconstruction

Most importantly, you can do so without modifying your rules. The tracing infrastructure is already part of the evaluation process.

The tracer is available in every Code Effects implementation, including stand-alone use of the Rule Editor and the Rule Engine, and it remains the right tool when you want full control over what is captured and where it goes.

Audit: Decision Explainability, Ready to Use

Code Effects 7 also offers production recording as a ready component. Audit, an optional library licensed separately, records each production evaluation of a live rule:

  • When the decision was made and for whom
  • The exact rule version and source version that ran
  • The outcome and the branch taken
  • The values the engine read - all of them, or only the values you select
  • The conditions and actions that led to the result

Your production code loads the live rules through Audit's AuditRecorder and evaluates them as usual. Records are written to a local journal first and moved to your database by a background worker, so recording never makes a decision wait for a database write. A source can designate a correlation field, such as a loan number, so every recorded decision can be tied to the business case it belongs to.

In the Rule Repository, recorded decisions become part of the same workspace as the rules that made them. Users can:

  • Find any recorded evaluation and inspect its exact rule version, outcome and values
  • Review it and replay it step by step
  • See which conditions or actions were responsible for the result
  • Follow production statistics and analyze decisions by business values
  • Turn it into a test using the actual production data

Together, the record and the replay provide decision explainability: when each decision was made and for whom, how it was made, and why it came out the way it did. And a real production case becomes a reproducible test for every future change to the rule.

Ask Questions About Decisions in Plain Language

With the AI features of the Rule Repository, investigation no longer has to start with a grid and a filter. The AI Assistant can query recorded evaluations, test history and activity records under the user's permissions, and answer questions such as:

Why was loan application LN-2048 declined, and which conditions determined the result?
How many loan applications for amounts over $100,000 were evaluated last quarter, and how many were declined?
Who changed this rule, when did it change, and what happened in subsequent evaluations?

External AI agents connected through the optional MCP server can investigate recorded decisions the same way, under your own OAuth sign-in and the same permissions. The AI uses the models your application registers, with your own API keys.

No Third-Party Services. No Shared Security Context.

Many modern platforms address observability by integrating external monitoring systems, cloud services, or vendor-hosted analytics environments. While useful, these approaches often require organizations to share some combination of:

  • Business data
  • Customer information
  • Security credentials
  • Decision logic
  • Internal operational processes

For highly regulated industries, that can be problematic.

The Code Effects tracing architecture operates entirely within your application's security boundary:

  • Your rules remain yours
  • Your data remains yours
  • Your logs remain yours
  • Your infrastructure remains yours

No additional services, accounts, APIs, or monitoring subscriptions are required. Audit follows the same principle: decision records are kept in a SQL Server or PostgreSQL database you own, on your own hardware, and no component calls a Code Effects service. The only data that leaves is what the optional AI features send to the AI provider you configure.

Designed for Regulated and Mission-Critical Systems

Organizations in banking, insurance, healthcare, government, defense, and other regulated sectors increasingly require explainability and traceability of automated decisions.

Being able to answer:

Why did the system make this decision?

is no longer optional.

Being able to answer:

Show me exactly how the decision was made.

is becoming equally important.

Increasingly, organizations also need to answer:

Which version of the rule made this decision, and who approved it?

The Code Effects debugger and tracer provide the foundation for all three. With the Rule Repository and Audit, every recorded decision is tied to an immutable rule version, and every version to the decision workflow and activity records that show who requested approval, who approved it and who made it live.

A New Standard for Decision Observability

Business rules are often among the most important pieces of logic inside an application, yet historically they have been among the hardest to inspect and troubleshoot.

Code Effects 6 changed that. Code Effects 7 extends it from the developer's debugger to the whole life of a rule.

By combining native Visual Studio debugging with a fully programmable tracing architecture, tests that show the decision path, and production records that can be replayed, explained and turned into tests, it provides a level of decision visibility traditionally unavailable in commercial rule engines.

Developers gain a true debugging experience. Business users gain tests that show how a decision is reached. Architects gain complete observability. Compliance teams gain auditability. Organizations gain ownership of their decision intelligence. And all of it runs directly inside their own application, infrastructure, and security boundary.

For the first time, decision automation can be debugged, traced, audited, and analyzed with the same level of visibility that software teams expect from their own application code.

l102

p101

×