// engine/validator/holistic-report.ts — SPEC-730
// Builder helpers for the HolisticValidateReport returned by validateSpec.
// Types are defined in src/types/analysis.ts to avoid circular imports.
// ---------------------------------------------------------------------------
// Builder helpers
// ---------------------------------------------------------------------------
/**
 * Build a HolisticValidateReport from a flat score (used by the legacy validateSpec path
 * which computes a single score without per-dimension breakdown).
 *
 * Each applicable dimension receives equal weight and the same score value.
 * This is a conservative approximation until per-dimension scoring is added.
 */
export function buildHolisticReportFromFlatScore(score, applicableDimensions, skipped, evidenceByDimension) {
    const weight = applicableDimensions.length > 0 ? 1 / applicableDimensions.length : 0;
    const dimensions = {};
    for (const dim of applicableDimensions) {
        const d = dim;
        dimensions[d] = {
            score: score ?? 0,
            weight,
            evidence: evidenceByDimension?.[dim] ?? [],
        };
    }
    return {
        score,
        applicableDimensions: applicableDimensions,
        skipped: skipped,
        dimensions,
    };
}
//# sourceMappingURL=holistic-report.js.map