Vyasa Extension Refactor Audit and Execution Plan
request_asset_bundle(...) exists.
- Mermaid/D2/Cytograph/Tasks request bundles, but the bundles are not all
registered.
- The page shell globally includes
/static/scripts.js, which imports
Mermaid, D2, and Tasks code unconditionally.
layout_page.py directly adds /static/present.css in slide mode.
content_routes.py directly adds /static/present.js in slide pages.
- Core should serve extension assets under stable URLs:
/static/extensions/<extension-id>/<asset>.
app.assets.bundle(...) registers local files from the extension folder.
- Page rendering emits only requested document bundles.
- Route rendering emits route bundles for the owning extension.
- Global scripts become a small shell bootstrap only.