@litmers/cursorflow-orchestrator 0.1.31 → 0.1.36
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 +27 -0
- package/README.md +182 -59
- package/commands/cursorflow-add.md +159 -0
- package/commands/cursorflow-doctor.md +45 -23
- package/commands/cursorflow-monitor.md +23 -2
- package/commands/cursorflow-new.md +87 -0
- package/commands/cursorflow-run.md +60 -111
- package/dist/cli/add.d.ts +7 -0
- package/dist/cli/add.js +377 -0
- package/dist/cli/add.js.map +1 -0
- package/dist/cli/clean.js +1 -0
- package/dist/cli/clean.js.map +1 -1
- package/dist/cli/config.d.ts +7 -0
- package/dist/cli/config.js +181 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/doctor.js +47 -4
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.js +34 -30
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/logs.js +17 -34
- package/dist/cli/logs.js.map +1 -1
- package/dist/cli/monitor.js +62 -65
- package/dist/cli/monitor.js.map +1 -1
- package/dist/cli/new.d.ts +7 -0
- package/dist/cli/new.js +232 -0
- package/dist/cli/new.js.map +1 -0
- package/dist/cli/prepare.js +95 -193
- package/dist/cli/prepare.js.map +1 -1
- package/dist/cli/resume.js +57 -68
- package/dist/cli/resume.js.map +1 -1
- package/dist/cli/run.js +60 -30
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/stop.js +6 -0
- package/dist/cli/stop.js.map +1 -1
- package/dist/cli/tasks.d.ts +5 -3
- package/dist/cli/tasks.js +181 -29
- package/dist/cli/tasks.js.map +1 -1
- package/dist/core/failure-policy.d.ts +9 -0
- package/dist/core/failure-policy.js +9 -0
- package/dist/core/failure-policy.js.map +1 -1
- package/dist/core/orchestrator.d.ts +20 -6
- package/dist/core/orchestrator.js +215 -334
- package/dist/core/orchestrator.js.map +1 -1
- package/dist/core/runner/agent.d.ts +27 -0
- package/dist/core/runner/agent.js +294 -0
- package/dist/core/runner/agent.js.map +1 -0
- package/dist/core/runner/index.d.ts +5 -0
- package/dist/core/runner/index.js +22 -0
- package/dist/core/runner/index.js.map +1 -0
- package/dist/core/runner/pipeline.d.ts +9 -0
- package/dist/core/runner/pipeline.js +539 -0
- package/dist/core/runner/pipeline.js.map +1 -0
- package/dist/core/runner/prompt.d.ts +25 -0
- package/dist/core/runner/prompt.js +175 -0
- package/dist/core/runner/prompt.js.map +1 -0
- package/dist/core/runner/task.d.ts +26 -0
- package/dist/core/runner/task.js +283 -0
- package/dist/core/runner/task.js.map +1 -0
- package/dist/core/runner/utils.d.ts +37 -0
- package/dist/core/runner/utils.js +161 -0
- package/dist/core/runner/utils.js.map +1 -0
- package/dist/core/runner.d.ts +2 -96
- package/dist/core/runner.js +11 -1136
- package/dist/core/runner.js.map +1 -1
- package/dist/core/stall-detection.d.ts +326 -0
- package/dist/core/stall-detection.js +781 -0
- package/dist/core/stall-detection.js.map +1 -0
- package/dist/services/logging/console.js +2 -1
- package/dist/services/logging/console.js.map +1 -1
- package/dist/types/config.d.ts +6 -6
- package/dist/types/flow.d.ts +84 -0
- package/dist/types/flow.js +10 -0
- package/dist/types/flow.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +3 -3
- package/dist/types/index.js.map +1 -1
- package/dist/types/lane.d.ts +0 -2
- package/dist/types/logging.d.ts +5 -1
- package/dist/types/task.d.ts +7 -11
- package/dist/utils/config.d.ts +5 -1
- package/dist/utils/config.js +15 -16
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/dependency.d.ts +36 -1
- package/dist/utils/dependency.js +256 -1
- package/dist/utils/dependency.js.map +1 -1
- package/dist/utils/doctor.js +40 -8
- package/dist/utils/doctor.js.map +1 -1
- package/dist/utils/enhanced-logger.d.ts +45 -82
- package/dist/utils/enhanced-logger.js +239 -844
- package/dist/utils/enhanced-logger.js.map +1 -1
- package/dist/utils/flow.d.ts +9 -0
- package/dist/utils/flow.js +73 -0
- package/dist/utils/flow.js.map +1 -0
- package/dist/utils/git.d.ts +29 -0
- package/dist/utils/git.js +115 -5
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/state.js +0 -2
- package/dist/utils/state.js.map +1 -1
- package/dist/utils/task-service.d.ts +2 -2
- package/dist/utils/task-service.js +40 -31
- package/dist/utils/task-service.js.map +1 -1
- package/package.json +4 -3
- package/src/cli/add.ts +397 -0
- package/src/cli/clean.ts +1 -0
- package/src/cli/config.ts +177 -0
- package/src/cli/doctor.ts +48 -4
- package/src/cli/index.ts +36 -32
- package/src/cli/logs.ts +20 -33
- package/src/cli/monitor.ts +70 -75
- package/src/cli/new.ts +235 -0
- package/src/cli/prepare.ts +98 -205
- package/src/cli/resume.ts +61 -76
- package/src/cli/run.ts +333 -306
- package/src/cli/stop.ts +8 -0
- package/src/cli/tasks.ts +200 -21
- package/src/core/failure-policy.ts +9 -0
- package/src/core/orchestrator.ts +279 -379
- package/src/core/runner/agent.ts +314 -0
- package/src/core/runner/index.ts +6 -0
- package/src/core/runner/pipeline.ts +567 -0
- package/src/core/runner/prompt.ts +174 -0
- package/src/core/runner/task.ts +320 -0
- package/src/core/runner/utils.ts +142 -0
- package/src/core/runner.ts +8 -1347
- package/src/core/stall-detection.ts +936 -0
- package/src/services/logging/console.ts +2 -1
- package/src/types/config.ts +6 -6
- package/src/types/flow.ts +91 -0
- package/src/types/index.ts +15 -3
- package/src/types/lane.ts +0 -2
- package/src/types/logging.ts +5 -1
- package/src/types/task.ts +7 -11
- package/src/utils/config.ts +16 -17
- package/src/utils/dependency.ts +311 -2
- package/src/utils/doctor.ts +36 -8
- package/src/utils/enhanced-logger.ts +264 -927
- package/src/utils/flow.ts +42 -0
- package/src/utils/git.ts +145 -5
- package/src/utils/state.ts +0 -2
- package/src/utils/task-service.ts +48 -40
- package/commands/cursorflow-review.md +0 -56
- package/commands/cursorflow-runs.md +0 -59
- package/dist/cli/runs.d.ts +0 -5
- package/dist/cli/runs.js +0 -214
- package/dist/cli/runs.js.map +0 -1
- package/dist/core/reviewer.d.ts +0 -66
- package/dist/core/reviewer.js +0 -265
- package/dist/core/reviewer.js.map +0 -1
- package/src/cli/runs.ts +0 -212
- package/src/core/reviewer.ts +0 -285
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.36] - 2025-12-26
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **CLI**: Fixed indentation and validation logic in `tasks` command.
|
|
12
|
+
- **Tests**: Improved `stop.test.ts` stability by mocking `process.chdir`.
|
|
13
|
+
- **E2E**: Removed redundant `lane-a.json` from `test-tasks-e2e`.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- **Release**: Improved release process with annotated tags.
|
|
17
|
+
|
|
18
|
+
## [0.1.35] - 2025-12-26
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- **Log Format**: Updated log format to `L{n}-T{t}-{lanename}` with single-digit numbers and 10-char max lane name for cleaner output.
|
|
22
|
+
- **Flow Support**: All commands now support flow names in addition to directory paths.
|
|
23
|
+
- `run`, `resume`, `doctor` can now use flow names like `cursorflow run MyFlow`
|
|
24
|
+
- `tasks` command now browses flows from `_cursorflow/flows/` directory
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- **Build Errors**: Fixed missing `getLogsDir` import in `logs.ts` and `monitor.ts`.
|
|
28
|
+
- **Flow Recognition**: Fixed `flow.meta.json` being incorrectly treated as a lane file in orchestrator.
|
|
29
|
+
- **Doctor CLI**: Fixed positional argument parsing for flow names.
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
- `getFlowsDir()` function in config.ts for consistent flow directory resolution.
|
|
33
|
+
- `findFlowDir()` utility for resolving flow names to paths.
|
|
34
|
+
|
|
8
35
|
## [0.1.30] - 2025-12-25
|
|
9
36
|
|
|
10
37
|
### Added
|
package/README.md
CHANGED
|
@@ -13,11 +13,10 @@
|
|
|
13
13
|
|
|
14
14
|
- ⚡ **Parallel Execution**: Run multiple AI agents concurrently using isolated Git worktrees.
|
|
15
15
|
- 🔗 **Task Dependencies (DAG)**: Define complex workflows where tasks wait for and merge their dependencies automatically.
|
|
16
|
-
-
|
|
16
|
+
- 🌊 **Flow Architecture**: Intuitive `new` + `add` commands to define Flows, Lanes, and Tasks.
|
|
17
17
|
- 📊 **Interactive Dashboard**: A powerful terminal-based monitor to track all lanes, progress, and dependencies in real-time.
|
|
18
18
|
- 📺 **Live Terminal Streaming**: Watch the AI agent's output as it happens with scrollable history.
|
|
19
19
|
- 🙋 **Human Intervention**: Send direct messages to running agents to guide them or fix issues on the fly.
|
|
20
|
-
- 🔍 **Automatic Review**: AI-powered code review with iterative feedback loops.
|
|
21
20
|
- 🔀 **Smart Merging**: Automatically merge completed feature branches into subsequent dependent lanes.
|
|
22
21
|
- 🔒 **Security-First**: Automated security scanning and dependency policy enforcement.
|
|
23
22
|
|
|
@@ -29,74 +28,135 @@
|
|
|
29
28
|
npm install -g @litmers/cursorflow-orchestrator
|
|
30
29
|
```
|
|
31
30
|
|
|
32
|
-
### 2.
|
|
31
|
+
### 2. Create a Flow
|
|
33
32
|
|
|
34
33
|
```bash
|
|
35
34
|
cd your-project
|
|
36
35
|
cursorflow init
|
|
37
36
|
|
|
38
|
-
#
|
|
39
|
-
cursorflow
|
|
37
|
+
# Create a Flow with two Lanes: backend and frontend
|
|
38
|
+
cursorflow new ShopFeature --lanes "backend,frontend"
|
|
39
|
+
```
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
cursorflow prepare AuthSystem --preset complex --prompt "Build user authentication with JWT"
|
|
41
|
+
### 3. Add Tasks to Lanes
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
```bash
|
|
44
|
+
# Add tasks to backend lane (uses default model)
|
|
45
|
+
cursorflow add ShopFeature backend \
|
|
46
|
+
--task "name=implement|prompt=상품 검색 API 구현"
|
|
47
|
+
|
|
48
|
+
# Add tasks to frontend lane (waits for backend)
|
|
49
|
+
cursorflow add ShopFeature frontend \
|
|
50
|
+
--task "name=ui|prompt=검색 UI 구현" \
|
|
51
|
+
--after "backend:implement"
|
|
47
52
|
```
|
|
48
53
|
|
|
49
|
-
###
|
|
54
|
+
### 4. Run
|
|
50
55
|
|
|
51
56
|
```bash
|
|
52
|
-
# Check for issues before running
|
|
53
|
-
cursorflow doctor --tasks-dir _cursorflow/tasks/2412211530_AuthSystem
|
|
54
|
-
|
|
55
57
|
# Start orchestration
|
|
56
|
-
cursorflow run
|
|
58
|
+
cursorflow run ShopFeature
|
|
57
59
|
|
|
58
|
-
#
|
|
60
|
+
# Monitor progress in real-time
|
|
59
61
|
cursorflow monitor latest
|
|
60
62
|
```
|
|
61
63
|
|
|
62
|
-
## 📋
|
|
64
|
+
## 📋 Flow 커맨드 - 시나리오로 배우기
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
**시나리오**: "쇼핑몰" 프로젝트에서 백엔드 API와 프론트엔드를 동시에 개발
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
|--------|-------|----------|
|
|
68
|
-
| `--preset complex` | plan → implement → test | Complex features (saves plan to `_cursorflow/PLAN_lane-{N}.md`) |
|
|
69
|
-
| `--preset simple` | implement → test | Simple changes, bug fixes |
|
|
70
|
-
| `--preset merge` | merge → test | Integration lanes (auto-applied with `--depends-on`) |
|
|
71
|
-
| *(none)* | implement | Quick single task |
|
|
72
|
-
|
|
73
|
-
### Using External Templates
|
|
68
|
+
---
|
|
74
69
|
|
|
75
|
-
|
|
70
|
+
### Step 1: Flow와 Lane 생성 (`new`)
|
|
76
71
|
|
|
77
72
|
```bash
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
cursorflow new SearchFeature --lanes "api,web,mobile"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**결과:**
|
|
77
|
+
```
|
|
78
|
+
_cursorflow/flows/001_SearchFeature/
|
|
79
|
+
├── flow.meta.json # Flow 메타데이터
|
|
80
|
+
├── 01-api.json # API 레인 (빈 상태)
|
|
81
|
+
├── 02-web.json # Web 레인 (빈 상태)
|
|
82
|
+
└── 03-mobile.json # Mobile 레인 (빈 상태)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
80
86
|
|
|
81
|
-
|
|
82
|
-
cursorflow prepare Custom --template ./my-template.json
|
|
87
|
+
### Step 2: 각 Lane에 Task 추가 (`add`)
|
|
83
88
|
|
|
84
|
-
|
|
85
|
-
|
|
89
|
+
```bash
|
|
90
|
+
# API 레인: 의존성 없음, 바로 시작
|
|
91
|
+
cursorflow add SearchFeature api \
|
|
92
|
+
--task "name=plan|prompt=API 설계" \
|
|
93
|
+
--task "name=implement|prompt=검색 API 구현" \
|
|
94
|
+
--task "name=test|prompt=API 테스트 작성"
|
|
95
|
+
|
|
96
|
+
# Web 레인: API의 implement 완료 후 시작
|
|
97
|
+
cursorflow add SearchFeature web \
|
|
98
|
+
--task "name=ui|prompt=검색 UI 구현" \
|
|
99
|
+
--after "api:implement"
|
|
100
|
+
|
|
101
|
+
# Mobile 레인: API 테스트까지 모두 끝나야 시작
|
|
102
|
+
cursorflow add SearchFeature mobile \
|
|
103
|
+
--task "name=app|prompt=모바일 검색 화면 구현" \
|
|
104
|
+
--after "api:test"
|
|
86
105
|
```
|
|
87
106
|
|
|
88
|
-
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### Step 3: 실행
|
|
89
110
|
|
|
90
111
|
```bash
|
|
91
|
-
|
|
92
|
-
|
|
112
|
+
cursorflow run SearchFeature
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**실행 흐름:**
|
|
116
|
+
```
|
|
117
|
+
api: [plan] → [implement] → [test]
|
|
118
|
+
│ │
|
|
119
|
+
web: └─→ [ui] ────┤
|
|
120
|
+
│
|
|
121
|
+
mobile: └─→ [app]
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
93
125
|
|
|
94
|
-
|
|
95
|
-
cursorflow prepare BugFix --preset simple --prompt "Fix null pointer in auth.ts"
|
|
126
|
+
### --task 형식
|
|
96
127
|
|
|
97
|
-
# Single task: Just the prompt
|
|
98
|
-
cursorflow prepare QuickFix --prompt "Update README.md"
|
|
99
128
|
```
|
|
129
|
+
"name=<이름>|prompt=<프롬프트>" # 기본 모델 사용
|
|
130
|
+
"name=<이름>|model=<모델>|prompt=<프롬프트>" # 모델 지정
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
| 필드 | 필수 | 설명 |
|
|
134
|
+
|------|------|------|
|
|
135
|
+
| `name` | ✅ | 태스크 이름 (영문, 숫자, -, _) |
|
|
136
|
+
| `prompt` | ✅ | 태스크 프롬프트 |
|
|
137
|
+
| `model` | ❌ | AI 모델 (생략 시 기본 모델 사용) |
|
|
138
|
+
|
|
139
|
+
기본 모델 설정: `cursorflow config defaultModel <model-name>`
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
### --after 형식 (의존성)
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
--after "lane:task" # 특정 태스크 완료 후 시작
|
|
147
|
+
--after "lane" # 해당 레인의 마지막 태스크 완료 후
|
|
148
|
+
--after "a:t1, b:t2" # 여러 태스크 모두 완료 후 (콤마 구분)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### 커맨드 요약
|
|
154
|
+
|
|
155
|
+
| 커맨드 | 설명 | 예시 |
|
|
156
|
+
|--------|------|------|
|
|
157
|
+
| `new` | Flow와 Lane 생성 | `cursorflow new Feature --lanes "api,web"` |
|
|
158
|
+
| `add` | Lane에 Task 추가 | `cursorflow add Feature api --task "..."` |
|
|
159
|
+
| `run` | Flow 실행 | `cursorflow run Feature` |
|
|
100
160
|
|
|
101
161
|
## 🎮 Dashboard Controls
|
|
102
162
|
|
|
@@ -116,19 +176,23 @@ Within the `cursorflow monitor` dashboard:
|
|
|
116
176
|
|
|
117
177
|
```json
|
|
118
178
|
{
|
|
119
|
-
"baseBranch": "main",
|
|
120
179
|
"branchPrefix": "feature/lane-1-",
|
|
121
180
|
"timeout": 600000,
|
|
122
181
|
"enableIntervention": false,
|
|
123
|
-
"dependsOn": ["01-lane-1"],
|
|
124
182
|
"enableReview": true,
|
|
125
183
|
"reviewModel": "sonnet-4.5-thinking",
|
|
126
184
|
"tasks": [
|
|
185
|
+
{
|
|
186
|
+
"name": "setup",
|
|
187
|
+
"model": "sonnet-4.5",
|
|
188
|
+
"prompt": "Set up the project structure..."
|
|
189
|
+
},
|
|
127
190
|
{
|
|
128
191
|
"name": "implement",
|
|
129
192
|
"model": "sonnet-4.5",
|
|
130
193
|
"prompt": "Implement the user authentication...",
|
|
131
|
-
"acceptanceCriteria": ["Code complete", "Tests pass"]
|
|
194
|
+
"acceptanceCriteria": ["Code complete", "Tests pass"],
|
|
195
|
+
"dependsOn": ["other-lane:setup"]
|
|
132
196
|
}
|
|
133
197
|
]
|
|
134
198
|
}
|
|
@@ -141,20 +205,48 @@ Within the `cursorflow monitor` dashboard:
|
|
|
141
205
|
| `timeout` | number | 600000 | Task timeout in milliseconds (10 min) |
|
|
142
206
|
| `enableIntervention` | boolean | false | Enable stdin piping for intervention |
|
|
143
207
|
| `model` | string | "sonnet-4.5" | AI model to use |
|
|
144
|
-
| `dependsOn` | string[] | [] | Lane dependencies |
|
|
145
208
|
| `enableReview` | boolean | true | Enable AI code review |
|
|
146
209
|
|
|
147
|
-
## 🔗
|
|
210
|
+
## 🔗 태스크 의존성 (dependsOn)
|
|
148
211
|
|
|
149
|
-
|
|
212
|
+
**언제 사용?** 프론트엔드가 백엔드 API 완성 후에 시작해야 할 때
|
|
150
213
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
214
|
+
### 사용법
|
|
215
|
+
|
|
216
|
+
JSON 파일에서 `dependsOn` 필드 추가:
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"tasks": [
|
|
221
|
+
{ "name": "setup", "prompt": "초기 설정..." },
|
|
222
|
+
{
|
|
223
|
+
"name": "integrate",
|
|
224
|
+
"prompt": "API 연동...",
|
|
225
|
+
"dependsOn": ["01-backend:implement"] // ← 이 태스크 완료 후 시작
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
형식: `"레인파일명:태스크명"` (확장자 `.json` 제외)
|
|
232
|
+
|
|
233
|
+
### 실행 흐름 예시
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
01-backend: [setup] → [implement] → [test]
|
|
237
|
+
↓ 완료!
|
|
238
|
+
02-frontend: [setup] ─────┴─ 대기 → [integrate] → [test]
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
- 백엔드와 프론트엔드 **동시 시작**
|
|
242
|
+
- 프론트의 `integrate`는 백엔드 `implement` 완료까지 대기
|
|
243
|
+
- 완료되면 백엔드 브랜치 **자동 머지** 후 시작
|
|
244
|
+
|
|
245
|
+
### 순환 의존성 검사
|
|
154
246
|
|
|
155
|
-
|
|
156
|
-
cursorflow
|
|
157
|
-
|
|
247
|
+
```bash
|
|
248
|
+
cursorflow doctor --tasks-dir _cursorflow/tasks/MyFeature
|
|
249
|
+
# ❌ Cyclic dependency: 01-a:task1 → 02-b:task2 → 01-a:task1
|
|
158
250
|
```
|
|
159
251
|
|
|
160
252
|
## 🩺 Pre-flight Checks
|
|
@@ -174,23 +266,54 @@ cursorflow doctor --tasks-dir _cursorflow/tasks/my-feature
|
|
|
174
266
|
|
|
175
267
|
## 📚 Commands Reference
|
|
176
268
|
|
|
269
|
+
### Flow Commands (New)
|
|
270
|
+
| Command | Description |
|
|
271
|
+
|---------|-------------|
|
|
272
|
+
| `cursorflow new` | Create Flow with Lanes |
|
|
273
|
+
| `cursorflow add` | Add Tasks to Lane |
|
|
274
|
+
| `cursorflow config` | View/set configuration |
|
|
275
|
+
| `cursorflow tasks` | Browse flows and legacy tasks |
|
|
276
|
+
|
|
277
|
+
### Execution
|
|
177
278
|
| Command | Description |
|
|
178
279
|
|---------|-------------|
|
|
179
|
-
| `cursorflow init` | Initialize CursorFlow in project |
|
|
180
|
-
| `cursorflow setup` | Install Cursor IDE commands |
|
|
181
|
-
| `cursorflow prepare` | Prepare task directory and JSON files |
|
|
182
280
|
| `cursorflow run` | Run orchestration (DAG-based) |
|
|
183
281
|
| `cursorflow monitor` | Interactive lane dashboard |
|
|
184
|
-
| `cursorflow clean` | Clean branches/worktrees/logs/tasks |
|
|
185
282
|
| `cursorflow resume` | Resume lane(s) - use --all for batch resume |
|
|
283
|
+
| `cursorflow stop` | Stop running workflows |
|
|
284
|
+
|
|
285
|
+
### Inspection
|
|
286
|
+
| Command | Description |
|
|
287
|
+
|---------|-------------|
|
|
186
288
|
| `cursorflow doctor` | Check environment and preflight |
|
|
187
|
-
| `cursorflow signal` | Directly intervene in a running lane |
|
|
188
|
-
| `cursorflow models` | List available AI models |
|
|
189
289
|
| `cursorflow logs` | View, export, and follow logs |
|
|
290
|
+
| `cursorflow models` | List available AI models |
|
|
291
|
+
|
|
292
|
+
### Utility
|
|
293
|
+
| Command | Description |
|
|
294
|
+
|---------|-------------|
|
|
295
|
+
| `cursorflow init` | Initialize CursorFlow in project |
|
|
296
|
+
| `cursorflow setup` | Install Cursor IDE commands |
|
|
297
|
+
| `cursorflow clean` | Clean branches/worktrees/logs/tasks |
|
|
298
|
+
| `cursorflow signal` | Directly intervene in a running lane |
|
|
299
|
+
|
|
300
|
+
### Legacy
|
|
301
|
+
| Command | Description |
|
|
302
|
+
|---------|-------------|
|
|
303
|
+
| `cursorflow prepare` | (deprecated) Use 'new' + 'add' instead |
|
|
190
304
|
|
|
191
305
|
## 📝 Enhanced Logging
|
|
192
306
|
|
|
193
|
-
CursorFlow provides comprehensive logging with automatic cleanup and export options
|
|
307
|
+
CursorFlow provides comprehensive logging with automatic cleanup and export options.
|
|
308
|
+
|
|
309
|
+
### Log Format
|
|
310
|
+
|
|
311
|
+
Logs use the format `[L{n}-T{t}-{lanename}]`:
|
|
312
|
+
- `L{n}`: Lane number (1-indexed, single digit)
|
|
313
|
+
- `T{t}`: Task number (1-indexed, single digit)
|
|
314
|
+
- `{lanename}`: First 10 characters of lane name
|
|
315
|
+
|
|
316
|
+
Example: `[L1-T2-backend]` = Lane 1, Task 2, lane "backend"
|
|
194
317
|
|
|
195
318
|
### Features
|
|
196
319
|
- **ANSI Stripping**: Clean logs without terminal escape codes
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# cursorflow add
|
|
2
|
+
|
|
3
|
+
Lane에 Task를 추가합니다.
|
|
4
|
+
|
|
5
|
+
## 사용법
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
cursorflow add <FlowName> <LaneName> --task "name=...|model=...|prompt=..." [--after ...]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 설명
|
|
12
|
+
|
|
13
|
+
지정된 Flow의 Lane에 Task를 추가합니다.
|
|
14
|
+
`--task` 옵션은 여러 번 사용하여 여러 태스크를 순차적으로 추가할 수 있습니다.
|
|
15
|
+
|
|
16
|
+
## --task 형식
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
"name=<이름>|model=<모델>|prompt=<프롬프트>"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 필수 필드
|
|
23
|
+
|
|
24
|
+
| 필드 | 설명 | 예시 |
|
|
25
|
+
|------|------|------|
|
|
26
|
+
| `name` | 태스크 이름 (영문, 숫자, -, _) | `name=implement` |
|
|
27
|
+
| `prompt` | 태스크 프롬프트/지시사항 | `prompt=API 구현` |
|
|
28
|
+
|
|
29
|
+
### 선택 필드
|
|
30
|
+
|
|
31
|
+
| 필드 | 설명 | 예시 |
|
|
32
|
+
|------|------|------|
|
|
33
|
+
| `model` | AI 모델 (생략 시 기본 모델 사용) | `model=<your-model>` |
|
|
34
|
+
|
|
35
|
+
기본 모델 설정: `cursorflow config defaultModel <model-name>`
|
|
36
|
+
|
|
37
|
+
## --after 형식 (의존성 설정)
|
|
38
|
+
|
|
39
|
+
첫 번째 태스크가 시작되기 전에 완료되어야 할 태스크를 지정합니다.
|
|
40
|
+
|
|
41
|
+
| 형식 | 설명 |
|
|
42
|
+
|------|------|
|
|
43
|
+
| `"lane"` | 해당 레인의 **마지막 태스크** 완료 후 시작 |
|
|
44
|
+
| `"lane:task"` | 특정 태스크 완료 후 시작 |
|
|
45
|
+
| `"a:t1, b:t2"` | **여러 태스크가 모두 완료**된 후 시작 |
|
|
46
|
+
|
|
47
|
+
## 예시
|
|
48
|
+
|
|
49
|
+
### 기본 사용: 단일 태스크 추가 (기본 모델 사용)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
cursorflow add SearchFeature api \
|
|
53
|
+
--task "name=implement|prompt=검색 API 구현"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 여러 태스크 추가
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
cursorflow add SearchFeature api \
|
|
60
|
+
--task "name=plan|prompt=API 설계" \
|
|
61
|
+
--task "name=implement|prompt=검색 API 구현" \
|
|
62
|
+
--task "name=test|prompt=테스트 코드 작성"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 의존성 설정: 특정 태스크 완료 후 시작
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# api 레인의 implement 태스크 완료 후 시작
|
|
69
|
+
cursorflow add SearchFeature web \
|
|
70
|
+
--task "name=ui|prompt=검색 UI 구현" \
|
|
71
|
+
--after "api:implement"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 의존성 설정: 레인 전체 완료 후 시작
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# api 레인의 마지막 태스크 완료 후 시작
|
|
78
|
+
cursorflow add SearchFeature web \
|
|
79
|
+
--task "name=ui|prompt=검색 UI 구현" \
|
|
80
|
+
--after "api"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 다중 의존성: 여러 태스크 완료 후 시작
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# web과 mobile 모두 완료된 후 시작
|
|
87
|
+
cursorflow add SearchFeature e2e \
|
|
88
|
+
--task "name=verify|prompt=E2E 테스트" \
|
|
89
|
+
--after "web:ui, mobile:app"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## 출력 예시
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
✅ 3개 태스크 추가 완료
|
|
96
|
+
|
|
97
|
+
📄 01-api.json
|
|
98
|
+
|
|
99
|
+
├── plan (<default-model>)
|
|
100
|
+
├── implement (<default-model>)
|
|
101
|
+
└── test (<default-model>)
|
|
102
|
+
|
|
103
|
+
전체 태스크 목록:
|
|
104
|
+
1. plan (new)
|
|
105
|
+
2. implement (new)
|
|
106
|
+
3. test (new)
|
|
107
|
+
|
|
108
|
+
다음 단계:
|
|
109
|
+
cursorflow run SearchFeature # Flow 실행
|
|
110
|
+
cursorflow doctor SearchFeature # 설정 검증
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## 생성되는 Lane 파일 구조
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"laneName": "api",
|
|
118
|
+
"tasks": [
|
|
119
|
+
{
|
|
120
|
+
"name": "plan",
|
|
121
|
+
"model": "<your-model>",
|
|
122
|
+
"prompt": "API 설계"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "implement",
|
|
126
|
+
"model": "<your-model>",
|
|
127
|
+
"prompt": "검색 API 구현"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "test",
|
|
131
|
+
"model": "<your-model>",
|
|
132
|
+
"prompt": "테스트 코드 작성"
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### 의존성이 있는 경우
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"laneName": "web",
|
|
143
|
+
"tasks": [
|
|
144
|
+
{
|
|
145
|
+
"name": "ui",
|
|
146
|
+
"model": "<your-model>",
|
|
147
|
+
"prompt": "검색 UI 구현",
|
|
148
|
+
"dependsOn": ["01-api:implement"]
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## 관련 명령어
|
|
155
|
+
|
|
156
|
+
- [cursorflow new](cursorflow-new.md) - Flow와 Lane 생성
|
|
157
|
+
- [cursorflow run](cursorflow-run.md) - Flow 실행
|
|
158
|
+
- [cursorflow doctor](cursorflow-doctor.md) - 설정 검증
|
|
159
|
+
|
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
# CursorFlow Doctor
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
|
-
Verify that your environment and
|
|
4
|
+
Verify that your environment and flow configurations are properly set up for CursorFlow.
|
|
5
5
|
|
|
6
6
|
## Usage
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
-
cursorflow doctor [options]
|
|
9
|
+
cursorflow doctor [flow-name] [options]
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
## Checks Performed
|
|
13
13
|
- **Environment**: Git repository status, remote availability, and worktree support.
|
|
14
14
|
- **Cursor IDE**: Verifies `cursor-agent` is installed and authenticated.
|
|
15
|
-
- **Tasks**: (Optional) Validates
|
|
15
|
+
- **Flow/Tasks**: (Optional) Validates flow JSON files for schema errors or missing fields.
|
|
16
16
|
|
|
17
17
|
## Options
|
|
18
18
|
|
|
19
19
|
| Option | Description |
|
|
20
20
|
|------|------|
|
|
21
|
-
|
|
|
21
|
+
| `[flow-name]` | Flow name to validate (e.g., `SearchFeature`) |
|
|
22
|
+
| `--tasks-dir <path>` | Validate flow/tasks in a specific directory (legacy) |
|
|
22
23
|
| `--executor <type>` | Check environment for `cursor-agent` \| `cloud` |
|
|
23
24
|
| `--test-agent` | Run an interactive agent test (to approve permissions) |
|
|
24
25
|
| `--no-cursor` | Skip Cursor Agent installation and auth checks |
|
|
25
26
|
| `--json` | Output the report in machine-readable JSON format |
|
|
26
27
|
|
|
27
|
-
##
|
|
28
|
+
## Flow Validation
|
|
28
29
|
|
|
29
|
-
When `--tasks-dir` is provided, the doctor performs comprehensive validation:
|
|
30
|
+
When a flow name or `--tasks-dir` is provided, the doctor performs comprehensive validation:
|
|
30
31
|
|
|
31
32
|
### Structure Validation
|
|
32
33
|
- **tasks array**: Must exist and be non-empty
|
|
33
34
|
- **task.name**: Required, must be alphanumeric with `-` and `_` only, unique within lane
|
|
34
35
|
- **task.prompt**: Required, should be descriptive (warns if < 10 chars)
|
|
35
36
|
- **task.model**: Optional, must be string if provided
|
|
36
|
-
- **task.
|
|
37
|
+
- **task.dependsOn**: Optional, task-level dependencies
|
|
37
38
|
|
|
38
39
|
### Dependency Validation (DAG)
|
|
39
|
-
- **Unknown dependencies**: Reports if `dependsOn` references non-existent lanes
|
|
40
|
+
- **Unknown dependencies**: Reports if `dependsOn` references non-existent lanes/tasks
|
|
40
41
|
- **Circular dependencies**: Detects cycles (e.g., A→B→A) that would cause deadlock
|
|
41
42
|
- Reports the exact cycle path for easy debugging
|
|
42
43
|
|
|
@@ -44,30 +45,44 @@ When `--tasks-dir` is provided, the doctor performs comprehensive validation:
|
|
|
44
45
|
- **Prefix collision**: Warns if multiple lanes use the same `branchPrefix`
|
|
45
46
|
- **Existing branch conflicts**: Detects if existing branches match a lane's prefix
|
|
46
47
|
- **Duplicate lane names**: Ensures each lane file has a unique name
|
|
47
|
-
- **Naming suggestions**: Recommends using lane numbers in branch prefixes for consistency
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
❌ Branch prefix collision
|
|
52
|
-
Multiple lanes use the same branchPrefix "feature/lane-1-": 01-lane-1, 02-lane-2
|
|
53
|
-
Fix: Update the branchPrefix in each lane JSON file to be unique
|
|
54
|
-
|
|
55
|
-
⚠️ Existing branches may conflict with 01-lane-1
|
|
56
|
-
Found 2 existing branch(es) matching prefix "feature/lane-1-": feature/lane-1-abc, feature/lane-1-xyz
|
|
57
|
-
Fix: Delete conflicting branches or change the branchPrefix
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Example
|
|
49
|
+
## Examples
|
|
61
50
|
|
|
62
51
|
```bash
|
|
63
52
|
# Basic environment check
|
|
64
53
|
cursorflow doctor
|
|
65
54
|
|
|
55
|
+
# Validate a specific flow by name
|
|
56
|
+
cursorflow doctor SearchFeature
|
|
57
|
+
|
|
66
58
|
# Test agent permissions
|
|
67
59
|
cursorflow doctor --test-agent
|
|
68
60
|
|
|
69
|
-
# Validate a specific
|
|
70
|
-
cursorflow doctor --tasks-dir _cursorflow/
|
|
61
|
+
# Validate a specific flow directory
|
|
62
|
+
cursorflow doctor --tasks-dir _cursorflow/flows/001_SearchFeature
|
|
63
|
+
|
|
64
|
+
# Skip cursor checks (faster)
|
|
65
|
+
cursorflow doctor SearchFeature --no-cursor
|
|
66
|
+
|
|
67
|
+
# Output as JSON
|
|
68
|
+
cursorflow doctor SearchFeature --json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Example Output
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
75
|
+
🩺 CursorFlow Doctor
|
|
76
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
77
|
+
|
|
78
|
+
cwd: /home/user/project
|
|
79
|
+
repo: /home/user/project
|
|
80
|
+
tasks: /home/user/project/_cursorflow/flows/001_SearchFeature
|
|
81
|
+
|
|
82
|
+
✅ All checks passed
|
|
83
|
+
|
|
84
|
+
💡 Tip: If this is your first run, we recommend running:
|
|
85
|
+
cursorflow doctor --test-agent
|
|
71
86
|
```
|
|
72
87
|
|
|
73
88
|
## Common Issues & Fixes
|
|
@@ -78,3 +93,10 @@ cursorflow doctor --tasks-dir _cursorflow/tasks/my-feature/
|
|
|
78
93
|
| `Not authenticated` | Open Cursor IDE and log in to your account. |
|
|
79
94
|
| `Worktree not supported` | Upgrade your Git version (requires Git >= 2.5). |
|
|
80
95
|
| `Circular dependency` | Check the `dependsOn` fields in your task JSON files. |
|
|
96
|
+
| `Flow not found` | Verify flow name or create with `cursorflow new`. |
|
|
97
|
+
|
|
98
|
+
## Related Commands
|
|
99
|
+
|
|
100
|
+
- [cursorflow new](cursorflow-new.md) - Create Flow and Lanes
|
|
101
|
+
- [cursorflow add](cursorflow-add.md) - Add Tasks to Lanes
|
|
102
|
+
- [cursorflow run](cursorflow-run.md) - Run Flow
|
|
@@ -7,20 +7,41 @@ The `cursorflow monitor` command provides a powerful, interactive terminal-based
|
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
9
|
# Monitor the most recent run
|
|
10
|
-
cursorflow monitor
|
|
10
|
+
cursorflow monitor
|
|
11
|
+
|
|
12
|
+
# List all runs (Multiple Flows Dashboard)
|
|
13
|
+
cursorflow monitor --list
|
|
11
14
|
|
|
12
15
|
# Monitor a specific run directory
|
|
13
|
-
cursorflow monitor
|
|
16
|
+
cursorflow monitor run-2025-12-21T10-00-00
|
|
14
17
|
```
|
|
15
18
|
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Description |
|
|
22
|
+
|--------|-------------|
|
|
23
|
+
| `[run-dir]` | Run directory or ID to monitor (default: latest) |
|
|
24
|
+
| `--list`, `-l` | Show all runs dashboard (interactive list) |
|
|
25
|
+
| `--interval <n>` | Refresh interval in seconds (default: 2) |
|
|
26
|
+
| `--help`, `-h` | Show help |
|
|
27
|
+
|
|
16
28
|
## Dashboard Controls
|
|
17
29
|
|
|
18
30
|
### List View (Main)
|
|
19
31
|
- **Navigation**: Use `↑` and `↓` to move between lanes.
|
|
20
32
|
- **Details**: Press `→` or `Enter` to enter the **Lane Detail View**.
|
|
21
33
|
- **Flow View**: Press `F` to see the task dependency graph (DAG).
|
|
34
|
+
- **All Runs**: Press `M` to switch to the **All Flows Dashboard**.
|
|
35
|
+
- **Unified Logs**: Press `U` to see a merged log stream of all lanes.
|
|
22
36
|
- **Quit**: Press `Q` to exit.
|
|
23
37
|
|
|
38
|
+
### All Flows Dashboard
|
|
39
|
+
- **Navigation**: Use `↑` and `↓` to select a flow.
|
|
40
|
+
- **Switch**: Press `→` or `Enter` to switch the monitor to the selected flow.
|
|
41
|
+
- **Delete**: Press `D` to delete a completed flow's logs (requires confirmation).
|
|
42
|
+
- **Refresh**: Press `R` to refresh the list of flows.
|
|
43
|
+
- **Back**: Press `M` or `Esc` to return to the List View.
|
|
44
|
+
|
|
24
45
|
### Lane Detail View
|
|
25
46
|
- **History Browsing**: Use `↑` and `↓` to scroll through conversation history.
|
|
26
47
|
- **Message Detail**: Press `→` or `Enter` on a message to see its full content.
|