Skip to content

Commit 66daa42

Browse files
committed
Merge the docs and agent Vale configs into one at the repo root
The docs had a Vale config under docs/utils/vale, and the review agent and the agents-vale check had their own under .opencode/vale. They pinned the same style packages separately, and nothing pointed a reader from one to the other. There's now one config, .vale.ini at the repo root, with the local styles and vocabulary under .vale/styles. Markdown in general gets the ai-tells rules and four Google ones, and docs/content gets the docs' full set on top. The docs lint exactly as before, under both the Vale the flake checks use and the current release. The Hugo token and block ignores move to the general section, because Vale 3.14 doesn't apply them from a path-scoped one. The section globs match paths relative to the repo root, so the Vale checks now lint from there, and live in nix/vale.nix rather than nix/docs.nix. The review workflow takes the config from main, like the rest of the reviewer's setup, so a PR can't change how its review is linted. Signed-off-by: Nic Cope <nicc@rk0n.org>
1 parent d073fc6 commit 66daa42

16 files changed

Lines changed: 76 additions & 98 deletions

File tree

‎.agents/skills/writing-style/SKILL.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,15 @@ Google developer documentation style run alongside them: `Passive`,
351351
`Semicolons`, `ExcessiveClaims`, and `Anthropomorphism`. The rest of that style
352352
stays off, since it bans first person and "we", which this skill relies on.
353353

354-
`.opencode/vale/.vale.ini` holds that config. Sync its styles once, then lint:
354+
The config is `.vale.ini` at the repo root. The docs under `docs/content`
355+
get a stricter set of styles from the same file. Sync the styles once, then
356+
lint from the repo root, since the config matches paths relative to it:
355357

356358
```bash
357-
vale sync --config .opencode/vale/.vale.ini
358-
vale --config .opencode/vale/.vale.ini path/to/doc.md
359+
vale sync
360+
vale path/to/doc.md
359361
```
360362

361-
The docs under `docs/` have their own, stricter config, which CI runs.
362-
363363
**Fix what it reports.** Nic compared 16 linter-driven rewrites against the
364364
originals across two design docs. He preferred the rewrite in 14 and called the
365365
other two a tie. He never preferred the original. His summary: the edits drive

‎.github/workflows/review.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,13 @@ jobs:
119119
persist-credentials: false
120120

121121
# Everything opencode reads as config or instructions comes from main, as
122-
# does CONTRIBUTING.md, which the skills defer to. That stops a PR
122+
# do the Vale config the agent lints its review with, and CONTRIBUTING.md,
123+
# which the skills defer to. That stops a PR
123124
# editing its own review instructions. PR code the agent runs can still
124125
# rewrite them mid-review, which the design accepts.
125126
- name: Install the reviewer's config from main
126127
run: |
127-
for f in .opencode .agents .claude opencode.json opencode.jsonc AGENTS.md CLAUDE.md CONTRIBUTING.md; do
128+
for f in .opencode .agents .claude .vale .vale.ini opencode.json opencode.jsonc AGENTS.md CLAUDE.md CONTRIBUTING.md; do
128129
rm -rf "pr/$f"
129130
if [ -e "reviewer/$f" ]; then cp -r "reviewer/$f" "pr/$f"; fi
130131
done

‎.opencode/agents/review.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,8 @@ keep composing the PVC once it exists?
137137
```
138138

139139
Fix every error the linter reports on these files. When you've written them
140-
all, run `vale --config .opencode/vale/.vale.ini` over the directory, after
141-
`vale sync --config .opencode/vale/.vale.ini` if its styles are missing, and fix
142-
what it reports too.
140+
all, run `vale` over the directory from the repo root, after `vale sync` if its
141+
styles are missing, and fix what it reports too.
143142

144143
## 5. De-slop the review
145144

‎.opencode/vale/.gitignore‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎.opencode/vale/.vale.ini‎

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,39 @@
1-
StylesPath = styles
1+
# Vale lints the repo's prose. The docs get the full set of styles. Everything
2+
# else in markdown, such as the skills and prompts agents load, the review
3+
# agent's output and design docs, gets the ai-tells rules and a few Google ones.
4+
StylesPath = .vale/styles
25
MinAlertLevel = warning
36
Packages = Google, Microsoft, write-good, alex, proselint, https://github.com/tbhb/vale-ai-tells/releases/download/v1.37.0/ai-tells.zip
47

58
Vocab = Modelplane
69

710
[*.md]
8-
BasedOnStyles = Google, Microsoft, write-good, Modelplane, Vale, alex, proselint, ai-tells
11+
BasedOnStyles = ai-tells
12+
13+
# Skip Hugo shortcodes, links, URLs and version numbers. These sit here rather
14+
# than in the docs section because Vale 3.14 only applies them from a section
15+
# like this one.
16+
TokenIgnores = (\(#.*\)),(\]\(),(https?://[^\s)]+),(\!\[),(\d.*px),(\d\.\d\.\d),(\{\{<[^>]+>\}\})
17+
BlockIgnores = (\{\{<\s*\/?.*>\}\}),(\{\{\<\/\*.*\*\/\>\}\})
918

19+
# "Implementation" is the precise word in engineering prose, and the plainer
20+
# alternatives this rule suggests are worse.
21+
ai-tells.FormalRegister = NO
1022

23+
# Four rules from the Google style. The rest of it stays off, since it bans the
24+
# first person that review comments and designs use.
25+
Google.Anthropomorphism = error
26+
Google.ExcessiveClaims = error
27+
Google.Passive = error
28+
Google.Semicolons = error
29+
30+
[docs/content/**/*.md]
31+
# Undo the settings above that are for agents' prose, so the docs get the styles'
32+
# own levels.
33+
ai-tells.FormalRegister = error
34+
Google.Anthropomorphism = suggestion
35+
Google.ExcessiveClaims = suggestion
36+
BasedOnStyles = Google, Microsoft, write-good, Modelplane, Vale, alex, proselint, ai-tells
1137

1238
Vale.Spelling = NO
1339
write-good.Passive = NO
@@ -55,5 +81,3 @@ alex.ProfanityMaybe = NO
5581
alex.ProfanityUnlikely = NO
5682
alex.Suicide = NO
5783

58-
TokenIgnores = (\(#.*\)),(\]\(),(https?://[^\s)]+),(\!\[),(\d.*px),(\d\.\d\.\d),(\{\{<[^>]+>\}\})
59-
BlockIgnores = (\{\{<\s*\/?.*>\}\}),(\{\{\<\/\*.*\*\/\>\}\})

‎.vale/styles/.gitignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Packages vale sync downloads. Committed styles live under Modelplane/ and
2+
# config/ only.
3+
/*
4+
!/Modelplane/
5+
!/config/
6+
!/.gitignore
File renamed without changes.
File renamed without changes.

docs/utils/vale/styles/config/templates/ai-tells-agent.tmpl renamed to .vale/styles/config/templates/ai-tells-agent.tmpl

File renamed without changes.

0 commit comments

Comments
 (0)