Cursor IDE Configuration
Cursor is the primary AI-assisted IDE for this project. Rather than relying on ad-hoc prompting, we maintain a structured configuration that gives the AI agent deep knowledge of our architecture, enforces our coding standards automatically, and provides specialized capabilities for domain-specific tasks.
Three Pillars
Rules Define the Standards
Eight .mdc rule files in .cursor/rules/ tell the agent what our codebase expects: SOLID principles, DDD patterns, security requirements, carrier integration conventions, database constraints, and testing standards. Five are always injected into every conversation; three activate only when editing matching file patterns.
See Rules for the full inventory.
Sub-Agents Enforce the Standards
Six custom sub-agents in .cursor/agents/ are specialized reviewers and domain experts. The two most critical are Code Marshal (code quality) and Security Sentinel (vulnerability scanning). The remaining four handle Progressive portal automation, Safeco documentation research, database exploration, and E2E test authoring.
See Sub-Agents for details on each.
Hooks Automate Everything
Cursor hooks wire the system together. Every file edit is tracked. When the agent finishes a conversation, a quality gate script assembles the list of changed files and triggers Code Marshal + Security Sentinel automatically. Violations are fixed before the conversation ends.
See Hooks for the full lifecycle.
Skills
Beyond enforcement, nine skills in .cursor/skills/ give the agent domain-specific capabilities: parsing Excel/Word/XML documents, querying the local database, running end-to-end Safeco flows, interacting with Figma designs, and managing Jira/GitLab workflows.
See Skills for the complete list.
File Layout
.cursor/
├── hooks.json # Hook lifecycle configuration
├── hooks/
│ ├── track-edits.sh # afterFileEdit: records changed files
│ └── quality-gate.sh # stop: triggers sub-agent review
├── agents/
│ ├── code-marshal.md
│ ├── security-sentinel.md
│ ├── progressive-bot-debugger.md
│ ├── safeco-documentation-expert.md
│ ├── db-explorer.md
│ └── playwright.md
├── rules/
│ ├── agent-rules.mdc
│ ├── coding-standards.mdc
│ ├── project-rules.mdc
│ ├── carrier-rules.mdc
│ ├── prisma-rules.mdc
│ ├── security-rules.mdc
│ ├── test-standards.mdc
│ └── agents-loader.mdc
└── skills/
├── playwright-mcp/
├── safeco-full-flow/
├── parse-docx/
├── parse-xlsx/
├── parse-xml/
├── local-db/
├── figma-mcp/
├── glab-cli/
└── acli/