Currently it's not possible to store MongoDB's own aggregation pipelines due to the limitation that field names cannot start with a "$" symbol, and cannot contain a "." symbol either.
For MongoDB to become the one-stop-shop for data storage, aggregation, massaging this is an unnecessary limitation that we should fix.
Usage example: I want to build an app using custom / reusable aggregation pipelines that I can mix and match to get different views into my dataset.
My current workaround is to replace all "$" symbols with "#" in MongoDB and recursively replace them back to "$" on the client. This is clumsy and expensive. I have not yet needed dot-notation fields.
a) either lift the limitations of storing field names with $-prefix and dots (could be escaped to not confuse with operators ($set, $push, etc), like
b) or offer an alternative aggregation reserved symbol (# instead of $). For this alternative, we could allow both for the time being to not break backwards compatibility. This doesn't solve the dotted field name problem however.