/** * Shared emitter helpers for closure gates (judge-llm, rubric, code-reviewer). * * Each gate has its own orchestration, but the steps after a gate failure are * the same: attribute → map severity → append to `skill-signals.json`. This * module centralises that pipeline so the three call sites stay thin and the * best-effort/never-throw behaviour is uniform. * * @module core/skill-signal-emit */ import { type AttributeSkillInput } from './skill-attribution.js'; import type { SignalSeverity, SignalSource } from '../types/skill-signals.js'; export interface EmitRefinementInput { /** SpecWeave project root — used to resolve `.specweave/state/skill-signals.json`. */ projectRoot: string; /** The originating gate. */ source: SignalSource; /** Target severity for the emitted signal. */ severity: SignalSeverity; /** The increment whose closure produced the failure. */ incrementId: string; /** Short human-readable evidence excerpt persisted to the signal. */ evidence: string; /** Inputs forwarded to `attributeSkill`. */ attribution: AttributeSkillInput; } export interface EmitRefinementOutput { /** True when a signal was persisted. False when attribution was ambiguous. */ emitted: boolean; /** Attributed skill (when emitted). */ targetSkill: string | null; /** Attribution heuristic that matched. */ method: 'direct' | 'slash' | 'pattern' | 'none'; } /** * Resolve the conventional path to `.specweave/state/skill-signals.json` * under `projectRoot`. Matches the convention used by `SignalCollector` and * `suggestion-engine` so the same file is read/written across features. */ export declare function resolveSignalFilePath(projectRoot: string): string; /** * Attribute + emit a single refinement signal. Best-effort: swallows all I/O * errors. Returns a structured result for observability/testing. */ export declare function emitRefinementIfAttributable(input: EmitRefinementInput): Promise; //# sourceMappingURL=skill-signal-emit.d.ts.map