Most pre-commit hooks apply any changes that need to be made. The task of actually adding (e.g.: git add) is left to the user.
It would be a good fit for this hook to do the same; since after running the hooks one can check the changes and act upon them (rather than requiring that one re-runs ruff manually).