regression-audit

A post-change audit command that checks the edited code module and every part of the project that depends on it.

In plain words
What is it for?
Use it after changing code, for a named module, or to create an initial REGRESSION.md record of module dependencies and acceptance commands.
Why use it?
It helps catch regressions—new problems caused elsewhere by a code change—that ordinary checks on the edited module may miss.

Command

Part of the docs-governance plugin — 8 skills, 7 commands, 6 agents, 1 hook 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 commands/seekers2001/docs-governance/regression-audit
Clone the repo
git clone --depth 1 https://github.com/Seekers2001/docs-governance

Or install docs-governance, the plugin that ships this one along with the rest of its 8 skills, 7 commands, 6 agents, 1 hook.

Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 588 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.00066 $0.00588
Opus 5 $0.00033 $0.00294
Sonnet 5 $0.00013 $0.00118
Haiku 4.5 $0.00007 $0.00059

Measured 3d ago against content hash 496da3a28b11, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

regression-audit 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 3d ago.

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.

commands/regression-audit.md · 31 lines

What it actually says

调用 regression-auditor 子 agent 对当前工作目录的项目做模块回归审计。方法论唯一源在 skills/module-regression/SKILL.md

用户参数:$ARGUMENTS

三种用法

1. /regression-audit(日常,改完就跑)git status -s / git diff --name-only 自动定位本次改动涉及的模块 → 查台账下游 → 跑"本模块 + 全部下游"的验收命令 → 出红绿审计摘要。任何一条红 = 不可交付

2. /regression-audit 模块名 跳过自动定位,直接对指定模块及其下游做回归。

3. /regression-audit init(首跑建台账) 项目还没有 REGRESSION.md 时:

  • 扫项目的 import / require / 调用关系,按模块聚合出"谁依赖谁",生成台账草稿(下游列表标注"脚本生成勿手改");
  • 验收命令留空待填——先从项目现有 tests/ 和对账脚本里找候选填入并标"待确认",找不到的模块如实标"⚠️ 缺验收命令"(这是台账缺口,不许编);
  • 生成后提示用户逐模块确认验收命令,并在项目 CLAUDE.md 挂指路牌。
  • 模板参考 templates/REGRESSION.example.md

执行要求

  1. 台账不存在且不是 init → 报告并建议先跑 init,不要瞎猜依赖关系。
  2. 审计员只跑只报不修;红了给出哪红、为什么红,修复由主会话完成后重跑本命令直到全绿。
  3. 全绿后提醒:本次审计结果值得一行 PROJECT_LOG.md(有 pre-commit 护栏的项目 commit 时自然会要求)。
  4. 汇报用审计摘要表格(模块/命令/退出码/结论),不要谎报"完成"。
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. 3d ago First seen · 31 lines · 66 tokens per session scan A 496da3a28b11

Subscribe to this mod's changes

regression-audit is a command published in the GitHub repository Seekers2001/docs-governance (11 stars, last pushed 20d ago), licensed MIT. It adds 66 tokens to every session and 588 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-08-31.