# Panel Analysis page-spec: the JSON contract for the HTML front end Panel Analysis's WPF input form (前端) is being replaced by an HTML page rendered in WebView2. The Python side of that boundary is `WillTools.extension/lib/vibe/pa_pagespec.py`'s `build_pagespec()`, which turns everything the old WPF renderer (`PanelAnalysis.pushbutton/script.py`) consumed into **one JSON document**. This file is the contract: the page can be built and tested in a browser from that JSON alone, with no Revit, no WPF, and no other Python file open. Nothing here invents new engineering. Every block, every field, every default and its citation, and every drawing's numbers already exist in the five section modules (`pa_criteria` / `pa_extents` / `pa_structural` / `pa_handling` / `pa_reinforcement`), the field model (`panelanalysisform.py`), the defaults module (`pa_defaults.py`), and the four `pa_sketch_*` geometry modules. `pa_pagespec.py` only serialises what they already compute. ## 1. Top-level shape ```jsonc { "schema": 1, "title": "Panel Analysis", "mark": "P101", // '' if not read/typed yet "pages": [ { "id", "title", "blocks": [...], "problems": [...] }, ... ], "values": { "": "", ... }, "basis": { "": "", ... }, "defaults_why": { "": "", ... }, "choices": { "": ["