My all time favorite too. I still return to this game every few years. If you're a fan I suggest checking out this book: https://bossfightbooks.com/products/jagged-alliance-2-by-dar...
HN user
lapfi
You can do that with a simple terminal command as well, btw.
https://gist.github.com/lauri/84674ab22aafc4e0f398a52a53cfd7...
One such game is Jagged Alliance 2. See here: https://github.com/dariusk/ja2
Some fine folks have also made a version that works on modern computers: https://github.com/ja2-stracciatella/ja2-stracciatella
Here it is: https://github.com/lauri/minitest-apidoc
It isn't something I would encourage others to use in its current state, but maybe it will give you some ideas. It uses Ruby's Minitest and adds some syntax to it. When the tests run it captures some things and writes those to an html template.
I always thought it would be a good idea to generate API documentation from tests. Kind of the same idea you have but the other way around.
The problem I used to have is that if you write your documentation by hand it tends to get out of sync with the code. You make a quick change to the code and forget to update the docs. After a while it's a mess unless you stay vigilant.
But if you generate documentation from tests they can't get out of sync. The example output that gets written to the docs comes from the application so it can't be wrong. And if a test fails, documentation doesn't get written. It also forces you to write tests which is a good thing. If you don't, you don't have docs.
I don't know if there are tools like this. I created one for Ruby/Rack apps that I have used in some of my projects. I think this approach works pretty well.