I think org-mode is a much better fit for what the author is looking for than mind-mapping programs, not least because org files can be literate programs.
Why did I have to scroll so far down for this! I was starting to think I was going to have to write "can't believe nobody has mentioned org-mode yet." myself.
Org-mode (and outliners in general) are tree editors. If they support links then they are graph editors.
Yep. I use org-mode every day. I think it's because most emacs users have gotten tired of typing "Yeah, emacs does that. Has done for a few decades now. And if it isn't precisely what you're looking for, here are a dozen ways you can customize the behaviour before you even get into hacking elisp." Most of us are in "whatever, if they haven't gotten it by now, I'm not going to try to make them" mode. I just wish there was a config setting in HN to filter out the "look! yet another new editor for programmers" spam on the front page.