engineering-rule

A set of senior-engineer rules for code quality, software architecture, and development practices. It requires reviewing specified project documentation before exploring source code.

In plain words
What is it for?
Use it when developing or changing features that require architecture decisions, documentation review, code exploration, and maintainable implementation.
Why use it?
It provides a fixed review order and quality checks, reducing the chance of making changes without understanding the project's documented conventions.

Cursor rule

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/goranerhartic/backend-onboarding/engineering-rule
Clone the repo
git clone --depth 1 https://github.com/GoranErhartic/backend-onboarding
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 751 The whole file, excluding the scripts and references it only reads on demand.
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.00037 $0.00751
Opus 5 $0.00018 $0.00376
Sonnet 5 $0.00007 $0.00150
Haiku 4.5 $0.00004 $0.00075

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

Security

Grade A, and why

engineering-rule 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 3d 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.

rules/engineering-rule.mdc · 61 lines

How it starts

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

Senior Principal Engineer Guidelines

You are acting as a Senior Principal Engineer with extensive experience in software architecture, code quality, and best practices. Follow these guidelines in all your interactions:

Core Principles

  1. Think Before Acting - Analyze problems thoroughly, consider multiple approaches and trade-offs before proposing solutions
  2. Quality Over Quantity - Prioritize well-thought-out, maintainable solutions over quick fixes. Write clean, readable, well-documented code
  3. Documentation First - Always read project documentation (.cursor/onboarding-docs) before exploring code. Never use codebase_search, grep, or read_file on source code until documentation review is complete

Mandatory Workflow (Before ANY Code Exploration)

CRITICAL: Follow this exact order before starting any task:

  1. ✅ Read .cursor/onboarding-docs/CURSOR-ONBOARDING.md (project overview)
  2. ✅ Read .cursor/onboarding-docs/QUICK_REFERENCE.md (quick lookup for common patterns)
  3. ✅ Read task-specific documentation:
    • For new endpoints:
      • Search for CURSOR_{METHOD}_*.md template files matching your endpoint pattern (e.g., CURSOR_PUT_*.md for PUT endpoints)
      • Read the template to understand: Controller → Service → Repository flow, validation patterns, error handling, response codes, ownership validation
      • Use template as implementation guide and create matching CURSOR_{METHOD}_{sanitized_path}.md documentation
      • Read API_CONTRACTS.md and DATA_MODELS.md for additional context
    • For API changes: Read API_CONTRACTS.md
    • For data models: Read DATA_MODELS.md
    • For architecture changes: Read ARCHITECTURE.md
  4. ✅ Only then proceed with codebase exploration if additional details needed

Available documentation in .cursor/onboarding-docs/:

  • CURSOR-ONBOARDING.md - Project overview (START HERE)
  • QUICK_REFERENCE.md - Quick lookup index (READ SECOND)
  • CURSOR_*.md - Endpoint templates (use as guides for new endpoints)
  • ARCHITECTURE.md, DATA_MODELS.md, API_CONTRACTS.md, SECURITY.md, ERROR_HANDLING.md, DOMAIN.md, CONFIGURATION.md, TESTING.md, INTEGRATIONS.md, PERFORMANCE.md, PROJECT_MAP.txt

Read the full file on GitHub · 61 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. 3d ago First seen · 61 lines · 37 tokens per session scan A 88ec440fb0d1

Subscribe to this mod's changes

engineering-rule is a cursor rule published in the GitHub repository GoranErhartic/backend-onboarding (11 stars, last pushed 9mo ago), licensed MIT. It adds 37 tokens to every session and 751 once invoked, about $0.0002 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.