Run project linting by detecting the environment and fixing issues.
Process
Identify context:
-
If code changes are involved: run jj diff -s first to see changed files; then use jj diff -- path to restrict to specific files/directories
-
If the user specified specific files or paths, focus on those
Detect the preferred way to run linting: a. Check existing instructions: README.md , CONTRIBUTING.md , CLAUDE.md , AGENTS.md , GEMINI.md , CODEX.md
b. Check task runners: Makefile , justfile , Taskfile.yml for lint target c. Check for scripts in bin/ , .my/bin/ (lint, check, *-lint, etc.) d. Check package manager scripts (package.json lint/check scripts, etc.) e. Fall back to standard: npm run lint , ruff check . , golangci-lint run , cargo clippy
Run the detected linting command with auto-fix where possible
Handle remaining issues manually
Remaining Issues
For issues that require manual intervention:
-
Categorize by severity (critical > high > medium > low)
-
Provide specific fixes for each issue
-
Explain impact of each fix
-
Re-run lint to verify all issues are resolved
Stop Condition
- If a fix fails twice, stop and ask for guidance.
Output
-
Lint command used
-
Auto-fixes applied
-
Remaining issues