monorepo-versioning

monorepo-versioning is a cursor rule for Cursor from solvapay/solvapay-sdk. It costs 0 tokens per session (1,470 once invoked), scanned A, original, MIT.

Versioning rules for packages in a monorepo, a repository that contains multiple related packages. It explains how internal peer-dependency version ranges and Changesets should be written.

In plain words
What is it for?
Use it when declaring peer dependencies between packages and preparing package changes for release.
Why use it?
Using exact internal versions can make harmless updates appear incompatible and trigger unnecessary major-version releases across dependent packages.

Cursor rule for Cursor

Written for Cursor: installed under .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/solvapay/solvapay-sdk/monorepo-versioning
Clone the repo
git clone --depth 1 https://github.com/solvapay/solvapay-sdk

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 monorepo-versioning

README.md
[![agentmods](https://agentmods.dev/badge/rules/solvapay/solvapay-sdk/monorepo-versioning.svg)](https://agentmods.dev/rules/solvapay/solvapay-sdk/monorepo-versioning)
Your own site
<a href="https://agentmods.dev/rules/solvapay/solvapay-sdk/monorepo-versioning"><img src="https://agentmods.dev/badge/rules/solvapay/solvapay-sdk/monorepo-versioning.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,470 The whole file, excluding the scripts and references it only reads on demand.
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.1 $0.00000 $0.01470
Opus 5 $0.00000 $0.00735
Sonnet 5 $0.00000 $0.00294
Haiku 4.5 $0.00000 $0.00147

Measured 5d ago against content hash 43c86cc406b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

monorepo-versioning 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 5d 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/monorepo-versioning.mdc · 119 lines

How it starts

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

Monorepo Versioning & Internal Peer Dependencies

Internal peerDependencies must use workspace:^, never workspace:*

When one @solvapay/* package declares another as a peerDependency, the range must be workspace:^ (caret), not workspace:* (exact pin).

// ✅ correct
"peerDependencies": {
  "@solvapay/auth": "workspace:^"
}

// ❌ wrong — exact pin causes major-version cascades
"peerDependencies": {
  "@solvapay/auth": "workspace:*"
}

Why this matters (the cascade)

.changeset/config.json sets onlyUpdatePeerDependentsWhenOutOfRange: true, and a peer-dependency range change is a major bump by semver convention. workspace:* publishes as the exact current version (e.g. 1.0.8), so any bump to that peer — even a patch — puts the published range out of range and forces Changesets to bump every dependent to a new major.

Real example this rule exists to prevent: a patch to @solvapay/mcp-core and a minor to @solvapay/auth cascaded @solvapay/react, @solvapay/server, and @solvapay/react-supabase all to 2.0.0, with no breaking change anywhere.

workspace:^ publishes as ^<version>, so patch/minor peer bumps stay in range and do not cascade.

Note on pre-1.0 peers

For a 0.x peer, workspace:^ publishes as ^0.2.4, which only satisfies 0.2.x. A future 0.3.0 (minor) of that peer will cascade a major onto every dependent — this is correct semver, and pnpm's workspace: protocol cannot express a wider range.

While a peer is intentionally pre-1.0 (e.g. @solvapay/mcp-core, consumed by @solvapay/react and @solvapay/mcp), keep workspace:^ and ship that peer's changes as patch so they stay inside the dependents' ^0.2.x caret range and do not cascade. Pre-1.0 has no minor/patch compatibility contract, so an additive change is fine as a patch here.

Only take a minor/major on such a peer as a deliberate act — most notably a 1.0 stabilization, after which workspace:^ publishes ^1.0.0 and future minors stay in range. Expect (and document) a one-time major on the dependents when you cross 0.x → 1.0. Do not reach for an explicit published range to dodge a cascade that reflects a real break (e.g. narrowing >=0.2.7 <1 just to skip a bump a dependent genuinely needs): that hides a breaking change and drops the workspace: protocol.

Read the full file on GitHub · 119 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. 5d ago First seen · 119 lines · 0 tokens per session scan A 43c86cc406b8

Subscribe to this mod's changes

monorepo-versioning is a cursor rule published in the GitHub repository solvapay/solvapay-sdk (5 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,470 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-08-31.