Documentation Guide: How to Write and Improve Docs

This guide outlines the philosophy and process for creating and maintaining documentation in this project. Documentation here serves two audiences: human developers and AI agents.

Core Philosophy

Documentation Pipeline (How it Works)

The documentation generation relies on a multi-step process:

  1. Source Code: Code in various modules (e.g., did-method-prism) contains ScalaDoc comments.
  2. Generation: The sbt commands (sbt docAll or sbt docs/unidoc) process these comments into API reference pages.
  3. Website Build: The sbt siteAll command uses Laika to consume these generated API docs and structure them into a navigable website.
  4. Post-Edit Build: After editing any executable code example within documentation files, the pipeline must be manually triggered by running sbt siteAll to regenerate the documentation site and make sure there is no errors.
  5. Custom Guides: Files like this guide (DOCUMENTATION_GUIDE.md) are manually placed in the docs/ directory and are not part of the automated ScalaDoc pipeline; they are static guides.

Writing Guidelines

NOTES