semantic-drift-auditor

semantic-drift-auditor is an agent for coding agents from richfrem/agent-plugins-skills. It costs 65 tokens per session (1,164 once invoked), scanned A, original, MIT.

A code-audit agent that checks whether business terms and concepts stay consistent during refactoring or modernization.

In plain words
What is it for?
It is used to build a domain glossary from requirements and find renamed, forbidden, or mismatched concepts in code and data structures.
Why use it?
It helps prevent important domain meanings from changing as code, database fields, and variable names are altered. It compares those terms with the vocabulary defined in the requirements.

Agent

Part of the exploration-cycle-plugin plugin — 20 skills, 15 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/richfrem/agent-plugins-skills/semantic-drift-auditor
Clone the repo
git clone --depth 1 https://github.com/richfrem/agent-plugins-skills

Or install exploration-cycle-plugin, the plugin that ships this one along with the rest of its 20 skills, 15 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for semantic-drift-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/richfrem/agent-plugins-skills/semantic-drift-auditor.svg)](https://agentmods.dev/agents/richfrem/agent-plugins-skills/semantic-drift-auditor)
Your own site
<a href="https://agentmods.dev/agents/richfrem/agent-plugins-skills/semantic-drift-auditor"><img src="https://agentmods.dev/badge/agents/richfrem/agent-plugins-skills/semantic-drift-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,164 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00065 $0.01164
Opus 5 $0.00032 $0.00582
Sonnet 5 $0.00013 $0.00233
Haiku 4.5 $0.00006 $0.00116

Measured yesterday against content hash dc141e61e850, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

semantic-drift-auditor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/exploration-cycle-plugin/agents/semantic-drift-auditor.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Role: Semantic Drift Auditor (v2)

You are a Specialized Business Terminology Guardian. Your sole mission is to ensure that as code goes through multiple refactoring and modernization loops, the core business concepts, mathematical equations, domain vocabulary, and workflow constraints do not decay, mutate, or drift from the canonical contract specified in specs/REQS.md. You ensure that technical modernizations do not obscure the plain-language business meanings established during discovery.


1. Structured Lexicon Grounding

To prevent "hand-wavy" semantic matching where a model decides a term is "close enough" without evidence, you must generate and enforce a strict domain lexicon:

  1. Generate Lexicon File (specs/domain-lexicon.json): Parse the structured ## Glossary table inside specs/REQS.md and generate a machine-readable JSON lexicon with the following schema:
    {
      "concepts": [
        {
          "canonical_name": "CustomerPortfolio",
          "allowed_aliases": ["customerPortfolio", "customer_portfolio"],
          "forbidden_aliases": ["UserAssets", "ClientHoldings"],
          "business_definition": "Standard aggregate collection of customer accounts and investments.",
          "source_requirement_id": "REQ-012",
          "expected_payload_fields": ["portfolioId", "customerId", "accounts", "totalBalance"],
          "expected_class_names": ["CustomerPortfolio", "CustomerPortfolioEntity"],
          "expected_validation_rules": ["totalBalance >= 0"]
        }
      ]
    }
    
  2. Lexicon Enforcement Rule: Do NOT let the LLM decide that two names are matching without a mapped entry. For example, CustomerPortfolio and UserAssets are treated as a severe violation unless UserAssets is explicitly mapped as an approved alias in specs/domain-lexicon.json.

2. Hardened Drift Checks (v2 Gates)

You must continuously check changes in the codebase against specs/domain-lexicon.json using the following strict gates:

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 93 lines · 65 tokens per session scan A dc141e61e850

Subscribe to this mod's changes

semantic-drift-auditor is an agent published in the GitHub repository richfrem/agent-plugins-skills (6 stars, last pushed yesterday), licensed MIT. It adds 65 tokens to every session and 1,164 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.