verbatim-citation-gate: Instructions file for Codex

AGENTS.md

verbatim-citation-gate AGENTS.md is an instructions file for Codex, OpenCode from tonydzi/verbatim-citation-gate. It costs 846 tokens per session, scanned A, original, MIT.

A project instruction file for a Python package that checks whether quoted text is supported by a source before asking a language model to judge the citation. RAG means retrieval-augmented generation, where a system retrieves source text for an answer.

In plain words
What is it for?
Use it when changing the citation gate, quote normalization, model-based citation judging, tests, or the package's review and verification process.
Why use it?
It explains the project's central safety rule: perform a cheap exact text check before an expensive model-based review. This prevents unsupported quotes from reaching the second review stage.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is tonydzi/verbatim-citation-gate's own configuration. It tells Codex and OpenCode how to work on verbatim-citation-gate itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything verbatim-citation-gate configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tonydzi/verbatim-citation-gate. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tonydzi/verbatim-citation-gate/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/tonydzi/verbatim-citation-gate

Made for: Codex, OpenCode.

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 verbatim-citation-gate AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tonydzi/verbatim-citation-gate/agents-md/github.svg)](https://agentmods.dev/instructions/tonydzi/verbatim-citation-gate/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/tonydzi/verbatim-citation-gate/agents-md"><img src="https://agentmods.dev/badge/instructions/tonydzi/verbatim-citation-gate/agents-md/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.

agentmods 80×15 button for verbatim-citation-gate AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/tonydzi/verbatim-citation-gate/agents-md"><img src="https://agentmods.dev/badge/instructions/tonydzi/verbatim-citation-gate/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 846 This file is loaded in full into every session.
When invoked 846 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00846 $0.00846
Opus 5.5 $0.00338 $0.00338
Sonnet 5.5 $0.00169 $0.00169
Haiku 4.5 $0.00085 $0.00085

Measured 2mo ago against content hash 1e135b3ecaec, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

verbatim-citation-gate AGENTS.md 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.

AGENTS.md · 68 lines

How it starts

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

AGENTS.md — working in this repo

Written for AI coding agents, and equally readable by a human contributor. If you are an agent sent here to make a change, read this first; it is short on purpose.

What this repo is

A two-stage auditor for quote-style RAG citations. Stage 1 (gate.py) is a deterministic, zero-token, zero-dependency substring check over a normalized form. Stage 2 (judge.py) is a burden-of-proof prompt wired to any model through an llm_call callable.

The value of this package is the order of the two stages: the cheap deterministic question is asked before the expensive fallible one. A change that lets stage 2 run on a quote stage 1 has not cleared is a change to the thesis, not to the implementation — say so in the PR.

Stack and layout

  • Python ≥ 3.9, stdlib only. dependencies = [] in pyproject.toml is a feature, not an oversight. pytest is the only extra, and only for tests.
  • src/verbatim_citation_gate/gate.py — normalize(), quote_gate(), GateResult.
  • src/verbatim_citation_gate/judge.py — JUDGE_SYSTEM, judge_support(), audit_citation().
  • tests/test_gate.py — offline; the judge is exercised through a fake llm_call, so the whole control flow is covered with no API key and no network.
  • examples/quickstart.py — the smallest end-to-end use.

How to verify a change

pip install -e ".[test]"
pytest -q

Paste that output in the PR. If you touched normalize() or quote_gate(), also state what your change does to each of the four verdicts the gate can return (found, not_found, misattributed, and the frankenquote path) — a normalization change is never local, it moves the boundary of every match in the corpus.

If you touched JUDGE_SYSTEM, show a before/after on at least one prompt where the verdict changes, and one where it must not.

Conventions

  • Fail closed. Unparseable judge output must never become supports. Any new branch inherits this; if you add a code path that can return a verdict, prove what it does on garbage input.
  • No dependencies in the gate. Ever. If you believe stage 1 needs a library, open an issue first — it is a design change.
  • Verdicts are strings from a fixed set. Adding one is a breaking change for callers; it needs an issue and a version bump, not a quiet commit.
  • Type hints on public functions; docstrings that say what the function refuses to do, not only what it does.

Read the full file on GitHub · 68 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. 2mo ago First seen · 68 lines · 846 tokens per session scan A 1e135b3ecaec

Subscribe to this mod's changes

verbatim-citation-gate AGENTS.md is an instructions file published in the GitHub repository tonydzi/verbatim-citation-gate (6 stars, last pushed 13d ago), licensed MIT. It adds 846 tokens to every session, about $0.0034 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-31.

Related

verbatim-citation-gate AGENTS.md compared with instructions from other repositories

verbatim-citation-gate AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
verbatim-citation-gate AGENTS.mdtonydzi/verbatim-citation-gateInstructions file613d agoMITA846Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode