permission-matrix

permission-matrix is a cursor rule for Cursor from bayesimpact/bayes-platform. It costs 0 tokens per session (228 once invoked), scanned A, original, MIT.

A documentation synchronisation rule for an application's role-based access control (RBAC) permissions. RBAC means deciding which actions each user role may perform; the rule requires the permissions document to match the source code.

In plain words
What is it for?
Use it whenever roles, permissions, or role grants are added, renamed, or removed, so the corresponding Markdown tables are updated in the same change.
Why use it?
It prevents the access-control documentation from becoming out of date when roles or permissions change. That makes the written permission tables a more reliable reference for review and maintenance.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it whenever roles, permissions, or role grants are added, renamed, or removed, so the corresponding Markdown tables are updated in the same change.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bayesimpact/bayes-platform/permission-matrix
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/bayesimpact/bayes-platform

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 permission-matrix

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/bayesimpact/bayes-platform/permission-matrix"><img src="https://agentmods.dev/badge/rules/bayesimpact/bayes-platform/permission-matrix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 228 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00228
Opus 5 $0.00000 $0.00114
Sonnet 5 $0.00000 $0.00046
Haiku 4.5 $0.00000 $0.00023

Measured 2d ago against content hash 15c490d9e4f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-16, from the pricing page.

Security

Grade A, and why

permission-matrix 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 2d 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/permission-matrix.mdc · 21 lines

What it actually says

Permission Matrix Sync

docs/rbac-permission-matrix.md mirrors the RBAC catalog defined in:

  • apps/api/src/domains/rbac/rbac.constants.ts (roles + role/permission grants)
  • packages/api-contracts/src/rbac/permissions.ts (global permission contract)

Whenever you add, rename, or remove a role, a permission, or a role/permission grant in those files, you MUST update the corresponding table in docs/rbac-permission-matrix.md in the same change set.

Checklist:

  • Every role in ORGANIZATION_ROLE_PERMISSIONS / PROJECT_ROLE_PERMISSIONS has a column in the doc
  • Every granted permission has a row, checkmarks match the constants exactly
  • GlobalPermission union members all appear in the "Global roles" table
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. 2d ago First seen · 21 lines · 0 tokens per session scan A 15c490d9e4f4

Subscribe to this mod's changes

permission-matrix is a cursor rule published in the GitHub repository bayesimpact/bayes-platform (18 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 228 tokens. 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-14.