While reading through the Rails 6 changelog, I noticed an entry for a rails command called
notes. Having never seen this before, I took a quick look at the Rails Guides.
rails notes will return a list of all instances of the following annotations in your codebase -
You can optionally search for your own custom annotations with the
rails notes -a NOTE app/controllers/admin/blog_posts_controller.rb: *  [NOTE] Only return the last 10 blog posts README.md: * [ 1] [NOTE] Set the following env variables
There's also a way to register your own custom annotations for use with the default runner