using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using GB5Shared.DTO.Framework.Login;
namespace GB5Shared.GEF;
///
/// Thin, directly-referenceable contract for GEF (Guided Execution Framework) — deterministic
/// situation→guidance evaluation that any module (SalesMind, Marketing, and later
/// Production/Quality/Service) injects and calls in-process, with no cross-module BLL project
/// reference needed (same reasoning as GB5Shared.RecordingIntelligence.IAICapabilityService).
///
/// No persistence of its own. The real implementation
/// (FrameworkBLL.GEF.GEFEngine) configures behavior entirely through the existing
/// Qualifier tables (MQUALIFIERDEFINITION/MQUALIFIERENTITY/MQUALIFIERRULEGROUP/
/// MQUALIFIERRULECONDITION/MQUALIFIEROUTPUT/MQUALIFIERMETHOD/MQUALIFIERVERSION) via
/// GB5Shared.GOP.Qualifier.IQualifierFacadeImpl — GEF does not invent its own rule/condition
/// storage.
///
///
/// Deterministic, config-driven rule evaluation only in v1 — no ML/LLM inference here. AI-provided
/// suggestions (EAI, a later module) feed in only as input, never as a
/// guardrail override (canvas §9: AI may summarize/suggest/detect, never decide).
///
///
public interface IGEFEngine
{
///
/// Evaluates the given situation against whatever qualifier bindings exist for
/// context.EntityCode/context.Stage, returning guidance. Returns an empty/neutral
/// (no exception) when no qualifier is configured yet for the
/// caller's domain — GEF must degrade gracefully, not fail, when a consumer module (e.g.
/// SalesMind/Marketing) is not yet wired up.
///
Task EvaluateAsync(
ExecutionContextDTO context,
IEnumerable signals,
LoginDTO login,
CancellationToken ct);
///
/// Persists whether the actor followed a prior and what
/// happened. A log-append operation, not a primary business entity save — see
/// FrameworkBLL.GEF.GEFEngine.RecordOutcomeFeedbackAsync for why this does not route
/// through ExecuteSaveAsync.
///
Task RecordOutcomeFeedbackAsync(
OutcomeFeedbackDTO feedback,
LoginDTO login,
CancellationToken ct);
}