@litmers/cursorflow-orchestrator 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -0
- package/LICENSE +21 -0
- package/README.md +310 -0
- package/commands/cursorflow-clean.md +162 -0
- package/commands/cursorflow-init.md +67 -0
- package/commands/cursorflow-monitor.md +131 -0
- package/commands/cursorflow-prepare.md +134 -0
- package/commands/cursorflow-resume.md +181 -0
- package/commands/cursorflow-review.md +220 -0
- package/commands/cursorflow-run.md +129 -0
- package/package.json +52 -0
- package/scripts/postinstall.js +27 -0
- package/src/cli/clean.js +30 -0
- package/src/cli/index.js +93 -0
- package/src/cli/init.js +235 -0
- package/src/cli/monitor.js +29 -0
- package/src/cli/resume.js +31 -0
- package/src/cli/run.js +51 -0
- package/src/cli/setup-commands.js +210 -0
- package/src/core/orchestrator.js +185 -0
- package/src/core/reviewer.js +233 -0
- package/src/core/runner.js +343 -0
- package/src/utils/config.js +195 -0
- package/src/utils/cursor-agent.js +190 -0
- package/src/utils/git.js +311 -0
- package/src/utils/logger.js +178 -0
- package/src/utils/state.js +207 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial package structure
|
|
12
|
+
- Core utilities (config, logger, git, cursor-agent, state)
|
|
13
|
+
- CLI commands (init, run, monitor, clean, resume)
|
|
14
|
+
- Cursor IDE commands (7 commands)
|
|
15
|
+
- Configuration system
|
|
16
|
+
- Documentation
|
|
17
|
+
|
|
18
|
+
## [1.0.0] - TBD
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- Git worktree-based orchestration
|
|
22
|
+
- Parallel lane execution
|
|
23
|
+
- AI code review integration
|
|
24
|
+
- Detailed logging (conversation, git operations, events)
|
|
25
|
+
- Dependency management
|
|
26
|
+
- Lane monitoring
|
|
27
|
+
- Branch and worktree management
|
|
28
|
+
- Cursor IDE integration
|
|
29
|
+
- Configuration-based setup
|
|
30
|
+
- CLI interface
|
|
31
|
+
- Comprehensive documentation
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
- **Parallel Execution**: Multiple lanes running simultaneously
|
|
35
|
+
- **Auto Review**: AI-based code review and feedback loop
|
|
36
|
+
- **Detailed Logging**: Full conversation and operation logs
|
|
37
|
+
- **Dependency Gate**: Automatic dependency change handling
|
|
38
|
+
- **Lane Ports**: Unique dev server port per lane
|
|
39
|
+
- **Cursor Integration**: Custom commands for IDE
|
|
40
|
+
- **Config System**: Flexible project-based configuration
|
|
41
|
+
|
|
42
|
+
### Documentation
|
|
43
|
+
- README with quick start guide
|
|
44
|
+
- Usage guide (GUIDE.md)
|
|
45
|
+
- API reference (API.md)
|
|
46
|
+
- Command guide (COMMANDS.md)
|
|
47
|
+
- Architecture documentation (ARCHITECTURE.md)
|
|
48
|
+
- Troubleshooting guide (TROUBLESHOOTING.md)
|
|
49
|
+
- Examples
|
|
50
|
+
|
|
51
|
+
### Dependencies
|
|
52
|
+
- Node.js >= 18.0.0
|
|
53
|
+
- Git with worktree support
|
|
54
|
+
- cursor-agent CLI
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Release Notes Template
|
|
59
|
+
|
|
60
|
+
### [X.Y.Z] - YYYY-MM-DD
|
|
61
|
+
|
|
62
|
+
#### Added
|
|
63
|
+
- New features
|
|
64
|
+
|
|
65
|
+
#### Changed
|
|
66
|
+
- Changes in existing functionality
|
|
67
|
+
|
|
68
|
+
#### Deprecated
|
|
69
|
+
- Soon-to-be removed features
|
|
70
|
+
|
|
71
|
+
#### Removed
|
|
72
|
+
- Removed features
|
|
73
|
+
|
|
74
|
+
#### Fixed
|
|
75
|
+
- Bug fixes
|
|
76
|
+
|
|
77
|
+
#### Security
|
|
78
|
+
- Security improvements
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Eugene Jin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# CursorFlow
|
|
2
|
+
|
|
3
|
+
> Git worktree 기반 병렬 AI 에이전트 오케스트레이션 시스템
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@cursorflow/orchestrator)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
|
|
9
|
+
## 주요 기능
|
|
10
|
+
|
|
11
|
+
- 🚀 **병렬 실행**: Git worktree를 활용한 여러 레인 동시 실행
|
|
12
|
+
- 🔍 **자동 리뷰**: AI 기반 코드 리뷰 및 피드백 루프
|
|
13
|
+
- 📝 **상세 로깅**: 대화, 커밋, Git 작업 전문 기록
|
|
14
|
+
- 🔀 **의존성 관리**: 자동 dependency gate 및 재개
|
|
15
|
+
- 🎯 **레인별 포트**: 각 레인에 고유한 개발 서버 포트 할당
|
|
16
|
+
- 💻 **Cursor 통합**: 커스텀 커맨드로 IDE 내에서 직접 관리
|
|
17
|
+
- 🛠️ **설정 기반**: 프로젝트별 유연한 설정
|
|
18
|
+
|
|
19
|
+
## 빠른 시작
|
|
20
|
+
|
|
21
|
+
### 설치
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# npm
|
|
25
|
+
npm install -g @litmers/cursorflow-orchestrator
|
|
26
|
+
|
|
27
|
+
# pnpm (권장)
|
|
28
|
+
pnpm add -g @cursorflow/orchestrator
|
|
29
|
+
|
|
30
|
+
# yarn
|
|
31
|
+
yarn global add @cursorflow/orchestrator
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 요구사항
|
|
35
|
+
|
|
36
|
+
- **Node.js** >= 18.0.0
|
|
37
|
+
- **Git** with worktree support
|
|
38
|
+
- **cursor-agent CLI**: `npm install -g @cursor/agent`
|
|
39
|
+
|
|
40
|
+
### 프로젝트 초기화
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
cd your-project
|
|
44
|
+
cursorflow init --example
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
이 명령은:
|
|
48
|
+
1. `cursorflow.config.js` 설정 파일 생성
|
|
49
|
+
2. `_cursorflow/tasks/` 및 `_cursorflow/logs/` 디렉토리 생성
|
|
50
|
+
3. Cursor IDE 커맨드 설치
|
|
51
|
+
4. 예제 태스크 생성 (--example 옵션 사용 시)
|
|
52
|
+
|
|
53
|
+
### 예제 실행
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# 예제 태스크 실행
|
|
57
|
+
cursorflow run _cursorflow/tasks/example/
|
|
58
|
+
|
|
59
|
+
# 다른 터미널에서 모니터링
|
|
60
|
+
cursorflow monitor --watch
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Cursor IDE 통합
|
|
64
|
+
|
|
65
|
+
CursorFlow는 Cursor IDE 내에서 사용할 수 있는 커스텀 커맨드를 제공합니다.
|
|
66
|
+
|
|
67
|
+
### 커맨드 설치
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# 초기화 시 자동 설치
|
|
71
|
+
cursorflow init
|
|
72
|
+
|
|
73
|
+
# 또는 수동 설치
|
|
74
|
+
npx cursorflow-setup
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 사용법
|
|
78
|
+
|
|
79
|
+
Cursor IDE 채팅에서 `/` 입력 후 다음 커맨드 사용:
|
|
80
|
+
|
|
81
|
+
- `/cursorflow-init` - 프로젝트 초기화
|
|
82
|
+
- `/cursorflow-prepare` - 태스크 준비
|
|
83
|
+
- `/cursorflow-run` - 오케스트레이션 실행
|
|
84
|
+
- `/cursorflow-monitor` - 실행 모니터링
|
|
85
|
+
- `/cursorflow-clean` - 정리 작업
|
|
86
|
+
- `/cursorflow-resume` - 중단된 레인 재개
|
|
87
|
+
- `/cursorflow-review` - 리뷰 설정 및 확인
|
|
88
|
+
|
|
89
|
+
## CLI 명령어
|
|
90
|
+
|
|
91
|
+
### 초기화
|
|
92
|
+
```bash
|
|
93
|
+
cursorflow init [options]
|
|
94
|
+
--example 예제 태스크 생성
|
|
95
|
+
--with-commands Cursor 커맨드 설치 (기본: true)
|
|
96
|
+
--config-only 설정 파일만 생성
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 태스크 준비
|
|
100
|
+
```bash
|
|
101
|
+
cursorflow prepare <feature> [options]
|
|
102
|
+
--lanes <number> 레인 개수
|
|
103
|
+
--template <path> 템플릿 파일 경로
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 실행
|
|
107
|
+
```bash
|
|
108
|
+
cursorflow run <tasks-dir> [options]
|
|
109
|
+
--dry-run 실행 계획만 확인
|
|
110
|
+
--executor <type> cursor-agent | cloud
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 모니터링
|
|
114
|
+
```bash
|
|
115
|
+
cursorflow monitor [run-dir] [options]
|
|
116
|
+
--watch 실시간 모니터링
|
|
117
|
+
--interval <sec> 갱신 간격
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 정리
|
|
121
|
+
```bash
|
|
122
|
+
cursorflow clean <type> [options]
|
|
123
|
+
branches 브랜치 정리
|
|
124
|
+
worktrees 워크트리 정리
|
|
125
|
+
logs 로그 정리
|
|
126
|
+
all 모두 정리
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 재개
|
|
130
|
+
```bash
|
|
131
|
+
cursorflow resume <lane> [options]
|
|
132
|
+
--clean 브랜치 정리 후 재시작
|
|
133
|
+
--restart 처음부터 다시 시작
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## 설정
|
|
137
|
+
|
|
138
|
+
### 설정 파일 (cursorflow.config.js)
|
|
139
|
+
|
|
140
|
+
```javascript
|
|
141
|
+
module.exports = {
|
|
142
|
+
// 디렉토리 설정
|
|
143
|
+
tasksDir: '_cursorflow/tasks',
|
|
144
|
+
logsDir: '_cursorflow/logs',
|
|
145
|
+
|
|
146
|
+
// Git 설정
|
|
147
|
+
baseBranch: 'main',
|
|
148
|
+
branchPrefix: 'feature/',
|
|
149
|
+
|
|
150
|
+
// 실행 설정
|
|
151
|
+
executor: 'cursor-agent', // 'cursor-agent' | 'cloud'
|
|
152
|
+
pollInterval: 60,
|
|
153
|
+
|
|
154
|
+
// 의존성 관리
|
|
155
|
+
allowDependencyChange: false,
|
|
156
|
+
lockfileReadOnly: true,
|
|
157
|
+
|
|
158
|
+
// 리뷰 설정
|
|
159
|
+
enableReview: true,
|
|
160
|
+
reviewModel: 'sonnet-4.5-thinking',
|
|
161
|
+
maxReviewIterations: 3,
|
|
162
|
+
|
|
163
|
+
// 레인 기본 설정
|
|
164
|
+
defaultLaneConfig: {
|
|
165
|
+
devPort: 3001,
|
|
166
|
+
autoCreatePr: false,
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
// 로깅
|
|
170
|
+
logLevel: 'info',
|
|
171
|
+
verboseGit: false,
|
|
172
|
+
};
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### 태스크 파일 (JSON)
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"repository": "https://github.com/your-org/your-repo",
|
|
180
|
+
"baseBranch": "main",
|
|
181
|
+
"branchPrefix": "feature/my-",
|
|
182
|
+
"executor": "cursor-agent",
|
|
183
|
+
"laneNumber": 1,
|
|
184
|
+
"devPort": 3001,
|
|
185
|
+
"enableReview": true,
|
|
186
|
+
"tasks": [
|
|
187
|
+
{
|
|
188
|
+
"name": "implement",
|
|
189
|
+
"model": "sonnet-4.5",
|
|
190
|
+
"acceptanceCriteria": [
|
|
191
|
+
"빌드 에러 없음",
|
|
192
|
+
"주요 기능 구현됨"
|
|
193
|
+
],
|
|
194
|
+
"prompt": "구현 지시사항..."
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## 사용 예시
|
|
201
|
+
|
|
202
|
+
### 단일 기능 개발
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# 1. 태스크 준비
|
|
206
|
+
cursorflow prepare AddUserAuth --lanes 1
|
|
207
|
+
|
|
208
|
+
# 2. 태스크 JSON 편집
|
|
209
|
+
# _cursorflow/tasks/2512191830_AddUserAuth/01-task.json
|
|
210
|
+
|
|
211
|
+
# 3. 실행
|
|
212
|
+
cursorflow run _cursorflow/tasks/2512191830_AddUserAuth/
|
|
213
|
+
|
|
214
|
+
# 4. 모니터링
|
|
215
|
+
cursorflow monitor --watch
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### 멀티 도메인 병렬 개발
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# 1. 태스크 준비 (5개 레인)
|
|
222
|
+
cursorflow prepare AdminDashboard --lanes 5
|
|
223
|
+
|
|
224
|
+
# 2. 각 레인 설정
|
|
225
|
+
# 01-dashboard.json, 02-clients.json, ...
|
|
226
|
+
|
|
227
|
+
# 3. 병렬 실행
|
|
228
|
+
cursorflow run _cursorflow/tasks/2512191830_AdminDashboard/
|
|
229
|
+
|
|
230
|
+
# 4. 실시간 모니터링
|
|
231
|
+
cursorflow monitor --watch --interval 5
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## 아키텍처
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
┌─────────────────────────────────────────────────────────┐
|
|
238
|
+
│ CursorFlow CLI │
|
|
239
|
+
└──────────────────┬──────────────────────────────────────┘
|
|
240
|
+
│
|
|
241
|
+
┌──────────┴──────────┐
|
|
242
|
+
│ │
|
|
243
|
+
┌────▼────┐ ┌────▼────┐
|
|
244
|
+
│ Config │ │ Core │
|
|
245
|
+
│ System │ │ Engine │
|
|
246
|
+
└────┬────┘ └────┬────┘
|
|
247
|
+
│ │
|
|
248
|
+
│ ┌──────────┼──────────┐
|
|
249
|
+
│ │ │ │
|
|
250
|
+
┌────▼────┐ ┌─▼──┐ ┌────▼────┐ ┌─▼─────┐
|
|
251
|
+
│ Git │ │Run │ │ Monitor │ │Review │
|
|
252
|
+
│ Utils │ │ner │ │ │ │ │
|
|
253
|
+
└─────────┘ └─┬──┘ └─────────┘ └───────┘
|
|
254
|
+
│
|
|
255
|
+
┌────────┼────────┐
|
|
256
|
+
│ │ │
|
|
257
|
+
┌────▼───┐ ┌─▼──────┐ │
|
|
258
|
+
│Worktree│ │ Cursor │ │
|
|
259
|
+
│ │ │ Agent │ │
|
|
260
|
+
└────────┘ └────────┘ │
|
|
261
|
+
│
|
|
262
|
+
┌────▼────┐
|
|
263
|
+
│ Logs │
|
|
264
|
+
│ State │
|
|
265
|
+
└─────────┘
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## 문서
|
|
269
|
+
|
|
270
|
+
- [📖 사용 가이드](docs/GUIDE.md) - 상세한 사용 방법
|
|
271
|
+
- [📋 API 레퍼런스](docs/API.md) - CLI 및 설정 API
|
|
272
|
+
- [🎨 커맨드 가이드](docs/COMMANDS.md) - Cursor 커맨드 사용법
|
|
273
|
+
- [🏗️ 아키텍처](docs/ARCHITECTURE.md) - 시스템 구조
|
|
274
|
+
- [🔧 트러블슈팅](docs/TROUBLESHOOTING.md) - 문제 해결
|
|
275
|
+
- [📦 예제 모음](examples/) - 실전 예제
|
|
276
|
+
|
|
277
|
+
## 로드맵
|
|
278
|
+
|
|
279
|
+
- [ ] v1.0: 핵심 기능 및 기본 문서
|
|
280
|
+
- [ ] v1.1: 향상된 리뷰 시스템
|
|
281
|
+
- [ ] v1.2: 클라우드 실행 개선
|
|
282
|
+
- [ ] v1.3: 플러그인 시스템
|
|
283
|
+
- [ ] v2.0: GUI 도구
|
|
284
|
+
|
|
285
|
+
## 기여하기
|
|
286
|
+
|
|
287
|
+
기여는 환영합니다! [CONTRIBUTING.md](CONTRIBUTING.md)를 참조해주세요.
|
|
288
|
+
|
|
289
|
+
### 개발 환경 설정
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
git clone https://github.com/eungjin-cigro/cursorflow.git
|
|
293
|
+
cd cursorflow
|
|
294
|
+
pnpm install
|
|
295
|
+
pnpm test
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## 라이선스
|
|
299
|
+
|
|
300
|
+
MIT © Eugene Jin
|
|
301
|
+
|
|
302
|
+
## 지원
|
|
303
|
+
|
|
304
|
+
- 🐛 [Issue Tracker](https://github.com/eungjin-cigro/cursorflow/issues)
|
|
305
|
+
- 💬 [Discussions](https://github.com/eungjin-cigro/cursorflow/discussions)
|
|
306
|
+
- 📧 Email: eungjin.cigro@gmail.com
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
**Made with ❤️ for Cursor IDE users**
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# CursorFlow Clean
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
브랜치, 워크트리, 로그 등을 정리합니다. 오래된 파일이나 실패한 실행의 잔여물을 제거합니다.
|
|
5
|
+
|
|
6
|
+
## Steps
|
|
7
|
+
|
|
8
|
+
1. **정리 타입 선택**
|
|
9
|
+
|
|
10
|
+
| 타입 | 설명 |
|
|
11
|
+
|------|------|
|
|
12
|
+
| `branches` | Git 브랜치 정리 |
|
|
13
|
+
| `worktrees` | Git worktree 정리 |
|
|
14
|
+
| `logs` | 로그 파일 정리 |
|
|
15
|
+
| `all` | 모두 정리 |
|
|
16
|
+
|
|
17
|
+
2. **브랜치 정리**
|
|
18
|
+
```bash
|
|
19
|
+
cursorflow clean branches --pattern "feature/my-*"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
3. **워크트리 정리**
|
|
23
|
+
```bash
|
|
24
|
+
cursorflow clean worktrees --all
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
4. **로그 정리**
|
|
28
|
+
```bash
|
|
29
|
+
cursorflow clean logs --older-than 30
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
5. **Dry run으로 확인**
|
|
33
|
+
```bash
|
|
34
|
+
cursorflow clean all --dry-run
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 옵션
|
|
38
|
+
|
|
39
|
+
| 옵션 | 설명 |
|
|
40
|
+
|------|------|
|
|
41
|
+
| `--pattern <pattern>` | 패턴 매칭 (예: "feature/*") |
|
|
42
|
+
| `--older-than <days>` | N일 이상 된 항목만 (logs용) |
|
|
43
|
+
| `--dry-run` | 삭제할 항목만 표시 |
|
|
44
|
+
| `--force` | 확인 없이 삭제 |
|
|
45
|
+
| `--local-only` | 로컬만 (브랜치용) |
|
|
46
|
+
| `--remote-only` | 원격만 (브랜치용) |
|
|
47
|
+
|
|
48
|
+
## 예제
|
|
49
|
+
|
|
50
|
+
### 브랜치 정리
|
|
51
|
+
|
|
52
|
+
#### 패턴 매칭으로 삭제
|
|
53
|
+
```bash
|
|
54
|
+
cursorflow clean branches --pattern "feature/dashboard-*"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### 모든 CursorFlow 브랜치
|
|
58
|
+
```bash
|
|
59
|
+
cursorflow clean branches --pattern "feature/*" --dry-run
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### 로컬 브랜치만
|
|
63
|
+
```bash
|
|
64
|
+
cursorflow clean branches --pattern "feature/*" --local-only
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 워크트리 정리
|
|
68
|
+
|
|
69
|
+
#### 모든 워크트리
|
|
70
|
+
```bash
|
|
71
|
+
cursorflow clean worktrees --all
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
#### 특정 패턴
|
|
75
|
+
```bash
|
|
76
|
+
cursorflow clean worktrees --pattern "*-dashboard-*"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 로그 정리
|
|
80
|
+
|
|
81
|
+
#### 30일 이상 된 로그
|
|
82
|
+
```bash
|
|
83
|
+
cursorflow clean logs --older-than 30
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
#### 모든 로그
|
|
87
|
+
```bash
|
|
88
|
+
cursorflow clean logs --all --force
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 전체 정리
|
|
92
|
+
|
|
93
|
+
#### 모두 확인 후 삭제
|
|
94
|
+
```bash
|
|
95
|
+
cursorflow clean all --dry-run
|
|
96
|
+
cursorflow clean all --force
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## 정리 결과
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
🧹 Cleaning CursorFlow Resources
|
|
103
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
104
|
+
|
|
105
|
+
Branches to delete:
|
|
106
|
+
- feature/dashboard-pipeline-abc123 (local)
|
|
107
|
+
- feature/dashboard-pipeline-abc123 (remote)
|
|
108
|
+
- feature/client-pipeline-def456 (local)
|
|
109
|
+
|
|
110
|
+
Worktrees to remove:
|
|
111
|
+
- .cursorflow/logs/worktrees/01-dashboard-pipeline-abc123
|
|
112
|
+
- .cursorflow/logs/worktrees/02-client-pipeline-def456
|
|
113
|
+
|
|
114
|
+
Logs to delete:
|
|
115
|
+
- _cursorflow/logs/runs/01-dashboard-2025-12-10T10-00-00 (9 days old)
|
|
116
|
+
|
|
117
|
+
Total: 5 branches, 2 worktrees, 1 log directory
|
|
118
|
+
|
|
119
|
+
Proceed? [y/N]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## 주의사항
|
|
123
|
+
|
|
124
|
+
1. **백업**: 중요한 작업 중인 브랜치는 백업
|
|
125
|
+
2. **확인**: `--dry-run`으로 먼저 확인
|
|
126
|
+
3. **원격**: 원격 브랜치 삭제는 신중하게
|
|
127
|
+
4. **복구**: 삭제된 항목은 복구 어려움
|
|
128
|
+
|
|
129
|
+
## Checklist
|
|
130
|
+
- [ ] 정리할 항목을 확인했는가?
|
|
131
|
+
- [ ] 백업이 필요한가?
|
|
132
|
+
- [ ] dry-run으로 먼저 확인했는가?
|
|
133
|
+
- [ ] 다른 사람이 사용 중인 브랜치는 아닌가?
|
|
134
|
+
- [ ] 원격 저장소에서도 삭제할 것인가?
|
|
135
|
+
|
|
136
|
+
## 트러블슈팅
|
|
137
|
+
|
|
138
|
+
### 브랜치 삭제 실패
|
|
139
|
+
```bash
|
|
140
|
+
# 강제 삭제
|
|
141
|
+
git branch -D <branch-name>
|
|
142
|
+
git push origin --delete <branch-name>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### 워크트리 제거 실패
|
|
146
|
+
```bash
|
|
147
|
+
# 강제 제거
|
|
148
|
+
git worktree remove --force <worktree-path>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### 로그 디렉토리 권한 문제
|
|
152
|
+
```bash
|
|
153
|
+
# 권한 확인
|
|
154
|
+
ls -la _cursorflow/logs/
|
|
155
|
+
# 권한 수정
|
|
156
|
+
chmod -R u+w _cursorflow/logs/
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Next Steps
|
|
160
|
+
1. 정기적으로 로그 정리 (예: 월 1회)
|
|
161
|
+
2. CI/CD에 자동 정리 스크립트 추가
|
|
162
|
+
3. `.gitignore`에 로그 디렉토리 추가
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# CursorFlow Init
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
프로젝트에 CursorFlow를 초기화합니다. 설정 파일과 디렉토리 구조를 생성하고, 선택적으로 Cursor 커맨드와 예제 태스크를 설치합니다.
|
|
5
|
+
|
|
6
|
+
## Steps
|
|
7
|
+
|
|
8
|
+
1. **초기화 실행**
|
|
9
|
+
```bash
|
|
10
|
+
cursorflow init
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
2. **옵션 선택**
|
|
14
|
+
- `--example`: 예제 태스크 생성
|
|
15
|
+
- `--config-only`: 설정 파일만 생성
|
|
16
|
+
- `--no-commands`: Cursor 커맨드 설치 건너뛰기
|
|
17
|
+
- `--force`: 기존 파일 덮어쓰기
|
|
18
|
+
|
|
19
|
+
3. **생성 확인**
|
|
20
|
+
- `cursorflow.config.js` 파일 생성됨
|
|
21
|
+
- `_cursorflow/tasks/` 디렉토리 생성됨
|
|
22
|
+
- `_cursorflow/logs/` 디렉토리 생성됨
|
|
23
|
+
- `.cursor/commands/cursorflow/` 커맨드 설치됨 (선택)
|
|
24
|
+
|
|
25
|
+
4. **설정 파일 검토**
|
|
26
|
+
```javascript
|
|
27
|
+
// cursorflow.config.js
|
|
28
|
+
module.exports = {
|
|
29
|
+
tasksDir: '_cursorflow/tasks',
|
|
30
|
+
logsDir: '_cursorflow/logs',
|
|
31
|
+
baseBranch: 'main',
|
|
32
|
+
// ... 기타 설정
|
|
33
|
+
};
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 예제
|
|
37
|
+
|
|
38
|
+
### 기본 초기화
|
|
39
|
+
```bash
|
|
40
|
+
cursorflow init
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 예제 태스크 포함
|
|
44
|
+
```bash
|
|
45
|
+
cursorflow init --example
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 설정 파일만 생성
|
|
49
|
+
```bash
|
|
50
|
+
cursorflow init --config-only
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 기존 파일 덮어쓰기
|
|
54
|
+
```bash
|
|
55
|
+
cursorflow init --force
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Checklist
|
|
59
|
+
- [ ] 설정 파일이 프로젝트 루트에 생성되었는가?
|
|
60
|
+
- [ ] 필요한 디렉토리가 생성되었는가?
|
|
61
|
+
- [ ] Cursor 커맨드가 설치되었는가?
|
|
62
|
+
- [ ] 설정 내용이 프로젝트에 맞게 조정되었는가?
|
|
63
|
+
|
|
64
|
+
## Next Steps
|
|
65
|
+
1. `cursorflow.config.js` 파일을 프로젝트에 맞게 수정
|
|
66
|
+
2. Cursor IDE에서 `/` 입력하여 커맨드 확인
|
|
67
|
+
3. `cursorflow prepare MyFeature`로 태스크 생성 시작
|