## Summary The style guide documents 77 rules. Tooling checks 8 of them, one of which doesn't run on published pages, and Vale runs advisory so no finding fails a build. Nothing said so, and several annotations said the opposite. This corrects the false claims and states the coverage where authors and agents actually read. ### The false claims Nine annotations read as active enforcement with no `(planned)` marker: - `Google.Gender`, `Google.GenderBias`, `Google.Headings`, `Google.HeadingPunctuation`, `Google.OxfordComma`, `Google.Quotes`, `Google.Exclamation`, `Google.Ranges`. The repo-root `.vale.ini` sets `BasedOnStyles = Coder`, and the doctrine in `docs/.style/README.md` deliberately excludes third-party rules. - `Coder.FirstPersonSingular` and `Coder.FirstPersonPlural`. No YAML exists for either in the rule package. All are now marked planned, matching the 17 annotations that already were. ### What changed | File | Change | |---|---| | `docs/.style/style-guide/README.md` | New "What the tooling checks, and what it doesn't" section: per-rule table with tool, severity, and scope, per-section coverage counts, and the enumeration and classification rules that reproduce them | | `docs/.style/style-guide/capitalization-and-punctuation.md`, `voice-and-tone.md`, `accessibility-and-inclusion.md` | Mark the 9 false enforcement claims planned | | `docs/.style/style-guide/audience-and-scope.md` | Give each rule its own enforcement footer, so the page's 6 rules stop counting as 1 | | `docs/.style/style-guide/word-choice.md` | Say that `Coder.BrandNames` covers `HashiCorp` casing only, and give the What's next? sub-rule its own footer | | `docs/about/contributing/documentation.md` | Drop "to enforce prose style"; state that Vale covers a subset and a clean run isn't conformance | | `AGENTS.md`, `.claude/docs/DOCS_STYLE_GUIDE.md`, `.claude/skills/write-docs/SKILL.md` | Same statement for agents; split the skill checklist item so applying the guide and passing linters are separate gates | ## Why An agent (me) wrote a new install page, ran `make lint/prose` and markdownlint clean, and shipped a draft that violated one-sentence-per-line, the "refer to" rule, `sh` fence tags, H3 tab headings, and the Learn more heading. None of those are enforced. The single checklist item that bundled "style guide applied with it open" with "Vale passes" made the substitution easy to miss. <details> <summary>Verification and method</summary> ### Empirical probe A scratch file violating 12 documented rules (gerund heading, trailing heading punctuation, first person singular and plural, `Click`, `Github`, `Hashicorp`, `VSCode`, Oxford comma, US quotation, numeric range, exclamation point, one-sentence-per-line, `Simply`, navigational `See`, `Next steps`) produced exactly 3 findings: `Coder.GerundHeading`, `Coder.SelectClick`, `Coder.BrandNames`. ### Counts One rule section is one heading with an enforcement footer (`*Enforced by ...*`, `*Documentation-only ...*`, `*Adapted from ASD-STE100 ...*`). Sections are classified against `.vale.ini` and `docs/.style/styles/Coder/` by an ordered test: a stated **Documentation-only** wins, then a check that runs today, then planned. 77 total: 8 tool-checked, 25 planned, 44 documentation-only. PR 2 in this stack adds a script that reconciles those three sources in CI so the table and the annotations can't drift from the config again. ### Two findings recorded but not fixed here - `Coder.BrandNames` ships at `error` but swaps only `Hashicorp` and `HASHICORP`, though the table it's cited under lists 8 brands. `Github` and `VSCode` pass clean. The footer now says so; widening the rule is tracked in DOCS-889. - `Coder.OneSentencePerLine` is set to `NO` repo-wide and re-enabled only for `docs/.style/*.md` and `docs/.style/styles/Coder/*.md`. Rollout tracked in DOCS-888. ### Note for the reviewer `make lint/prose` over `docs/` currently reports a backlog of `Coder.GerundHeading` warnings, plus the intentional `Coder.Demo*` findings in the annotation demo. That backlog is the advisory channel working as designed and is out of scope here, but it's the concrete evidence behind the new sentence about findings accumulating rather than blocking. Worth a separate cleanup decision: fix the headings, or re-scope the rule. </details> --- Linear: [DOCS-887](https://linear.app/codercom/issue/DOCS-887/make-clear-that-vale-passing-is-not-style-guide-conformance) PR 2 of this stack adds the CI guard that keeps these claims true. 🤖 Generated with Coder Agents on behalf of @nickvigilante.
8.2 KiB
Coder Development Guidelines
Make the smallest correct change, follow existing patterns, and verify the result. Carry the requested task through implementation, verification, and necessary follow-up until it is complete or blocked by information or access you cannot obtain. Do not stop at a plan, partial fix, or offer to continue when the user requested completed work.
Prioritize correctness over agreement. State uncertainty instead of guessing, and push back on technically unsound requests with evidence.
Autonomy and clarification
- Resolve routine ambiguity by inspecting relevant code, tests, documentation, and history. Make reasonable, reversible assumptions consistent with the user's intent and existing patterns; state consequential assumptions and continue working.
- Ask only when essential information cannot be recovered from available context and would materially change the result, or when a destructive or irreversible action requires authorization the user has not already provided. Reuse authorization from the conversation instead of asking again for the same action.
- If clarification or approval is required, continue authorized work that does not depend on the answer. Explain the specific blocker and what you have already investigated.
- Apply repository guidance within its stated scope and honor explicit user instructions. Do not turn optional recommendations or routine implementation choices into approval requirements.
Task-specific guidance
Load only the guidance relevant to the task:
| Scope | Guidance |
|---|---|
| Development servers, Git, hooks, and routine checks | WORKFLOWS.md |
| API endpoints and Swagger | WORKFLOWS.md |
| Go | GO.md |
| Tests and concurrency | TESTING.md |
| Database and SQLC | DATABASE.md |
| OAuth2 and authorization | OAUTH2.md |
| Architecture | ARCHITECTURE.md |
| Troubleshooting | TROUBLESHOOTING.md |
| Observability | OBSERVABILITY.md |
| Isolation, ports, and cleanup | DEV_ISOLATION.md |
| Failure reports | AGENT_FAILURES.md |
| PR descriptions | PR_STYLE_GUIDE.md |
| Existing docs prose | docs style guide |
| Docs scope and routing | content guidelines |
| Docs structure and research | DOCS_STYLE_GUIDE.md |
| New, moved, or restructured docs | write-docs skill |
| Frontend | site/AGENTS.md |
For changes under site/src/, also read FRONTEND_PATTERNS.md. For chatd work, read coderd/x/chatd/ARCHITECTURE.md. When the docs style guide and the content guidelines conflict, the content guidelines govern scope and routing. Automated tooling checks a small subset of the style guide and Vale runs advisory, so read the guide and apply it; a clean make lint/prose is not conformance. What the tooling checks, and what it doesn't has the current numbers.
Workflow
- Inspect the working tree before editing. For an existing PR, check out its branch first.
- Follow existing architecture for routine decisions. For requested architectural work, investigate options, choose a reasonable approach, and explain the tradeoffs while proceeding. Ask before introducing major architectural changes outside the requested scope.
- Answer informational questions directly. Requests to implement, fix, or investigate authorize that work even when phrased as a question.
- Install and use the repository Git hooks. Never bypass them with
--no-verify. Wait for slow first runs while caches warm. - Prefer targeted tests and checks while iterating. Run the broader checks required by the affected area before handoff.
- Do not force-push unless explicitly requested.
- Commit and PR titles use
type(scope): message. A scope must be a real path containing every changed file. Use a broader scope or no scope for cross-cutting changes.
Essential commands
| Task | Command |
|---|---|
| Develop | ./scripts/develop.sh |
| Build | make build |
| Build slim | make build-slim |
| Test | make test |
| Test one | make test RUN=TestName |
| Race test | make test-race |
| Lint | make lint |
| Generate | make gen |
| Format | make fmt |
| Pre-commit checks | make pre-commit |
| Pre-push checks | make pre-push |
Docs use pnpm run format-docs and pnpm run lint-docs. Frontend commands live in site/AGENTS.md.
Repository guardrails
- Database changes: edit
coderd/database/queries/*.sql, runmake gen, updateenterprise/audit/table.gofor audit errors, then runmake genagain. - New resources: scope every new resource to an organization (
organization_idcolumn, organization-scoped RBAC and routes), never deployment-wide. - OAuth2: return RFC-compliant errors such as
writeOAuth2Error(...). Public endpoints that need system access usedbauthz.AsSystemRestricted. - Chatd: when a change affects the documented architecture, do not edit the architecture document yourself. Leave TODO items in the affected sections; the human PR author writes the actual updates.
- Public API: add the required Swagger annotations for new public HTTP endpoints.
- Transactions: keep
InTxwork on the transaction handle. Prefer explicit database-to-SDK converters. - Concurrent tests: call
t.Parallel(), use unique identifiers, and do not usetime.Sleepto mask timing problems. - Frontend: reuse shared UI primitives. Prefer Vitest and
userEventtests that assert the non-visual outcome of the interaction (callback, request, state); extend existing coverage instead of adding a new test when equivalent coverage already exists. Use Storybook stories only for visual components that should be covered by the visual regression tool, which Pixel screenshots in CI. - GitHub Actions: set top-level
permissions: {}and grant only required permissions per job.
Code and writing style
- Follow the Uber Go Style Guide for Go code.
- Use language-server navigation when available.
- Name code for what it does, not its implementation or history. Wrap errors with context.
- Document exported symbols with idiomatic Go doc comments or JSDoc.
- Avoid unrelated edits. Preserve comments that explain non-obvious behavior.
- Comments must be concise and substantive. Explain behavior, constraints, or rationale, not the history of the edit.
- Do not use em dashes, en dashes, or spaced double hyphens as punctuation in code, comments, strings, or documentation.
- Ensure files end with a newline.
Local configuration
Read AGENTS.local.md when present. It may be gitignored and is not imported automatically.