feat(FR-3052): terminology governance — approved verbs, unknown-term checker, precedence & rename rules#7748
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage Report for root-coverage
File CoverageNo changed files found. |
There was a problem hiding this comment.
Pull request overview
Introduces a more formal “terminology governance” workflow for Backend.AI WebUI documentation and i18n, by extending the terminology termbase schema/content and enhancing the terminology lint script with an opt-in heuristic for surfacing likely-new user-facing terms.
Changes:
- Added a
verbslexicon toterminology.json(and schema) and generated an “Approved Verbs” section inTERMINOLOGY.md. - Extended
scripts/check-terminology-i18n.mjswith opt-in CHECK 3 (--check3) to report unknown capitalized nouns in English prose, plus a new allowlist mechanism (ignoreNouns). - Documented terminology precedence and rename/deprecation governance rules in
TERMINOLOGY.mdandAGENTS.md.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/terminology-i18n.allowlist.json | Adds ignoreNouns allowlist entries to suppress known proper nouns/product names in CHECK 3. |
| scripts/check-terminology-i18n.mjs | Adds CHECK 3 implementation + CLI flag and reporting; wires allowlist support for ignoreNouns. |
| packages/backend.ai-webui-docs/terminology.schema.json | Extends schema to support verbs[] entries and clarifies avoid[] as noun/phrase-only for CHECK 1. |
| packages/backend.ai-webui-docs/TERMINOLOGY.md | Adds precedence + governance prose and introduces a generated “Approved Verbs” section. |
| packages/backend.ai-webui-docs/terminology.json | Adds the initial verbs[] lexicon entries (Cancel/Delete/Remove/Terminate/Stop/Deactivate/Purge/Hide). |
| packages/backend.ai-webui-docs/scripts/generate-terminology.mjs | Adds optional marker support and renderer for the generated verbs table. |
| AGENTS.md | Documents terminology precedence for contributors/agents. |
b5e084b to
e836878
Compare
…checker, precedence & rename rules Builds on FR-3048 (machine-readable terminology.json single source of truth). Three tightly-coupled deliverables: - verbs[]: new top-level array in terminology.json (8 context-qualified entries: cancel/delete/remove/terminate/stop/inactivate→Deactivate/purge/hide) + terminology.schema.json (verbs property + verbEntry def) + generate-terminology.mjs renders an "## Approved Verbs" table into TERMINOLOGY.md (markers; --check green). Lexical, not behavioral — orthogonal to the destructive-confirmation UX. - CHECK 3: unknown capitalized-noun candidate detector in check-terminology-i18n.mjs — flags i18n VALUES using a term not yet in the termbase. OFF by default (--check3 opt-in, mirrors --check2), always report-only and non-blocking (--strict --check3 exits 0); + ignoreNouns allowlist. - governance docs: "## Precedence" + "## Governance" (Term Owner of Record, New-Term Gate) + "## Rename / Deprecation Checklist" in TERMINOLOGY.md (all outside the auto-gen markers); "### Terminology Precedence" in AGENTS.md (CLAUDE.md is a symlink to it). No new dependency (native Node ESM only). bash scripts/verify.sh => ALL PASS; generate-terminology.mjs --check green; checker non-blocking (default unknown-noun 0, opt-in --check3 = 25). Resolves #7740 (FR-3052) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
e836878 to
ba56fbb
Compare

Resolves #7740 (FR-3052)
Builds on FR-3048 (#7737, merged) — the machine-readable
terminology.jsonsingle source of truth + i18n terminology checker.What
Extends the FR-3048 termbase from nouns only to a full terminology-governance layer covering verbs, candidate-term detection, and the human process around both. Three tightly-coupled deliverables shipped as one PR (the governance prose references the verb-list rename flow and the new checker capability, so splitting them would create dangling references).
1. Approved verbs (
verbs[])verbs[]array interminology.json(8 entries: cancel, delete, remove, terminate, stop, inactivate→Deactivate, purge, hide), each context-qualified:id,intent(enum, all 8 covered exactly once),context,preferred.en, per-entryavoid[]of rejected synonyms, doc-onlyreversible, anddecidingFR.avoid[]rows (CHECK 1 whole-word-matches every i18n value and would fire on every Delete/Remove/Stop label) and not a siblingverbs.json(would double the schema/generator/drift surface).terminology.schema.jsongains averbsproperty +verbEntrydefinition (verbsintentionally not in rootrequired→ backward-compatible).generate-terminology.mjsrenders an## Approved Verbstable intoTERMINOLOGY.md, gated onterminology:auto:verbsmarkers. Round-trips idempotently (--checkgreen).2. Unknown-term checker (CHECK 3)
check-terminology-i18n.mjsgains CHECK 3 — flags capitalized user-facing nouns in i18n values not yet in the termbase (candidate new terms).--check3(mirrors--check2). Always report-only — every finding carriesseverity:"report"and provably cannot reach the--strictexit gate (which derivesblockingfrom CHECK 1 error-severity only).--strict --check3exits 0.verify.shandpnpm run lint:terminologydo not pass--check3→ the CI harness stays clean.ignoreNounsallowlist interminology-i18n.allowlist.jsonfor known proper nouns / product names.3. Governance docs (lexical, not behavioral)
TERMINOLOGY.md:## Precedence(live UI label >terminology.json> style guide),## Governance(Term Owner of Record = docs-lead, New-Term Gate built on CHECK 3's unknown-term report), and## Rename / Deprecation Checklist(atomic rename flow the verb list assumes). All prose lives outside theterminology:auto:*markers → generator--checkstays green.AGENTS.md: new### Terminology Precedencesubsection. (CLAUDE.mdis a symlink toAGENTS.md, so onlyAGENTS.mdis edited.)Scope guards
package.json/pnpm-lock.yaml/pnpm-workspace.yamlchanges; both scripts import onlynode:builtins.:::warning[Lexical, not behavioral]admonition, and per-entry descriptions).Verification
node packages/backend.ai-webui-docs/scripts/generate-terminology.mjs --check→ in sync (exit 0).node scripts/check-terminology-i18n.mjs --warn→ unknown-noun 0 (CHECK 3 off by default);--check3→ 25 report-only candidates;--strict --check3exits 0.bash scripts/verify.sh→=== ALL PASS ===(terminology step warn-only: 1 pre-existing CHECK 1 warn).Follow-ups (not in this PR)
terminology.jsonconcepts, then promote CHECK 3 toward a default warn — tracked separately.🤖 Generated with Claude Code