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.
npx agentmods add rules/prisma/prisma-next/doc-maintenancegit clone --depth 1 https://github.com/prisma/prisma-nextWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00898 | $0.00898 |
| Opus 5 | $0.00449 | $0.00449 |
| Sonnet 5 | $0.00180 | $0.00180 |
| Haiku 4.5 | $0.00090 | $0.00090 |
Grade A, and why
doc-maintenance 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 yesterday.
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.
This is a copy
100% identical to doc-maintenance — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
-
Whenever you receive a correction or correct a mistake, make sure it's documented in .cursor/rules either by updating an existing doc or adding a new one
-
An ADR records the decision; the subsystem/reference doc records the current shape. They are separate obligations. When a change alters a documented system shape or contract (IR shape, emitted-type surface, render path, public type alias), update the relevant doc under
docs/architecture docs/subsystems/(and any worked examples it contains) in the same change — not only the ADR. Landing the ADR does not discharge the obligation to refresh the reference docs a fresh contributor reads; a subsystem doc that still shows the pre-change shape is actively misleading even when the ADR is correct. -
Whenever you make changes to a package, make sure its docs stay up to date.
- User-facing packages: keep
README.mdfocused on what the package does, when to use it, and a few concrete examples. Avoid internal implementation detail unless it materially affects usage. - Contributor details: put responsibilities/dependencies/architecture diagrams/internal exports in
DEVELOPING.md(orCONTRIBUTING.md) within that package, and add a short link fromREADME.md.
- User-facing packages: keep
-
Docs must not link to transient project artifacts under
projects/(link to durabledocs/or package READMEs instead) -
Source-code comments, ADRs, package READMEs, and test names must not reference transient project artefacts. This includes:
projects/<x>/...paths- Milestone / project labels (e.g. "Project 1", "Project 2", "M1", "Milestone 2")
- Task or round IDs (e.g.
T1.7,T2.5.3,R4 design choice,R8B,(T7)) - Spec decision IDs (e.g.
(D1),(D6),spec D7,(FR6)) - Milestone-named acceptance criteria (e.g.
AM12,AC-13,AC-E2E-BIGINT,AC-MW1,AC-DEC2) - File names that encode acceptance-criteria IDs (e.g.
ac-e2e-bigint.test.ts— drop theac-prefix) - Prose attributions like "the spec calls out", "the spec wording mentions", "the spec promises", "per spec", "out of scope per spec", "M2 review", "sub-spec § 4", "sub-spec OQ3"
When a comment needs to explain why something is the way it is, describe the constraint or behaviour itself; do not attribute it to the transient project artefact that introduced it.
Stable references that are fine: Linear ticket IDs (e.g.
TML-2397), ADR numbers (e.g.ADR 211), and links to durable docs underdocs/architecture docs/.Worked example. Bad:
// Per-envelope plaintext is forwarded as `unknown` (D1) — the // SDK sees the original JS plaintext untouched. Pins AC-MW1.Good:
// Per-envelope plaintext is forwarded to the SDK as `unknown` // — the SDK sees the original JS plaintext untouched.Before opening a PR, scan the branch diff for these patterns:
rg 'Project [12]|\bD[1-9]\b|\(FR[0-9]+\)|\(T[0-9]+\)|AC-[A-Z][A-Z0-9-]*|\bR[0-9]+B?\b|\bF[1-7]\b|\bM[12]\b|per spec|the spec\b|spec calls|spec wording|spec promises|sub-spec|milestone' -- ':!projects/' ':!*.generated.*' -
If you establish a new design decision, update the architecture docs in
docs/architecture docs
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.
- yesterday First seen · 46 lines · 898 tokens per session scan A c6dba411e70a
doc-maintenance is a cursor rule published in the GitHub repository prisma/prisma-next (421 stars, last pushed 7d ago), licensed Apache-2.0. It adds 898 tokens to every session, about $0.0045 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to doc-maintenance, differing in 0 lines, and is treated as a copy.
Other cursor rules, from other repositories
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
directory-layout
Directory layout rules for SQL family vs concrete targets.
family-instance-domain-actions
Family instance domain action implementation patterns.
import-validation
Import validation and package layering rules.