This is what an AI/RAG pipeline sees when it indexes this page — the same output served at https://camelmind-docs.vercel.app/api/llms/features/vale-integration.Back to doc

Rendered doc

Vale Integration

Lint your documentation for spelling, terminology, clarity, tone, and AI-writing artifacts with Vale, then customize the built-in style guide or replace it with your own.

CamelMind integrates with Vale, an open-source, configuration-driven prose linter that helps you catch writing issues before you publish your documentation.

Vale checks your .mdx files against a collection of styles and rules. Depending on the rules you enable, it can flag:

  • Spelling and terminology issues
  • Passive voice and wordiness
  • Weasel words and clichés
  • Inconsistent headings, acronyms, and terminology
  • Jargon and corporate language
  • Common artifacts of unedited AI-generated prose

CamelMind includes several styles out of the box and provides cm-light, a small built-in style that you can customize for your project's writing conventions.

Note

CamelMind vendors its style packages under styles/vale/ instead of downloading them with vale sync. This keeps your linting rules in version control and ensures every author uses the same rules without depending on a network connection.


Default Vale style packages in CamelMind

CamelMind enables these default Vale style packages to check your documentation:

StyleWhat it checks
ValeSpelling, using the project's vocabulary.
write-goodCommon prose issues such as passive voice, weasel words, wordiness, and clichés.
MicrosoftRules based on the Microsoft Writing Style Guide, including headings, contractions, acronyms, and dates.
cm-lightCamelMind's opinionated style for common documentation issues. Use it as a starting point and customize it for your project.
proselintAdditional prose-quality issues such as jargon, hedging, corporate language, and hyperbole.
signs-of-ai-writingCommon artifacts of unedited AI-generated prose, such as citation markers, knowledge-cutoff disclaimers, and formulaic phrasing.

You can configure these styles in .vale.ini at the root of your project:

ini
StylesPath = styles/vale
MinAlertLevel = warning
Vocab = CamelMind
Packages = MDX

[*.mdx]
BasedOnStyles = Vale, write-good, Microsoft, cm-light, proselint, signs-of-ai-writing

# This codebase uses a spaced em dash (" — "), which conflicts
# with Microsoft's no-space convention.
Microsoft.Dashes = NO

The BasedOnStyles setting determines which styles Vale applies to your .mdx files.

You can also disable individual rules from a style without disabling the entire style. For example, Microsoft.Dashes = NO disables only the Microsoft Dashes rule.


Set up Vale for prose linting

Follow these steps to install and configure Vale prose linting for your CamelMind project:

1

Install Vale

Vale is a standalone CLI, not an npm package. Install it with your preferred package manager.

For example, on macOS:

bash
brew install vale

For Windows and Linux installation options, see the Vale installation documentation.

2

Sync the MDX package

CamelMind vendors its style files, but the MDX package referenced by Packages = MDX is managed by Vale.

Run the following command once on your machine:

bash
vale sync
Note

You only need to run vale sync when the Vale package configuration changes or when setting up a new development environment.


Run a Vale check

Run the built-in linting script to check all documentation in the /content directory.

bash
npm run lint:prose

To check an individual file, run:

bash
node scripts/vale-preprocess.mjs content/[path-to-mdx-file]

For example:

bash
node scripts/vale-preprocess.mjs content/getting-started/installation.mdx

Below is an example finding:

content/features/vale-integration.mdx
 24:1   warning  Do not use 'click' at the end of headings.  cm-light.HeadingsPunctuation
 41:12  error    Do not use 'here' as the content of a link.  cm-light.Link

To see all alerts, including suggestions, run:

bash
node scripts/vale-preprocess.mjs --minAlertLevel=suggestion

Configure the built-in style

cm-light is CamelMind's lightweight, opinionated style, starting as a baseline rather than a fixed set of rules. CamelMind stores these rules in:

text
styles/vale/cm-light/

Each rule is a YAML file. For example, styles/vale/cm-light/Link.yml contains:

yaml
---
message: "Do not use '%s' as the content of a link."
extends: existence
ignorecase: true
scope: link
level: error
tokens:
  - here

Change an existing Vale rule severity

To change the severity level of an existing Vale rule, update its level setting:

yaml
level: warning

Supported levels are:

  • suggestion
  • warning
  • error

To change what a rule detects, update its tokens or raw expression.

For example, you can change the link rule to flag additional vague link text:

yaml
tokens:
  - here
  - this page
  - click here

Run the linter again to verify your changes:

bash
npm run lint:prose

Add a new rule

Create a new YAML file in styles/vale/cm-light/.

For example, to flag unnecessary uses of "really," create styles/vale/cm-light/Really.yml with:

yaml
---
extends: existence
message: "Consider removing 'really' — it rarely adds meaning."
level: suggestion
ignorecase: true
tokens:
  - really

Vale automatically discovers .yml rule files in the style directory. You do not need to register the new rule.

Run the linter again:

bash
npm run lint:prose

If the word "really" appears in your documentation, Vale reports it as a suggestion.


Disable individual Vale style rules

You can disable an individual Vale linting rule without removing its entire parent style from your project.

Disable an individual rule in .vale.ini using the style and rule name:

ini
[*.mdx]
BasedOnStyles = Vale, write-good, Microsoft, cm-light, proselint, signs-of-ai-writing

Microsoft.Dashes = NO

The Microsoft.Dashes = NO setting disables only the Dashes rule from the Microsoft style.

This approach is useful when you want a style's guidance but have a specific project convention that conflicts with one rule.


Manage your Vale project vocabulary

Vale uses a custom project vocabulary to recognize and verify terms specific to your CamelMind documentation.

CamelMind configures the vocabulary with:

ini
Vocab = CamelMind

CamelMind stores the vocabulary in:

text
styles/vale/config/vocabularies/CamelMind/

It contains two files:

Use accept.txt for terms that Vale should recognize as valid and not flag as misspellings.

CamelMind's vocabulary already includes project-specific terms such as:

text
CamelMind
Next\.js
camelmind\.config\.ts

Since Vale supports regular expressions, escape literal periods when necessary. Add one term or pattern per line:

text
# styles/vale/config/vocabularies/CamelMind/accept.txt
MyProductName
API-Gateway

Replace the built-in style

If cm-light does not match your team's writing conventions, you can replace it with your own style.

1

Create a style

Create a directory under styles/vale/:

text
styles/vale/my-style/

Add one YAML rule file for each rule you want to use.

You can write your own rules or vendor rules from an existing Vale style by copying their .yml files into your style directory.

2

Update .vale.ini

Replace cm-light with your style in BasedOnStyles:

ini
[*.mdx]
BasedOnStyles = Vale, write-good, Microsoft, my-style, proselint, signs-of-ai-writing

You can also keep cm-light and add your own style alongside it:

ini
[*.mdx]
BasedOnStyles = Vale, write-good, Microsoft, cm-light, my-style, proselint, signs-of-ai-writing
3

Remove cm-light if you do not need it

If you're fully replacing the built-in style, remove its directory:

text
styles/vale/cm-light/

If you are keeping it alongside your custom style, no changes are needed.

4

Run the linter

Run the check again:

bash
npm run lint:prose

Confirm that your new rules are being applied and that .vale.ini contains no unintended references to the old style.


Add an existing Vale style

You can also extend CamelMind's configuration with an existing Vale style.

If you vendor the style into your project, place its rule files under styles/vale/ and add the style name to BasedOnStyles.

For example:

ini
[*.mdx]
BasedOnStyles = Vale, write-good, Microsoft, cm-light, proselint, signs-of-ai-writing, my-style

Keeping style files in your repository versions the rules alongside your documentation and ensures consistency across development environments.


Use Vale in CI

Running Vale locally catches writing issues before they reach your pull request. You can also run the same check in CI to enforce your documentation standards.

Use:

bash
npm run lint:prose

A typical workflow is:

  1. Authors run Vale locally while writing.
  2. Pull requests run the same linting command automatically.
  3. error-level findings block the merge.
  4. Authors review warning-level findings without blocking the pipeline merge.
  5. The style configuration and vocabulary remain version-controlled with the documentation.

This gives your documentation team a consistent writing quality gate without requiring an external service.


Troubleshoot Vale

Vale command not found

If you see an error such as:

text
vale: command not found

Vale is not installed or is not available on your PATH.

Install Vale using your package manager and verify the installation:

bash
vale --version
MDX package not found

If Vale reports that the MDX package cannot be found, run:

bash
vale sync

The Packages = MDX setting in .vale.ini tells Vale which package to load for MDX-aware linting.

A custom rule isn't being detected

Check that:

  • The rule is stored under the configured StylesPath.
  • The rule file has a .yml extension.
  • The style containing the rule appears in BasedOnStyles.
  • The rule's level isn't below the configured MinAlertLevel.

For example:

ini
StylesPath = styles/vale
MinAlertLevel = warning

[*.mdx]
BasedOnStyles = cm-light

If your rule uses:

yaml
level: suggestion

it won't appear with MinAlertLevel = warning.

To test it explicitly:

bash
node scripts/vale-preprocess.mjs --minAlertLevel=suggestion

How Vale fits into CamelMind

Vale focuses on prose quality and writing consistency. CamelMind's other AI-focused tools address different parts of the documentation pipeline.

ToolPurpose
ValeLint prose for spelling, terminology, style, clarity, and common AI-writing artifacts.
AI ViewPreview the AI-readable representation of a documentation page.
Run RAG CheckTest chunking, retrieval, and AI-readiness using a local heuristic evaluation.
llms.txtPublish AI-readable documentation in the llms.txt format.

Together, these tools help you review documentation from both sides:

  • Vale checks whether the content is well written.
  • AI View checks what an AI system actually receives.
  • Run RAG Check verifies that retrieval systems can chunk and retrieve your content.
  • llms.txt makes the resulting documentation available in an AI-friendly format.

  • Writing Content — Learn the general MDX authoring conventions that your Vale configuration helps enforce.
  • AI View — Preview the AI-readable version of your documentation.
  • Run RAG Check — Check how your documentation performs when chunked and retrieved.
  • llms.txt — Learn how CamelMind generates AI-readable documentation.
  • Vale documentation — See the complete reference for Vale rules, styles, and configuration.

What the AI sees

1> For a complete documentation index, see /llms.txt. To read any public page as Markdown, append .md to the URL.
2 
3CamelMind integrates with [Vale](https://vale.sh), an open-source, configuration-driven prose linter that helps you catch writing issues before you publish your documentation.
4 
5Vale checks your `.mdx` files against a collection of styles and rules. Depending on the rules you enable, it can flag:
6 
7- Spelling and terminology issues
8- Passive voice and wordiness
9- Weasel words and clichés
10- Inconsistent headings, acronyms, and terminology
11- Jargon and corporate language
12- Common artifacts of unedited AI-generated prose
13 
14CamelMind includes several styles out of the box and provides `cm-light`, a small built-in style that you can customize for your project's writing conventions.
15 
16<Callout type="note">
17CamelMind vendors its style packages under `styles/vale/` instead of downloading them with `vale sync`. This keeps your linting rules in version control and ensures every author uses the same rules without depending on a network connection.
18</Callout>
19 
20---
21 
22## Default Vale style packages in CamelMind
23 
24CamelMind enables these default Vale style packages to check your documentation:
25 
26| Style | What it checks |
27|---|---|
28| `Vale` | Spelling, using the project's [vocabulary](#manage-your-vocabulary). |
29| `write-good` | Common prose issues such as passive voice, weasel words, wordiness, and clichés. |
30| `Microsoft` | Rules based on the Microsoft Writing Style Guide, including headings, contractions, acronyms, and dates. |
31| `cm-light` | CamelMind's opinionated style for common documentation issues. Use it as a starting point and customize it for your project. |
32| `proselint` | Additional prose-quality issues such as jargon, hedging, corporate language, and hyperbole. |
33| `signs-of-ai-writing` | Common artifacts of unedited AI-generated prose, such as citation markers, knowledge-cutoff disclaimers, and formulaic phrasing. |
34 
35You can configure these styles in `.vale.ini` at the root of your project:
36 
37```ini
38StylesPath = styles/vale
39MinAlertLevel = warning
40Vocab = CamelMind
41Packages = MDX
42 
43[*.mdx]
44BasedOnStyles = Vale, write-good, Microsoft, cm-light, proselint, signs-of-ai-writing
45 
46# This codebase uses a spaced em dash (" — "), which conflicts
47# with Microsoft's no-space convention.
48Microsoft.Dashes = NO
49```
50 
51The `BasedOnStyles` setting determines which styles Vale applies to your `.mdx` files.
52 
53You can also disable individual rules from a style without disabling the entire style. For example, `Microsoft.Dashes = NO` disables only the Microsoft `Dashes` rule.
54 
55---
56 
57## Set up Vale for prose linting
58 
59Follow these steps to install and configure Vale prose linting for your CamelMind project:
60 
61<Steps>
62 <Step n={1} title="Install Vale">
63 
64 Vale is a standalone CLI, not an npm package. Install it with your preferred package manager.
65 
66 For example, on macOS:
67 
68 ```bash
69 brew install vale
70 ```
71 
72 For Windows and Linux installation options, see the [Vale installation documentation](https://vale.sh/docs/vale-cli/installation/).
73 
74 </Step>
75 
76 <Step n={2} title="Sync the MDX package">
77 
78 CamelMind vendors its style files, but the `MDX` package referenced by `Packages = MDX` is managed by Vale.
79 
80 Run the following command once on your machine:
81 
82 ```bash
83 vale sync
84 ```
85 
86 </Step>
87</Steps>
88 
89<Callout type="note">
90You only need to run `vale sync` when the Vale package configuration changes or when setting up a new development environment.
91</Callout>
92 
93---
94 
95## Run a Vale check
96 
97Run the built-in linting script to check all documentation in the `/content` directory.
98 
99```bash
100npm run lint:prose
101```
102 
103To check an individual file, run:
104 
105```bash
106node scripts/vale-preprocess.mjs content/[path-to-mdx-file]
107```
108 
109For example:
110 
111```bash
112node scripts/vale-preprocess.mjs content/getting-started/installation.mdx
113```
114 
115Below is an example finding:
116 
117```
118content/features/vale-integration.mdx
119 24:1 warning Do not use 'click' at the end of headings. cm-light.HeadingsPunctuation
120 41:12 error Do not use 'here' as the content of a link. cm-light.Link
121```
122 
123To see all alerts, including suggestions, run:
124 
125```bash
126node scripts/vale-preprocess.mjs --minAlertLevel=suggestion
127```
128 
129---
130 
131## Configure the built-in style
132 
133`cm-light` is CamelMind's lightweight, opinionated style, starting as a baseline rather than a fixed set of rules. CamelMind stores these rules in:
134 
135```text
136styles/vale/cm-light/
137```
138 
139Each rule is a YAML file. For example, `styles/vale/cm-light/Link.yml` contains:
140 
141```yaml
142---
143message: "Do not use '%s' as the content of a link."
144extends: existence
145ignorecase: true
146scope: link
147level: error
148tokens:
149 - here
150```
151 
152### Change an existing Vale rule severity
153 
154To change the severity level of an existing Vale rule, update its `level` setting:
155 
156```yaml
157level: warning
158```
159 
160Supported levels are:
161 
162- `suggestion`
163- `warning`
164- `error`
165 
166To change what a rule detects, update its `tokens` or raw expression.
167 
168For example, you can change the link rule to flag additional vague link text:
169 
170```yaml
171tokens:
172 - here
173 - this page
174 - click here
175```
176 
177Run the linter again to verify your changes:
178 
179```bash
180npm run lint:prose
181```
182 
183### Add a new rule
184 
185Create a new YAML file in `styles/vale/cm-light/`.
186 
187For example, to flag unnecessary uses of "really," create `styles/vale/cm-light/Really.yml` with:
188 
189```yaml
190---
191extends: existence
192message: "Consider removing 'really' — it rarely adds meaning."
193level: suggestion
194ignorecase: true
195tokens:
196 - really
197```
198 
199Vale automatically discovers `.yml` rule files in the style directory. You do not need to register the new rule.
200 
201Run the linter again:
202 
203```bash
204npm run lint:prose
205```
206 
207If the word "really" appears in your documentation, Vale reports it as a suggestion.
208 
209---
210 
211## Disable individual Vale style rules
212 
213You can disable an individual Vale linting rule without removing its entire parent style from your project.
214 
215Disable an individual rule in `.vale.ini` using the style and rule name:
216 
217```ini
218[*.mdx]
219BasedOnStyles = Vale, write-good, Microsoft, cm-light, proselint, signs-of-ai-writing
220 
221Microsoft.Dashes = NO
222```
223 
224The `Microsoft.Dashes = NO` setting disables only the `Dashes` rule from the `Microsoft` style.
225 
226This approach is useful when you want a style's guidance but have a specific project convention that conflicts with one rule.
227 
228---
229 
230## Manage your Vale project vocabulary
231 
232Vale uses a custom project vocabulary to recognize and verify terms specific to your CamelMind documentation.
233 
234CamelMind configures the vocabulary with:
235 
236```ini
237Vocab = CamelMind
238```
239 
240CamelMind stores the vocabulary in:
241 
242```text
243styles/vale/config/vocabularies/CamelMind/
244```
245 
246It contains two files:
247 
248=== "accept.txt"
249 
250Use `accept.txt` for terms that Vale should recognize as valid and not flag as misspellings.
251 
252CamelMind's vocabulary already includes project-specific terms such as:
253 
254```text
255CamelMind
256Next\.js
257camelmind\.config\.ts
258```
259 
260Since Vale supports regular expressions, escape literal periods when necessary. Add one term or pattern per line:
261 
262```text
263# styles/vale/config/vocabularies/CamelMind/accept.txt
264MyProductName
265API-Gateway
266```
267 
268=== "reject.txt"
269 
270Use `reject.txt` for terms that you want Vale to flag wherever they appear. This is useful for:
271 
272- Deprecated product names
273- Terms your team no longer uses
274- Words that require replacement with preferred terminology
275 
276For example:
277 
278```text
279# styles/vale/config/vocabularies/CamelMind/reject.txt
280old-product-name
281whitelist
282```
283 
284The file is empty by default.
285 
286===
287 
288---
289 
290## Replace the built-in style
291 
292If `cm-light` does not match your team's writing conventions, you can replace it with your own style.
293 
294<Steps>
295 <Step n={1} title="Create a style">
296 
297 Create a directory under `styles/vale/`:
298 
299 ```text
300 styles/vale/my-style/
301 ```
302 
303 Add one YAML rule file for each rule you want to use.
304 
305 You can write your own rules or vendor rules from an existing Vale style by copying their `.yml` files into your style directory.
306 
307 </Step>
308 
309 <Step n={2} title="Update .vale.ini">
310 
311 Replace `cm-light` with your style in `BasedOnStyles`:
312 
313 ```ini
314 [*.mdx]
315 BasedOnStyles = Vale, write-good, Microsoft, my-style, proselint, signs-of-ai-writing
316 ```
317 
318 You can also keep `cm-light` and add your own style alongside it:
319 
320 ```ini
321 [*.mdx]
322 BasedOnStyles = Vale, write-good, Microsoft, cm-light, my-style, proselint, signs-of-ai-writing
323 ```
324 
325 </Step>
326 
327 <Step n={3} title="Remove cm-light if you do not need it">
328 
329 If you're fully replacing the built-in style, remove its directory:
330 
331 ```text
332 styles/vale/cm-light/
333 ```
334 
335 If you are keeping it alongside your custom style, no changes are needed.
336 
337 </Step>
338 
339 <Step n={4} title="Run the linter">
340 
341 Run the check again:
342 
343 ```bash
344 npm run lint:prose
345 ```
346 
347 Confirm that your new rules are being applied and that `.vale.ini` contains no unintended references to the old style.
348 
349 </Step>
350</Steps>
351 
352---
353 
354## Add an existing Vale style
355 
356You can also extend CamelMind's configuration with an existing Vale style.
357 
358If you vendor the style into your project, place its rule files under `styles/vale/` and add the style name to `BasedOnStyles`.
359 
360For example:
361 
362```ini
363[*.mdx]
364BasedOnStyles = Vale, write-good, Microsoft, cm-light, proselint, signs-of-ai-writing, my-style
365```
366 
367Keeping style files in your repository versions the rules alongside your documentation and ensures consistency across development environments.
368 
369---
370 
371## Use Vale in CI
372 
373Running Vale locally catches writing issues before they reach your pull request. You can also run the same check in CI to enforce your documentation standards.
374 
375Use:
376 
377```bash
378npm run lint:prose
379```
380 
381A typical workflow is:
382 
3831. Authors run Vale locally while writing.
3842. Pull requests run the same linting command automatically.
3853. `error`-level findings block the merge.
3864. Authors review `warning`-level findings without blocking the pipeline merge.
3875. The style configuration and vocabulary remain version-controlled with the documentation.
388 
389This gives your documentation team a consistent writing quality gate without requiring an external service.
390 
391---
392 
393## Troubleshoot Vale
394 
395<Details summary="Vale command not found" id="vale-not-found">
396 
397If you see an error such as:
398 
399```text
400vale: command not found
401```
402 
403Vale is not installed or is not available on your `PATH`.
404 
405Install Vale using your package manager and verify the installation:
406 
407```bash
408vale --version
409```
410 
411</Details>
412 
413<Details summary="MDX package not found" id="mdx-not-found">
414 
415If Vale reports that the MDX package cannot be found, run:
416 
417```bash
418vale sync
419```
420 
421The `Packages = MDX` setting in `.vale.ini` tells Vale which package to load for MDX-aware linting.
422 
423</Details>
424 
425<Details summary="A custom rule isn't being detected" id="no-custom-rule-found">
426 
427Check that:
428 
429- The rule is stored under the configured `StylesPath`.
430- The rule file has a `.yml` extension.
431- The style containing the rule appears in `BasedOnStyles`.
432- The rule's `level` isn't below the configured `MinAlertLevel`.
433 
434For example:
435 
436```ini
437StylesPath = styles/vale
438MinAlertLevel = warning
439 
440[*.mdx]
441BasedOnStyles = cm-light
442```
443 
444If your rule uses:
445 
446```yaml
447level: suggestion
448```
449 
450it won't appear with `MinAlertLevel = warning`.
451 
452To test it explicitly:
453 
454```bash
455node scripts/vale-preprocess.mjs --minAlertLevel=suggestion
456```
457</Details>
458 
459---
460 
461## How Vale fits into CamelMind
462 
463Vale focuses on prose quality and writing consistency. CamelMind's other AI-focused tools address different parts of the documentation pipeline.
464 
465| Tool | Purpose |
466|---|---|
467| Vale | Lint prose for spelling, terminology, style, clarity, and common AI-writing artifacts. |
468| AI View | Preview the AI-readable representation of a documentation page. |
469| Run RAG Check | Test chunking, retrieval, and AI-readiness using a local heuristic evaluation. |
470| llms.txt | Publish AI-readable documentation in the llms.txt format. |
471 
472Together, these tools help you review documentation from both sides:
473 
474- **Vale** checks whether the content is well written.
475- **AI View** checks what an AI system actually receives.
476- **Run RAG Check** verifies that retrieval systems can chunk and retrieve your content.
477- **llms.txt** makes the resulting documentation available in an AI-friendly format.
478 
479---
480 
481## Related
482 
483- [Writing Content](/getting-started/writing-content) — Learn the general MDX authoring conventions that your Vale configuration helps enforce.
484- [AI View](/features/ai-view) — Preview the AI-readable version of your documentation.
485- [Run RAG Check](/features/run-rag-check) — Check how your documentation performs when chunked and retrieved.
486- [llms.txt](/features/llms-txt) — Learn how CamelMind generates AI-readable documentation.
487- [Vale documentation](https://vale.sh) — See the complete reference for Vale rules, styles, and configuration.

Issues (1)

Notes (1)