DEV Community

Cover image for Documentation is development, too
Anton Tolkachev
Anton Tolkachev

Posted on Edited on

Documentation is development, too

While organizing project documentation, I found myself applying the same principles I use in code. I settled on four main files, each with a clear responsibility.

The principles

  • KISS: simple language, concise explanations. Split documents only when useful.
  • YAGNI: document a real need, not a hypothetical one.
  • Separation of Concerns: give each document a distinct responsibility.
  • Code for the Maintainer: preserve assumptions, constraints, and reasons the next reader cannot easily reconstruct.
  • Optimize for Deletion: separate temporary tasks and experiments from lasting knowledge.
  • DRY: give each fact one primary home; link to it elsewhere.

Four main files

README.md — an introduction for people: what the project, component, or package is for, what value it provides to its users, and where its responsibility ends.

ARCHITECTURE.md — how it works internally: components, dependencies, execution flows, ownership, technical decisions, and constraints.

GLOSSARY.md — terms, short definitions, accepted synonyms, and names to avoid. Thanks to Matt Pocock ❤️

AGENTS.md — agent instructions and navigation: which documents to read for which tasks.

These are the main responsibilities, not a requirement to create four files in every directory or a limit on useful documentation.

Now to resist adding a fifth main file explaining the first four. 😄

A shared repository for the whole system

A shared repository, named after the organization, holds the context common to every component: the product's purpose, how its components fit together, and shared terminology. That context applies whether I am working on a server, a client, or an API specification.

Local glossaries link to the shared glossary through HTTPS URLs on GitHub, pointing to the main branch. Following those links gives the reader the current shared definitions. Each local glossary adds only repository-specific terms; local architecture describes that repository's internals and decisions.

The same scoping rule continues down the hierarchy. Documentation inside a component or package covers that component or package. Shared knowledge stays at the level that owns it.

AGENTS.md provides the navigation, including references to shared context, so the agent knows what to read for its task.

I captured this approach in a small global skill, project-docs, to use across my projects.

Top comments (2)

Collapse
 
docsalive profile image
DocsAlive Team •

For the shared glossary, add a lightweight link check to each repository's docs build, and keep a versioned reference for decisions that must be reproducible. A link to main is useful for the current definition, but an architecture decision may need the wording that was in force when it was made. That keeps your single primary home without making historical explanations depend on a definition that can change later. A short owner and review trigger for each shared document can help keep that home current, too.

Collapse
 
officialmailkr profile image
오피셜메일 •

각 사실의 원본 위치를 하나로 두고, AGENTS.md는 복사본보다 읽을 순서를 안내하도록 분리한 점이 좋네요. 공유 용어집의 main 링크는 최신 맥락을 읽기 좋지만, 과거 릴리스의 결정을 재현해야 할 때는 당시 기준도 구분할 필요가 있겠습니다. 현재 용어집 링크와 특정 결정 당시의 기준 버전 링크를 언제 나눌지 정하면 문서가 늘지 않아도 혼동을 줄일 수 있겠어요.