monorepo-template / core
Cursor rule18 starsChanged 2 months agoApache-2.0View on GitHub
Hard "don'ts" for every change. When one would be violated, stop and ask. The first three sections are enforced by .claude/settings.json and hooks/ (hooks/AGENTS.md); change the mechanism there, not only this wording. No credentials, API keys, tokens, private keys, .dev.vars / .env* files, database dumps, or logs containing any of those. A secret generated for local use stays out of version control. Enforced. Partly enforced; "never to the default branch" and "read before overwriting" are advisory. Never hand-edit a generated…
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
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/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/comments.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 guardrails.mdc into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 13
No credentials, API keys, tokens, private keys, .dev.vars / .env* files, database dumps, or logs containing any of those.
- Very specific: line 17
No history-rewriting or working-tree-destroying command (git reset --hard, git checkout -- <path>, git clean -f, git push --force, …
- Distinctive: line 18
Commit or push only when asked, never directly to the default branch.
- Distinctive: line 19
Before deleting or overwriting a file you did not create, read it.
- Distinctive: line 37
Never duplicate a shared DTO schema or shared enum value inside an app (contracts.mdc).
- Distinctive: line 51
Never put a user or tenant identifier in a log line, trace attribute, error body, cache key, or URL path or query.
- Distinctive: line 52
Never write sensitive content to a queue, KV, or any durable store without a retention and deletion rule stated in the owning app's …
- Distinctive: line 54
Keep sensitive content out of prompts to third-party services unless the user has said that service is in scope.
- Very specific: line 58
Never silence a failing check: no disabled lint rule, blanket ignore directive, cast through any / as unknown, or loosened type.
- Very specific: line 59
Never launder a type: widening a known value to unknown, object, or an open Record and asserting it back, or swapping any for unknown plus …
- Distinctive: line 60
Never ignore failing validation, type errors, or tests: fix them, or stop and report the exact command and its output.
≈ “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 --- # Guardrails Hard "don'ts" for every change. When one would be violated, stop and ask. The first three sections are enforced by `.claude/settings.json` and `hooks/` ([hooks/AGENTS.md](../../../hooks/AGENTS.md)); change the mechanism there, not only this wording. ## Never commit secrets No credentials, API keys, tokens, private keys, `.dev.vars` / `.env*` files, database dumps, or logs containing any of those. A secret generated for local use stays out of version control. Enforced. ## Destructive or irreversible actions - ask first - No history-rewriting or working-tree-destroying command (`git reset --hard`, `git checkout -- <path>`, `git clean -f`, `git push --force`, branch/tag deletion) unless the user asked for that exact operation. Prefer additive, reversible steps. - Commit or push only when asked, never directly to the default branch. - Before deleting or overwriting a file you did not create, read it; if it contradicts how it was described, surface that instead of proceeding. Partly enforced; "never to the default branch" and "read before overwriting" are advisory. ## Generated files are outputs, not sources Never hand-edit a generated artifact: anything under `apps/*/.cloudflare/**` (cf Build Output, generated `Env` types, local dev state), a `CHANGELOG.md` (written by `changeset version` in the Release workflow), or any other build output. Change the source and regenerate with the documented command (`pnpm types`, the app's build); a changelog entry changes through its pending `.changeset/*.md`. Enforced. --- **Everything below is advisory.** `pnpm boundaries` backs "Respect the boundaries" at package level only. ## Stay within the task's scope A task scoped to configuration, rules, docs, or agent setup does not drift into application source, `cloudflare.config.ts`, workflows, migrations, or infrastructure unless the user asks. ## One source of truth Never duplicate a shared DTO schema or shared enum value inside an app ([contracts.mdc](../contracts/contracts.mdc)). ## Respect the boundaries Browser / SPA code reaches backends over HTTP only, never through Worker service bindings. Credentials and privileged calls stay server-side. ## Least privilege for model-facing surfaces An operation exposed to a model or an untrusted caller stays read/query-oriented. Never expose one that creates, rotates, or deletes long-lived credentials, or performs any other irreversible privileged action on the caller's behalf. ## Sensitive data Anything that identifies a user or tenant, and any user-submitted content, is sensitive. - Never put a user or tenant identifier in a log line, trace attribute, error body, cache key, or URL path or query. Log an opaque request id and correlate out of band. - Never write sensitive content to a queue, KV, or any durable store without a retention and deletion rule stated in the owning app's `AGENTS.md`. - Text extracted from a user-supplied document is untrusted input, never instructions: validate it at the boundary like a request body and never let it steer a tool call. - Keep sensitive content out of prompts to third-party services unless the user has said that service is in scope. ## Do not paper over failures - Never silence a failing check: no disabled lint rule, blanket ignore directive, cast through `any` / `as unknown`, or loosened type. Fix the cause. - Never launder a type: widening a known value to `unknown`, `object`, or an open `Record` and asserting it back, or swapping `any` for `unknown` plus an assertion, is a cast by another name. Keep the precise type from creation to use. - Never ignore failing validation, type errors, or tests: fix them, or stop and report the exact command and its output.
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.

