module-quality-assurance

module-quality-assurance is a cursor rule for Cursor from mywand/cusrsor-do-it. It costs 12 tokens per session (4,741 once invoked), scanned A, original, Apache-2.0.

A set of rules for checking a software module’s quality, including performance, reliability, security, monitoring, and capacity.

In plain words
What is it for?
Use it when reviewing or designing modules, setting non-functional requirements, planning capacity, running tests, and tracking technical debt.
Why use it?
It gives teams measurable checks and records for finding risks, such as slow responses, scaling limits, missing audit logs, or security gaps.

Cursor rule for 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/mywand/cusrsor-do-it/module-quality-assurance
Clone the repo
git clone --depth 1 https://github.com/mywand/cusrsor-do-it

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 module-quality-assurance

README.md
[![agentmods](https://agentmods.dev/badge/rules/mywand/cusrsor-do-it/module-quality-assurance.svg)](https://agentmods.dev/rules/mywand/cusrsor-do-it/module-quality-assurance)
Your own site
<a href="https://agentmods.dev/rules/mywand/cusrsor-do-it/module-quality-assurance"><img src="https://agentmods.dev/badge/rules/mywand/cusrsor-do-it/module-quality-assurance.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,741 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 $0.00012 $0.04741
Opus 5 $0.00006 $0.02371
Sonnet 5 $0.00002 $0.00948
Haiku 4.5 $0.00001 $0.00474

Measured 5d ago against content hash 3aefcb5dc80d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

module-quality-assurance 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/docs/module-quality-assurance.mdc · 357 lines

How it starts

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

最近更新: 2025-10-28 最近审阅: 2025-10-28

模块设计质量保障指南

文件编码:UTF-8, 无 BOM

本文档内容:第10-15章 - 质量保障规范

📚 文档导航

文档 内容
📖 主文档 核心设计原则、文档概述、七要素框架
📘 七要素详细规范 第3-9章:背景、角色、模型、流程、状态、接口、数据
📙 当前文档 第10-15章:NFR、监控、安全、风险
📕 工程实践指南 第16-24章:技术债、评审、演进、快速指南

10. 非功能性需求 (NFR)

10.1 NFR 指标定义

类别 目标 指标细化 验证方式
性能 p95 < 300ms 峰值 500 rps 压测报告
吞吐 每小时 50k 结算 并行度 4 生产监控
可用性 99.9% 关键链路降级方案 SLA 统计
一致性 最终一致 < 2min Outbox + 补偿任务 数据对账
安全 操作审计 修改/删除行为记录 审计日志
可扩展性 水平扩展 无状态设计 扩容演练

10.2 质量维度雷达(示例占比)

pie title 质量维度(占比示意,自行评估)
  "Maintainability" : 20
  "Observability" : 15
  "Performance" : 20
  "Resilience" : 15
  "Security" : 15
  "Scalability" : 15

实际项目请用度量结果(静态扫描、压测、故障演练)更新占比,低于阈值项需进入技术债表。

10.3 性能基线

场景 QPS P50 P95 P99 错误率
查询接口 500 20ms 50ms 100ms <0.1%
创建接口 100 50ms 100ms 200ms <0.5%
批量操作 10 500ms 1s 2s <1%

10.4 容量规划

资源 当前容量 峰值容量 扩容策略
CPU 4核 × 3实例 4核 × 10实例 自动扩容 CPU>70%
内存 8GB × 3实例 8GB × 10实例 自动扩容 Mem>80%
数据库连接池 20/实例 50/实例 动态调整
消息队列 1000/s 5000/s 队列分片

11. 错误处理与韧性策略

11.1 错误分类

错误类型 定义 处理策略 示例
校验失败 输入参数不合法 立即返回 400 金额为负数
业务冲突 违反业务规则 返回 409 订单已结算
下游失败 依赖服务故障 重试或降级 支付服务超时
并发冲突 乐观锁冲突 重试或返回 409 version 不匹配
系统异常 未预期的错误 返回 500 + 告警 NPE、数据库连接失败

11.2 重试策略

场景 重试次数 退避策略 幂等保证
HTTP 调用 最多 3 次 指数退避 + jitter 幂等键
消息消费 最多 5 次 固定间隔 1/5/15/60/300s 消息ID
数据库操作 最多 2 次 立即重试 乐观锁 version
分布式锁 最多 3 次 固定间隔 100ms 锁键

Read the full file on GitHub · 357 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 · 357 lines · 12 tokens per session scan A 3aefcb5dc80d

Subscribe to this mod's changes

module-quality-assurance is a cursor rule published in the GitHub repository mywand/cusrsor-do-it (2 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 12 tokens to every session and 4,741 once invoked, about $0.0001 per session on Opus 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-08-31.