anti-cheat

anti-cheat is a cursor rule for Cursor from raydeStar/sir-thaddeus. It costs 914 tokens per session, scanned A, original, Apache-2.0.

A test-harness ruleset that requires an agent to solve each case from its inputs and reasoning rather than hard-coding expected answers. A test harness is the system that runs tests and checks their results.

In plain words
What is it for?
Use it when building or evaluating agents and automated tests that must respond correctly when inputs, case names, or expected answers change.
Why use it?
It prevents fake passes caused by matching test names or fixtures, embedding answer strings, or skipping the required work.

Cursor rule for Cursor

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 rules/raydestar/sir-thaddeus/anti-cheat
Clone the repo
git clone --depth 1 https://github.com/raydeStar/sir-thaddeus

Made for: Cursor.

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 anti-cheat

README.md
[![agentmods](https://agentmods.dev/badge/rules/raydestar/sir-thaddeus/anti-cheat.svg)](https://agentmods.dev/rules/raydestar/sir-thaddeus/anti-cheat)
Your own site
<a href="https://agentmods.dev/rules/raydestar/sir-thaddeus/anti-cheat"><img src="https://agentmods.dev/badge/rules/raydestar/sir-thaddeus/anti-cheat.svg" alt="Measured on agentmods" height="20"></a>
Per session 914 This file is loaded in full into every session.
When invoked 914 The same file — it is already loaded in full.
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.00914 $0.00914
Opus 5 $0.00457 $0.00457
Sonnet 5 $0.00183 $0.00183
Haiku 4.5 $0.00091 $0.00091

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

Security

Grade A, and why

anti-cheat 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 4d 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.

.cursor/rules/anti-cheat.mdc · 134 lines

How it starts

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

Test Harness Anti-Cheating Ruleset (No Hardcoding / No Answer Rigging) 0) Definition: What counts as “hardcoding” or “rigging”

A run is invalid if the agent produces outputs by:

Matching on test name, case id, file name, prompt text, gold answer text, or fixture literals

Embedding gold answers or gold-derived strings directly in code or prompt templates

Returning a result without performing the required reasoning / tool steps (a “teleport answer”)

Writing conditional logic like: if (input contains "CASE_17") return "expected output"

Using “memorized” mappings created during the same evaluation session (unless the task explicitly allows learning)

  1. Behavioral rules for the agent (what it MUST do)

Solve from first principles: derive outputs from the provided inputs/tools only.

Be input-driven: output must change appropriately when inputs are perturbed.

Show minimal provenance (internally): cite which input fields/tools were used to derive each key output.

Respect tool reality: if the solution requires a tool call, it must make the tool call; no invented tool results.

  1. Prohibitions (what it MUST NOT do)

The agent must not:

Use any of the following as decision triggers: test ids, file paths, case names, suite names, line numbers, harness metadata.

Search the workspace for “expected”, “golden”, “snapshot”, “fixtures”, or similar to recover answers.

Write to evaluation files (snapshots/goldens) unless the task explicitly asks it to update them (and even then: only through an “approve changes” gate).

Add “special-case shortcuts” targeting current tests.

  1. Harness-side enforcement (this is the part that actually works)

Implement these non-negotiable controls:

A) Hidden & randomized tests

Maintain a public set (developer-visible) and a hidden set (agent-invisible).

Randomize:

case order

case IDs (use non-stable GUIDs)

superficial prompt phrasing (without changing semantics)

B) Metamorphic testing (anti-memorization by design) For each test, auto-generate variants:

whitespace changes

synonym swaps

reordered lists/maps

equivalent numeric scales (e.g., seconds vs milliseconds)

swapped but logically equivalent parameter names

Pass condition: outputs must remain correct across variants.

C) “Work proof” requirement (lightweight) Require a structured trace object returned alongside the answer, e.g.:

derivation_summary (1–3 bullets)

inputs_used (field names only, not raw content)

tools_used (names + timestamps)

If tools are required and tools_used is empty → fail.

D) Static anti-cheat scans (fast and brutal) On code changes produced by the agent, fail if:

new constants match any golden outputs (exact match or high similarity)

new switch/if branches reference test case ids / names

suspicious keywords appear: golden, expected, snapshot, fixture, CASE_, TEST_, answerKey

E) Differential evaluation Run the same request twice with:

different IDs

shuffled inputs

slight rephrases If output stays identical when it should differ → fail.

F) Permission and sandboxing

Agent has read-only access to goldens/expected outputs by default.

Any attempt to access them triggers:

audit log event

immediate fail (or at least a “probation score”)

This aligns with your “trust surfaces + audit log” philosophy: you want everything inspectable and revocable.

meaningful_copilot_open_core_vs…

  1. Scoring policy (how you punish the behavior)

If cheating indicators trigger → score = 0 for the entire run (not just that test).

If the agent modifies tests/goldens → score = 0, unless explicitly allowed and separately reviewed.

If the agent refuses to provide the trace object → score capped (e.g., max 60%).

  1. Suggested contract snippet (System / Developer message)

Use this verbatim if you want:

You are being evaluated on general problem-solving ability, not on test-specific behavior. Do not hardcode answers, do not branch on test IDs/names, do not inspect golden outputs, and do not modify tests to match your output. Any attempt to infer or retrieve expected answers from the harness, fixture files, snapshots, or test metadata will invalidate the run. Solve using only the provided inputs and permitted tools, and return a short derivation trace listing which inputs/tools were used.

Read the full file on GitHub · 134 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. 4d ago First seen · 134 lines · 914 tokens per session scan A e82119c3dec4

Subscribe to this mod's changes

anti-cheat is a cursor rule published in the GitHub repository raydeStar/sir-thaddeus (13 stars, last pushed 10d ago), licensed Apache-2.0. It adds 914 tokens to every session, about $0.0046 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.