testing

testing is a cursor rule for Cursor from onesimplecode/agent-engineering-standards. It costs 42 tokens per session (587 once invoked), scanned A, original, MIT.

A set of engineering rules for testing software and AI-agent modules. It covers test-first development, coverage targets, model-change benchmarks, evaluation files, and checking that actions actually changed external state.

In plain words
What is it for?
Use it to set testing expectations, measure coverage, compare language-model changes, run agent evaluations, and verify file, record, message, or tool updates.
Why use it?
It gives teams consistent standards for proving that code and agent actions work correctly.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to set testing expectations, measure coverage, compare language-model changes, run agent evaluations, and verify file, record, message, or tool updates.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/onesimplecode/agent-engineering-standards/testing
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.

Clone the repo
git clone --depth 1 https://github.com/onesimplecode/agent-engineering-standards

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 testing

README.md
[![agentmods](https://agentmods.dev/badge/rules/onesimplecode/agent-engineering-standards/testing/github.svg)](https://agentmods.dev/rules/onesimplecode/agent-engineering-standards/testing)
Your own site
<a href="https://agentmods.dev/rules/onesimplecode/agent-engineering-standards/testing"><img src="https://agentmods.dev/badge/rules/onesimplecode/agent-engineering-standards/testing/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 testing

Your own site · 80×15
<a href="https://agentmods.dev/rules/onesimplecode/agent-engineering-standards/testing"><img src="https://agentmods.dev/badge/rules/onesimplecode/agent-engineering-standards/testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 587 The whole file, excluding the scripts and references it only reads on demand.
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.00042 $0.00587
Opus 5.5 $0.00017 $0.00235
Sonnet 5.5 $0.00008 $0.00117
Haiku 4.5 $0.00004 $0.00059

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

Security

Grade A, and why

testing 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 1mo 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.

examples/cursor-rules/.cursor/rules/testing.mdc · 33 lines

How it starts

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

Testing

TR-TEST-001 — TDD required for core logic

Tests are written before or alongside core logic. Scaffolding may come first, but business logic should not be considered complete without tests.

TR-TEST-002 — Coverage targets by deployment tier

POC projects may use targeted coverage. Local Production targets at least 70 percent coverage. Cloud Production targets at least 90 percent coverage.

TR-TEST-004 — LLM regression benchmark on model switch

When switching or upgrading a runtime LLM, run a standard task set against the old and new models and record cost, latency, correctness, and schema validation deltas. See templates/llm-regression-benchmark.md.

TR-TEST-005 — LLM eval files co-located with agent modules

Each agent module that makes LLM calls should have a co-located tests/evals/test__eval.py file with golden cases, a score function, and an LLM_EVAL=true guard so evals do not run in the standard unit suite. See templates/llm-eval.md.

TR-TEST-006 — Post-write state change verification for agent actions

Agent actions that produce external side effects, such as writing files, updating records, sending messages, or calling tools, should be followed by a deterministic verification step that confirms the observable state changed as expected.

TR-TEST-007 — Agent security-property claims verified against ground truth, not self-report

A claim about an agent's own behavior — obtained only by asking the agent in conversation ("do you have tool X," "do you remember Y") — is not verification evidence for a security-relevant property: isolation between agents, a permission boundary, or memory/session scoping. An agent's self-report can produce a false pass when the question is answered by the wrong backend, a stale cache, or the agent's own (possibly incorrect) belief about its state, none of which is the property actually under test. Verify instead against the system's own ground truth — the target API's own list/read endpoint, a database row, a server log line — independent of what the agent under test reports. This is a security-property-specific instance of the general "verify before referencing" discipline (TR-GOV-001's single-source-of-truth cousin, applied to runtime claims rather than static code symbols): the authoritative source for whether an isolation boundary holds is the boundary's own enforcement point, never the agent's narration of it.

Read the full file on GitHub · 33 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. 1mo ago First seen · 33 lines · 42 tokens per session scan A 708233689014

Subscribe to this mod's changes

testing is a cursor rule published in the GitHub repository onesimplecode/agent-engineering-standards (3 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 587 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-31.