---
name: noah
description: >-
  Checks each response with noah, the Canonical English linter, and fixes it
  until noah passes before showing it to the user. Use when writing a response
  for the user.
---

# noah

Check if noah can be run with `noah --version`. If not, install it with the
package manager of choice, e.g. `pip install noah`.

Then:

1. **Generate your response:** Write your response based on the user's prompt.
2. **Save to disk:** Write the response in GitHub Flavored Markdown as usual to
   the computer, e.g. `response.md`.
3. **Run the validation tool:** Execute the following command in the terminal
   to lint the file you just saved:
   `noah --lint response.md`
4. **The validation loop:**
   - **If the tool returns errors or warnings (non-zero exit code):** Do NOT
     present the response to the user. Analyze the error output, apply the
     necessary fixes to the file, and return to Step 3 to re-run the tool.
     Repeat this loop until the tool returns a clean pass.
   - **If the tool passes (zero exit code):** Proceed to Step 5.
5. **Finalize:** Once the validation tool passes, show the final `response.md`
   output to the user. Do not show them the failed iterations.

Each noah error starts with a rule ID such as `CE-0005`. The rules are
explained at https://canonical-english.org/rules.html.
