Skip to content

Latest commit

 

History

History

style-guide

README.md

Coder documentation style guide

This is the canonical prose style guide for the Coder documentation. It tells you how to write the words that go in the docs. For decisions about what belongs in the docs and what doesn't, refer to content-guidelines.md.

Each rule on the linked pages is a policy decision the Coder docs team has made. Where a Vale rule already enforces the policy, the rule name is listed in a parenthetical so you can reproduce the warning locally. Where the rule is documentation-only, the parenthetical says so. The doctrine for adding Vale rules lives in the Vale doctrine README.

How to use this guide

  • Contributors: read the section that matches what you're writing. Each rule includes a brief rationale and Do / Don't examples.
  • Reviewers: cite the section in a review comment. Reviews are easier when the guidance lives in one place.
  • AI agents: read every section before editing anything under docs/. A clean linter run doesn't substitute for that; refer to What the tooling checks, and what it doesn't. The Coder Agents and Claude Code guides (AGENTS.md, .claude/docs/DOCS_STYLE_GUIDE.md) link here.

What the tooling checks, and what it doesn't

A clean make lint/prose run is not evidence that a page follows this guide. The guide documents 91 rules. Automated tooling checks 24 of them, and 1 of those 24 doesn't run on published pages. The other 67 are yours to apply by reading, 68 on published pages, where the one-sentence-per-line rule is off.

Open the section that matches what you're writing and work through it. The linters catch a narrow band of mechanical errors; they can't tell you that a page serves 2 audiences, buries a required step in a NOTE, or wraps every paragraph at 80 columns.

Checks that run today

Check Tool Severity Scope What it catches
Coder.AcronymPeriods Vale warning docs/** except docs/.style/style-guide/** Capitalized acronyms written with periods, such as A.P.I.
Coder.BrandNames Vale error docs/** except docs/.style/style-guide/** Hashicorp casing only, not the other brands in the word-choice list
Coder.GerundHeading Vale warning docs/** except docs/.style/style-guide/** Headings that lead with a gerund
Coder.ImperativeNegation Vale warning docs/** except docs/.style/style-guide/** don't that opens an imperative, such as at a sentence start
Coder.InclusiveLanguage Vale warning docs/** except docs/.style/style-guide/** and docs/reference/cli/agent-firewall.md Whitelist, blacklist, slave, master branch, dummy, sanity check, grandfathered
Coder.LGBTQ Vale warning docs/** except docs/.style/style-guide/** Outdated LGBTQ terms, such as preferred pronouns and transgendered
Coder.Please Vale warning docs/** except docs/.style/style-guide/** The word please, in any case, outside code
Coder.SelectClick Vale warning docs/** except docs/.style/style-guide/** and docs/reference/{api,cli}/*.md click and its inflections
Coder.OneSentencePerLine Vale warning docs/.style/*.md and docs/.style/styles/Coder/*.md only Sentence boundaries mid-line, on contributor docs only
Coder.UnitSpacing Vale warning docs/** except docs/.style/style-guide/** and docs/admin/integrations/prometheus.md and docs/admin/setup/configuration-reference.md and docs/reference/{api,cli}/*.md A regular space, or no space, between a number and its unit
Coder.StepLength Vale warning docs/** except docs/.style/style-guide/** The instruction paragraph of an ordered-list step longer than 20 words
Coder.CheckOut Vale warning docs/** except docs/.style/style-guide/** check out as a cross-reference verb, not the Git sense
Coder.AmbiguousWords Vale suggestion docs/** except docs/.style/style-guide/** and docs/reference/{api,cli}/*.md ensure, should, since, and may (not the month May)
Coder.USSpelling Vale warning docs/** except docs/.style/style-guide/** and docs/reference/{api,cli}/*.md The -ise family and a list of British spellings
Coder.LatinAbbreviations Vale suggestion docs/** except docs/.style/style-guide/** and docs/admin/setup/configuration-reference.md and docs/reference/{api,cli}/*.md e.g., i.e., and etc. in prose, not tables or code
Coder.Semicolons Vale warning docs/** except docs/.style/style-guide/** and docs/admin/setup/configuration-reference.md and docs/reference/{api,cli}/*.md A semicolon in a paragraph, list item, heading, or blockquote
Coder.AbbreviationFirstUse Vale warning docs/** except docs/.style/style-guide/** and docs/admin/integrations/prometheus.md and docs/admin/setup/configuration-reference.md and docs/reference/{api,cli}/*.md Abbreviations with no earlier "Expanded Form (ABBR)" on the page
Coder.HeadingOrder Vale error docs/** except docs/.style/style-guide/** Heading level skips, counting raw HTML headings that MD001 doesn't see
Coder.EmptyHeading Vale error docs/** except docs/.style/style-guide/** Headings with no text, in Markdown and raw HTML
Coder.LinkName Vale error docs/** except docs/.style/style-guide/** Links with no text, including links around an image with empty alt text
MD001, MD025, MD040, MD045 markdownlint error All Markdown Heading increments, single H1, fence language, missing alt text
scripts/check_emdash.sh make lint/emdash error Repository Em-dash, en-dash, and -- as punctuation
empty-table-header make lint/docs-html error docs/**, including generated pages Table header cells with no text, in Markdown and HTML tables
disallowed-element, disallowed-attribute make lint/docs-html error docs/**, including generated pages ARIA, role, tabindex, and lang attributes, and iframe, object, area, form, input, select, textarea, button, and meta elements
scripts/docsmanifestgen make lint/docs-manifest error Descriptions in docs/manifest/** and in the front matter of every page they list A page description that doesn't end with a period

The markdownlint row lists only the rules that map to a rule in this guide. markdownlint runs its full default set minus the rules .markdownlint.jsonc disables, so it catches more than these 4.

Vale runs advisory. make lint/prose passes --no-exit, and the CI step is advisory by design, so no Vale finding fails a build at any severity. Findings accumulate instead of blocking: rules that shipped against a clean corpus have since collected a backlog of warnings in docs/. The markdownlint, emdash, docs HTML, and docs-manifest checks do fail the build.

Coverage by section

Section Rules Tool-checked Planned Documentation-only
Audience and scope 7 0 0 7
Voice and tone 13 2 2 9
Procedural writing 6 1 0 5
Word choice 20 5 9 6
Accessibility and inclusion 15 8 1 6
Capitalization and punctuation 12 4 6 2
Formatting 13 3 0 10
Numbers, units, and dates 5 1 4 0
Total 91 24 22 45

Every column counts rule sections, not linter rule names. A rule section is a heading that carries an enforcement footer, the italic line that names the section's enforcement status. Every heading that states a rule of its own carries one, including a sub-heading that adds a rule to its parent. Only ## and ### headings state rules; anything deeper is detail inside one.

Five kinds of heading carry no footer, and none of them are counted:

  • Headings that only group sub-rules, like Commas.
  • Sub-headings that scope or qualify the parent rule instead of adding one, like Exceptions under No gerund-leading headings. The parent rule's footer covers them.
  • Reference sections that give writers vocabulary rather than a rule, like Personas the Coder docs serve, along with every heading inside them.
  • Example headings inside a sample document.
  • Navigation headings, like Learn more.

Color contrast carries an out-of-scope note rather than an enforcement footer, because the docs site theme owns it, so it isn't a rule of this guide and isn't counted.

Classify a counted section from its footer, in this order:

  1. The footer states Documentation-only about the section: the section is documentation-only, whatever else the footer names. A footer in this column can still cross-reference a rule that another section owns, or name a rule that doesn't exist yet. A lowercase "documentation-only" that qualifies one part of a longer footer doesn't count.
  2. The footer names a check that runs today: the section is tool-checked. A section that names several checks still counts once.
  3. Anything else: the section is planned.

A rule marked (planned) in a section footer names the rule that would enforce it if it existed. It isn't running today. The same is true of every third-party Google.*, alex.*, and write-good.* rule the guide names: the repo-root .vale.ini sets BasedOnStyles = Coder, so none of them load. Each one returns in its own PR, once docs/ passes that rule cleanly.

Keep this table honest when a rule lands. The per-rule PR pattern in the Vale doctrine README already requires touching this guide, so update the row in the same change. This section is the only place that states the counts; the agent-facing guides link here instead of repeating them, so one edit keeps every caller current.

Sections

Page Covers
Audience and scope One audience per page; one outcome per page; declare both up front; Coder personas
Voice and tone Second person; no first-person singular; "we" as the company, not the software; active voice; present tense; sentence and paragraph budgets; how to count words; verbs over noun forms; pronoun referents; spelled-out negative instructions; no "please"
Procedural writing One instruction per step; condition before instruction; 20-word step limit; full clauses instead of -ing clauses; callouts inform, steps instruct; warnings state the consequence
Word choice Canonical brand and product names; feature versus instance; one term per concept; words that have one meaning; US spelling; noun stacks; "refer to" or "visit" over "see" or "check out"; "select" over "click"; weasel words; compliance claims; plain English for product actions; keep internal-only references out of published docs
Accessibility and inclusion WCAG target; inclusive pronouns, substitutions, and LGBTQ terms; descriptive link text; alt text; page descriptions; heading structure; reading level
Capitalization and punctuation Sentence-case headings; no gerund leads; no em-dashes; no semicolons in prose; no periods in acronyms; commas; US-style quotation
Formatting Bold for UI; italics for emphasis; code font for identifiers; language fences on code blocks; callouts; tabs; lists; tables; links; images; screenshots sparingly
Numbers, units, and dates Digits for 6 and higher, either way for 0-5; "more than X"/"X or more" always spelled out below 6; non-breaking space between number and unit; Month Day, Year dates; 12-hour time with AM/PM
Editor setup Vale editor integration for VS Code, Cursor, JetBrains, and Neovim (placeholder)

Conventions for editing Coder docs

These conventions apply to every Markdown file under docs/. The style guide subpages dogfood them so contributors can see the rules in action.

One sentence per line

Source lines in Coder documentation follow a one-sentence-per-line policy. Each sentence sits on its own Markdown source line. Sentences aren't split across lines, and lines don't wrap to a fixed column width.

The rendered Markdown joins lines inside a paragraph back together, so the source line breaks don't appear in the rendered output. Reviewers reading the diff do encounter them, and the per-sentence lines make diffs land cleanly at the sentence level.

markdownlint's MD013 (line length) is already disabled, so the convention is editorial. Configure editors that auto-wrap on save to leave the source alone.

Incremental adoption

The Coder docs corpus predates this convention. Much of the existing prose still wraps to a fixed column width or runs on a single long line. Some paragraphs on the other pages of this style guide still carry semantic line breaks (sembr) from earlier commits. The convention is adopted incrementally.

A contributor who edits any line inside a paragraph reformats the entire paragraph to one sentence per line as part of the same edit. The contributor doesn't reformat surrounding paragraphs they didn't otherwise touch.

For this rule, a bullet item, a numbered list entry, and a blockquote line are each their own paragraph. Headings, fenced code blocks, and tables are out of scope: headings are single lines by convention, code blocks render their source verbatim, and markdown-table-formatter governs table rows.

The style guide doesn't use "see" for navigation

The Word choice page bans "see" as a navigational verb across all docs. The style guide itself follows the rule: "refer to" for formal cross-references and "visit" for any other pointer, including external URLs. Reserve "see" for the rare case where the prose describes what a reader observes in the product UI.

Vale enforcement

For what Vale checks today and what it leaves to the reader, refer to What the tooling checks, and what it doesn't.

The repo-root .vale.ini loads only the Coder rule package by default. Third-party rules from Google, alex, and write-good aren't enabled until a per-rule PR brings each back in.

Each enabled rule lands via a dedicated PR that:

  1. Cleans the corpus to zero baseline findings. A rule at suggestion severity is the exception: it can land while existing findings remain, and the PR states the baseline count.
  2. Adds the rule line in .vale.ini at the rule author's chosen severity.
  3. Adds the corresponding section to the appropriate subpage of this guide.

Severity is a deliberate per-rule choice among 3 tiers:

  • error blocks merge in CI. Use for hard policy where any violation is wrong.
  • warning surfaces an annotation without failing CI. Use for strong guidance with legitimate human-judgment exceptions.
  • suggestion surfaces a notice annotation. Use for soft guidance where the right fix is contextual.

The full doctrine, including the false-positive policy, lives in the Vale doctrine README. This guide is itself exempt from the Coder rules: it demonstrates the violations those rules ban, so the repo-root .vale.ini clears BasedOnStyles for docs/.style/style-guide/**. Zero baseline is measured over docs/ excluding docs/.style/style-guide/. Run make lint/prose to reproduce the baseline locally.

Relationship to contributing/documentation.md

A public-facing prose summary lives today at contributing/documentation.md in the repository. That page is frozen. Follow it for anything the subpages of this guide don't cover. New prose rules land here.

Third-party references

When this guide doesn't cover something, consult:

Type of guidance Reference
Spelling Merriam-Webster
Style, nontechnical The Chicago Manual of Style
Style, technical Microsoft Writing Style Guide
Style, developer-focused Google developer documentation style guide
Style, procedural writing ASD-STE100 Simplified Technical English (Issue 9, 2025)