Writing the specification for a project is one of the hardest parts. If done well, it will mean the implementation should be trouble free and have few complications. It's very much like creating the blueprint for a house. You should be able to hand the specification to the developer, and it should have all the information they need. Of course, it's hard to get it completely perfect, so some refinement may be required during the implementation phase, not to mention changes requested by the client. But, for all intents and purposes, the specification is the bible for the project.
However, there is no such thing as a specification template. Each specification will be unique, as each project is unique. The amount of detail you need to capture for your project will depend on the nature of that project. Not all of the elements defined here are necessary for every project. Simply use the ones you need for your project. The elements outlined here cover projects...