On the other hand, ironically, Knuth recommended getting familiar with the program by picking up one particular part and "navigating" the program to study just that part. (See https://youtu.be/D1jhVMx5lLo?t=4103 at 1:08:25, transcribed a bit at https://shreevatsa.net/tex/program/videos/s04/) He seems to find using the index (at the back of the book, and on each two-page spread in the book) to be a really convenient way of "navigate" the program (and indeed randomly jumping through code, as you said), and he thinks that one of the convenient things about the "web" format is that you can explore it the way you want. This is really strange (to us) as the affordances we're used to from IDEs / code browsers etc are really not there, but it makes a bit of sense when you consider that books are Knuth's life, and he must find things like flipping pages with a bookmark in the index page at the back of the book etc really second-nature.
(BTW if you know someone who has the super-obscure interest in making WEB programs actually navigable with hyperlinks etc, do consider https://github.com/shreevatsa/webWEB/discussions or if you know some better way of finding such people let me know :P)
I think that splitting your software into well-documented modules and APIs is a superior approach to lp. Whereas not much software is well-documented these days, where "well-documented" means for me:
a) high-level narrative of the why and how of the code, including descriptions and (informal) correctness proofs of the important algorithms in the code (can be just a doi to a paper)
b) detailed documentation of parameters and return results of the functions that comprise the module(s)