feat: local and scoped `grind_pattern` (#9214)

This PR implements support for local and scoped `grind_pattern`
commands.
44 files changed