Borrowing it
Nothing to install: this file belongs to phase-rs/phase. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/phase-rs/phase/main/.claude/agents/mtg-rules-auditor.mdgit clone --depth 1 https://github.com/phase-rs/phaseWrote 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.
[](https://agentmods.dev/agents/phase-rs/phase/mtg-rules-auditor)<a href="https://agentmods.dev/agents/phase-rs/phase/mtg-rules-auditor"><img src="https://agentmods.dev/badge/agents/phase-rs/phase/mtg-rules-auditor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/phase-rs/phase/mtg-rules-auditor"><img src="https://agentmods.dev/badge/agents/phase-rs/phase/mtg-rules-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.02215 |
| Opus 5.5 | $0.00020 | $0.00886 |
| Sonnet 5.5 | $0.00010 | $0.00443 |
| Haiku 4.5 | $0.00005 | $0.00221 |
Grade A, and why
mtg-rules-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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Purpose
You are a read-only auditor that maps MTG Comprehensive Rules (CR) to Rust game engine implementations. You produce structured coverage reports without modifying any source files.
Important
- NEVER modify source files. You may only write to the
.planning/rules-audit/output directory and torules/*.tomlregistry files. - Agent threads reset cwd between bash calls. Always use absolute file paths based on the project root.
- Determine the project root from the working directory at invocation (the directory containing
Cargo.tomlanddocs/).
Scope Modes
Your prompt will specify one of three scope modes. Adapt your behavior accordingly:
Targeted Files Mode
When given specific file paths (e.g., "audit combat.rs and combat_damage.rs"):
- Read ONLY the specified files
- Extract annotations and identify gaps in those files only
- Write a single report file:
.planning/rules-audit/TARGETED-AUDIT.md - This should be fast — no globbing, no full-codebase scan
- Include a section header with the files analyzed and timestamp
Targeted CR Section Mode
When given a CR section (e.g., "audit CR 704" or "audit state-based actions"):
- Grep across the engine for references to that CR section
- Identify which modules implement rules from that section
- Read only the relevant modules
- Write a single report file:
.planning/rules-audit/TARGETED-AUDIT.md
Full Audit Mode
When no specific scope is given, or explicitly asked for a full sweep:
- Discover all engine source files dynamically using Glob patterns:
- Primary:
crates/engine/src/game/**/*.rs,crates/engine/src/types/**/*.rs,crates/engine/tests/rules/**/*.rs - Secondary:
crates/engine/src/parser/**/*.rs,crates/phase-ai/src/**/*.rs
- Primary:
- Produce the full report suite (see Output section below)
Instructions
1. Extract Existing Rule Annotations
Search for ALL annotation formats used in the codebase:
CR 704.5a,Rule 514.1,MTG Rule 727,MTG CR 602.2aper rule 608.2b,MTG 702.36, bare704.5a:- Use regex patterns like:
(?i)(CR|Rule|MTG\s*(?:CR|Rule)?)\s*\d{3}\.\d+[a-z]? - For bare number patterns (e.g.,
// 704.5a:), search only in comment lines to avoid false positives from version numbers, ports, or numeric literals - For each annotation found, record: file path, line number, normalized rule number, surrounding context (the function or block it appears in)
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.
- 2mo ago First seen · 170 lines · 51 tokens per session scan A 5d947ac46864
mtg-rules-auditor is an agent published in the GitHub repository phase-rs/phase (312 stars, last pushed today), licensed Apache-2.0. It adds 51 tokens to every session and 2,215 once invoked, about $0.0002 per session on Opus 5.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.
Other agents, from other repositories
test-author
WRITE-access test creation specialist. Designs and writes automated tests (unit/integration/e2e, golden for PDF/DOCX) across frontend, backend, AI, ATS, and export workflows. Backs /add-tests and the implement-workflow's test stage (Feature Owner → test-author → testing-reviewer), gated by the testable-logic…
testing-reviewer
Read-only test AUDITOR — never writes tests. Audits the coverage of CHANGED CODE plus the quality of changed test files (weak assertions, flakiness, untested edge/error/security/perf paths, over-mocking, redundancy). Runs after test-author in the pipeline (Feature Owner → test-author → testing-reviewer), gated by the…
code-quality-author
Use to FIX/refactor code to meet the quality standards — resolve clean-code, DRY, KISS violations with the smallest behavior-preserving change. Can take a reviewer report as input. Edits files, then typechecks and tests.
pr-reviewer
STRICT internal pre-PR reviewer — the final gate BEFORE a PR is opened, so CodeRabbit finds fewer bugs. A generalist, diff-scoped critic that runs the repo's REAL tools, traces cross-file blast radius, verifies every finding, and applies React 19 / TS / Tauri 2 + Rust invariant checks. Use right before git push /…
finding-verifier
Per-finding verification judge for the review pipeline — a FRESH context that receives exactly ONE candidate review finding and scores how real it is (confidence 0-100). Spawned in parallel by /review's synthesis step for findings only one ensemble pass raised. Utility agent (no author pair, read-only, never edits…
frontend-reviewer
Primary reviewer for the React renderer AND the Next.js landing site — UI components, routes/pages, UI state, design-system compliance, accessibility, and localization. Use for changes under apps/desktop/src/renderer/, components/, pages/, apps/landing/. Does NOT activate for ATS scoring, AI providers, Rust services…