DocSpec provides a standard, predictable interface to access the four different types of documentation for a project, as defined by the [[https://diataxis.fr/][Diataxis Framework]] -
2. make more projects aware of the [[https://diataxis.fr/][Diataxis Framework]], and incentivize them to structure their documentation according to its suggestions, which in turn would make their documentation easier to read, write, and maintain.
Each DocSpec file can list up to four types of documentation as symbols - =tutorial=, =howto=, =explanation=, and =reference=.
Each documentation type has topics it covers, e.g. =first-attempt=. In this example, each topic is a symbol, but they could also be strings. Documentation written in accordance with the Diataxis Framework is more likely to cover the same topics in different sections, so topics may be repeated between documentation types, but not within.
Tools making use of DocSpec can offer commands such as =view-tutorial=, =view-howto=, =view-explanation=, and =view-reference=. Users can configure a priority list for their preferred formats; if the package does not offer documentation in any of those formats, the tool could prompt them to select an available format.