@litmers/cursorflow-orchestrator 0.1.31 → 0.1.34

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.
Files changed (129) hide show
  1. package/README.md +144 -52
  2. package/commands/cursorflow-add.md +159 -0
  3. package/commands/cursorflow-monitor.md +23 -2
  4. package/commands/cursorflow-new.md +87 -0
  5. package/dist/cli/add.d.ts +7 -0
  6. package/dist/cli/add.js +377 -0
  7. package/dist/cli/add.js.map +1 -0
  8. package/dist/cli/clean.js +1 -0
  9. package/dist/cli/clean.js.map +1 -1
  10. package/dist/cli/config.d.ts +7 -0
  11. package/dist/cli/config.js +181 -0
  12. package/dist/cli/config.js.map +1 -0
  13. package/dist/cli/index.js +34 -30
  14. package/dist/cli/index.js.map +1 -1
  15. package/dist/cli/logs.js +7 -33
  16. package/dist/cli/logs.js.map +1 -1
  17. package/dist/cli/monitor.js +51 -62
  18. package/dist/cli/monitor.js.map +1 -1
  19. package/dist/cli/new.d.ts +7 -0
  20. package/dist/cli/new.js +232 -0
  21. package/dist/cli/new.js.map +1 -0
  22. package/dist/cli/prepare.js +95 -193
  23. package/dist/cli/prepare.js.map +1 -1
  24. package/dist/cli/resume.js +11 -47
  25. package/dist/cli/resume.js.map +1 -1
  26. package/dist/cli/run.js +27 -22
  27. package/dist/cli/run.js.map +1 -1
  28. package/dist/cli/tasks.js +1 -2
  29. package/dist/cli/tasks.js.map +1 -1
  30. package/dist/core/failure-policy.d.ts +9 -0
  31. package/dist/core/failure-policy.js +9 -0
  32. package/dist/core/failure-policy.js.map +1 -1
  33. package/dist/core/orchestrator.d.ts +20 -6
  34. package/dist/core/orchestrator.js +213 -333
  35. package/dist/core/orchestrator.js.map +1 -1
  36. package/dist/core/runner/agent.d.ts +27 -0
  37. package/dist/core/runner/agent.js +294 -0
  38. package/dist/core/runner/agent.js.map +1 -0
  39. package/dist/core/runner/index.d.ts +5 -0
  40. package/dist/core/runner/index.js +22 -0
  41. package/dist/core/runner/index.js.map +1 -0
  42. package/dist/core/runner/pipeline.d.ts +9 -0
  43. package/dist/core/runner/pipeline.js +539 -0
  44. package/dist/core/runner/pipeline.js.map +1 -0
  45. package/dist/core/runner/prompt.d.ts +25 -0
  46. package/dist/core/runner/prompt.js +175 -0
  47. package/dist/core/runner/prompt.js.map +1 -0
  48. package/dist/core/runner/task.d.ts +26 -0
  49. package/dist/core/runner/task.js +283 -0
  50. package/dist/core/runner/task.js.map +1 -0
  51. package/dist/core/runner/utils.d.ts +37 -0
  52. package/dist/core/runner/utils.js +161 -0
  53. package/dist/core/runner/utils.js.map +1 -0
  54. package/dist/core/runner.d.ts +2 -96
  55. package/dist/core/runner.js +11 -1136
  56. package/dist/core/runner.js.map +1 -1
  57. package/dist/core/stall-detection.d.ts +326 -0
  58. package/dist/core/stall-detection.js +781 -0
  59. package/dist/core/stall-detection.js.map +1 -0
  60. package/dist/types/config.d.ts +6 -6
  61. package/dist/types/flow.d.ts +84 -0
  62. package/dist/types/flow.js +10 -0
  63. package/dist/types/flow.js.map +1 -0
  64. package/dist/types/index.d.ts +1 -0
  65. package/dist/types/index.js +3 -3
  66. package/dist/types/index.js.map +1 -1
  67. package/dist/types/lane.d.ts +0 -2
  68. package/dist/types/logging.d.ts +5 -1
  69. package/dist/types/task.d.ts +7 -11
  70. package/dist/utils/config.js +7 -15
  71. package/dist/utils/config.js.map +1 -1
  72. package/dist/utils/dependency.d.ts +36 -1
  73. package/dist/utils/dependency.js +256 -1
  74. package/dist/utils/dependency.js.map +1 -1
  75. package/dist/utils/enhanced-logger.d.ts +45 -82
  76. package/dist/utils/enhanced-logger.js +238 -844
  77. package/dist/utils/enhanced-logger.js.map +1 -1
  78. package/dist/utils/git.d.ts +29 -0
  79. package/dist/utils/git.js +115 -5
  80. package/dist/utils/git.js.map +1 -1
  81. package/dist/utils/state.js +0 -2
  82. package/dist/utils/state.js.map +1 -1
  83. package/dist/utils/task-service.d.ts +2 -2
  84. package/dist/utils/task-service.js +40 -31
  85. package/dist/utils/task-service.js.map +1 -1
  86. package/package.json +4 -3
  87. package/src/cli/add.ts +397 -0
  88. package/src/cli/clean.ts +1 -0
  89. package/src/cli/config.ts +177 -0
  90. package/src/cli/index.ts +36 -32
  91. package/src/cli/logs.ts +7 -31
  92. package/src/cli/monitor.ts +55 -71
  93. package/src/cli/new.ts +235 -0
  94. package/src/cli/prepare.ts +98 -205
  95. package/src/cli/resume.ts +13 -56
  96. package/src/cli/run.ts +311 -306
  97. package/src/cli/tasks.ts +1 -2
  98. package/src/core/failure-policy.ts +9 -0
  99. package/src/core/orchestrator.ts +277 -378
  100. package/src/core/runner/agent.ts +314 -0
  101. package/src/core/runner/index.ts +6 -0
  102. package/src/core/runner/pipeline.ts +567 -0
  103. package/src/core/runner/prompt.ts +174 -0
  104. package/src/core/runner/task.ts +320 -0
  105. package/src/core/runner/utils.ts +142 -0
  106. package/src/core/runner.ts +8 -1347
  107. package/src/core/stall-detection.ts +936 -0
  108. package/src/types/config.ts +6 -6
  109. package/src/types/flow.ts +91 -0
  110. package/src/types/index.ts +15 -3
  111. package/src/types/lane.ts +0 -2
  112. package/src/types/logging.ts +5 -1
  113. package/src/types/task.ts +7 -11
  114. package/src/utils/config.ts +8 -16
  115. package/src/utils/dependency.ts +311 -2
  116. package/src/utils/enhanced-logger.ts +263 -927
  117. package/src/utils/git.ts +145 -5
  118. package/src/utils/state.ts +0 -2
  119. package/src/utils/task-service.ts +48 -40
  120. package/commands/cursorflow-review.md +0 -56
  121. package/commands/cursorflow-runs.md +0 -59
  122. package/dist/cli/runs.d.ts +0 -5
  123. package/dist/cli/runs.js +0 -214
  124. package/dist/cli/runs.js.map +0 -1
  125. package/dist/core/reviewer.d.ts +0 -66
  126. package/dist/core/reviewer.js +0 -265
  127. package/dist/core/reviewer.js.map +0 -1
  128. package/src/cli/runs.ts +0 -212
  129. package/src/core/reviewer.ts +0 -285
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
- - 📋 **Preset Templates**: Built-in templates for common patterns (complex, simple, merge).
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,75 +28,136 @@
29
28
  npm install -g @litmers/cursorflow-orchestrator
30
29
  ```
31
30
 
32
- ### 2. Initialize & Prepare Tasks
31
+ ### 2. Create a Flow
33
32
 
34
33
  ```bash
35
34
  cd your-project
36
35
  cursorflow init
37
36
 
38
- # Simple task (single implement task)
39
- cursorflow prepare FixBug --prompt "Fix the login validation bug in auth.ts"
37
+ # Create a Flow with two Lanes: backend and frontend
38
+ cursorflow new ShopFeature --lanes "backend,frontend"
39
+ ```
40
40
 
41
- # Complex feature (plan implement → test)
42
- cursorflow prepare AuthSystem --preset complex --prompt "Build user authentication with JWT"
41
+ ### 3. Add Tasks to Lanes
43
42
 
44
- # Multiple parallel lanes
45
- cursorflow prepare FullStack --lanes 3 --sequential --preset complex \
46
- --prompt "Build your layer of the full-stack feature"
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
- ### 3. Validate & Run
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 _cursorflow/tasks/2412211530_AuthSystem
58
+ cursorflow run ShopFeature
57
59
 
58
- # Open the interactive dashboard
60
+ # Monitor progress in real-time
59
61
  cursorflow monitor latest
60
62
  ```
61
63
 
62
- ## 📋 Preset Templates
63
-
64
- CursorFlow provides built-in task templates:
64
+ ## 📋 Flow 커맨드 - 시나리오로 배우기
65
65
 
66
- | Preset | Tasks | Use Case |
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 |
66
+ **시나리오**: "쇼핑몰" 프로젝트에서 백엔드 API와 프론트엔드를 동시에 개발
72
67
 
73
- ### Using External Templates
68
+ ---
74
69
 
75
- You can use templates from a local file, a remote URL, or a built-in name:
70
+ ### Step 1: Flow와 Lane 생성 (`new`)
76
71
 
77
72
  ```bash
78
- # Using a built-in template name
79
- cursorflow prepare Feature --template basic
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
- # Using a local template file
82
- cursorflow prepare Custom --template ./my-template.json
87
+ ### Step 2: Lane에 Task 추가 (`add`)
83
88
 
84
- # Using a remote template URL
85
- cursorflow prepare Remote --template https://raw.githubusercontent.com/user/repo/main/template.json
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
- Templates support `{{featureName}}`, `{{laneNumber}}`, and `{{devPort}}` placeholders.
107
+ ---
108
+
109
+ ### Step 3: 실행
89
110
 
90
111
  ```bash
91
- # Complex: Creates plan document that subsequent tasks reference
92
- cursorflow prepare Feature --preset complex --prompt "Build user dashboard"
112
+ cursorflow run SearchFeature
113
+ ```
93
114
 
94
- # Simple: Just implement and test
95
- cursorflow prepare BugFix --preset simple --prompt "Fix null pointer in auth.ts"
115
+ **실행 흐름:**
116
+ ```
117
+ api: [plan] → [implement] → [test]
118
+ │ │
119
+ web: └─→ [ui] ────┤
120
+
121
+ mobile: └─→ [app]
122
+ ```
96
123
 
97
- # Single task: Just the prompt
98
- cursorflow prepare QuickFix --prompt "Update README.md"
124
+ ---
125
+
126
+ ### --task 형식
127
+
128
+ ```
129
+ "name=<이름>|prompt=<프롬프트>" # 기본 모델 사용
130
+ "name=<이름>|model=<모델>|prompt=<프롬프트>" # 모델 지정
99
131
  ```
100
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` |
160
+
101
161
  ## 🎮 Dashboard Controls
102
162
 
103
163
  Within the `cursorflow monitor` dashboard:
@@ -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
- ## 🔗 Task Dependencies
210
+ ## 🔗 태스크 의존성 (dependsOn)
148
211
 
149
- Define dependencies between lanes. Dependent lanes wait for parents and auto-merge:
212
+ **언제 사용?** 프론트엔드가 백엔드 API 완성 후에 시작해야
150
213
 
151
- ```bash
152
- # Create 3 sequential lanes (1 → 2 → 3)
153
- cursorflow prepare Pipeline --lanes 3 --sequential --preset complex
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
+ ### 실행 흐름 예시
154
234
 
155
- # Add a merge lane that depends on multiple lanes
156
- cursorflow prepare --add-lane _cursorflow/tasks/2412211530_Pipeline \
157
- --depends-on "01-lane-1,02-lane-2"
235
+ ```
236
+ 01-backend: [setup] [implement] → [test]
237
+ 완료!
238
+ 02-frontend: [setup] ─────┴─ 대기 → [integrate] → [test]
239
+ ```
240
+
241
+ - 백엔드와 프론트엔드 **동시 시작**
242
+ - 프론트의 `integrate`는 백엔드 `implement` 완료까지 대기
243
+ - 완료되면 백엔드 브랜치 **자동 머지** 후 시작
244
+
245
+ ### 순환 의존성 검사
246
+
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
@@ -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
+
@@ -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 latest
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 _cursorflow/logs/runs/run-2025-12-21T10-00-00
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.
@@ -0,0 +1,87 @@
1
+ # cursorflow new
2
+
3
+ Flow와 Lane을 생성합니다.
4
+
5
+ ## 사용법
6
+
7
+ ```bash
8
+ cursorflow new <FlowName> --lanes "lane1,lane2,..."
9
+ ```
10
+
11
+ ## 설명
12
+
13
+ 새로운 Flow 디렉토리를 생성하고, 지정된 Lane 파일들의 뼈대를 만듭니다.
14
+ 각 Lane에 실제 Task를 추가하려면 `cursorflow add` 명령을 사용하세요.
15
+
16
+ ## 옵션
17
+
18
+ | 옵션 | 설명 | 예시 |
19
+ |------|------|------|
20
+ | `--lanes <names>` | 콤마로 구분된 레인 이름 목록 (필수) | `--lanes "backend,frontend"` |
21
+
22
+ ## 예시
23
+
24
+ ### 기본 사용
25
+
26
+ ```bash
27
+ # 백엔드와 프론트엔드 2개 레인 생성
28
+ cursorflow new ShopFeature --lanes "backend,frontend"
29
+ ```
30
+
31
+ ### 3개 레인 생성
32
+
33
+ ```bash
34
+ # API, Web, Mobile 3개 레인 생성
35
+ cursorflow new SearchFeature --lanes "api,web,mobile"
36
+ ```
37
+
38
+ ## 생성 결과
39
+
40
+ ```
41
+ _cursorflow/flows/001_ShopFeature/
42
+ ├── flow.meta.json # Flow 메타데이터
43
+ ├── 01-backend.json # Lane 1 (빈 상태)
44
+ └── 02-frontend.json # Lane 2 (빈 상태)
45
+ ```
46
+
47
+ ### flow.meta.json 스키마
48
+
49
+ ```json
50
+ {
51
+ "id": "001",
52
+ "name": "ShopFeature",
53
+ "createdAt": "2024-12-25T10:30:00Z",
54
+ "createdBy": "user",
55
+ "baseBranch": "main",
56
+ "status": "pending",
57
+ "lanes": ["backend", "frontend"]
58
+ }
59
+ ```
60
+
61
+ ### Lane 파일 스키마 (빈 상태)
62
+
63
+ ```json
64
+ {
65
+ "laneName": "backend",
66
+ "tasks": []
67
+ }
68
+ ```
69
+
70
+ ## 다음 단계
71
+
72
+ Flow 생성 후, 각 Lane에 Task를 추가합니다:
73
+
74
+ ```bash
75
+ cursorflow add ShopFeature backend \
76
+ --task "name=implement|prompt=API 구현"
77
+
78
+ cursorflow add ShopFeature frontend \
79
+ --task "name=ui|prompt=UI 구현" \
80
+ --after "backend:implement"
81
+ ```
82
+
83
+ ## 관련 명령어
84
+
85
+ - [cursorflow add](cursorflow-add.md) - Lane에 Task 추가
86
+ - [cursorflow run](cursorflow-run.md) - Flow 실행
87
+
@@ -0,0 +1,7 @@
1
+ /**
2
+ * CursorFlow 'add' command
3
+ *
4
+ * Adds tasks to an existing Lane in a Flow
5
+ */
6
+ declare function addTasks(args: string[]): Promise<void>;
7
+ export = addTasks;