Accessing project data from RuleSource

I had to access project data, such as version, find project other projects the current project depends on, etc.

The RuleSource does not allow you to get any project related data.
I used the following workaround -

It would be nice if this (or a similar approach) was formalized, or better yet, if the RuleSource allows access to the project.