absolute-priority-premise

absolute-priority-premise is a cursor rule for Cursor from marcoemrich/mad-tdd-mob-ai-driven. It costs 1,934 tokens per session, scanned A, original, MIT.

A code-quality rule that scores code parts by assigning them a numerical “mass,” such as constants, function calls, conditions, loops, and assignments. Lower total mass is treated as simpler code.

In plain words
What is it for?
Reviewing code structure and comparing implementations using the Absolute Priority Premise scoring system.
Why use it?
It offers a fixed way to compare code complexity instead of relying only on personal judgment.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Reviewing code structure and comparing implementations using the Absolute Priority Premise scoring system.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/marcoemrich/mad-tdd-mob-ai-driven/absolute-priority-premise
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/marcoemrich/mad-tdd-mob-ai-driven

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 absolute-priority-premise

README.md
[![agentmods](https://agentmods.dev/badge/rules/marcoemrich/mad-tdd-mob-ai-driven/absolute-priority-premise/github.svg)](https://agentmods.dev/rules/marcoemrich/mad-tdd-mob-ai-driven/absolute-priority-premise)
Your own site
<a href="https://agentmods.dev/rules/marcoemrich/mad-tdd-mob-ai-driven/absolute-priority-premise"><img src="https://agentmods.dev/badge/rules/marcoemrich/mad-tdd-mob-ai-driven/absolute-priority-premise/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 absolute-priority-premise

Your own site · 80×15
<a href="https://agentmods.dev/rules/marcoemrich/mad-tdd-mob-ai-driven/absolute-priority-premise"><img src="https://agentmods.dev/badge/rules/marcoemrich/mad-tdd-mob-ai-driven/absolute-priority-premise.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,934 This file is loaded in full into every session.
When invoked 1,934 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.01934 $0.01934
Opus 5 $0.00967 $0.00967
Sonnet 5 $0.00387 $0.00387
Haiku 4.5 $0.00193 $0.00193

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

Security

Grade A, and why

absolute-priority-premise 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 9d 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/absolute-priority-premise.mdc · 204 lines

How it starts

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

Absolute Priority Premise (APP)

Description

Micah Martin's Absolute Priority Premise - an improvement on the Transformation Priority Premise that provides objective heuristics to compare code quality by assigning mass values to code components.

Core Concept

The APP assigns "mass" to different code components. Lower total mass indicates better, simpler code. The premise is that code with less mass is objectively better than code with more mass.

The Six Components (with Mass Values)

1. Constant (Mass: 1)

  • Literal values in code
  • Examples: 5, "hello", true, []
  • Lowest mass - preferred building block

2. Binding/Scalar (Mass: 1)

  • Variables, parameters, local names
  • Examples: amount, userName, result
  • Names that refer to values

3. Invocation (Mass: 2)

  • Function/method calls
  • Examples: calculate(), user.getName(), Math.max(a, b)
  • Calling existing functionality

4. Conditional (Mass: 4)

  • Control flow decisions
  • Examples: if, switch, case, cond, ?:
  • Branching logic

5. Loop (Mass: 5)

  • Iteration constructs
  • Examples: while, for, forEach, map
  • Repetitive execution

6. Assignment (Mass: 6)

  • Mutating variables (highest mass)
  • Examples: x = 5, count++, list.add(item)
  • State changes - most complex

Calculation Rules

Total Mass = Sum of All Components

Total Mass = (constants × 1) + (bindings × 1) + (invocations × 2) +
             (conditionals × 4) + (loops × 5) + (assignments × 6)

Comparison Guidelines

  • Lower mass = Better code
  • Functional style naturally scores lower (no assignments/loops)
  • Immutable approaches preferred over mutable ones
  • Simple expressions preferred over complex control structures

Special Counting Rules

Method Declarations

  • A method/function counts as both:
    • Constant (1) for the code it represents
    • Binding (1) for its name

Assignment Distinctions

  • Not every assignment counts as Assignment (6)
  • final fields and local variables are just Bindings (1)
  • Only re-assignments that modify values count as Assignment (6)
  • Local variable assignments may count as Binding (1) in some cases

Read the full file on GitHub · 204 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. 9d ago First seen · 204 lines · 1,934 tokens per session scan A 7f6b504abc7f

Subscribe to this mod's changes

absolute-priority-premise is a cursor rule published in the GitHub repository marcoemrich/mad-tdd-mob-ai-driven (33 stars, last pushed 10mo ago), licensed MIT. It adds 1,934 tokens to every session, about $0.0097 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.