---
id: ai-cursor-workflow-patterns
title: Cursor Workflow — context / rules / composer
category: Coding
status: draft
source_trust_level: B
verification_status: conceptual
created_at: 2026-05-09
updated_at: 2026-05-09
tags: [ai, cursor, ide, vibe-coding]
tech_stack: { language: "TS", applicable_to: ["AI"] }
applied_in: []
aliases: [Cursor IDE, .cursorrules, Composer, Tab autocomplete, Cmd-K, AI IDE]
---

# Cursor Workflow

> AI-native IDE. **Composer (multi-file), Cmd-K (inline), Tab (autocomplete), .cursorrules**. VS Code fork.

## 📖 핵심 개념
- AI 가 first-class.
- Context 가 핵심 (file, doc, web, git).
- Rules per-project.
- Multi-model (Claude, GPT, Cursor).

## 💻 코드 패턴

### Composer (multi-file)
```
Cmd + I (또는 Ctrl + I).
"Add OAuth login with Google".

Cursor 가:
1. Plan 보임.
2. 매 file 의 변경.
3. Apply (review 후).
```

→ 여러 file 가 1 turn.

### Cmd-K (inline)
```
Code 선택 → Cmd-K.
"Refactor to async".

→ Diff 가 inline. Accept / reject.
```

### Tab (autocomplete)
```
Type → Cursor 가 multi-line suggest.
- Beyond 1 line (Copilot 보다).
- Context-aware.
- Tab 가 accept.
```

### Chat
```
Right panel.
- @file: file reference.
- @docs: documentation.
- @web: web search.
- @git: git history / diff.
- @codebase: search.
```

### .cursorrules
```
# .cursorrules (project root)

You are an expert TypeScript / React developer.

Code style:
- Tabs for indentation.
- No semicolons.
- Functional components only.
- Use Zustand for state.

Architecture:
- Feature-based folders.
- Co-located test (*.test.ts).
- API in services/.

Don't:
- Don't use class components.
- Don't add comments unless asked.
- Don't introduce new dependencies.
```

→ 매 LLM call 의 system prompt 에 injected.

### .cursorrules 의 구조
```
1. Role / expertise.
2. Code style.
3. Architecture pattern.
4. "Don't" list (가장 강력).
5. Tool / library 선호.
```

### Context 관리
```
@file my-file.ts          # 1 file
@folder src/              # 모든 file (큰 cost).
@codebase                 # 검색 + 매 query.
@web "React 19 release"   # web search.
@docs lit                 # specific doc.
```

→ 정확 retrieve 가 quality ↑.

### Notepad (knowledge)
```
Cursor 의 Notepad:
- Project-specific knowledge.
- 매 chat 의 reference.
- Markdown 작성.

→ "Architecture decision" doc 식.
```

### YOLO mode
```
Cursor 가 자체 commit + run.
- Compose 후 자동 apply.
- Test 실행.
- Iterate.

→ Caution. Git checkpoint.
```

### Multi-model
```
- Claude Opus 4.7 (default modern).
- GPT-4o (alternative).
- Gemini 2.
- Cursor Auto (smart routing).

→ Switch per task.
```

### .vscode/extensions.json
```json
{
  "recommendations": [
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode"
  ]
}
```

→ Cursor 가 VS Code fork. 호환.

### Workflow 패턴
```
1. Plan in chat (no code).
2. Compose 가 multi-file 변경.
3. Cmd-K 가 specific tweak.
4. Tab 가 incremental.
5. Test (terminal).
6. Iterate.

→ AI 가 매 step 의 partner.
```

### Bug fix workflow
```
1. Paste error in chat.
2. @file 가 stack trace 의 file.
3. Cursor 가 root cause.
4. Compose 의 fix.
5. Test.
```

### Refactor
```
1. Cmd-K (선택 후).
2. "Extract to function".
3. Diff 검토.
4. Accept.

→ Manual refactor 보다 빠름.
```

### Test generation
```
1. 함수 선택.
2. Cmd-K → "Write Vitest test for this".
3. 매 test case.
```

→ 매번 더 좋은 quality.

### Documentation
```
1. 함수 선택.
2. Cmd-K → "Add JSDoc".
3. Param + return 자동.
```

### Anthropic Skills + Cursor
```
.cursor/skills/
├── react-component.md
├── api-route.md
└── test-writer.md
```

→ Project-specific skill.

### Multi-cursor (parallel)
```
Big refactor:
- 다른 chat 가 다른 file.
- Parallel.
```

### Privacy
```
- Privacy mode (data 가 train X).
- Codebase indexing 가 local 만.
- Ent / Privacy plan.

→ Sensitive code = privacy mode.
```

### Cost
```
Cursor Pro: $20 / month.
- 500 fast request / month.
- Unlimited slow.
- Bring own API key.

Free: 50 / month (slower).
```

### vs Claude Code (CLI)
```
Cursor: IDE (visual).
Claude Code: terminal.

→ 매 use case 의 different.
큰 refactor 가 Cursor 의 Composer.
큰 task = Claude Code (more agentic).
```

### vs GitHub Copilot
```
Copilot: tab autocomplete + chat.
Cursor: + Composer + .cursorrules + multi-model.

→ Cursor 가 더 powerful.
Copilot 가 cheap + 친화 (GitHub).
```

### vs Windsurf / Zed AI
```
Windsurf (Codeium): 비슷한 IDE.
Zed AI: lighter, modern.
Cursor: 가장 popular.

→ 매 발전 빠름.
```

### Tips
```
1. .cursorrules 가 큰 lever.
2. @file > @codebase (정확).
3. Plan 가 먼저, code 가 나중.
4. Reject 자주 (학습).
5. Git commit 자주 (rollback).
6. Test 가 ground truth.
```

### 함정
```
- 큰 codebase + @codebase = slow / expensive.
- .cursorrules 가 contradictory.
- AI 가 outdated library 사용.
- Hallucinated import.
- Long compose (>20 file) = quality ↓.
```

### LLM 의 진짜 가치
```
- Boilerplate 자동.
- Multi-file refactor.
- 새 framework 학습.
- Bug 의 root cause.
- Test generation.

→ Senior engineer 의 productivity 2-5x.
Junior 의 productivity 5-10x.
```

### Productivity
```
- 매 PR 의 LOC ↑.
- Cycle time ↓.
- Refactor 빈도 ↑.
- Test coverage ↑.

→ Measure (DORA).
```

## 🤔 의사결정 기준
| 작업 | 추천 |
|---|---|
| Multi-file refactor | Composer |
| Inline tweak | Cmd-K |
| Autocomplete | Tab |
| Plan / question | Chat |
| Specific knowledge | Notepad |
| Project rule | .cursorrules |

## ❌ 안티패턴
- **No .cursorrules**: AI 가 random style.
- **Big @codebase always**: cost.
- **No commit**: rollback X.
- **Compose 20+ file**: quality ↓.
- **AI 가 모든 거 작성**: review X = bug.

## 🤖 LLM 활용 힌트
- .cursorrules 가 first-class.
- Composer 가 multi-file.
- @file > @codebase (정확).
- Plan 먼저, code 나중.

## 🔗 관련 문서
- [[AI_Code_Agent_Patterns]]
- [[AI_Anthropic_Skills_Patterns]]
- [[AI_Tool_Composition_Deep]]
