Content Config
Unified Configuration für Autorenprofile, Contracts, Strukturen und System-Konfigurationen im Content Studio.
| Datenbank | ki_content |
|---|---|
| Tabelle | content_config |
| Historie | content_config_history |
| Repository | /src/Infrastructure/Persistence/ContentRepository.php |
Konzept
Die Tabelle content_config vereinheitlicht verschiedene Konfigurationstypen:
| Type | Zweck |
|---|---|
| author_profile | Schreibstil und Tonalität |
| contract | Qualitätsanforderungen |
| structure | Gliederungs-Templates |
| organization | Organisations-/Kundendaten |
| rule | Einzelne Regeln für Contracts |
| system_prompt | System-Prompts für LLM-Aufrufe |
| critic | Kritiker-Konfigurationen für Content-Prüfung |
Schema: content_config
| Spalte | Typ | Default | Beschreibung |
|---|---|---|---|
| id | INT AUTO_INCREMENT | - | Primary Key |
| type | ENUM | - | author_profile, structure, organization, contract, rule, system_prompt, critic |
| name | VARCHAR(100) | - | Anzeigename |
| slug | VARCHAR(100) | - | URL-freundlicher Identifier |
| description | TEXT | NULL | Kurzbeschreibung |
| content | LONGTEXT | - | JSON-Konfiguration |
| version | VARCHAR(20) | '1.0' | Versionsnummer |
| status | ENUM | 'draft' | draft, active, deprecated |
| parent_id | INT | NULL | FK für Vererbung |
| prompt_id | INT | NULL | FK zu prompts-Tabelle |
| sort_order | INT | 0 | Sortierung |
| created_at | DATETIME | CURRENT_TIMESTAMP | Erstellungszeitpunkt |
| updated_at | DATETIME | CURRENT_TIMESTAMP | Letzte Änderung |
Config-Typen
author_profile
Definiert Schreibstil und Tonalität für Content-Generierung:
{
"tone": "didaktisch",
"style": "erklärend",
"vocabulary": "fachlich",
"target_audience": "Coaches und Berater",
"examples": true
}
contract
Qualitätsanforderungen und Regeln:
{
"min_words": 500,
"max_words": 2000,
"required_sections": ["Einleitung", "Hauptteil", "Fazit"],
"forbidden_phrases": ["offensichtlich", "natürlich"],
"citation_style": "Harvard"
}
structure
Gliederungs-Templates:
{
"format": "blog_article",
"sections": [
{"name": "hook", "required": true},
{"name": "problem", "required": true},
{"name": "solution", "required": true},
{"name": "cta", "required": false}
]
}
organization
Organisations- und Kundendaten für personalisierte Inhalte:
{
"name": "Campus am See",
"domain": "Systemische Beratung",
"tone_preferences": ["professionell", "warmherzig"],
"brand_keywords": ["Coaching", "Systemisch", "Entwicklung"]
}
rule
Einzelne Regeln, die in Contracts referenziert werden können:
{
"rule_type": "forbidden_phrase",
"pattern": "offensichtlich|natürlich|selbstverständlich",
"severity": "warning",
"message": "Vermeiden Sie Füllwörter"
}
system_prompt
System-Prompts für verschiedene LLM-Anwendungsfälle:
{
"purpose": "rag_chat",
"template": "Du bist ein hilfreicher Assistent...",
"variables": ["context", "question"],
"model_hints": {"temperature": 0.7}
}
critic
Kritiker-Konfigurationen für automatisierte Content-Prüfung:
{
"focus": "clarity",
"criteria": ["Verständlichkeit", "Struktur", "Zielgruppenpassung"],
"severity_threshold": "medium",
"auto_apply": false
}
Repository-Methoden
// Alle aktiven Profile
$profiles = $contentRepository->findAllProfiles();
// Alle aktiven Contracts
$contracts = $contentRepository->findAllContracts();
// Alle aktiven Strukturen
$structures = $contentRepository->findAllStructures();
// Nach Typ abrufen
$critics = $contentRepository->findByType('critic');
// SQL-Äquivalent
SELECT * FROM content_config
WHERE type = 'author_profile' AND status = 'active'
ORDER BY name;
Verwendung in Content Orders
Content Orders referenzieren Config-Einträge via Foreign Keys:
content_orders.author_profile_id → content_config.id (type='author_profile')
content_orders.contract_id → content_config.id (type='contract')
content_orders.structure_id → content_config.id (type='structure')
Settings-Persistenz
Die zuletzt verwendeten Settings werden beim nächsten Auftrag als Default übernommen:
$lastSettings = $contentRepository->getLastOrderSettings();
// Returns: model, collections, context_limit, author_profile_id, contract_id, structure_id
Siehe auch
Änderungshistorie
| Datum | Änderung |
|---|---|
| 2025-12-31 | Fehlende Config-Typen dokumentiert: organization, rule, system_prompt, critic |
| 2025-12-21 | Initial erstellt (ersetzt author_profiles, content_contracts, content_structures) |