monorepo-template / quality
Cursor rule18 starsChanged 59 days agoApache-2.0View on GitHub
Do not add a comment that restates the code. A comment earns its place only by recording something a reader cannot recover from the code and would otherwise undo: a constraint, a rejected alternative, a non-obvious requirement of an external API. Write the why, never the what. Applies to source, YAML and workflows, shell, and config alike. These fail the test above. Never add them; when you touch a file that has them, delete them - but do not hunt…
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,531 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- hooks/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- hooks/CLAUDE.mdCLAUDE.md
- .cursor/rules/backend/hono-gateway.mdcCursor rule
- .cursor/rules/backend/ports.mdcCursor rule
- .cursor/rules/backend/service-bindings.mdcCursor rule
- .cursor/rules/backend/workers-cache.mdcCursor rule
- .cursor/rules/backend/workers-config.mdcCursor rule
- .cursor/rules/contracts/contracts.mdcCursor rule
- .cursor/rules/core/agent-instructions.mdcCursor rule
- .cursor/rules/core/boundaries.mdcCursor rule
- .cursor/rules/core/guardrails.mdcCursor rule
- .cursor/rules/core/turborepo.mdcCursor rule
- .cursor/rules/core/worktrees.mdcCursor rule
- .cursor/rules/frontend/react.mdcCursor rule
- .cursor/rules/frontend/tailwind.mdcCursor rule
- .cursor/rules/frontend/tanstack-query.mdcCursor rule
- .cursor/rules/frontend/tanstack-router.mdcCursor rule
- .cursor/rules/frontend/vite-config.mdcCursor rule
- .cursor/rules/ops/cd.mdcCursor rule
- .cursor/rules/ops/changesets.mdcCursor rule
- .cursor/rules/ops/ci.mdcCursor rule
- .cursor/rules/ops/previews.mdcCursor rule
- .cursor/rules/ops/quality-report.mdcCursor rule
- .cursor/rules/ops/release.mdcCursor rule
- .cursor/rules/quality/code-style.mdcCursor rule
- .cursor/rules/quality/knip.mdcCursor rule
- .cursor/rules/quality/lint-config.mdcCursor rule
- .cursor/rules/quality/markdown-style.mdcCursor rule
- .cursor/rules/quality/naming.mdcCursor rule
- .cursor/rules/quality/simplicity.mdcCursor rule
- .cursor/rules/quality/testing.mdcCursor rule
- .cursor/rules/quality/typescript-config.mdcCursor rule
- .cursor/rules/tests/front-react.mdcCursor rule
- .cursor/rules/tests/hono-workers.mdcCursor rule
- cfSkill
- changesetSkill
- front-vitestSkill
- git-commitSkill
- honoSkill
- monorepo-agent-setupSkill
- playwright-cliSkill
- pnpmSkill
- react-doctorSkill
- reviewSkill
- review-stackSkill
- run-appSkill
- security-auditSkill
- skills-updateSkill
- tanstack-configSkill
- tanstack-devtoolsSkill
- tanstack-querySkill
- tanstack-routerSkill
- turborepoSkill
- ui-ux-design-best-practicesSkill
- vercel-react-best-practicesSkill
- workers-best-practicesSkill
- skills-updateSkill
The file
We split this comments.mdc into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Default to no comment: If a line needs explaining, rename or restructure first.
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- alwaysApply: true --- # Comments Do not add a comment that restates the code. A comment earns its place only by recording something a reader cannot recover from the code and would otherwise undo: a constraint, a rejected alternative, a non-obvious requirement of an external API. Write the why, never the what. Applies to source, YAML and workflows, shell, and config alike. - **Default to no comment.** If a line needs explaining, rename or restructure first; a comment is the fallback. - **Never write a comment for an AI reader.** Path-scoped rules (`.claude/rules/`, mirrored in `.cursor/rules/`) are that channel: they cost context only when a matching file is touched, while a comment costs context on every read, forever. - An explanation longer than two lines, or one that applies to more than the line below it, belongs in a rule, not a comment block at the top of a file. - **Keep the comments that prevent a regression:** why a key is deliberately absent, why a non-default value is set, why an apparently redundant line is load-bearing. Test: deleting it should feel risky; if deleting it changes nothing, it should not be there. ## Do not generate These fail the test above. Never add them; when you touch a file that has them, delete them - but do not hunt them in files you are not editing, and do not rewrite working code just to make a comment deletable. - Restating the next statement, control flow, or a well-named symbol (`// increment i`, `/** Resolve the allowlist. */` on `resolveCorsOrigins`). - Section banners, IDE/scaffold boilerplate, commented-out code (restore it or delete it). - TODOs that are no longer actionable. - File-header essays repeating a path-scoped rule or `AGENTS.md`. - Config keys that restate the tool's default. - Ignore, allow, or dictionary entries for tools or words the repo does not use. - The same rationale repeated in every environment block - state it once, in a rule. - Rationale in a turbo task `description`: one clause saying what the task does; the why lives in [../core/turborepo.mdc](../core/turborepo.mdc). ## Keep without re-litigating - License headers and legally required notices. - Generated-file banners (`.cloudflare/types/index.d.ts`, `routeTree.gen.ts`); never hand-edit those files ([guardrails.mdc](../core/guardrails.mdc)). - Machine-read markers: `@internal` (tag only, no prose restating "for tests" - [knip.mdc](knip.mdc)), `oxlint-disable-*` with a reason ([code-style.mdc](code-style.mdc)), `// @vitest-environment …`, `@ts-expect-error` with a reason, workflow `# vX.Y.Z` SHA pins. - JSDoc that is a public API contract or carries types tooling needs. Prose JSDoc that only repeats the name or signature is still a comment: delete it. `knip.jsonc` stays comment-free; every override's rationale lives in [knip.mdc](knip.mdc).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

