@litmers/cursorflow-orchestrator 0.1.37 → 0.1.39
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/commands/cursorflow-init.md +113 -32
- package/commands/cursorflow-prepare.md +146 -339
- package/commands/cursorflow-run.md +148 -131
- package/dist/cli/add.js +8 -4
- package/dist/cli/add.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/new.js +3 -5
- package/dist/cli/new.js.map +1 -1
- package/dist/cli/resume.js +26 -15
- package/dist/cli/resume.js.map +1 -1
- package/dist/cli/run.js +1 -6
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/setup-commands.d.ts +1 -0
- package/dist/cli/setup-commands.js +1 -0
- package/dist/cli/setup-commands.js.map +1 -1
- package/dist/core/runner/agent.d.ts +5 -1
- package/dist/core/runner/agent.js +31 -1
- package/dist/core/runner/agent.js.map +1 -1
- package/dist/core/runner/pipeline.d.ts +0 -1
- package/dist/core/runner/pipeline.js +116 -167
- package/dist/core/runner/pipeline.js.map +1 -1
- package/dist/core/runner/prompt.d.ts +0 -1
- package/dist/core/runner/prompt.js +11 -16
- package/dist/core/runner/prompt.js.map +1 -1
- package/dist/core/runner/task.d.ts +1 -2
- package/dist/core/runner/task.js +24 -36
- package/dist/core/runner/task.js.map +1 -1
- package/dist/core/runner.js +12 -2
- package/dist/core/runner.js.map +1 -1
- package/dist/core/stall-detection.d.ts +16 -4
- package/dist/core/stall-detection.js +97 -148
- package/dist/core/stall-detection.js.map +1 -1
- package/dist/services/logging/console.d.ts +7 -1
- package/dist/services/logging/console.js +15 -3
- package/dist/services/logging/console.js.map +1 -1
- package/dist/services/logging/formatter.js +2 -0
- package/dist/services/logging/formatter.js.map +1 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/logging.d.ts +1 -1
- package/dist/types/task.d.ts +2 -7
- package/dist/utils/doctor.js +4 -4
- package/dist/utils/doctor.js.map +1 -1
- package/dist/utils/git.js +2 -0
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/health.js +13 -13
- package/dist/utils/health.js.map +1 -1
- package/dist/utils/log-formatter.js +44 -7
- package/dist/utils/log-formatter.js.map +1 -1
- package/dist/utils/logger.js +2 -2
- package/dist/utils/logger.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/add.ts +9 -4
- package/src/cli/index.ts +3 -0
- package/src/cli/new.ts +3 -5
- package/src/cli/resume.ts +30 -19
- package/src/cli/run.ts +1 -6
- package/src/cli/setup-commands.ts +1 -1
- package/src/core/runner/agent.ts +36 -4
- package/src/core/runner/pipeline.ts +127 -176
- package/src/core/runner/prompt.ts +11 -18
- package/src/core/runner/task.ts +24 -37
- package/src/core/runner.ts +13 -2
- package/src/core/stall-detection.ts +190 -146
- package/src/services/logging/console.ts +15 -3
- package/src/services/logging/formatter.ts +2 -0
- package/src/types/config.ts +1 -1
- package/src/types/logging.ts +4 -2
- package/src/types/task.ts +2 -7
- package/src/utils/doctor.ts +5 -5
- package/src/utils/git.ts +2 -0
- package/src/utils/health.ts +15 -15
- package/src/utils/log-formatter.ts +50 -7
- package/src/utils/logger.ts +2 -2
- package/commands/cursorflow-add.md +0 -159
- package/commands/cursorflow-clean.md +0 -84
- package/commands/cursorflow-doctor.md +0 -102
- package/commands/cursorflow-models.md +0 -51
- package/commands/cursorflow-monitor.md +0 -90
- package/commands/cursorflow-new.md +0 -87
- package/commands/cursorflow-resume.md +0 -205
- package/commands/cursorflow-signal.md +0 -52
- package/commands/cursorflow-stop.md +0 -55
- package/commands/cursorflow-triggers.md +0 -250
|
@@ -1,436 +1,243 @@
|
|
|
1
|
-
#
|
|
1
|
+
# cursorflow prepare
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Flow 생성과 Task 추가를 위한 통합 가이드입니다.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
### 1. Each Lane is a Developer
|
|
8
|
-
- **One developer = One area of responsibility**
|
|
9
|
-
- Just as you wouldn't assign a frontend developer to work on database migrations while simultaneously building UI components, don't mix unrelated concerns in a single lane
|
|
10
|
-
- A lane maintains context across its tasks—switching domains mid-lane loses that continuity
|
|
11
|
-
|
|
12
|
-
### 2. Separation of Concerns
|
|
13
|
-
- **Different domains → Different lanes**: Backend API and Frontend UI should be separate lanes
|
|
14
|
-
- **Same domain, sequential work → Multiple tasks in one lane**: Planning, implementing, and testing the same feature stays in one lane
|
|
15
|
-
- **Shared dependencies → Use `dependsOn`**: If the UI needs the API to exist first, make the UI lane depend on the API lane
|
|
16
|
-
|
|
17
|
-
### 3. Clear Boundaries, Clear Prompts
|
|
18
|
-
- Each task prompt should be specific enough that a developer could execute it without asking questions
|
|
19
|
-
- If your prompt says "implement the feature," that's too vague—specify WHAT, WHERE, and HOW
|
|
20
|
-
- Include verification steps: "Double-check that all edge cases are handled"
|
|
21
|
-
|
|
22
|
-
### 4. Fail-Safe Design
|
|
23
|
-
- **Expect incomplete work**: AI agents sometimes miss edge cases. Add a "verify" task at the end
|
|
24
|
-
- **Post-merge validation**: When a lane depends on another, include instructions to "merge, resolve conflicts, then verify integration"
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Terminal-First Workflow
|
|
29
|
-
|
|
30
|
-
CursorFlow follows a **terminal-first** approach. Everything is defined via CLI commands.
|
|
5
|
+
## 워크플로우
|
|
31
6
|
|
|
32
7
|
```
|
|
33
|
-
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
34
|
-
│ 1.
|
|
35
|
-
│ (
|
|
36
|
-
└─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Step-by-Step Workflow
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
# Step 1: Create lanes with preset templates
|
|
43
|
-
# Complex feature: plan → implement → test
|
|
44
|
-
cursorflow prepare AuthSystem --preset complex --prompt "Build authentication system"
|
|
45
|
-
|
|
46
|
-
# Or simple fix: implement → test
|
|
47
|
-
cursorflow prepare BugFix --preset simple --prompt "Fix login bug"
|
|
48
|
-
|
|
49
|
-
# Or multi-lane with auto-merge for dependent lanes
|
|
50
|
-
cursorflow prepare FullStack --lanes 3 --sequential --preset complex \
|
|
51
|
-
--prompt "Build your layer"
|
|
52
|
-
|
|
53
|
-
# Step 2: Add more lanes if needed (merge preset auto-applied)
|
|
54
|
-
cursorflow prepare --add-lane _cursorflow/tasks/2412211530_AuthSystem \
|
|
55
|
-
--depends-on "01-lane-1,02-lane-2" # Uses merge preset automatically
|
|
56
|
-
|
|
57
|
-
# Step 3: Add tasks to existing lanes
|
|
58
|
-
cursorflow prepare --add-task _cursorflow/tasks/2412211530_AuthSystem/01-lane-1.json \
|
|
59
|
-
--task "verify|sonnet-4.5|Double-check all requirements|All criteria met"
|
|
60
|
-
|
|
61
|
-
# Step 4: Validate configuration
|
|
62
|
-
cursorflow doctor --tasks-dir _cursorflow/tasks/2412211530_AuthSystem
|
|
63
|
-
|
|
64
|
-
# Step 5: Run
|
|
65
|
-
cursorflow run _cursorflow/tasks/2412211530_AuthSystem
|
|
8
|
+
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
9
|
+
│ 1. Flow 생성 │ ──▶ │ 2. Task 추가 │ ──▶ │ 3. 실행 │
|
|
10
|
+
│ (new) │ │ (add) │ │ (run) │
|
|
11
|
+
└─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
66
12
|
```
|
|
67
13
|
|
|
68
14
|
---
|
|
69
15
|
|
|
70
|
-
##
|
|
16
|
+
## 🎯 설계 원칙: Lane과 Task 나누기
|
|
71
17
|
|
|
72
|
-
|
|
18
|
+
> **핵심**: 엔지니어링 매니저가 개발자에게 업무를 할당하듯이 생각하세요.
|
|
73
19
|
|
|
74
|
-
|
|
75
|
-
# Create new feature
|
|
76
|
-
cursorflow prepare <feature-name> [options]
|
|
77
|
-
|
|
78
|
-
# Add lane to existing task directory
|
|
79
|
-
cursorflow prepare --add-lane <task-dir> [options]
|
|
20
|
+
### 1. Lane = 독립적인 개발자 1명
|
|
80
21
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
22
|
+
| 원칙 | 설명 |
|
|
23
|
+
|------|------|
|
|
24
|
+
| **한 레인 = 한 영역** | 프론트엔드 개발자에게 DB 마이그레이션을 동시에 시키지 않듯이, 레인에 서로 다른 도메인을 섞지 마세요 |
|
|
25
|
+
| **컨텍스트 유지** | 레인은 태스크 간 컨텍스트를 유지합니다. 도메인이 바뀌면 그 연속성이 끊깁니다 |
|
|
84
26
|
|
|
85
|
-
###
|
|
86
|
-
|
|
87
|
-
| Option | Description |
|
|
88
|
-
|--------|-------------|
|
|
89
|
-
| **Core** ||
|
|
90
|
-
| `<feature-name>` | Feature name (for new task directories) |
|
|
91
|
-
| `--lanes <num>` | Number of lanes to create (default: 1) |
|
|
92
|
-
| `--preset <type>` | Use preset template: `complex` \| `simple` \| `merge` |
|
|
93
|
-
| **Task Definition** ||
|
|
94
|
-
| `--prompt <text>` | Task prompt (context for preset or single task) |
|
|
95
|
-
| `--criteria <list>` | Comma-separated acceptance criteria |
|
|
96
|
-
| `--model <model>` | Model to use (default: `sonnet-4.5`) |
|
|
97
|
-
| `--task <spec>` | Full task spec: `"name\|model\|prompt\|criteria"` (repeatable) |
|
|
98
|
-
| **Dependencies** ||
|
|
99
|
-
| `--sequential` | Chain lanes: 1 → 2 → 3 (auto-merge between lanes) |
|
|
100
|
-
| `--deps <spec>` | Custom dependency graph: `"2:1;3:1,2"` |
|
|
101
|
-
| `--depends-on <lanes>` | Dependencies for `--add-lane`: `"01-lane-1,02-lane-2"` |
|
|
102
|
-
| **Incremental** ||
|
|
103
|
-
| `--add-lane <dir>` | Add a new lane to existing task directory |
|
|
104
|
-
| `--add-task <file>` | Append task(s) to existing lane JSON file |
|
|
105
|
-
| **Advanced** ||
|
|
106
|
-
| `--template <path>` | Custom JSON template |
|
|
107
|
-
| `--force` | Overwrite existing files |
|
|
108
|
-
|
|
109
|
-
---
|
|
27
|
+
### 2. 언제 레인을 나눌까?
|
|
110
28
|
|
|
111
|
-
|
|
29
|
+
| 상황 | 레인 수 | 이유 |
|
|
30
|
+
|------|---------|------|
|
|
31
|
+
| Frontend + Backend | 2개 | 다른 파일 세트, 병렬 실행 가능 |
|
|
32
|
+
| DB + API + UI | 3개 | 순차 의존성, 명확한 분리 |
|
|
33
|
+
| 여러 마이크로서비스 | N개 | 완전히 독립된 코드베이스 |
|
|
34
|
+
| 리팩토링 + 새 기능 | 2개 | 리팩토링 먼저, 기능은 의존 |
|
|
112
35
|
|
|
113
|
-
|
|
36
|
+
### 3. 언제 한 레인에 유지할까?
|
|
114
37
|
|
|
115
|
-
|
|
38
|
+
| 상황 | 이유 |
|
|
39
|
+
|------|------|
|
|
40
|
+
| 같은 파일들을 순차 작업 | 컨텍스트 연속성 |
|
|
41
|
+
| Plan → Implement → Test | 단일 개발자 마인드셋 |
|
|
42
|
+
| 밀접하게 결합된 변경 | 머지 복잡성 방지 |
|
|
116
43
|
|
|
117
|
-
|
|
44
|
+
### 4. 좋은 프롬프트 작성법
|
|
118
45
|
|
|
119
|
-
```bash
|
|
120
|
-
cursorflow prepare FeatureName --preset complex --prompt "Implement user authentication"
|
|
121
46
|
```
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
1. **plan** (sonnet-4.5-thinking): Analyze requirements, **save plan to `_cursorflow/PLAN_lane-{N}.md`**
|
|
125
|
-
2. **implement** (sonnet-4.5): **Read plan from `_cursorflow/PLAN_lane-{N}.md`**, build feature
|
|
126
|
-
3. **test** (sonnet-4.5): **Refer to plan document** for test requirements
|
|
127
|
-
|
|
128
|
-
**Plan Document Path**: Each lane saves its plan to `_cursorflow/PLAN_lane-{N}.md` where `{N}` is the lane number. The implement and test tasks explicitly reference this document.
|
|
129
|
-
|
|
130
|
-
### `--preset simple` (implement → test)
|
|
131
|
-
|
|
132
|
-
For simple changes or bug fixes:
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
cursorflow prepare BugFix --preset simple --prompt "Fix login validation bug"
|
|
47
|
+
❌ 나쁜 예: "기능 구현해줘"
|
|
48
|
+
✅ 좋은 예: "src/api/users.ts에 User 모델용 GET/POST/PUT/DELETE 엔드포인트 생성"
|
|
136
49
|
```
|
|
137
50
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
For quick, simple changes you can omit the preset entirely:
|
|
51
|
+
| 원칙 | 설명 |
|
|
52
|
+
|------|------|
|
|
53
|
+
| **구체적으로** | WHAT, WHERE, HOW를 명시 |
|
|
54
|
+
| **검증 포함** | "모든 엣지 케이스 처리 확인" 같은 검증 단계 추가 |
|
|
55
|
+
| **의존 시 머지 안내** | "머지 후 충돌 해결하고 통합 검증" |
|
|
145
56
|
|
|
146
|
-
|
|
147
|
-
cursorflow prepare QuickFix --prompt "Fix typo in README.md"
|
|
148
|
-
```
|
|
57
|
+
### 5. 실패 대비 설계
|
|
149
58
|
|
|
150
|
-
|
|
59
|
+
- **verify 태스크 추가**: AI는 첫 시도에 엣지 케이스를 놓칠 수 있음
|
|
60
|
+
- **의존 레인엔 머지 지시**: "이전 브랜치 머지 후 통합 확인"
|
|
151
61
|
|
|
152
|
-
|
|
62
|
+
---
|
|
153
63
|
|
|
154
|
-
|
|
64
|
+
## Step 1: Flow와 Lane 생성 (`new`)
|
|
155
65
|
|
|
156
66
|
```bash
|
|
157
|
-
cursorflow
|
|
158
|
-
--preset merge --depends-on "01-lane-1,02-lane-2"
|
|
67
|
+
cursorflow new <FlowName> --lanes "lane1,lane2,..."
|
|
159
68
|
```
|
|
160
69
|
|
|
161
|
-
|
|
162
|
-
1. **merge** (sonnet-4.5): Resolve conflicts, verify integration
|
|
163
|
-
2. **test** (sonnet-4.5): Run integration tests
|
|
70
|
+
### 예시
|
|
164
71
|
|
|
165
|
-
|
|
72
|
+
```bash
|
|
73
|
+
# 백엔드와 프론트엔드 2개 레인 생성
|
|
74
|
+
cursorflow new ShopFeature --lanes "backend,frontend"
|
|
166
75
|
|
|
167
|
-
|
|
76
|
+
# API, Web, Mobile 3개 레인 생성
|
|
77
|
+
cursorflow new SearchFeature --lanes "api,web,mobile"
|
|
78
|
+
```
|
|
168
79
|
|
|
169
|
-
###
|
|
80
|
+
### 생성 결과
|
|
170
81
|
|
|
171
82
|
```
|
|
172
|
-
|
|
83
|
+
_cursorflow/flows/001_ShopFeature/
|
|
84
|
+
├── flow.meta.json # Flow 메타데이터
|
|
85
|
+
├── backend.json # Lane (빈 상태)
|
|
86
|
+
└── frontend.json # Lane (빈 상태)
|
|
173
87
|
```
|
|
174
88
|
|
|
175
|
-
- **name**: Task identifier (alphanumeric, `-`, `_`)
|
|
176
|
-
- **model**: AI model (`sonnet-4.5`, `sonnet-4.5-thinking`, etc.)
|
|
177
|
-
- **prompt**: Instructions for the AI
|
|
178
|
-
- **criteria**: Comma-separated acceptance criteria (optional)
|
|
179
|
-
|
|
180
89
|
---
|
|
181
90
|
|
|
182
|
-
##
|
|
183
|
-
|
|
184
|
-
### 1. Simple Single-Lane Feature
|
|
91
|
+
## Step 2: Task 추가 (`add`)
|
|
185
92
|
|
|
186
93
|
```bash
|
|
187
|
-
cursorflow
|
|
94
|
+
cursorflow add <FlowName> <LaneName> --task "name=...|prompt=..." [--after ...]
|
|
188
95
|
```
|
|
189
96
|
|
|
190
|
-
###
|
|
97
|
+
### --task 형식
|
|
191
98
|
|
|
192
|
-
```bash
|
|
193
|
-
cursorflow prepare AddAPI \
|
|
194
|
-
--task "plan|sonnet-4.5-thinking|Create REST API design|Design documented" \
|
|
195
|
-
--task "implement|sonnet-4.5|Build the API endpoints|All endpoints work" \
|
|
196
|
-
--task "verify|sonnet-4.5|Test all edge cases|All tests pass"
|
|
197
99
|
```
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
```bash
|
|
202
|
-
cursorflow prepare Dashboard --lanes 2 \
|
|
203
|
-
--prompt "Implement dashboard for your layer"
|
|
204
|
-
|
|
205
|
-
# Lane 1: Frontend developer
|
|
206
|
-
# Lane 2: Backend developer
|
|
207
|
-
# Both work in parallel
|
|
100
|
+
"name=<이름>|prompt=<프롬프트>" # 기본 모델 사용
|
|
101
|
+
"name=<이름>|model=<모델>|prompt=<프롬프트>" # 모델 지정
|
|
208
102
|
```
|
|
209
103
|
|
|
210
|
-
|
|
104
|
+
| 필드 | 필수 | 설명 |
|
|
105
|
+
|------|------|------|
|
|
106
|
+
| `name` | ✅ | 태스크 이름 (영문, 숫자, -, _) |
|
|
107
|
+
| `prompt` | ✅ | 태스크 프롬프트/지시사항 |
|
|
108
|
+
| `model` | ❌ | AI 모델 (생략 시 기본 모델 사용) |
|
|
211
109
|
|
|
212
|
-
|
|
213
|
-
cursorflow prepare AuthSystem --lanes 3 --sequential \
|
|
214
|
-
--prompt "Implement your authentication layer"
|
|
110
|
+
### --after 형식 (의존성)
|
|
215
111
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
112
|
+
| 형식 | 설명 |
|
|
113
|
+
|------|------|
|
|
114
|
+
| `"lane"` | 해당 레인의 **마지막 태스크** 완료 후 시작 |
|
|
115
|
+
| `"lane:task"` | 특정 태스크 완료 후 시작 |
|
|
116
|
+
| `"a:t1, b:t2"` | **여러 태스크가 모두 완료**된 후 시작 |
|
|
220
117
|
|
|
221
|
-
###
|
|
118
|
+
### 예시
|
|
222
119
|
|
|
223
120
|
```bash
|
|
224
|
-
#
|
|
225
|
-
cursorflow
|
|
226
|
-
--
|
|
227
|
-
|
|
228
|
-
# Later: Add integration test lane that depends on both
|
|
229
|
-
cursorflow prepare --add-lane _cursorflow/tasks/2412211530_PaymentFlow \
|
|
230
|
-
--prompt "Run integration tests for payment flow" \
|
|
231
|
-
--criteria "All payment flows tested,Error handling verified" \
|
|
232
|
-
--depends-on "01-lane-1,02-lane-2"
|
|
233
|
-
```
|
|
121
|
+
# 단일 태스크 추가
|
|
122
|
+
cursorflow add SearchFeature api \
|
|
123
|
+
--task "name=implement|prompt=검색 API 구현"
|
|
234
124
|
|
|
235
|
-
|
|
125
|
+
# 여러 태스크 추가
|
|
126
|
+
cursorflow add SearchFeature api \
|
|
127
|
+
--task "name=plan|prompt=API 설계" \
|
|
128
|
+
--task "name=implement|prompt=검색 API 구현" \
|
|
129
|
+
--task "name=test|prompt=테스트 코드 작성"
|
|
236
130
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
--
|
|
131
|
+
# 의존성 설정
|
|
132
|
+
cursorflow add SearchFeature web \
|
|
133
|
+
--task "name=ui|prompt=검색 UI 구현" \
|
|
134
|
+
--after "api:implement"
|
|
241
135
|
```
|
|
242
136
|
|
|
243
137
|
---
|
|
244
138
|
|
|
245
|
-
##
|
|
246
|
-
|
|
247
|
-
`dependsOn` is not just ordering—it triggers **automatic branch merging**.
|
|
248
|
-
|
|
249
|
-
### How It Works
|
|
250
|
-
|
|
251
|
-
1. Lane 1 completes and creates branch `feature/lane-1-abc123`
|
|
252
|
-
2. Lane 2 starts, `runner.ts` **merges Lane 1's branch** into Lane 2's worktree
|
|
253
|
-
3. Lane 2 now has all of Lane 1's code changes and can build upon them
|
|
254
|
-
|
|
255
|
-
### Dependency Patterns
|
|
139
|
+
## 전체 예시: 3-Lane 프로젝트
|
|
256
140
|
|
|
257
141
|
```bash
|
|
258
|
-
#
|
|
259
|
-
cursorflow
|
|
142
|
+
# 1. Flow 생성
|
|
143
|
+
cursorflow new SearchFeature --lanes "api,web,mobile"
|
|
260
144
|
|
|
261
|
-
#
|
|
262
|
-
cursorflow
|
|
145
|
+
# 2. API 레인: 의존성 없음, 바로 시작
|
|
146
|
+
cursorflow add SearchFeature api \
|
|
147
|
+
--task "name=plan|prompt=API 설계" \
|
|
148
|
+
--task "name=implement|prompt=검색 API 구현" \
|
|
149
|
+
--task "name=test|prompt=API 테스트 작성"
|
|
263
150
|
|
|
264
|
-
#
|
|
265
|
-
cursorflow
|
|
266
|
-
|
|
151
|
+
# 3. Web 레인: API implement 완료 후 시작
|
|
152
|
+
cursorflow add SearchFeature web \
|
|
153
|
+
--task "name=ui|prompt=검색 UI 구현" \
|
|
154
|
+
--after "api:implement"
|
|
267
155
|
|
|
268
|
-
|
|
156
|
+
# 4. Mobile 레인: API 전체 완료 후 시작
|
|
157
|
+
cursorflow add SearchFeature mobile \
|
|
158
|
+
--task "name=app|prompt=모바일 검색 화면 구현" \
|
|
159
|
+
--after "api"
|
|
269
160
|
|
|
270
|
-
|
|
271
|
-
cursorflow
|
|
272
|
-
|
|
161
|
+
# 5. 검증 및 실행
|
|
162
|
+
cursorflow doctor SearchFeature
|
|
163
|
+
cursorflow run SearchFeature
|
|
273
164
|
```
|
|
274
165
|
|
|
275
|
-
|
|
276
|
-
|------|------|-----------|----------------|
|
|
277
|
-
| 01-lane-1 | DB Schema | (none) | Immediately |
|
|
278
|
-
| 02-lane-2 | Backend API | 01-lane-1 | After DB done, merges DB branch |
|
|
279
|
-
| 03-lane-3 | Integration Tests | 01-lane-1, 02-lane-2 | After both, merges both branches |
|
|
280
|
-
|
|
281
|
-
---
|
|
282
|
-
|
|
283
|
-
## Task Design Patterns
|
|
284
|
-
|
|
285
|
-
### Standard Patterns
|
|
166
|
+
### 실행 흐름
|
|
286
167
|
|
|
287
|
-
**Complex Feature (recommended):**
|
|
288
|
-
```bash
|
|
289
|
-
cursorflow prepare ComplexFeature \
|
|
290
|
-
--task "plan|sonnet-4.5-thinking|Analyze requirements and create plan|Plan documented" \
|
|
291
|
-
--task "implement|sonnet-4.5|Implement according to plan|Code complete" \
|
|
292
|
-
--task "verify|sonnet-4.5|Double-check all requirements are met|All tests pass"
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
**Simple Change:**
|
|
296
|
-
```bash
|
|
297
|
-
cursorflow prepare SimpleFix \
|
|
298
|
-
--task "implement|sonnet-4.5|Fix the bug and add test|Bug fixed,Test added" \
|
|
299
|
-
--task "verify|sonnet-4.5|Verify fix works in all cases|All cases handled"
|
|
300
168
|
```
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
--depends-on "02-lane-2,03-lane-3" \
|
|
307
|
-
--task "merge|sonnet-4.5|Merge branches and resolve conflicts|Clean merge" \
|
|
308
|
-
--task "integrate|sonnet-4.5|Verify integration|Tests pass"
|
|
169
|
+
api: [plan] → [implement] → [test]
|
|
170
|
+
│ │
|
|
171
|
+
web: └─→ [ui] ────┤
|
|
172
|
+
│
|
|
173
|
+
mobile: └─→ [app]
|
|
309
174
|
```
|
|
310
175
|
|
|
311
|
-
### Best Practices
|
|
312
|
-
|
|
313
|
-
1. **Be Specific**
|
|
314
|
-
- ❌ "Implement the feature"
|
|
315
|
-
- ✅ "Create `src/api/users.ts` with GET/POST/PUT/DELETE endpoints for User model"
|
|
316
|
-
|
|
317
|
-
2. **Include Verification**
|
|
318
|
-
- Always add a final "verify" task
|
|
319
|
-
- AI agents often miss edge cases on first pass
|
|
320
|
-
|
|
321
|
-
3. **Scope Post-Merge Tasks**
|
|
322
|
-
- When `dependsOn` is set, include: "After merging, resolve any conflicts and verify integration"
|
|
323
|
-
|
|
324
|
-
4. **Use Thinking Models for Planning**
|
|
325
|
-
- Use `sonnet-4.5-thinking` for `plan` tasks (deeper reasoning)
|
|
326
|
-
- Use `sonnet-4.5` for `implement` tasks (faster execution)
|
|
327
|
-
|
|
328
176
|
---
|
|
329
177
|
|
|
330
|
-
##
|
|
178
|
+
## 기본 모델 설정
|
|
331
179
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|----------|-------|-----|
|
|
336
|
-
| Frontend + Backend | 2 | Different file sets, can run in parallel |
|
|
337
|
-
| Database + API + UI | 3 | Sequential dependency, clean separation |
|
|
338
|
-
| Multiple microservices | N | Completely isolated codebases |
|
|
339
|
-
| Refactor + New Feature | 2 | Refactor first, feature depends on it |
|
|
180
|
+
```bash
|
|
181
|
+
# 기본 모델 확인
|
|
182
|
+
cursorflow config defaultModel
|
|
340
183
|
|
|
341
|
-
|
|
184
|
+
# 기본 모델 변경
|
|
185
|
+
cursorflow config defaultModel gemini-2.5-flash
|
|
342
186
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
| Plan → Implement → Test same feature | Single developer mindset |
|
|
347
|
-
| Tightly coupled changes | Avoid merge complexity |
|
|
187
|
+
# 사용 가능한 모델 목록
|
|
188
|
+
cursorflow models
|
|
189
|
+
```
|
|
348
190
|
|
|
349
191
|
---
|
|
350
192
|
|
|
351
|
-
##
|
|
193
|
+
## 생성되는 파일 구조
|
|
352
194
|
|
|
353
|
-
|
|
195
|
+
### flow.meta.json
|
|
354
196
|
|
|
355
|
-
```
|
|
356
|
-
|
|
197
|
+
```json
|
|
198
|
+
{
|
|
199
|
+
"id": "001",
|
|
200
|
+
"name": "SearchFeature",
|
|
201
|
+
"createdAt": "2024-12-26T10:30:00Z",
|
|
202
|
+
"baseBranch": "main",
|
|
203
|
+
"status": "pending",
|
|
204
|
+
"lanes": ["api", "web", "mobile"]
|
|
205
|
+
}
|
|
357
206
|
```
|
|
358
207
|
|
|
359
|
-
|
|
360
|
-
- Required fields (`tasks`, `name`, `prompt`)
|
|
361
|
-
- Valid task name format
|
|
362
|
-
- Correct dependency graph (no circular dependencies)
|
|
363
|
-
- Configuration value types
|
|
364
|
-
|
|
365
|
-
---
|
|
366
|
-
|
|
367
|
-
## Generated File Structure
|
|
208
|
+
### Lane 파일 (api.json)
|
|
368
209
|
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"laneName": "api",
|
|
213
|
+
"tasks": [
|
|
214
|
+
{ "name": "plan", "model": "sonnet-4.5", "prompt": "API 설계" },
|
|
215
|
+
{ "name": "implement", "model": "sonnet-4.5", "prompt": "검색 API 구현" },
|
|
216
|
+
{ "name": "test", "model": "sonnet-4.5", "prompt": "API 테스트 작성" }
|
|
217
|
+
]
|
|
218
|
+
}
|
|
375
219
|
```
|
|
376
220
|
|
|
377
|
-
###
|
|
221
|
+
### 의존성이 있는 Lane (web.json)
|
|
378
222
|
|
|
379
223
|
```json
|
|
380
224
|
{
|
|
381
|
-
"
|
|
382
|
-
"branchPrefix": "featurename/lane-1-",
|
|
383
|
-
"timeout": 600000,
|
|
384
|
-
"enableIntervention": false,
|
|
385
|
-
"dependencyPolicy": {
|
|
386
|
-
"allowDependencyChange": false,
|
|
387
|
-
"lockfileReadOnly": true
|
|
388
|
-
},
|
|
389
|
-
"enableReview": true,
|
|
390
|
-
"reviewModel": "sonnet-4.5-thinking",
|
|
391
|
-
"maxReviewIterations": 3,
|
|
392
|
-
"laneNumber": 1,
|
|
393
|
-
"devPort": 3001,
|
|
394
|
-
"dependsOn": ["01-lane-1"],
|
|
225
|
+
"laneName": "web",
|
|
395
226
|
"tasks": [
|
|
396
227
|
{
|
|
397
|
-
"name": "
|
|
228
|
+
"name": "ui",
|
|
398
229
|
"model": "sonnet-4.5",
|
|
399
|
-
"prompt": "
|
|
400
|
-
"
|
|
230
|
+
"prompt": "검색 UI 구현",
|
|
231
|
+
"dependsOn": ["api:implement"]
|
|
401
232
|
}
|
|
402
233
|
]
|
|
403
234
|
}
|
|
404
235
|
```
|
|
405
236
|
|
|
406
|
-
### Key Fields
|
|
407
|
-
|
|
408
|
-
| Field | Required | Description |
|
|
409
|
-
|-------|----------|-------------|
|
|
410
|
-
| `tasks` | Yes | Array of task objects |
|
|
411
|
-
| `tasks[].name` | Yes | Task identifier |
|
|
412
|
-
| `tasks[].prompt` | Yes | Instructions for AI agent |
|
|
413
|
-
| `tasks[].model` | No | Model override |
|
|
414
|
-
| `tasks[].acceptanceCriteria` | No | Criteria for AI review |
|
|
415
|
-
| `dependsOn` | No | Array of lane names to wait for |
|
|
416
|
-
| `baseBranch` | Yes | Branch to create worktree from |
|
|
417
|
-
| `branchPrefix` | Yes | Prefix for the feature branch |
|
|
418
|
-
|
|
419
237
|
---
|
|
420
238
|
|
|
421
|
-
##
|
|
422
|
-
|
|
423
|
-
### Before Creating Tasks
|
|
424
|
-
- [ ] Requirements are clearly understood
|
|
425
|
-
- [ ] Work is divided by domain (one lane = one area of responsibility)
|
|
426
|
-
- [ ] Dependencies between lanes are identified
|
|
427
|
-
|
|
428
|
-
### After Creating Tasks
|
|
429
|
-
- [ ] Each task has a specific, actionable prompt
|
|
430
|
-
- [ ] Acceptance criteria are measurable
|
|
431
|
-
- [ ] Dependent lanes include merge/integration instructions
|
|
432
|
-
- [ ] Final task includes verification step
|
|
239
|
+
## 다음 단계
|
|
433
240
|
|
|
434
|
-
|
|
435
|
-
-
|
|
436
|
-
-
|
|
241
|
+
- `cursorflow doctor <FlowName>` - 설정 검증
|
|
242
|
+
- `cursorflow run <FlowName>` - Flow 실행
|
|
243
|
+
- `cursorflow monitor latest` - 실행 모니터링
|