Extends the Compliance Advisor from a Q&A chatbot into a full drafting engine that can generate, validate, and refine compliance documents within Scope Engine constraints. Includes intent classifier, state projector, constraint enforcer, SOUL templates, Go backend endpoints, and React UI components. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
1.6 KiB
TypeScript
50 lines
1.6 KiB
TypeScript
/**
|
|
* Gap Analysis Prompt - Lueckenanalyse und gezielte Fragen
|
|
*/
|
|
|
|
import type { GapContext } from '../types'
|
|
|
|
export interface GapAnalysisInput {
|
|
context: GapContext
|
|
instructions?: string
|
|
}
|
|
|
|
export function buildGapAnalysisPrompt(input: GapAnalysisInput): string {
|
|
const { context, instructions } = input
|
|
|
|
return `## Aufgabe: Compliance-Lueckenanalyse
|
|
|
|
### Identifizierte Luecken:
|
|
${context.gaps.length > 0
|
|
? context.gaps.map(g => `- [${g.severity}] ${g.title}: ${g.description}`).join('\n')
|
|
: '- Keine Luecken identifiziert'}
|
|
|
|
### Fehlende Pflichtdokumente:
|
|
${context.missingDocuments.length > 0
|
|
? context.missingDocuments.map(d => `- ${d.label} (Tiefe: ${d.depth}, Aufwand: ${d.estimatedEffort})`).join('\n')
|
|
: '- Alle Pflichtdokumente vorhanden'}
|
|
|
|
### Unbeantwortete Fragen:
|
|
${context.unansweredQuestions.length > 0
|
|
? context.unansweredQuestions.map(q => `- [${q.blockId}] ${q.question}`).join('\n')
|
|
: '- Alle Fragen beantwortet'}
|
|
|
|
${instructions ? `### Zusaetzliche Anweisungen: ${instructions}` : ''}
|
|
|
|
### Aufgabe:
|
|
Analysiere den Stand und stelle EINE gezielte Frage, die die wichtigste Luecke adressiert.
|
|
Priorisiere nach:
|
|
1. Fehlende Pflichtdokumente
|
|
2. Kritische Luecken (HIGH/CRITICAL severity)
|
|
3. Unbeantwortete Pflichtfragen
|
|
4. Mittlere Luecken
|
|
|
|
### Antwort-Format:
|
|
Antworte in dieser Struktur:
|
|
1. **Statusuebersicht**: Kurze Zusammenfassung des Compliance-Stands (2-3 Saetze)
|
|
2. **Wichtigste Luecke**: Was fehlt am dringendsten?
|
|
3. **Gezielte Frage**: Eine konkrete Frage an den Nutzer
|
|
4. **Warum wichtig**: Warum muss diese Luecke geschlossen werden?
|
|
5. **Empfohlener naechster Schritt**: Link/Verweis zum SDK-Modul`
|
|
}
|