@litmers/cursorflow-orchestrator 0.1.37 → 0.1.40

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 (102) hide show
  1. package/README.md +13 -13
  2. package/commands/cursorflow-init.md +113 -32
  3. package/commands/cursorflow-prepare.md +146 -339
  4. package/commands/cursorflow-run.md +148 -131
  5. package/dist/cli/add.js +8 -4
  6. package/dist/cli/add.js.map +1 -1
  7. package/dist/cli/index.js +2 -0
  8. package/dist/cli/index.js.map +1 -1
  9. package/dist/cli/new.js +3 -5
  10. package/dist/cli/new.js.map +1 -1
  11. package/dist/cli/prepare.js +0 -1
  12. package/dist/cli/prepare.js.map +1 -1
  13. package/dist/cli/resume.js +24 -15
  14. package/dist/cli/resume.js.map +1 -1
  15. package/dist/cli/run.js +1 -6
  16. package/dist/cli/run.js.map +1 -1
  17. package/dist/cli/setup-commands.d.ts +1 -0
  18. package/dist/cli/setup-commands.js +1 -0
  19. package/dist/cli/setup-commands.js.map +1 -1
  20. package/dist/core/orchestrator.js +13 -5
  21. package/dist/core/orchestrator.js.map +1 -1
  22. package/dist/core/runner/agent.d.ts +5 -1
  23. package/dist/core/runner/agent.js +31 -1
  24. package/dist/core/runner/agent.js.map +1 -1
  25. package/dist/core/runner/pipeline.d.ts +0 -1
  26. package/dist/core/runner/pipeline.js +136 -173
  27. package/dist/core/runner/pipeline.js.map +1 -1
  28. package/dist/core/runner/prompt.d.ts +0 -1
  29. package/dist/core/runner/prompt.js +11 -16
  30. package/dist/core/runner/prompt.js.map +1 -1
  31. package/dist/core/runner/task.d.ts +1 -2
  32. package/dist/core/runner/task.js +31 -40
  33. package/dist/core/runner/task.js.map +1 -1
  34. package/dist/core/runner.js +15 -2
  35. package/dist/core/runner.js.map +1 -1
  36. package/dist/core/stall-detection.d.ts +32 -4
  37. package/dist/core/stall-detection.js +151 -149
  38. package/dist/core/stall-detection.js.map +1 -1
  39. package/dist/services/logging/console.d.ts +7 -1
  40. package/dist/services/logging/console.js +13 -3
  41. package/dist/services/logging/console.js.map +1 -1
  42. package/dist/services/logging/formatter.d.ts +1 -0
  43. package/dist/services/logging/formatter.js +6 -3
  44. package/dist/services/logging/formatter.js.map +1 -1
  45. package/dist/types/config.d.ts +3 -1
  46. package/dist/types/logging.d.ts +1 -1
  47. package/dist/types/task.d.ts +3 -8
  48. package/dist/utils/config.js +5 -0
  49. package/dist/utils/config.js.map +1 -1
  50. package/dist/utils/doctor.js +4 -4
  51. package/dist/utils/doctor.js.map +1 -1
  52. package/dist/utils/enhanced-logger.d.ts +1 -1
  53. package/dist/utils/enhanced-logger.js +3 -3
  54. package/dist/utils/enhanced-logger.js.map +1 -1
  55. package/dist/utils/git.d.ts +12 -1
  56. package/dist/utils/git.js +56 -1
  57. package/dist/utils/git.js.map +1 -1
  58. package/dist/utils/health.js +13 -13
  59. package/dist/utils/health.js.map +1 -1
  60. package/dist/utils/log-formatter.d.ts +1 -1
  61. package/dist/utils/log-formatter.js +45 -8
  62. package/dist/utils/log-formatter.js.map +1 -1
  63. package/dist/utils/logger.js +2 -2
  64. package/dist/utils/logger.js.map +1 -1
  65. package/package.json +1 -1
  66. package/src/cli/add.ts +9 -4
  67. package/src/cli/index.ts +3 -0
  68. package/src/cli/new.ts +3 -5
  69. package/src/cli/prepare.ts +0 -1
  70. package/src/cli/resume.ts +28 -19
  71. package/src/cli/run.ts +1 -6
  72. package/src/cli/setup-commands.ts +1 -1
  73. package/src/core/orchestrator.ts +14 -5
  74. package/src/core/runner/agent.ts +36 -4
  75. package/src/core/runner/pipeline.ts +149 -182
  76. package/src/core/runner/prompt.ts +11 -18
  77. package/src/core/runner/task.ts +32 -41
  78. package/src/core/runner.ts +17 -2
  79. package/src/core/stall-detection.ts +263 -147
  80. package/src/services/logging/console.ts +13 -3
  81. package/src/services/logging/formatter.ts +6 -3
  82. package/src/types/config.ts +3 -1
  83. package/src/types/logging.ts +4 -2
  84. package/src/types/task.ts +3 -8
  85. package/src/utils/config.ts +6 -0
  86. package/src/utils/doctor.ts +5 -5
  87. package/src/utils/enhanced-logger.ts +3 -3
  88. package/src/utils/flow.ts +1 -0
  89. package/src/utils/git.ts +61 -1
  90. package/src/utils/health.ts +15 -15
  91. package/src/utils/log-formatter.ts +51 -8
  92. package/src/utils/logger.ts +2 -2
  93. package/commands/cursorflow-add.md +0 -159
  94. package/commands/cursorflow-clean.md +0 -84
  95. package/commands/cursorflow-doctor.md +0 -102
  96. package/commands/cursorflow-models.md +0 -51
  97. package/commands/cursorflow-monitor.md +0 -90
  98. package/commands/cursorflow-new.md +0 -87
  99. package/commands/cursorflow-resume.md +0 -205
  100. package/commands/cursorflow-signal.md +0 -52
  101. package/commands/cursorflow-stop.md +0 -55
  102. package/commands/cursorflow-triggers.md +0 -250
package/README.md CHANGED
@@ -77,9 +77,9 @@ cursorflow new SearchFeature --lanes "api,web,mobile"
77
77
  ```
78
78
  _cursorflow/flows/001_SearchFeature/
79
79
  ├── flow.meta.json # Flow 메타데이터
80
- ├── 01-api.json # API 레인 (빈 상태)
81
- ├── 02-web.json # Web 레인 (빈 상태)
82
- └── 03-mobile.json # Mobile 레인 (빈 상태)
80
+ ├── api.json # API 레인 (빈 상태)
81
+ ├── web.json # Web 레인 (빈 상태)
82
+ └── mobile.json # Mobile 레인 (빈 상태)
83
83
  ```
84
84
 
85
85
  ---
@@ -178,7 +178,7 @@ Within the `cursorflow monitor` dashboard:
178
178
  {
179
179
  "branchPrefix": "feature/lane-1-",
180
180
  "timeout": 600000,
181
- "enableIntervention": false,
181
+ "enableIntervention": true,
182
182
  "enableReview": true,
183
183
  "reviewModel": "sonnet-4.5-thinking",
184
184
  "tasks": [
@@ -203,7 +203,7 @@ Within the `cursorflow monitor` dashboard:
203
203
  | Option | Type | Default | Description |
204
204
  |--------|------|---------|-------------|
205
205
  | `timeout` | number | 600000 | Task timeout in milliseconds (10 min) |
206
- | `enableIntervention` | boolean | false | Enable stdin piping for intervention |
206
+ | `enableIntervention` | boolean | true | Enable stdin piping for intervention |
207
207
  | `model` | string | "sonnet-4.5" | AI model to use |
208
208
  | `enableReview` | boolean | true | Enable AI code review |
209
209
 
@@ -222,7 +222,7 @@ JSON 파일에서 `dependsOn` 필드 추가:
222
222
  {
223
223
  "name": "integrate",
224
224
  "prompt": "API 연동...",
225
- "dependsOn": ["01-backend:implement"] // ← 이 태스크 완료 후 시작
225
+ "dependsOn": ["backend:implement"] // ← 이 태스크 완료 후 시작
226
226
  }
227
227
  ]
228
228
  }
@@ -233,9 +233,9 @@ JSON 파일에서 `dependsOn` 필드 추가:
233
233
  ### 실행 흐름 예시
234
234
 
235
235
  ```
236
- 01-backend: [setup] → [implement] → [test]
236
+ 1-backend: [setup] → [implement] → [test]
237
237
  ↓ 완료!
238
- 02-frontend: [setup] ─────┴─ 대기 → [integrate] → [test]
238
+ 2-frontend: [setup] ─────┴─ 대기 → [integrate] → [test]
239
239
  ```
240
240
 
241
241
  - 백엔드와 프론트엔드 **동시 시작**
@@ -246,7 +246,7 @@ JSON 파일에서 `dependsOn` 필드 추가:
246
246
 
247
247
  ```bash
248
248
  cursorflow doctor --tasks-dir _cursorflow/tasks/MyFeature
249
- # ❌ Cyclic dependency: 01-a:task1 → 02-b:task2 → 01-a:task1
249
+ # ❌ Cyclic dependency: a:task1 → b:task2 → a:task1
250
250
  ```
251
251
 
252
252
  ## 🩺 Pre-flight Checks
@@ -308,12 +308,12 @@ CursorFlow provides comprehensive logging with automatic cleanup and export opti
308
308
 
309
309
  ### Log Format
310
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)
311
+ Logs use the format `[{n}-{t}-{lanename}]`:
312
+ - `{n}`: Lane number (1-indexed)
313
+ - `{t}`: Task number (1-indexed)
314
314
  - `{lanename}`: First 10 characters of lane name
315
315
 
316
- Example: `[L1-T2-backend]` = Lane 1, Task 2, lane "backend"
316
+ Example: `[1-2-backend]` = Lane 1, Task 2, lane "backend"
317
317
 
318
318
  ### Features
319
319
  - **ANSI Stripping**: Clean logs without terminal escape codes
@@ -1,50 +1,131 @@
1
- # CursorFlow Init
1
+ # cursorflow init
2
2
 
3
- ## Overview
4
- Initialize CursorFlow in your project. This command creates the default configuration file, sets up the required directory structure, and prepares the environment for parallel AI orchestration.
3
+ 프로젝트에 CursorFlow를 초기화합니다.
5
4
 
6
- ## Usage
5
+ ## 사용법
7
6
 
8
7
  ```bash
9
8
  cursorflow init [options]
10
9
  ```
11
10
 
12
- ## Options
11
+ ## 옵션
13
12
 
14
- | Option | Description |
13
+ | 옵션 | 설명 |
15
14
  |------|------|
16
- | `--example` | Create an example task to help you get started |
17
- | `--config-only` | Only create the `cursorflow.config.js` file |
18
- | `--no-commands` | Skip installing Cursor IDE custom commands |
19
- | `--no-gitignore` | Skip adding `_cursorflow/` to your `.gitignore` |
20
- | `--force` | Overwrite existing configuration or directories |
15
+ | `--example` | 예제 Flow를 생성하여 빠르게 시작 |
16
+ | `--config-only` | `cursorflow.config.js` 파일만 생성 |
17
+ | `--no-commands` | Cursor IDE 커맨드 설치 건너뛰기 |
18
+ | `--no-gitignore` | `.gitignore`에 `_cursorflow/` 추가 |
19
+ | `--force` | 기존 설정 덮어쓰기 |
21
20
 
22
- ## What's Created?
21
+ ## 생성되는 구조
23
22
 
24
- 1. **`cursorflow.config.js`**: Central configuration for the project.
25
- 2. **`_cursorflow/tasks/`**: Directory where you define your task JSON files.
26
- 3. **`_cursorflow/logs/`**: Directory for run logs and terminal outputs.
27
- 4. **`.cursor/commands/cursorflow/`**: (Optional) Integrated Cursor IDE commands.
28
- 5. **`.gitignore` update**: Adds `_cursorflow/` to prevent committing logs.
23
+ ```
24
+ your-project/
25
+ ├── cursorflow.config.js # 중앙 설정 파일
26
+ ├── _cursorflow/
27
+ │ ├── flows/ # Flow 정의 (new 커맨드로 생성)
28
+ │ ├── tasks/ # Legacy 태스크 (deprecated)
29
+ │ └── logs/ # 실행 로그
30
+ └── .cursor/
31
+ └── commands/cursorflow/ # Cursor IDE 커맨드
32
+ ```
33
+
34
+ ## 빠른 시작
35
+
36
+ ### Step 1: 초기화
37
+
38
+ ```bash
39
+ cd your-project
40
+ cursorflow init
41
+ ```
42
+
43
+ ### Step 2: Flow 생성
44
+
45
+ ```bash
46
+ # 백엔드와 프론트엔드 2개 레인으로 Flow 생성
47
+ cursorflow new MyFeature --lanes "backend,frontend"
48
+ ```
49
+
50
+ ### Step 3: Task 추가
51
+
52
+ ```bash
53
+ # 백엔드 레인에 태스크 추가
54
+ cursorflow add MyFeature backend \
55
+ --task "name=implement|prompt=API 엔드포인트 구현"
56
+
57
+ # 프론트엔드 레인에 태스크 추가 (백엔드 완료 후 시작)
58
+ cursorflow add MyFeature frontend \
59
+ --task "name=ui|prompt=UI 컴포넌트 구현" \
60
+ --after "backend"
61
+ ```
29
62
 
30
- ## Example
63
+ ### Step 4: 검증 및 실행
31
64
 
32
65
  ```bash
33
- # Standard initialization with an example task
34
- cursorflow init --example
66
+ # 설정 검증
67
+ cursorflow doctor MyFeature
68
+
69
+ # 실행
70
+ cursorflow run MyFeature
71
+
72
+ # 모니터링
73
+ cursorflow monitor latest
74
+ ```
75
+
76
+ ## 워크플로우 다이어그램
77
+
78
+ ```
79
+ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
80
+ │ 1. Create Flow │ ──▶ │ 2. Add Tasks │ ──▶ │ 3. Validate │ ──▶ │ 4. Run │
81
+ │ (new) │ │ (add) │ │ (doctor) │ │ (run) │
82
+ └─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
83
+ ```
84
+
85
+ ## 설정 파일 (cursorflow.config.js)
86
+
87
+ ```javascript
88
+ module.exports = {
89
+ // 기본 브랜치 (worktree 생성 기준)
90
+ baseBranch: 'main',
91
+
92
+ // 동시 실행 레인 수
93
+ maxConcurrentLanes: 3,
94
+
95
+ // 기본 AI 모델 (task에서 model 생략 시 사용)
96
+ defaultModel: 'sonnet-4.5',
97
+
98
+ // 태스크 타임아웃 (ms)
99
+ timeout: 600000,
100
+
101
+ // AI 리뷰 활성화
102
+ enableReview: true,
103
+ reviewModel: 'sonnet-4.5-thinking',
104
+
105
+ // Flow/Task 디렉토리
106
+ flowsDir: '_cursorflow/flows',
107
+ tasksDir: '_cursorflow/tasks', // legacy
108
+ logsDir: '_cursorflow/logs',
109
+ };
110
+ ```
111
+
112
+ ## 기본 모델 설정
113
+
114
+ ```bash
115
+ # 기본 모델 확인
116
+ cursorflow config defaultModel
117
+
118
+ # 기본 모델 변경
119
+ cursorflow config defaultModel gemini-2.5-flash
35
120
 
36
- # Minimal initialization
37
- cursorflow init --no-commands --no-gitignore
121
+ # 사용 가능한 모델 목록
122
+ cursorflow models
38
123
  ```
39
124
 
40
- ## Next Steps
125
+ ## 관련 명령어
41
126
 
42
- 1. **Configure**: Review `cursorflow.config.js` and adjust settings like `baseBranch` or `maxConcurrentLanes`.
43
- 2. **Explore**: If you used `--example`, run it with:
44
- ```bash
45
- cursorflow run _cursorflow/tasks/example/
46
- ```
47
- 3. **Create**: Start your own feature tasks with:
48
- ```bash
49
- cursorflow prepare MyFeature
50
- ```
127
+ - [cursorflow new](cursorflow-new.md) - Flow와 Lane 생성
128
+ - [cursorflow add](cursorflow-add.md) - Lane에 Task 추가
129
+ - [cursorflow run](cursorflow-run.md) - Flow 실행
130
+ - [cursorflow monitor](cursorflow-monitor.md) - 실행 모니터링
131
+ - [cursorflow doctor](cursorflow-doctor.md) - 설정 검증