# 🧹 [Curator] Session-Log – Wizard-Orchestrator Migration (Pause) Datum: 2026-04-21 · Kontext: Desktop-First, Offline-First · Initiative: Wizard-Orchestrator & Offline-Drafts ## Zusammenfassung - Spike abgeschlossen: neues Modul `frontend/core/wizard` mit Runtime + Mini-DSL + UI-Scaffold (MVP) integriert. - Erste Integration im Veranstaltungs-Flow hinter Feature-Flag; Koin-Parameterfehler behoben; Hotkeys + DraftStore (MVP) ergänzt. - Build und Tests grün; Session wird hier sauber pausiert. ## Erreichte Ergebnisse (Inkrement Stand heute) - Modul `:frontend:core:wizard` - Runtime/DSL: `StepId`, `WizardContext`, `WizardState`, `Guard`, `Transition`, `StepEffects`, `WizardRuntime`. - DSL: `flow { step { whenGuard(id) go target; otherwise go … } }`. - Samples/Tests: Demo-Event-Flow (2+ Steps), Jvm/Common-Tests (Next/Back/Guards) – 6/6 grün. - UI - `WizardScaffold` (Header/Breadcrumb/Footer-Slots), `WizardScaffoldWithHotkeys` (Enter/Shift+Enter/Alt+S). - Feature-Integration (hinter Flag) - `EventWizardScreen` nutzt Scaffold-Variante bei aktivem Flag. - `EventWizardViewModel` teils delegiert; Guard-Pfade (Ansprechperson/Meta) im Demo-Flow vorhanden. - DI - Koin-Parameterübergabe fix: `parametersOf(null as Long?)` für `AppScreen.EventNeu`. - Drafts (MVP) - In-Memory `DraftStore` für Autosave/Resume-Hooks angebunden. ## Verifikation - Build: erfolgreich (Desktop-Konfiguration). - Tests: Wizard-Modul 6/6 grün (Guards, Transitionen, Back/Next). - Manueller Smoke: Navigation „Event neu“ startet ohne Koin-Fehler. ## Offene Punkte / Nächste Schritte (Resume-Plan) 1) Tests ergänzen - Branch-Abdeckung für neuen Guard `needsContactPerson` finalisieren (true/false beide Pfade). - Property-Test: Resume-Logik (Draft → korrekter Step) vorbereiten. 2) Event-Flow weiter migrieren - VM-Delegation für weitere Steps (ANSPRECHPERSON_MAPPING, META_DATA) komplettieren. - Mapping `VeranstaltungWizardState ↔ Acc` erweitern. 3) WizardScaffold UX - Fehler-Summary im Footer anbinden (aktuell minimal/Platzhalter). - Dev-Overlay (aktueller Step, Guard-Entscheide) optional aktivierbar. 4) DraftStore - Persistente Speicherung (Datei/DB) statt in-memory; `flowVersion` + Migration-Schnittstellen. 5) Doku/ADRs - ADR-0025/0026/0027 Status auf "PROPOSED"/"IN REVIEW" prüfen und ggf. aktualisieren. - README Wizard-DSL verlinken; DI-Parameterkonventionen ergänzen. ## Wie fortsetzen (Kurz-Anleitung) - Feature-Flag: Standard AUS. Zum Verproben im Dev-Profil aktivieren (`WizardRuntimeEnabled = true`). - Tests ausführen: - Modul-weit: `./gradlew :frontend:core:wizard:jvmTest` - Projekt-Build: `./gradlew build` - Einstiegspunkt Desktop: `frontend/shells/meldestelle-desktop/.../main.kt` → `AppScreen.EventNeu` (prüft Flag & Scaffold). ## Relevante Dateien & Pfade - Core Wizard - `frontend/core/wizard/src/commonMain/kotlin/at/mocode/frontend/core/wizard/runtime/WizardCore.kt` - `frontend/core/wizard/src/commonMain/kotlin/at/mocode/frontend/core/wizard/dsl/WizardDsl.kt` - `frontend/core/wizard/src/commonMain/kotlin/at/mocode/frontend/core/wizard/ui/WizardScaffold.kt` - `frontend/core/wizard/src/jvmMain/kotlin/at/mocode/frontend/core/wizard/ui/WizardHotkeys.kt` - `frontend/core/wizard/src/commonMain/kotlin/at/mocode/frontend/core/wizard/samples/EventFlowSample.kt` - Tests: `frontend/core/wizard/src/{commonTest|jvmTest}/kotlin/.../WizardRuntimeTest*.kt` - Feature-Integration - `frontend/features/veranstaltung-feature/src/jvmMain/kotlin/at/mocode/veranstaltung/feature/presentation/EventWizardScreen.kt` - `frontend/features/veranstaltung-feature/src/jvmMain/kotlin/at/mocode/veranstaltung/feature/di/VeranstaltungModule.kt` - `frontend/shells/meldestelle-desktop/src/jvmMain/kotlin/at/mocode/frontend/shell/desktop/screens/layout/components/ContentArea.kt` - Flags & Navigation - `frontend/core/domain/src/commonMain/kotlin/at/mocode/frontend/core/domain/config/WizardFeatureFlags.kt` - `frontend/core/navigation/src/commonMain/kotlin/at/mocode/frontend/core/navigation/AppScreen.kt` - Doku - Roadmap: `docs/01_Architecture/MASTER_ROADMAP.md` - Reference: `docs/01_Architecture/Reference/Wizard-DSL-README.md` - ADRs: `docs/01_Architecture/adr/0025-wizard-orchestrator-de.md`, `0026-validation-policy-de.md`, `0027-draft-domain-delta-sync-de.md` ## Anmerkungen - Strangler-Pattern bleibt aktiv (Flag AUS). Risiken: Guard-Sprawl, Draft-Versionierung. Gegenmaßnahmen in ADR-0025/0027 definiert.