GOD-OBJECTS

A Cursor project rule that keeps code split into focused files instead of allowing one file to accumulate many unrelated responsibilities. It sets line-count limits and lists warning signs for oversized files.

In plain words
What is it for?
Guiding refactoring decisions, setting file-size boundaries and separating code into focused modules.
Why use it?
It helps prevent hard-to-maintain files that combine routing, permissions, execution, state and other jobs.

Cursor rule for Cursor

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/raydestar/sir-thaddeus/god-objects
Clone the repo
git clone --depth 1 https://github.com/raydeStar/sir-thaddeus

Made for: Cursor.

Per session 650 This file is loaded in full into every session.
When invoked 650 The same file — it is already loaded in full.
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.00650 $0.00650
Opus 5 $0.00325 $0.00325
Sonnet 5 $0.00130 $0.00130
Haiku 4.5 $0.00065 $0.00065

Measured yesterday against content hash 6e94f65bf99b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

GOD-OBJECTS 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 yesterday.

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/GOD-OBJECTS.mdc · 110 lines

How it starts

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

Cursor Rule: Prevent God-Objects and Giant Files

Use this as a hard project rule for Cursor (and for any future AI edits).


Prime Directive

Never grow a “god-object” file.

If a file is becoming a central dumping ground (routing + policy + execution + parsing + state), you must split it into focused modules before adding more features.


Hard Limits (non-negotiable)

1) File size limit

  • Max target: 500 lines per file.
  • Absolute max: 800 lines.

If a change would push a file over 800 lines, Cursor must:

  1. Stop adding features to that file.
  2. Extract new code into a new file/module.
  3. Update the calling file to delegate.

Exception: auto-generated files only (must be clearly marked and excluded).

2) One responsibility per file

A file may own exactly one of these responsibilities:

  • Routing / intent classification
  • Policy gating / permissions
  • Tool execution loop
  • Deterministic utilities
  • Memory retrieval / merge
  • Guardrails / reasoning pipeline coordination
  • UI / lifecycle / wiring

If a file begins owning 2+ responsibilities, Cursor must split it.


“God-Object” Smell Tests

If any are true, refactor immediately (no debate):

  • The file imports modules from 3+ distinct subsystems (e.g., routing + memory + tool runner + UI).
  • The file contains 3+ distinct sections separated by large comment banners.
  • A single class has 10+ methods or 10+ private fields.
  • The class name contains words like Orchestrator, Manager, Coordinator and it implements business logic instead of delegating.

Required Architecture Pattern

The Orchestrator Rule

The orchestrator/coordinator file must be thin:

  • It may perform sequencing and response assembly.
  • It may not contain regex heuristics, parsing logic, routing decisions, policy rules, or tool loop mechanics.

All logic must live behind interfaces:

  • IRouter
  • IPolicyGate
  • IToolLoopExecutor
  • IMemoryContextProvider
  • IGuardrailsCoordinator
  • IDeterministicUtilityEngine

Read the full file on GitHub · 110 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. yesterday First seen · 110 lines · 650 tokens per session scan A 6e94f65bf99b

Subscribe to this mod's changes

GOD-OBJECTS is a cursor rule published in the GitHub repository raydeStar/sir-thaddeus (13 stars, last pushed 8d ago), licensed Apache-2.0. It adds 650 tokens to every session, about $0.0032 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.