Vyasa Extension Refactor Audit and Execution Plan

Architecture Decision FrameworkURL copied

Deepening OpportunitiesURL copied

3. Theme Selector ModuleURL copied

Files:

  • vyasa/theme_extensions/**
  • vyasa/extensions_builtin/theme_selector/**
  • vyasa/static/themes/**
  • vyasa/config.py

Problem:

  • Per-theme Python modules are shallow.
  • The folder location is outside built-in extensions.
  • Theme selection is a config concern plus asset concern, not one module per theme.

Solution:

  • Create one builtin:theme_selector extension.
  • Move all theme data under vyasa/extensions_builtin/theme_selector/themes/.
  • Read theme manifests from TOML or JSON.
  • Register selected theme assets through app.assets.bundle(...).

Benefits:

  • Leverage: adding a theme becomes adding data, not code.
  • Locality: all theme selection rules live in one extension.
  • Tests: config theme id maps to assets and variables.