-
Use files (for example as this repository does with the MD files) to document the things that need to be documented or would be useful to have record somewhere.
-
Avoid writing documentation as comments in the code if you can make the code express itself! More about this topic here.