|
| 1 | +--- |
| 2 | +status: planned |
| 3 | +created: '2025-12-04' |
| 4 | +tags: |
| 5 | + - cursor |
| 6 | + - slash-commands |
| 7 | + - ai |
| 8 | + - ux |
| 9 | + - ide-integration |
| 10 | +priority: medium |
| 11 | +created_at: '2025-12-04T07:23:15.903Z' |
| 12 | +depends_on: |
| 13 | + - 034-copilot-slash-commands |
| 14 | +updated_at: '2025-12-04T07:23:15.981Z' |
| 15 | +--- |
| 16 | + |
| 17 | +# Cursor IDE Slash Commands Integration |
| 18 | + |
| 19 | +> **Status**: 🗓️ Planned · **Priority**: Medium · **Created**: 2025-12-04 · **Tags**: cursor, slash-commands, ai, ux, ide-integration |
| 20 | +
|
| 21 | +## Overview |
| 22 | + |
| 23 | +**User Feedback**: "leanspec 是不支持 cursor slash commands 吗,听说 openspec 支持" (User asks if LeanSpec supports Cursor slash commands, noting that OpenSpec supports it) |
| 24 | + |
| 25 | +Add LeanSpec integration directly into Cursor IDE via slash commands, enabling developers to interact with specs naturally through Cursor's AI chat without leaving their coding context. |
| 26 | + |
| 27 | +**Why this matters**: Cursor is one of the most popular AI-native IDEs. Users expect native slash command integrations for their development tools. |
| 28 | + |
| 29 | +## Design |
| 30 | + |
| 31 | +**Cursor Slash Commands** use a `.cursorrules` or `.cursor/rules` file and custom slash command definitions. |
| 32 | + |
| 33 | +**Implementation Options:** |
| 34 | + |
| 35 | +**Option A: Cursor Rules File** (Simplest) |
| 36 | +- Create `.cursorrules` template with LeanSpec context |
| 37 | +- Include spec discovery, creation, and management prompts |
| 38 | +- Users copy template to their projects |
| 39 | + |
| 40 | +**Option B: Custom Slash Commands** |
| 41 | +- Implement via Cursor's custom slash command API (if available) |
| 42 | +- Register commands like `/lspec-search`, `/lspec-create`, `/lspec-board` |
| 43 | + |
| 44 | +**Option C: MCP Integration** (Recommended) |
| 45 | +- Cursor supports MCP servers natively |
| 46 | +- LeanSpec already has MCP server (`@leanspec/mcp`) |
| 47 | +- Users just need to configure MCP in Cursor settings |
| 48 | + |
| 49 | +**Proposed Commands:** |
| 50 | +- `/lspec-board` - Show Kanban board of specs |
| 51 | +- `/lspec-search <query>` - Search specs |
| 52 | +- `/lspec-create <name>` - Create new spec |
| 53 | +- `/lspec-view <spec>` - View spec content |
| 54 | +- `/lspec-update <spec> --status <status>` - Update spec status |
| 55 | + |
| 56 | +## Plan |
| 57 | + |
| 58 | +- [ ] Research Cursor's current slash command / extension API |
| 59 | +- [ ] Document MCP server setup for Cursor (may already work!) |
| 60 | +- [ ] Create `.cursorrules` template for LeanSpec workflows |
| 61 | +- [ ] Test MCP integration in Cursor IDE |
| 62 | +- [ ] Add Cursor setup guide to documentation |
| 63 | +- [ ] Compare with OpenSpec's Cursor integration approach |
| 64 | + |
| 65 | +## Test |
| 66 | + |
| 67 | +- [ ] MCP server connects successfully in Cursor |
| 68 | +- [ ] Slash commands return expected results |
| 69 | +- [ ] Spec creation/update works through Cursor chat |
| 70 | +- [ ] Documentation is clear and complete |
| 71 | + |
| 72 | +## Notes |
| 73 | + |
| 74 | +**Competitive Context:** |
| 75 | +- OpenSpec reportedly supports Cursor slash commands |
| 76 | +- Need to research their implementation approach |
| 77 | + |
| 78 | +**Related:** |
| 79 | +- Spec 034: GitHub Copilot Chat slash commands (similar concept, different IDE) |
| 80 | +- LeanSpec MCP server already exists - may just need configuration docs |
| 81 | + |
| 82 | +**Open Questions:** |
| 83 | +- Does Cursor support custom slash commands natively, or only via MCP? |
| 84 | +- What's the exact implementation OpenSpec uses? |
| 85 | +- Can we provide a one-click setup experience? |
0 commit comments