/** * ComplianceRouter — routes unorchestrated dev tasks based on compliance mode. * * Three modes (arc42 §5.5): * - guide: inject a prompt hint suggesting SEVO, don't create pipeline * - auto-route: automatically classify + create pipeline * - off: no intervention * * Called exclusively by PluginAdapter (before_tool_call hook). * Does NOT depend on PipelineEngine — returns a decision that the caller acts on. */ import type { TaskLevel, TaskScope } from '../types/index.js'; import type { LLMProviderConfig } from '../llm/index.js'; /** Compliance mode (spec §FR-13, arc42 §5.5). */ export type ComplianceMode = 'guide' | 'auto-route' | 'off'; /** Task context passed to evaluate(). */ export interface ComplianceTaskContext { /** Task description / title from the spawn call. */ description: string; /** Optional label from the spawn call. */ label?: string; /** Whether the task already has a SEVO tag (sevo:::). */ hasSevoTag?: boolean; /** Optional code statistics for more accurate level classification. */ codeStats?: TaskScope; } /** Result of compliance evaluation. */ export type ComplianceAction = 'pass' | 'guide' | 'create'; export interface ComplianceResult { /** What the caller should do. */ action: ComplianceAction; /** Classified level (only set when action is 'guide' or 'create'). */ level?: TaskLevel; /** Human-readable reason for the decision. */ reason: string; } export interface ComplianceRouterConfig { /** Current compliance mode. Defaults to 'guide'. */ mode?: ComplianceMode; /** LLM provider configuration for semantic scope inference. */ llm?: LLMProviderConfig; } export declare class ComplianceRouter { private mode; private llm; constructor(config?: ComplianceRouterConfig); /** * Evaluate whether a task should enter the SEVO pipeline. * * Decision logic: * 1. If mode is 'off', always pass. * 2. If task already has a SEVO tag, pass (already orchestrated). * 3. Classify the task level (async — uses LLM for scope inference). * 4. If mode is 'guide', return guide action with level info. * 5. If mode is 'auto-route', return create action with level info. */ evaluate(taskContext: ComplianceTaskContext): Promise; /** * Classify a task's level based on description and optional code stats. * * Uses the existing level-classifier from the Router module. * If no codeStats are provided, infers scope via LLM semantic analysis. */ classifyLevel(description: string, codeStats?: TaskScope): Promise; /** Get the current compliance mode. */ getMode(): ComplianceMode; /** Update the compliance mode at runtime. */ setMode(mode: ComplianceMode): void; /** * Infer a TaskScope from a task description using LLM semantic analysis. * The LLM evaluates the description and returns structured scope metadata. */ private inferScopeFromDescription; } //# sourceMappingURL=compliance-router.d.ts.map