Replace the `docs/.style/style-guide.md` scaffold with the populated
prose style guide,
structured as a `README.md` landing page plus one subpage per topic so
GitHub auto-renders the landing when readers open the style-guide
folder.
## Layout
```text
docs/.style/
style-guide/
README.md (landing: intro, section list, editing conventions, Vale enforcement)
audience-and-scope.md (one audience, one outcome, declared up front; canonical personas)
voice-and-tone.md
word-choice.md
accessibility-and-inclusion.md (new)
capitalization-and-punctuation.md
formatting.md (text formatting + block elements + screenshots sparingly)
numbers-units-and-dates.md
editor-setup.md (placeholder)
```
Every repo reference to the old path is rewired to the new path:
`AGENTS.md` (and its `CLAUDE.md` / `.cursorrules` symlinks),
`.claude/docs/DOCS_STYLE_GUIDE.md`,
`docs/about/contributing/documentation.md`, `docs/.style/README.md`,
`docs/.style/styles/Coder/README.md`, and a comment in
`.github/workflows/ci.yaml`. The touched paragraph in each of those
files is reformatted to one sentence per line per the touch-paragraph
rule (refer to [Conventions the guide
dogfoods](#conventions-the-guide-dogfoods)).
## What each page covers
- **Audience and scope** (new): every page targets **one audience
working toward one outcome**; the **install-vs-deploy Coder example**
(workspace user vs platform engineer); pick one audience per page (write
two pages and cross-link rather than tagging sections); pick one outcome
per page (`Configure SSO with Okta` is one outcome, `Configure SSO` is
not); declare audience and scope up front (the H1 names the outcome; the
first paragraph names the audience); **canonical Coder personas**
inlined as four primary (Dave the Developer, Ada the Infrastructure
Admin, Perry the Platform Engineer, Steven the Sponsor) and six
secondary (Melissa the Machine Learner, Tommy the Tester, Caitlin the
Citizen Developer, Felipe the FinOps, Sergio the Security Officer, Tara
the Team Leader), each with a `Coder surface:` line covering the
relevant CLI/workspace/template/RBAC surfaces.
- **Voice and tone**: address the reader directly, avoid first-person
singular, reserve first-person plural for **Coder Technologies the
company** (with an explicit ban on `we` for the product itself and on
combined `you and the docs`), active voice, present tense with a
**conditional/predictive `will` exception** (`If you do X, Y will
happen`), **no sentence-ending prepositions** with a clunky-exception
note.
- **Word choice**: Coder product and feature names with the **Coder CLI
always in backticks (`coder`)** rule, brand names with a parallel
**Terraform CLI in backticks (`terraform`)** rule, **Dev Container**
terminology (proper-noun specification vs lowercase instance, parallel
to Coder / workspace), **phrasal verbs and their noun forms generalized
as a table** (set up/setup, log in/login, sign in/sign-in, log
out/logout, back up/backup, roll out/rollout, start up/startup, shut
down/shutdown, with the `Quickstart` exception), `refer to` / `check
out` / `visit` over `see`, `Learn more` versus `Next steps` with an
**ableism rationale** (`steps` as a physical-mobility metaphor),
`tutorial` versus `walkthrough` with an **ableism rationale**,
**`select` over `click`**, **`Don't assume simplicity or
difficulty`** (covers both `simple`/`easy` and `complex`/`non-trivial`),
**`Avoid weasel words`** (vague attributions in the Wikipedia sense like
`many believe`, `experts agree`, `studies show`), plain language for
product actions with an **industry-term exception scope** for the Linux
`kill` command, the `SIGKILL` signal, and the `disabled` config flag
state.
- **Accessibility and inclusion** (new): WCAG 2.1 Level AA as the
minimum target with AAA as a stretch goal; heading structure (one H1 per
page, no skipped levels, **substantive content between headings**);
inclusive pronouns; inclusive-language substitutions including a
**dedicated `sanity check` row** with `smoke testing` / `confidence
testing` / `acceptance testing` alternatives; descriptive link text; alt
text and decorative-image conventions; **plain English for international
readers** (no idioms; common Latin abbreviations `e.g.`, `i.e.`, `etc.`,
`vs.`, and `et al.` allowed, less common ones not); page descriptions in
`docs/manifest.json` (the docs site does not yet support YAML front
matter); reading level; color contrast deferred to the docs site theme.
- **Capitalization and punctuation**: sentence-case headings, no
gerund-leading headings with **documented exceptions** (`Pricing`,
`Billing`, `Logging`, `String formatting`, etc.), **trailing heading
punctuation in three tiers** (periods and exclamation marks forbidden at
error severity, question marks allowed sparingly at suggestion severity,
characters inside backticks exempt for both), no em or en-dashes with a
**corrected example** showing parenthetical em-dash use rather than
series-joining, Oxford comma, US-style quotation, semicolons sparingly,
rare exclamation marks, numeric ranges.
- **Formatting**: text formatting (bold for UI with **explicit
greater-than separator rule for navigation paths**, italics for
emphasis, code font for identifiers presented as a **bulleted list**)
and block elements (code blocks with language fences plus **link to the
Prism supported-languages reference**, callouts with tightened
scenarios, tabs with the actual `` syntax and a **macOS/Linux/Windows
example**, lists with a **five-item prose-list cap rule** and an
**explicit terminal-punctuation rule** (complete sentences end in
periods, phrases completing a lead-in paragraph end in periods,
single-word labels carry no terminal punctuation, no mixing styles in
one list), tables with a **narrow-table guideline** that reconsiders the
structure when many columns are needed, links including the rule that
**non-docs codebase links also use relative paths**, images,
**screenshots sparingly** with a maintenance-burden rationale and an
adapted quote from Lorna Jane Mitchell's `Short tech writing style
guide for developers`), with cross-references to the accessibility page
for link text and alt text.
- **Numbers, units, and dates**: digits everywhere preference,
non-breaking space between number and unit with **separate pre-render
(Markdown source) and post-render (visible output) demonstrations** plus
a **window-shrink tip** for confirming the rule visually, `Month Day,
Year` date format, 12-hour time with AM/PM, ordinals exception.
- **Editor setup**: placeholder.
## Conventions the guide dogfoods
- **One sentence per line**. Source lines follow a one-sentence-per-line
policy: each sentence sits on its own Markdown source line, sentences
are not split across lines, and lines do not wrap to a fixed column
width. The same convention applies corpus-wide through an **incremental
touch-paragraph rule**: when a contributor edits any line inside a
paragraph, the whole paragraph is reformatted to one sentence per line
as part of the same edit. Bullet items, numbered list entries, and
blockquote lines are each their own paragraph for the rule. Headings,
fenced code blocks, and tables are out of scope. `markdownlint`'s
`MD013` is already disabled, so the convention is editorial.
- **No navigational `see`**. Replaced with **refer to** (formal
default), **check out** (informal/tutorials), or **visit** (external
URLs). `See` is reserved for the observational meaning.
- **HTML entities for em-dashes inside demos**. The em-dash demo encodes
`—` / `–` so the source stays ASCII while the rendered output still
shows the character.
- **No semicolons in body prose**. Body prose prefers two sentences over
a semicolon. Semicolons survive only in heading and rule labels where
they act as separators.
- **Common Latin abbreviations allowed in own prose**. `e.g.`, `i.e.`,
`etc.`, `vs.`, and `et al.` (citation contexts) are fine. Less common
Latin abbreviations (`a priori`, `q.v.`, `viz.`, `n.b.`, `cf.`, `ibid.`)
are not. The rule covers punctuation too: prefer parentheses around
`e.g.` and `i.e.` clauses, one period when `etc.` ends a sentence, both
periods when `etc.` ends a parenthetical that ends a sentence.
- **No idioms or industry-jargon idioms**. `deep dive`, `paved path`,
etc. are rewritten in plain language.
## Rule conventions
Each rule pairs a rationale with **Do** / **Don't** blockquoted
examples and a parenthetical noting the Vale rule that enforces (or will
enforce) the policy. Documentation-only rules are explicitly labeled as
such. Substitution rules use tables.
## Out of scope
- Wiring any new Vale rule. Per-rule PRs land separately per the
rule-authoring doctrine in `docs/.style/README.md`.
- Editor setup page population.
- Redirecting `docs/about/contributing/documentation.md` to the
populated guide (needs a coordinated `coder.com` PR after merge).
- Trimming the `Writing Style` block in
`.claude/docs/DOCS_STYLE_GUIDE.md` and removing the `currently a
scaffold` framing in the agent docs.
- A separate demo PR for the callout types rendered against an existing
docs page.
- Sweeping navigational `see` out of other docs files. The new rule only
dogfoods on the style guide itself; a corpus-wide sweep is a separate
ticket.
## Validation
- `make fmt/markdown`: clean.
- `make lint/markdown`: 0 errors across 494 files.
- `./scripts/check_emdash.sh`: clean.
- Pre-commit-light: passes (fmt + lint + emdash + shellcheck + typos +
actionlint + migrations + helm).
- Dogfood scan: no first-person singular in own prose, no idioms, only
the five allowed Latin abbreviations in own prose, no `walkthrough` or
`Next steps` outside rule definitions and examples, no navigational
`see`, no `click` outside rule definitions and examples, no semicolons
in body prose.
<details>
<summary>CI flake note: <code>check-docs</code> (linkspector)</summary>
The `check-docs` job can fail intermittently on pre-existing external
links in `docs/about/contributing/documentation.md` (lines 29 and 30):
Merriam-Webster occasionally returns HTTP 403 to GitHub Actions runners
and Chicago Manual of Style can time out at 30s. Neither link is touched
by this PR. `docs/.style/` itself is in `.github/.linkspector.yml`
`excludedDirs`, and linkspector annotations confirm zero broken links
from the new pages.
</details>
Resolves DOCS-434.
---
*Filed via [Coder Agents](https://coder.com/docs/ai-coder/agents) on
Nick's behalf.*
12 KiB
Documentation Style Guide
This guide documents structure, research, and content patterns for documentation files in the docs/ directory. It complements, and does not replace, the canonical content rules or the prose style guide.
Important
What belongs in the docs (and what doesn't) is governed by
docs/.style/content-guidelines.md. Read that first. When this style guide conflicts with the content guidelines, the content guidelines govern.For prose rules, refer to the canonical Coder documentation style guide at
docs/.style/style-guide/. Vale rules underdocs/.style/styles/Coder/enforce those rules incrementally as each rule lands. This file remains authoritative for structure, research, and content patterns.
See CONTRIBUTING.md for general contribution guidelines.
Research Before Writing
Before documenting a feature:
- Research similar documentation - Read recent documentation pages in
docs/to understand writing style, structure, and conventions for your content type (admin guides, tutorials, reference docs, etc.) - Read the code implementation - Check backend endpoints, frontend components, database queries
- Verify permissions model - Look up RBAC actions in
coderd/rbac/(e.g.,view_insightsfor Template Insights) - Check UI thresholds and defaults - Review frontend code for color thresholds, time intervals, display logic
- Cross-reference with tests - Test files document expected behavior and edge cases
- Verify API endpoints - Check
coderd/coderd.gofor route registration
Code Verification Checklist
When documenting features, always verify these implementation details:
- Read handler implementation in
coderd/ - Check permission requirements in
coderd/rbac/ - Review frontend components in
site/src/pages/orsite/src/modules/ - Verify display thresholds and intervals (e.g., color codes, time defaults)
- Confirm API endpoint paths and parameters
- Check for server flags in serpent configuration
Document Structure
Title and Introduction Pattern
H1 heading: Single clear title without prefix
# Template Insights
Introduction: 1-2 sentences describing what the feature does, concise and actionable
Template Insights provides detailed analytics and usage metrics for your Coder templates.
Premium Feature Callout
For Premium-only features, add (Premium) suffix to the H1 heading. The documentation system automatically links these to premium pricing information. You should also add a premium badge in the docs/manifest.json file with "state": ["premium"].
# Template Insights (Premium)
Overview Section Pattern
Common pattern after introduction:
## Overview
Template Insights offers visibility into:
- **Active Users**: Track the number of users actively using workspaces
- **Application Usage**: See which applications users are accessing
Use bold labels for capabilities, provides high-level understanding before details.
Image Usage
Placement and Format
Place images after descriptive text, then add caption:

<small>Template Insights showing weekly active users and connection latency metrics.</small>
- Image format:
 - Caption: Use
<small>tag below images - Alt text: Describe what's shown, not just repeat heading
Screenshot policy
Screenshots are governed by the canonical content guidelines. See
Screenshots, used wisely
in docs/.style/content-guidelines.md. The short version:
- Include a screenshot only when the topic would be confusing without the visual aid.
- No PHI or PII.
- No internal secrets leaked without obfuscation.
- Capture the minimally necessary surface area.
- Alt text is always required and must explain the screenshot's purpose for accessibility.
Do not structure sections around screenshots, and do not insert placeholders for missing screenshots. Those older patterns are superseded by the canonical content guidelines.
Content Organization
Section Hierarchy
- H2 (##): Major sections - "Overview", "Accessing [Feature]", "Use Cases"
- H3 (###): Subsections within major sections
- H4 (####): Rare, only for deeply nested content
Common Section Patterns
- Accessing [Feature]: How to navigate to/use the feature
- Use Cases: Practical applications
- Permissions: Access control information
- API Access: Programmatic access details
- Related Documentation: Links to related content
Lists and Callouts
- Unordered lists: Non-sequential items, features, capabilities
- Ordered lists: Step-by-step instructions
- Tables: Comparing options, showing permissions, listing parameters
- Callouts:
> [!NOTE]for additional information> [!WARNING]for important warnings> [!TIP]for helpful tips
- Tabs: Use tabs for presenting related but parallel content, such as different installation methods or platform-specific instructions. Tabs work well when readers need to choose one path that applies to their specific situation.
Writing Style
Tone and Voice
- Direct and concise: Avoid unnecessary words
- Active voice: "Template Insights tracks users" not "Users are tracked"
- Present tense: "The chart displays..." not "The chart will display..."
- Second person: "You can view..." for instructions
Terminology
- Consistent terms: Use same term throughout (e.g., "workspace" not "workspace environment")
- Bold for UI elements: "Navigate to the Templates page"
- Code formatting: Use backticks for commands, file paths, code
- Inline:
`coder server` - Blocks: Use triple backticks with language identifier
- Inline:
Punctuation
- Do not use emdash (U+2014), endash (U+2013), or
--as punctuation in code, comments, string literals, or documentation. Use commas, semicolons, or periods instead. Restructure the sentence if needed. For numeric ranges, use a plain hyphen (e.g.,0-100).
Instructions
- Numbered lists for sequential steps
- Start with verb: "Navigate to", "Click", "Select", "Run"
- Be specific: Include exact button/menu names in bold
Code Examples
Command Examples
```sh
coder server --disable-template-insights
```
Environment Variables
```sh
CODER_DISABLE_TEMPLATE_INSIGHTS=true
```
Code Comments
- Keep minimal
- Explain non-obvious parameters
- Use
# Commentfor shell,// Commentfor other languages
Links and References
Internal Links
Use relative paths from current file location:
[Template Permissions](./template-permissions.md)[API documentation](../../reference/api/insights.md)
For cross-linking to Coder registry templates or other external Coder resources, reference the appropriate registry URLs.
Cross-References
- Link to related documentation at the end
- Use descriptive text: "Learn about template access control"
- Not just: "Click here"
API References
Link to specific endpoints:
- `/api/v2/insights/templates` - Template usage metrics
Accuracy Standards
Specific Numbers Matter
Document exact values from code:
- Thresholds: "green < 150ms, yellow 150-300ms, red ≥300ms"
- Time intervals: "daily for templates < 5 weeks old, weekly for 5+ weeks"
- Counts and limits: Use precise numbers, not approximations
Permission Actions
- Use exact RBAC action names from code (e.g.,
view_insightsnot "view insights") - Reference permission system correctly (
template:view_insightsscope) - Specify which roles have permissions by default
API Endpoints
- Use full, correct paths (e.g.,
/api/v2/insights/templatesnot/insights/templates) - Link to generated API documentation in
docs/reference/api/
Documentation Manifest
CRITICAL: All documentation pages must be added to docs/manifest.json to appear in navigation. Read the manifest file to understand the structure and find the appropriate section for your documentation. Place new pages in logical sections matching the existing hierarchy.
Documentation lands with the change
This rule lives in the canonical content guidelines. See
Documentation lands with the change
in docs/.style/content-guidelines.md for the rule, the definition of
"user-facing," the three corollaries, and the experiments-versus-feature-stages
distinction.
Special Sections
Prerequisites
- Bullet or numbered list
- Include version requirements, dependencies, permissions
Sections that don't belong
Troubleshooting
Troubleshooting and failure-mode content routes to the Support knowledge base (Pylon), not the docs. Support is the primary owner; Docs is secondary owner where needed. See the routing table in the canonical content guidelines.
Don't add a Troubleshooting section to a docs page. If a page would benefit from troubleshooting context, surface it via the embedded Pylon KB widget when that work lands; until then, link out to the relevant Pylon article from the page body.
Formatting and Linting
Always run these commands before submitting documentation:
make fmt/markdown # Format markdown tables and content
make lint/markdown # Lint and fix markdown issues
These ensure consistent formatting and catch common documentation errors.
Formatting Conventions
Text Formatting
- Bold (
**text**): UI elements, important concepts, labels - Italic (
*text*): Rare, mainly for emphasis Code(`text`): Commands, file paths, parameter names
Tables
- Use for comparing options, listing parameters, showing permissions
- Left-align text, right-align numbers
- Keep simple - avoid nested formatting when possible
Code Blocks
- Always specify language:
```sh,```yaml,```go - Include comments for complex examples
- Keep minimal - show only relevant configuration
Document Length
- Comprehensive but scannable: Cover all aspects but use clear headings
- Break up long sections: Use H3 subheadings for logical chunks
- Visual hierarchy: Images and code blocks break up text
Auto-Generated Content
Some content is auto-generated with comments:
<!-- Code generated by 'make docs/...' DO NOT EDIT -->
Don't manually edit auto-generated sections.
URL Redirects
When renaming or moving documentation pages, redirects must be added to prevent broken links.
Important: Redirects are NOT configured in this repository. The coder.com website runs on Vercel with Next.js and reads redirects from a separate repository:
- Redirect configuration: https://github.com/coder/coder.com/blob/master/redirects.json
- Do NOT create a
docs/_redirectsfile - this format (used by Netlify/Cloudflare Pages) is not processed by coder.com
When you rename or move a doc page, create a PR in coder/coder.com to add the redirect.
Key Principles
- Research first - Verify against actual code implementation
- Be precise - Use exact numbers, permission names, API paths
- Visual structure - Organize around screenshots when available
- Link everything - Related docs, API endpoints, CLI references
- Manifest inclusion - Add to manifest.json for navigation
- Add redirects - When moving/renaming pages, add redirects in coder/coder.com repo