Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ By adding selected `.mdc` files to `.cursor/rules/`, you can use these rules dir
- [Code Style Consistency](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/code-style-consistency-cursorrules-prompt-file.mdc) - Code development with style consistency integration.
- [Embedded MCU / STM32 / HAL](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/embedded-stm32-hal.mdc) - Embedded C/C++ development with STM32 HAL, interrupts, DMA, memory constraints, and hardware-focused testing.
- [Engineering Ticket Template](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/engineering-ticket-template-cursorrules-prompt-file.mdc) - Engineering development with ticket template integration.
- [Full-Stack AI Engineering Playbook](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/fullstack-ai-engineering-playbook.mdc) - Enterprise-grade AI behavior rules, token optimization strategies, and full-stack guidelines for structured AI-assisted development.
- [GitHub Code Quality](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/github-code-quality-cursorrules-prompt-file.mdc) - GitHub development with code quality integration.
- [GitHub Instructions](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/github-cursorrules-prompt-file-instructions.mdc) - GitHub development with instructions integration.
- [Git Commit Messages](https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/git-conventional-commit-messages.mdc) - Git development with conventional commit messages integration.
Expand Down
33 changes: 33 additions & 0 deletions rules/fullstack-ai-engineering-playbook.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
description: Enterprise-grade AI behavior rules, token optimization, and full-stack guidelines. Extracts from the Cursor AI Engineering Playbook.
globs: *

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Read-only verification: inspect glob conventions used by existing rules
fd -e mdc . rules | xargs rg -n '^globs:\s*' 
echo "---- potential non-recursive catch-all patterns ----"
fd -e mdc . rules | xargs rg -n '^globs:\s*\*$'

Repository: PatrickJS/awesome-cursorrules

Length of output: 19331


Fix globs to ensure the rule applies to nested filesrules/fullstack-ai-engineering-playbook.mdc uniquely uses globs: * while the repo’s other rules use recursive patterns like globs: **/*; update it to match nested paths.

Proposed fix
-globs: *
+globs: **/*
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
globs: *
globs: **/*
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rules/fullstack-ai-engineering-playbook.mdc` at line 3, The rule currently
uses a non-recursive pattern "globs: *" which won't match nested files; update
the globs entry in rules/fullstack-ai-engineering-playbook.mdc to use a
recursive pattern like "globs: **/*" so it matches files in
subdirectories—locate the "globs" key in that file and replace the "*" value
with "**/*" to align with the other rules.

alwaysApply: false
---

# Cursor AI Engineering Playbook - Core Rules

This rule enforces enterprise-grade architectural standards, minimizes token waste, and prevents AI hallucinations.

> **Note:** This is a condensed version. For the complete AI-assisted engineering system, including structured workflows, debugging prompts, and project-start templates, visit the full playbook:
> 🔗 **[Cursor AI Engineering Playbook](https://github.com/hashem-cruncher/cursor-playbook)**

## 1. Core AI Directives
- **Do Not Guess:** If context is missing, stop and ask the developer.
- **Scope Containment:** NEVER modify files outside the direct scope of the current task.
- **Token Economy:** Do not repeat the entire file in the output. Use precise search/replace blocks.
- **Simplicity Over Complexity:** Always prefer the most readable and straightforward solution. Avoid overengineering.

## 2. Frontend Boundaries (React / Next.js)
- Build small, single-responsibility components.
- Default to Server Components for data fetching. Use `"use client"` only when interactivity is required.
- Strict TypeScript: No `any` types allowed.

## 3. Backend Boundaries (FastAPI / Node.js)
- **Clean Architecture:** Strictly separate Routing (Endpoints) -> Service Layer (Business Logic) -> Data Access (Models).
- **Validation:** Validate all incoming requests at the boundary layer.
- **Error Handling:** Never leak internal stack traces to the client.

## 4. Security
- Never hardcode secrets. Always use environment variables.
- Treat all data originating from the client as malicious.
- Use parameterized database queries or strict ORM methods to prevent injection.
Loading