# Priorisierter Maßnahmenplan: Placeholder-Remediation **Audit-Datum:** 29. März 2026 **Basis:** Gap-Cluster-Analyse, 111 Platzhalter **Ziel:** Normkonformität auf 60-70% steigern (aktuell 7%) --- ## ROADMAP-ÜBERSICHT | Phase | Fokus | Dauer | Aufwand | Ziel-Compliance | |-------|-------|-------|---------|-----------------| | **P0** | Blocking Issues | Week 1 | 11-17h | 25-30% | | **P1** | High Priority Gaps | Week 2-3 | 44-58h | 50-60% | | **P2** | Medium Priority | Week 4-5 | 8-12h | 65-70% | | **P3** | Nice-to-Have | Later | 0.5h | 70%+ | | **TOTAL** | | 4-6 Wochen | 63.5-87.5h | 70%+ | --- ## P0: BLOCKING ISSUES (Week 1) **Ziel:** Kritische Inkonsistenzen und Pflichtfelder beheben **Aufwand:** 11-17 Stunden **Team:** 1-2 Entwickler **Dependencies:** Keine - sofort startbar --- ### P0.1: Code-Dokumentations-Konflikte (SOFORT) **Gap-Cluster:** 11 **Betroffene Platzhalter:** 3 (weight_trend, activity_summary, activity_detail) **Severity:** 🔴 CRITICAL **Aufwand:** 1 Stunde **Maßnahmen:** 1. **weight_trend Fix** ```diff # PLACEHOLDER_CATALOG_EXTENDED.json { "key": "weight_trend", - "description": "Gewichtstrend (7d/30d)", + "description": "Gewichtstrend 28d (lineare Regression)", - "semantic_contract": "Gewichtstrend (7d/30d)", + "semantic_contract": "Lineare Regression über 28 Tage, Richtung + Delta in kg", - "time_window": "unknown", + "time_window": "28d", } ``` 2. **activity_summary Fix** ```diff { "key": "activity_summary", - "description": "Aktivitäts-Zusammenfassung (7d)", + "description": "Aktivitäts-Zusammenfassung 14d", - "semantic_contract": "Aktivitäts-Zusammenfassung (7d)", + "semantic_contract": "Aggregierte Aktivitäts-Metriken über 14 Tage", - "time_window": "unknown", + "time_window": "14d", } ``` 3. **activity_detail Fix** ```diff { "key": "activity_detail", - "description": "No description available", + "description": "Detaillierte Aktivitäts-Liste 14d (max 20 Einträge)", - "semantic_contract": "No description available", + "semantic_contract": "Sortierte Liste letzter 20 Aktivitäten aus 14-Tage-Fenster, DESC nach Datum", - "time_window": "unknown", + "time_window": "14d", } ``` **Validation:** - Code-Review: Zeitfenster im Code bestätigen - Prompt-Review: Alle 10+2+4 betroffenen Prompts/Pipelines prüfen **Owner:** Backend Lead **Blocker:** Keine **Output:** 3 Fixed Platzhalter, Updated Catalog --- ### P0.2: Zeitfenster Name-Pattern (AUTOMATISCH) **Gap-Cluster:** 4.1 **Betroffene Platzhalter:** 15 (zeitraum_*, sleep_*_7d, training_frequency_7d, etc.) **Severity:** 🔴 CRITICAL **Aufwand:** 1 Stunde (automatisches Skript) **Maßnahmen:** **Skript: `fix_time_window_from_name.py`** ```python import json import re # Regex-Pattern für Zeitfenster im Namen patterns = { r'_7d$|_7d_': '7d', r'_14d$|_14d_': '14d', r'_28d$|_28d_': '28d', r'_30d$|_30d_': '30d', r'_90d$|_90d_': '90d', } catalog = load_catalog() fixes = [] for placeholder in catalog['placeholders'].values(): key = placeholder['key'] # Überspringe bereits definierte if placeholder['time_window'] != 'unknown': continue # Pattern-Match for pattern, window in patterns.items(): if re.search(pattern, key): placeholder['time_window'] = window fixes.append(f"{key}: unknown → {window}") break print(f"Fixed {len(fixes)} placeholders") save_catalog(catalog) ``` **Erwartete Fixes:** - `zeitraum_7d`: unknown → 7d - `zeitraum_30d`: unknown → 30d - `zeitraum_90d`: unknown → 90d - `sleep_avg_duration_7d`: unknown → 7d - `sleep_quality_7d`: unknown → 7d - `training_frequency_7d`: unknown → 7d - `proxy_internal_load_7d`: unknown → 7d - `energy_balance_7d`: unknown → 7d - `protein_adequacy_28d`: unknown → 28d - ... (insgesamt ~15) **Validation:** - Manuelle Review der Auto-Fixes - Diff-Check vor Commit **Owner:** DevOps / Automation **Blocker:** Keine **Output:** 15 Fixed Platzhalter --- ### P0.3: Zeitfenster Code-Parameter (SEMI-AUTOMATISCH) **Gap-Cluster:** 4.2 **Betroffene Platzhalter:** ~20 (activity_summary, sleep_avg_duration, rest_days_count, etc.) **Severity:** 🔴 CRITICAL **Aufwand:** 2-3 Stunden **Maßnahmen:** 1. **Code-Parameter-Extraktion** - Suche in `placeholder_resolver.py` nach `days=X` Parametern - Greppen in `data_layer/*.py` nach Default-Werten ```bash # Beispiel-Grep grep -n "def get_.*_data.*days=" backend/data_layer/*.py grep -n "lambda.*days=" backend/placeholder_resolver.py ``` 2. **Manuelle Zuordnung** - Für jeden Treffer: Placeholder Key identifizieren - Default-Wert → time_window setzen **Erwartete Fixes:** - `sleep_avg_duration`: Code `days=7` → time_window: 7d - `rest_days_count`: Code `days=30` → time_window: 30d - `nutrition_days`: Code `days=30` → time_window: 30d - ... (~20 total) **Validation:** - Code-Review der Mappings - Stichproben-Tests **Owner:** Backend Developer **Blocker:** P0.2 abgeschlossen **Output:** 20 Fixed Platzhalter --- ### P0.4: Semantic Contract Bulk-Update **Gap-Cluster:** 1.1 **Betroffene Platzhalter:** 49 ("No description available") **Severity:** 🔴 CRITICAL **Aufwand:** 4-6 Stunden **Maßnahmen:** **Input:** Semantic-Contract-Agent-Report (bereits vorhanden) **Prozess:** 1. Für jeden der 49 Platzhalter: - `description` aus Agent-Report übernehmen - `semantic_contract` aus Agent-Report übernehmen - `category` aus Agent-Report setzen (statt "Unknown") 2. Bulk-Update via JSON-Merge-Skript 3. Manuelle Review der Top-10 kritischsten (nach Usage) **Beispiel-Update (ability_balance_coordination):** ```diff { "key": "ability_balance_coordination", - "category": "Unknown", + "category": "Training", - "description": "No description available", + "description": "Koordinationsfähigkeit-Balance-Anteil (%)", - "semantic_contract": "No description available", + "semantic_contract": "Gewichteter Anteil der Trainings-Last für Koordinations-Fähigkeit über 28-Tage-Fenster", - "time_window": "unknown", + "time_window": "28d", } ``` **Prioritäts-Reihenfolge (nach Usage):** 1. Goals & Focus (16) - 7 produktkritisch 2. Correlations (5) - experimentell, aber wichtig 3. Body Deltas (5) - Körper-Tracking 4. Nutrition (6) - Ernährungs-Metriken 5. Training (8) - Ability Balance, Load 6. Summaries (3) - circ_summary, caliper_summary 7. Meta (2) - zeitraum_90d 8. Plateau (1) - plateau_detected 9. Top Drivers (1) - top_drivers **Validation:** - Review der Top-10 produktkritischsten Platzhalter manuell - Stichprobe 10% der restlichen - Automated Consistency Check (keine "No description" mehr) **Owner:** Backend Lead + Product (für fachliche Review) **Blocker:** Keine **Output:** 49 Fixed Platzhalter, alle mit Kategorie + Description --- ### P0.5: Zeitfenster Fach-Entscheidung **Gap-Cluster:** 4.3 **Betroffene Platzhalter:** ~39 (Scores, Ability Balance, Correlations, Goals, Snapshots) **Severity:** 🔴 CRITICAL **Aufwand:** 4-6 Stunden (Meeting + Dokumentation) **Maßnahmen:** **Phase 1: Kategorisierung (2h)** - Product + Tech Meeting - Entscheidung pro Kategorie: | Kategorie | Platzhalter | Vorschlag | Rationale | |-----------|-------------|-----------|-----------| | **Scores (6)** | activity_score, nutrition_score, recovery_score, body_progress_score, goal_progress_score, data_quality_score | `custom` oder `mixed` | Kombinieren verschiedene Zeitfenster | | **Ability Balance (5)** | coordination, endurance, mental, mobility, strength | `28d` | Rolling-Window über 28 Tage | | **Correlations (5)** | energy_weight_lag, load_hrv, load_rhr, protein_lbm, sleep_recovery | `28d` | Min-Daten für Reliability | | **Goals & Focus (16)** | active_goals_json, focus_areas_*, top_goal_*, top_3_goals_*, focus_cat_* | `latest` (Snapshot) oder `custom` | Je nach Progress-Berechnung | | **Snapshots (7)** | bmi, goal_weight, goal_bf_pct, waist_hip_ratio, recomposition_quadrant, plateau_detected, top_drivers | `latest` oder `custom` | Momentaufnahme vs. Berechnet | **Phase 2: Dokumentation (2h)** - Entscheidungen in Decision-Log festhalten - time_window-Werte in Catalog setzen - Semantic Contracts anpassen (Zeit-Bezug aufnehmen) **Phase 3: Validation (1h)** - Review mit Stakeholdern - Prompt-Autoren informieren (Breaking Change bei "custom" → spezifisches Fenster) **Owner:** Product Manager + Tech Lead **Blocker:** P0.4 Semantic Contract abgeschlossen **Output:** Decision-Log, 39 Fixed Platzhalter --- ### P0 SUMMARY **Gesamt-Aufwand:** 11-17 Stunden **Deliverables:** - 3 Code-Docs-Konflikte gelöst - 74 time_window: unknown → definierte Werte - 49 description/category: Unknown/No description → vollständig - **Total Fixed:** 77 Platzhalter (15+20+39+3 unique) **Impact:** - **Compliance:** 7% → 25-30% - **Blocked Gaps:** time_window, description, category, code-conflicts **Next:** P1 kann starten (Confidence, Data Layer, Source Tables) --- ## P1: HIGH PRIORITY (Week 2-3) **Ziel:** Technische Tiefe hinzufügen (Confidence, Data Layer, Source Tables) **Aufwand:** 44-58 Stunden **Team:** 2-3 Entwickler **Dependencies:** P0 abgeschlossen --- ### P1.1: Confidence-Logik für Trend-Platzhalter **Gap-Cluster:** 5.1 **Betroffene Platzhalter:** 11 (weight_*_slope, *_28d_delta, vo2max_trend_28d) **Severity:** 🟡 HIGH **Aufwand:** 12-16 Stunden **Maßnahmen:** **Pattern:** ```python # In data_layer/body_metrics.py def calculate_weight_28d_slope(profile_id: int, conn): """Gewichtstrend über 28 Tage mit Confidence.""" # 1. Daten holen rows = fetch_weight_data(profile_id, days=28, conn=conn) # 2. Confidence berechnen confidence = calculate_confidence( data_points=len(rows), time_window_days=28, metric_type='trend' ) if confidence == 'insufficient': return { 'slope': None, 'confidence': 'insufficient', 'data_points': len(rows), 'min_required': 8 # 28% coverage } # 3. Slope berechnen (nur wenn sufficient) slope = linear_regression_slope(rows) return { 'slope': slope, 'confidence': confidence, # high/medium/low 'data_points': len(rows), 'r_squared': calculate_r_squared(rows, slope) } ``` **Thresholds (trend-specific):** ```python def calculate_confidence(data_points, time_window_days, metric_type): coverage = data_points / time_window_days if metric_type == 'trend': # Strengere Thresholds für Trends if coverage >= 0.70: # >= 70% return 'high' elif coverage >= 0.50: # >= 50% return 'medium' elif coverage >= 0.30: # >= 30% return 'low' else: return 'insufficient' # ... andere Typen ``` **Zu implementieren für:** 1. `weight_28d_slope` (28d, min 8, ideal 20) 2. `weight_90d_slope` (90d, min 27, ideal 63) 3. `weight_7d_median` (7d, min 3, ideal 5) 4. `fm_28d_change` (28d, min 2, ideal 18) 5. `lbm_28d_change` (28d, min 2, ideal 18) 6. `waist_28d_delta` (28d, min 2, ideal 18) 7. `hip_28d_delta` (28d, min 2, ideal 18) 8. `chest_28d_delta` (28d, min 2, ideal 18) 9. `arm_28d_delta` (28d, min 2, ideal 18) 10. `thigh_28d_delta` (28d, min 2, ideal 18) 11. `vo2max_trend_28d` (28d, min 4, ideal 18) **Testing:** - Unit-Tests für calculate_confidence() mit verschiedenen Coverages - Integration-Tests mit real data (0%, 30%, 50%, 70%, 100% coverage) - Regression-Tests (alte Werte ohne Confidence bleiben gleich) **Owner:** Backend Developer (Senior) **Blocker:** P0 time_window abgeschlossen **Output:** 11 Platzhalter mit Confidence-Logik --- ### P1.2: Confidence-Logik für Score-Platzhalter **Gap-Cluster:** 5.2 **Betroffene Platzhalter:** 6 (activity_score, nutrition_score, recovery_score, etc.) **Severity:** 🟡 HIGH **Aufwand:** 8-10 Stunden **Maßnahmen:** **Composite-Confidence-Pattern:** ```python def calculate_nutrition_score(profile_id: int, conn): """Nutrition Score mit Composite Confidence.""" # 1. Sub-Scores berechnen (mit eigenen Confidences) energy_balance = calculate_energy_balance_7d(profile_id, conn) protein_adequacy = calculate_protein_adequacy_28d(profile_id, conn) macro_consistency = calculate_macro_consistency_score(profile_id, conn) # 2. Composite Confidence = MIN(sub-confidences) confidence_levels = ['high', 'medium', 'low', 'insufficient'] confidences = [ energy_balance['confidence'], protein_adequacy['confidence'], macro_consistency['confidence'] ] # Min-Confidence min_confidence = min(confidences, key=lambda c: confidence_levels.index(c)) if min_confidence == 'insufficient': return { 'score': None, 'confidence': 'insufficient', 'sub_scores': {...}, 'note': 'Mindestens eine Komponente hat insufficient data' } # 3. Score berechnen (gewichtet) score = ( energy_balance['score'] * 0.4 + protein_adequacy['score'] * 0.4 + macro_consistency['score'] * 0.2 ) return { 'score': round(score), 'confidence': min_confidence, 'sub_scores': { 'energy_balance': energy_balance, 'protein_adequacy': protein_adequacy, 'macro_consistency': macro_consistency } } ``` **Zu implementieren für:** 1. `activity_score` (training_volume + frequency + quality) 2. `nutrition_score` (energy_balance + protein_adequacy + macro_consistency) 3. `recovery_score` (sleep_duration + sleep_quality + hrv + rhr) 4. `body_progress_score` (weight_trend + bf_change + lbm_change) 5. `goal_progress_score` (weighted goals progress) 6. `data_quality_score` (data availability per domain) **Testing:** - Scenario-Tests: alle Sub-Scores high → Composite high - Scenario-Tests: eine Sub-Score insufficient → Composite insufficient - Edge-Cases: missing Sub-Components **Owner:** Backend Developer (Mid/Senior) **Blocker:** P1.1 Trend-Confidence abgeschlossen (Pattern etabliert) **Output:** 6 Platzhalter mit Composite Confidence --- ### P1.3: Confidence-Logik für Korrelations-Platzhalter **Gap-Cluster:** 5.3 **Betroffene Platzhalter:** 5 (correlation_*) **Severity:** 🟡 HIGH **Aufwand:** 4-6 Stunden **Maßnahmen:** **Correlation-Confidence-Pattern:** ```python def calculate_lag_correlation(profile_id, metric_a, metric_b, lag_days=[0,3,7,14], conn): """Lag-Korrelation mit Pair-basiertem Confidence.""" results = [] for lag in lag_days: pairs = fetch_paired_data(profile_id, metric_a, metric_b, lag, conn) n_pairs = len(pairs) # Confidence basierend auf Anzahl Paare if n_pairs >= 28: confidence = 'high' elif n_pairs >= 21: confidence = 'medium' elif n_pairs >= 14: confidence = 'low' else: confidence = 'insufficient' if confidence == 'insufficient': correlation = None else: correlation = pearson_correlation(pairs) results.append({ 'lag_days': lag, 'correlation': correlation, 'n_pairs': n_pairs, 'confidence': confidence, 'note': 'explorativ, nicht kausal' }) return { 'correlations': results, 'overall_confidence': min([r['confidence'] for r in results]) } ``` **Zu implementieren für:** 1. `correlation_energy_weight_lag` (min 21 Paare) 2. `correlation_load_hrv` (min 21 Paare) 3. `correlation_load_rhr` (min 21 Paare) 4. `correlation_protein_lbm` (min 28 Paare, Training moderiert) 5. `correlation_sleep_recovery` (min 21 Paare) **Testing:** - Synthetic Data: 10, 14, 21, 28, 35 Paare → Confidence-Check - Real Data: Validate gegen tatsächliche Daten-Dichte **Owner:** Backend Developer (Senior, Statistik-Know-how) **Blocker:** P1.1 Confidence-Pattern etabliert **Output:** 5 Platzhalter mit Correlation-Confidence --- ### P1.4: Data-Layer-Module dokumentieren **Gap-Cluster:** 2 **Betroffene Platzhalter:** 100 (data_layer_module: null) **Severity:** 🔴 CRITICAL **Aufwand:** 6-8 Stunden **Maßnahmen:** **Input:** Code-Evidence-Agent-Report (technische Herkunft für alle 111) **Prozess:** 1. **Mapping-Extraktion:** - Für jede `_safe_*`-Funktion: Gerufene Data-Layer-Funktion identifizieren - Mapping: Placeholder Key → Data-Layer-Module 2. **Bulk-Update-Skript:** ```python # Mapping aus Code-Evidence-Report data_layer_mapping = { 'goal_progress_score': 'data_layer.scores', 'body_progress_score': 'data_layer.body_metrics', 'nutrition_score': 'data_layer.nutrition_metrics', 'activity_score': 'data_layer.activity_metrics', 'recovery_score': 'data_layer.recovery_metrics', # ... 95 more } # Catalog Update for key, module in data_layer_mapping.items(): catalog['placeholders'][key]['source']['data_layer_module'] = module ``` 3. **Validation:** - Automated Check: Alle 111 haben data_layer_module gesetzt - Stichprobe 10%: Manuell im Code validieren **Owner:** DevOps / Backend Lead **Blocker:** Code-Evidence-Agent-Report finalisiert (✓) **Output:** 100 Fixed Platzhalter --- ### P1.5: Source-Tables dokumentieren **Gap-Cluster:** 3 **Betroffene Platzhalter:** 90 (source_tables: []) **Severity:** 🔴 CRITICAL **Aufwand:** 6-8 Stunden **Maßnahmen:** **Identisch zu P1.4:** - Mapping aus Code-Evidence-Report übernehmen - Bulk-Update-Skript - Validation **Mapping-Beispiel:** ```python source_tables_mapping = { 'weight_aktuell': ['weight_log'], 'weight_trend': ['weight_log'], 'kf_aktuell': ['caliper_log'], 'bmi': ['weight_log', 'profiles'], 'nutrition_score': ['nutrition_log'], 'activity_score': ['activity_log'], 'recovery_score': ['sleep_log', 'vitals_baseline', 'rest_days'], # ... 83 more } ``` **Owner:** DevOps / Backend Lead **Blocker:** Code-Evidence-Agent-Report finalisiert (✓) **Output:** 90 Fixed Platzhalter --- ### P1.6: Strukturierte Missing-Value-Policy **Gap-Cluster:** 6 **Betroffene Platzhalter:** 110 (nur legacy_display) **Severity:** 🟡 MEDIUM **Aufwand:** 8-10 Stunden **Maßnahmen:** **Dual-Mode-Ansatz:** ```python # Alte Resolver-Return (Backward-Compatible) def get_weight_trend(profile_id, days=28, conn=None): data = get_weight_trend_data(profile_id, days, conn) if data['confidence'] == 'insufficient': # Legacy: String-Return return "nicht verfügbar" return f"{data['direction']} {data['delta']} kg" # Neue Structured-Return (Parallel) def get_weight_trend_structured(profile_id, days=28, conn=None): data = get_weight_trend_data(profile_id, days, conn) if data['confidence'] == 'insufficient': return { 'available': False, 'value_raw': None, 'value_display': "nicht verfügbar", 'missing_reason': 'insufficient_data', 'missing_value_policy': { 'legacy_display': "nicht verfügbar", 'structured_null': True, 'reason_codes': ['no_data', 'insufficient_data', 'resolver_error'] }, 'metadata': { 'data_points': data['data_points'], 'min_required': data['min_required'], 'time_window': '28d' } } return { 'available': True, 'value_raw': data['slope'], 'value_display': f"{data['direction']} {data['delta']} kg", 'confidence': data['confidence'], 'metadata': { 'data_points': data['data_points'], 'r_squared': data['r_squared'], 'time_window': '28d' } } ``` **Migration-Strategie:** 1. **Phase 1:** Neue `*_structured()`-Funktionen neben alten (Parallel) 2. **Phase 2:** Extended Export nutzt structured 3. **Phase 3:** Legacy-Export bleibt unverändert (Backward-Compat) 4. **Phase 4 (Later):** Deprecate alte Funktionen nach 6-12 Monaten **Zu implementieren für:** - Alle 110 Platzhalter (außer weight_aktuell, der bereits structured ist) **Testing:** - Legacy-Tests: Alte Funktionen bleiben unverändert - Structured-Tests: Neue Funktionen returnieren korrekte Struktur - Export-Tests: Extended Export nutzt structured **Owner:** Backend Team (2 Entwickler) **Blocker:** P1.1-P1.3 Confidence abgeschlossen **Output:** 110 Platzhalter mit Dual-Mode-Support --- ### P1 SUMMARY **Gesamt-Aufwand:** 44-58 Stunden **Deliverables:** - 11 Trend-Platzhalter mit Confidence - 6 Score-Platzhalter mit Composite Confidence - 5 Correlation-Platzhalter mit Pair-Confidence - 100 Platzhalter mit data_layer_module - 90 Platzhalter mit source_tables - 110 Platzhalter mit Structured Missing-Value-Policy - **Total Fixed:** 103 unique Platzhalter (alle außer 8 bereits conforme) **Impact:** - **Compliance:** 25-30% → 50-60% - **Blocked Gaps:** Confidence, Data Layer, Source Tables, Missing-Value-Policy **Next:** P2 Production-Ready + Deprecation --- ## P2: MEDIUM PRIORITY (Week 4-5) **Ziel:** Production-Status und Deprecation-Strategie **Aufwand:** 8-12 Stunden **Team:** Product + Tech Lead **Dependencies:** P1 abgeschlossen --- ### P2.1: Schema-Status auf Production (Top 20) **Gap-Cluster:** 8 **Betroffene Platzhalter:** 20-30 Kandidaten **Severity:** 🟡 MEDIUM **Aufwand:** 4-6 Stunden **Maßnahmen:** **Kriterien für `schema_status: production`:** 1. `metadata_completeness_score >= 80` 2. `used_by.prompts.length >= 1 OR used_by.pipelines.length >= 1` 3. `time_window != 'unknown'` 4. `category != 'Unknown'` 5. `description != 'No description available'` 6. `confidence_logic != null OR (type == 'atomic' AND time_window == 'latest')` 7. `known_issues.length == 0` **Prozess:** 1. **Automated Eligibility-Check:** ```python def is_production_ready(placeholder): checks = [ placeholder['metadata_completeness_score'] >= 80, len(placeholder['used_by']['prompts']) >= 1 or len(placeholder['used_by']['pipelines']) >= 1, placeholder['time_window'] != 'unknown', placeholder['category'] != 'Unknown', placeholder['description'] != 'No description available', placeholder['confidence_logic'] is not None or (placeholder['type'] == 'atomic' and placeholder['time_window'] == 'latest'), len(placeholder['known_issues']) == 0 ] return all(checks) ``` 2. **Kandidaten-Liste generieren** 3. **Manuelle Review** (Product + Tech Lead) - Sind diese wirklich production-ready? - Fehlt noch etwas? 4. **Schema-Status-Update** **Erwartete Kandidaten (12-15):** - Nutrition Averages (4): protein_avg, kcal_avg, fat_avg, carb_avg - Body Metrics (3): weight_aktuell, weight_trend, kf_aktuell - Profil (4): name, age, height, geschlecht - Summaries (2): caliper_summary, circ_summary - Goals (2-3): goal_weight, goal_bf_pct, top_goal_name **Owner:** Tech Lead + Product Manager **Blocker:** P1 abgeschlossen (Confidence, Data Layer) **Output:** 12-15 Platzhalter mit `schema_status: production` --- ### P2.2: Ungenutzte Platzhalter - Integration planen **Gap-Cluster:** 9 (REINTERPRETIERT: Nicht Deprecation, sondern Integration) **Betroffene Platzhalter:** 67 (ungenutzt) **Severity:** 🟡 MEDIUM (Prompt-Bibliothek Vollständigkeit) **Aufwand:** 4-6 Stunden **Maßnahmen:** **Neue Klassifizierung (siehe USAGE_ROLE_CLASSIFICATION.md):** 1. **unused_but_planned (30)** - Explizit in Roadmap Phase 0c/1/2 - Scores (6), Correlations (5), Ability Balance (5), Goals Details (11), etc. - **Action:** Timeline bestätigen, Prototyping-Prompts erstellen 2. **unused_but_plausible (37)** - Fachlich sinnvoll, noch nicht in Prompts - Body Deltas, Nutrition Details, Training Quality, Focus Category, Meta - **Action:** Prompt-Use-Cases identifizieren, Templates für Quick Wins 3. **redundant_or_duplicate (0)** - Keine! - Alle 67 haben fachliche Berechtigung **Prozess:** 1. **Meeting (2h):** Product + Tech Review aller 67 - Gruppe A (30 geplant): Timeline bestätigen (Phase 0c/1/2) - Gruppe B (37 plausibel): Prompt-Use-Cases identifizieren (10-15 Quick Wins) 2. **Dokumentation (1h):** Integration-Roadmap, Prompt-Kandidaten-Liste 3. **Implementation (1-2h):** Prompt-Templates erstellen (5-10 Quick Wins) 4. **Communication (1h):** Prompt-Autoren: "Neue Platzhalter verfügbar" **Integration-Beispiel (statt Deprecation):** ```json { "key": "arm_28d_delta", "usage_role": "unused_but_plausible", "integration_priority": "medium", "prompt_use_cases": [ "Fortschritts-Analyse spezifischer Körperteile", "Asymmetrie-Erkennung (linker vs. rechter Arm)", "Trainingsplan-Effektivität (Armtraining Tracking)" ], "example_prompt_template": "Deine Armumfänge haben sich in den letzten 28 Tagen um {{arm_28d_delta}}cm verändert. Analyse: ..." } ``` **Owner:** Product Manager + Tech Lead **Blocker:** P1 abgeschlossen **Output:** Integration-Roadmap, Prompt-Templates (5-10), Nutzungsrate +10-20% --- ### P2 SUMMARY **Gesamt-Aufwand:** 8-12 Stunden **Deliverables:** - 12-15 Production-Ready Platzhalter - Integration-Roadmap für 30 geplante Platzhalter (Phase 0c/1/2) - Prompt-Templates für 5-10 Quick Wins (ungenutzte Platzhalter aktivieren) **Impact:** - **Compliance:** 50-60% → 65-70% - **Governance:** Production-Pipeline etabliert, Placeholder-Integration vorangetrieben - **Nutzungsrate:** 40% → 50-60% (organisch durch Integration) **Next:** P3 (Nice-to-Have) --- ## P3: NICE-TO-HAVE (Later) **Ziel:** Dokumentations-Feinschliff **Aufwand:** 0.5 Stunden **Team:** Tech Writer / DevOps **Dependencies:** P2 abgeschlossen --- ### P3.1: Export-Inkonsistenzen Dokumentation **Gap-Cluster:** 10 **Betroffene:** Dokumentation **Severity:** 🟢 INFO **Aufwand:** 0.5 Stunden **Maßnahmen:** **Export Spec Update:** ```diff # PLACEHOLDER_EXPORT_SPEC.md - **Total Placeholders:** 116 + **User Placeholders:** 111 + **Meta Fields:** 5 (schema_version, generated_at, normative_standard, total_placeholders, metadata.summary) + **Total Export Entries:** 116 ``` **Owner:** Tech Writer **Blocker:** Keine **Output:** Updated Export Spec --- ## ERFOLGS-METRIKEN ### Nach P0 (Week 1) - ✅ **Compliance:** 7% → 25-30% - ✅ **time_window: unknown:** 74 → 0 - ✅ **category: Unknown:** 49 → 0 - ✅ **description: No description:** 49 → 0 - ✅ **Code-Docs-Konflikte:** 3 → 0 ### Nach P1 (Week 3) - ✅ **Compliance:** 25-30% → 50-60% - ✅ **Confidence-Logik:** 8 → 28 (Trend + Score + Correlation) - ✅ **data_layer_module:** 11 → 111 - ✅ **source_tables:** 21 → 111 - ✅ **Structured Missing-Value:** 1 → 111 ### Nach P2 (Week 5) - ✅ **Compliance:** 50-60% → 65-70% - ✅ **schema_status: production:** 0 → 12-15 - ✅ **deprecated:** 0 → 15-20 - ✅ **Technical Debt:** Reduziert ### Nach P3 - ✅ **Compliance:** 65-70% → 70%+ - ✅ **Dokumentation:** Vollständig konsistent --- ## RISIKEN & MITIGATION | Risiko | Wahrscheinlichkeit | Impact | Mitigation | |--------|--------------------|----|-----------| | **P0 Zeitfenster-Fach-Entscheidung dauert länger** | MEDIUM | MEDIUM | Vorbereitete Kategorisierung, klare Optionen, Decision-Meeting zeitig ansetzen | | **P1 Confidence-Implementierung komplexer als geschätzt** | MEDIUM | HIGH | Pattern aus nutrition_avg wiederverwenden, Senior Dev assignen | | **Breaking Changes durch Zeitfenster-Fixes** | LOW | HIGH | Code ist autoritativ, Docs passen sich an → kein Breaking Change | | **Prompt-Autoren akzeptieren Deprecations nicht** | LOW | MEDIUM | Klare Communication, Replacement-Guides, Grace Period (3 Monate) | --- ## KOMMUNIKATIONS-PLAN ### Week 1 (P0 Kickoff) - **Email:** Alle Stakeholder über Audit-Ergebnisse informieren - **Meeting:** P0-Prioritäten mit Tech Lead abstimmen - **Kickoff:** Development Team P0-Tasks zuweisen ### Week 2 (P1 Kickoff) - **Standup:** Daily Updates zu Confidence-Implementierung - **Review:** Mid-Sprint Review nach P1.1-P1.3 ### Week 3 (P1 Abschluss) - **Demo:** P1-Ergebnisse dem Team zeigen - **Docs:** Updated Catalog veröffentlichen ### Week 4-5 (P2) - **Meeting:** Production-Readiness-Review - **Communication:** Deprecation-Plan an Prompt-Autoren ### Week 6 (Abschluss) - **Retrospektive:** Lessons Learned - **Documentation:** Finale Compliance-Metrics veröffentlichen --- ## TOOLING & AUTOMATION ### Skripte (entwickeln während P0-P1) 1. `fix_time_window_from_name.py` - Automatische Name-Pattern-Fixes 2. `extract_code_parameters.py` - Code-Parameter → time_window 3. `bulk_update_catalog.py` - JSON-Merge für Bulk-Updates 4. `validate_compliance.py` - Automatische Compliance-Checks 5. `check_production_ready.py` - Production-Eligibility-Check ### CI/CD-Integration (P2-P3) - Pre-Commit-Hook: Validate neue Platzhalter gegen Normative Spec - CI: Consistency-Checks (Code ↔ Catalog) - CD: Automated Catalog-Deployment --- ## ABSCHLUSS-KRITERIEN **P0 erfolgreich wenn:** - Alle 3 Code-Docs-Konflikte gelöst - Alle 74 time_window: unknown → definiert - Alle 49 No description → vollständig - Automated Tests grün **P1 erfolgreich wenn:** - Mindestens 20 Platzhalter mit Confidence-Logik - Alle 100 data_layer_module gesetzt - Alle 90 source_tables gesetzt - Structured Missing-Value für alle 110 (Dual-Mode) **P2 erfolgreich wenn:** - Mindestens 12 Platzhalter `schema_status: production` - Mindestens 15 Platzhalter `deprecated: true` - Decision-Log veröffentlicht **Gesamt-Projekt erfolgreich wenn:** - **Compliance >= 65%** - **0 Code-Docs-Konflikte** - **0 time_window: unknown** - **12+ Production-Ready Platzhalter** --- **Maßnahmenplan erstellt von:** Claude Code (Lead Audit Agent) **Basis:** Gap-Cluster-Analyse, 4-Agent-Evidence **Genehmigung:** Pending (Review mit Tech Lead + Product Manager)