I'm on the fence about these.
On the one hand, I agree that sample code today is awful (and I especially dislike when it is distributed as an Xcode project), and I think we all know the struggle about keeping code snippets in documentation accurate.
On the other hand, I'm not sure about the shape of this solution. I can only think of examples that would demonstrate the most basic functionality, and I struggle to see the tangible gains this would bring.
Looking at some of the examples in the markdown package, like MaximumWidth. This is what the user would see:
import Markdown
let source = """
This is a really, really, really, really, really, really, really, really, really, really, really long line.
"""
let document = Document(parsing: source)
let lineLimit = MarkupFormatter.Options.PreferredLineLimit(maxLength: 80, breakWith: .softBreak)
let formattingOptions = MarkupFormatter.Options(preferredLineLimit: lineLimit)
let newSource = document.format(options: formattingOptions)
And if they executed it, they'd see the line of text, followed by a version with a line break.
I feel like that doesn't really call for building and executing code. You could just tell them what the result is - and it would be faster, it would work on the web, computers without Swift installed, phones, tablets, etc. Maintenance is an issue, sure, but it's also an issue if you just run code without checking that it shows the user what you expected to communicate.
Perhaps this is just a poor example, but I get the same feeling from the other examples in the repository. I'm not seeing any cases where I think "Wow! The ability to run this code really adds something that just telling me the result couldn't do!"
Perhaps there just isn't enough of a window. The snippet needs to be: (a) small enough to fit in a single, reasonably-sized file, but also (b) complex enough that executing it adds insight, but also (c) not complex enough for an actual DocC tutorial, and (d) not editable - because Playgrounds, with their greater ability to mix code and prose, are better for that.
There might be something here, but so far I'm not convinced. More compelling examples could change my mind.