// tools/create-spec-hu/llm-security-hu-adapter.ts — SPEC-045
// Builds OWASP LLM security criteria and EU AI Act sections for HU.md.
import { generateOwaspLlmCriteria, formatOwaspCriteriaAsLines, generateCredentialManagementCriteria, generateEuAiActAssessment, formatEuAiActAsLines, generateMlopsHuSection, generateVectorDbSecurityCriteria, generateAgenticAiSecurityCriteria, } from '../../engine/llm-security/index.js';
/**
 * Build LLM security section for HU.md.
 * Emits OWASP LLM criteria, credential management, EU AI Act, and MLOps sections
 * when the project has LLM integration detected.
 */
export function buildLlmSecurityHuSection(knowledge) {
    if (!knowledge) {
        return [];
    }
    const detection = knowledge.llmDetection;
    if (!detection?.isLlmProject) {
        return [];
    }
    const owaspCriteria = generateOwaspLlmCriteria(detection);
    const owaspLines = formatOwaspCriteriaAsLines(owaspCriteria);
    const credentialLines = generateCredentialManagementCriteria();
    const euAiActAssessment = generateEuAiActAssessment(detection);
    const euAiActLines = formatEuAiActAsLines(euAiActAssessment);
    const mlopsLines = generateMlopsHuSection(detection);
    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
    const stack = knowledge.stack ?? [];
    const vectorDbLines = generateVectorDbSecurityCriteria(stack);
    const agenticLines = generateAgenticAiSecurityCriteria(stack);
    return [
        ...owaspLines,
        ...credentialLines,
        ...euAiActLines,
        ...mlopsLines,
        ...vectorDbLines,
        ...agenticLines,
    ];
}
//# sourceMappingURL=llm-security-hu-adapter.js.map