I've filed add an option to emit every symbol into the symbol graph · Issue #60416 · apple/swift · GitHub to track emitting everything into a symbol graph. I think this feature can be tracked separately from the @_documentation
attribute.
I like the idea of having something like @_documentation(visibility: public|internal|private)
to override the visibility of a symbol. This uses the metaphor of access levels, as i mentioned above, to set which visibility level the symbol has in documentation.
That said, i still like the idea of adding arbitrary metadata, since that could be used for additional documentation features down the road. To that end, i'd still like to keep something like @_documentation(metadata: something)
to add this information to a symbol for documentation purposes.
What do y'all think?