This version of Hardhat adds support for scoped tasks.
You can now create scopes to group multiple tasks that are related in some way:
const myScope = scope("my-scope", "Scope description");
myScope.task("my-task", "Do something")
.setAction(async () => { ... });
myScope.task("my-other-task", "Do something else")
.setAction(async () => { ... });
Thanks to @zemse, who kickstarted the work on this!