Content-Studio Architektur

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

Strukturierte Content-Erstellung mit Autorenprofilen, Contracts und Kritikersystem.

Tool/content
Dokumentation/docs/content-studio
API-Referenz/docs/api/content
LLMClaude Opus 4.5
Kritiker-DurchläufeMax. 3
Datenbankki_content

Web-UI (RESTful)

URLBeschreibung
/contentAuftrags-Liste
/content/newNeuer Auftrag
/content/{id}Details anzeigen
/content/{id}/editBearbeiten

Workflow

1. BRIEFING → Thema, Zielgruppe, Umfang
2. KONFIGURATION → Autorenprofil, Contract, Struktur, Quellen
3. GENERIERUNG → Kapitel-für-Kapitel mit Fortschrittsanzeige
4. CRITIQUE (max 3x) → Kritiker analysieren, automatische Revision
5. VALIDATE → Contract-Prüfung
6. APPROVE → Menschliches OK
7. PUBLISH → Export, Archivierung

Datenbank-Schemata (ki_content)

content_config

Unified Config für Autorenprofile, Contracts, Strukturen, Critics etc.

id INT PK AUTO
type ENUM('author_profile','structure','organization','contract','rule','system_prompt','critic')
name VARCHAR(100) NOT NULL
slug VARCHAR(100) NOT NULL
description TEXT
content LONGTEXT NOT NULL (JSON/YAML)
version VARCHAR(20) DEFAULT '1.0'
status ENUM('draft','active','deprecated') DEFAULT 'draft'
parent_id INT FK NULL
prompt_id INT FK NULL
sort_order INT DEFAULT 0
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
updated_at DATETIME ON UPDATE CURRENT_TIMESTAMP

Hinweis: Kritiker-Definitionen werden in dieser Tabelle mit type='critic' gespeichert.

content_orders

Content-Aufträge mit Briefing, Status und Verknüpfungen.

id INT PK AUTO
title VARCHAR(255) NOT NULL
briefing TEXT
author_profile_id INT FK → content_config
contract_id INT FK → content_config
structure_id INT FK → content_config
model VARCHAR(100) DEFAULT 'claude-sonnet-4-20250514'
collections LONGTEXT (JSON-Array)
context_limit INT DEFAULT 5
status ENUM('draft','generating','critique','revision','validate','approve','published')
generation_status ENUM('idle','queued','generating','completed','failed')
generation_started_at DATETIME
generation_error TEXT
generation_log TEXT
generation_step VARCHAR(50)
critique_status ENUM('idle','critiquing','completed','failed')
critique_started_at DATETIME
critique_error TEXT
critique_log TEXT
critique_step VARCHAR(50)
current_critique_round INT DEFAULT 0
created_by INT
temperature DECIMAL(3,2) DEFAULT 0.50
max_tokens INT DEFAULT 4096
system_prompt_id INT FK → content_config
selected_critics LONGTEXT (JSON-Array)
quality_check TINYINT(1) DEFAULT 0
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
updated_at DATETIME ON UPDATE CURRENT_TIMESTAMP

content_versions

Versionierte Content-Texte.

id INT PK AUTO
order_id INT FK NOT NULL → content_orders
version_number INT NOT NULL
content LONGTEXT
created_at DATETIME DEFAULT CURRENT_TIMESTAMP

content_sources

RAG-Quellen pro Order (Chunk-Referenzen mit Relevanz-Score).

order_id INT PK FK → content_orders
chunk_id INT PK FK → chunks
relevance_score DECIMAL(5,4) NULL

content_critiques

Kritiker-Feedback pro Version und Runde.

id INT PK AUTO
version_id INT FK NOT NULL → content_versions
critic_id INT FK NOT NULL → content_config (type='critic')
round INT NOT NULL
feedback LONGTEXT NULL
created_at DATETIME DEFAULT CURRENT_TIMESTAMP

content_config_history

Config-Änderungshistorie für Versionierung.

id INT PK AUTO
config_id INT FK NOT NULL → content_config
content LONGTEXT NOT NULL
version VARCHAR(20) NOT NULL
changed_by VARCHAR(100) NULL
change_description TEXT NULL
created_at DATETIME DEFAULT CURRENT_TIMESTAMP

Pipeline-Scripts

/var/www/scripts/pipeline/
├── generate.py       → Content-Generierung Kernlogik
└── web_generate.py   → Web-API Wrapper

CLI-Verwendung

# Content generieren
python /var/www/scripts/pipeline/generate.py generate <order_id> [model]

# Kritik-Runde starten
python /var/www/scripts/pipeline/generate.py critique <version_id> [model]

# Revision erstellen
python /var/www/scripts/pipeline/generate.py revise <version_id> [model]