Vyasa Extension Refactor Audit and Execution Plan

Current Biggest RisksURL copied

  1. core.py global state makes route extensions hard to register cleanly. Fix with an app factory and frozen runtime.
  1. Markdown currently acts as a feature hub. Fix by moving each fence renderer out and deleting fallback branches.
  1. Shared scripts.js couples unrelated features through global events. Fix by adding a tiny event bus and extension-owned JS.
  1. Search/tree/bookmarks are tangled. Fix with a row decorator contract.
  1. Slides touches Markdown headings, document actions, layout mode, and routes. Fix only after the document action and heading action contracts exist.
  1. Static build duplicates live behavior. Fix after live extension asset collection works.