governance

governance is a cursor rule for Cursor from LeandroPG19/Memorys. It costs 897 tokens per session, scanned A, original, Apache-2.0.

A set of repository rules for checking work before coding, avoiding unnecessary design, and treating automated checks as the final authority.

In plain words
What is it for?
Use it to review a proposed change, decide what not to build, and keep comments focused on the reasons behind unusual decisions.
Why use it?
It helps prevent extra abstractions, dependencies, files, and speculative error handling that the requested program does not need.

Cursor rule for Cursor

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

Good fit Use it to review a proposed change, decide what not to build, and keep comments focused on the reasons behind unusual decisions.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/leandropg19/memorys/governance
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/LeandroPG19/Memorys

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 governance

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/leandropg19/memorys/governance"><img src="https://agentmods.dev/badge/rules/leandropg19/memorys/governance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 897 This file is loaded in full into every session.
When invoked 897 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.00897 $0.00897
Opus 5.5 $0.00359 $0.00359
Sonnet 5.5 $0.00179 $0.00179
Haiku 4.5 $0.00090 $0.00090

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

Security

Grade A, and why

governance 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 22d 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/governance.mdc · 82 lines

How it starts

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

Gobernanza (MemoryIndustry)

0. Antes de tocar nada

  1. Memoria: cuba_faro / cuba_expediente (MCP cuba_*; alias memory_*).
  2. Leer lo que ya existe. Buscar el handler, el contrato o el guion antes de escribir uno nuevo.
  3. Prueba de sobre-ingeniería (§1). Si no pasa, se recorta antes de escribir.

1. Sobre-ingeniería: lo que NO se escribe

¿Qué se podría borrar y el programa seguiría haciendo lo pedido? Eso no se escribe.

  • Una abstracción con un solo llamante es una capa.
  • Cero configuración para lo que nunca varía.
  • Cero dependencia nueva si std lo resuelve en veinte líneas.
  • Cero fichero nuevo si cabe donde ya vive lo parecido.
  • Cero manejo de errores especulativo.
  • Cero código para un futuro hipotético.
  • Cero refactor de paso.
  • Cero envoltorio que solo renombra.

Comentarios: el PORQUÉ se queda

Este repo no es «cero comentarios». Los comentarios de migraciones, gate, RLS y contratos son load-bearing: un SHA y un include_str! los leen.

  • Un comentario que dice QUÉ hace la línea sobra. Se renombra.
  • Lo que merece comentario es el PORQUÉ: la decisión rara, el bug que obliga, el número medido.
  • Cero código comentado. Cero TODO sin dueño.
  • Un comentario que contradice al código es peor que ninguno.
  • No aplicar rust.mdc genérico ni «cero comentarios en .rs» de Mapupita-Rust.

2. El CI es la puerta

Un comando replica el CI: ./scripts/merge-gate.sh (alias ./scripts/como-el-ci.sh todo).

  • scripts/quality-gate.sh es el segundo juez (CRAP/mutación del diff). Se encadena; no sustituye al SIL.
  • Nada se declara mergeable sin haber corrido el SIL en este turno.
  • El gate imprime lo que NO mira.
  • Un test saltado no es un test verde.
  • Un verificador que no puede fallar no es una comprobación.

3. Identidad y stack

  • Mapupita / Leandro — MCP, memoria de agentes, Rust.
  • Hablar en español; código, commits, PRs y docs de producto en inglés (salvo comentarios de lección en el gate).
  • Stack de este árbol: Rust edición 2024, PostgreSQL 18 + pgvector, MCP cuba_*.
  • Doctrina: integridad transaccional, tipos estrictos, errores manejados. Aquí el daño no es físico de planta: es un agente que recuerda mal o filtra el tenant.

Read the full file on GitHub · 82 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. 22d ago First seen · 82 lines · 897 tokens per session scan A a7f0dd1a9fbb

Subscribe to this mod's changes

governance is a cursor rule published in the GitHub repository LeandroPG19/Memorys (30 stars, last pushed yesterday), licensed Apache-2.0. It adds 897 tokens to every session, about $0.0036 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-09-24.