canon-diff

A command that shows recent changes to a project's central brand-rules file, including additions, removals, and edits.

In plain words
What is it for?
Use it to review changes from a recent period, inspect changes since a date, or start a rollback to a previous snapshot.
Why use it?
It makes it easier to see how the rules changed over time and, when confirmed, restore an earlier saved version.

Command

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/saigonxiii/evc/canon-diff
Clone the repo
git clone --depth 1 https://github.com/SaigonXIII/evc
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 858 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.00034 $0.00858
Opus 5 $0.00017 $0.00429
Sonnet 5 $0.00007 $0.00172
Haiku 4.5 $0.00003 $0.00086

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

Security

Grade A, and why

canon-diff 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 2d 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.

_templates/commands/canon-diff.md · 117 lines

How it starts

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

Canon Diff

Show recent changes to brand/canon-rules.json — what was added, removed, or modified. Backed by brand/canon-history/CHANGELOG.md which is auto-maintained by the canon-changelog hook on every session stop.

Usage

/project:canon-diff                  # changes since last snapshot
/project:canon-diff 7d               # last 7 days
/project:canon-diff 30d              # last 30 days
/project:canon-diff 2026-01-01       # since a specific date
/project:canon-diff restore [stamp]  # rollback to a prior snapshot (confirm required)

Steps

1. Check changelog exists

Read brand/canon-history/CHANGELOG.md. If missing, print:

No canon history yet. The canon-changelog hook will start tracking changes on the next edit.

And exit.

2. Parse args

  • No arg → show all entries since the most recent snapshot
  • [N]d → show entries from the last N days
  • YYYY-MM-DD → show entries since that date
  • restore [stamp] → enter restore flow (see step 5)

3. Extract relevant entries

Parse the CHANGELOG.md. Each entry is a markdown section beginning with ## YYYY-MM-DD HH:MM — canon modified and ending at ---.

Filter entries by the date range from step 2.

4. Render output

Print entries in this format:

CANON CHANGELOG — [filter description]
════════════════════════════════════════════════════

[N] changes across [M] entries

───────────────────────────────────────────────────
2026-04-05 14:32 — canon modified

Added:
  banned_phrases: "crypto casino"
  framing_red_flags: "web3 for all"

Removed:
  defunct_partners: "OldBrand"

Modified:
  required_language.company_anchor:
    OLD: "Acme does X"
    NEW: "Acme does X for Y"
───────────────────────────────────────────────────
[next entry...]

At the bottom show a summary:

Summary:
  Entries: [N]
  Adds: [N]    Removes: [N]    Modifications: [N]
  Latest snapshot: brand/canon-history/snapshots/canon-[stamp].json

5. Restore flow (optional)

If the user passed restore [stamp]:

Read the full file on GitHub · 117 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. 2d ago First seen · 117 lines · 34 tokens per session scan A 3b7a03c25831

Subscribe to this mod's changes

canon-diff is a command published in the GitHub repository SaigonXIII/evc (56 stars, last pushed 2mo ago), licensed MIT. It adds 34 tokens to every session and 858 once invoked, about $0.0002 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-30.