On this page
Revision 1 November 5, 2026 documentation-policy.md

Documentation Policy

Type: Policy. How to help readers complete a task and find current project information.

Purpose

A reader opens a document to do something, understand a decision, or look up precise information. The page's purpose helps determine its content, the order of explanation, and the right level of detail.

The reader and their task

The text takes account of the reader's knowledge and the context they bring. Each explanation helps them act, make a decision, or understand a significant project detail. Information already familiar to that audience and ordinary tool capabilities are useful where they actually affect the reader's decision.

A practical guide starts with a task and leads to a result. For example, installation commands can be introduced by explaining how to add the library to a project. Imperatives such as “use” and “run” are natural when the reader understands the goal and context of the action.

Compatibility conditions, exact versions, and limitations retain their precision. A guide presents them before the step they affect; detailed reference material can be linked. Several version ranges are easier to find in an environment reference than to decipher in the introduction to getting started.

A policy explains a principle, the reasons for choosing it, and its application in different circumstances. A reference helps readers quickly find a particular value or contract. Choosing the form this way provides the help the reader came for.

Questions that help review the text:

  • Who will read this section, and what do they already know?
  • What does the reader want to understand or do here?
  • Which decision or action does this paragraph help with?
  • Where are details needed immediately, and where is a link enough?

Contract sources

Documentation helps readers find a current contract and explains how to work with it. The exact interface remains in code, a schema, or another verifiable project source. Linking to that source allows details to be checked and updated in one place.

Permanent reference pages explain meaning, scenarios, and limitations. A complete copy of commands, arguments, or schemas would need separate maintenance and could drift from the working interface.

Document roles

A document's primary role helps readers understand which answer the page provides.

Type Answers the question Character
Navigation Where can I find the material I need? Pointers to relevant documents without a separate system contract
Contract What interface or obligation currently applies? Current binding contract
Policy Which principles guide our work, and why? Working principles and guidance on their application
Reference What interface or behavior currently applies? Current reference with a link to a verifiable source
Overview How are the main parts of the system connected? Overview of the current structure
Design Note How does a particular part of the system work, and why? Explanation of an existing design without a new obligation
Experiment Record What was observed in a particular run? Dated historical record stating the completeness of evidence; new results are added separately
Operational Guide How do I complete an operational task? Steps for the current system
Deployment How do I install or initially deploy the application? Deployment instructions
ADR Why was this decision chosen at that time? Historical decision record
Roadmap Which accepted change has been deferred? Plan for future work

A document's type describes its purpose, while its status describes how current it is. A historical design note retains its type, snapshot date, and explicit completion or replacement status. An open discussion remains a proposal until a decision is made.

Navigation pages lead to current guides and references; historical material is listed separately. A current document starts with its role and primary information source when that source is in another file. A historical document retains its date, status, original problem, and results.

Architecture Decision Records

An ADR (Architecture Decision Record) is a document that records an architectural decision and explains why it was chosen. It preserves the context, options considered, decision, and consequences as of the decision date. It helps recover the reasons for a choice later. Current system structure and working instructions are described in separate current documents; the ADR links to them.

An architectural decision is recorded in an ADR when at least one of these circumstances applies:

  • several realistic options were considered;
  • reversing the decision would be difficult or expensive;
  • it affects several components;
  • the choice establishes a long-term architectural constraint;
  • the reasons would be difficult to recover from code alone six months later.

Descriptions of an existing component, API, settings, or directory structure usually belong in a reference or overview. A useful way to identify the decision itself is to remove the choice's context, alternatives, and reasons: the remaining system description may form a separate current document.

After the status Принято, the substantive content of an ADR is preserved as a historical record. Later edits are limited to typos without semantic changes, link repairs, status changes, and a link to a replacement ADR. Revising an accepted decision creates a new record; the previous one receives the status Заменено ADR-NNNN.

An ADR uses a four-digit sequential number and an immutable filename. Its contents include title, status, date, context, decision, realistic alternatives, consequences, and links to current documentation.

Statuses describe the decision's state:

Status Meaning
Предложено The decision is being discussed
Принято The decision has been accepted
Заменено ADR-NNNN A newer record replaces it
Отклонено The option was considered and rejected

Application command help

To find the current commands and parameters of an application with a CLI, readers can use its built-in help. For example, in an npm project with the entry point cli:

  • general help: npm run cli -- --help;
  • command help: npm run cli -- <command> --help.

Command, argument, and help text definitions live in the CLI code. Project documentation points to that source and describes workflows: where to get help, how the relevant process works, and which documents provide further explanation.

When CLI changes

A change to a command, argument, help text, lifecycle option, or public behavior affects several related representations:

  • the CLI contract and definitions in code;
  • user-facing help generation;
  • command parsing and help tests;
  • the README summary when commands or startup usage change;
  • contract source links and navigation when the information moves.

Updating them within one task keeps the working interface and documentation consistent.

When a separate Markdown document helps

A separate page, such as docs/cli.md, helps when the reader has a task of their own: understanding part of the system, completing a workflow or learning how to operate it. A link to CLI help supplies the exact parameters. If all the material is already in the built-in help, linking to it gives readers current information without maintaining another copy.