// ---------------------------------------------------------------------------
// Configuration constants (no inline hardcodes per spec)
// ---------------------------------------------------------------------------
export const PRIORITY_WEIGHTS = {
    high: 3,
    medium: 2,
    low: 1,
};
export const DEFAULT_DEV_HOURS = 8;
export const DEFAULT_PRIORITY = 'medium';
const DEFAULT_WEIGHT = 2; // corresponds to 'medium'
// ---------------------------------------------------------------------------
// Public API
// ---------------------------------------------------------------------------
/**
 * SPEC-686 Scenario 2: Compute ROI score for a spec.
 * score = priorityWeight / devHours
 *
 * priorityWeight: high=3, medium=2, low=1 (from spec.priority, default 'medium')
 * devHours: from spec.estimation?.devHours, default 8 if missing
 *
 * Higher score → higher priority to implement next.
 */
export function scoreSpec(spec) {
    const priority = typeof spec.priority === 'string' ? spec.priority : DEFAULT_PRIORITY;
    const weight = PRIORITY_WEIGHTS[priority] ?? DEFAULT_WEIGHT;
    const estimation = spec.estimation;
    const rawHours = estimation?.devHours;
    const hours = typeof rawHours === 'number' && rawHours > 0 ? rawHours : DEFAULT_DEV_HOURS;
    return weight / hours;
}
//# sourceMappingURL=scorer.js.map