NAME
Developer::Dashboard::CLI::Which - lightweight command and hook locator
SYNOPSIS
use Developer::Dashboard::CLI::Which ();
Developer::Dashboard::CLI::Which::run_which_command(
command => 'which',
args => \@ARGV,
);
# dashboard which [--edit] jq
DESCRIPTION
Implements the lightweight dashboard which helper so the public entrypoint can show the resolved runnable file plus the participating hook files for a built-in command, layered custom command, or dotted skill command without loading the full runtime. When users pass --edit, it re-enters the public dashboard open-file command with the resolved command file path instead of printing the inspection output.
PURPOSE
This module is the command runtime behind dashboard which. It resolves the actual runnable file that the switchboard or skill dispatcher will exec, then lists the hook files that will run before that target so contributors can see the real execution chain.
WHY IT EXISTS
It exists because command resolution now spans built-in staged helpers, layered custom commands, and dotted skill commands. Without one lightweight locator, users would have to inspect multiple runtime roots by hand to understand which file wins and which hooks will participate.
WHEN TO USE
Use this file when changing the public dashboard which contract, the way the switchboard resolves built-in versus custom commands, or the way skill command and hook discovery should be presented for debugging, or the way --edit hands off to dashboard open-file.
HOW TO USE
Call run_which_command(command => 'which', args => \@ARGV). The module builds a lightweight path registry, detects whether the target is a built-in helper, a layered custom command, or a dotted skill command, then prints one COMMAND /full/path line followed by zero or more HOOK /full/path lines in the same order the runtime would execute them. When users add --edit, the module skips the printed inspection output and re-enters dashboard open-file with the resolved command file path so the existing editor-selection behavior is reused.
WHAT USES IT
It is used by the staged which private helper, by CLI smoke tests that pin the visible shell contract, by users who want to open the resolved command file through the public dashboard open-file path, and by contributors debugging DD-OOP-LAYERS command resolution and skill hook chains.
EXAMPLES
dashboard which jq
dashboard which layered-tool
dashboard which example-skill.run-test
dashboard which example-skill.level1.level2.here
dashboard which --edit jq