export class QualityValidator {
    validate(result) {
        const text = `${result.specBody}\n${result.technicalSection}`;
        const warnings = [];
        for (const heading of ['## Problem', '## Acceptance Criteria', '## Technical']) {
            if (!text.includes(heading)) {
                warnings.push(`Missing required generated section: ${heading}`);
            }
        }
        const bddCount = (text.match(/\bGIVEN\b[\s\S]*?\bWHEN\b[\s\S]*?\bTHEN\b/gi) ?? []).length;
        if (bddCount < 3) {
            warnings.push('Generated spec should include at least 3 GIVEN/WHEN/THEN criteria.');
        }
        const signatureCount = (result.technicalSection.match(/\b(?:export\s+)?(?:interface|type|class|function)\s+\w+/g) ??
            []).length;
        if (signatureCount < 2) {
            warnings.push('Generated technical section should include at least 2 TypeScript signatures.');
        }
        return { passed: warnings.length === 0, warnings };
    }
}
//# sourceMappingURL=quality-validator.js.map