project-rules

project-rules is a cursor rule for Cursor from peva3/anchor. It costs 595 tokens per session, scanned A, original, MIT.

A set of project rules for an Anchor codebase, including required reading, quality checks, folder structure, commit style, and pull-request limits. Anchor is the project these rules were written for.

In plain words
What is it for?
Use it when working in the covered project to follow its documentation, testing, linting, file-structure, commit, and pull-request requirements.
Why use it?
It gives an agent the project’s expected working practices before it changes code or prepares a commit.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions AGENTS.md.

Good fit Use it when working in the covered project to follow its documentation, testing, linting, file-structure, commit, and pull-request requirements.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/peva3/anchor/project-rules
View source ↗ peva3/anchor
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/peva3/anchor

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 project-rules

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/peva3/anchor/project-rules"><img src="https://agentmods.dev/badge/rules/peva3/anchor/project-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 595 This file is loaded in full into every session.
When invoked 595 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.00595 $0.00595
Opus 5.5 $0.00238 $0.00238
Sonnet 5.5 $0.00119 $0.00119
Haiku 4.5 $0.00060 $0.00060

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

Security

Grade A, and why

project-rules 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.

.cursor/rules/project-rules.mdc · 76 lines

How it starts

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

Cursor AI Rules

These rules are loaded automatically for this project. See AGENTS.md for full details.

Core Directives

  1. Read AGENTS.md before any task — All rules are defined there
  2. Read DEEPDIVE.md — System architecture narrative
  3. Follow every section — Core principles, commit protocol, testing, linting, etc.

Critical Enforcements

Pre-Commit Checklist

ruff check .
ruff format .
vulture .
mypy .

Do not commit until all pass. (Section 9)

Required Folders

Every project MUST have:

  • tests/ — All tests + random scripts (in .gitignore)
  • docs/ — Architecture documentation
  • research/ — Whitepapers, references

Commit Style

Human-sounding, WHY-focused messages. Example:

api: Added JWT refresh to prevent 401 loops

The token refresh had a race condition where concurrent requests
could trigger multiple refresh calls. Added mutex lock around auth state.

See Section 15 for the full pattern.

PR Standards (Section 33)

  • 800 lines max, 500 for complex logic
  • Single feature per PR
  • Use the PR template (Section 35)

AI Code Quality (Section 34)

Self-check: think first, spot laziness, uncertainty, bloat.

Pre-Commit Hooks (Section 37)

Mandatory. Install once: pre-commit install. Hooks run on every commit.

Decision Ladder (Section 50.1)

Before any implementation: YAGNI → stdlib → native → existing dep → one line → minimum.

Tradeoff Comments (Section 50.2)

For every intentional shortcut, document with # ponytail: <what> / # Upgrade to <what> if <trigger>.

Prohibited

  • No PRs/issues/GitHub activity without explicit user approval (Section 2)
  • No dead code, unused imports, silent exception handlers (Section 1)
  • No commits without running lint/vulture sweep first (Section 9)
  • No mutable default arguments, bare excepts, eval/exec (Section 27.2)
  • No force push to shared branches (Section 36.2)
  • No PRs over 800 lines (Section 33)
  • No skipping pre-commit hooks (Section 37)

Read the full file on GitHub · 76 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 · 76 lines · 595 tokens per session scan A e59334308bd7

Subscribe to this mod's changes

project-rules is a cursor rule published in the GitHub repository peva3/anchor (8 stars, last pushed 1mo ago), licensed MIT. It adds 595 tokens to every session, about $0.0024 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.