Sidebrain can read comments of the form todo: thing to do and convert those into tasks; it also remembers where these tasks came from, and changes the todo to done when you end those tasks.
See Ending tasks for more about ending tasks.
Put the function
sidebrain-read-todo-from-comments onto the
find-file-hooks to make Sidebrain read the
to-do comments automatically.
See Comment control for how to control the file comment system.