"""Default analyzer registry builder for AI MusiMuse.

This module provides :func:`build_default_registry`, which creates and
returns a fully configured :class:`~analyzer.registry.AnalyzerRegistry`
with all built-in analyzers registered.

The CLI must never manually register analyzers.  Future analyzers
should only require adding one registration line inside
:func:`build_default_registry`.
"""

from __future__ import annotations

from analyzer.basic.basic_signal_analyzer import BasicSignalAnalyzer
from analyzer.dynamics.dynamic_analyzer import DynamicAnalyzer
from analyzer.harmony.harmony_analyzer import HarmonyAnalyzer
from analyzer.registry import AnalyzerRegistry
from analyzer.rhythm.rhythm_analyzer import RhythmAnalyzer
from analyzer.spectral.spectral_analyzer import SpectralAnalyzer


def build_default_registry() -> AnalyzerRegistry:
    """Create and return a registry with all built-in analyzers.

    Returns:
        A fully configured :class:`AnalyzerRegistry` instance.
    """
    registry = AnalyzerRegistry()
    registry.register(BasicSignalAnalyzer())
    registry.register(SpectralAnalyzer())
    registry.register(DynamicAnalyzer())
    registry.register(RhythmAnalyzer())
    registry.register(HarmonyAnalyzer())
    return registry
