← Catalog

pi-dent-terms

A pi extension that manages a workspace's terms file and checks its Markdown against it

Extension

Install

Install with PiG

pig install npm:pi-dent-terms

Install with Pi

pi install npm:pi-dent-terms
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.2 (README.md). PiG does not review it.

pi-dent-terms

A pi extension that keeps a workspace's terminology: a terms file giving each domain concept one preferred label, its meaning, and the phrases to reject, and a check of the workspace's Markdown against it. An agent in pi drives it through the Terms tool; pi-dent bundles it.

Why

A written vocabulary alone is advice: an agent writing prose drifts off it, and nothing reports the drift. pi-dent-terms makes the vocabulary machine-checkable. The check is deterministic and offline — it matches phrases, it does not judge what a word means. Findings name the occurrences to rewrite; the agent rewrites them with its own edit tool, so a wrong entry costs a finding to disagree with, never changed prose. Cost tracks change, not corpus — a check with a change set reports only what the change introduces.

How it works

The terms file is .pi/pi-dent/terms.yaml under the workspace root, the top level of the Git working tree. Each entry gives an id, label, meaning, owner (the document that defines the term), reject phrases, forms, a group, a key, a status, and a history. The checked documents are the .md files git ls-files lists, tracked or untracked but not ignored.

The Terms tool:

  • find looks an entry up by id, label, form, reject phrase, or meaning.
  • check reports the workspace's findings.
  • add, update, rename, merge, split, deprecate, reown, and import change the terms file. An operation writes it and returns the document occurrences to rewrite; applying them is the agent's edit. The first operation creates it; import fills an empty one from a Markdown table.

When the host's edit or write changes a Markdown document, the extension appends that document's findings to the tool result, so the session sees its rejected wording at once.

Findings read <path>:<line>:<column> <code> <message>, all one weight:

  • T001–T006 — terms-file problems: syntax, duplicate labels, dangling ids, deprecation rules, key use, an entry its owner does not use.
  • P001–P002 — a rejected or deprecated phrase in prose.
  • S001 — a terms-ignore comment that is not valid.

Silence one finding on one line with <!-- terms-ignore P001: reason -->.

Limits: only Markdown documents are checked, and the after-edit check sees only the host's edit and write — a change through Bash gets none. Phrase matching cannot tell a term from the everyday word; judging that is the agent's job, on the occurrences a change check hands it.

Using it

pi-dent loads it; standalone, pi install npm:pi-dent-terms adds it to pi's packages. Requires Node 26 or later. Without a terms file, find and check refuse and the after-edit check is off. Turn the check on with terms.checkAfterEdit: true in pi-dent's configuration file; a workspace's terms file overrides it with settings.checkAfterEdit. terms-tool.md, after-edit check owns these settings and their diagnostics.

Documentation

  • specs/terms.md — the terms file, prose, matching, checks, and operations; the exact rules.
  • specs/terms-tool.md — the Terms tool and the after-edit check.
  • docs/research/README.md — the experiments behind the design, non-normative.

License

MIT, see LICENSE.