Enforce the no-em-dash rule in vale #2149

Closed
opened 2026-11-27 08:15:47 +00:00 by sam · 1 comment
Owner

AGENTS.md says no em dashes in prose, comments or user-facing strings, but nothing checks it. .vale.ini sets Google.EmDash = NO, and upstream Google.EmDash only flags a dash that has a space on both sides, so a bare U+2014 passes either way.

40 occurrences sit across the tracked Go and Markdown files. Worst offenders: internal/gateway/session_commands.go (11), internal/domain/memory/contract.go (6), internal/domain/curator/runtime.go (3), internal/container/pool.go (3).

Done when:

  • .vale/styles/Archie/EmDash.yml rejects U+2014 for *.{md,tmpl} and *.go, with a message naming the alternatives (comma, brackets, colon, second sentence).
  • The occurrences are rewritten and Archie.EmDash is enabled in .vale.ini for both formats.
  • vale reports no em dashes on the tree. A dash that is part of a quoted external string or a table rule is a judgement call per line, not an exception list.
AGENTS.md says no em dashes in prose, comments or user-facing strings, but nothing checks it. `.vale.ini` sets `Google.EmDash = NO`, and upstream `Google.EmDash` only flags a dash that has a space on both sides, so a bare `U+2014` passes either way. 40 occurrences sit across the tracked Go and Markdown files. Worst offenders: `internal/gateway/session_commands.go` (11), `internal/domain/memory/contract.go` (6), `internal/domain/curator/runtime.go` (3), `internal/container/pool.go` (3). Done when: - `.vale/styles/Archie/EmDash.yml` rejects `U+2014` for `*.{md,tmpl}` and `*.go`, with a message naming the alternatives (comma, brackets, colon, second sentence). - The occurrences are rewritten and `Archie.EmDash` is enabled in `.vale.ini` for both formats. - `vale` reports no em dashes on the tree. A dash that is part of a quoted external string or a table rule is a judgement call per line, not an exception list.
sam added the bugmedium labels 2026-11-27 08:16:07 +00:00
Author
Owner

Fixed in 6a2515365.

.vale/styles/Archie/EmDash.yml is an existence rule over \u2014, level error, message "No em dashes. Use a comma, brackets, a colon, or a second sentence." It applies to Markdown, templates and Go because both relevant .vale.ini sections already include the Archie style, so no per-rule enable was needed there.

All 40 occurrences are rewritten, judged line by line rather than by an exception list. Most became a colon (Nothing to retry: no messages remain.), several a comma or brackets (// Validate rejects an unknown kind, a missing component, and (just as importantly) a component present where it is not required), and the /undo and /compress usage lines read Usage: /undo [N], where N must be a positive number (default: 1). The three-line topic-routing help drops the separator column rather than inventing punctuation for it.

.vale.ini now scopes out the scratch trees vale was walking (tmp, .local, .agents, .agents-run, archipelago, .impeccable, ui/node_modules, ui/dist); without that, "vale reports no em dashes on the tree" could never be true, since checkouts and generated output sit under them. Order matters: those sections have to come after the broad [*.{md,tmpl}] and [*.go] sections, or the broad ones re-enable the styles.

vale . now reports 0 em dashes and 6 unrelated alerts (sentence length and two spellings) on the repository's own files, and go build plus the affected package tests pass. task check passes on a clean worktree at the commit.

Not done, deliberately: nothing runs vale in task check, so this rule flags a new em dash only when someone runs vale. Wiring a prose step into the gate is a separate decision.

Fixed in 6a2515365. `.vale/styles/Archie/EmDash.yml` is an `existence` rule over `\u2014`, level error, message "No em dashes. Use a comma, brackets, a colon, or a second sentence." It applies to Markdown, templates and Go because both relevant `.vale.ini` sections already include the `Archie` style, so no per-rule enable was needed there. All 40 occurrences are rewritten, judged line by line rather than by an exception list. Most became a colon (`Nothing to retry: no messages remain.`), several a comma or brackets (`// Validate rejects an unknown kind, a missing component, and (just as importantly) a component present where it is not required`), and the `/undo` and `/compress` usage lines read `Usage: /undo [N], where N must be a positive number (default: 1)`. The three-line topic-routing help drops the separator column rather than inventing punctuation for it. `.vale.ini` now scopes out the scratch trees vale was walking (tmp, .local, .agents, .agents-run, archipelago, .impeccable, ui/node_modules, ui/dist); without that, "vale reports no em dashes on the tree" could never be true, since checkouts and generated output sit under them. Order matters: those sections have to come after the broad `[*.{md,tmpl}]` and `[*.go]` sections, or the broad ones re-enable the styles. `vale .` now reports 0 em dashes and 6 unrelated alerts (sentence length and two spellings) on the repository's own files, and `go build` plus the affected package tests pass. `task check` passes on a clean worktree at the commit. Not done, deliberately: nothing runs vale in `task check`, so this rule flags a new em dash only when someone runs vale. Wiring a prose step into the gate is a separate decision.
sam closed this issue 2026-11-27 08:34:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#2149