atlas.core.runner¶
atlas.core.runner
¶
Task execution via subprocess with local-first tool resolution.
resolve_tool
¶
Return the path to tool_name, preferring project-local installations.
Resolution cascade:
1. <project_dir>/.venv/bin/<tool> (Python virtual environment)
2. <project_dir>/node_modules/.bin/<tool> (Node.js local packages)
3. shutil.which(<tool>) (system PATH)
4. None — tool not found
Atlas NEVER installs packages; it only informs when a tool is missing.
Source code in src/atlas/core/runner.py
run_task
¶
Execute command as a shell command in project_dir.
Returns ok_result(task=task_name, output=..., returncode=...) on
completion (even when the command exits non-zero, so the caller can
decide how to handle failures).
Returns error_result when:
- command is empty
- The executable is not found (exit code 127)
- The command times out (exit code 124)
Source code in src/atlas/core/runner.py
find_rule_hint
¶
augment_errors
¶
Scan tool output for error codes and append relevant rule hints inline.
Looks for patterns like E501, F401, W291 (letter + 3-4 digits). If a matching rule hint exists in module_rules, appends it on the next line with a 📎 prefix.