standards

standards is a cursor rule for Cursor from bernierllc/agents-environment-config. It costs 0 tokens per session (3,529 once invoked), scanned A, original, MIT.

A testing rule that says internal systems should not be replaced with mocks during tests. A mock is a fake version of a real dependency used to isolate a test.

In plain words
What is it for?
Use it when writing or reviewing tests for software whose own internal services, modules, or components need to be tested together.
Why use it?
Tests that replace internal parts with fakes can pass even when those parts do not work together correctly. This rule keeps testing focused on real internal behavior and connections.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when writing or reviewing tests for software whose own internal services, modules, or components need to be tested together.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bernierllc/agents-environment-config/standards
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/bernierllc/agents-environment-config

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 standards

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/bernierllc/agents-environment-config/standards"><img src="https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 3,529 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.00000 $0.03529
Opus 5.5 $0.00000 $0.01412
Sonnet 5.5 $0.00000 $0.00706
Haiku 4.5 $0.00000 $0.00353

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

Security

Grade A, and why

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

.cursor/rules/frameworks/testing/standards.mdc · 294 lines

How it starts

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

Testing Standards (No Mocking Internal Systems)

Core Testing Policy

If we own it or write it, we test it directly - we do NOT mock it in tests.

Critical Rules

  • DO NOT mock the database or the internal API
  • Use a real database instance and real HTTP calls
  • Mocks are only allowed for external third-party services
  • Tables, code, configuration, and definitions that we own and that affect the code we own inside of 3rd party systems should be tested because we own it

Principles

  • Prefer small, fast tests near the code; grow realism as you move up the test pyramid.
  • Test against real systems we own - database, APIs, services, models, repositories
  • Mocks are ONLY allowed for external third-party services we do not control
  • Avoid global toggles that bypass tests; failures must be fixed or the test adjusted with rationale

No Mocking Internal Systems Policy

What NOT to Mock (We Own It)

  • Database: Never mock Prisma, database queries, or repositories - use real database instances
  • Internal APIs: Never mock our own API endpoints - make real HTTP calls
  • Internal Services: Never mock service classes we own and maintain
  • Tables/Models: Never mock database tables, models, or their relationships
  • Configuration: Never mock config that we own and control
  • Definitions in 3rd-party systems: If we define tables/schemas/config in external systems, test the real thing because we own it

What CAN Be Mocked (External Third-Party Only)

  • External APIs: Stripe, SendGrid, Twilio, Google APIs (when not testing our own code within them), etc.
  • External services: OAuth providers (when not testing auth flow)
  • Network conditions: Simulating timeouts, errors from external services
  • Rate-limited services: When testing without burning API quota

Rationale

Mocking internal systems creates tests that pass when the mock is correct but fail in production when the real system behaves differently. Tests against mocks only verify that code works with the mock, not with the real system. If we own it, we must test it directly.

Read the full file on GitHub · 294 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 · 294 lines · 0 tokens per session scan A 733c2be82f16

Subscribe to this mod's changes

standards is a cursor rule published in the GitHub repository bernierllc/agents-environment-config (11 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,529 tokens. 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.