I meant to respond some time ago, but lately I have been using my phone to check the forum. This has been posted elsewhere, the problem at times is figuring out how they phrased the question. In this case, this is something included in the manual Searching in Taskpaper. If you are still wondering how to do accomplishing this, here is the simple way to do it.
* except @done
Since I usually like to also exclude the children of everything that is tagged as done, this is how I accomplish this.
* except @done///*
The documentation explains the paths too, but if you want some examples, I can help. Sometimes adding too much complexity too quickly can overwhelm somebody. I tend to take things very literally since English is not my first language, but just in case that is how you were thinking. You can search for Projects (and I am assuming their children elements) except ACTIONS THAT ARE DONE like this,
(@type=project)///* except (@type=task and @done///*)
That means that you are literally looking for projects and their children (that is the ///* part of the query) but you don't want to see tasks that are done. This query will include projects that are done. It will not search inside notes or tasks that have tasks unless those notes or tasks are inside a project and are therefore children of them.