z-lint
Lint and format
Default to checking the requested scope. Apply fixes when the caller authorizes them, including an explicit --fix request.
Discover the toolchain
Read project instructions, wrappers, scripts, lockfile, and applicable package configuration. Prefer the repository's lint/format targets over raw tool calls. Match the package manager and installed versions; do not let a convenience launcher download a missing tool silently.
In a monorepo, inspect the target package and inherited configuration. A root configuration is not proof that every subtree uses it.
Select files
Use an explicit requested path or the changed working-tree scope. Include staged, unstaged, and untracked files; omit deleted paths and deduplicate.
For Git discovery, use NUL-delimited output from git diff --name-only -z, git diff --cached --name-only -z, and git ls-files --others --exclude-standard -z. Preserve spaces and other filename characters when passing arguments.
If no relevant files changed, report that result. Do not expand to the whole repository without a reason in the requested scope.