quality

quality is a cursor rule for Cursor from m3taz-ahmed/ai-globals. It costs 553 tokens per session, scanned A, original, MIT.

A set of coding and testing rules that defines quality checks for an application. It requires strict types, small focused methods, separated responsibilities, tests, and coverage targets.

In plain words
What is it for?
Use it to guide implementation and review across PHP, JavaScript, Python, and Go projects, including fast tests during development and the full test suite before delivery.
Why use it?
Shared rules make reviews and automated checks more consistent across a team or project. They also catch missing tests, unclear types, duplicated logic, and oversized code earlier.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to guide implementation and review across PHP, JavaScript, Python, and Go projects, including fast tests during development and the full test suite before delivery.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/m3taz-ahmed/ai-globals/quality
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/m3taz-ahmed/ai-globals

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 quality

README.md
[![agentmods](https://agentmods.dev/badge/rules/m3taz-ahmed/ai-globals/quality.svg)](https://agentmods.dev/rules/m3taz-ahmed/ai-globals/quality)
Your own site
<a href="https://agentmods.dev/rules/m3taz-ahmed/ai-globals/quality"><img src="https://agentmods.dev/badge/rules/m3taz-ahmed/ai-globals/quality.svg" alt="Measured on agentmods" height="20"></a>
Per session 553 This file is loaded in full into every session.
When invoked 553 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.00553 $0.00553
Opus 5 $0.00277 $0.00277
Sonnet 5 $0.00111 $0.00111
Haiku 4.5 $0.00055 $0.00055

Measured 7d ago against content hash ced3d3eef3fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

quality 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 7d 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/quality.mdc · 27 lines

What it actually says

[FILE] quality.mdc [OBJ] Quality gates. [RULES]

  1. [REQ] [CODE-01] Service-Repo separation. Thin controllers.
  2. [REQ] [CODE-02] Strict typing. No any / mixed / unknown abuse.
  3. [REQ] [CODE-03] Class <300 lines, method <30 lines.
  4. [REQ] [CODE-04] Enums/constants over magic strings.
  5. [REQ] [CODE-05] SOLID & DRY.
  6. [REQ] [TEST-01] Mandatory coverage.
  7. [REQ] [TEST-02] AAA pattern. One behavior per test.
  8. [REQ] [TEST-03] Factories/seeders. No hardcoded IDs/dates.
  9. [REQ] [TEST-04] Pest 3+ (backend), Vitest+RTL (frontend), pytest (Python), go test (Go).
  10. [REQ] [TEST-06] 80% logic, 90% API, 70% total coverage.
  11. [REQ] [TEST-07] Two-tier testing: FAST (targeted, ~5s, during iteration) + FULL (complete suite + coverage, before done). See workflows/testing-tiers.md.
  12. [REQ] [TEST-08] Per-stack commands: PHP artisan test --filter= / artisan test; JS vitest run <file> / vitest run --coverage; Python pytest <file> --no-cov / pytest --cov; Go go test <pkg> -short / go test ./... -cover.
  13. [REQ] [TEST-09] If no test framework exists, write the first test for touched code before done.
  14. [REQ] [TEST-10] Mark slow tests (E2E, integration, model-loading) with framework skip mechanism. Fast tier stays under 5s.
  15. [PROHIBIT] No inline imports (await import()). No downgrade deps for type errors.
  16. [PROHIBIT] No TODO/FIXME without ticket tag.
  17. [PROHIBIT] No full test suite on every change (use FAST tier). No skipping FULL tier before done.
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. 7d ago First seen · 27 lines · 553 tokens per session scan A ced3d3eef3fb

Subscribe to this mod's changes

quality is a cursor rule published in the GitHub repository m3taz-ahmed/ai-globals (5 stars, last pushed yesterday), licensed MIT. It adds 553 tokens to every session, about $0.0028 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.