@litmers/cursorflow-orchestrator 0.1.0 → 0.1.2
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/README.md +375 -310
- package/commands/cursorflow-clean.md +162 -162
- package/commands/cursorflow-init.md +67 -67
- package/commands/cursorflow-monitor.md +131 -131
- package/commands/cursorflow-prepare.md +134 -134
- package/commands/cursorflow-resume.md +181 -181
- package/commands/cursorflow-review.md +220 -220
- package/commands/cursorflow-run.md +129 -129
- package/package.json +13 -4
- package/scripts/ai-security-check.js +224 -0
- package/scripts/release.sh +109 -0
- package/scripts/setup-security.sh +105 -0
- package/src/cli/init.js +69 -4
- package/src/cli/monitor.js +196 -9
- package/src/core/runner.js +187 -9
- package/src/utils/config.js +2 -2
- package/src/utils/cursor-agent.js +96 -0
|
@@ -1,181 +1,181 @@
|
|
|
1
|
-
# CursorFlow Resume
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Steps
|
|
7
|
-
|
|
8
|
-
1.
|
|
9
|
-
```bash
|
|
10
|
-
cursorflow monitor
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
2.
|
|
14
|
-
```bash
|
|
15
|
-
cursorflow resume <lane-name>
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
3.
|
|
19
|
-
```bash
|
|
20
|
-
cursorflow resume <lane-name> --clean
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
4.
|
|
24
|
-
```bash
|
|
25
|
-
cursorflow resume <lane-name> --restart
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
##
|
|
29
|
-
|
|
30
|
-
|
|
|
31
|
-
|------|------|
|
|
32
|
-
| `--run-dir <path>` |
|
|
33
|
-
| `--clean` |
|
|
34
|
-
| `--restart` |
|
|
35
|
-
| `--force` |
|
|
36
|
-
|
|
37
|
-
##
|
|
38
|
-
|
|
39
|
-
###
|
|
40
|
-
```bash
|
|
41
|
-
#
|
|
42
|
-
cursorflow resume 01-dashboard
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
###
|
|
46
|
-
```bash
|
|
47
|
-
cursorflow resume --run-dir _cursorflow/logs/runs/my-run/ 01-dashboard
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
###
|
|
51
|
-
```bash
|
|
52
|
-
#
|
|
53
|
-
cursorflow resume 01-dashboard --clean
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
###
|
|
57
|
-
```bash
|
|
58
|
-
#
|
|
59
|
-
cursorflow resume 01-dashboard --restart
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
##
|
|
63
|
-
|
|
64
|
-
1.
|
|
65
|
-
- `state.json`
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
2.
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
3.
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
|
|
78
|
-
4.
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
##
|
|
83
|
-
|
|
84
|
-
```json
|
|
85
|
-
{
|
|
86
|
-
"label": "01-dashboard",
|
|
87
|
-
"status": "failed",
|
|
88
|
-
"currentTaskIndex": 1,
|
|
89
|
-
"totalTasks": 3,
|
|
90
|
-
"worktreeDir": ".cursorflow/logs/worktrees/01-dashboard-abc123",
|
|
91
|
-
"pipelineBranch": "feature/dashboard-abc123",
|
|
92
|
-
"error": "Build failed",
|
|
93
|
-
"startTime": 1734567890000,
|
|
94
|
-
"endTime": null
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## Checklist
|
|
99
|
-
- [ ]
|
|
100
|
-
- [ ]
|
|
101
|
-
- [ ]
|
|
102
|
-
- [ ]
|
|
103
|
-
- [ ]
|
|
104
|
-
|
|
105
|
-
##
|
|
106
|
-
|
|
107
|
-
###
|
|
108
|
-
```bash
|
|
109
|
-
#
|
|
110
|
-
ls -lt _cursorflow/logs/runs/
|
|
111
|
-
|
|
112
|
-
#
|
|
113
|
-
cursorflow resume --run-dir _cursorflow/logs/runs/latest/ 01-dashboard
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
###
|
|
117
|
-
```bash
|
|
118
|
-
#
|
|
119
|
-
git branch | grep dashboard
|
|
120
|
-
|
|
121
|
-
#
|
|
122
|
-
cursorflow resume 01-dashboard --clean
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Worktree
|
|
126
|
-
```bash
|
|
127
|
-
#
|
|
128
|
-
git worktree list
|
|
129
|
-
|
|
130
|
-
#
|
|
131
|
-
git worktree remove <path> --force
|
|
132
|
-
|
|
133
|
-
#
|
|
134
|
-
cursorflow resume 01-dashboard --restart
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
###
|
|
138
|
-
```bash
|
|
139
|
-
#
|
|
140
|
-
cursorflow monitor
|
|
141
|
-
|
|
142
|
-
#
|
|
143
|
-
cursorflow resume 01-dashboard
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
##
|
|
147
|
-
|
|
148
|
-
###
|
|
149
|
-
```bash
|
|
150
|
-
#
|
|
151
|
-
cursorflow resume 01-dashboard
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
###
|
|
155
|
-
```bash
|
|
156
|
-
#
|
|
157
|
-
cd .cursorflow/logs/worktrees/01-dashboard-xxx/
|
|
158
|
-
# ...
|
|
159
|
-
git add -A
|
|
160
|
-
git commit -m "fix: build error"
|
|
161
|
-
|
|
162
|
-
#
|
|
163
|
-
cursorflow resume 01-dashboard
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
###
|
|
167
|
-
```bash
|
|
168
|
-
#
|
|
169
|
-
cursorflow resume 01-dashboard --clean
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
###
|
|
173
|
-
```bash
|
|
174
|
-
#
|
|
175
|
-
cursorflow resume 01-dashboard --restart
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
## Next
|
|
179
|
-
1.
|
|
180
|
-
2.
|
|
181
|
-
3.
|
|
1
|
+
# CursorFlow Resume
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Resume lanes that were interrupted or failed. You can restore the previous state or restart from scratch.
|
|
5
|
+
|
|
6
|
+
## Steps
|
|
7
|
+
|
|
8
|
+
1. **Check lane status**
|
|
9
|
+
```bash
|
|
10
|
+
cursorflow monitor
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
2. **Resume a lane**
|
|
14
|
+
```bash
|
|
15
|
+
cursorflow resume <lane-name>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
3. **Clean branches before resuming**
|
|
19
|
+
```bash
|
|
20
|
+
cursorflow resume <lane-name> --clean
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
4. **Restart from the beginning**
|
|
24
|
+
```bash
|
|
25
|
+
cursorflow resume <lane-name> --restart
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Options
|
|
29
|
+
|
|
30
|
+
| Option | Description |
|
|
31
|
+
|------|------|
|
|
32
|
+
| `--run-dir <path>` | Use a specific run directory |
|
|
33
|
+
| `--clean` | Clean branches before restarting |
|
|
34
|
+
| `--restart` | Start over from the beginning |
|
|
35
|
+
| `--force` | Continue without confirmation |
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
### Resume the latest run
|
|
40
|
+
```bash
|
|
41
|
+
# Resume the lane from the latest run
|
|
42
|
+
cursorflow resume 01-dashboard
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Resume from a specific run
|
|
46
|
+
```bash
|
|
47
|
+
cursorflow resume --run-dir _cursorflow/logs/runs/my-run/ 01-dashboard
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Resolve branch conflicts then resume
|
|
51
|
+
```bash
|
|
52
|
+
# Clean up existing branches before restarting
|
|
53
|
+
cursorflow resume 01-dashboard --clean
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Start completely fresh
|
|
57
|
+
```bash
|
|
58
|
+
# Reset all state before restarting
|
|
59
|
+
cursorflow resume 01-dashboard --restart
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Resume process
|
|
63
|
+
|
|
64
|
+
1. **Check state**
|
|
65
|
+
- Load `state.json`
|
|
66
|
+
- Locate the last task index
|
|
67
|
+
- Inspect the worktree state
|
|
68
|
+
|
|
69
|
+
2. **Restore the environment**
|
|
70
|
+
- Verify worktree accessibility
|
|
71
|
+
- Check out the branch
|
|
72
|
+
- Check for uncommitted changes
|
|
73
|
+
|
|
74
|
+
3. **Resume execution**
|
|
75
|
+
- Continue from the interrupted task
|
|
76
|
+
- Or restart from the beginning (`--restart`)
|
|
77
|
+
|
|
78
|
+
4. **Complete**
|
|
79
|
+
- Finish remaining tasks
|
|
80
|
+
- Commit and push changes
|
|
81
|
+
|
|
82
|
+
## Sample state file
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"label": "01-dashboard",
|
|
87
|
+
"status": "failed",
|
|
88
|
+
"currentTaskIndex": 1,
|
|
89
|
+
"totalTasks": 3,
|
|
90
|
+
"worktreeDir": ".cursorflow/logs/worktrees/01-dashboard-abc123",
|
|
91
|
+
"pipelineBranch": "feature/dashboard-abc123",
|
|
92
|
+
"error": "Build failed",
|
|
93
|
+
"startTime": 1734567890000,
|
|
94
|
+
"endTime": null
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Checklist
|
|
99
|
+
- [ ] Was the lane actually interrupted?
|
|
100
|
+
- [ ] Does the state file exist?
|
|
101
|
+
- [ ] Are there any branch conflicts?
|
|
102
|
+
- [ ] Does the worktree still exist?
|
|
103
|
+
- [ ] Are there uncommitted changes?
|
|
104
|
+
|
|
105
|
+
## Troubleshooting
|
|
106
|
+
|
|
107
|
+
### State file missing
|
|
108
|
+
```bash
|
|
109
|
+
# Check the latest run directory
|
|
110
|
+
ls -lt _cursorflow/logs/runs/
|
|
111
|
+
|
|
112
|
+
# Specify a run explicitly
|
|
113
|
+
cursorflow resume --run-dir _cursorflow/logs/runs/latest/ 01-dashboard
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Branch conflicts
|
|
117
|
+
```bash
|
|
118
|
+
# Inspect existing branches
|
|
119
|
+
git branch | grep dashboard
|
|
120
|
+
|
|
121
|
+
# Clean up and resume
|
|
122
|
+
cursorflow resume 01-dashboard --clean
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Worktree issues
|
|
126
|
+
```bash
|
|
127
|
+
# List worktrees
|
|
128
|
+
git worktree list
|
|
129
|
+
|
|
130
|
+
# Remove problematic worktree
|
|
131
|
+
git worktree remove <path> --force
|
|
132
|
+
|
|
133
|
+
# Resume
|
|
134
|
+
cursorflow resume 01-dashboard --restart
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Dependency blocks
|
|
138
|
+
```bash
|
|
139
|
+
# Verify dependencies are resolved
|
|
140
|
+
cursorflow monitor
|
|
141
|
+
|
|
142
|
+
# Resume after resolving
|
|
143
|
+
cursorflow resume 01-dashboard
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Resume scenarios
|
|
147
|
+
|
|
148
|
+
### Scenario 1: Interrupted by network errors
|
|
149
|
+
```bash
|
|
150
|
+
# Simply resume from the same position
|
|
151
|
+
cursorflow resume 01-dashboard
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Scenario 2: Failed due to build errors
|
|
155
|
+
```bash
|
|
156
|
+
# After fixing code
|
|
157
|
+
cd .cursorflow/logs/worktrees/01-dashboard-xxx/
|
|
158
|
+
# ... apply fixes ...
|
|
159
|
+
git add -A
|
|
160
|
+
git commit -m "fix: build error"
|
|
161
|
+
|
|
162
|
+
# Continue from the next task
|
|
163
|
+
cursorflow resume 01-dashboard
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Scenario 3: Branch conflicts
|
|
167
|
+
```bash
|
|
168
|
+
# Clean branches then restart
|
|
169
|
+
cursorflow resume 01-dashboard --clean
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Scenario 4: Start over
|
|
173
|
+
```bash
|
|
174
|
+
# Reset all state
|
|
175
|
+
cursorflow resume 01-dashboard --restart
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Next steps
|
|
179
|
+
1. After resuming, monitor with `cursorflow monitor --watch`.
|
|
180
|
+
2. Check the PR when the run finishes.
|
|
181
|
+
3. If failures repeat, review the task configuration.
|