In a different direction, I spent a while ten years ago noodling on a 'wikipedia for open source projects'. Changing code is too complex to do on the browser (I thought then) so treat the code as immutable, or rather as an immutable stream of changes flowing in the background. But as people try to make sense of how some code works, make it easy for them to add annotations on a web UI at the moment of insight (ah, so that's why this is written like so!). To address the problem of annotations getting outdated, tie them to a single snapshot, and provide filters and visual indicators for displaying annotations from old versions. (And of course allow others to edit annotations.)