Borrowing it
Nothing to install: this file belongs to rjmurillo/ai-agents. 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/rjmurillo/ai-agents/main/.github/instructions/canonical-source-mirror.instructions.mdgit clone --depth 1 https://github.com/rjmurillo/ai-agentsWrote 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/instructions/rjmurillo/ai-agents/canonical-source-mirror)<a href="https://agentmods.dev/instructions/rjmurillo/ai-agents/canonical-source-mirror"><img src="https://agentmods.dev/badge/instructions/rjmurillo/ai-agents/canonical-source-mirror.svg" alt="Measured on agentmods" 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.05026 | $0.05026 |
| Opus 5 | $0.02513 | $0.02513 |
| Sonnet 5 | $0.01005 | $0.01005 |
| Haiku 4.5 | $0.00503 | $0.00503 |
Grade B, and why
ai-agents canonical-source-mirror.instructions.md scanned grade B with 1 finding 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 today.
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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
Situations 3 and 4 leave no source line to grep for. Situation 4 used to fall back to `**`, which inverted intent: narrowing a rule to `.claude/**` read like a reduction in scope and silently widened it to every turn in How it starts
The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Canonical Source Mirror Rule
When a component's docstring, comment, or README claims to "match", "mirror", "align with", or "extend" an existing source (a regex, a schema, a function signature, a set of exit codes, a JSON contract), the claim is a load-bearing assertion. The reader trusts it. So does the reviewer. So does the next maintainer who replays the contract from your code instead of from the source.
This rule binds those claims to evidence. It exists because PR #1887 (the M4 evidence-rule guard) was designed against an imagined contract instead of the canonical scripts/validate_session_json.py:CONTRADICTION_PATTERNS regex. The error survived several reviews. Aligning M4 to canonical took 7 fix commits. The retrospective at .agents/retrospective/2026-05-05-pr-1887-iteration-paradox.md names this anti-pattern "confident incorrectness": partial signal, premature conclusion, confident delivery, multi-round correction.
What this rule binds
This rule binds any new component under .claude/hooks/, .claude/rules/, scripts/validation/, build/scripts/, .claude/skills/, .github/prompts/, .agents/governance/, or .agents/retrospective/ whose contract is derived from another source in the repository. The two Copilot-side mirrors scope differently by consumer. .github/instructions/canonical-source-mirror.instructions.md, read by Copilot in full-repo context, keeps the full path set (.claude/hooks/**, .claude/rules/**, scripts/validation/**, build/scripts/**, .claude/skills/**, .github/prompts/**, .agents/governance/**, .agents/retrospective/**). Its src/copilot-cli/ twin ships inside the plugin, so it narrows to the paths that travel with the plugin (scripts/validation/**, build/scripts/**, .github/prompts/**). The rule still binds the .claude/ paths on the Claude side. Examples:
- A pre-push hook that "mirrors" a CI validator's regex.
- A skill helper that "matches" the exit codes of a validator script.
- A build script that "extends" a schema defined in another module.
- An adapter that "aligns with" the wire format produced by an existing emitter.
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.
- today Changed 37b858887274
- 4d ago First seen · 202 lines · 5,026 tokens per session scan B 3ff8e8eb6ce3
ai-agents canonical-source-mirror.instructions.md is an instructions file published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed today), licensed MIT. It adds 5,026 tokens to every session, about $0.0251 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.