Wave 4 — compare what-ifs to decide: CLI — lawsynth scenarios: define N named what-if scenarios (scheduled interventions), compare final-state divergence from baseline in a table + a self-contained multi-series HTML report (overlaid trajectories + legend). lawsynth doctor: environment/health check with a real world round-trip self-test. SDK — Study.add_scenario/compare_scenarios -> ScenarioComparison (table + overlaid-SVG _repr_html_); a cohesive StudyDashboard in lawsynth-notebook that composes equations/trajectory/frontier/regimes/uncertainty/scenarios into one themed Jupyter view; Study._repr_html_ now renders the full dashboard when the notebook package is present, degrading gracefully otherwise. Studio — Scenario Board (9th screen): define scenarios, overlay trajectories (multi-series chart + legend), baseline-divergence table, store-driven selection. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
LawSynth notebook support
lawsynth-notebook is a dependency-free presentation layer for validated,
portable LawSynth artifacts. It renders World metadata, equations, dependency
graphs, trajectories, candidate frontiers, events, regimes, and uncertainty as
safe HTML or ordinary JSON. It deliberately does not start a Jupyter server,
inject browser JavaScript, or execute model code from a bundle.
The package accepts already-decoded JSON mappings and trusted local files. For
native .lsworld archives, use lawsynth.bundle.load first, then pass the
resulting inspected metadata to render_bundle.
from lawsynth_notebook import render_trajectory
view = render_trajectory({"time": [0, 1], "values": {"x": [1, 2]}})
display(view) # in IPython/Jupyter, via its HTML protocol
html = view.html # elsewhere