npx agentspec-cli install 1cff1bb1-7df4-4cef-8d73-3a03bef0b5bf --file-type cursorrules→ .cursor/rules/
# .cursorrules
Behavioral guidelines for Windsurf / Cursor legacy fallback in this project. These reduce common LLM coding mistakes and enforce controlled AI-assisted development.
<!-- Generated by scripts/generate-rules.py; edit source files instead. -->
**Framework:** AI-Coding-Standards v2.6.1 with 6 Core Principles
**Governance:** Controlled AI-Assisted Development (vibe-proof approach)
---
## Core Principles (Non-Negotiable)
## 1. Think Before Coding
**Don't assume. Don't hide confusion. Surface tradeoffs.**
Before implementing:
- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them - don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.
## 2. Simplicity First
**Minimum code that solves the problem. Nothing speculative.**
- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
## 3. Surgical Changes
**Touch only what you must. Clean up only your own mess.**
When editing existing code:
- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it - don't delete it.
When your changes create orphans:
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.
The test: Every changed line should trace directly to the user's request.
## 4. Goal-Driven Execution
**Define success criteria. Loop until verified.**
Transform tasks into verifiable goals:
- "Add validation" -> "Write tests for invalid inputs, then make them pass"
- "Fix the bug" -> "Write a test that reproduces it, then make it pass"
- "Refactor X" -> "Ensure tests pass before and after"
For multi-step tasks, state a brief plan:
```
1. [Step] -> verify: [check]
2. [Step] -> verify: [check]
3. [Step] -> verify: [check]
```
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
## 5. DRY & Reusability
**Never duplicate UI, logic, configurations, types, or any code. Always use shared systems.**
- **UI/Styling & Assets:** Always utilize the project's existing design system, shared assets, or global CSS variables. Do not hardcode disjointed styles or create duplicate UI components.
- **Logic & Functions:** Extract any logic or calculations used 2+ times into pure, reusable functions within the project's established shared directories. Do not repeat the same logic blocks.
- **Configurations & Metadata:** Centralize environment variables, configuration schemas, build scripts, and metadata. Avoid duplicating configurations across environments or services.
- **Types & Schemas:** Define models, interfaces, and schemas in shared folders. Reuse and extend existing types instead of recreating them.
- **Tests & Mock Data:** Share test utilities, mock data factories, and assertion helpers. Do not duplicate test setups or mock data structures.
## 6. Code Organization
**Don't put all code in one file. Separate into multiple files with general names.**
- **File Size Limit:** Keep files focused and readable. As a guideline, split files when they exceed **300 lines of code (LOC)**.
- **Concern Separation:** Separate distinct concerns (e.g. data schema, request handling, business logic, UI, utilities) into separate directories or files.
- **General & Suffix Naming:** Group similar functions in files with general, purpose-driven names and consistent suffixes (e.g. `auth.service.ts`, `math.helper.ts`, `user.model.ts`).
- **Co-locate Related Files:** Keep tests, styles, and local helpers close to their main component or module rather than in distant folders.
## Self-Check Report
After completing code, include:
- Requirements met? [list]
- Could this be simpler? [yes/no]
- All changes trace to request? [yes/no]
- Success criteria verified? [how]
## Dynamic Skill Auto-Discovery
For task-specific workflow capsules, check [SKILL-REFERENCE.md](SKILL-REFERENCE.md) and load the matching [skills/](skills/) `SKILL.md` only when the task matches its trigger.
Read the relevant standard before executing when the user's request involves:
- **Tests/TDD:** [ai-agent-standards/engineering-practices/TESTING_STANDARDS.md](ai-agent-standards/engineering-practices/TESTING_STANDARDS.md)
- **Security/Auth/Secrets:** [ai-agent-standards/risk-management/security-constraints.md](ai-agent-standards/risk-management/security-constraints.md)
- **Performance/Database/Caching:** [ai-agent-standards/engineering-practices/NON_FUNCTIONAL_REQUIREMENTS.md](ai-agent-standards/engineering-practices/NON_FUNCTIONAL_REQUIREMENTS.md)
- **UI/Accessibility:** [ai-agent-standards/compliance/A11Y_CHECKLIST.md](ai-agent-standards/compliance/A11Y_CHECKLIST.md)
- **Release/Git/CI:** [ai-agent-standards/engineering-practices/RELEASE_PROCESS.md](ai-agent-standards/engineering-practices/RELEASE_PROCESS.md)
- **Docs/README/Changelog:** [ai-agent-standards/engineering-practices/DOCUMENTATION_STANDARDS.md](ai-agent-standards/engineering-practices/DOCUMENTATION_STANDARDS.md)
- **Compliance/Audit:** [ai-agent-standards/compliance/COMPLIANCE.md](ai-agent-standards/compliance/COMPLIANCE.md)
## Verification
When asked "What coding standards are you following?" or "/standards", respond:
> AI-Coding-Standards v2.6.1 with 6 Core Principles active.
> Framework: Controlled AI-Assisted Development
> Principles: (1) Think Before Coding, (2) Simplicity First, (3) Surgical Changes, (4) Goal-Driven Execution, (5) DRY & Reusability, (6) Code Organization
Quantalogic Configuration
Windsurf IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
Code Guidelines Cursorrules Prompt File Rules
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
🎯 ENGINEERING INTEGRITY RULES - CURSOR DEVELOPMENT GUIDELINES
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
Cursor AI Rules
You are an expert developer working on this project. Follow these rules strictly.
Sign in to leave a comment.
by AgentHub Crawler