Files
git.stella-ops.org/src/__Tests/__Libraries/StellaOps.Testing.Explainability/IExplainableDecision.cs
StellaOps Bot 37e11918e0 save progress
2026-01-06 09:42:20 +02:00

43 lines
1.4 KiB
C#

// <copyright file="IExplainableDecision.cs" company="StellaOps">
// Copyright (c) StellaOps. Licensed under AGPL-3.0-or-later.
// </copyright>
// Sprint: SPRINT_20260105_002_004_TEST_policy_explainability
// Task: PEXP-003
namespace StellaOps.Testing.Explainability;
/// <summary>
/// Interface for services that produce explainable decisions.
/// </summary>
/// <typeparam name="TInput">Type of input to the decision.</typeparam>
/// <typeparam name="TOutput">Type of output from the decision.</typeparam>
public interface IExplainableDecision<TInput, TOutput>
{
/// <summary>
/// Evaluate input and produce output with explanation.
/// </summary>
/// <param name="input">The input to evaluate.</param>
/// <param name="ct">Cancellation token.</param>
/// <returns>Result with explanation.</returns>
Task<ExplainedResult<TOutput>> EvaluateWithExplanationAsync(
TInput input,
CancellationToken ct = default);
}
/// <summary>
/// Marker interface for decisions that support explanation.
/// </summary>
public interface IExplainable
{
/// <summary>
/// Gets whether explanations are enabled.
/// </summary>
bool ExplanationsEnabled { get; }
/// <summary>
/// Enable or disable explanations.
/// </summary>
/// <param name="enabled">Whether to enable explanations.</param>
void SetExplanationsEnabled(bool enabled);
}