Dokumentation » KI-System » Content Config

Content Config

Erstellt: 2025-12-21 | Aktualisiert: 2025-12-31

Unified Configuration für Autorenprofile, Contracts, Strukturen und System-Konfigurationen im Content Studio.

Datenbankki_content
Tabellecontent_config
Historiecontent_config_history
Repository/src/Infrastructure/Persistence/ContentRepository.php

Konzept

Die Tabelle content_config vereinheitlicht verschiedene Konfigurationstypen:

TypeZweck
author_profileSchreibstil und Tonalität
contractQualitätsanforderungen
structureGliederungs-Templates
organizationOrganisations-/Kundendaten
ruleEinzelne Regeln für Contracts
system_promptSystem-Prompts für LLM-Aufrufe
criticKritiker-Konfigurationen für Content-Prüfung

Schema: content_config

SpalteTypDefaultBeschreibung
idINT AUTO_INCREMENT-Primary Key
typeENUM-author_profile, structure, organization, contract, rule, system_prompt, critic
nameVARCHAR(100)-Anzeigename
slugVARCHAR(100)-URL-freundlicher Identifier
descriptionTEXTNULLKurzbeschreibung
contentLONGTEXT-JSON-Konfiguration
versionVARCHAR(20)'1.0'Versionsnummer
statusENUM'draft'draft, active, deprecated
parent_idINTNULLFK für Vererbung
prompt_idINTNULLFK zu prompts-Tabelle
sort_orderINT0Sortierung
created_atDATETIMECURRENT_TIMESTAMPErstellungszeitpunkt
updated_atDATETIMECURRENT_TIMESTAMPLetzte Ä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-31Fehlende Config-Typen dokumentiert: organization, rule, system_prompt, critic
2025-12-21Initial erstellt (ersetzt author_profiles, content_contracts, content_structures)
]]>