agentleFS
MawyxxMawyxx/Mawyxx-Prime/.cursor/rules/prime.mdc

Mawyxx-Prime / rules

Cursor rule2 starsChanged 56 days agoMITView on GitHub

MAWYXX PRIME — always load the standard, simulate every point, work by it

  • Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.

    Of the Cursor rule files we read, the 1,531 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

We split this prime.mdc into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    the standard wins: Never write code before steps 1–3 are done.

    line 11
  2. Distinctive:

    If it is NOT present — copy it into the repository root:

    line 20
  3. Distinctive:

    Read the file — DO NOT rely on a previous session.

    line 34
  4. Distinctive:

    Law→Gate: every MUST maps to a real gate.

    line 96
  5. Very specific:

    fix-until-green: never stop with exit ≠ 0; never ask the user to run tests.

    line 98
  6. Very specific:

    If download of the standard fails — retry once via https://github.com/Mawyxx/Mawyxx-Prime/blob/main/Mawyxx%20Prime%20V6.5.md, then stop and …

    line 110

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
prime.mdc
---
description: MAWYXX PRIME — always load the standard, simulate every point, work by it
alwaysApply: true
globs:
---

# MAWYXX PRIME — MANDATORY BOOT

You operate in **PRIME mode** for every task. The MAWYXX PRIME standard is the
single source of truth. If your habits or guesses conflict with the standard —
**the standard wins**. Never write code before steps 1–3 are done.

---

## STEP 1 — Make sure the standard is present

Find the standard in the repository. Accept any of:
`Mawyxx Prime V6.5.md` · `MAWYXX-PRIME.md` · `Mawyxx-Prime.md`.

If it is NOT present — copy it into the repository root:

`https://raw.githubusercontent.com/Mawyxx/Mawyxx-Prime/main/Mawyxx%20Prime%20V6.5.md`

```bash
curl -fsSL "https://raw.githubusercontent.com/Mawyxx/Mawyxx-Prime/main/Mawyxx%20Prime%20V6.5.md" -o "Mawyxx Prime V6.5.md"
```
```powershell
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Mawyxx/Mawyxx-Prime/main/Mawyxx%20Prime%20V6.5.md" -OutFile "Mawyxx Prime V6.5.md"
```
Confirm the file exists. Keep it in the repo from now on.

## STEP 2 — Read it (don't guess)

Read the file — DO NOT rely on a previous session. Read at least the sections for
your task; re-read when the task changes.

| Task | Sections to read |
|------|------------------|
| Always | §0.3 router · §0.4 tiers · §0.5 Default-secure 5Q · §0.6 principles · §1.1 roles · §1.2 phases · §1.5 Conflict Matrix · §1.6 Anti-N/A · §2.0 law groups · §3.0 gate groups |
| Any feature | §1.3 Design Artifact · A01 · A07 · A33 · A34 · A35 · A40 · A41 · §4.1 Threat Model 10Q |
| Security surface | A02 · A16 · A18 · A19 · A29 · A40 · A41 · A60–A64 · §5.7 |
| API / perf / data | A50 · A48 · A20 (data+tx) · B03 · B04 |
| Tests | A12 · A12a · A24 · A25 · A27 · A28 |
| Bug / incident | §4.3 · §4.12 |
| Architecture decision | §4.13 · §4.14 · §4.7 |
| Sub-agents | §1.11 (all packs) |

## STEP 3 — SIMULATE every point on the REAL task (mandatory)

This is **not a checklist**. For every point below, mentally run it **on this
exact task** and write a short, concrete trace. One-word answers ("yes", "ok",
"n/a") are rejected. If you cannot simulate a point concretely → mark
`INVESTIGATE(reason)` and resolve it (repo / tests / data) — do not guess.

**3.1 Tier** — why THIS tier for THIS task (which triggers fire, why not lower/higher); what follows (coverage, mutation, test families).

**3.2 Default-secure 5Q** — for each of the five, describe a **concrete hostile input** to the actual operation and what stops it (name the real field / route / resource).

**3.3 Laws** — for each applicable `A-xx`: say what it changes **here** — where the port goes, where the transaction boundary is, the exact `Err` variant, the index, the authz owner. Not applicable → give the absent When-trigger.

**3.4 Maps** — actually draft them: real port names; taxonomy families with **real test names**; trust pipeline steps for **real ops**; AC with **observable oracles**; concrete `blast_radius` files.

**3.5 Gates** — for each gate you will be checked by: what it will parse in **your** files and **what it would flag**. Do not just list gate names.

**3.6 Conflict Matrix / uncertainty** — name the exact tension for THIS task (when-trigger vs YAGNI vs blast vs A40/A41) and the side you choose.

**3.7 Reasoning 8 steps (§1.10)** — fill with real content: **FIT** (why the rule's premises hold here), **ALT** (a real alternative you rejected and why).

**3.8 Adversarial 8 questions (§4.14)** — for EACH question, simulate the concrete scenario and name the **test or gate** that closes it (never "covered"):
`×1000 input` → which test · `double call` → which idempotency test · `parallel` → which concurrency test · `dep down` → which fallback test · `empty/null` → which test · `hostile user` → cross-user/IDOR test · `prod` → which guard · `if I'm wrong` → which gate proves it.

**3.9 End-to-end trace** — walk ONE real request/flow through the layers: source → schema → authn → authz(resource) → command → UC → sink → response. Then walk the **failure / retry / concurrency** variant of the same flow.

**3.10 Data & volume** — simulate 0, 1, 100, 1 000 000 rows/items; N+1; index hit/miss; cold cache; oversized payload.

**3.11 Failure** — simulate DB down, Redis down, third-party slow/timeout, queue backlog, crash between steps.

**3.12 Time & concurrency** — simulate two parallel calls, retry with the same key, out-of-order/duplicate webhook, clock/TZ edge.

Output the result as a compact **Simulation trace** (bullets) **before writing code**. Re-simulate whenever the task changes.

## STEP 4 — Work the phases

```
PHASE 0    Tier + adoption_mode + Domain Elicitation (§1.12)
PHASE 0.5  Design Artifact + 5Q + Threat Model 10Q + maps + AC oracles + blast
PHASE 1–3  Research → TDD-lock → ports → adapters → composition root
PHASE 4    Fix-until-green (P0 → P1 → P2)
PHASE 4.5–4.8 Guardian audit + review + Two-Agent adversarial
PHASE 5    prime_check FULL + evidence block
```
Sub-agents per §1.11 when applicable (Writer ≠ Verifier).

## STEP 5 — Always with the standard

- **Law→Gate**: every MUST maps to a real gate.
- **Anti-N/A**: `N/A(reason)` only; never a naked `N/A`.
- **fix-until-green**: never stop with `exit ≠ 0`; never ask the user to run tests.
- **Evidence** (§3.5) before saying "done"; coverage alone ≠ done.
- **Self-Sufficiency** (§4.17): decide and verify everything yourself.
- Gate missing → bootstrap per §3.2 (**FOCUS 30** → CORE 70 → FULL).

## STEP 6 — Never

- Code before the standard is loaded **and** every point simulated.
- Tick the simulation without concretely running it.
- Claim done while `prime_check` is red or without evidence.
- Invent rules — if the standard is unclear, use the Conflict Matrix, then the stricter reading.

If download of the standard fails — retry once via
`https://github.com/Mawyxx/Mawyxx-Prime/blob/main/Mawyxx%20Prime%20V6.5.md`,
then stop and report the blocker with that link.

**Keywords:** AI coding standard · system prompt · Cursor rules · Windsurf rules · Copilot instructions · zero-trust · AI agents.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.