-
Place or recreate the accompanying
spellcheck.golang.yamlfile in your project directory.NoteYou will probably want to modify the AI Agent Instructions to match how you handle spelling exceptions. -
Run an altered version of your typical vale command:
vale --filter='.Name=="Vale.Spelling"' --output=path/to/spellcheck.golang.yaml README.adoc > spellcheck.yml
Where:
-
Vale.Spellingis your preferred spellcheck rule -
path/to/spellcheck.golang.yamlis wherever you saved the template -
README.adocis whatever path you wish to check -
spellcheck.ymlis wherever you want to save your report
-
-
Follow the instructions in the report and pass it on to your favorite gen AI agent.
Last active
October 29, 2025 17:26
-
-
Save briandominick/0cc6b44c464248b0d6b6c6bf279f84ae to your computer and use it in GitHub Desktop.
Vale Spellcheck template for AI assisted correction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SpellCheck Report | |
| # | |
| # User Instructions: | |
| # For each entry, enter a fix?: value of: | |
| # 'no' or 'n' to skip fixing for now (deleting the entry is more efficient) | |
| # 'add' or 'd' for add to dictionary | |
| # use add("[cC]orrected term") to indicate verbatim text to add | |
| # 'fix' if it's a typo to be corrected | |
| # 'fix("corrected")' where corrected is the intended text | |
| # 'pass' will wrap in <!-- vale off -->', '<!-- vale on -->' | |
| # | |
| # After editing this file, use an AI agent to process the fixes. | |
| # | |
| --- | |
| {{range .Files}}{{$file := .}}{{range .Alerts}} | |
| - term: "{{.Match}}" | |
| path: {{$file.Path}} | |
| line: [{{.Line}},{{index .Span 0}}] | |
| fix?: | |
| {{end}}{{end}} | |
| # | |
| # AI Agent Instructions: | |
| # When processing user responses in this file: | |
| # 1. For fix?: 'add' or 'd': Add the term to the filters section in: | |
| # [YOUR SPELLING RULES DICTIONARY INSTRUCTIONS HERE] | |
| # 2. For fix?: 'fix': Replace the term in the file with inferred corrected spelling | |
| # 3. For fix?: 'fix("word")': Replace the term with the word value verbatim | |
| # 4. For fix?: 'no' or 'n': Ignore this issue for now | |
| # 5. For fix?: 'pass': | |
| # AsciiDoc: Wrap the affected text in {vale_off} and {vale_on} comment attributes | |
| # and make sure the attributes are defined in .adoc file header (offer to user): | |
| # :vale_off: <!-- vale off --> | |
| # :vale_on: <!-- vale on --> | |
| # Markdown/HTML: Just use <!-- vale off --> and <!-- vale on --> comments around the text | |
| # The spelling dictionary is the 'filters:' sequence in the Spelling.yml file | |
| # DO NOT TAKE INITIATIVE. Stick to the instructed changes except where prompted with `fix?: 'fix'`. | |
| # DO NOT correct neigboring words in text nor add nor alter words in the dictionary other than those named. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment