doc-maintenance

doc-maintenance is a cursor rule for Cursor from prisma/prisma-next. It costs 898 tokens per session, scanned A, a copy of doc-maintenance, Apache-2.0.

A documentation-maintenance rule for keeping architecture references, package guides, and contributor documentation accurate after code changes. An ADR, or architecture decision record, explains a decision; a reference document describes the system as it currently works.

In plain words
What is it for?
Use it whenever a correction changes a package, interface, generated output, or documented architecture. Update the relevant README, contributor guide, subsystem document, architecture document, or worked example in the same change.
Why use it?
It prevents documentation from describing an old system shape or package behavior. This helps new contributors and users rely on the docs when code, contracts, or public types change.

Cursor rule for Cursor ✓ vendor

Written for Cursor: a Cursor rule (.mdc). Also seen: installed under .agents/ (shared by several agents).

Good fit Use it whenever a correction changes a package, interface, generated output, or documented architecture. Update the relevant README, contributor guide, subsystem document, architecture document, or worked example in the same change.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/prisma/prisma-next/doc-maintenance
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/prisma/prisma-next

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 doc-maintenance

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/prisma/prisma-next/doc-maintenance"><img src="https://agentmods.dev/badge/rules/prisma/prisma-next/doc-maintenance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 898 This file is loaded in full into every session.
When invoked 898 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 100% copy Near-identical to another mod 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.00898 $0.00898
Opus 5.5 $0.00359 $0.00359
Sonnet 5.5 $0.00180 $0.00180
Haiku 4.5 $0.00090 $0.00090

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

Security

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 3mo 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.

Origin

This is a copy

100% identical to doc-maintenance — 2 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.

.agents/rules/doc-maintenance.mdc · 46 lines

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.md focused 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 (or CONTRIBUTING.md) within that package, and add a short link from README.md.
  • Docs must not link to transient project artifacts under projects/ (link to durable docs/ 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 the ac- 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 under docs/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

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. 3mo ago First seen · 46 lines · 898 tokens per session scan A c6dba411e70a

Subscribe to this mod's changes

doc-maintenance is a cursor rule published in the GitHub repository prisma/prisma-next (407 stars, last pushed 5d ago), licensed Apache-2.0. It adds 898 tokens to every session, about $0.0036 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to doc-maintenance, differing in 2 lines, and is treated as a copy.

Related

doc-maintenance compared with cursor rules from other repositories

doc-maintenance next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
doc-maintenanceprisma/prisma-nextCursor rule4075d agoApache-2.0A898Cursor
ponytailDietrichGebert/ponytailCursor rule201k8d agoMITA604Cursor
angular-20angular/angularCursor rule102k4d agoMITA0Cursor
dev-standardapache/supersetCursor rule76ktodayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48ktodayApache-2.0A0Cursor
prefer-direct-imports-over-module-mocksprisma/ormCursor rule48ktodayApache-2.0A0Cursor
shared-plane-packagesprisma/ormCursor rule48ktodayApache-2.0A0Cursor