@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
@@ -1,102 +0,0 @@
1
- # CursorFlow Doctor
2
-
3
- ## Overview
4
- Verify that your environment and flow configurations are properly set up for CursorFlow.
5
-
6
- ## Usage
7
-
8
- ```bash
9
- cursorflow doctor [flow-name] [options]
10
- ```
11
-
12
- ## Checks Performed
13
- - **Environment**: Git repository status, remote availability, and worktree support.
14
- - **Cursor IDE**: Verifies `cursor-agent` is installed and authenticated.
15
- - **Flow/Tasks**: (Optional) Validates flow JSON files for schema errors or missing fields.
16
-
17
- ## Options
18
-
19
- | Option | Description |
20
- |------|------|
21
- | `[flow-name]` | Flow name to validate (e.g., `SearchFeature`) |
22
- | `--tasks-dir <path>` | Validate flow/tasks in a specific directory (legacy) |
23
- | `--executor <type>` | Check environment for `cursor-agent` \| `cloud` |
24
- | `--test-agent` | Run an interactive agent test (to approve permissions) |
25
- | `--no-cursor` | Skip Cursor Agent installation and auth checks |
26
- | `--json` | Output the report in machine-readable JSON format |
27
-
28
- ## Flow Validation
29
-
30
- When a flow name or `--tasks-dir` is provided, the doctor performs comprehensive validation:
31
-
32
- ### Structure Validation
33
- - **tasks array**: Must exist and be non-empty
34
- - **task.name**: Required, must be alphanumeric with `-` and `_` only, unique within lane
35
- - **task.prompt**: Required, should be descriptive (warns if < 10 chars)
36
- - **task.model**: Optional, must be string if provided
37
- - **task.dependsOn**: Optional, task-level dependencies
38
-
39
- ### Dependency Validation (DAG)
40
- - **Unknown dependencies**: Reports if `dependsOn` references non-existent lanes/tasks
41
- - **Circular dependencies**: Detects cycles (e.g., A→B→A) that would cause deadlock
42
- - Reports the exact cycle path for easy debugging
43
-
44
- ### Branch Validation
45
- - **Prefix collision**: Warns if multiple lanes use the same `branchPrefix`
46
- - **Existing branch conflicts**: Detects if existing branches match a lane's prefix
47
- - **Duplicate lane names**: Ensures each lane file has a unique name
48
-
49
- ## Examples
50
-
51
- ```bash
52
- # Basic environment check
53
- cursorflow doctor
54
-
55
- # Validate a specific flow by name
56
- cursorflow doctor SearchFeature
57
-
58
- # Test agent permissions
59
- cursorflow doctor --test-agent
60
-
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
86
- ```
87
-
88
- ## Common Issues & Fixes
89
-
90
- | Issue | Potential Fix |
91
- |-------|---------------|
92
- | `Cursor Agent not found` | Ensure Cursor IDE is installed and `cursor` command is in PATH. |
93
- | `Not authenticated` | Open Cursor IDE and log in to your account. |
94
- | `Worktree not supported` | Upgrade your Git version (requires Git >= 2.5). |
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
@@ -1,51 +0,0 @@
1
- # CursorFlow Models
2
-
3
- ## Overview
4
- List available AI models supported by CursorFlow and their recommended use cases. These models are discovered from your local `cursor-agent` installation.
5
-
6
- ## Usage
7
-
8
- ```bash
9
- cursorflow models [options]
10
- ```
11
-
12
- ## Options
13
-
14
- | Option | Description |
15
- |------|------|
16
- | `--list`, `-l` | List models in a table (default) |
17
- | `--json` | Output model list as JSON |
18
-
19
- ## Available Models
20
-
21
- | ID | Name | Provider | Recommended Use |
22
- |----|------|----------|-----------------|
23
- | `sonnet-4.5` | Claude 3.7 Sonnet | Anthropic | General implementation, fast work (Most versatile) |
24
- | `sonnet-4.5-thinking` | Claude 3.7 Sonnet (Thinking) | Anthropic | Code review, deeper reasoning (Thinking model) |
25
- | `opus-4.5` | Claude 4.0 Opus | Anthropic | Complex tasks, high quality (Advanced) |
26
- | `opus-4.5-thinking` | Claude 4.0 Opus (Thinking) | Anthropic | Architecture design (Premium) |
27
- | `gpt-5.2` | GPT-5.2 | OpenAI | General tasks |
28
- | `gpt-5.2-high` | GPT-5.2 High Reasoning | OpenAI | Advanced reasoning (High performance) |
29
-
30
- ## Model Configuration
31
-
32
- In your task `.json` files, specify the model like this:
33
-
34
- ```json
35
- {
36
- "model": "sonnet-4.5",
37
- "tasks": [
38
- {
39
- "name": "implement",
40
- "prompt": "..."
41
- }
42
- ]
43
- }
44
- ```
45
-
46
- ## Tips
47
-
48
- - Use the `ID` from the `cursorflow models` output in your JSON files.
49
- - You can set a default model in `cursorflow.config.js`.
50
- - Individual tasks within a lane can override the lane-level model.
51
-
@@ -1,90 +0,0 @@
1
- # CursorFlow Monitor
2
-
3
- ## Overview
4
- The `cursorflow monitor` command provides a powerful, interactive terminal-based dashboard to track the execution status of all lanes in real-time. It allows you to visualize dependencies, stream live terminal output, and intervene in running tasks.
5
-
6
- ## Usage
7
-
8
- ```bash
9
- # Monitor the most recent run
10
- cursorflow monitor
11
-
12
- # List all runs (Multiple Flows Dashboard)
13
- cursorflow monitor --list
14
-
15
- # Monitor a specific run directory
16
- cursorflow monitor run-2025-12-21T10-00-00
17
- ```
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
-
28
- ## Dashboard Controls
29
-
30
- ### List View (Main)
31
- - **Navigation**: Use `↑` and `↓` to move between lanes.
32
- - **Details**: Press `→` or `Enter` to enter the **Lane Detail View**.
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.
36
- - **Quit**: Press `Q` to exit.
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
-
45
- ### Lane Detail View
46
- - **History Browsing**: Use `↑` and `↓` to scroll through conversation history.
47
- - **Message Detail**: Press `→` or `Enter` on a message to see its full content.
48
- - **Live Terminal**: Press `T` to enter the **Full Terminal View**.
49
- - **Intervention**: Press `I` to send a manual prompt to the agent (requires `enableIntervention: true`).
50
- - **Kill Process**: Press `K` to forcefully terminate a stuck agent process.
51
- - **Back**: Press `←` or `Esc` to return to the List View.
52
-
53
- ### Full Terminal View
54
- - **Scrolling**: Use `↑` and `↓` to scroll through the entire agent output log.
55
- - **Back**: Press `T`, `←`, or `Esc` to return to the Lane Detail View.
56
-
57
- ### Intervention View
58
- - **Typing**: Type your message directly.
59
- - **Send**: Press `Enter` to send the intervention message.
60
- - **Cancel**: Press `Esc` to cancel and return.
61
-
62
- ## Key Concepts
63
-
64
- ### Lane Statuses
65
- | Status | Icon | Description |
66
- |--------|------|-------------|
67
- | `pending` | ⚪ | Lane is waiting to start |
68
- | `waiting` | ⏳ | Waiting for parent dependencies to complete |
69
- | `running` | 🔄 | Agent is currently executing tasks |
70
- | `reviewing` | 👀 | AI Reviewer is checking the task results |
71
- | `completed` | ✅ | All tasks and reviews finished successfully |
72
- | `failed` | ❌ | A task or review failed with an error |
73
- | `blocked` | 🚫 | Blocked by a failed dependency |
74
-
75
- ### Dependency Flow View
76
- A visual representation of the Directed Acyclic Graph (DAG). It shows which lanes must finish before others can start, helping you understand the execution pipeline.
77
-
78
- ### Heartbeat Logs
79
- CursorFlow monitors agent activity and logs status every few seconds. If a lane shows `0 bytes received` for a long period, it may be stuck or thinking deeply.
80
-
81
- ## Troubleshooting
82
-
83
- ### Lane is stuck
84
- 1. Enter the **Lane Detail View**.
85
- 2. Check the **PID** to ensure the process is still alive.
86
- 3. Check the **Live Terminal** preview or enter **Full Terminal View (T)**.
87
- 4. If it's truly stuck, press `K` to kill it, then use `cursorflow resume <lane>` to restart.
88
-
89
- ### Sending Instructions
90
- If the agent is heading in the wrong direction, use the **Intervention (I)** feature to guide it without stopping the run. Note that this requires `enableIntervention: true` in the task's JSON configuration.
@@ -1,87 +0,0 @@
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
-
@@ -1,205 +0,0 @@
1
- # CursorFlow Resume
2
-
3
- ## Overview
4
- Resume lanes that were interrupted or failed. CursorFlow allows you to continue from where the agent left off, restart from the first task, or resume all incomplete lanes at once.
5
-
6
- ## Usage
7
-
8
- ```bash
9
- cursorflow resume [lane-name] [options]
10
- cursorflow resume --status # Check status of all lanes
11
- cursorflow resume --all # Resume all incomplete lanes
12
- ```
13
-
14
- ## Options
15
-
16
- | Option | Description |
17
- |------|------|
18
- | `<lane-name>` | The name of the lane to resume (e.g., `lane-1`) |
19
- | `--status` | Show status of all lanes in the run (no resume) |
20
- | `--all` | Resume ALL incomplete/failed lanes automatically |
21
- | `--run-dir <path>` | Use a specific run directory (default: latest) |
22
- | `--max-concurrent <n>` | Max lanes to run in parallel when using `--all` (default: 3) |
23
- | `--restart` | Restart from the first task (index 0) |
24
- | `--clean` | Clean up the existing worktree before resuming |
25
- | `--skip-doctor` | Skip pre-resume checks (not recommended) |
26
-
27
- ## Checking Lane Status
28
-
29
- Before resuming, you can check the status of all lanes:
30
-
31
- ```bash
32
- cursorflow resume --status
33
- ```
34
-
35
- This displays a table showing:
36
- - Lane name
37
- - Current status (completed, failed, running, paused, etc.)
38
- - Progress (current task / total tasks)
39
- - Whether the lane needs to be resumed
40
-
41
- Example output:
42
- ```
43
- 📊 Lane Status (run-1703145600000)
44
-
45
- Lane Status Progress Needs Resume
46
- ------------------------------------------------------------
47
- 01-lane-auth completed 3/3
48
- 02-lane-api failed 1/3 ✓
49
- └─ Error: cursor-agent timed out...
50
- 03-lane-ui running 2/3 ✓
51
-
52
- Total: 3 | Completed: 1 | Needs Resume: 2
53
-
54
- Tip: Run cursorflow resume --all to resume all incomplete lanes
55
- ```
56
-
57
- ## Resuming All Incomplete Lanes
58
-
59
- The most common use case after interruption:
60
-
61
- ```bash
62
- # Check what needs to be resumed
63
- cursorflow resume --status
64
-
65
- # Resume all incomplete lanes
66
- cursorflow resume --all
67
-
68
- # Resume with custom concurrency
69
- cursorflow resume --all --max-concurrent 2
70
-
71
- # Restart all incomplete lanes from the beginning
72
- cursorflow resume --all --restart
73
- ```
74
-
75
- ## How it works
76
-
77
- ### Single Lane Resume
78
- 1. **Pre-flight Checks**: Runs doctor validation to check for branch conflicts and Git issues.
79
- 2. **State Loading**: Reads the `state.json` for the specified lane to find the last successful task.
80
- 3. **Environment Restore**: Verifies the Git worktree and branch for the lane.
81
- 4. **Execution**: Spawns a new runner that starts either from the current task index or from index 0 if `--restart` is used.
82
-
83
- ### Resume All (`--all`)
84
- 1. **Status Check**: Scans all lanes in the run directory.
85
- 2. **Filter**: Identifies lanes that need resuming (failed, paused, interrupted).
86
- 3. **Dependency Analysis**:
87
- - Checks each lane's `dependsOn` field
88
- - Skips lanes with unresolvable dependencies (deps not completed and not in resume list)
89
- - Orders execution so lanes wait for their dependencies to complete first
90
- 4. **Pre-flight Checks**: Runs doctor validation once for the entire run.
91
- 5. **Parallel Execution**: Spawns runners for multiple lanes with concurrency control.
92
- 6. **Dependency-Aware Scheduling**: Only starts a lane when all its dependencies have completed.
93
- 7. **Progress Tracking**: Reports success/failure/skipped for each lane.
94
-
95
- ## Pre-resume Validation
96
-
97
- Before resuming, CursorFlow automatically runs validation checks:
98
- - **Branch conflicts**: Ensures no existing branches conflict with the lane's prefix
99
- - **Git status**: Verifies repository state and remote connectivity
100
- - **Task configuration**: Validates the task JSON files are still valid
101
-
102
- To skip these checks (not recommended):
103
- ```bash
104
- cursorflow resume lane-1 --skip-doctor
105
- cursorflow resume --all --skip-doctor
106
- ```
107
-
108
- ## Examples
109
-
110
- ### Check status of all lanes
111
- ```bash
112
- cursorflow resume --status
113
- ```
114
-
115
- ### Resume all incomplete lanes
116
- ```bash
117
- cursorflow resume --all
118
- ```
119
-
120
- ### Resume a single failed lane
121
- ```bash
122
- cursorflow resume 01-lane-1
123
- ```
124
-
125
- ### Restart a lane from scratch
126
- ```bash
127
- cursorflow resume 02-lane-2 --restart
128
- ```
129
-
130
- ### Resume from an older run
131
- ```bash
132
- cursorflow resume --status --run-dir _cursorflow/logs/runs/run-123456789/
133
- cursorflow resume --all --run-dir _cursorflow/logs/runs/run-123456789/
134
- ```
135
-
136
- ### Resume with limited parallelism
137
- ```bash
138
- cursorflow resume --all --max-concurrent 1 # One at a time
139
- ```
140
-
141
- ## Dependency Handling
142
-
143
- When using `--all`, CursorFlow respects the `dependsOn` field in each lane's configuration:
144
-
145
- - **Automatic ordering**: Lanes will wait for their dependencies to complete before starting
146
- - **Skipped lanes**: If a lane depends on another that isn't completed and isn't in the resume queue, it will be skipped
147
- - **Parallel with deps**: Independent lanes run in parallel; dependent lanes wait
148
-
149
- Example status output with dependencies:
150
- ```
151
- 📊 Lane Status (run-1703145600000)
152
-
153
- Lane Status Progress DependsOn Resumable
154
- ---------------------------------------------------------------------------
155
- 01-lane-core completed 3/3 -
156
- 02-lane-api failed 1/3 01-lane-core ✓
157
- 03-lane-ui failed 0/3 02-lane-api ⏳ waiting
158
- └─ waiting for: 02-lane-api
159
-
160
- Total: 3 | Completed: 1 | Needs Resume: 2
161
-
162
- Tip: Run cursorflow resume --all to resume all incomplete lanes
163
- Lanes with dependencies will wait until their dependencies complete.
164
- ```
165
-
166
- In this example:
167
- - `01-lane-core` is already completed
168
- - `02-lane-api` can start immediately (its dependency `01-lane-core` is completed)
169
- - `03-lane-ui` will wait until `02-lane-api` completes
170
-
171
- ## Troubleshooting
172
-
173
- ### State not found
174
- If the command fails because the state is missing, ensure you are providing the correct lane name. Use `cursorflow resume --status` to see the names of the lanes in the latest run.
175
-
176
- ### Worktree issues
177
- If the worktree directory was manually deleted, use the `--clean` or `--restart` flag to allow CursorFlow to recreate the environment.
178
-
179
- ### Branch conflicts
180
- If resume fails due to branch conflicts:
181
-
182
- ```bash
183
- # Check what branches exist
184
- git branch --list "feature/*"
185
-
186
- # Clean up old CursorFlow branches
187
- cursorflow clean branches --dry-run
188
- cursorflow clean branches
189
-
190
- # Or manually delete specific branches
191
- git branch -D feature/lane-1-old-branch
192
- ```
193
-
194
- ### Changed branch prefix
195
- If the task JSON file's `branchPrefix` was changed after the initial run:
196
- 1. Either restore the original prefix in the JSON
197
- 2. Or use `--restart` to start fresh with the new prefix
198
- 3. Or manually clean up old branches with `cursorflow clean branches`
199
-
200
- ### Some lanes still failing after `--all`
201
- If some lanes continue to fail after using `--all`:
202
- 1. Check the specific error with `cursorflow resume --status`
203
- 2. Try resuming the problematic lane individually with more visibility
204
- 3. Use `cursorflow monitor` to watch the lane in real-time
205
- 4. Check the lane's terminal log in `_cursorflow/logs/runs/<run>/lanes/<lane>/`
@@ -1,52 +0,0 @@
1
- # CursorFlow Signal
2
-
3
- ## Overview
4
- Directly intervene in a running lane by sending a message to the agent. This is useful for providing immediate feedback or corrections during long-running tasks.
5
-
6
- ## Usage
7
-
8
- ```bash
9
- cursorflow signal <lane-name> "<message>" [options]
10
- cursorflow signal <lane-name> --timeout <ms>
11
- ```
12
-
13
- ## Options
14
-
15
- | Option | Description |
16
- |------|------|
17
- | `<lane-name>` | The name of the lane to signal |
18
- | `"<message>"` | The text message to send to the agent |
19
- | `--timeout <ms>` | Update the execution timeout (in milliseconds) |
20
- | `--run-dir <path>` | Use a specific run directory (default: latest) |
21
-
22
- ## How it works
23
- 1. **Logging**: Intervention messages are recorded in the lane's conversation history.
24
- 2. **Injection**: If `enableIntervention: true`, messages are injected into the agent's input stream.
25
- 3. **Dynamic Timeout**: If `--timeout` is used, the active runner receives a signal to reset its internal timer to the new value.
26
-
27
- ## Examples
28
-
29
- ```bash
30
- # Provide a hint to a running agent
31
- cursorflow signal 01-lane-1 "Make sure to export the new function from index.ts"
32
-
33
- # Increase timeout to 10 minutes mid-execution
34
- cursorflow signal 01-lane-1 --timeout 600000
35
- ```
36
-
37
- ## Dashboard Alternative
38
- You can also use the interactive monitor to send signals:
39
- 1. Run `cursorflow monitor latest`.
40
- 2. Select a lane and enter details (`→`).
41
- 3. Press `I` to send an intervention message.
42
- 4. Press `O` to update the execution timeout.
43
-
44
- ## Note on Intervention
45
- For the agent to receive the signal immediately, the task must be configured with:
46
- ```json
47
- {
48
- "enableIntervention": true,
49
- "tasks": [...]
50
- }
51
- ```
52
- If disabled, the signal will be logged but the agent will not be interrupted.
@@ -1,55 +0,0 @@
1
- # CursorFlow Stop
2
-
3
- ## Overview
4
- Stop running CursorFlow workflows or specific lanes by killing their associated processes.
5
-
6
- ## Usage
7
-
8
- ```bash
9
- cursorflow stop [run-id] [options]
10
- ```
11
-
12
- ## Options
13
-
14
- | Option | Description |
15
- |--------|-------------|
16
- | `[run-id]` | Stop a specific run |
17
- | `--lane <name>` | Stop only a specific lane |
18
- | `--force` | Use `SIGKILL` instead of `SIGTERM` (immediate termination) |
19
- | `--yes`, `-y` | Skip confirmation prompt |
20
- | `--help`, `-h` | Show help |
21
-
22
- ## Examples
23
-
24
- ### Stop all running workflows
25
- ```bash
26
- cursorflow stop
27
- ```
28
-
29
- ### Stop a specific run
30
- ```bash
31
- cursorflow stop run-20251222-153012
32
- ```
33
-
34
- ### Stop only one lane
35
- ```bash
36
- cursorflow stop --lane api-setup
37
- ```
38
-
39
- ### Force stop everything without confirmation
40
- ```bash
41
- cursorflow stop --force --yes
42
- ```
43
-
44
- ## Execution Flow
45
-
46
- 1. **Detection**: identifies active runs and their associated PIDs.
47
- 2. **Confirmation**: Unless `--yes` is used, it lists running workflows and asks for confirmation.
48
- 3. **Termination**: Sends termination signals to all active lane processes.
49
- 4. **Verification**: Displays which lanes were successfully stopped.
50
-
51
- ## Notes
52
-
53
- 1. **Signals**: By default, it sends `SIGTERM` to allow processes to clean up. Use `--force` for `SIGKILL` if a process is stuck.
54
- 2. **Persistence**: Stopping a run doesn't delete any logs or worktrees. You can resume later using `cursorflow resume`.
55
- 3. **PIDs**: The command relies on PIDs stored in the lane state files.