Enhance Planning Catalog Context and Prompt Slot Management
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Failing after 2s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m20s
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Failing after 2s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m20s
- Introduced new catalog context handling in planning prompt functions, allowing for improved integration of planning variables. - Added optional catalog context parameters in various functions to streamline the merging of planning prompt variables. - Updated frontend components to include CatalogPromptSlotsEditor for managing prompt slots across different catalog types. - Enhanced API utilities to support fetching and updating catalog prompt slots, improving backend functionality for catalog management. - Incremented version numbers and updated changelog to reflect the new features and improvements.
This commit is contained in:
1 parent
9cee862c32
commit
53f2b027cc
20 files changed
+1922
-204
No files matched your search
@@ -1,229 +1,216 @@
|
||||
# Planungs-KI — Katalog-Snippets für modulare Prompts
|
||||
# Planungs-KI — Katalog-Prompt-Slots (Snippets)
|
||||
|
||||
**Stand:** 2026-05-22
|
||||
**Status:** Spezifikation (Phase **H1** — Umsetzung offen)
|
||||
**Bezüge:** `PLANNING_PROGRESSION_GRAPH_KI.md` §4.4 · `AI_PROMPT_TARGET_ARCHITECTURE.md` §2.4 · `planning_catalog_context.py`
|
||||
**Status:** **H2** umgesetzt (0.8.235) · **H2.1** Admin-UI + granulare Prompts (0.8.236)
|
||||
**Bezüge:** `PLANNING_PROGRESSION_GRAPH_KI.md` §4.4 · `AI_PROMPT_TARGET_ARCHITECTURE.md` §2.4 · `planning_catalog_context.py` · `catalog_prompt_slots.py`
|
||||
|
||||
---
|
||||
|
||||
## 1. Problem
|
||||
|
||||
Seit **F13 (0.8.233)** fließen Primärfokus, Trainingsstil, Zielgruppe und Stilrichtung als `planning_catalog_context` in **Retrieval und Scoring** (`PlanningTargetProfile`).
|
||||
Seit **F13 (0.8.233)** fließen Primärfokus, Trainingsstil, Zielgruppe und Stilrichtung als `planning_catalog_context` in **Retrieval und Scoring**.
|
||||
|
||||
Die **LLM-Prompts** (Roadmap, Stufen-Spec, Pfad-QS, Gap-Fill) erhalten diese Dimensionen **nicht** als differenzierte Bewertungs- und Planungslogik — höchstens indirekt über Freitext oder JSON-Kataloglisten in Intent-Prompts.
|
||||
Die **LLM-Prompts** brauchen zusätzlich **fachliche Textbausteine** pro gewähltem Katalog-Eintrag — editierbar, ohne Code-Deploy, unabhängig von fest codierten Katalog-Namen.
|
||||
|
||||
**Folge:** Ein Breitensport-Pfad kann mit Leistungsgruppen-Kriterien bewertet werden; Gewaltschutz wird wie Technik-Curriculum behandelt; QS-Hinweise und Rematch-Vorschläge passen fachlich nicht zum gewählten Kontext.
|
||||
|
||||
**Ziel:** Gleiche **Prompt-Basis**, aber **kaskadierte Snippet-Blöcke** pro Katalog-Ausprägung — keine Matrix aus Voll-Prompt-Kopien.
|
||||
**Ziel:** Prompts in `ai_prompts` referenzieren **Slot-Typen** (Vokabular). Inhalte hängen an **Katalog-Zeilen** (Stammdaten). Der Resolver füllt Platzhalter zur Laufzeit.
|
||||
|
||||
---
|
||||
|
||||
## 2. Priorität der Dimensionen (absteigend)
|
||||
## 2. Zwei Ebenen (Kern des Modells)
|
||||
|
||||
Verbindliche Reihenfolge bei Konflikten und beim Rollout:
|
||||
| Ebene | Was | Wer pflegt | Beispiel |
|
||||
|-------|-----|------------|----------|
|
||||
| **Slot-Typ** | Art des Textes (festes, erweiterbares Vokabular) | Produkt / Architektur | `hints_on_progression`, `hints_on_path_qa` |
|
||||
| **Slot-Wert** | Konkreter Text pro Katalog-Eintrag | Admin / Redakteur | Gewaltschutz → `hints_on_path_qa`: „Lücken = fehlende Deeskalation …“ |
|
||||
|
||||
| Rang | Dimension | DB-Tabelle | Snippet-Rolle |
|
||||
|------|-----------|------------|----------------|
|
||||
| **1** | **Primärfokus** | `focus_areas` | Definiert *worüber* geplant und bewertet wird (Technik-Curriculum vs. Gewaltschutz vs. Fitness …). **Dominant.** |
|
||||
| **2** | **Trainingsstil** | `training_types` | Definiert *wie* trainiert wird (Methodik, Belastungsaufbau, Wettkampf vs. Breitenansatz im Training). |
|
||||
| **3** | **Zielgruppe** | `target_groups` | Definiert *für wen* (Kinder, Breitensport, Leistungsgruppe) — Tempo, Komplexität, Sicherheit. |
|
||||
| **4** | **Stilrichtung** | `style_directions` | Vereins-/Stil-Linie (Shotokan, WKF …) — **Nuancen**, kein neuer Planungstyp. |
|
||||
|
||||
**Kaskaden-Regel:** Bei widersprüchlichen Snippet-Aussagen gilt: Primärfokus → Trainingsstil → Zielgruppe → Stilrichtung.
|
||||
**Nicht:** feste Attribute pro Eintrag im Code (`planning_lens`, `qa_criteria` …).
|
||||
**Sondern:** beliebig viele Katalog-Einträge × definierte Slot-Typen.
|
||||
|
||||
---
|
||||
|
||||
## 3. Architektur — drei Schichten (Erinnerung)
|
||||
## 3. Dimensionen & Priorität
|
||||
|
||||
| Schicht | Heute | Mit H1 |
|
||||
|---------|-------|--------|
|
||||
| **Retrieval** | Katalog-Gewichte in `merge_catalog_context_into_target` | unverändert |
|
||||
| **Technik-Gates** | `planning_exercise_semantics.py`, nur `topic_type=technique` | unverändert |
|
||||
| **LLM-Prompts** | kaum Katalog-spezifisch | **`catalog_guidance_block`** pro Aufruf |
|
||||
| Rang | Dimension | `catalog_kind` | DB-Tabelle |
|
||||
|------|-----------|----------------|------------|
|
||||
| **1** | Primärfokus | `focus_area` | `focus_areas` |
|
||||
| **2** | Trainingsstil | `training_type` | `training_types` |
|
||||
| **3** | Zielgruppe | `target_group` | `target_groups` |
|
||||
| **4** | Stilrichtung | `style_direction` | `style_directions` |
|
||||
|
||||
Snippets **ersetzen** keine Technik-Disambiguierung und **duplizieren** keine Retrieval-Gewichte — sie steuern **Didaktik, Bewertungsmaßstäbe und Formulierung** für das Modell.
|
||||
**Kaskade:** Bei widersprüchlichen Hinweisen gilt Fokus → Trainingsstil → Zielgruppe → Stilrichtung.
|
||||
|
||||
Pro Dimension im Request: **ein aktiver Eintrag** (`is_primary`, sonst höchstes `weight`).
|
||||
|
||||
---
|
||||
|
||||
## 4. Snippet-Modell
|
||||
## 4. Slot-Typ-Register (Vokabular)
|
||||
|
||||
### 4.1 Lookup-Schlüssel
|
||||
Definiert in **`catalog_prompt_slot_types`** (DB) + Spiegel in `catalog_prompt_slots.py`.
|
||||
|
||||
Pro Katalog-Eintrag ein stabiler **`snippet_key`** (nicht nur numerische ID — IDs können sich in Dev/Import unterscheiden):
|
||||
| `slot_key` | Anzeige (DE) | LLM-Prompt | Code-only |
|
||||
|------------|--------------|------------|-----------|
|
||||
| `description` | Allgemeine Beschreibung | Roadmap, Goal-Analyse, Start/Ziel | — |
|
||||
| `hints_on_progression` | Hinweise Progressionsgraph / Stufen | Roadmap, Stage-Spec | — |
|
||||
| `hints_on_path_qa` | Bewertungsmaßstäbe Pfad-QS | Path-QA | — |
|
||||
| `hints_on_exercise` | Hinweise Übungsanlage / Gap-Fill | Exercise-AI, Suggest (später) | — |
|
||||
| `anti_patterns` | Explizit vermeiden (Fehlbewertung) | Path-QA, Stage-Spec | — |
|
||||
| `rematch_guard` | Kein Auto-Rematch erzwingen | — | Rematch-Loop (H1.5) |
|
||||
|
||||
```
|
||||
focus:{slug} z. B. focus:gewaltschutz
|
||||
training_type:{slug} z. B. training_type:kumite
|
||||
target_group:{slug} z. B. target_group:breitensport
|
||||
style:{slug} z. B. style:shotokan
|
||||
```
|
||||
**Erweiterung:** neuer Slot-Typ = eine Zeile in `catalog_prompt_slot_types` + Resolver/Admin-Katalog — **kein** neues Python-Feld pro Eintrag.
|
||||
|
||||
**Primär** aus `slug` der DB-Zeile; Fallback normalisierter `name` (ASCII, lower, `_`).
|
||||
**Fallback `description`:** Wenn kein Slot-Wert gesetzt → `focus_areas.description` (bzw. `description`-Spalte der jeweiligen Katalog-Tabelle).
|
||||
|
||||
Mehrfachauswahl im UI: pro Dimension **höchstens ein Snippet** — die Zeile mit `is_primary: true`, sonst erste Zeile, sonst höchste `weight`.
|
||||
---
|
||||
|
||||
### 4.2 Snippet-Inhalt (Struktur)
|
||||
## 5. Platzhalter in `ai_prompts`
|
||||
|
||||
Jedes Snippet liefert strukturierte Textbausteine (Deutsch, für LLM):
|
||||
|
||||
| Feld | Pflicht | Inhalt |
|
||||
|------|---------|--------|
|
||||
| `planning_lens` | ja | 2–4 Sätze: Was ist das Planungsziel in dieser Dimension? |
|
||||
| `qa_criteria` | ja | Bullet-artige Kriterien für Pfad-QS (was ist „gut“, was ist kein Mangel) |
|
||||
| `roadmap_hints` | empfohlen | Stufenlogik, typische Phasen, was vermeiden |
|
||||
| `anti_patterns` | optional | Explizite Fehlbewertungen vermeiden (z. B. „keine Wettkampf-Tiefe verlangen“) |
|
||||
| `rematch_guard` | optional | Wann **kein** Auto-Rematch sinnvoll (Breitensport: keine Perfektions-Slots erzwingen) |
|
||||
|
||||
Phase **H1:** flache Markdown-Strings im Code-Modul.
|
||||
Phase **H2 (optional):** Tabelle `planning_catalog_prompt_snippets` oder JSONB an Katalog-Zeilen, Admin-editierbar.
|
||||
|
||||
### 4.3 Platzhalter in `ai_prompts`
|
||||
|
||||
Neue **gemeinsame** Platzhalter (Mustache), in alle betroffenen Prompts einfügen:
|
||||
Mustache-Keys: **`{catalog_kind}_{slot_key}`** (nur `[a-z0-9_]`).
|
||||
|
||||
| Platzhalter | Bedeutung |
|
||||
|-------------|-----------|
|
||||
| `{{catalog_guidance_block}}` | Gerenderter Gesamttext (alle aktiven Snippets, kaskadiert) |
|
||||
| `{{catalog_context_json}}` | Kompakte JSON-Zusammenfassung der gewählten IDs/Namen (Audit) |
|
||||
| `{{#has_catalog_guidance}}` … `{{/has_catalog_guidance}}` | Block nur wenn mindestens ein Snippet aktiv |
|
||||
| `{{focus_area_description}}` | Aktiver Primärfokus — Beschreibung |
|
||||
| `{{focus_area_hints_on_progression}}` | … — Progressions-Hinweise |
|
||||
| `{{focus_area_hints_on_path_qa}}` | … — QS-Hinweise |
|
||||
| `{{focus_area_hints_on_exercise}}` | … — Übungsanlage |
|
||||
| `{{focus_area_anti_patterns}}` | … — Anti-Patterns |
|
||||
| `{{training_type_description}}` | Aktiver Trainingsstil — … |
|
||||
| `{{training_type_hints_on_progression}}` | … |
|
||||
| `{{target_group_hints_on_path_qa}}` | Aktive Zielgruppe — … |
|
||||
| `{{style_direction_hints_on_progression}}` | Aktive Stilrichtung — … |
|
||||
| *(analog für alle Slot-Typen × Dimension)* | |
|
||||
| `{{catalog_guidance_block}}` | **Aggregat** (Abwärtskompatibel): kaskadierter Markdown-Block aus aktiven Slots |
|
||||
| `{{catalog_context_json}}` | Audit: IDs, Namen, gesetzte Slot-Keys |
|
||||
| `{{has_catalog_guidance}}` | `"true"` oder leer |
|
||||
|
||||
**Optional fein (später):** `{{catalog_focus_snippet}}`, `{{catalog_training_type_snippet}}`, … — Phase H1 nur `_block` + JSON.
|
||||
**Hinweis:** `prompt_resolver` unterstützt **keine** `{{#if}}`-Blöcke — leere Slots = leerer String.
|
||||
|
||||
### 4.4 Betroffene Prompt-Slugs (Reihenfolge Einbindung)
|
||||
### 5.1 Prompt-Profile (welche Slots im Aggregat)
|
||||
|
||||
| Priorität | Slug | Migration | Wirkung |
|
||||
|-----------|------|-----------|---------|
|
||||
| 1 | `planning_exercise_path_qa` | bestehend | Pfad-QS, `quality_score`, Empfehlungen |
|
||||
| 2 | `planning_progression_roadmap` | 078 | Major Steps, Didaktik |
|
||||
| 3 | `planning_progression_stage_spec` | 079 | Stufen-Gates, Erfolgskriterien |
|
||||
| 4 | `planning_progression_start_target` | 087 | Start/Ziel-Extraktion |
|
||||
| 5 | `planning_progression_goal_analysis` | 078 | Zielanalyse |
|
||||
| 6 | Gap-Fill / Übungs-KI | 085+ | `planning_context` ergänzen |
|
||||
| Prompt-Slug | Aggregat enthält primär |
|
||||
|-------------|-------------------------|
|
||||
| `planning_exercise_path_qa` | `*_hints_on_path_qa`, `*_anti_patterns`, `*_description` |
|
||||
| `planning_progression_roadmap` | `*_description`, `*_hints_on_progression`, `*_anti_patterns` |
|
||||
| `planning_progression_stage_spec` | `*_hints_on_progression`, `*_anti_patterns` |
|
||||
| `planning_progression_goal_analysis` | `*_description` |
|
||||
|
||||
Intent-Prompts (`planning_exercise_search_intent`, …) **optional** Phase H1.5 — dort bereits Katalog-JSON.
|
||||
Feinsteuerung: im Admin-Template **granulare** Platzhalter nutzen; Aggregat optional.
|
||||
|
||||
---
|
||||
|
||||
## 5. Builder (Backend)
|
||||
## 6. Speicherung (DB)
|
||||
|
||||
**Neues Modul:** `backend/planning_catalog_prompt_snippets.py`
|
||||
### 6.1 `catalog_prompt_slot_types`
|
||||
|
||||
```python
|
||||
def build_catalog_guidance_for_prompt(
|
||||
cur,
|
||||
catalog: Optional[ProgressionPlanningCatalogContext],
|
||||
) -> Dict[str, str]:
|
||||
"""
|
||||
Returns:
|
||||
catalog_guidance_block: str
|
||||
catalog_context_json: str
|
||||
has_catalog_guidance: bool
|
||||
snippet_keys: list[str] # Metadaten für Logs/Tests
|
||||
"""
|
||||
Metadaten je Slot-Typ (`slot_key`, `display_name`, `description`, `applicable_kinds[]`, `sort_order`, `for_llm`, `for_code`).
|
||||
|
||||
### 6.2 `catalog_prompt_slots`
|
||||
|
||||
```text
|
||||
catalog_kind — focus_area | training_type | target_group | style_direction
|
||||
catalog_id — FK auf jeweilige Stammtabelle (logisch, kein polymorpher FK)
|
||||
slot_key — FK → catalog_prompt_slot_types
|
||||
content — TEXT (Markdown/Plain für LLM)
|
||||
UNIQUE (catalog_kind, catalog_id, slot_key)
|
||||
```
|
||||
|
||||
**Ablauf:**
|
||||
|
||||
1. `catalog` aus Request oder `planning_roadmap.planning_catalog_context` (wie F13).
|
||||
2. Pro Dimension aktives Item auflösen → `snippet_key` → Text aus Registry.
|
||||
3. Snippets in **Prioritätsreihenfolge** §2 zu `_block` zusammenfügen (Überschriften: „Primärfokus“, „Trainingsstil“, …).
|
||||
4. Fehlende Snippets: Dimension **weglassen** (kein Default-Text) — besser kein Snippet als falscher.
|
||||
|
||||
**Einbindung:** Orchestratoren rufen Builder auf und mergen in `variables` vor `load_and_render_ai_prompt`:
|
||||
|
||||
- `planning_exercise_path_qa.py` → `try_llm_qa_progression_path`
|
||||
- `planning_progression_roadmap.py` (Roadmap-/Stage-Pipeline)
|
||||
- `planning_exercise_path_builder.py` (catalog an QA/Match durchreichen)
|
||||
|
||||
`ProgressionPathSuggestRequest` trägt `planning_catalog_context` bereits — kein neues API-Feld nötig.
|
||||
Neuer Katalog-Eintrag im Admin → **keine** Code-Änderung; Slots optional befüllen.
|
||||
|
||||
---
|
||||
|
||||
## 6. Beispiel-Snippets (Review-Entwurf)
|
||||
## 7. Laufzeit-Architektur
|
||||
|
||||
### 6.1 Primärfokus — Gewaltschutz (`focus:gewaltschutz`)
|
||||
```text
|
||||
planning_catalog_context (Request / Graph-Artefakt)
|
||||
↓
|
||||
catalog_prompt_slots.resolve_catalog_prompt_variables(cur, catalog, slug?)
|
||||
↓
|
||||
planning_prompt_variables.merge_planning_prompt_variables(...)
|
||||
↓
|
||||
load_and_render_ai_prompt (ai_prompts Template)
|
||||
```
|
||||
|
||||
**planning_lens:** Planung zielt auf Prävention, Deeskalation, Grenzen und sichere Übungsformen — nicht auf Wettkampf-Perfektion oder Technik-Show.
|
||||
**Module:**
|
||||
|
||||
**qa_criteria:** Gute Pfade bauen Sicherheit, Kommunikation und Alternativen auf; „Lücken“ sind fehlende Deeskalations- oder Rollenspiel-Stufen, nicht fehlende Kick-Varianten.
|
||||
|
||||
**anti_patterns:** Nicht nach Kumite-Tiefe, Explosivität oder Wettkampf-Belastung bewerten.
|
||||
|
||||
### 6.2 Primärfokus — Technik / Kumite-Beinarbeit (`focus:kumite` o. ä.)
|
||||
|
||||
**planning_lens:** Curriculum für eine Technik oder Kumite-Teilaspekt; aufeinander aufbauende Belastung und Anwendungsnähe sind erwünscht.
|
||||
|
||||
**qa_criteria:** Kohärente Progression Grundlagen → Anwendung → Vertiefung; Übergänge ohne Sprünge; themenfremde Kraft-/Ausdauer-Inseln abwerten.
|
||||
|
||||
### 6.3 Trainingsstil — Breitensport (`training_type:breitensport` o. Name-Match)
|
||||
|
||||
**planning_lens:** Partizipation, Verständlichkeit, Freude am Bewegen; weniger maximale Spezialisierung.
|
||||
|
||||
**qa_criteria:** Hohe OK-Rate bei moderatem Schwierigkeitsanstieg; „Perfektion“-Stufen nur optional, nicht als Pflicht-Lücke.
|
||||
|
||||
**rematch_guard:** Keine leeren Slots erzwingen, nur um eine Leistungs-Perfektionsstufe zu füllen.
|
||||
|
||||
### 6.4 Zielgruppe — Leistungsgruppe (`target_group:leistungsgruppe`)
|
||||
|
||||
**qa_criteria:** Höhere Anspruchskurven, Belastungs- und Kombinationsprogressionen sind relevant; Lücken in Spezialisierung können echte Hinweise sein.
|
||||
|
||||
*(Weitere Snippets iterativ ergänzen — nicht alle Katalog-Zeilen sofort.)*
|
||||
| Modul | Rolle |
|
||||
|-------|--------|
|
||||
| `catalog_prompt_slots.py` | Slot-Typen, DB-Lese/Schreib, Resolver, Aggregat-Block |
|
||||
| `planning_prompt_variables.py` | Zentrale Provider-Liste (erweiterbar) |
|
||||
| `planning_catalog_prompt_snippets.py` | Deprecated Re-Exports (Tests/Kompatibilität) |
|
||||
|
||||
---
|
||||
|
||||
## 7. Rollout-Phasen
|
||||
## 8. Admin-API
|
||||
|
||||
### H1 — Minimal viable (Progressionsgraph)
|
||||
| Methode | Pfad | Beschreibung |
|
||||
|---------|------|--------------|
|
||||
| GET | `/api/catalog-prompt-slot-types` | Slot-Typ-Register |
|
||||
| GET | `/api/catalog-prompt-slots/{kind}/{catalog_id}` | Alle Slots eines Eintrags |
|
||||
| PUT | `/api/catalog-prompt-slots/{kind}/{catalog_id}` | Slots upserten (Admin) |
|
||||
|
||||
- [ ] Modul `planning_catalog_prompt_snippets.py` + Registry (5–8 Snippets: 2–3 Foki, 2 Trainingsstile, 2 Zielgruppen)
|
||||
- [ ] Einbindung in **`planning_exercise_path_qa`** + **`planning_progression_roadmap`** + **`planning_progression_stage_spec`**
|
||||
- [ ] Migration Prompt-Templates: Abschnitt `{{#has_catalog_guidance}}…{{/has_catalog_guidance}}`
|
||||
- [ ] Tests: gleicher Pfad + unterschiedlicher Katalog → unterschiedlicher `catalog_guidance_block`; Snapshot QA-Variablen
|
||||
- [ ] Dev-Regression: Gewaltschutz, Breitensport, Kinder — **Hinweistexte** müssen zum Kontext passen (nicht Mae-Geri-Kriterien)
|
||||
`kind`: `focus_area` · `training_type` · `target_group` · `style_direction`
|
||||
|
||||
**Später:** UI-Tabs am Katalog-Editor; Versionierung/Audit wie `ai_prompts`.
|
||||
|
||||
---
|
||||
|
||||
## 9. Rollout-Phasen
|
||||
|
||||
### H1 — Bootstrap (0.8.234) ✓
|
||||
|
||||
Hardcodierte `SNIPPET_REGISTRY` — Proof of Concept für `catalog_guidance_block`.
|
||||
|
||||
### H2 — Slot-Modell (0.8.235) ✓
|
||||
|
||||
- [x] Tabellen `catalog_prompt_slot_types`, `catalog_prompt_slots`
|
||||
- [x] Seed aus H1-Texten (Name-Match auf Stammdaten)
|
||||
- [x] Resolver mit granularen Platzhaltern + Aggregat
|
||||
- [x] Admin-API GET/PUT
|
||||
- [x] `SNIPPET_REGISTRY` aus Laufzeit-Pfad entfernt
|
||||
|
||||
### H2.1 — Admin-UI
|
||||
|
||||
- [x] Slot-Editor an Fokusbereich / Trainingsstil / Zielgruppe / Stilrichtung (`CatalogPromptSlotsEditor`, Stammdaten-Katalog)
|
||||
- [x] Prompt-Templates mit granularen Platzhaltern (Migration 093)
|
||||
- [ ] Platzhalter-Hilfe im KI-Prompt-Editor (erweitert)
|
||||
|
||||
### H1.5
|
||||
|
||||
- [ ] Rematch/Refine: `rematch_guard` aus Snippets respektieren (weniger Ping-Pong bei Breitensport)
|
||||
- [ ] Intent-Prompts + Gap-Fill-Kontext
|
||||
- [ ] `rematch_guard` im Rematch-Loop
|
||||
- [ ] Intent-Prompts + Gap-Fill: `hints_on_exercise`
|
||||
|
||||
### H2 — Betrieb
|
||||
### H3 — Trainingsplanung (Phase G)
|
||||
|
||||
- [ ] Snippets in DB, Admin-UI oder Markdown-Import
|
||||
- [ ] Versionierung / Audit wie `ai_prompts`
|
||||
|
||||
### H3 — Phase G (Trainingsplanung)
|
||||
|
||||
- [ ] Gleicher Builder, anderer Orchestrator (Abschnitts-QS, Slot-Suggest)
|
||||
- [ ] Gleicher Resolver, andere Orchestratoren
|
||||
|
||||
---
|
||||
|
||||
## 8. Tests & Akzeptanz
|
||||
## 10. Tests & Akzeptanz
|
||||
|
||||
| Test | Erwartung |
|
||||
|------|-----------|
|
||||
| `test_catalog_prompt_snippets_priority` | Bei Konflikt gewinnt Fokus-Snippet-Text in `_block`-Reihenfolge |
|
||||
| `test_path_qa_variables_include_guidance` | Mit Gewaltschutz-Kontext enthält gerendeter Prompt „Deeskalation“ o. ä., nicht „Kumite-Perfektion“ |
|
||||
| `test_path_qa_no_snippet_without_catalog` | Ohne Katalog: `has_catalog_guidance=false`, Prompt unverändert wie heute |
|
||||
| Manuell | Mae-Geri-Pfad + Breitensport-Kontext: QS-Highlights ohne Leistungs-Belastungs-Forderungen |
|
||||
|
||||
**Nicht Ziel von H1:** Retrieval-Gewichte neu kalibrieren; Technik-Tuples externalisieren (separates Backlog **H** in Roadmap).
|
||||
| Slot aus DB | Gewaltschutz + `hints_on_path_qa` → Platzhalter enthält Deeskalation |
|
||||
| Ohne Katalog | Alle `{{focus_area_*}}` leer; `has_catalog_guidance` leer |
|
||||
| Neuer Eintrag | Leere Slots, kein Crash; `description`-Fallback aus Stammdaten |
|
||||
| Priorität | Aggregat: Primärfokus vor Trainingsstil |
|
||||
|
||||
---
|
||||
|
||||
## 9. Abgrenzung zu anderen Fixes
|
||||
## 11. Abgrenzung
|
||||
|
||||
| Thema | Dokument / Fix |
|
||||
|-------|----------------|
|
||||
| 88 % vs. 65 % falsche Pipeline | Evaluate-only für Pfad-QS; fairer Compare — Code-Stand 2026-05-22 |
|
||||
| Triviale ID-Tausche im Dialog | `_filter_trivial_slot_diffs` |
|
||||
| Katalog nur im Retrieval | F13 — bleibt, Snippets ergänzen LLM-Schicht |
|
||||
|
||||
Snippets lösen **fachliche Fehlbewertung** — nicht Pipeline-Inkonsistenz allein.
|
||||
| Thema | Hinweis |
|
||||
|-------|---------|
|
||||
| Retrieval-Gewichte | `merge_catalog_context_into_target` — unverändert |
|
||||
| Technik-Gates | `planning_exercise_semantics` — unverändert |
|
||||
| Prompt-Text | `ai_prompts` — editierbar, referenziert Slot-Platzhalter |
|
||||
|
||||
---
|
||||
|
||||
## 10. Changelog
|
||||
## 12. Changelog
|
||||
|
||||
| Datum | Änderung |
|
||||
|-------|----------|
|
||||
| 2026-05-22 | Erstfassung — Priorität Primärfokus → Trainingsstil → Zielgruppe → Stilrichtung; H1–H3 Rollout |
|
||||
| 2026-05-22 | **H2.1** (0.8.236): Admin-UI `CatalogPromptSlotsEditor`; Migration 093 granulare Prompt-Templates |
|
||||
| 2026-05-22 | **H2** (0.8.235): Slot-Typ-Register + `catalog_prompt_slots` DB, granulare Platzhalter, Admin-API |
|
||||
| 2026-05-22 | Konzept §4–§8: zwei Ebenen Slot-Typ vs. Slot-Wert; Platzhalter `{kind}_{slot_key}` |
|
||||
| 2026-05-22 | H1 (0.8.234): Bootstrap-Registry — durch H2 ersetzt |
|
||||
| 2026-05-22 | Erstfassung |
|
||||
Reference in new issue
Block a user