-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(docs): add Coder.BrandNames Vale rule, enforce HashiCorp casing #25501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1c568e2
9b1b787
d40e681
35833b6
e6c7dd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,10 +48,12 @@ Google.EmDash = NO | |
| # produces noise without value. | ||
| Google.Latin = NO | ||
|
|
||
| # Soften two high-volume Google rules. The signal-to-noise ratio is low | ||
| # at the default warning level. | ||
| Google.Parens = suggestion | ||
| Google.WordList = warning | ||
| # Google.Parens flags every paren use as "use parentheses judiciously." | ||
| # Parens are a normal English punctuation device for clarification, | ||
| # examples, and disambiguation. The rule cannot distinguish stylistic | ||
| # intent from misuse, so even at suggestion level its signal-to-noise | ||
| # ratio is effectively zero. Disable. | ||
| Google.Parens = NO | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit [CRF-10] The PR title scope
|
||
|
|
||
| # Google.Spacing flags fully-qualified Go type names like | ||
| # `codersdk.WorkspaceAgent` as "should have one space." It produces ~4,500 | ||
|
|
@@ -64,6 +66,11 @@ Google.WordList = warning | |
| # `error`. | ||
| Google.Spacing = NO | ||
|
|
||
| # Google.WordList is the canonical Google word-substitution table. Keep | ||
| # at warning (the default for the Google package) so non-canonical word | ||
| # choices surface as CI annotations. | ||
| Google.WordList = warning | ||
|
|
||
| # --- write-good curation --------------------------------------------------- | ||
| # Passive voice is contextually correct often enough that flagging every | ||
| # instance teaches nothing. E-Prime forbids forms of "to be" entirely, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,103 +1,108 @@ | ||
| # Coder documentation style guide | ||
|
|
||
| This is the canonical style guide for the Coder documentation. It is the | ||
| source of truth that the Vale rules in `docs/.style/styles/Coder/` enforce. | ||
| This is the canonical style guide for the Coder documentation. | ||
| It's the source of truth that the Vale rules in `docs/.style/styles/Coder/` enforce. | ||
|
|
||
| Status: scaffold. Sections below are populated by follow-up PRs; this | ||
| page starts as a table of contents and grows as those PRs land. | ||
| Status: scaffold. | ||
| Follow-up PRs populate the sections below. | ||
| This page starts as a table of contents and grows as those PRs land. | ||
|
|
||
| ## How to use this guide | ||
|
|
||
| This page is a scaffold while follow-up PRs land. Sections marked "To be | ||
| filled in" are placeholders. For anything not yet covered, see the | ||
| public summary at | ||
| [`docs/about/contributing/documentation.md`](../about/contributing/documentation.md). | ||
| This page is a scaffold while follow-up PRs land. | ||
| Sections marked "Coming in follow-up PRs" are placeholders. | ||
| For anything not yet covered, see the public summary at [`docs/about/contributing/documentation.md`](../about/contributing/documentation.md). | ||
|
|
||
| - **Contributors**: read the section that matches what you are writing. | ||
| Each rule notes the Vale rule ID, if any, so you can reproduce the | ||
| warning locally. | ||
| - **Reviewers**: cite the section in a review comment. Reviews are easier | ||
| when the guidance is in one place. | ||
| - **AI agents**: read this page in full before editing anything under | ||
| `docs/`. The Coder Agents and Claude Code guides | ||
| ([`AGENTS.md`](../../AGENTS.md), | ||
| [`.claude/docs/DOCS_STYLE_GUIDE.md`](../../.claude/docs/DOCS_STYLE_GUIDE.md)) | ||
| link here. | ||
| Each rule notes the Vale rule ID, if any, so you can reproduce the warning locally. | ||
| - **Reviewers**: cite the section in a review comment. | ||
| Reviews are easier when the guidance is in one place. | ||
| - **AI agents**: read this page in full before editing anything under `docs/`. | ||
| The Coder Agents and Claude Code guides ([`AGENTS.md`](../../AGENTS.md), [`.claude/docs/DOCS_STYLE_GUIDE.md`](../../.claude/docs/DOCS_STYLE_GUIDE.md)) link here. | ||
|
|
||
| ## Voice and tone | ||
|
|
||
| To be filled in by follow-up PRs. Planned coverage: | ||
| Coming in follow-up PRs: | ||
|
|
||
| - Active voice | ||
| - Second person | ||
| - Plural nouns and pronouns where number is uncertain | ||
| - Product voice (`stop` over `kill`, `turn off` over `disable` in | ||
| user-facing copy) | ||
| - Limiting "we" | ||
| - Product voice (`stop` over `kill`, `turn off` over `disable` in user-facing copy) | ||
| - Limit `we` | ||
|
|
||
| ## Word choice | ||
|
|
||
| To be filled in by follow-up PRs. Planned coverage: | ||
| Coming in follow-up PRs: | ||
|
|
||
| - Inclusive-language substitutions | ||
| - HashiCorp casing | ||
| - Dev Container terminology | ||
| - "Setup" vs "set up" and Quickstart casing | ||
| - "Next steps" vs "Learn more" | ||
| - Weasel words | ||
|
|
||
| ### Brand names | ||
|
|
||
| Use each brand's canonical casing in prose. | ||
| URLs and code references (Terraform provider source addresses, GitHub paths) keep the lowercase form their owner uses. | ||
| Vale's `substitution` rule skips inline code and links by default, so those aren't affected. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3 [CRF-3] This says the substitution rule "skips inline code and links." Vale's substitution rules skip link URLs but check link display text. The PR's own cleanup confirms this: The BrandNames.yml comment (line 3) uses the correct wording: "it skips fenced code blocks, inline code, and URLs." The style guide should match. Replace "links" with "link URLs" or adopt the BrandNames.yml phrasing. (Razor)
|
||
|
|
||
| | Wrong | Correct | Notes | | ||
| |-------------|-------------|-----------------------------------| | ||
| | `Hashicorp` | `HashiCorp` | Mixed case: capital H, capital C. | | ||
|
|
||
| More brands (GitHub, OpenTofu, Kubernetes, Terraform, JetBrains, VS Code) extend this table as they land in follow-up PRs. | ||
|
|
||
| Enforced by `Coder.BrandNames` (level `error`). | ||
| To add a brand: append a swap to `docs/.style/styles/Coder/BrandNames.yml`, | ||
| run `make lint/prose` to catch existing-content violations, | ||
| fix them, then commit. | ||
|
|
||
| ## Capitalization and punctuation | ||
|
|
||
| To be filled in by follow-up PRs. Planned coverage: | ||
| Coming in follow-up PRs: | ||
|
|
||
| - Sentence case in titles and headings | ||
| - General capitalization policy | ||
| - Em-dash and en-dash ban (use comma, semicolon, or period) | ||
|
|
||
| ## Formatting | ||
|
|
||
| To be filled in by follow-up PRs. Planned coverage: | ||
| Coming in follow-up PRs: | ||
|
|
||
| - Bold for UI elements | ||
| - Italics for parameter names and version variables | ||
| - Code font for user input, command-line utility names, filenames, | ||
| environment variables, HTTP verbs and status codes, placeholder | ||
| variables | ||
| - Code font for user input, command-line utility names, filenames, environment variables, HTTP verbs and status codes, placeholder variables | ||
| - Code blocks with explicit language fences | ||
|
|
||
| ## Vale enforcement | ||
|
|
||
| The repo-root `.vale.ini` configures Vale to read styles from | ||
| `docs/.style/styles/`. The starter configuration combines: | ||
| The repo-root `.vale.ini` configures Vale to read styles from `docs/.style/styles/`. | ||
| The starter configuration combines: | ||
|
|
||
| - Google's developer-docs base style | ||
| - A curated subset of `alex` (inclusive-language) | ||
| - A curated subset of `write-good` (wordiness) | ||
| - Coder-specific custom rules in `docs/.style/styles/Coder/` | ||
|
|
||
| The rationale for the cherry-picked base styles and the severity | ||
| policy lives in `.vale.ini`'s inline comments. Run `make lint/prose` | ||
| to reproduce the baseline locally. | ||
| The rationale for the cherry-picked base styles and the severity policy lives in `.vale.ini`'s inline comments. | ||
| Run `make lint/prose` to reproduce the baseline locally. | ||
|
|
||
| ## Editor setup | ||
|
|
||
| To be filled in by a follow-up PR. Will cover VS Code, Cursor, | ||
| JetBrains, and Neovim. | ||
| A follow-up PR adds coverage for VS Code, Cursor, JetBrains, and Neovim. | ||
|
|
||
| ## Relationship to `docs/about/contributing/documentation.md` | ||
|
|
||
| A public-facing prose summary lives today at | ||
| [`docs/about/contributing/documentation.md`](../about/contributing/documentation.md). | ||
| A follow-up PR will redirect that page to this guide; until then, | ||
| follow the public summary for anything the scaffolded sections above do | ||
| not yet cover. New prose rules land here; the public page is frozen | ||
| pending the redirect. | ||
| A public-facing prose summary lives today at [`docs/about/contributing/documentation.md`](../about/contributing/documentation.md). | ||
| A follow-up PR redirects that page to this guide. | ||
| Until then, follow the public summary for anything the scaffolded sections in this guide don't yet cover. | ||
| New prose rules land here; the public page is frozen pending the redirect. | ||
|
Check warning on line 99 in docs/.style/style-guide.md
|
||
|
|
||
| ## Third-party references | ||
|
|
||
| When this guide does not cover something, consult: | ||
| When this guide doesn't cover something, consult: | ||
|
|
||
| | Type of guidance | Reference | | ||
| |---------------------|-----------------------------------------------------------------------------------------| | ||
| | Spelling | [Merriam-Webster](https://www.merriam-webster.com/) | | ||
| | Style, nontechnical | [The Chicago Manual of Style](https://www.chicagomanualofstyle.org/home.html) | | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Coder.BrandNames - enforce canonical brand-name casing in prose. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3 [CRF-6] The PR description's verification section says the rule "flags the 7 instances the cleanup commit fixes." Vale scopes to
|
||
| # | ||
| # Vale's substitution rule applies in prose only; it skips fenced code | ||
| # blocks, inline code, and URLs by default. That means `hashicorp/kubernetes` | ||
| # (Terraform provider source) and `developer.hashicorp.com` (URL) stay | ||
| # untouched. The rule fires on body text and headings where the wrong | ||
| # casing appears as a normal word. | ||
| # | ||
| # Level: error. Each swap targets a brand whose owner publishes a | ||
| # canonical casing; "Hashicorp Vault" instead of "HashiCorp Vault" is | ||
| # objectively wrong, not a judgment call. The existing-content violation | ||
| # count is zero (cleanup landed in the previous commit), so this rule | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3 [CRF-4] "cleanup landed in the previous commit" is a temporal reference that dissolves after merge. After a squash merge, "the previous commit" doesn't exist. After a rebase merge, the SHA changes. The factual claim (violation count is zero) stands on its own. Drop the parenthetical: (Leorio)
|
||
| # can ship at error from day one. | ||
| # | ||
| # Adding a brand: append a key/value to the swap table below and audit | ||
| # the docs corpus for the wrong-casing variant. Keep the message template | ||
| # unchanged; the `%s` token interpolates the matched (wrong) text. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2 [CRF-2] The comment says "the Suggestion: (Leorio)
Comment on lines
+1
to
+17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3 [CRF-7] The header comment is 17 lines for 11 lines of config. Roughly half restates identifiers or duplicates content from
The trap (false-positive scope) and why-not-what (error level) carry their weight. Trimmed draft that keeps both: # substitution rules skip code blocks, inline code, and URLs, so
# provider sources (hashicorp/kubernetes) and URLs are unaffected.
#
# Error from day one: brand casing is objectively right or wrong,
# and existing-content violations are zero.
#
# Adding a brand: append to swap, audit docs for violations.(Gon)
|
||
| extends: substitution | ||
| message: "Use '%s' instead of '%s' (brand-name casing)." | ||
| link: https://github.com/coder/coder/blob/main/docs/.style/style-guide.md#brand-names | ||
| level: error | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note [CRF-12] Worth knowing:
|
||
| ignorecase: false | ||
| nonword: false | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P4 [CRF-8] No regression fixture for the rule. If someone later breaks the swap YAML or removes an entry, there's no automated check that the rule still fires on known-bad input. The "test" is the absence of violations in the corpus, which is indistinguishable from a broken rule that fires on nothing. Not this PR's debt (no Vale rule test infrastructure exists in the repo), but worth noting as the
|
||
| action: | ||
| name: replace | ||
| swap: | ||
| Hashicorp: HashiCorp | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3 [CRF-5] The swap table catches The stated fallback ( swap:
hashicorp: HashiCorp
Hashicorp: HashiCorp
HASHICORP: HashiCorp(Zoro P3, Hisoka Note)
|
||
| HASHICORP: HashiCorp | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| # Coder custom Vale rules | ||
|
|
||
| Custom Vale rules specific to Coder live here. Each rule is a YAML file | ||
| that Vale loads through the `BasedOnStyles = Coder` setting in the | ||
| repo-root `.vale.ini`. | ||
| Custom Vale rules specific to Coder live here. | ||
| Each rule is a YAML file that Vale loads through the `BasedOnStyles = Coder` setting in the repo-root `.vale.ini`. | ||
|
|
||
| This directory is intentionally empty for now. Follow-up PRs add rules | ||
| incrementally. Planned starter rules: | ||
| Active rules ship as YAML files in this directory. | ||
| See the matching sections in `docs/.style/style-guide.md` for the user-facing policy each rule enforces. | ||
| Follow-up PRs add rules incrementally. | ||
| Planned coverage: | ||
|
|
||
| - Dev Container terminology | ||
| - HashiCorp casing | ||
| - Limit "we" | ||
| - Limit `we` | ||
| - Setup vs set up, Quickstart casing | ||
| - Next steps vs Learn more | ||
| - Vale substitution rule scaffold | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit [CRF-9] "Vale substitution rule scaffold" is stale or ambiguous.
|
||
|
|
@@ -20,19 +20,15 @@ | |
|
|
||
| ## Authoring a new rule | ||
|
|
||
| 1. Write a YAML file under this directory. Name it after the rule's | ||
| intent, for example `InclusiveLanguage.yml` or `ProductVoice.yml`. | ||
| 2. Each rule's `message:` should link to the matching section in | ||
| `docs/.style/style-guide.md`, ideally with a deep-link anchor, so a | ||
| contributor reading a Vale warning can jump straight to the guidance. | ||
| 3. Land at `level: warning` first. Promote to `level: error` only after | ||
| both conditions hold: | ||
| - The rule is objectively correct (typo, brand-name casing, banned | ||
| substitution). | ||
| 1. Write a YAML file under this directory. | ||
| Name it after the rule's intent, for example `InclusiveLanguage.yml` or `ProductVoice.yml`. | ||
| 2. Each rule's `message:` should link to the matching section in `docs/.style/style-guide.md`, ideally with a deep-link anchor, so a contributor reading a Vale warning can jump straight to the guidance. | ||
| 3. Land at `level: warning` first. | ||
| Promote to `level: error` only after both conditions hold: | ||
| - The rule is objectively correct (typo, brand-name casing, banned substitution). | ||
| - The existing-content violation count for the rule reaches zero. | ||
| 4. A follow-up PR will add a parity CI check that verifies every rule | ||
| here has a matching section in `style-guide.md`. Add the section in | ||
| the same PR as the rule. | ||
| 4. A follow-up PR adds a parity CI check that verifies every rule here has a matching section in `style-guide.md`. | ||
| Add the section in the same PR as the rule. | ||
|
|
||
| ## Reference | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2 [CRF-1] PR description says "Two commits, in this order so each is independently valid" and lists exactly two. The branch has five:
Commit 5 changes
Google.ParensfromsuggestiontoNO, dropping ~1800 suggestion-level findings frommake lint/prose. The commit message is honest and the rationale is sound, but this is an independent Vale severity-policy decision invisible to reviewers who scope from the description. The verification numbers in the PR description ("7681 suggestions") may reflect the pre-Parens-disable state.Update the PR description to account for all five commits, or split the Google.Parens disable into its own PR. (Mafu-san P2, Hisoka P3, Luffy P3, Kite P3)