GitHub 0
Skip to content
glosslint is in preview and not on npm yet. Version 0.0.1 will be the first release.

Coding agents

Export your glossary for coding agents, follow the five-step editing workflow by fix.kind, and install the glosslint agent skill.

This page shows how to give coding agents your glosslint glossary, the five-step workflow an agent follows when editing text or the corpus, and how to install the glosslint agent skill from this site.

To set a project up for coding agents, put the glossary where they read it. glosslint print writes your corpus as a Markdown glossary, with one section per term that says more than its spelling and one "Spelling" line for the rest.

npx glosslint print > .agents/terms.md

For the bike-share corpus, the Dock section of .agents/terms.md looks like this:

## Dock
A powered stand where one bike is locked.
- A station is a group of docks.
- Don't write: 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).
txt

Link .agents/terms.md from AGENTS.md, or paste the sections you care about into AGENTS.md itself. Rerun npx glosslint print > .agents/terms.md whenever the corpus changes so the file stays in sync with glosslint.config.ts.

If your project already keeps a Markdown glossary table that fromGlossaryTable reads, link that table from AGENTS.md instead of generating a second file. See Glossary table for the table format and CLI for glosslint print options.

If you are an agent working in a project that uses glosslint, follow these five steps:

  1. Read the glossary before you write user-facing text.
  2. When you are unsure which word to use, run glosslint explain "<word>" first. It prints the term, what it means, the nuance and the words to avoid.
  3. After editing, run the project's lint, and glosslint check --format json on the docs you touched.
  4. Apply findings by fix.kind:
    • autofix: apply it as given.
    • suggestion: read the term's nuance and the finding's why, then pick the word that fits the meaning. The suggested term is often right. Not always.
    • rename: do not apply it alone. Rename every caller in the same change, or report it.
  5. After editing the corpus, run glosslint test.

When you run glosslint explain in step 2, it matches the term itself, an abbreviation, a form, an avoid word, a misspelling, or a mention. If no term matches, it exits 1.

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 of glosslint check --format json and every field on a finding, and CLI for all commands and exit codes.

This site serves an agent skill that teaches coding agents how to work with glosslint. Install the glosslint skill with:

npx skills add https://glosslint.onmax.me/

Every page on this site also has a raw Markdown copy at /raw/<page>.md, such as /raw/guide/agents.md, plus a full index at /llms.txt that agents and tools can fetch without parsing HTML.