## Summary
PR 1 corrected 9 annotations that claimed enforcement the config doesn't
provide. This adds the check that keeps them correct, because the same
drift will recur: annotations are prose, `.vale.ini` is config, and
nothing tied them together.
`scripts/styleclaims` reconciles three sources and fails `make lint`. It
also runs in `lint-light`, so the fast pre-commit hook covers docs-only
changes: the checker's inputs all live under `docs/.style/`, and leaving
it out would let this drift land through the hook that docs changes
actually use. It is the only `lint-light` entry that compiles Go, which
costs one small build on first run and nothing after.
What it reports:
1. `.vale.ini` plus `docs/.style/styles/Coder/`, which is the truth.
2. The per-rule annotations in the style guide subpages.
3. The two coverage tables on the style guide landing page.
### What it reports
| Finding | Example it would have caught |
|---|---|
| A `Coder.*` rule cited as active with no rule file |
`Coder.FirstPersonSingular`, `Coder.FirstPersonPlural` |
| A third-party rule cited as active while `BasedOnStyles = Coder` | the
8 `Google.*` citations |
| A rule file that no section cites as active | a rule landing without
the section the per-rule PR pattern requires |
| Checks-table severity, scope, or membership drift | a rule re-scoped
in `.vale.ini` without updating the table |
| Coverage-count drift | the per-section and total rows |
### Also in this PR
- One annotation reworded so each planned citation is marked
individually (`Google.Gender` and `Google.GenderBias`). A trailing
`(both planned)` covering several citations isn't machine-readable, and
the checker depends on that precision.
- The annotation format documented in `scripts/styleclaims/README.md`,
with the per-rule PR pattern in `docs/.style/README.md` pointing at it.
- `make lint/prose` prints a coverage pointer after running, so the
advisory result doesn't read as a pass.
## Verification
- `go test ./scripts/styleclaims/` covers the parser and each finding
class, including the mixed `scripts/check_emdash.sh` plus `Coder.EmDash`
(planned) annotation and the "rule mentioned but not claimed" case that
`Google.Passive` represents.
- `go run ./scripts/styleclaims` is clean on the branch.
- Regression check: reverting `Coder.FirstPersonSingular` to its
pre-PR-1 wording reproduces 3 findings (the false claim plus the 2 count
rows). Restoring it returns to clean.
- `golangci-lint run scripts/styleclaims/...` reports 0 issues; `gofmt`
clean.
- `make lint/markdown`, `make lint/emdash` clean.
<details>
<summary>Design notes</summary>
### Why Go, not bash
`scripts/` is mostly bash, but this parses Markdown tables and
multi-line annotations, which bash does badly. `scripts/docshtmlcheck`
sets the precedent for a Go checker invoked from a lint target, so this
follows its layout: `main.go`, `main_test.go`, `README.md`, and a `go
run ./scripts/...` target.
### Why not generate the tables
Considered and rejected. Generation and checking need the same parse, so
once the checker exists the table's correctness is guaranteed either
way. Generation would only save a one-row edit in a PR that already
edits the guide by doctrine, at the cost of a generated block inside
prose contributors are invited to edit. The checker also catches a case
generation can't: a rule enabled in `.vale.ini` with no style guide
section at all.
### Parsing tradeoff
The checker reads prose annotations, so it depends on their format
staying regular: start with a recognized keyword, and mark each planned
citation individually. That regularity is enforced by the checker
itself, which is the point, but it does mean an author who invents a new
annotation phrasing gets a failure rather than silent acceptance. If
that proves annoying in practice, the fallback is a small YAML manifest
of rule status that both the tables and the checker read. I'd rather not
add that until the prose form actually hurts.
### Scope validation
Scope cells are checked against `.vale.ini` section globs: every glob
that sets a rule to `YES` must appear in the cell, and a rule with no
`NO` toggle must claim `docs/**`. That's how the `OneSentencePerLine`
row stays honest about running on contributor docs only.
</details>
---
Linear:
[DOCS-887](https://linear.app/codercom/issue/DOCS-887/make-clear-that-vale-passing-is-not-style-guide-conformance)
🤖 Generated with Coder Agents on behalf of @nickvigilante.