Commit Graph
3179 Commits
Author SHA1 Message Date
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
TJ afe74722cc feat: tidy AI Gateway sessions list columns and tooltips (#30733)
The last-active column on the AI Gateway sessions list now shows the
date (`Oct 13, 2026`) on the first line and the time in extra-small
secondary text on a second line, instead of a single `October 13, 2026
3:15 PM` line. The column header is renamed from `Last Prompt At
[UTC-07:00]` to `Last active`, and the timezone moves into an info
tooltip next to it, matching the Threads header. The `Network Requests`
header is shortened to `Network`, and the AI Gateway audit docs are
updated to match. The last prompt tooltip is capped at 20rem tall and
scrolls long prompts; clicks inside it no longer open the session. The
AI Gateway info tooltips (`Disabled` network state and the page help
icon) now open above their icon; `InfoTooltip` gains an optional `side`
prop for this, defaulting to the existing `right`, typed with a new
shared `TooltipSide` export that `CopyableValue` also uses. Token badges
use compact notation (`22.5M` instead of `22526.1k`); the tooltip still
shows the exact count. The user column stacks first name over the
remaining names and the last-active column is narrower, so the last
prompt gets the freed width and wraps to two lines. The last prompt cell
and tooltip show the first 500 characters (via `clampContent`, moved
from the Agents debug panel to `site/src/utils/text.ts`); the session
page still shows the full prompt.

---

> 🤖 This PR was generated by Coder Agents on behalf of @tracyjohnsonux.
2026-10-20 13:16:37 -07:00
coder[bot]andNick Vigilante e5c5779a56 docs: fold dynamic parameters into a Parameters section (#30912)
Dynamic parameters are how every parameter works now (default since
v2.25.0), but the docs still split the concept across two sibling
sidebar pages, "Parameters" and "Dynamic parameters". That hides form
types, conditional parameters, and identity-aware parameters behind a
legacy feature name.

This PR folds them into a single **Parameters** section under **Extend
templates**, with one focused child page per concept. Every code example
from both old pages is kept (33 of 33 fenced blocks, including the
commented-out daisy-chaining example).

## New structure

| Page | Contents | Came from |
|---|---|---|
| `parameters/index.md` (Parameters) | What parameters are, defining
one, provider version, how Coder evaluates parameters (data source
caching, no HTTP fetching), types, options, required/optional,
mutability, ephemeral, URL autofill | `parameters.md` +
intro/requirements/data-source sections of `dynamic-parameters.md` |
| `parameters/form-types.md` | `form_type` table, `styling` table, an
example for each form type | `dynamic-parameters.md` |
| `parameters/validation.md` | Number and string validation, validation
that depends on other parameters | `parameters.md` + "Dynamic
Validation" |
| `parameters/conditional-parameters.md` | Show/hide, defaults from
other parameters | `dynamic-parameters.md` |
| `parameters/identity-aware-parameters.md` (`state: [premium]`) |
Role-aware options, group-aware regions, groups as namespaces |
`dynamic-parameters.md` |
| `parameters/workspace-presets.md` | Presets | `parameters.md` |
| `parameters/compatibility-mode.md` | Find, upgrade, and revert
compatibility-mode templates | `dynamic-parameters.md` |
| `parameters/troubleshooting.md` | Known issues, template variables,
registry modules, module-not-loaded errors | `dynamic-parameters.md` |

`parameters.md` moves to `parameters/index.md`, so
`/docs/admin/templates/extending-templates/parameters` (and
`#ephemeral-parameters`, which the dashboard links to) keeps working.

## Other changes

- `docs/redirects.json`:
`/docs/admin/templates/extending-templates/dynamic-parameters` redirects
to the Parameters section.
- Dashboard `docs()` links that pointed at `dynamic-parameters` now
point at `parameters`, or at `parameters/compatibility-mode` where the
link is about compatibility mode (the Storybook assertion is updated to
match).
- Inbound doc links updated. Glossary gets a **Parameters** entry, and
**Dynamic parameters** is kept as the former name.
- Tabs on the old page are replaced with headed sections, per the style
guide's rule against tabs for content every reader needs. Each form type
and example now has its own anchor.
- Small cleanups in moved prose: sentence-case headings, "Dynamic
Parameters" product-name references removed, the stale "Later in
2025..." registry-module sentence and GA announcement copy dropped,
"template creation links" corrected to "workspace creation links" for
URL autofill.

## Not in this PR

Dashboard UI copy still says "Dynamic Parameters" in a few tooltips and
helper text (for example, `CreateWorkspacePageView.tsx` and
`TemplateParametersPageView.tsx`). That's a product copy change and is
better handled separately.

## Verification

- `make gen/docs-manifest`, `make lint/docs-manifest`, `make
lint/docs-redirects` (also with `-base origin/main`), `make
lint/emdash`, `make lint/docs-html`: pass
- `markdownlint-cli2` and `markdown-table-formatter --check` on changed
docs: pass
- Vale on the new pages: 0 errors, 0 warnings, 0 suggestions
- `biome check` on the changed `site/` files: pass
- A script compared every fenced code block in the old `parameters.md`
and `dynamic-parameters.md` with the new pages: all 33 are present.
- Relative links and anchors in all changed docs files resolve. The only
failures are anchors that were already broken in `glossary.md` and
`admin/templates/index.md`, which this PR doesn't touch.
- Not done: a rendered preview on the docs site, and running the
Storybook interaction test.

This PR was drafted by Superblink (Coder's AI assistant) at the request
of @stirby, who will review it and is accountable for it.

---------

Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com>
Co-authored-by: Nick Vigilante <nickvigilante@users.noreply.github.com>
2026-10-20 17:59:38 +00:00
Jakub Domeracki 7777bf3fc3 docs: add an Agent Firewall example policy page (#29468)
The Agent Firewall page pointed at `dogfood/coder/boundary-config.yaml`
with a relative link that escapes `docs/`, so it does not resolve on the
published docs site. The dogfood template that consumed that file now
lives in the infrastructure repository, leaving the docs link as its
only reader.

## Changes

- Add `docs/ai-coder/agent-firewall/example-policy.md`: the broad
allowlist as a docs-owned example, with deployment-specific hosts
replaced by `coder.example.com` and internal entries dropped
- Register the page in the sidebar source
`docs/manifest/ai-coder/ai-governance/agent-firewall.yml` (regenerated
`docs/manifest.json`) and repoint the link in the Agent Firewall page
- Delete `dogfood/coder/boundary-config.yaml`

Checks: `pnpm run format-docs`, `pnpm run lint-docs`, `make
lint/emdash`, and CI all clean.

---

Generated by Coder Agents on behalf of @jdomeracki-coder.
2026-10-20 16:12:46 +02:00
Denis AfonsoandClaude Fable 5.1 8afae4d84c docs: refresh release calendar and install versions for the 2026-10-19 patches (#31034)
Today's patch releases (v2.34.13, v2.35.10, v2.36.8, v2.37.5) and the
v2.29.22 ESR patch did not update the docs. This brings `main` current:

| Row | Before | After |
|---|---|---|
| 2.29 | v2.29.21 | v2.29.22 |
| 2.34 | v2.34.12 | v2.34.13 |
| 2.35 | v2.35.9 | v2.35.10 |
| 2.36 | v2.36.7 | v2.36.8 |
| 2.37 | v2.37.4 | v2.37.5 |

Install docs:
- `docs/install/server/kubernetes/index.md`: Helm `--version` mainline
2.38.0, stable 2.37.5.
- `docs/install/server/rancher.md`: Mainline 2.38.0, Stable 2.37.5.

Note: on main the Helm lines were still 2.35.3 / 2.33.6 and Rancher
2.37.1 / 2.36.5, because #30757 superseded #30738 for the calendar only.
The Rancher page also now puts the version on the line after the label,
which the release wizard's updater does not match, so it will stay a
manual edit until the wizard is fixed.

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-20 07:01:10 -07:00
Ehab Younes f4cd0deccb feat!: report template insights session usage per app (#29796)
Report template insights session usage per app instead of five fixed
family rows, with registry names and icons.

- Add per-app rows for reported session apps (VS Code, Cursor, GoLand,
  Zed, etc.); unused apps are omitted
- Replace `type` (`builtin`/`app`) with `method` (`ssh`,
  `reconnecting_pty`, `port_forwarding`, `workspace_app`); session
  methods are derived from the app name until #31012 stores them
- Add `usage_total_seconds` to count each user's active minutes once,
  and use it as the UI bar denominator so overlapping apps can exceed
  100%
- Merge template apps sharing a slug into one row across templates,
  using the newest display name and icon
- Rename Web Terminal slug from `reconnecting-pty` to
  `reconnecting_pty`
- Cap the response at the 64 busiest unregistered apps and fold the
  rest into "Other apps", flagged with `seconds_is_upper_bound`
  ("Up to" in the UI)
- Add `unknown` and `overflow` accounting rows with explanatory
  tooltips, and a fallback icon for apps without one
- Remove the unused `codersdk.UnionByFamily` helper from the Go SDK

BREAKING CHANGE: `report.apps_usage` in `GET /api/v2/insights/templates`
no longer returns the fixed five rows, family slugs, or previous display
names. Consumers must update.

Part of CLIENT-642
Prometheus metrics handled separately in #29906
2026-10-19 17:59:18 +03:00
Michael Suchacz dfdd6a59a5 feat: move chats between projects through the chat update API (#30894)
`PATCH /api/v2/chats/{chat}` now takes `project_id`. A project ID moves
the chat into that project, and `uuid.Nil` removes it from its project.

**Stack** (moving chats between projects, bottom first):
1. #30893: the move in chatd
2. **This PR**: the chat update API takes `project_id`
3. #30895: **Move to project** in the chat menu
4. #30795: drag a chat onto a project folder in the sidebar

**Why:** #30893 can move a chat family, and the UI layers above need an
endpoint to call.

- A move accepts the same projects as chat creation, through
`validateChatProjectSelection()`, which this PR extracts from
`postChats()` without a change in behavior.
- A project that the chat's owner cannot use gives 404, even for an
admin. The owner must own the project or hold a grant on it
(`chatd.ChatProjectUsableBy`, the check that chat creation uses since
#30439). So an admin cannot put a member's chat into a project that the
member has no access to and expose its memory.
- A child chat, an archived chat or a disabled `chat-projects`
experiment gives 400. A family that is not idle gives 409 ("Cannot move
an active chat. Interrupt or wait for the chat to finish first."). A
project deleted between the check and the move gives 404.
- The move is the last write in `patchChat()`, so a refused move keeps
the earlier writes of the same request, as a refused archive does.

**What to scrutinize:** the access check in
`validateChatProjectSelection()` and the order of the refusals in
`patchChat()` (`coderd/exp_chats.go`).

**Architecture doc:** the `PATCH /api/v2/chats/{chat}` section of
`coderd/x/chatd/ARCHITECTURE.md` lists the `SetProject` states of a move
and its refusals, and no longer says that only an `archived` change
emits transitions.

**Generated** (`make gen`): `coderd/apidoc`,
`docs/reference/api/chats.md`, `docs/reference/api/schemas.md` and
`typesGenerated.ts` come from `UpdateChatRequest.ProjectID` in
`codersdk/chats.go`.

## Testing

- `make pre-commit` passes, and so does `go test ./coderd -run
TestPatchChatProject` (14 subtests).
- `TestPatchChatProject/AnotherOwnersProject` gets 404 for another
user's project, then moves the chat after the project is shared with the
chat's owner. It fails without the access check, and also with an
owner-only check. `MoveBackWaitsForAPendingMove` ends in the wrong
project when the handler skips the move before the lock.
`ActiveFamilyReturnsConflict` checks the 409 for a running, interrupting
or action-waiting root and for a running subagent.
`PublishesProjectChange` and `AuditsTheMove` cover the watch event and
the audit entry.
- Untested: the 404 when the project is deleted between the check and
the move.

> Xum opened this PR on behalf of @ibetitsmike.
2026-10-19 14:01:11 +00:00
Michael Suchacz 0968f97a43 feat: move a chat family between projects in chatd (#30893)
chatd can now move a root chat, together with its subagent chats, into a
project, to another project, or out of its project. Nothing calls this
yet. #30894 adds the API.

**Stack** (moving chats between projects, bottom first):
1. **This PR**: the move in chatd
2. #30894: `PATCH /api/v2/chats/{chat}` takes `project_id`
3. #30895: **Move to project** in the chat menu
4. #30795: drag a chat onto a project folder in the sidebar

**Why:** today a chat keeps the project it was created with. A move must
follow the family rules of archiving, because a step that runs during a
move would still have the memory tools of the old project.

- `chatstate.Tx.SetProject` runs only from W, E0 and E1, like
`SetArchived`. `SetFamilyProject()` locks the root row before its
subagents, in the same order as archiving, so a busy family gets
`ErrTransitionNotAllowed` and nothing changes.
- A move to the project the chat is already in changes nothing, even
while the chat runs. The check reads the locked root row, so it waits
for a move that is still in flight.
- Only the root row stores `project_id`, and subagents use the project
of the root. After the commit, chatd publishes a new `project_change`
watch event for each chat of the family. The move keeps `updated_at`, so
lists keep their order.
- A root chat outside a project now has an empty memory index. When a
chat leaves its project, or its project is deleted, its next turn start
commits one memory index update that removes the memories the model saw
there.

**What to scrutinize:** the lock order and the same-project check under
the lock in `SetFamilyProject()` (`chatstate/family.go`), the turn-start
condition in `memoryIndexMessage()` (`memory.go`), and whether the
`ARCHITECTURE.md` text matches them.

**Generated** (`make gen`): `queries.sql.go`, `querier.go`, `dbmock` and
`dbmetrics` come from `queries/chats.sql`. `coderd/apidoc`,
`docs/reference/api/schemas.md` and `typesGenerated.ts` come from the
new watch event kind, which is also why two `chats.test.ts` fixtures
gain `project_change: false`.

**Architecture doc:** `coderd/x/chatd/ARCHITECTURE.md` lists
`SetProject` among the transitions and in the execution state diagram
(W, E0 and E1 back to themselves). It also says that a root chat's
project can change after creation, and that a moved chat's next turn
starts with a memory index update from the old project to the new one.

## Testing

- `make pre-commit` passes. `go test` passes for
`coderd/x/chatd/chatstate`, `coderd/database/dbauthz`
(`TestMethodTestSuite`) and the chatd memory tests.
- `TestSetFamilyProjectLocksRootFirst` fails with 55P03 when a subagent
row is locked first. `TestSetFamilyProjectKeepsTheCurrentProject` covers
the same-project move during a run. The transition matrix test gains
`SetProject` cases for W, E0 and E1.
- `TestMovedChatUsesNewProject` runs two real turns around a move: the
second turn uses the instructions and memories of the new project, and
`OutOfProject` fails without the memory index removal.

> Xum opened this PR on behalf of @ibetitsmike.
2026-10-19 12:38:17 +00:00
Garrett Delfosse 6ebefb8325 feat: add chat project sharing API (#30439)
API for chat project sharing (experiment `chat-projects`). Builds on
#30479 (merged).

Owners share a project with users, groups, or the whole organization
(the Everyone group, ID = organization ID). Chats in a shared project
stay private.

| Role    | Project and instructions | Memories   | ACL  | Delete |
|---------|--------------------------|------------|------|--------|
| `use`   | read                     | read/write | read | no     |
| `admin` | read/write               | read/write | edit | no     |

Only the owner, and administrators whose role grants delete, can delete
a project.

- **API:** `GET`/`PATCH .../chats/projects/{project}/acl`, same shapes
as `/chats/{chat}/acl`, plus SDK methods. Project responses include the
caller's `permissions` (`update`, `delete`, `share`); the UI hides edit
and delete accordingly.
- **Listing:** `GET /chats/projects` returns owned and shared projects.
Removes `GetChatProjectsByOwnerID`.
- **Chat access:** creating a chat in a project, and loading its memory
and instructions on each turn, requires the chat owner to own the
project or have an ACL grant (`chatd.ChatProjectUsableBy`). Role grants
don't count. If the grant is removed, existing chats lose memory and
instructions on their next turn.
- **Validation:** users and groups must be in the project's
organization; keys must be canonical UUIDs; callers can't change their
own role; the owner can't be added. Migration `000624` drops a user's
grants when they leave the organization, so rejoining doesn't restore
access.
- **Instructions:** readers who can't edit get 403 instead of 404, and
the UI hides editing.
- **Agent prompt:** memories are visible to and editable by sharees, so
the agent is told not to save secrets or personal details.

Known gap: project deletion still detaches chats, and a sharee's open
sidebar keeps showing them until reload. #30683 replaces this.

Not included: share notifications, `/acl/available`, sharing UI.

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

- `use` grants memory read/write over HTTP, because agents in a sharee's
chats can already write memories. Making the agent read-only for sharees
was the alternative (@f0ssel chose sharees changing memories through
use).
- An administrator with `share` can grant themselves access and then use
the project. Accepted to keep access control simple (@f0ssel).
</details>

> Generated by Coder Agents.
2026-10-19 11:32:26 +00:00
Jaayden Halko a379c849da feat: add project skill queries and authorization (#30826)
Adds the storage and authorization layer for chat project skills. The
`skills` table already allows a `project_id` owner (migration 000621);
this adds the queries for it and authorizes them through the parent chat
project, the same way project instructions work.

- New queries in `skills.sql`: insert, get by name, list metadata,
update (COALESCE on description, content and enabled), delete, and
`GetProjectSkillByIDForUpdate` for the shared update lock.
- dbauthz checks `chat_project:read` on the project for reads and
`chat_project:update` for writes. `authorizeChatProjectInstructions`
became `authorizeChatProjectConfig`, shared by instructions and skills.
`Skill.RBACObject()` still denies project rows so nothing reaches them
without going through the project.
- Audit: new `chat_project_skill` resource type (enum-only migration
000624), `AuditableChatProjectSkill`, and the usual
diff/request/table/FriendlyString/AuditFilter wiring. The API that emits
these entries comes in the next PR.

Stack (merge top to bottom):
- #30826 👈
- #30827
- #30838
- #30840
- #30854
- #30855
- #30856
- #30861
- #30880
- #30881
- #30882
- #30884
2026-10-18 12:58:39 +07:00
Nick Vigilante 644519e1f0 docs(docs/admin/users): reformat to one sentence per line (#30693)
Reformats the user administration docs under `docs/admin/users` to one
sentence per line, as the [docs style
guide](https://github.com/coder/coder/blob/main/docs/.style/style-guide/formatting.md#one-sentence-per-line)
requires. Hard-wrapped paragraphs are unwrapped and lines holding
several sentences are split, so a later edit to one sentence shows up as
a one-line diff.

Only whitespace inside paragraphs and list items changes, and the
rendered pages are the same. Comparing every changed file against `main`
word for word, ignoring whitespace and blockquote `>` markers, finds no
differences. `git diff --word-diff` is easier to read than the line
diff.

Applied with an in-progress formatter, limited to pages listed in
`docs/manifest.json` and excluding generated reference docs. This is one
of a batch of PRs that split the docs by area (13 files changed, 362
insertions(+), 553 deletions(-)).

---
🤖 Built with AI assistance.
2026-10-16 17:58:18 -04:00
Nick Vigilante f5909d2acb docs: reformat reference, start, and install docs to one sentence per line (#30696)
Reformats the remaining non-generated pages under `docs/reference`,
`docs/start`, `docs/get-started`, `docs/install`, and `docs/about` to
one sentence per line, as the [docs style
guide](https://github.com/coder/coder/blob/main/docs/.style/style-guide/formatting.md#one-sentence-per-line)
requires. Hard-wrapped paragraphs are unwrapped and lines holding
several sentences are split, so a later edit to one sentence shows up as
a one-line diff.

Only whitespace inside paragraphs and list items changes, and the
rendered pages are the same. Comparing every changed file against `main`
word for word, ignoring whitespace and blockquote `>` markers, finds no
differences. `git diff --word-diff` is easier to read than the line
diff.

Applied with an in-progress formatter, limited to pages listed in
`docs/manifest.json` and excluding generated reference docs. This is one
of a batch of PRs that split the docs by area (23 files changed, 286
insertions(+), 291 deletions(-)).

---
🤖 Built with AI assistance.
2026-10-16 17:58:14 -04:00