meldestelle/docs/01_Architecture/adr/0025-wizard-orchestrator-de.md
2026-04-21 16:21:22 +02:00

31 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
type: ADR
status: PROPOSED
owner: Lead Architect
date: 2026-04-21
---
# ADR-0025 — Wizard-Orchestrator (State-Machine, DSL, Guards, Effects)
## Kontext
- Aktuelle Wizard-Implementierungen sind linear (`next/previous`) und hart verdrahtet in ViewModels.
- Anforderungen: Kontextabhängige Pfade, OfflineFirst (Autosave/Resume), testbare Regeln, einheitliche UX.
## Entscheidung
- Einführung eines generischen Orchestrators mit deklarativem Flow:
- `StepId` (typsicher je Flow), `WizardContext`, `WizardState`, `Guard`, `Transition`, `StepEffects`.
- KotlinDSL: `flow { step { whenGuard(id) go target; otherwise go … } }`.
- SideEffects an Hooks (`onEnter/onLeave/onComplete`) für Prefetch, Autosave, Finalisierung.
## Konsequenzen
- Vorteile: zentrale, testbare Navigationslogik; konsistente DraftPolicy; bessere Übersicht/Erweiterbarkeit.
- Risiken: Initialer Overhead, Lernkurve, GuardSprawl; mitigiert durch README, DevTools, Linting/Namenskonventionen.
## Umsetzung
- Modul `frontend/core/wizard` (runtime, dsl, devtools, draft) und `WizardScaffold` (Breadcrumb, Footer, Hotkeys).
- StranglerMigration beginnend mit EventFlow; FeatureFlag `WizardRuntimeEnabled`.
## Verweise
- RoadmapAbschnitt: `docs/01_Architecture/MASTER_ROADMAP.md#3-initiative-wizard-orchestrator--offline-drafts-q2q3-2026`
- Reference: `docs/01_Architecture/Reference/Wizard-DSL-README.md`