Vyasa Extension Refactor Audit and Execution Plan

Architecture Decision FrameworkURL copied

Deepening OpportunitiesURL copied

5. Search ModuleURL copied

Files:

  • vyasa/search_service.py
  • vyasa/search_http.py
  • vyasa/search_pages.py
  • vyasa/search_views.py
  • vyasa/file_search.py
  • vyasa/extensions_builtin/default_search.py

Problem:

  • Search files are still core even though search is optional.
  • The default search extension does not own routes or ranking.

Solution:

  • Create vyasa/extensions_builtin/default_search/.
  • Move ranking, indexing, result views, HTTP JSON routes, and search pages into that extension.
  • Core exposes a content snapshot interface.
  • Extension registers route prefixes and search provider.

Benefits:

  • Leverage: future search providers reuse the same search interface.
  • Locality: ranking and UI behavior change together.
  • Tests: temp content root plus enabled search extension returns expected pages and JSON.