The developer should be documented inside the code and should provide API documentation using tools such as Doxygen (www.doxygen.org/). The following is the method to generate documentation using Doxygen for a ROS package: http://wiki.ros.org/PackageDocumentation