Extension Cleanliness Gate
2-min readUpdated May 22, 2026
Copied Raw Markdown!
Copied copy relative path!
Date: 2026-05-18
Goal: remove dangling feature edges before more extension work. A feature is clean only when its Python, CSS, JS, routes, assets, static build behavior, and shell hooks are owned by its extension or by an explicit kernel contract.
Highest Priority Tasks URL copied
EXT-033 asset-ownership- Problem: feature assets still hang from global files.
- Evidence:
blog_homeCSS invyasa/static/header.css; code-copy template invyasa/layout_page.py; code theme CSS and KaTeX includes invyasa/core.pyandvyasa/build.py; route bundles hardcoded invyasa/assets.py. - Fix: every feature registers and requests its own bundle; global CSS/JS keeps shell-only tokens and layout hooks.
- Tests: runtime/static asset snapshot proves disabled extensions emit no feature assets.
EXT-034 core-dependency-cut- Problem: builtin extensions call back into
core.py, so ownership is nominal. - Evidence:
blog_home,auth_routes,rbac_admin,sidebar_routes,default_search_routes,filesystem_routes,slides,default_layout, anddefault_errorsimportcore. - Fix: pass runtime services through
RuntimeContextor extension-specific deps; extensions import service modules, notcore. - Tests: grep guard rejects
from .. import coreinsidevyasa/extensions_builtin.
- Problem: builtin extensions call back into
EXT-035 document-type-ownership- Problem: document/file type policy is spread across helpers, routes, tree rendering, search, and build.
- Evidence:
.pdfand.treebranches invyasa/content_routes.py,vyasa/helpers.py,vyasa/tree_rendering.py,vyasa/search_pages.py, andvyasa/build.py. - Fix: document type extensions own suffix matching, render, tree labels, search previews, and static build copy/render rules.
- Tests: disabling
pdf_viewerortree_tableremoves that type from routes/tree/build. - Progress: Done for
pdf_viewerandtree_table; raw/download ownership is tracked and done inEXT-023.
EXT-036 shell-feature-hooks- Problem: feature-specific shell hooks still live in layout code.
- Evidence: annotation data attrs, RBAC admin navbar links, TOC/mobile panel ids, and code-copy template are hardcoded in
vyasa/layout_page.py/vyasa/nav_views.py. - Fix: features register shell annotations, navbar links, side panels, and templates through typed providers.
- Tests: minimal preset shell contains no annotation/admin/toc/code-copy hooks.
EXT-037 static-runtime-parity- Problem: static build reimplements feature selection instead of asking the same extension surfaces as runtime.
- Evidence:
vyasa/build.pyhardcodes scripts, code CSS, KaTeX, TOC extraction, favicon,.tree, PDF, and bundle selection. - Fix: static build consumes the same render/document/asset providers as runtime.
- Tests: one smoke fixture compares runtime and static HTML for requested bundles and feature hooks.
Rule URL copied
Do these before EXT-021, EXT-022, EXT-023, EXT-031, or performance work. Clean edges first; features after.