Commit Graph
3190 Commits
Author SHA1 Message Date
Garrett Delfosse b54f7de4c6 feat: graduate chat projects out of the chat-projects experiment (#31354) 2026-10-27 18:18:41 -04:00
Ehab Younes deb76fadf3 docs: list VS Code session ID sources and View related connections (#31371) 2026-10-27 20:06:53 +00:00
131d4fc3df docs: add guide for tracing workspace connections (#31342)
## Summary

Adds a Monitoring guide for deployment administrators and platform teams
to collect client, `coderd`, and agent logs, correlate entries by client
session ID, and interpret connection and workspace lifecycle fields.
Links it from Connection logs and adds it to the docs navigation.

Replaces #30707 under @matifali, carrying forward its changes and review
history with accuracy fixes in 052d9e840f and the follow-up prose fixes
in 3a777bf195 and 04feb81d33.

Resolves
[CLIENT-1032](https://linear.app/codercom/issue/CLIENT-1032/document-how-a-platform-team-can-use-this-data).

Preview:
https://coder.com/docs/@superblink%2Fclient-1032-trace-connections/admin/monitoring/trace-connections

> [!NOTE]
> This guide is intended for the 2.39.0 docs under the multi-PR launch
exception. Coder Remote 1.17.2 and Toolbox plugin 0.9.5 must be
available before merge. At the last source check, the VS Code
prefix/release PRs (coder/vscode-coder#1164 and coder/vscode-coder#1165)
remained open, and Toolbox 0.9.5 remained a draft release.

## Validation

- Full Markdown and table-format checks passed (525 files).
- Emdash, docs HTML, manifest, and changed-page Vale checks passed, with
zero Vale findings.
- Docs self-check found no remaining verified blockers; all 28 relative
links and procedure word counts passed.
- Product behavior was source-verified. No live IDE/deployment
validation was performed, and the PowerShell example was not executed
because `pwsh` is unavailable.

<details>
<summary>Review decisions and remaining caveats</summary>

- Keep this as a log-correlation how-to in Monitoring, not a
failure-recovery procedure. The introduction and instructions reflect
that scope.
- Omit Coder version pins because the docs are versioned. Readers must
match their Coder CLI and workspace agents to the control plane. Keep
extension/plugin/Toolbox version requirements because those products
release independently.
- Document log pruning before new-file creation, including
modification-time ordering and the `coder-*.log` pattern; missing
connection events can also result from reporting failures.
- Include Toolbox forwarded-channel session IDs, disambiguate
terminal/speedtest logger messages, clarify nonzero command exits, and
cover all documented `autostop` and `network_error` cases.
- Follow merged #31289's Toolbox 3.9.0 prerequisite. The plugin's draft
release notes still name 3.7.2; maintainer confirmation is needed before
changing that requirement.
- The optional suggestion for an invocation-level log-retention
regression test was not implemented: this is a docs-only correction with
no production behavior change.
- The original dependency timeline and discussion remain on #30707.
#30759 has since merged; the former description's unmerged status is
historical.

</details>

> 🤖 This PR was created with the help of Coder Agents, and has been
reviewed by my human. 🧑💻

---------

Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com>
Co-authored-by: Coder Prototypes <294797144+coder-prototypes@users.noreply.github.com>
Co-authored-by: default <default@example.com>
2026-10-28 00:03:30 +05:00
Nick Vigilante 21471da74c feat: enable Coder.Semicolons Vale rule (#30787)
Depends on #30782.

Adds `Coder.Semicolons`, a Vale rule that flags a semicolon in prose.
It enforces [No semicolons in
prose](https://github.com/coder/coder/blob/main/docs/.style/style-guide/capitalization-and-punctuation.md#no-semicolons-in-prose).

- Severity: `warning`.
- Scope: paragraphs, list items, headings, and blockquotes in `docs/**`
except `docs/.style/style-guide/**`.
  Table cells, code spans, and code blocks keep their semicolons.
- Baseline: 137 findings.
The cleanup commit fixes 112 of them across 61 files by splitting
sentences, or by using a comma or a connecting word where a split reads
badly.
- Excluded in `.vale.ini`: `docs/reference/{api,cli}/*.md` and
`docs/admin/setup/configuration-reference.md`.
Their text is generated from Go source (CLI flag help, Swagger
comments), and 25 findings live there.
Fixing them means editing Go and regenerating, so I used a commented
exclusion like `Coder.UnitSpacing` does.
  Say so if you prefer the Go fix.
- Result: `vale --output=line docs/` reports 0 `Coder.Semicolons`
findings outside the style guide.
- Three headings lost a semicolon, so their anchors changed.
I updated the links in `docs/.style/` and in `.claude/`
(`DOCS_STYLE_GUIDE.md`, the `write-docs` and `doc-check` skills).

Linear: DOCS-1261

<details><summary>Decision log</summary>

- Scope list is `paragraph`, `list`, `heading`, `blockquote`. Without
`blockquote`, a semicolon in a `>` quote goes unreported, which I
checked.
Table cells are outside those scopes, so they stay exempt without extra
config.
- Token is `(?<!TL);(?!DR)`. `TL;DR` in `telemetry.md` is an
abbreviation, not punctuation.
- `&nbsp;` entities and `style="a: b;"` attributes don't match. Vale can
report a real semicolon on the wrong line of a paragraph that contains
an entity or raw HTML (for example, `modules.md:69` pointed at a
semicolon on line 71), so cleanup used a paragraph-wide search instead
of trusting reported lines.
- A semicolon inside a fenced block in a blockquote
(`ai-gateway/monitoring.md:105`, a YAML comment) isn't reported and
stays.
- Cleanup default: `; x` becomes `. X`, then I reviewed the diff and
hand-fixed list fragments, parentheticals, and headings.
Each new sentence sits on its own line, outside table cells. The
hand-written part of `prometheus.md` is also reformatted to one sentence
per line.
- Heading rewrites: `Verify against the code and document exact values`,
`Evidence justifies a claim and does not belong in the claim`, `STUN
returned different addresses and you may be behind a hard NAT`.
- `prometheus.md` is in the generated-page exclusion for
`Coder.UnitSpacing` but not here. Its semicolon was in hand-written
prose, so I fixed it.
- Enable commit updates the footer, the checks table (scope text matches
`.vale.ini`), the coverage counts (Capitalization and punctuation 3/7 to
4/6, total 20 to 21 tool-checked and 25 to 24 planned), and the "What
the tooling checks" counts.

Tests (fixtures in `/tmp`, not committed), each run with LF and CRLF
files:

- Flagged: paragraph, list item, ordered list item, heading, blockquote.
- Not flagged: table cell, code span, fenced block, `&nbsp;` and
`&amp;`, an HTML `style` attribute, and `TL;DR`.
- `go run ./scripts/styleclaims`, `make lint/emdash`, and the pre-commit
hook (markdown, typos, style-claims) pass.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*
2026-10-27 16:44:17 +00:00
brittany-coderandNick Vigilante 94d209b4d3 chore(docs): update release docs for v2.38.3 (#31314)
Automated docs update for v2.38.3 release.

Created by `releasetui`.

Co-authored-by: Nick Vigilante <nickvigilante@users.noreply.github.com>
2026-10-27 16:13:34 +00:00
Phorcys 🐾andNick Vigilante 3ed2dfd8ca docs: promote usage of Nix(OS) and discourage use of envbuilder (#31141)
Adds a **Nix(OS)** docs page (`docs/admin/integrations/nixos.md`)
presenting Nix flakes as an alternative to dev containers. It covers
both Nix on an existing distribution (e.g. a Debian image, via the
[Nix(OS) module](https://registry.coder.com/modules/coder-labs/nix)'s
`nix develop` mode) and full NixOS workspaces (the [AWS EC2
(NixOS)](https://registry.coder.com/templates/coder-labs/aws-nixos)
template). Both work in containers or VMs.

The page is added to the sidebar under Integrations, after Dev
Containers. Other pages get one-line links to it:

- Dev Containers overview (`admin/integrations/devcontainers/index.md`)
- Image management, "Let developers customize their own environment"
- Templates overview, Best Practices
- Managing templates, Next steps
- Extending templates, Dev Containers
- Envbuilder (managing templates)
- Dev Containers user guide intro

---

Generated with [Xum](https://mux.coder.com/) using Claude

---------

Co-authored-by: Nick Vigilante <nickvigilante@users.noreply.github.com>
2026-10-27 15:24:46 +00:00
Garrett Delfosse 255850fcfa chore(docs): update release docs for v2.29.23 (#31320)
Automated docs update for v2.29.23 release.

Created by `releasetui`.
2026-10-27 11:11:39 -04:00
Ehab Younes 8b0c0cc35e fix!: validate workspace app URLs on the server (#31262)
- Reject external app URLs with javascript, vbscript, data, blob, file,
  or filesystem schemes, or control characters, for template and
  sub-agent apps.
- Skip invalid sub-agent apps and log the reason; the dev container
  still starts.
- Strip the $SESSION_TOKEN placeholder from sub-agent app URLs.
- Drop app status URIs that aren't http, https, or file.
2026-10-27 11:44:25 +00:00
Ehab Younes 0d1cba2def feat: expose connection duration and client session ID in connection logs (#30759)
Show how long each SSH and reconnecting PTY connection lasted, and let
users find connections that share a client session ID. No schema changes.

API (ssh_info):
- Add client_session_id, the ID supplied by the client (the Coder CLI
  or a tool that launches it), if any.
- Add a client_session_id:<32 hex chars> filter.

UI:
- Each row shows the connect → disconnect time range and the duration
  as badges. A connection with no disconnect shows "Ongoing", equal
  timestamps show an "Unknown" start, and a disconnect recorded before
  its connect is labeled as such.
- The info icon opens a details popover instead of a hover tooltip. It
  uses the default popover styling and sentence-case labels, and lets
  users copy the client session ID and open "View related connections"
  for the same workspace.

Closes CLIENT-1010
2026-10-27 14:04:37 +03:00
Ehab Younes 28192213ab feat!: label the VS Code family and report built-in app usage per app (#29906)
The session banner now labels the VS Code family "VS Code Family", so it isn't confused with the VS Code editor. coderd_insights_applications_usage_seconds now reports built-in apps per app instead of per family.

- Generate the frontend's family labels from the Go table in codersdk.
- Add the connection_method label: workspace_app for template apps, and ssh, reconnecting_pty, or port_forwarding for built-in apps.
- Rename the application_name label to display_name. For built-in apps it holds the registry name, "Unknown" for unknown, and "Other apps" for overflow.
- Built-in apps get one series per app name, only for apps used in the window. The series limit and the fold rule are shared with the template insights API.
- Breaking: selectors with a value for application_name, or with slug="", match nothing. The Prometheus docs map each old series to its new one.

Closes #29940
Closes CLIENT-1034
Closes CLIENT-1036
2026-10-27 09:58:36 +00:00
Michael Suchacz 3f055e7a56 feat: list every chat attachment in the Summary panel (#31140)
In long chats, the Summary panel's **Attachments** section only listed
agent files from the messages already loaded in the transcript. It
showed "No attachments in the loaded messages." and a **Load earlier
messages** button, so finding a chat's files meant paging through its
history.

## What changes

- **API:** `GET /api/v2/chats/{chat}/attachments` returns every file
part in the chat's user-visible user and assistant messages, newest
first, as `{message_id, part_index, role, file}`, where `role` is `user`
or `assistant`. An optional `before_id` limits it to older messages.
Parts go through the same conversion as `GET /messages`, so `part_index`
matches that endpoint. `file` is a `ChatAttachmentFile`, a file-only
type, so the OpenAPI schema, the API reference, and the generated
TypeScript all describe a file part. An inline file omits `file_id` and
carries its bytes in `data` as a base64 string. It needs the same
permission as reading the chat. A new sqlc query,
`GetChatMessagesWithFilePartsByChatID`, backs it; there is no migration.
- **Panel:** attachments from the loaded messages stay live. While older
history is not loaded, the panel fetches the attachments before the
oldest loaded message and lists them with the rest. It sends no request
when every message is loaded or the Summary tab is hidden. Loading
earlier transcript pages reuses the list it already fetched instead of
sending another request, and does not blank, duplicate, or reorder it,
including while the last page moves into the chat store.
- **Groups:** files the agent attached are listed under "From the
agent", then uploads and pasted text under "From you".
- **Cards:** selecting a card previews the file. Images open in the
image lightbox and show their thumbnail on the card. Text, Markdown,
CSV, and JSON files open in the text preview, which opens at once with a
spinner while a stored file's text loads on its first view, and reuses
the text until the cache frees it, five minutes after nothing on the
page reads it. An icon on the card downloads the file. Other files keep
the download card. Closing a preview returns focus to its card, and an
image whose thumbnail fails to load becomes a download card that takes
focus, even if its preview was open.
- **Dialogs:** `Lightbox` now passes Radix's close event to
`onCloseAutoFocus` instead of always calling `preventDefault`, so a card
hands it to `useDialogFocusReturn().restoreFocus`, which prevents the
default only when it can focus a target. `MermaidDiagram`, the only
other caller that passes the prop, now calls `preventDefault` itself, so
its focus return is unchanged. `ImageLightbox` and `TextPreviewDialog`
take the same optional prop.
- **Transcript focus:** closing the preview of an attachment in the
transcript (the image lightbox or the text preview) or of a tool result
image returns keyboard focus to the attachment that opened it instead of
the page body. Each attachment button passes itself to the opener,
because a stored text file opens its preview only after its download
finishes, when the click event no longer holds the button.
- **States:** the header count shows once the list is complete and
leaves out expired files. An empty list says "No attachments yet." While
the earlier request is pending, the loaded attachments stay, with a
spinner below them. If the request fails, they stay and the section
shows the server's error in an alert with Retry, which stays while the
retry runs or waits offline. The load-earlier button is gone.
- **Expired files:** files the chat no longer has fold into a closed "N
expired attachments" list that names each one and explains why files
expire. A file from unloaded history counts as expired when the chat's
file list no longer has it. If the cached chat record is older than
those messages (a revisit after more than a page of new messages), a new
file can show as expired until the chat refetch returns. A stored text
file whose preview finds it deleted stays in place as "Attachment
expired", keeps focus, and leaves the count.

| Cards grouped by who attached them | Earlier attachments in the
Summary panel | Expired files, listed by name |
| --- | --- | --- |
| ![Agent files under From the agent and an upload under From you, with
an image thumbnail and a download icon on each
card](https://github.com/user-attachments/assets/02683b78-5547-409e-ad02-d9a28eb8787c)
| ![Summary panel listing a file from a loaded message and two files
from messages that are not
loaded](https://github.com/user-attachments/assets/5e8c8916-a5ff-4af4-be62-1048ff557461)
| ![Opened 3 expired attachments list naming each expired file under an
explanation of why files
expire](https://github.com/user-attachments/assets/88ba6b37-4fc6-489e-9347-28b4b7dbe79f)
|

| Text file found deleted | Earlier request failed | Image preview |
| --- | --- | --- |
| ![PLAN.md card in place with a warning tile and Attachment expired,
and the header count down to
5](https://github.com/user-attachments/assets/7005bf19-f889-46a6-9e2a-78daa6c3be0c)
| ![A loaded attachment still listed above an alert with the server's
error and a Retry
button](https://github.com/user-attachments/assets/0348c762-5042-4b1d-97bc-64328334f4b0)
| ![Image lightbox open over the panel after selecting the image
card](https://github.com/user-attachments/assets/4af74d45-b1fc-4f2f-a275-0eb0c00da977)
|

Closes CODAGT-1436.

## Testing

`TestGetChatAttachments` checks the order and the filtering (deleted,
model-only, and tool messages are left out, and `part_index` skips a
stripped hook-context part as `GET /messages` does), compares every
returned file with its part from `GET /messages`, including an inline
paste's `data`, and covers `before_id`, a 400 for an invalid
`before_id`, a 404 for another user, and the raw JSON of an inline file,
which has no `file_id` key and a base64 `data` string. The dbauthz suite
asserts chat read. Vitest covers the panel's request gating and Retry,
seeding an earlier boundary from a cached list, the attachment helpers
(including earlier files the chat no longer lists), and the cards'
previews (including a text preview that opens before its text loads),
download link (including the share sheet it opens in an installed iOS
app), and focus, including a thumbnail that fails to load, also with its
preview open, and a text file that returns 404, and that a viewed text
file's text leaves the cache once nothing shows it. Vitest also opens a
transcript image, an inline text file, a stored text file whose download
finishes after focus has moved on, and a tool result image with Enter,
closes each with Escape, and checks that focus is back on the
attachment. Stories cover the new states, including a retry in flight, a
retry paused offline, and a reconnect after a failed retry. Two existing
stories now import the shared 1x1 PNG fixture instead of keeping their
own copies. Each new test fails when its code path is broken. No new
dependencies.

## Review record

- mafredri's review: grouping by role, the expired list, and keeping the
loaded attachments visible while the earlier request loads are in
`5cf0757b1d8`. The previews and the download icon that @ibetitsmike
asked for in the same round are in `6ae8719d6a0`.
- Frontend review (8 reviewer roles): 4 rounds before the first UAT, 3
delta rounds on the Codex fixes, then 12 rounds on mafredri's review and
the preview cards, with an FE1 to FE10 audit in rounds 2 to 10 (rounds
11 and 12 re-checked comments only), then 3 delta rounds on the
download-link test in `868d42430f0`, 4 on the fixes for Codex's fifth
run, 1 on its sixth, 7 on its seventh, and 4 on its eighth. The last of
those four passed every role it ran, and so did its FE1 to FE10 audit.
Every blocking and should-fix finding is fixed or declined with a
reason. Declined: the alert's title is an h2 under the section's h3,
because the shared `AlertTitle` always renders an h2, as in every
`ErrorAlert`; Retry does not move focus after a successful retry removes
it, which matches the other `RetryButton` callers and would need a focus
effect; the endpoint and panel ship together because the panel is the
endpoint's only consumer; a chat record without `files` is not read as
an empty file list, because the server also omits `files` when its
best-effort metadata query fails, which would show every earlier file as
expired; the header count does not subtract a deleted image or an
unopened text file, because the panel learns of a deletion only from the
chat record or a preview's 404; a card whose file a chat refetch reports
deleted moves into the expired list, which closes its open preview, as
the transcript swaps an evicted file's card for the expired tile; if the
transcript's last page arrives while the earlier request is still
loading, the header count briefly leaves out that page's files, because
only a rerender test reading the header could hold a fix, which FE1
keeps out of Vitest; a text file found deleted counts again once the
cache frees its 404, five minutes after nothing on the page reads it,
because keeping that 404 until reload would need a cache entry per
deleted file that is never freed, and the transcript on `main` forgets
the same 404 as soon as the chat closes; and AttachmentBlocks.tsx is at
719 lines (699 on `main`), because moving its file cards out would
create an import cycle.
- Remote dogfood UAT passed on `c1af9dd7cbc` and again on `d11c699cd0d`.
The second round ran `d11c699cd0d` and the `c1af9dd7cbc` frontend
against the same backend: an evicted earlier upload shows as expired on
`d11c699cd0d` and as a download card that returns 404 on `c1af9dd7cbc`,
and loading earlier pages sends no further attachments requests on
`d11c699cd0d`, while `c1af9dd7cbc` sent one per new page boundary. One
issue also reproduces on `main` and is unchanged here: after a live
attach evicts an older file, the panel and the transcript keep its
download card until the page reloads. The changes since `66e92f09064`
(mafredri's review, the preview cards, and the fixes for Codex's third
to eighth runs) were checked in Storybook and Vitest, and on dogfood
only through the keyboard round below, which also opened the Summary
panel's image and text cards; the screenshots above are Storybook
renders.
- Codex review: round 1 raised 4 findings, all fixed (see the resolved
threads). Round 2 found no issues on `d11c699cd0d`. A third run on
`d11c699cd0d` raised 2 findings, both fixed in `db0109d1120`. A fourth
run on `6ae8719d6a0` raised 1 finding (the download-link test read only
the link's attributes), fixed in `868d42430f0`. A fifth run on
`868d42430f0` raised 4 findings. Three are fixed in `e924d0595d9`: an
open image preview lost focus when its thumbnail failed, a slow text
load let a second preview open, and the earlier attachments dropped for
a render when the last page loaded. The fourth (paginate or cap the
endpoint) is left open for a product decision. A sixth run on
`e924d0595d9` raised 1 finding (the expired list's button did not say
what expired), fixed in `661db9b52af`. A seventh run on `661db9b52af`
raised 4 findings, all fixed: an inline file's `file_id` came back as
`null` and the schema described `data` as integers (`5fb4a047e39`), and
viewed text stayed cached until reload and the card's doc comment
restated its code (`51c5c98feb8`). An eighth run on `51c5c98feb8` raised
3 findings. Two are fixed: the attachment role allowed `system` and
`tool` (`2ed84cd882f`), and the error line hid the server's message
(`ce4e79593f6`). The third, that Testing Library cannot find the
decorative thumbnail by its `img` role, does not reproduce and is
declined in its thread.
- @jaaydenh's approval note, that keyboard focus was lost after closing
the preview of an attachment in the transcript, is fixed in
`b37b9952898` and `484e010dd25`; `359dd039b78`, `277b89ba1e2` and
`606b601c445` only refactor the hook, tighten the tests, and reword a
comment. Frontend review ran 5 rounds on the fix; the last passed, and
every blocking and should-fix finding is fixed or declined. Declined:
the composer's pending-attachment previews, the recording preview, and
the Instructions page's text preview also drop focus when they close,
but they predate this PR and are outside the transcript, so they are a
follow-up; if a stored text file finishes downloading while the same
message's image preview is open, closing the image returns focus to the
text file, because a message row remembers one opener, so focus still
stays in that message; and the fix grows ConversationTimeline.tsx from
812 to 827 lines, which was already over the 500-line guideline. Remote
dogfood UAT passed on `484e010dd25` with real key presses: after Enter
or Space opens the preview of a user's image, text file (also when its
download is slowed and the user presses Tab while it loads), or pasted
text, of an assistant's attachments, of one of three attachments in one
message, or of a tool result image, Escape returns focus to the same
attachment, so Tab continues from there. On `bac7cb055ce` focus fell to
the page body and the next Tab went to the Coder logo, so a keyboard
user needed 130 Tabs to get back to the composer instead of 44. Summary
panel cards returned focus before the fix and still do. The image,
slowed text file, and Summary panel cases passed again on `277b89ba1e2`;
`606b601c445` changes only a comment.
- Rebased onto `main` after those reviews. The added and removed lines
are unchanged; only the path of `AgentChatPageView.tsx` changed, because
`main` moved it into `AgentChatPage/`. After the eighth Codex run,
`main` was merged in, with one conflict in `coderd/chat_routes.go`,
where both sides added a route. On 2026-10-26 the branch was rebased
onto `main` (`aa9b0a950ad`) again, with conflicts in the same route list
and in the generated `site/src/api/typesGenerated.ts`, where both sides
added a type; the added and removed lines are unchanged.

> Xum, an AI agent, opened this PR for @ibetitsmike and wrote this
description.
2026-10-27 03:13:52 +01:00
Nick Vigilante 81c40579dc feat: enable Coder.StepLength Vale rule (#30791)
Adds `Coder.StepLength`, a Vale `script` rule for [Keep steps
short](https://github.com/coder/coder/blob/main/docs/.style/style-guide/procedural-writing.md#keep-steps-short).
It flags an ordered-list step whose instruction, the step's first
paragraph, has more than 20 words, counted as [How to count
words](https://github.com/coder/coder/blob/main/docs/.style/style-guide/voice-and-tone.md#how-to-count-words)
describes.
Paragraphs below the instruction explain the step and aren't counted.

- Severity: `warning`.
- Scope: `docs/**` except `docs/.style/style-guide/**`.
- Baseline: 124 findings in 60 hand-written files.
The cleanup shortens each long instruction, moves its explanation into
one paragraph below it, or splits a step that holds several actions.
After cleanup `vale docs/` reports 0 `Coder.StepLength` findings, and
the other rules report no new findings on the changed files.
- The guide section now says the limit covers the instruction, and that
one action or one explanation must not be broken across paragraphs to
meet it.
- Generated pages (`docs/reference/{api,cli,agent-api}`,
`configuration-reference.md`, `prometheus.md`): no findings, so no
`.vale.ini` exclusion is needed.

Linear: DOCS-1272

<details><summary>Decision log</summary>

**Review change (Ian's review)**

- The first version limited every paragraph of a step to 20 words.
The cleanup for it chopped explanations into several short paragraphs,
which made steps harder to read and sometimes changed their meaning.
- The rule now counts only the first paragraph segment of each step.
The content files were reset to `main` and the cleanup was redone
against the narrower rule.
- Cleanup preferences, in order: shorten the instruction; keep a short
instruction and put the explanation, with its original wording, in one
paragraph below it; split a step into one step for each action; for
descriptive lists (such as "How it works"), keep each item one
statement.
- `docs/admin/users/oidc-auth/microsoft.md` keeps the split into
separate steps, with Ian's wording suggestions applied.
"click" became "select" in step 16 because `Coder.SelectClick` flags it.

**Rule shape**

- A `script` rule (Tengo) with `scope: raw`, because the count depends
on Markdown structure that per-paragraph scopes hide.
- A step is an ordered-list item with a `1.` or `1)` marker.
  A nested ordered item is its own step.
  Bullets, even under a step, are not steps.
- The instruction ends at a blank line, a fence, a nested list, a table
row, a blockquote, block-level HTML, or an explicit hard break (`<br>`,
a trailing backslash, or two trailing spaces).
- Fenced code blocks, HTML comments, tables, images, and nested bullets
add no words.
- CRLF: `\r` counts as whitespace, and offsets come from the raw text.

**Counting approximations (also in the rule header)**

- A code span and a `**bold**` or `__bold__` span are one word each.
- Words split on whitespace, so a hyphenated compound and
`30&nbsp;seconds` are one word.
- Link text counts word by word, destinations are skipped, images add no
words, and `<https://...>` autolinks are one word.
- A token with no letter or digit, such as the `>` in `**A** > **B**`,
is not a word.
- Tengo indexes strings by rune but measures them in bytes, so the
script rewrites each non-ASCII rune to ASCII of the same byte length
first.

**Tests** (fixtures under `/tmp/sltest/`, not committed; run with the
repo `.vale.ini`, LF and CRLF)

- Flagged: a long instruction, a short action and a long result in one
paragraph, a long nested ordered step.
- Not flagged: a long paragraph below a short instruction, text after a
`<br>` hard break, a long paragraph after a code block, a long nested
bullet.
- LF and CRLF output is identical.
- Pre-commit hooks (`fmt/markdown`, `lint/markdown`, `lint/emdash`,
`lint/style-claims`, `lint/typos`) pass.
- Not run on Windows or macOS.
The rule is plain text processing, and the CRLF cases simulate Windows
line endings on Linux.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*
2026-10-26 20:43:38 -04:00
Mathias Fredriksson 1aff810443 chore: sync fantasy with upstream v0.45.5 (#31288)
Moves the fantasy pin to the tip of `coder_2_33` (`85ffbbe`). That
commit is coder/fantasy#72, which merges 87 upstream
charmbracelet/fantasy commits, v0.40.0 to v0.45.5. Between the two pins
117 files change. Upstream's own v0.40.0 to v0.45.5 change, without
tests, testdata, examples, `go.sum` and the kronk provider, is 43 files,
+2271/−928.

## What reaches chatd

chatd builds only the `anthropic`, `openai` and `openaicompat` fantasy
clients (`chatprovider.ModelFromConfig`); other vendors reach it through
the AI Gateway on one of those. So the upstream changes to the Google,
Vercel, OpenRouter, Bedrock, Azure and kronk providers, and to the
`fantasy.Agent` loop and its retries, do not run in chatd. These do:

- **Chat Completions and openaicompat streams** keep reasoning on
batched and DeepSeek-shaped chunks, keep `finish_reason: length` when
tool calls are truncated, and stop sending empty reasoning fields.
openaicompat drops assistant turns that hold only reasoning.
- **Token usage.** When an OpenAI-shaped backend reports reasoning
tokens apart from completion tokens (reasoning larger than output),
output tokens now include them, so that backend's reported output tokens
and cost rise. OpenAI's own shape, where reasoning is a subset, is
unchanged.
- **Responses.** A content-filtered turn no longer reads as a tool-call
turn.
- **Context overflow.** Baseten, Fireworks and Parasail prompt-length
errors set `ContextTooLargeErr`, which compaction acts on.
- **Anthropic.** Tool calls whose content block never closes are
reported. For Claude 5 models, thinking defaults to `display:
"summarized"` when the chat config sets none; a configured display still
wins. `TestThinkingDropBlockModel_RetriesWithEffort` now expects the
field in the retry body.
- **Anthropic keepalives.** Fantasy forwards `message_start`,
`message_delta` and unknown events as content-free `keepalive` parts.
The first one arrives before any model output, so this PR makes
`ttft_seconds` and the `time_to_first_token` stage skip them, as they
skip warnings. They still reset the stream silence guard.
`processStepStream` ignores them, and the debug recorder counts them in
its part count but records no content.
- **Tool-result media** now goes through upstream's shared
`ToolRunBuffer`, which replaces coder/fantasy#64 and does the same
thing.

#72 keeps coder's anthropic-sdk-go and openai-go forks, Go 1.26 and
kronk v1.31.5, so upstream's SDK and Go moves do not come along.

`go mod tidy` raises the modules fantasy v0.45.5 requires, among them
otel exporters v1.47, the AWS SDK, `google.golang.org/api` v0.307 and
go-openapi v1. All are upgrades.

The `go.mod` comment now names #72 as the upstream sync.

coder/coder#29861 stacks on this PR to pin coder/fantasy#62.

<details>
<summary>Verification</summary>

- `go build ./...`.
- `go test` passes on every package that imports fantasy
(`coderd/x/chatd/...`), and `go test ./coderd -run
'TestChat|TestExpChat|TestMCP|TestAIBridge'` passes.
-
`TestGuardedStreamTTFTStage/WarningsAndKeepalivesThenContentObservesOnce`
fails without the TTFT change (TTFT observed 0s instead of 1s) and
passes with it.
- `make pre-commit` passes. The generated Prometheus docs pick up the
metric help change.

Not verified against live backends in this PR: the stream fixes, the
token usage change and the context-overflow patterns have no coder test
against a real provider. coder/fantasy#72 reports a local chatd run
against the AI Gateway on Anthropic, Responses, OpenAI Chat and
openaicompat.

</details>

> 🤖 This PR was created with the help of Coder Agents, and _will be_
reviewed by a human. 🏂🏻
2026-10-27 11:29:10 +11:00
514f23979a feat: honor disable-model-invocation in skill frontmatter (#31147)
Extends #30882's `model_invocable` semantics to workspace skills and to
stored skills created through the API.

Claude Code and Xum let skill authors set `disable-model-invocation:
true` in SKILL.md frontmatter, so agents never pick the skill on their
own and it runs only when a person invokes it. Coder Agents honored the
key only when someone imported a SKILL.md file while adding a project
skill (#30884).

## What changes

- **Workspace skills:** when the pinned SKILL.md sets the key to the
YAML boolean `true`, chatd leaves the skill out of `<available-skills>`
before merging sources, so a listed skill with the same name keeps its
bare name, and `read_skill` reports it as not found. The skill stays in
the `/` menu, and invoking it still loads its body. `read_skill_file`
serves its supporting files under the bare name or `workspace/<name>`
and refuses its `SKILL.md` (case-insensitive, after `path.Clean`).
Skills without the key behave as on the base.
- **Invoked workspace skills:** invoking a workspace skill now stores
the pinned skill directory on the invocation part, and the prompt
renders it as `dir` on `<invoked-skill>`, escaped as an attribute value.
Before, only `read_skill` gave the model a skill's directory, and it
refuses a hidden skill, so a hidden skill could not run the scripts it
bundles. The part also stores the chat's workspace, and the prompt shows
`dir` only while the chat stays bound to it, as it does for workspace
file references. This changes #30861's invocation code. Hook payloads
drop the directory and its workspace like the body, and API responses
strip both.
- **Stored skills:** a create request whose content sets the key and
that omits `model_invocable` stores `model_invocable = false`. An
explicit value wins, and PATCH is unchanged. This covers personal,
organization, and project skills, which share `createSkill`.
- `workspacesdk.SkillDisablesModelInvocation` reads the key. The
`CreateSkillRequest.ModelInvocable` doc comment, the generated API docs,
and `extending-agents.md` (the SKILL.md format, a new "Turn off
automatic use" section, and the notes on the skill index, the skill
tools, and aliases) describe the new behavior.

## Follow-ups

- The personal and organization skill editors have no "Agents can use it
automatically" switch yet. Only the project editor from #30884 has one.

## Testing

- Go tests cover the parser, the turn's skill index and aliases,
`read_skill`, `read_skill_file`, invocation of a hidden skill and the
directory it carries (attribute escaping, no directory after the chat
changes workspace, no directory in hook payloads), and the create
default for personal and organization skills. Each new test fails when
its code path is removed.
- Remote dogfood UAT with a real model failed rounds 1 to 3. Rounds 1
and 2 found the hidden SKILL.md still readable through `read_skill_file`
by symlinks and stale pins, plus a bare-name lookup bug and a docs gap
that round 2 fixed. Round 3 found that the content check added against
those bypasses refused a listed skill's file whose own frontmatter sets
the key. After round 3 we narrowed the rule to the hidden skill's
`SKILL.md` path. The key decides what agents are offered (the index and
`read_skill`), not which files they can read: `read_file` and `execute`
already open any workspace file, so a content check in `read_skill_file`
protected nothing and kept producing edge cases.
- Round 4 passed on `c9ff25dc29f`. Later commits added a
behavior-neutral cleanup (`cd617533c2e`), one test case from the test
audit (`044c1e6e23a`), and a comment fix (`9ec3768b18b`), which passed
validation without another UAT round. Round 5 passed on `2b518c6c2b1`,
which adds the skill directory. A real model ran hidden skills' scripts
from the `dir` on `<invoked-skill>`, including directories whose paths
contain `&`, `'`, `"`, `<` and `>`, and API responses carried no
directory. Merging main after #30884 landed (`2d7d3cb9674`) did not
change this PR's diff, so UAT was not rerun. `8f043b2a342`, which shows
the directory only while the chat stays bound to the skill's workspace,
has Go tests but no UAT round.
- The doc-check skill ran in author self-check mode on `2d7d3cb9674`,
and `27de7f5c6d7` fixes its findings: the skill index sentence said
every skill is listed, the stored-skill sentence claimed any project
editor import honors the key and presented the API default as fixed, the
API path came before the UI path, and some wording broke the docs style
rules. The fix is docs-only, so UAT was not rerun.
- Polish and the test audit stayed inside the implementation diff. No
new dependencies.
- Codex review found no major issues on `9ec3768b18b`, then raised one
P2 on the same head when the PR was marked ready: an invoked hidden
skill gets no skill directory. A probe confirmed it, and `2b518c6c2b1`
fixes it. Its earlier finding on that head (honor
`CODER_AGENT_EXP_SKILL_META_FILE`) was refuted, because the pinned skill
snapshot always reads `SKILL.md`. Both threads are resolved, and Codex
found no major issues on `2b518c6c2b1` or on the merge `2d7d3cb9674`.
- On `27de7f5c6d7`, Codex raised two P2s. One was confirmed: an invoked
skill's directory stayed in the prompt after the chat moved to another
workspace, which a prompt test showed on that head, and `8f043b2a342`
fixes it. The other was declined: on Windows, `scripts\..\SKILL.md` gets
past the `SKILL.md` check in `read_skill_file`, but that check is not an
access boundary (`read_file` opens any path), and Windows has more
aliases (`SKILL.md.`, `SKILL.md::$DATA`, `SKILL~1.MD`) that normalizing
backslashes would not stop. On `8f043b2a342`, Codex asked to bind the
directory to the workspace build instead. That was declined: every
workspace start is a new build with new agent IDs, so the directory
would drop after each stop and start, and the pinned body and the live
files can diverge without a rebuild anyway, as they do for `read_skill`.
A later request on that head asked to limit a hidden skill's
`read_skill_file` access to invocations in the current workspace. That
was declined too: `read_skill_file` resolves names against the current
pin for listed skills on main as well, and the key decides which skills
agents are offered, not which files they can read. All four threads are
resolved. `a697dcd927f` adds the `format:"uuid"` tag that
`TestSDKFieldsFormatted` requires on the new field, and Codex found no
major issues on `a697dcd927f`. `ae70b2c533f` is docs-only: it applies
the doc-check suggestion to say that an invoked skill's directory is
included only while the chat stays in that workspace. The author
doc-check self-check found no blocking findings on it, and Codex found
no major issues on `ae70b2c533f`.

> Xum, an AI agent, opened this PR for @ibetitsmike and wrote this
description.

---------

Co-authored-by: Jaayden Halko <jaayden.halko@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-27 01:06:49 +01:00
Jon Ayers 688c4a390c fix: bump Go to 1.26.10, terraform to 1.16.7, alpine to 3.24.3 (CVE-2026-111943) (#31301)
Mitigates CVE-2026-111943 (compromised eMudhra intermediate CAs).

- **Go 1.26.9 to 1.26.10** (`go.mod`, `mise.toml`, `mise.lock`). Go
1.26.10 no longer trusts certificates issued through the compromised
intermediates.
- **Bundled Terraform 1.16.6 to 1.16.7** (`install.go`, `install.sh`,
`scripts/Dockerfile.base`, `mise.toml`, `mise.lock`, `flake.nix`, airgap
docs, `testdata/generation.sha1`).
[1.16.7](https://github.com/hashicorp/terraform/releases/tag/v1.16.7) is
built with Go 1.26.10. Checksums come from the GPG-verified
`terraform_1.16.7_SHA256SUMS`. `maxTerraformVersion` stays at 1.16.9.
- **Base image `alpine:3.24.2` to `alpine:3.24.3`**. 3.24.2 ships
`ca-certificates-bundle-20260909-r0`; 3.24.3 ships `20261020-r0`.

Verification:
- Rebuilt `scripts/Dockerfile.base` for linux/amd64 and linux/arm64.
Both contain `ca-certificates-bundle-20261020-r0` and `Terraform
v1.16.7`.
- `go test ./provisioner/terraform/...` passes with Terraform 1.16.7.
- `scripts/check_go_versions.sh` passes.
- Local git hooks were skipped at the author's request because the
dogfood host was overloaded. CI is the gate.

Backports to `release/2.34` through `release/2.38` follow as separate
PRs. Older Terraform minor lines did not get the Go 1.26.10 rebuild
(1.15.9 is built with Go 1.25.10, 1.14.9 with Go 1.25.8), so
release/2.35 also moves to 1.16.7.

<details>
<summary>Decision log</summary>

- The request named Go 1.26.1. Main and every release branch were
already on 1.26.9, so @sreya confirmed the target is 1.26.10.
- release/2.34 stays on the Alpine 3.23 line (`alpine:3.23.7`, which
also ships `ca-certificates-bundle-20261020-r0`) instead of jumping to
3.24.
- release/2.35 had drifted: `install.go` pinned 1.14.5 (max 1.14.9)
while the image and `mise.toml` used 1.15.5. Its backport sets both to
1.16.7 and raises max to 1.16.9.

</details>

> Generated by Coder Agents on behalf of @sreya.
2026-10-26 16:47:25 -07:00
George KandAtif Ali aa9b0a950a docs: document declarative script ordering (#31227)
Add a Beta guide for `coder_script_order` with startup and shutdown
examples, module and dev container ordering, failure handling, and
migration from `coder exp sync`. Add navigation and glossary entries.
Recommend declarative ordering for whole scripts and clarify when to
use `coder exp sync` for coordination within script bodies.

Fix fragment links and heading anchors in the offline docs renderer so
section links stay on the current page and repeated headings get
unique IDs.

Refs:
https://linear.app/codercom/issue/CORE-555

---------

Co-authored-by: Atif Ali <atif@coder.com>
2026-10-26 16:13:53 -07:00
Faur Ioan-Aurel e4e62d99da docs(docs): document Toolbox support bundle requirements (#31289)
The support bundle guide covers CLI and VS Code collection but does not
explain the requirements or collection flow for JetBrains Toolbox. The
Toolbox installation guide also lists an outdated minimum version.

This commit updates both guides with the minimum Coder plugin, Toolbox,
and CLI versions. The support bundle guide now explains how the Toolbox
plugin collects Coder diagnostics and local SSH logs, what the archive
contains, and what remains available when bundle generation fails.

The collection steps now start from the environment list shown after
sign-in and use the environment's action menu, so users can follow the
Toolbox interface directly. Each environment represents a workspace and
agent pair.

-resolves
https://linear.app/codercom/issue/JET-11/document-toolbox-support-bundle-version-requirements-in-coder-docs

<!--

If you have used AI to produce some or all of this PR, please ensure you
have read our [AI Contribution
guidelines](https://github.com/coder/coder/blob/main/contributing/AI_CONTRIBUTING.md)
before submitting.

-->
2026-10-26 21:06:20 +02:00
brittany-coderandNick Vigilante 9bf68b8e6b chore(docs): update release docs for v2.38.2 (#31218)
Automated docs update for v2.38.2 release.

Created by `releasetui`.

---------

Co-authored-by: Nick Vigilante <nick.vigilante@coder.com>
2026-10-26 17:49:13 +00:00
Nick Vigilante 1893b80805 fix(docs/reference/cli): regenerate ping docs with table headers (#31292)
## Summary

Regenerate `docs/reference/cli/ping.md` so `main` passes
`lint/docs-html` and the `offlinedocs` unstaged-files check again.
#30148 committed the page from a branch that predated #30879, which gave
CLI option tables a `Property | Value` header.

## Changes

- Regenerate `docs/reference/cli/ping.md` with `make -B
docs/reference/cli/index.md`. No hand edits.

Linear: DOCS-1424

## Testing

- `make -B docs/reference/cli/index.md` reports that only `ping.md`
changed, and the diff matches what CI reported.
- `go run ./scripts/docshtmlcheck` passes.

---

> [!NOTE]
> Generated by Coder Agents on behalf of @nickvigilante.
2026-10-26 13:44:04 -04:00
Nick Vigilante d469763bc0 feat: add JSON output to coder ping (#30148)
`coder ping` printed per-pong lines and a summary table with no
structured output, so monitoring scripts had to parse text.

It now accepts `-o table|json` (default `table`, today's output) through
the shared CLI output formatter.
JSON is a single document at the end with each attempt (sequence, time,
latency, direct or DERP region, error) and the summary.

**Behavior change:** Additive.
Default output is unchanged.
`-o json` requires `--num` and fails early without it, because pings
otherwise continue until interrupted.
In JSON mode, the per-pong and diagnostic lines that normally go to
stdout go to stderr, so stdout contains only the JSON document.

<details>
<summary>Decisions</summary>

- One document at the end rather than streaming, because it's simpler to
parse.
- Require `--num` with `-o json`. In the default continuous mode, a
single document would leave stdout empty until Ctrl+C and hold every
pong in memory. Newline-delimited JSON per pong is a possible follow-up
if continuous machine-readable output is needed.
- Durations are reported as `*_ms` floats because `time.Duration`
doesn't marshal to a portable unit.
- Output goes through the shared `cliui.NewOutputFormatter` (table and
JSON), matching `coder speedtest`. This also adds the standard `-c,
--column` flag for the summary table.

</details>

<details>
<summary>CI note</summary>

`Storybook` failed once on 61b39ef70b inside Pixel (`build finished with
status failed`). This PR changes no frontend files; the job passed on
rerun.

`test-go-pg (ubuntu-latest)` failed on 8e6276921e in [run
38948569950](https://github.com/coder/coder/actions/runs/38948569950/job/117134059011)
on `TestChatTurnStopsAtStepLimit/Default` in `coderd/x/chatd`. This PR
doesn't touch `coderd/x/chatd`, so the failed job was re-run.

</details>

Closes [CLI-32](https://linear.app/codercom/issue/CLI-32)

_This PR was generated by Coder Agents on behalf of @nickvigilante._
2026-10-26 13:17:51 -04:00
TJ 4e4a56b665 fix: show configured provider icons and names in AI settings (#31033)
Admin-configured provider icons were ignored on the AI Settings Models
page (model rows, Add model menu, provider filter, model form header and
provider select) and in Agents compaction settings. These views derived
the icon only from the provider type, so a provider like DeepSeek on an
OpenAI-compatible type showed a generic icon even though the Providers
page and chat model selector showed the configured one. They now pass
the configured icon to `ProviderIcon`, which falls back to the type
icon.

The Spend page showed provider types (OpenAI) instead of configured
providers (DeepSeek) because `ListOrganizationAISpendUsers` aggregated
`ai.provider` while its filter matched `ai.provider_name`. It now
aggregates `provider_name`, and the page resolves names to display names
and icons from the AI Gateway providers list, which it shares with the
provider filter through one query. `OrganizationAISpendUser.providers`
now holds provider names; records from before configured names existed
have the type as their name, so they render as before.

AI Gateway Sessions views have the same type-versus-name issue and are
left for a separate fix.

**Note:** the Spend page resolves provider display names and icons from
`/aibridge/providers`, which requires deployment-wide read access
(`viewAnyAIBridgeInterception`). Owners and Auditors see the custom
display name and icon; Template Admins, User Admins, Org Admins, Org
Auditors and Org User Admins see the provider name rendered as a type
without the icon. Revisiting that endpoint's permissions is tracked in
AIGOV-726.

Refs CODAGT-1421

<details>
<summary>Decision log</summary>

- Root cause: callers rendered `<ProviderIcon provider={type} />`
without the descriptor's `icon`; nothing was stale.
- Spend page provider metadata is fetched only for viewers who can
already use the provider filter (`viewAnyAIBridgeInterception`); other
viewers see names formatted like provider types.
- Extended `ProvidersBadge` with an optional `providersByName` map
instead of adding a Spend-specific badge, so the Sessions fix can reuse
it.
- Removed `providerTypeByIDFromUserConfigs`, which became unused once
compaction settings used `providerInfoByIDFromUserConfigs`.
- Visual coverage is in Storybook stories (ModelRow, ModelForm,
UserCompactionThresholdSettings, SpendPage) per the repo's FE1 rule.

</details>

---

_Generated by Coder Agents on behalf of @tracyjohnsonux._
2026-10-26 13:26:38 +00:00
Susana Ferreira 5bd641a720 feat: show cost and model prices on AI Gateway session page (#30512)
## Description

Shows cost on the AI Gateway session page.

## Changes

- Add a "Cost" row to the session summary and the prompt panel, from
`cost_micros`. When `has_unpriced_usage` is set, a warning icon explains
that some usage has no cost, so the actual cost may be higher.
- The model badge on the prompt panel now shows the priced model and its
unit prices (input, output, cache read, cache write) on hover or focus.
- Show a warning icon next to the model when it was priced as a
different model (the model reported by the provider), or when no price
was recorded.

Closes AIGOV-600

<details>
<summary>Screenshots</summary>

<img width="2842" height="1054" alt="1-summary-cost-warning"
src="https://github.com/user-attachments/assets/d88c594a-8b7e-49c4-be91-212c726787fd"
/>

<img width="2842" height="1054" alt="2-prompt-provider-model-warning"
src="https://github.com/user-attachments/assets/1eee5caf-4883-4388-8817-0ee10ac8a9c5"
/>

<img width="2842" height="1054" alt="3-prompt-model-prices"
src="https://github.com/user-attachments/assets/25596eaf-23aa-40d7-8f5c-4f9d7fe5eec5"
/>


</details>

> [!NOTE]
> Generated by Coder Agents on behalf of @ssncferreira.
2026-10-26 10:01:51 +00:00
Susana Ferreira 9efe7a3d67 feat: show cache tokens on AI Gateway session page (#30511)
## Description

Shows cache read and cache write tokens on the AI Gateway session page,
and removes the token usage from tool call blocks in the agentic loop.

A tool call block showed the token usage of the interception (model
response) that made the call. When one response made several tool calls,
every block repeated the same numbers, which read as per-tool usage and
did not add up to the prompt total. Token usage cannot be attributed to
a single tool call, so it is removed there and stays on the prompt
panel.

## Changes

- Rename the "In / out tokens" row to "Tokens" in the session summary
and the prompt panel, and show cache read / write tokens below input /
output, using the existing `cache_read_input_tokens` and
`cache_write_input_tokens` fields. The tooltip shows input / output,
cache read / write and the token usage metadata.
- Remove the "In / out tokens" row from tool call blocks.
- `TokenBadges` takes optional cache tokens. The sessions list does not
pass them, so it is unchanged.

Related to AIGOV-600

<details>
<summary>Screenshots</summary>

<img width="2854" height="1062" alt="1-summary-and-prompt"
src="https://github.com/user-attachments/assets/36bbb11c-fe5b-48a0-ac50-3dfe37b7b3dc"
/>

<img width="2854" height="1062" alt="2-summary-and-prompt-hover"
src="https://github.com/user-attachments/assets/c9f91458-08d5-4c52-8415-9a28cf0bbe9f"
/>

</details>

> [!NOTE]
> Generated by Coder Agents on behalf of @ssncferreira.
2026-10-26 10:01:50 +00:00
Susana Ferreira 15a5844253 feat: add cost to AI Gateway session threads API (#30509)
## Description

Exposes cost data on the AI Gateway session threads endpoint (`GET
/api/v2/aibridge/sessions/{session_id}`), so the session page can show
cost alongside token usage. Backend only, the UI changes for AIGOV-600
will follow separately.

## Changes

- Add `cost_micros` and `has_unpriced_usage` to
`AIBridgeSessionThreadsTokenUsage`, populated for the session summary,
each thread, and each agentic action.
- Compute the session summary cost in `ListAIBridgeSessions`, next to
the existing session token sums, so tokens and cost come from the same
rows.
- Add `priced_model`, the model and per-token prices used for pricing,
to `AIBridgeThread` for the root interception (the prompt) and to each
`AIBridgeAgenticAction` for that interception, since requests in a
thread may be priced as different models. Nil when not priced.
- Update frontend mocks for the new required fields.

Related to AIGOV-600

> [!NOTE]
> Generated by Coder Agents on behalf of @ssncferreira.
2026-10-26 10:01:50 +00:00
Nick Vigilante 7eacfe95b2 feat: enable Coder.LatinAbbreviations Vale rule (#30794)
Builds on #30782, which is merged; the branch now merges `main`.

Adds `Coder.LatinAbbreviations`, a Vale rule that enforces [Latin
abbreviations](https://github.com/coder/coder/blob/main/docs/.style/style-guide/accessibility-and-inclusion.md#latin-abbreviations).

- Suggests "for example", "that is", and "and so on" for `e.g.`, `i.e.`,
and `etc.`, including `eg.`, `ie.`, and a missing final period (`e.g`).
- Severity: `suggestion`. Scope: `docs/**` except
`docs/.style/style-guide/**`, limited to paragraphs, lists, headings,
and blockquotes. Table cells and code are skipped.
- Baseline: 170 findings in 91 files. The brief estimated 148.
- Cleanup: 153 findings fixed across 81 hand-written pages, 0 left in
linted pages. The count is lower than the original 158 because other PRs
on `main` already rewrote or removed some of the lines, and
`parameters.md` was deleted on `main`.
- `vs.` and `et al.` aren't flagged.

Commits:

1. `docs(docs): use English forms of Latin abbreviations`
2. `feat(docs/.style): enable Coder.LatinAbbreviations Vale rule`

Generated pages: `.vale.ini` skips `docs/reference/{api,cli}/*.md` and
`docs/admin/setup/configuration-reference.md` for this rule, as it does
for `Coder.UnitSpacing`.
Their prose comes from CLI flag help text and Swagger comments in Go
source, and `make gen` rewrites them, so a hand edit fails the `gen`
check (an earlier revision of this PR edited
`configuration-reference.md` and failed `gen` for that reason).
Cleaning them means editing Go and regenerating the help golden files
and API docs, which is left for a follow-up.

Linear: DOCS-450

<details>
<summary>Decision log</summary>

- `extends: substitution`, so the message names the replacement:
"Consider 'for example' instead of 'e.g.'".
- `scope: [paragraph, list, heading, blockquote]`. The single scope
`paragraph` skips list items, blockquotes, and headings, so all four are
listed. Table cells have their own scope and stay excluded.
- Explicit `[Ee]` and `[Ii]` classes with `ignorecase: false`, so
sentence-initial `E.g.,` still matches but the browser name `IE.`
doesn't.
- `eg.` and `ie.` require the trailing period so ordinary words and file
extensions stay quiet.
- Cleanup rules, applied by script and then reviewed line by line:
- `e.g.` and `i.e.` become "for example," and "that is," (capitalized at
the start of a sentence), with a comma added when the original had none.
- `etc.` becomes "and so on", with the sentence-ending period kept when
`etc.` closed the sentence.
- Lines inside table rows, fenced blocks, and code spans are untouched,
so are the style guide and the generated pages.
  - Hard-wrapped lines keep their wrapping, and CRLF files keep CRLF.
- The rest of the Vale output is unchanged: the per-rule counts for
every other rule match the pre-cleanup run.

Test cases (fixtures under `/tmp/latin-test/`, not committed), run with
LF and CRLF line endings:

- Flagged (15 each): `e.g.,` in a paragraph, `i.e.,`, `etc.` at the end
of a sentence and before a comma, `eg.`, `ie.`, `e.g` and `i.e` without
the final period, `E.g.,`, `I.e.,`, `Etc.`, a blockquote, a list item, a
numbered item, and a heading.
- Not flagged: a table row with `e.g.,`, `i.e.,`, and `etc.`, code
spans, a fenced block, "for example", "that is", "and so on", `IE.`,
`genre`, `series`, `egg`, `tie`, `etcetera`, `vs.`, `et al.`.
- Known edge case: a path-like token such as `path/i.e/x` outside code
matches. It doesn't occur in the corpus.

Checks:

- `vale --output=line docs/`: 0 `Coder.LatinAbbreviations` findings.
- `go run ./scripts/styleclaims` passes.
- The pre-commit-light hook passes on both commits.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*
2026-10-23 22:27:18 -07:00
Nick Vigilante 9edb2e388d feat: enable Coder.USSpelling Vale rule (#30790)
Depends on #30782.

Adds `Coder.USSpelling` at `warning` severity.
The rule flags an `-ise` family (`organise`, `initialise`,
`authorisation`) and a list of British spellings (`behaviour`,
`labelled`, `cancelled`, `analogue`, `whilst`, and others) and suggests
the US form.
It covers `docs/**` except `docs/.style/style-guide/**` and the
generated `docs/reference/{api,cli}/*.md` pages.

Baseline: 13 findings before cleanup, 0 after.
The first commit fixes 11 of them: 10 in hand-written pages and 1 in the
Prometheus metrics table, which comes from metric help text.
Two findings sit in generated reference pages, which `.vale.ini`
excludes for this rule: the CLI alias `favourite` and `amongst` in a Go
comment from a vendored dependency (the DERP map schema).
The metric help text comes from `querymetrics.go`, so the fix lands
there and in `generated_metrics` and `prometheus.md`.

Known false positive: Vale doesn't skip bold text, so a UI label in bold
that keeps British spelling is flagged.
The rule comment and the guide footer say to use a code span for such a
label.

Linear: DOCS-1280

<details>
<summary>Decision log</summary>

- **Rule type**: `substitution`, so each message names the US form.
The `-ise` family can't name a specific replacement, so it suggests "the
-ize form".
- **`cancelled`**: the guide's "Use US spelling" section lists
`canceled` and `canceling`.
The rule flags the double-l verb forms and leaves `cancellation` alone,
which Merriam-Webster spells with one `l`.
- **Exceptions**: Vale applies an exception to the matched word, so each
is anchored with `^` and `$` and case-insensitive.
The list covers `-wise` words and stems for `advise`, `advertise`,
`exercise`, `promise`, `premise`, `compromise`, `surprise`, `comprise`,
`concise`, `precise`, `revise`, `supervise`, `televise`, `devise`,
`improvise`, `franchise`, `merchandise`, `disguise`, `despise`,
`paradise`, `cruise`, `noise`, `raise`, `rise`, `wise`, and others, each
with the endings `e`, `es`, `ed`, `ing`, `er`, and `ers`.
  The `mise` tool is excepted by name.
- **Extra British spellings** beyond the guide table: other doubled-`l`
verbs (`signalled`, `levelled`), `metre`, `litre`, `fibre`, `theatre`,
`calibre`, `offence`, `pretence`, `analyse`, `judgement`,
`acknowledgement`, `ageing`, `artefact`, `sceptic`, `aluminium`,
`practise`, `enrol`, `fulfil`, `instil`, `skilful`.
  None appears in the corpus today.
- **Generated pages**: excluded for `docs/reference/{api,cli}/*.md`, as
`Coder.UnitSpacing` does.
Changing the `favourite` alias would change CLI behavior, and the
`amongst` comment isn't ours to edit.
- **Prometheus doc**: edited by hand with matching table padding because
`go run ./scripts/metricsdocgen` already rewrites the whole table on the
base branch, independent of this change.

Test cases, run with `vale --config` against fixtures that are not
committed, in LF and CRLF:

- Positive: `organise`, `initialise`, `authorise`, `customisation`,
`authorisation`, `organisations`, `Organised`, `initialising`,
`recogniser`, `customisable`, every explicit list entry, and capitalized
forms.
- Negative: `advise`, `exercise`, `otherwise`, `Enterprise`, `premise`,
`compromise`, `promise`, `surprise`, `precise`, `concise`, `expertise`,
`revising`, `supervising`, `improvising`, `raise`, `noise`, `cruise`,
`franchise`, `merchandise`, `disguise`, `despise`, `paradise`,
`appraise`, `sunrise`, `arise`, `liaise`, `clockwise`, `cancellation`,
`canceled`, `mise`.
- Skipped: words in code spans and fenced code blocks, such as
`cancelled`.
- LF and CRLF results are identical.

Checks: `vale --output=line docs/` reports 0 `Coder.USSpelling`
findings, `make lint/style-claims` passes, and the pre-commit hooks pass
on both commits.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*
2026-10-23 22:18:30 -07:00
Nick Vigilante 58d19d78c5 feat: enable Coder.Please Vale rule (#30789)
Depends on #30782.

Adds `Coder.Please`, a Vale rule that enforces [Leave out
"please"](https://github.com/coder/coder/blob/main/docs/.style/style-guide/voice-and-tone.md#leave-out-please).

- Flags `\bplease\b`, ignoring case.
- Severity: `warning`. Scope: `docs/**` except
`docs/.style/style-guide/**`.
- Baseline: 31 findings in 24 pages (23 hand-written plus the generated
configuration reference), 0 after cleanup.
- Code spans and fenced code blocks are skipped by Vale, so quoted
product text such as `Please try again later` stays untouched, as the
guide asks.

## Commits

1. `docs: leave "please" out of instructions`: rewrites each use as a
direct imperative and keeps the meaning.
   It also fixes the one generated page that had a finding.
`docs/admin/setup/configuration-reference.md` comes from the telemetry
group description in `codersdk/deployment.go`, so the cleanup edits that
source and the golden files (`cli/testdata/coder_server_--help.golden`,
`cli/testdata/server-config.yaml.golden`,
`enterprise/cli/testdata/coder_server_--help.golden`) regenerated with
`go test -update`.
2. `feat(docs/.style): enable Coder.Please Vale rule`: adds the rule,
flips the footer to enforced, adds the checks-table row, and updates the
coverage counts.

No `.vale.ini` change is needed, and no generated page is excluded.

Linear: DOCS-1281

<details>
<summary>Decision log</summary>

- An `existence` rule with one `\bplease\b` token. Word boundaries keep
`pleasant` and `displeasing` out.
- `warning` rather than `error`, because a quoted product message can
legitimately contain the word outside code font.
- Generated pages: fixed in Go source instead of excluded, because only
one string was affected and the text reads better without it.
- URL query strings such as `body=please+enter+your+request+here` aren't
flagged, because Vale skips link destinations.
- The README sentence about rows, checks, and sections moves from 7, 10,
and 9 to 8, 11, and 10 for the new row.

Test cases (fixtures under `/tmp/please-test/`, not committed), run with
LF and CRLF line endings, 6 findings each:

- Flagged: sentence-initial `Please`, trailing `, please.`, `PLEASE`, a
blockquote, a list item, a heading.
- Not flagged: a code span containing `Please try again later`, a fenced
code block containing `Please install curl`, `pleasant`, `displeasing`.

Checks:

- `vale --output=line docs/` reports 0 `Coder.Please` findings.
- `go run ./scripts/styleclaims` passes.
- The pre-commit hooks pass on both commits (gen, `lint/go`, `lint/ts`,
markdown, emdash, style-claims, typos).
- `go test ./cli -run 'Test(CommandHelp|ServerYAML)'` and `go test
./enterprise/cli -run TestEnterpriseCommandHelp` pass with the updated
golden files.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*
2026-10-23 21:18:34 -07:00
Nick Vigilante c242029192 feat: make doc-check review docs quality, not only missing docs (#31193)
## Summary

Rebuilds the doc-check skill around one question: if this PR merged now,
would the docs on `main` explain the change correctly and clearly?
On #31159 the current skill stayed silent on real defects, because "a PR
that documents itself needs nothing more" ended the review before
anything checked the docs the PR added.

## Changes

- **doc-check skill:** a change model built from the code, eight focused
personas with a verifier, findings that must cite evidence or get
dropped, explicit blocking classes, a changed-lines rule for style,
design-friction notes, and a run trace on every run (`output.md`,
`personas/`).
- **Rules stay in `docs/.style/`:** each rule page lists its personas in
`review-personas` front matter, so the skill finds rules without
depending on file paths.
- **Style guide:** new rules for leading with the reader's surface and
for time-relative words, a clearer Latin abbreviations rule with Do and
Don't examples, and `as` in the one-meaning table. Coverage counts go
from 88 to 90.
- **Conflicting guidance fixed:** `.claude/docs/DOCS_STYLE_GUIDE.md` and
the old skill no longer recommend semicolons or "see".
- **write-docs and AGENTS.md:** authors run doc-check on their branch
before opening or updating a PR.
- **Workflow prompt:** asks for the full review, reads the skill from
the base branch, and runs persona sub-agents only on the configured
model.

Out of scope, tracked separately: commit statuses (DOCS-1407), the
replay harness (DOCS-923), `draft: true` (DOCS-1412), stable rule IDs
(DOCS-1413), and "native" wording (DOCS-1409).

## Testing

- `make lint/markdown`, `lint/emdash`, `lint/style-claims`,
`lint/docs-html`, `lint/docs-manifest`, `lint/actions` (actionlint and
zizmor), and Vale on the changed `docs/.style` files all pass.
- Read-only evaluation runs of the new skill, with nothing posted:

| Known issue on #31159 | Solstice-1 Local, v1 | Sonnet 5.5, v1 |
Solstice-1 Local, v2 |
|---|---|---|---|
| Personal and organization downloads lose the manual-only line | Filed
as pre-existing | Blocking | Blocking |
| New section contradicts the Project skills section | Missed | Missed |
Blocking |
| Section leads with the API field, not the UI switch | Blocking |
Blocking | Blocking |
| Quoted `"true"` is silently ignored | Filed as pre-existing |
Suggestion | Missed |
| Quoted key is stored unchanged, so the file can disagree | Blocking |
Blocking | Missed |
| Claim about other tools can't be checked | Suggestion | Suggestion |
Suggestion |
| PR description claim the code doesn't support | Trace | Trace | Trace
|
| False positives | 0 | 0 | 0 |

On #31164, a docs-metadata PR with nothing wrong, v2 reported a clean
result with no findings.
v2 fixes the v1 misses: the Continuity Editor reads the whole page
first, and gaps on paths the change didn't edit count as caused by the
change.
The coverage persona's example comes from #31159, so the v2 rerun on
that PR overstates the gain. The replay set in DOCS-923 is the real
test.

## Risks

- Eight personas on Solstice may exceed the workflow's 40-minute wait.
Watch the first runs after merge.
- Reviews now post inline comments as well as the summary comment, on
every PR that reaches the review.

<details>
<summary>Plan and decision log</summary>

# doc-check redesign: decisions so far

Status: design interview in progress. Nothing implemented.
Tracking: DOCS-918 (parent), DOCS-1407 (commit status), DOCS-925
(outcomes), DOCS-923 (replay), DOCS-926 (harvester), DOCS-1378 (blocking
slop), DOCS-597 (renderer class drift).

## First principle

If this PR merged now, would the docs on main correctly and clearly
explain this exact change?
The requirement runs both ways: every docs claim is grounded in the
code, and every behavior that materially changes how a customer uses the
product has docs.
"The PR documents itself" is never a reason to stop reviewing.

## Scope and audience

- One skill answers both "are docs needed" and "are the added docs
good".
- Every PR gets the same depth, including docs-only PRs.
- Findings are written for the PR author, and phrased so an authoring
agent can apply them.

## Priority and blocking

Order: accuracy, journey completeness, consistency, audience fit,
structure, concision, word choice and mechanics.

Blocking findings:

- Claims the code contradicts.
- Required docs that are missing for behavior the PR adds or changes.
- Rendering breaks and typos (deterministic checks first, LLM as
backup).
- Consistency and audience findings only when all three hold: the
finding cites a rule ID or a contradicting line, the verifier confirmed
it, and the PR added or edited the text.

Never blocking:

- Pure judgment calls without a citable rule. To make something
blockable, add a rule.
- Style issues on lines the PR did not touch.
- Design-friction notes (uncapped, own category, each tied to a docs
sentence, re-evaluated every round).
- Gaps that predate the PR: filed to Linear through the DOCS-926
harvester.
- Tutorial or lab needs: filed to TRAIN or DOCS through the harvester.

## Evidence and hallucination handling

- Every finding cites evidence: code location, other page and line, or
style rule ID. No evidence, no finding.
- Verifier persona re-checks every finding on every run.
- The summary lists checks the reviewer could not complete.
- `/doc-check wrong <finding-id> <reason>` logs a false finding to
Linear and adds the PR to the replay set.

## Output

- One PR review per round with as many inline comments as needed,
suggestion blocks for local fixes.
- Re-reviews comment only on changed lines and resolve fixed threads. A
clean round posts nothing new.
- Hidden machine-readable findings block (ID, file, line, rule ID,
blocking, fix) for agent fix loops.
- Every run leaves a trace in the commit status and job summary, even
with zero findings.

## Commit status and override (DOCS-1407)

- `docs` status on every commit, outcomes `finding`, `clean`, `error`,
`skipped`.
- An approving review from a `@coder/docs` member overrides to success.
- The override carries forward while later commits pass.
- A later failing commit re-requests review from the approver, then
`@coder/docs` after one business day. The engineer can still merge.
- Rollout: report-only for a few weeks, then required for accuracy and
missing docs once blocking false positives are at or under 5%, then for
rule-anchored consistency and audience.

## Personas

One orchestrator chat with sub-agents, each loading only its rule slice.
IDs match the job; display names are editorial titles.

| ID | Name | Job |
|---|---|---|
| `accuracy` | Fact Checker | Every docs claim is supported by the code
|
| `coverage` | Cartographer | Undocumented behavior, and docs for
nonexistent behavior |
| `learner` | Newcomer | Reads only post-merge docs, reports what it
learned, compared against a code-derived change summary |
| `consistency` | Continuity Editor | Terms and facts agree across and
within pages |
| `audience` | Reader Advocate | UI before API, reader task before
internals, page type fits |
| `structure` | Architect | Headings, procedures, prerequisites,
placement |
| `language` | Copy Editor | Word choice, sentence shape, mechanics
beyond Vale |
| `verifier` | Skeptic | Re-checks every finding's evidence |

Language and consistency can skip when the PR changes no prose.
The persona list grows as needed.

## Rules

- `docs/.style/` is the single human-readable rule source. Fix
conflicting text in `.claude/docs/DOCS_STYLE_GUIDE.md` and the doc-check
skill first (semicolons, unit spacing, "see").
- Each style-guide page lists `review-personas` in front matter. Each
rule heading carries a stable ID anchor. The bot resolves rules by ID
and front matter, never by path.
- Calibration answers that differ from the guide become style-guide PRs
before a persona relies on them, and the calibration sentences become
persona test cases.

## Ethos captured so far

- Test for implementation detail: keep it only if it changes what the
reader sees, types, or must do.
- UI label leads; the API field appears once as "In the API, ...";
frontmatter keys only where the reader types them.
- "Did I learn the thing this PR changes?" is the core reading test.
- Always block: typos, markup that breaks rendering, wrong claims,
unsupported compliance claims, multiple actions in one step (STE), "See
[link]" with non-descriptive link text, missing prerequisites,
inconsistent terms, user-facing implementation narrative, missing docs
for a flag that changes a user task.
- Suggest: "simply" (rewrite the step), passive voice (make the actor
the subject), long multi-condition sentences, semicolons, "now" (replace
with the condition that makes the action possible), `as` or `since` for
cause (use "because"), niche flags without guide coverage.
- Latin: never block. On a line that changes for another reason, suggest
"for example" in place of "e.g.". The accepted forms are `(e.g., ...)`
and `(for example, ...)`.

## Architecture

- `coder/coder` holds the Markdown: skill, personas, rules.
- Private `coder/doc-check` holds everything else as a hosted GitHub
App: orchestration, status, override, re-request, slash commands,
verdict parsing, replay harness, persona-to-model map.
- Authoring agents run the same skill locally before opening or updating
a PR (required in `AGENTS.md` and `write-docs`).
- Review chats are shared with `@coder/docs`, not the whole
organization.

## Models

- Live PRs: Solstice-1 with cloud fallback. Record whether fallback
happened on each run and why.
- Replay and calibration: Solstice-1 Local (no cloud fallback) so data
stays clean.
- Persona-to-model map in the bot repo. A persona moves to a different
local model only when replay scores show it is better for that persona.
- Opus only through `/doc-check model:opus` and in the manual replay.

## Replay set (DOCS-923)

- Run manually, never per commit.
- Contents: the 48-PR benchmark from #29194 if recoverable, #31159,
#31164, the large Vale PRs, confirmed `/doc-check wrong` reports, and
calibration cases.
- Reports Solstice and Opus scores side by side per persona.

## Calibration set 2 decisions

- Open PRs that would change a claim in this PR are scanned and named in
the summary. They never block.
- External claims (other products) never block. Suggest narrowing to
what was checked, linking vendor docs, or adding a product test that
fails if the claim breaks.
- New rule: when a docs claim depends on product behavior, recommend a
test in the product that fails if the claim stops being true.
- New page rule: block a page that is not in `docs/manifest/` unless its
front matter has `draft: true`, and block a page that is in the manifest
while its front matter has `draft: true`. No page on main uses `draft:
true` and the manifest tooling doesn't read it today, so the convention
needs defining first.
- Admin-only settings: block when they're documented only under
`docs/user-guides/`, and require that some page covers them.
- Stale screenshots: block when the image contradicts a step on the
page, otherwise harvest. Long term, generated screenshots replace hand
captures (P-DOCS-174, DOCS-1408).
- Inclusive wording: replace "non-native readers" in the style guide
with wording about readability and translation.

## Open

- Calibration set 2: items Nick didn't answer keep my bracketed guess.
- How `coder-agents-review-bot` is hosted, to model the doc-check
service on it.
- How to detect cloud fallback per chat (per-message model config or
provider metadata).
- Commit status versus check run.

## Overnight decisions (made without Nick; override any of these)

Each entry: the decision, why, and how to undo it.

### Linear

1. **DOCS-1409** "native" wording: separate issue in the Docs style
guide project, Medium, 2 points. Not fixed in the PR, because Nick asked
for a separate issue. The Latin rewrite drops one "non-native readers"
sentence only because that paragraph was rewritten anyway.
2. **DOCS-1412** `draft: true`: sub-issue of DOCS-918, Medium, 3 points.
Scoped as a deterministic check in `docsmanifestgen`, not an LLM rule,
because blocking rules should be deterministic.
3. **DOCS-1411** Pixel screenshots: in Automated screenshot capture
(P-DOCS-174), Medium, 5 points, related to DOCS-45 and DOCS-1408. Pixel
replaces the Playwright proof of concept for anything a Storybook story
renders; Playwright stays for flows that need a live deployment. The
project summary is unchanged.
4. **DOCS-1410** for this PR: sub-issue of DOCS-918, High, 5 points, In
Progress.
5. **DOCS-1413** stable rule IDs: deferred out of this PR, because IDs
for 90 rules plus a `styleclaims` check is its own reviewable change.

### PR scope

6. One PR for skills plus style guide, because the persona front matter
and the skill depend on each other. Out of scope: the hosted bot, commit
statuses, replay harness, slash commands, sharing chats with
`@coder/docs`.
7. Personas are files in `.claude/skills/doc-check/personas/` with the
agreed names.
8. `review-personas` front matter on `content-guidelines.md` and eight
style-guide pages, documented in `docs/.style/README.md`. Single-line
list form so a plain `grep` finds it. `editor-setup.md` and the READMEs
get none, because they hold no rules.
9. Mapping: content guidelines to accuracy, coverage, audience,
structure. Audience and scope to audience, learner, structure. Word
choice to language, consistency, accuracy. Procedural writing and
formatting to structure, language. Capitalization and punctuation to
language, structure. Accessibility and inclusion to language, structure,
audience. Voice and tone, and numbers, to language.
10. CI reads the skill from the base branch, so a PR can't rewrite its
own review. Author self-check reads it from the branch.
11. Sub-agents run only when the workflow passes a model config ID
(`vars.DOC_CHECK_MODEL_CONFIG_ID`), so a run never mixes models.
Otherwise personas run sequentially.
12. Posting: one `COMMENT` review with inline comments, plus the
existing sticky summary comment and marker, because the Slack notice and
re-review logic depend on the marker. Findings for agents go in a
collapsed YAML block in the summary.
13. The footer tells authors to reply in the thread when a finding is
wrong. `/doc-check wrong` isn't advertised, because it doesn't exist
yet.
14. The run trace is a YAML block at the end of the final chat message,
so DOCS-1407 can parse it into a commit status later.
15. Deterministic checks run first. A failing check on a changed line
blocks.
16. The 40-minute wait timeout is unchanged. Eight personas on Solstice
may run longer, so watch for timeouts after merge. Raising it is a
one-line change.

### Style guide content

17. Latin abbreviations: `(e.g., ...)` and `(for example, ...)` are both
accepted. The comma form is a Don't example but never blocks. Reviewers
suggest the English form only when the line changes for another reason.
`etc.` stays accepted in prose, because Ben's position was to accept
Latin abbreviations. Nick's personal "tables only" preference is not
encoded.
18. `as` row added to Choose words that have one meaning,
documentation-only, because `as` has too many correct uses for a Vale
word list.
19. New rule: Describe conditions, not moments in time (voice and tone).
`now` stays allowed for progress inside a sequenced tutorial, because
word choice already uses "Now that you added a language".
20. New rule: Lead with the surface the reader uses (audience and
scope), with the #31159 sentence as the Don't example. Tutorials that
mirror UI and CLI paths keep both.
21. Coverage counts updated from 88 to 90 rules. `make
lint/style-claims` verifies them.
22. Content guidelines: one paragraph under Programmatic content asking
for a product test when no test pins a documented behavior, which backs
the "recommend a test" rule.
23. `.claude/docs/DOCS_STYLE_GUIDE.md`: removed the semicolon
recommendation, "See" as a navigation verb (kept "See which
applications", which describes the UI), and a bare `150ms` threshold
(now in code font, matching the content guidelines).
24. write-docs: whole-path tracing, checking the PR description against
the code, naming the persona, leading with the reader's surface, running
doc-check before the PR, two anti-patterns, two checklist items, and a
fix for the stale "Premium pages carry the title suffix" item.
25. AGENTS.md: one workflow bullet requiring the doc-check self-check
before PRs that touch `docs/` or user-facing behavior.

### Evaluation

26. Eval set: #31159 (known defects) and #31164 (known clean).
Solstice-1 Local for tuned runs, Sonnet 5.5 as the comparison. PR heads
checked out read-only, nothing posted.
27. Changes after the first eval: both models missed the contradiction
between the new section and an older section of the same page, and
Solstice filed the download gap and the silently ignored quoted value as
`adjacent`. The Continuity Editor now reads the whole page first, "the
change caused it" includes paths the change didn't edit, and only class
4 findings need a style rule to block. Risk: the coverage example
mentions downloads, which comes from #31159, so the v2 rerun on #31159
overstates the improvement. The replay set (DOCS-923) is the real test.

</details>

> Generated by Coder Agents on behalf of @nickvigilante.
2026-10-23 17:16:36 +00:00
coder[bot]andNick Vigilante 78aa570078 feat(docs): enable Coder.CheckOut Vale rule (#31185)
> [!NOTE]
> Recreated from #30793 under coder[bot] by Superblink, at the request
of @nickvigilante, so he can review and merge it. An AI agent wrote the
original, which was opened from his account. The diff is identical to
#30793, squashed onto current `main`. Superblink reviewed it and ran
Vale over `docs/` before opening this PR (no new warnings or errors).
#30793 should be closed in favor of this one.
> Stack: based on #31184 (#31180 → #31181 → #31182 → #31183 → #31184 →
#31185). The diff matches #30793 except for the counters in
`docs/.style/style-guide/README.md`, which build on the PRs below this
one. `make lint/style-claims` passes at every level.

Builds on #30782, which is merged; the branch now merges `main`.

Adds `Coder.CheckOut`, a Vale rule that enforces [Refer to or visit, not
see or check
out](https://github.com/coder/coder/blob/main/docs/.style/style-guide/word-choice.md#refer-to-or-visit-not-see-or-check-out).
It flips only `Coder.CheckOut` in the footer; `Coder.SeeAlternatives`
stays planned.

- Flags "check out" and its inflections (`checks out`, `checked out`,
`checking out`) when used to point the reader at a page or site.
- Severity: `warning`. Scope: `docs/**` except
`docs/.style/style-guide/**`.
- Baseline: 11 findings in 10 pages, 0 after cleanup. One of them
(`docs/ai-coder/agent-firewall/index.md`) landed on `main` after the
branch was cut.
- Cleanup rewrites each to "refer to" (docs destinations) or "visit"
(external destinations).
- The Git sense is allowed and isn't flagged. Examples: "check out the
branch", `git checkout`, "a source checkout".
- Generated pages: no findings, so no `.vale.ini` change and no Go
source change.

Commits:

1. `docs(docs): refer to or visit instead of "check out"`
2. `feat(docs/.style): enable Coder.CheckOut Vale rule`

Linear: DOCS-1260

<details>
<summary>Decision log</summary>

- Vale's `existence` rule can't do this. RE2 has no lookahead, so the
rule can't say "check out, unless a Git object follows". A token that
includes the following words also fails: Vale can't locate a match that
spans link text (`check out [Dev Containers]` renders without the
bracket), and it silently drops the finding. Those link-follows cases
are the main true positives.
- The rule is therefore `extends: script` (Tengo, supported by the
pinned Vale 3.7.1) with `scope: text`. It finds each "check out" and
reports only those two words. It skips the match when one of the next 3
words is a Git object, or when "and" follows directly.
- Git objects skipped: branch, repo, repository, code, source, commit,
tag, PR, pull request, fork, clone, worktree, file, revision, ref,
master, main, trunk, submodule, sha, changes, release, version, folder,
directory, dotfiles. A hyphenated name such as `code-marketplace` isn't
a Git object.
- The one-word "checkout" is never flagged. In this corpus it's a Git
noun or command (`git checkout`, "source checkout") or the
`actions/checkout` action. The brief mentions "checkout" as a possible
verb, but I found no verb use, so I left it out rather than guess.
- `warning`, because the rule can't tell the senses apart from text
alone.

Test cases (fixtures under `/tmp/checkout-test/`, not committed), run
with LF and CRLF line endings:

- Flagged (8 each): link follows ("Check out [Dev Containers
integration]"), "check out our [module registry]", "check out
HashiCorp's [Getting Started Guides]", "Checking out the [Quickstart]",
"checked out" in a blockquote, "Checks out" in a list item, a heading
("Check out more"), a hard-wrapped "check out the\n[envbox docs]".
- Not flagged (0 each): "check out the branch", "the repository", "the
code", "a commit", "the tag", "the PR", "the pull request", "check out
and install a dotfiles repository", "source checkout", "Git checkout",
`git checkout main`, a `git checkout -b` fenced block, "Checkout
repository" in a list item, "the checkout action", "check outputs",
"check output".

Known gaps:

- False negative: a cross-reference that names a Git word right after
the verb, such as "check out our code samples".
- False positive risk: a Git sense with an object the list doesn't name.

Checks:

- `vale --output=line docs/` reports 0 `Coder.CheckOut` findings.
- `go run ./scripts/styleclaims` passes.
- The pre-commit-light hook passes on both commits.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*

Created on behalf of @nickvigilante

---------

Co-authored-by: Nick Vigilante <nick.vigilante@coder.com>
2026-10-23 16:44:35 +00:00
coder[bot]andNick Vigilante 635a1a8a5f feat(docs): enable Coder.ImperativeNegation Vale rule (#31184)
> [!NOTE]
> Recreated from #30784 under coder[bot] by Superblink, at the request
of @nickvigilante, so he can review and merge it. An AI agent wrote the
original, which was opened from his account. The diff is identical to
#30784, squashed onto current `main`. Superblink reviewed it and ran
Vale over `docs/` before opening this PR (no new warnings or errors).
#30784 should be closed in favor of this one.
> Stack: based on #31183 (#31180 → #31181 → #31182 → #31183 → #31184 →
#31185). The diff matches #30784 except for the counters in
`docs/.style/style-guide/README.md`, which build on the PRs below this
one. `make lint/style-claims` passes at every level.

Depends on #30782.

Adds `Coder.ImperativeNegation`, a Vale rule that flags `don't` where it
opens an imperative and suggests `do not`.
It enforces [Spell out negative
instructions](https://github.com/coder/coder/blob/main/docs/.style/style-guide/voice-and-tone.md#spell-out-negative-instructions).

- Severity: `warning`.
- Scope: `docs/**` except `docs/.style/style-guide/**`, which
demonstrates the violations on purpose.
- Baseline: 14 findings in 9 files.
  The cleanup commit fixes all of them, so the rule ships at zero.
I also fixed one imperative the rule can't see (`**Link to their docs**,
don't duplicate` in `content-guidelines.md`).
- Generated reference pages: no findings, so no exclusion.
- Known gap: an imperative after a bare comma goes unreported.
Declaratives such as `Headings are sentence case, don't lead` share that
shape.

Linear: DOCS-1262

<details><summary>Decision log</summary>

- Boundary pattern, not a verb list. The rule matches `don't` (straight
or curly apostrophe) only after a paragraph start (`\A`), a sentence
end, a colon, a semicolon, or `, and`.
- Comma case. A bare `, don't` produced false positives (`Headings are
sentence case, don't lead`, `events..., such as updates, don't reach
clients`).
The rule instead requires a comma that closes an opening
`If`/`When`/`Before`/`After`/`Unless`/`Once`/`While`/`Until` clause with
no other comma in it.
- `\A` instead of `^`. `^` also matches at a hard-wrapped line start,
which flagged `usually\ndon't.` in `managing-templates/index.md`.
- Bold lead-ins (`**Note:** Don't`) work because Vale strips markup
before matching. Code spans are skipped.
- Table cells and blockquotes are in scope. One table cell and three
blockquote or list lines needed cleanup.
- `Don't know where to start?` is an elliptical question, so it became
`Not sure where to start?`.
- Only `don't` is in scope. `can't` and `won't` are rarely imperative.
- Link uses the GitHub blob form that the existing rules use.
- Enable commit also updates the checks table, the coverage counts
(Voice and tone 0/4 to 1/3, total 9 to 10 tool-checked and 33 to 32
planned), and the "What the tooling checks" counts.

Tests (fixtures in `/tmp`, not committed), each run with LF and CRLF
files:

- Flagged: paragraph-initial `Don't`, `Run it. Don't`, `, and don't`,
curly `If..., don’t`, `; don't`, `**Note:** Don't`, `: don't`, list
item, table cell, blockquote.
- Not flagged: `You don't need`, `Tools that don't`, `Coder won't push`,
`Headings are sentence case, don't lead`, `If X is blocked, Coder
doesn't..., so events, such as updates, don't reach`, a hard-wrapped
line starting with `don't`, and `` `don't` `` in a code span.
- `vale --output=line docs/`: 0 `Coder.ImperativeNegation` findings
outside the style guide.
- `go run ./scripts/styleclaims`, `make lint/emdash`, and the pre-commit
hook (markdown, typos, style-claims) pass.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*

Created on behalf of @nickvigilante

Co-authored-by: Nick Vigilante <nick.vigilante@coder.com>
2026-10-23 16:36:44 +00:00
coder[bot]andNick Vigilante ffc2a3ffff feat: enable Coder.InclusiveLanguage Vale rule (#31183)
> [!NOTE]
> Recreated from #30785 under coder[bot] by Superblink, at the request
of @nickvigilante, so he can review and merge it. An AI agent wrote the
original, which was opened from his account. The diff is identical to
#30785, squashed onto current `main`. Superblink reviewed it and ran
Vale over `docs/` before opening this PR (no new warnings or errors).
#30785 should be closed in favor of this one.
> Stack: based on #31182 (#31180 → #31181 → #31182 → #31183 → #31184 →
#31185). The diff matches #30785 except for the counters in
`docs/.style/style-guide/README.md`, which build on the PRs below this
one. `make lint/style-claims` passes at every level.

Depends on #30782.

Adds `Coder.InclusiveLanguage`, a Vale substitution rule that enforces
the [Inclusive-language
substitutions](https://github.com/coder/coder/blob/main/docs/.style/style-guide/accessibility-and-inclusion.md#inclusive-language-substitutions)
table.

- Flags `whitelist`, `blacklist`, `slave`, `master branch`, `master
controller`, `dummy`, `sanity check` and `sanity test`, and
`grandfathered` and its inflections, with the guide's replacement terms.
  It also flags inflections such as `whitelisted` and `slaves`.
- Severity: `warning`.
- Scope: `docs/**` except `docs/.style/style-guide/**` and
`docs/reference/cli/agent-firewall.md`.
- Baseline: 2 findings, both `dummy`.
- `docs/ai-coder/agent-firewall/index.md`: fixed in the cleanup commit
(now "mock DNS server", with the bullet reflowed to one sentence per
line).
  - `docs/reference/cli/agent-firewall.md`: generated page.
The text comes from the `github.com/coder/boundary` dependency's flag
description, so it can't be fixed in this repo.
`.vale.ini` turns the rule off for that page, with a comment, and the PR
changes no generated output.
- After cleanup: 0 findings.
- The PR flips the guide footer to enforced, adds the checks-table row,
updates the coverage counts (10 tool-checked, 32 planned) and the
tooling paragraph, and removes "Inclusive-language substitutions" from
the planned list in `docs/.style/styles/Coder/README.md`.

Linear: DOCS-182

<details><summary>Decision log</summary>

- Bare `master` isn't flagged, as the guide footer says. Only `master
branch` and `master controller`, the two senses in the guide table, are.
- Replacement wording follows the guide table, not the issue text:
`slave` becomes "replica, secondary", `sanity check` becomes "smoke
testing, confidence testing, acceptance testing", and `grandfathered`
becomes "legacy, pre-existing, exempt". `blacklist` suggests "blocklist,
denylist" and `dummy` suggests "placeholder, sample, mock".
- Bare `grandfather` isn't flagged, only `grandfather` with an
inflection or `clause`. A `grandfather clock` or a family member would
otherwise match, and a substitution rule's exceptions can't see the
following word.
- `white-list` and `white list` forms are covered, along with `-ed` and
`-ing` forms for white and blacklist.
- Vale skips code spans and fences, so `master` branch names and `dummy`
flags in code font are untouched.
- Test fixtures (not committed), LF and CRLF, gave identical results:
  - Flags: every term above and its inflections.
- Doesn't flag: `master key`, bare `master`, `mastering`, `grandfather
clock`, `sanity` alone, all terms inside code spans and fences, and
every recommended replacement.
- Checks: `vale docs/` reports 0 `Coder.InclusiveLanguage` findings, `go
run ./scripts/styleclaims` passes, and the pre-commit-light hook passes
on both commits.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*

Created on behalf of @nickvigilante

Co-authored-by: Nick Vigilante <nick.vigilante@coder.com>
2026-10-23 16:26:34 +00:00
coder[bot]andNick Vigilante b59fea22d1 feat: enable Coder.AmbiguousWords Vale rule (#31182)
> [!NOTE]
> Recreated from #30792 under coder[bot] by Superblink, at the request
of @nickvigilante, so he can review and merge it. An AI agent wrote the
original, which was opened from his account. The diff is identical to
#30792, squashed onto current `main`. Superblink reviewed it and ran
Vale over `docs/` before opening this PR (no new warnings or errors).
#30792 should be closed in favor of this one.
> Stack: based on #31181 (#31180 → #31181 → #31182 → #31183 → #31184 →
#31185). The diff matches #30792 except for the counters in
`docs/.style/style-guide/README.md`, which build on the PRs below this
one. `make lint/style-claims` passes at every level.
> Vale run on current `main`: this rule adds about 655
`suggestion`-level alerts across `docs/`. That matches its documented
`suggestion` severity, and `make lint/prose` never fails on them.

Builds on #30782, which is merged; the branch now merges `main`.

Adds `Coder.AmbiguousWords` at `suggestion` severity.
The rule flags the `ensure` family, `should`, `since`, and `may`, and
suggests the one-meaning replacement from the guide: `make sure`, `must`
or a recommendation, `might` or `can`, and `because` or `after`.
It covers `docs/**` except `docs/.style/style-guide/**` and the
generated `docs/reference/{api,cli}/*.md` pages.

Baseline: 655 findings on current `main`, no cleanup commit.
At branch creation it was 663: 128 `ensure`, 19 `ensures`, 13
`ensuring`, 174 `should`, 58 `since`, and 271 `may`.
The rule ships as a suggestion with its backlog, as
`docs/.style/README.md` allows.
DOCS-1283 tracks the cleanup and the promotion to `warning`.

Known false positives: `since` and `should` can be correct in context,
such as `since` for time ("since version 2.20") and a `should` that
states an expectation.
The rule can't tell, so it stays a suggestion.

Linear: DOCS-1263

<details>
<summary>Decision log</summary>

- **Rule type**: `substitution` with one swap per word form, so the
message names the replacement.
Replacements follow the guide's table: `make sure`, `must, recommend`,
`might, can`, `because, after`.
- **Case**: `ignorecase: false`, with `[Ee]nsure` and `[Ss]hould`
classes, so lowercase `may` and the month `May` stay distinct.
- **`May`**: the pattern `\bMay\b(?!,?\s+\d)` skips the month when a
digit follows ("May 5, 2026", "May 2026", "May, 2026").
Vale compiles lookaheads with a backtracking engine, so the pattern
works.
The sentence-initial `May` in a list item ("May include minor bugs") is
flagged, which is correct.
- **Generated pages**: `.vale.ini` excludes
`docs/reference/{api,cli}/*.md`, as `Coder.UnitSpacing` does.
Those pages hold 168 more findings that come from Go comments and CLI
flag text.
  With the exclusion the baseline is 663, close to the 664 expected.
- **Footer and table**: the section footer names `Coder.AmbiguousWords`
at `suggestion` severity.
The checks table gets a row, and the counts move word choice from 2 to 3
tool-checked.
The formatter widened the Severity column because `suggestion` is longer
than `warning`.

Test cases, run with `vale --config` against fixtures that are not
committed, in LF and CRLF with identical results:

- Positive: `Ensure`, `ensures`, `ensured`, `ensuring`, `should`,
`Since`, lowercase `may`, and `May` in "May the build fail", "Then May
is risky", and "May happen".
- Negative: "May 5, 2026", "May 2026", "May, 2026", "May 12", `maybe`,
`mayor`, `shoulder`, `sincere`, and the same words inside code spans.
- A plain `since` in prose is flagged, as intended.

Checks: `make lint/style-claims` passes, the pre-commit hooks pass, and
`vale --output=line docs/` reports 663 `Coder.AmbiguousWords` findings
and no new findings from other rules.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*

Created on behalf of @nickvigilante

---------

Co-authored-by: Nick Vigilante <nick.vigilante@coder.com>
2026-10-23 16:16:06 +00:00
coder[bot]andNick Vigilante f2edbeaf60 feat: enable Coder.LGBTQ Vale rule (#31181)
> [!NOTE]
> Recreated from #30786 under coder[bot] by Superblink, at the request
of @nickvigilante, so he can review and merge it. An AI agent wrote the
original, which was opened from his account. The diff is identical to
#30786, squashed onto current `main`. Superblink reviewed it and ran
Vale over `docs/` before opening this PR (no new warnings or errors).
#30786 should be closed in favor of this one.
> Stack: based on #31180 (#31180 → #31181 → #31182 → #31183 → #31184 →
#31185). The diff matches #30786 except for the counters in
`docs/.style/style-guide/README.md`, which build on the PRs below this
one. `make lint/style-claims` passes at every level.

Depends on #30782.

Adds `Coder.LGBTQ`, a Vale substitution rule that enforces [Inclusive
LGBTQ
terms](https://github.com/coder/coder/blob/main/docs/.style/style-guide/accessibility-and-inclusion.md#inclusive-lgbtq-terms).
It flags outdated terms for sex, gender, and sexual orientation, and
suggests the current term.

- Severity: `warning`.
- Scope: `docs/**` except `docs/.style/style-guide/**`, with no other
exclusions.
- Baseline: 0 findings, including generated pages, so no cleanup commit.
- Adapted from the [alex](https://github.com/errata-ai/alex) `LGBTQ.yml`
list.
alex is MIT licensed (Copyright (c) 2020 errata.ai), and the YAML header
carries the attribution and a list of changes.
- The rule covers every row of the guide table, and none of the guide's
recommended terms trigger it.
- The PR flips the guide footer to enforced, adds the checks-table row,
and updates the coverage counts (10 tool-checked, 32 planned) and the
tooling paragraph.

Linear: DOCS-431

<details><summary>Decision log</summary>

- Upstream verified at `errata-ai/alex` `alex/LGBTQ.yml`, MIT license.
`/tmp` draft matched upstream.
- Removed `bi`, because it flags "Power BI".
- Removed `special rights`, because permissions docs could use it as a
plain technical phrase.
- Removed `homo`, because it flags "Homo sapiens".
- Added `a transgender` from the guide table.
It matches only when followed by `is`, `was`, `who`, `and`, `or`, `but`,
`that`, `has`, `had`, `can`, `will`, `would`, or `should`, so `a
transgender person` and `a transgender woman` stay clean.
A noun use followed by punctuation (`Ask a transgender.`) isn't caught.
- `preferred pronouns`, `transgendered`, `gender pronouns`,
`biologically female`, `born a man`, `genetically male`, and
`hermaphrodite` come from upstream.
- `homosexual` is flagged in any use, as upstream does, which is
stricter than the guide's "as a noun".
- Upstream's `|` separator in suggestions became ", ", the form the
other Coder substitution rules use.
- Test fixtures (not committed), LF and CRLF, gave identical results:
- Flags: every guide Don't term, plus the `homosexual` compounds,
`sexual preference`, `sex change`, `bathroom bill`, `transgenders`.
- Doesn't flag: `Power BI`, `bi-directional`, `bi-weekly`,
`homogeneous`, `special rights`, the guide's Do terms, `a transgender
person`, `a transgender woman`, and terms inside code spans and fences.
- Checks: `vale docs/` reports 0 `Coder.LGBTQ` findings, `go run
./scripts/styleclaims` passes, and the pre-commit-light hook passes.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*

Created on behalf of @nickvigilante

Co-authored-by: Nick Vigilante <nick.vigilante@coder.com>
2026-10-23 16:08:14 +00:00
coder[bot]andNick Vigilante bf0c7a5e6a docs(docs/get-started/customize-your-template): call the languages parameter a multi-select (#31179)
> [!NOTE]
> Recreated from #31133 under coder[bot] by Superblink, at the request
of @nickvigilante, so he can review and merge it. An AI agent wrote the
original, which was opened from his account. The diff is identical to
#31133, squashed onto current `main`. Superblink reviewed it and ran
Vale over `docs/` before opening this PR (no new warnings or errors).
#31133 should be closed in favor of this one.

## Summary

Follow-up to #30873.
The **Programming Languages** parameter in the Quickstart template uses
`form_type = "multi-select"`, and the screenshot alt text from #30873
already says so.
The lead-in sentence and the two captions on `add-a-language.md` still
called it a dropdown, so the alt text and captions disagreed.

## Changes

- "dropdown parameter" becomes "multi-select parameter" in one sentence
and two captions.
- The preset captions stay as they are, because presets are a real
dropdown.

## Testing

- `markdownlint-cli2` on the changed file: 0 issues.

---

🤖 Generated by Coder Agents on behalf of @nickvigilante.

Created on behalf of @nickvigilante

Co-authored-by: Nick Vigilante <nick.vigilante@coder.com>
2026-10-23 08:57:12 -07:00
coder[bot]andNick Vigilante c1bec1b3e4 feat: enable Coder.AcronymPeriods Vale rule (#31180)
> [!NOTE]
> Recreated from #30783 under coder[bot] by Superblink, at the request
of @nickvigilante, so he can review and merge it. An AI agent wrote the
original, which was opened from his account. The diff is identical to
#30783, squashed onto current `main`. Superblink reviewed it and ran
Vale over `docs/` before opening this PR (no new warnings or errors).
#30783 should be closed in favor of this one.
> Stack: this is the bottom of a 6-PR stack (#31180 → #31181 → #31182 →
#31183 → #31184 → #31185). Merge them in that order.

Depends on #30782.

Adds `Coder.AcronymPeriods`, a Vale rule that enforces [No periods in
acronyms](https://github.com/coder/coder/blob/main/docs/.style/style-guide/capitalization-and-punctuation.md#no-periods-in-acronyms).
It flags capitalized acronyms written with periods, such as `A.P.I.` or
`U.S.`.

- Severity: `warning`.
- Scope: `docs/**` except `docs/.style/style-guide/**`, with no other
exclusions.
- Baseline: 0 findings, including the generated
`docs/reference/{api,cli,agent-api}` pages, so no cleanup commit.
- The PR flips the guide footer to enforced, adds the checks-table row,
and updates the coverage counts (10 tool-checked, 32 planned) and the
tooling paragraph (10 of 87).
- Known limitation: a version placeholder such as X.Y.Z in plain prose
matches as "X.Y.". None exist outside code font today, and the guide
asks for code font on placeholders, which Vale skips.

Linear: DOCS-430

<details><summary>Decision log</summary>

- Pattern `\b(?:[A-Z]\.){2,}`. Google.Periods used `{3,}`, but `U.S.` is
a two-letter case the guide's Don't example names, so the rule requires
two or more pairs.
- Google rules aren't loaded, so nothing needed turning off.
- `e.g.` and `i.e.` can't match: the rule is case-sensitive and accepts
capital letters only. A single initial such as `J. Smith` can't match
either.
- Existence rule, `nonword: true`, `ignorecase: false`, same shape as
`UnitSpacing`.
- Test fixtures (not committed) with both LF and CRLF endings:
- Flags: `A.P.I.`, `U.S.`, `E.U.`, and `X.Y.Z` in prose (reported as
`X.Y.`).
- Doesn't flag: `API`, `US`, `e.g.`, `i.e.`, `etc.`, `J. Smith`, `a.m.`,
`p.m.`, code spans, fenced code.
  - LF and CRLF reported identical findings.
- Checks: `vale docs/` reports 0 `Coder.AcronymPeriods` findings, `go
run ./scripts/styleclaims` passes, and the pre-commit-light hook
(markdownlint, emdash, style-claims) passes.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*

Created on behalf of @nickvigilante

Co-authored-by: Nick Vigilante <nick.vigilante@coder.com>
2026-10-23 08:56:25 -07:00
63f3bde725 feat: show project skill actions above project chat composers (#30884)
Exposes the two project skill settings from #30882 and adds project
actions above project chat composers.

- The project skill editor gets two switches, "Show as action" and
"Agents can use it automatically". New skills start with actions off and
automatic use on, importing a SKILL.md with `disable-model-invocation:
true` starts automatic use off, and a settings-only change saves without
rewriting SKILL.md. The skills list shows "Action" and "Manual only"
badges.
- A new `ProjectSkillActions` bar shows enabled action skills sorted by
name: up to three buttons (description as tooltip), the rest under
"More". Clicking one inserts that skill's chip into the composer through
`insertSkill`; it doesn't start a chat, and a chip that's already there
isn't duplicated. It renders nothing while loading, on error, or with no
actions.
- The bar appears above the project page's new-chat composer and above
the composer of ongoing project chats (subagents use the root chat's
project). It's hidden when the composer is read-only and behind the
`chat-projects` experiment. The list refetches when the window regains
focus and after a send fails because a skill is no longer available.
- The extending agents docs describe both settings.

Dogfood UAT passed: three buttons plus More on the project page and in
ongoing chats, chips inserted without creating a chat, the agent
answering from action-invoked skills (including a manual-only skill that
`read_skill` can't load), the bar updating after settings changes and
after a deleted skill's send failed, settings-only saves leaving
SKILL.md unchanged, and no bar outside projects.

| Project page actions with More open | Action chip in an ongoing chat |
| --- | --- |
| <img alt="Project page composer with three action buttons and More
open"
src="https://raw.githubusercontent.com/coder/coder/assets/pr-30884-project-actions/pr/project-page-actions.png"
width="600" /> | <img alt="Ongoing project chat with an action chip
inserted"
src="https://raw.githubusercontent.com/coder/coder/assets/pr-30884-project-actions/pr/chat-actions.png"
width="600" /> |

| Editor switches | List badges |
| --- | --- |
| <img alt="Project skill editor with the two switches"
src="https://raw.githubusercontent.com/coder/coder/assets/pr-30884-project-actions/pr/editor-switches.png"
width="600" /> | <img alt="Project skills list with Action and Manual
only badges"
src="https://raw.githubusercontent.com/coder/coder/assets/pr-30884-project-actions/pr/list-badges.png"
width="600" /> |

Stack (merge top to bottom):
- #30826
- #30827
- #30838
- #30840
- #30854
- #30855
- #30856
- #30861
- #30880
- #30881
- #30882
- #30884 👈
- #31122
- #31126

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Nick Vigilante <nickvigilante@users.noreply.github.com>
2026-10-23 19:53:08 +07:00
c4d76a4009 feat: add skill action and automatic-use settings (#30882)
Adds two per-skill settings that the project skills UI will expose next:

- `action` marks a project skill to show as an action button above
project chat composers. A `skills_action_project_only` check keeps it to
project skills; the personal and organization routes reject `action`
with 400.
- `model_invocable` (default true, every stored source) controls
automatic use. When it's false the skill is left out of
`<available-skills>` and `read_skill` reports it as not found, but a
structured skill invocation (a chip from the `/` menu or an action)
still loads it, as long as the skill is enabled and the chat owner can
read it. Workspace skills always count as model-invocable.

Migration 000625 adds both columns with defaults, so existing skills
keep today's behavior. The list, get, insert and update queries,
`codersdk.SkillMetadata` and the create/update requests carry both
fields, and the audit table tracks them.
`coderd/x/chatd/ARCHITECTURE.md` gets TODO notes for the author.

**NOTE**: the migration adds two columns with constant defaults and a
CHECK constraint to `skills`.

Stack (merge top to bottom):
- #30826
- #30827
- #30838
- #30840
- #30854
- #30855
- #30856
- #30861
- #30880
- #30881
- #30882 👈
- #30884
- #31122
- #31126

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Nick Vigilante <nickvigilante@users.noreply.github.com>
2026-10-23 19:32:08 +07:00
coder[bot] 6205471472 docs(docs/user-guides): clarify who confirms bulk workspace actions (#31178) 2026-10-23 02:02:49 -07:00
Ethan 9b8d880d63 fix: exempt service accounts from user dormancy (#30824)
Closes CODAGT-1344

The Slack bot for Coder Agents (CODAGT-1098) runs inside coderd and acts
as a service account that an admin picks. It creates chats and sends
messages as that account through Go calls, not HTTP requests. Two
dormancy rules break it:

1. **New service accounts start dormant.** The CLI and the web "Create
user" page send no status, and `InsertUser` falls back to `dormant`. So
the bot's account is dormant from the start.
2. **Accounts go dormant after 90 days without a "last seen" update.**
Only the API key middleware updates `last_seen_at`, and only on HTTP
requests. The bot never sends any, so its account goes dormant on day
90, even if people use the bot every day.

A chat owner must be active, so once the bot's account is dormant, every
Slack mention fails. Any other in-process integration that acts as a
service account has the same problem.

Dormancy does nothing useful for service accounts:

- It exists to free license seats, and service accounts never take a
license seat (#24401, #27279).
- It isn't a lock. Any API request activates a dormant account again.
- System users already skip the dormancy job for the same reason.

So this PR:

- creates service accounts as active when the request doesn't set a
status,
- rejects an explicit dormant status for a service account with a 400,
- skips service accounts in the dormancy job, the same way it already
skips system users.

Side effects: a service account that nobody uses for 90 days now stays
active. That has no effect on license seats. If the account has ever
sent traffic through AI Gateway, it also keeps its AI Governance seat
until an admin suspends or deletes it. That matters less than it sounds:
AI Governance is now included with Premium rather than sold per seat
(#27545), so the seat only counts on a license that still has an AI
Governance seat limit, and there it only feeds the seat-limit warning.
The dormancy job also no longer writes "marked dormant" audit entries
for service accounts.

I've left existing dormant service accounts alone rather than adding a
migration. An admin can activate one, and any API request from it
activates it too.

---

_This PR description was written by Coder Agents._
2026-10-23 12:53:40 +11:00
Atif Ali b1f5f0b4c1 docs: remove beta label from JetBrains Toolbox (#31164)
Removes the `beta` state from the JetBrains Toolbox page in the docs
sidebar.

- `docs/manifest/user-guides/workspace-access/jetbrains.yml`: drop
`state: [beta]`
- `docs/manifest.json`: matching change (`docsmanifestgen check` passes)

The Gateway page already recommends Toolbox over Gateway, so Toolbox
shouldn't still be labeled beta.
2026-10-22 15:30:08 +05:00
Jaayden HalkoandCursor ffd24861a1 feat: send skill invocations as structured message parts (#30861)
Adds a structured `skill-invocation` chat part so a user message can
carry an explicit skill. chatd loads that exact skill when the message
is sent and puts its body into the user's prompt, so the skill always
applies instead of relying on the model to notice it in
`<available-skills>`. The composer chip that sends these parts comes in
the next PR.

- codersdk: a `skill-invocation` input part and message part with
`skill_source` (`personal`, `org`, `project`, `workspace`) and
`skill_name`. The resolved body is stored on the part as internal
`skill_body`; it's hidden from TypeScript and stripped from every API
response.
- coderd rejects an unknown source or an invalid name with 400.
- chatd resolves each invocation on create, send and edit with the chat
owner's permissions, through the same loaders as `read_skill`: stored
skills by source and name (project skills through the chat's project,
with the root chat fallback for subagents) and workspace skills from the
pinned context snapshot. The body is saved at send time so past turns
show what the model received. A missing, disabled or unreadable skill
rejects the send with 400 "Skill project/triage is not available."
- The prompt renders a line saying the user invoked the skill, followed
by `<invoked-skill name="project/triage">` with the sanitized body.
Titles and hook prompt text show the invocation as `/project/triage`.
- The site only gets no-op cases so the regenerated types compile.
`coderd/x/chatd/ARCHITECTURE.md` gets a TODO for the author.

Stack (merge top to bottom):
- #30826
- #30827
- #30838
- #30840
- #30854
- #30855
- #30856
- #30861 👈
- #30880
- #30881
- #30882
- #30884
- #31122
- #31126

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-22 11:04:09 +07:00
Nick Vigilante 6e51c66a97 docs: give every table header cell text and fail lint on empty ones (#30879)
## Summary

axe reports `empty-table-header` on 116 generated CLI reference pages
and several hand-written pages: a header cell with no text is announced
by screen readers as an unnamed column. This PR gives every table header
cell in `docs/` text, and adds a lint check so empty header cells can't
come back.

## How to review this PR

- `docs/reference/cli/`: 116 files, these all generate identically, so I
would only spot check 2-3 of them and skip the rest
- `docs/*` outside of `docs/reference/cli/`: 6 files, normal review of
these
- `scripts`: 5 files, code review of the Bash and Go files to make sure
we're properly inserting headers into each table

## What changed

**Generator.** `scripts/clidocgen` wrote an empty header row (`| | |`)
over each option's metadata table (Type, Environment, YAML, Default). It
now writes `| Property | Value |`. Subcommand tables already had `Name |
Purpose` and are unchanged. Regenerated with `make
docs/reference/cli/index.md`: 116 files under `docs/reference/cli/`
change. The header rows change, and the body rows of each option table
are re-padded to the wider first column; the content is otherwise
identical. Every option on those 116 pages now shows a visible `Property
| Value` header row above Type, Environment, YAML, and Default, so this
is a visual change on the docs site as well as a screen reader one. The
CLI's own `--help` output doesn't use this template, so it's unchanged.

**Audit logs.** `docs/admin/security/audit-logs.md` already has `Field |
Tracked` headers on `main` (the generator writes them), so there was
nothing to change there; the live-site finding predates that.

**Hand-written tables.**
- `docs/admin/networking/port-forwarding.md`: the CORS matrix had three
empty spanning corner cells. The corner now reads `From user` and `From
workspace` (spanning the three row-header columns, beside the Alice/Bob
and Workspace rows) and `To user`, `To workspace`, `To app` (over the
three row-header columns). The grid is still 3 header rows by 7 columns.
The From cells have `scope="row"` and the other header-row cells
`scope="col"`, so the From labels don't become column headers for the
body's label columns; the body's user, workspace, and app labels are
`<th scope="row">`; and a `<caption>` says columns are the origin and
rows the destination.
- `groups-roles.md`, `airgap.md`, `scale-testing.md`,
`workspace-tags.md`: these four corner cells are already filled by
#30873. The new check would fail CI without them, so this PR carries the
same four lines, byte-identical to #30873 (`Permission`, `Component`,
`Scenario`, `Input`), so whichever PR merges second rebases without
conflict. If #30873 merges first, these hunks drop out.

**New check.** `scripts/docshtmlcheck` (`make lint/docs-html`, part of
`make lint`) now also reports `empty-table-header`. I put it there
because that checker already parses every Markdown file under `docs/`,
generated pages included, with goldmark and tokenizes raw HTML with
`golang.org/x/net/html`, and it already runs in CI. A markdownlint
custom rule would have needed a new JS rule and HTML parsing there.
- Markdown pipe tables: the header row, via goldmark's GFM table
extension.
- Raw HTML tables: every `<th>`, tracked across HTML blocks, with
entities decoded and whitespace trimmed, so `<th></th>`,
`<th>&nbsp;</th>`, and `<th><br></th>` are all reported. Markdown
between the HTML blocks of an open `<th>` counts as its text. Tables in
code blocks are ignored.
- Output: `docs/x.md:29: empty-table-header: header cell 1 has no text
(table's first header "Auditor")`, plus a summary footer.
- The tokenizer loop moved out of `scanNode` into a shared
`tokenizeSegments` helper so both checks use it; `scanNode`'s behavior
is unchanged.
- The style guide's checks table gets one row; the README for the
checker describes the rule.

## Testing

- Tests first: `TestCheckTables` (now 22 cases) and
`TestRunEmptyTableHeader` failed against a stub, then pass. The existing
`docshtmlcheck` tests pass unchanged.
- `go run ./scripts/docshtmlcheck` on `main` reports 1,561 empty header
cells (116 CLI pages, port-forwarding, and the four #30873 tables); on
this branch it reports none.
- `go test ./scripts/docshtmlcheck/ ./scripts/clidocgen/
./scripts/docgenenv/`, golangci-lint on the changed packages, `make
lint/docs-html lint/docs-manifest lint/docs-gen-filter lint/emdash`,
`pnpm run check-docs`, and Vale on the changed hand-written pages all
pass.
- `make gen` couldn't run to completion locally (no `protoc-gen-go`);
CI's gen check covers it. The CLI pages were regenerated with the repo's
own target.

Review feedback applied in cfd29a2160 (entities decoded in Markdown
text, image alt text and autolinks count as text), 709a58f603 (per-kind
counts, finding order, CLI generator note), 8e61ff3afa (CORS matrix
scopes and caption), and b807bcbbc7 and 2871f89bdf (style guide rule
section, `make lint/docs-html` in the checks table, coverage counts).

Linear: DOCS-1308

---

🤖 Built with AI assistance.
2026-10-21 10:58:04 -07:00
Denis AfonsoandClaude Fable 5.1 360e2ffb31 docs: point the ESR paragraph at v2.34.13 (#31070)
Follow-up to #31034, which was merged before this one-line fix was
pushed to its branch. The Extended Support Release paragraph still
linked v2.34.12 while the calendar row on the same page now says
v2.34.13. Flagged by the documentation check on #31035, where the same
fix is already included.

Part of ENT-219

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-21 10:42:47 -07:00
Nick Vigilante fda1ed5dcd docs: give screenshots their own alt text and fill empty table headers (#30873)
## Summary

An axe sweep of every page on https://coder.com/beta-docs
(coder/docs-engine#224) found two content-side problems. Nine
screenshots have alt text identical to the italic caption right after
them, so screen readers read the same words twice (axe
`image-redundant-alt`). Four hand-written tables have an empty top-left
header cell, which leaves their row-label column without a name (axe
`empty-table-header`). This fixes both. These are content fixes on
`main` only; earlier release lines keep the old text.

## Findings

| Rule | Pages | Cause | Fixed where |
| --- | --- | --- | --- |
| image-redundant-alt | 4 | Alt text repeats the caption | This PR |
| empty-table-header | 4 hand-written | Empty corner header cell | This
PR |
| empty-table-header | 105 CLI reference pages, `audit-logs.md` |
Generated tables with empty headers | Not here: needs a generator change
|
| empty-table-header | `admin/networking/port-forwarding.md` | Spanning
corner cells in a raw HTML matrix | Not here: needs a rework of that
table |
| heading-order | `remote-desktops.md` | `<div class="tab">` typo |
Separate PR |
| link-name, scrollable-region-focusable, aria-valid-attr-value, label |
many | Engine | coder/docs-engine #220, #217, #224 |

## Fix

Each of the nine screenshots gets alt text that describes what it shows
(for example, "Preset dropdown with Ruby Development added between Full
Stack and Web Development"), and keeps its caption. The corner cells
become "Permission" (Groups and roles), "Component" (air-gapped
comparison), "Scenario" (scale-testing workloads) and "Input" (workspace
tags). Tables were re-padded with `markdown-table-formatter`.

## QA

1. Open each production page below. Expected: the screenshots and tables
look the same as before, except the four tables now show a word in their
top-left header cell.
2. In Chrome DevTools (Elements) or Firefox's Inspector, select a
screenshot on the Add a language page. Expected: its `alt` differs from
the italic caption under it.

## Pages to compare

| What to check | Production | Preview |
| --- | --- | --- |
| Screenshot alt text vs caption |
https://coder.com/beta-docs/@main/get-started/customize-your-template/add-a-language/
| This PR's GitHub preview:
https://github.com/coder/coder/blob/vigilante/docs-a11y-fixes/docs/get-started/customize-your-template/add-a-language.md
|
| Roles table corner cell |
https://coder.com/beta-docs/@main/admin/users/groups-roles/ |
https://github.com/coder/coder/blob/vigilante/docs-a11y-fixes/docs/admin/users/groups-roles.md
|
| Scale-testing table corner cell |
https://coder.com/beta-docs/@main/install/validate/scale-testing/ |
https://github.com/coder/coder/blob/vigilante/docs-a11y-fixes/docs/install/validate/scale-testing.md
|

## Testing

`markdownlint-cli2` and `markdown-table-formatter` over the eight
changed files: 0 errors. Re-running the sweep after merge should drop
`image-redundant-alt` and the four tables' `empty-table-header` findings
from `@main`.

## Upstream

No: these are Coder content fixes, not Fumadocs bugs.

Linear: [DOCS-1303](https://linear.app/coder/issue/DOCS-1303)

---

🤖 Built with AI assistance.
2026-10-21 10:28:45 -07:00
Jaayden HalkoandCursor 7253bd127b feat: manage project skills from the project page (#30856)
Adds a "Skills" row to the project page Details panel. It shows "None"
or the skill count (noting disabled skills) and opens the project skills
dialog from #30855. Editing follows the project's `permissions.update`,
the same flag that gates the instructions editor. The server computes it
with the project's sharing ACL, so an `admin` sharee can edit skills,
and users who can only read the project get the read-only dialog. Focus
returns to the row when the dialog closes. The extending agents docs now
point at the project page for managing project skills.

Dogfood UAT on this stack passed: creating, editing, importing,
downloading, turning off and deleting skills from the dialog; Save stays
disabled until the form is valid; a duplicate name shows the 409 in the
dialog; new skills show up in the project page `/` menu without a
reload. The read-only dialog was checked with a stubbed projects list,
before project sharing (#30439) landed.

| Editor | List after saving |
| --- | --- |
| <img alt="New project skill editor"
src="https://raw.githubusercontent.com/coder/coder/assets/pr-30856-project-skills/pr/skill-editor.png"
width="600" /> | <img alt="Project skills list after saving"
src="https://raw.githubusercontent.com/coder/coder/assets/pr-30856-project-skills/pr/skill-list.png"
width="600" /> |

Stack (merge top to bottom):
- #30826
- #30827
- #30838
- #30840
- #30854
- #30855
- #30856 👈
- #30861
- #30880
- #30881
- #30882
- #30884
- #31122

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-21 22:06:21 +07:00
Hugo Dutka c61d842b9c feat: show available ACP harnesses in chat context (#31059)
Expose discovered ACP harnesses in the chat context resource inventory
when the `chat-acp-subagents` experiment is enabled, including
configuration paths and resource status. Persist ACP harness resources
from agent context snapshots and update the SDK and generated API types.

Generated with Codex, carefully reviewed by Hugo.
2026-10-21 14:18:12 +00:00
Jaayden Halko 3216580614 feat: load project skills in chats (#30838)
Chats that belong to a chat project now get the project's skills, next
to personal, organization and workspace skills. They show up in the
model's skill list, load through `read_skill`, and appear in a "Project
skills" group in the `/` menu.

- `coderd/x/skills` adds the `project` source. `MergeSkills` now takes a
list of sources in merge order (personal, organization, project,
workspace). Bare names stay bare unless two sources share a name, in
which case they get `project/<name>` style aliases.
- chatd loads project skills only when the chat owner owns the project
or the project is shared with them. Role grants don't count. This is the
same `usableChatProject` check that project instructions and memory use,
and one check per turn covers both instructions and skills. Disabled
skills are skipped. A failed load logs a warning and the turn continues
without them. Subagents use their root chat's project; that lookup is
now a helper shared with project instructions.
- The site loads project skills for the composer on the project page and
in project chats, behind the `chat-projects` experiment. `/clear` and
`/compact` defer to a project skill with the same name, as they already
do for other sources. When the user can't use the project, the site
treats it as no project skills, like chatd, so those commands keep
working and the `/` menu shows no retry prompt for project skills. That
covers a 403 or 404 from the project skills request and a project
missing from the user's project list, which holds only owned and shared
projects, so an administrator role that can read the project doesn't
count. Other failures are retried and leave the list unknown. A cached
project list is also unknown while it refetches or after a failed
refetch, so a share revoked since it was cached keeps those commands
pending instead of deferring to stale project skills.
- Docs gain a "Project skills" section in the extending agents page.
`coderd/x/chatd/ARCHITECTURE.md` gains a paragraph on project skills.

Dogfood UAT on this branch passed: project skills appear in the project
page `/` menu and in project chats, `read_skill` loads them, disabled
and deleted skills report not found, chats outside the project don't see
them, and a subagent gets them through its root chat. The site reads
project skills from the chat's own `project_id`, so subagent chats show
them in the composer once sub-chats carry their root's project (#30683).

| Project page `/` menu | `read_skill` in a project chat |
| --- | --- |
| <img alt="Project skills group in the project page slash menu"
src="https://raw.githubusercontent.com/coder/coder/assets/pr-30838-project-skills/pr/project-page-slash-menu.png"
width="600" /> | <img alt="read_skill loading a project skill in a
project chat"
src="https://raw.githubusercontent.com/coder/coder/assets/pr-30838-project-skills/pr/project-chat-read-skill.png"
width="600" /> |

Stack (merge top to bottom):
- #30838 👈
- #30854
- #30855
- #30856
- #30861
- #30880
- #30881
- #30882
- #30884
- #31122
2026-10-21 19:47:50 +07:00
brittany-coder ce3cd6f9a4 chore(docs): update release docs for v2.38.1 (#31063) 2026-10-21 04:58:37 +00:00
coder[bot] 54f77d2cc1 docs: attribute unlimited agent concurrency to AI Premium (#31088) 2026-10-21 02:02:29 +00:00
Nick Vigilante d187dea338 docs: end every page description with a period and lint for it (#30863)
## Summary

Page descriptions in the docs were inconsistent about ending with a
period. This makes every page description end with one and adds a lint
so it stays that way.

A page description can come from three places, and the docs site reads
front matter first and falls back to the manifest:

- the hand-written YAML sidebar sources under `docs/manifest/`
(including `children_from` overlays),
- the generated fragments (`docs/manifest/generated/cli.json`,
`rest-api.json`), compiled into `docs/manifest.json`,
- a page's own front matter (today only the generated CLI and API
reference pages carry one).

The check covers all three. For the CLI, the description comes from each
command's `Short`, which stays unpunctuated by CLI-help convention, so
`clidocgen` adds the period when it writes the docs description instead
of changing 120 `Short` strings and the CLI golden files.

## What the lint checks

`make lint/docs-manifest` (`docsmanifestgen check`, already part of
`make lint` in CI) now fails when a non-empty description doesn't end
with `.`. No description in the tree ends with `?` or `!`, so the rule
allows only a period. Errors name the source file, the sidebar
breadcrumb, and the description, for example:

```
install/plan/sizing.yml: Install > Plan your deployment > Coder Validated Architecture > Up to 1,000 users: description must end with a period: "Hardware specifications and architecture guidance for Coder deployments that support up to 1,000 users"
generated/api.json: General: description must end with a period: "General endpoints"
reference/cli/ping.md: Reference > Command Line > `ping`: front matter description must end with a period: "Ping a workspace"
```

The style guide's page-description rule now lists the requirement and
cites the checker, and `styleclaims` recognises
`scripts/docsmanifestgen` so the coverage table counts it as
tool-checked.

## Count of descriptions fixed

147 descriptions in `docs/manifest.json`:

- 27 hand-written descriptions in 15 sidebar source files,
- 120 generated CLI descriptions, which also update the front matter of
120 CLI reference pages.

The REST API descriptions already ended with a period. No description is
otherwise reworded.

## Testing

- New table cases in `scripts/docgenenv` (section route, child route,
overlay, generated fragment, front matter, and a `?` ending) and
`scripts/clidocgen`, written first and failing before the change.
- `docsmanifestgen check` on the unfixed tree reported the 27 source
descriptions; after the fixes and regeneration it passes.
- `go test ./scripts/docgenenv/ ./scripts/clidocgen/
./scripts/docsmanifestgen/ ./scripts/styleclaims/
./scripts/apidocgen/...`
- `golangci-lint run` on the changed packages, `pnpm run check-docs`,
`go run ./scripts/styleclaims`, `scripts/check_emdash.sh`, and
`docsmanifestgen fmt` (no changes).

Linear: [DOCS-1304](https://linear.app/codercom/issue/DOCS-1304)

---

🤖 Built with AI assistance.
2026-10-20 18:51:44 -04:00