--- ---

Fix Spelling Issues

Troubleshooting and fixing spelling issues with optional AI support.

This procedure is to help you trace and fix spelling issues in documentation. It uses DocOps Lab’s custom Vale implementation to identify spelling errors and generate a report for correction.

You can then pass that report to an AI agent to help you fix the issues based on the data, your feedback, and further instructions.

Procedure Overview

PREREQUISITE

This procedure requires the docopslab-dev utility.

  1. Use the spellcheck task to generate a spelling report.

    bundle exec rake labdev:lint:spellcheck
  2. Open the generated report in your favorite YAML editor.

  3. Update the report with your instructions or corrections (see The Spellcheck Report).

  4. Provide the updated report to your AI agent for processing.

The Spellcheck Report

The report is a YAML file that lists the spelling issues found in your documentation.

Each entry in the sequence represents an issue detected by Vale, along with its context.

The Spellcheck Prompt

The report will include a prompt that helps an AI agent understand the procedures for following up on your instructions.

The default AI prompt
# When processing user responses in this file:
# 1. For fix?: 'add' or 'd': Add the term to the filters section in:
#    gems/docopslab-dev/assets/config-packs/vale/authoring/Spelling.yml
# 1.a. For fix?: 'do' or 'dolab' or 'docopslab': Add the term to a special '# DocOpsLab Terms' section
# 1.b. For fix?: nontech("word"): Add the term to a special '# Non-Technical Terms' section
# 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': 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 -->
# The spelling dictionary is the 'filters:' sequence in the Spelling.yml file
# When adding to dictionary, maintain alphabetical order within sections
# 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.

To override this prompt on a project level, configure it in your .config/docopslab-dev.yml file.

spellcheck:
  output_dir: .agent/spellcheck    # defaults to .labdev/spellcheck
  output_file: spelling-report.yml # defaults to spellcheck-<datetime>.yml
  prompt: |
    # Your custom prompt here
    # Preceed each line with a hash (#)