pub fn detect_tool(
cli_tool: Option<&str>,
config_tool: Option<&str>,
start_dir: &Path,
registry: &PluginRegistry,
) -> Result<DetectionResult>Expand description
Detect the active tool using the SPEC §7.1 priority chain:
- CLI override (
--tool) - Environment variable (
UBT_TOOL) - Config
[project].tool - Auto-detection (walk CWD upward, check detect files)