Another tool to look at is Logseq [3], which is essentially an outliner (supports both MarkDown and Org syntax), but supports a rather simplistic TODO management system. The benefit here is exactly what you describe—as you work in Logseq, you can create Todos, thereby connecting the task to the related source and any context that surrounds the todo. Furthermore, Logseq also allows for queries [4], allowing you to query your "knowledge graph", which you can embed in other pages.
Both Obsidian and Logseq store your files locally, so they can be easily version-controlled (In fact, Logseq routines commits your files for you).
[1] https://news.ycombinator.com/item?id=30747131
[2] https://github.com/blacksmithgu/obsidian-dataview
[4] https://logseq.github.io/#/page/Queries
[Edited for formatting]