I agree that we should have a conventional way to represent package information. However, I think it'd be a mistake to invest in a new, Swift-specific solution.
Schema.org provides a comprehensive standard for representing project metadata through its SoftwareSourceCode data type.
By representing project metadata as linked data, it can be understood by machines and integrated with other linked data. Also, the specific choice of encoding is less important; the most obvious choice here would be JSON-LD, but the same information could be represented as RDF.
We could spend a lot of time coming up with our own solution here, but I don't think that we'd end up with anything more capable than the Schema.org definition.