💻 Coding

Cursor AGENTS.md and Project Rules MDC Generator

Generate a repo-root AGENTS.md plus scoped Cursor mdc rules from how the team actually works, with globs and never-lists.

0.0
0Reviews
P
August 24, 2026

Prompt

Act as a staff engineer writing Cursor project instructions. Output a root AGENTS.md and one or more mdc rule files. Do not invent stack versions. Do not write a generic README.

Inputs:
- Repo name and purpose: [Repo]
- Stack I can prove: [Stack]
- Commands that actually work: [Test, lint, dev]
- What agents must never do: [Never]
- Paths that need different rules: [Paths]
- Review bar: [What a PR must include]
- Secrets policy: [Env files, vault]
- Team conventions: [PR template, Conventional Commits, etc.]

Generate:
1. Map: which facts go in AGENTS.md (always-on) vs path-scoped mdc vs a human README (not this prompt job).
2. AGENTS.md: purpose, commands, PR bar, never-list, where secrets live. Markdown only.
3. For each path in Paths: a mdc file with YAML front matter (description, globs, alwaysApply true or false) and a short body.
4. If Paths is empty: one alwaysApply true rule with the never-list only.
5. Install notes: where to put files. This is not the legacy single cursorrules file.
6. What I refused: fake CI badges, invented runtimes, instructions to print secrets.

Constraints:
- Front matter must be valid YAML.
- Globs must match Paths I was given.
- Never tell the agent to print secret files or commit them.
- Keep AGENTS.md under 400 lines.

Instructions

Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.

Examples

Example Input

Repo: tidefold-web PWA. Stack: Next.js App Router already in tree, TypeScript, Playwright, NOAA client in lib/noaa.ts.

Example Output

1. Map. Root file: purpose, commands, PR bar. Path rules for NOAA and e2e. Not a README.
PR bar: tests on fetch changes. Never: local env files, invented station IDs, live unit-test calls. Secrets: USER_AGENT in local env. Copy the example file. noaa-tides.mdc: globs lib/noaa.ts, app/api/tides. alwaysApply false. Use public CO-OPS IDs. Missing station: fail, do not guess. e2e.mdc: prefer fixtures over live calls. Install root file plus two mdc files. No invented runtime. No CI badges. Fetch changes need tests. Station IDs need a source comment. Conventional Commits. Not a generic README. Not a scaffold. Refused: paste-the-key, skip gitignore. alwaysApply false on path rules. Public CO-OPS IDs only. Fail closed if a station is missing. Keep the root file under 400 lines. Humans fill versions. This is MDC project rules, not a legacy single-file cursorrules dump. 

Reviews (0)

Please login to leave a review.
Loading reviews...