GitHub 8
Skip to content

Coding agents

Wire glosslint into package.json and AGENTS.md so coding agents read your glossary and check their own edits.

Coding agents read .agents/glossary.md directly, the same file ESLint, Oxlint, x18n, and the CLI check. Add a script in package.json and run it in CI:

{
  "scripts": {
    "lint:terms": "glosslint doctor && glosslint check docs"
  }
}
package.json

Both commands exit 0 when clean and 1 on problems or findings, so lint:terms fails CI when the glossary is broken or docs drift. Point agents at the glossary and the script in AGENTS.md:

## Vocabulary

Read `.agents/glossary.md` before writing UI copy or docs. Run `npm run lint:terms` after edits, and `npx glosslint doctor --fix` after changing the glossary.
AGENTS.md

Put a link to the format guide under the glossary's title so an agent opening the file alone can still check its syntax:

# Glossary

<!-- Format and checks: https://glosslint.loadsheet.dev/guide/glossary -->
.agents/glossary.md

If you also use defineCorpus, pass its module with --corpus: export the merged corpus with npx glosslint print --corpus <module> and run npx glosslint test --corpus <module> after changes. See CLI.

  1. Read .agents/glossary.md before writing copy or docs, or run npx glosslint explain <word> when unsure which term to use.
  2. Run your project linter, such as ESLint or Oxlint, and lint:terms, or pass --format json to glosslint check for structured output.
  3. Follow each finding's fix.kind: apply autofix as given, read why and nuance before applying a suggestion, and update every caller for a rename.
npx glosslint explain rack
Dock
  "rack" is an avoid word for Dock. Racks are unpowered.
  A powered stand where one bike is locked.
  A station is a group of docks.
  Avoid: rack (racks are unpowered), bay.
  Good: "Return the bike to any dock". Bad: "Return the bike to any rack".
  See: Docks https://example.com/docs/docks
  Related: Station
txt

See Findings for the JSON output and CLI for all commands.

Every page on this site has a raw Markdown copy at /raw/<page>.md, such as /raw/guide/agents.md, and a full index at /llms.txt.