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 $0.00423 $0.00423
Sonnet 5 $0.00169 $0.00169
Haiku 4.5 $0.00085 $0.00085

Measured 9d ago against content hash 1e135b3ecaec, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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.pynormalize(), quote_gate(), GateResult.
  • src/verbatim_citation_gate/judge.pyJUDGE_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. 9d 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 (3 stars, last pushed 10d ago), licensed MIT. It adds 846 tokens to every session, about $0.0042 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.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,153 tokens

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).

microsoft/vscode · 6,785 tokens

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).

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens