@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,162 +1,162 @@
|
|
|
1
|
-
# CursorFlow Clean
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Steps
|
|
7
|
-
|
|
8
|
-
1.
|
|
9
|
-
|
|
10
|
-
|
|
|
11
|
-
|------|------|
|
|
12
|
-
| `branches` | Git
|
|
13
|
-
| `worktrees` | Git
|
|
14
|
-
| `logs` |
|
|
15
|
-
| `all` |
|
|
16
|
-
|
|
17
|
-
2.
|
|
18
|
-
```bash
|
|
19
|
-
cursorflow clean branches --pattern "feature/my-*"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
3.
|
|
23
|
-
```bash
|
|
24
|
-
cursorflow clean worktrees --all
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
4.
|
|
28
|
-
```bash
|
|
29
|
-
cursorflow clean logs --older-than 30
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
5. **
|
|
33
|
-
```bash
|
|
34
|
-
cursorflow clean all --dry-run
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
##
|
|
38
|
-
|
|
39
|
-
|
|
|
40
|
-
|------|------|
|
|
41
|
-
| `--pattern <pattern>` |
|
|
42
|
-
| `--older-than <days>` |
|
|
43
|
-
| `--dry-run` |
|
|
44
|
-
| `--force` |
|
|
45
|
-
| `--local-only` |
|
|
46
|
-
| `--remote-only` |
|
|
47
|
-
|
|
48
|
-
##
|
|
49
|
-
|
|
50
|
-
###
|
|
51
|
-
|
|
52
|
-
####
|
|
53
|
-
```bash
|
|
54
|
-
cursorflow clean branches --pattern "feature/dashboard-*"
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
####
|
|
58
|
-
```bash
|
|
59
|
-
cursorflow clean branches --pattern "feature/*" --dry-run
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
####
|
|
63
|
-
```bash
|
|
64
|
-
cursorflow clean branches --pattern "feature/*" --local-only
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
###
|
|
68
|
-
|
|
69
|
-
####
|
|
70
|
-
```bash
|
|
71
|
-
cursorflow clean worktrees --all
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
####
|
|
75
|
-
```bash
|
|
76
|
-
cursorflow clean worktrees --pattern "*-dashboard-*"
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
###
|
|
80
|
-
|
|
81
|
-
####
|
|
82
|
-
```bash
|
|
83
|
-
cursorflow clean logs --older-than 30
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
####
|
|
87
|
-
```bash
|
|
88
|
-
cursorflow clean logs --all --force
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
###
|
|
92
|
-
|
|
93
|
-
####
|
|
94
|
-
```bash
|
|
95
|
-
cursorflow clean all --dry-run
|
|
96
|
-
cursorflow clean all --force
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
##
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
🧹 Cleaning CursorFlow Resources
|
|
103
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
104
|
-
|
|
105
|
-
Branches to delete:
|
|
106
|
-
- feature/dashboard-pipeline-abc123 (local)
|
|
107
|
-
- feature/dashboard-pipeline-abc123 (remote)
|
|
108
|
-
- feature/client-pipeline-def456 (local)
|
|
109
|
-
|
|
110
|
-
Worktrees to remove:
|
|
111
|
-
- .cursorflow/logs/worktrees/01-dashboard-pipeline-abc123
|
|
112
|
-
- .cursorflow/logs/worktrees/02-client-pipeline-def456
|
|
113
|
-
|
|
114
|
-
Logs to delete:
|
|
115
|
-
- _cursorflow/logs/runs/01-dashboard-2025-12-10T10-00-00 (9 days old)
|
|
116
|
-
|
|
117
|
-
Total: 5 branches, 2 worktrees, 1 log directory
|
|
118
|
-
|
|
119
|
-
Proceed? [y/N]
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
##
|
|
123
|
-
|
|
124
|
-
1.
|
|
125
|
-
2.
|
|
126
|
-
3.
|
|
127
|
-
4.
|
|
128
|
-
|
|
129
|
-
## Checklist
|
|
130
|
-
- [ ]
|
|
131
|
-
- [ ]
|
|
132
|
-
- [ ] dry
|
|
133
|
-
- [ ]
|
|
134
|
-
- [ ]
|
|
135
|
-
|
|
136
|
-
##
|
|
137
|
-
|
|
138
|
-
###
|
|
139
|
-
```bash
|
|
140
|
-
#
|
|
141
|
-
git branch -D <branch-name>
|
|
142
|
-
git push origin --delete <branch-name>
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
###
|
|
146
|
-
```bash
|
|
147
|
-
#
|
|
148
|
-
git worktree remove --force <worktree-path>
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
###
|
|
152
|
-
```bash
|
|
153
|
-
#
|
|
154
|
-
ls -la _cursorflow/logs/
|
|
155
|
-
#
|
|
156
|
-
chmod -R u+w _cursorflow/logs/
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## Next
|
|
160
|
-
1.
|
|
161
|
-
2.
|
|
162
|
-
3.
|
|
1
|
+
# CursorFlow Clean
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Clean up branches, worktrees, and logs. Remove stale files or remnants from failed runs.
|
|
5
|
+
|
|
6
|
+
## Steps
|
|
7
|
+
|
|
8
|
+
1. **Choose what to clean**
|
|
9
|
+
|
|
10
|
+
| Type | Description |
|
|
11
|
+
|------|------|
|
|
12
|
+
| `branches` | Clean Git branches |
|
|
13
|
+
| `worktrees` | Clean Git worktrees |
|
|
14
|
+
| `logs` | Clean log files |
|
|
15
|
+
| `all` | Clean everything |
|
|
16
|
+
|
|
17
|
+
2. **Clean branches**
|
|
18
|
+
```bash
|
|
19
|
+
cursorflow clean branches --pattern "feature/my-*"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
3. **Clean worktrees**
|
|
23
|
+
```bash
|
|
24
|
+
cursorflow clean worktrees --all
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
4. **Clean logs**
|
|
28
|
+
```bash
|
|
29
|
+
cursorflow clean logs --older-than 30
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
5. **Verify with a dry run**
|
|
33
|
+
```bash
|
|
34
|
+
cursorflow clean all --dry-run
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Options
|
|
38
|
+
|
|
39
|
+
| Option | Description |
|
|
40
|
+
|------|------|
|
|
41
|
+
| `--pattern <pattern>` | Pattern match (e.g., "feature/*") |
|
|
42
|
+
| `--older-than <days>` | Items older than N days (for logs) |
|
|
43
|
+
| `--dry-run` | Show items to delete without removing |
|
|
44
|
+
| `--force` | Delete without confirmation |
|
|
45
|
+
| `--local-only` | Local only (branches) |
|
|
46
|
+
| `--remote-only` | Remote only (branches) |
|
|
47
|
+
|
|
48
|
+
## Examples
|
|
49
|
+
|
|
50
|
+
### Branch cleanup
|
|
51
|
+
|
|
52
|
+
#### Delete by pattern
|
|
53
|
+
```bash
|
|
54
|
+
cursorflow clean branches --pattern "feature/dashboard-*"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### All CursorFlow branches
|
|
58
|
+
```bash
|
|
59
|
+
cursorflow clean branches --pattern "feature/*" --dry-run
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### Local branches only
|
|
63
|
+
```bash
|
|
64
|
+
cursorflow clean branches --pattern "feature/*" --local-only
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Worktree cleanup
|
|
68
|
+
|
|
69
|
+
#### All worktrees
|
|
70
|
+
```bash
|
|
71
|
+
cursorflow clean worktrees --all
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
#### Specific pattern
|
|
75
|
+
```bash
|
|
76
|
+
cursorflow clean worktrees --pattern "*-dashboard-*"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Log cleanup
|
|
80
|
+
|
|
81
|
+
#### Logs older than 30 days
|
|
82
|
+
```bash
|
|
83
|
+
cursorflow clean logs --older-than 30
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
#### All logs
|
|
87
|
+
```bash
|
|
88
|
+
cursorflow clean logs --all --force
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Full cleanup
|
|
92
|
+
|
|
93
|
+
#### Review then delete
|
|
94
|
+
```bash
|
|
95
|
+
cursorflow clean all --dry-run
|
|
96
|
+
cursorflow clean all --force
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Sample output
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
🧹 Cleaning CursorFlow Resources
|
|
103
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
104
|
+
|
|
105
|
+
Branches to delete:
|
|
106
|
+
- feature/dashboard-pipeline-abc123 (local)
|
|
107
|
+
- feature/dashboard-pipeline-abc123 (remote)
|
|
108
|
+
- feature/client-pipeline-def456 (local)
|
|
109
|
+
|
|
110
|
+
Worktrees to remove:
|
|
111
|
+
- .cursorflow/logs/worktrees/01-dashboard-pipeline-abc123
|
|
112
|
+
- .cursorflow/logs/worktrees/02-client-pipeline-def456
|
|
113
|
+
|
|
114
|
+
Logs to delete:
|
|
115
|
+
- _cursorflow/logs/runs/01-dashboard-2025-12-10T10-00-00 (9 days old)
|
|
116
|
+
|
|
117
|
+
Total: 5 branches, 2 worktrees, 1 log directory
|
|
118
|
+
|
|
119
|
+
Proceed? [y/N]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Notes
|
|
123
|
+
|
|
124
|
+
1. **Back up**: Save important branches before deleting.
|
|
125
|
+
2. **Confirm**: Start with `--dry-run` to review changes.
|
|
126
|
+
3. **Remote caution**: Be careful when deleting remote branches.
|
|
127
|
+
4. **Irreversible**: Deleted items are hard to recover.
|
|
128
|
+
|
|
129
|
+
## Checklist
|
|
130
|
+
- [ ] Have you reviewed items to clean?
|
|
131
|
+
- [ ] Do you need backups?
|
|
132
|
+
- [ ] Did you run a dry run first?
|
|
133
|
+
- [ ] Are other teammates using these branches?
|
|
134
|
+
- [ ] Do you also need to delete from the remote?
|
|
135
|
+
|
|
136
|
+
## Troubleshooting
|
|
137
|
+
|
|
138
|
+
### Branch deletion failed
|
|
139
|
+
```bash
|
|
140
|
+
# Force delete
|
|
141
|
+
git branch -D <branch-name>
|
|
142
|
+
git push origin --delete <branch-name>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Worktree removal failed
|
|
146
|
+
```bash
|
|
147
|
+
# Force remove
|
|
148
|
+
git worktree remove --force <worktree-path>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Log directory permission issues
|
|
152
|
+
```bash
|
|
153
|
+
# Check permissions
|
|
154
|
+
ls -la _cursorflow/logs/
|
|
155
|
+
# Fix permissions
|
|
156
|
+
chmod -R u+w _cursorflow/logs/
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Next steps
|
|
160
|
+
1. Clean logs regularly (e.g., monthly).
|
|
161
|
+
2. Add an automated cleanup script to CI/CD.
|
|
162
|
+
3. Add log directories to `.gitignore`.
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
# CursorFlow Init
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Steps
|
|
7
|
-
|
|
8
|
-
1.
|
|
9
|
-
```bash
|
|
10
|
-
cursorflow init
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
2.
|
|
14
|
-
- `--example`:
|
|
15
|
-
- `--config-only`:
|
|
16
|
-
- `--no-commands`:
|
|
17
|
-
- `--force`:
|
|
18
|
-
|
|
19
|
-
3.
|
|
20
|
-
- `cursorflow.config.js`
|
|
21
|
-
- `_cursorflow/tasks/`
|
|
22
|
-
- `_cursorflow/logs/`
|
|
23
|
-
- `.cursor/commands/cursorflow/`
|
|
24
|
-
|
|
25
|
-
4.
|
|
26
|
-
```javascript
|
|
27
|
-
// cursorflow.config.js
|
|
28
|
-
module.exports = {
|
|
29
|
-
tasksDir: '_cursorflow/tasks',
|
|
30
|
-
logsDir: '_cursorflow/logs',
|
|
31
|
-
baseBranch: 'main',
|
|
32
|
-
// ...
|
|
33
|
-
};
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
###
|
|
39
|
-
```bash
|
|
40
|
-
cursorflow init
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
###
|
|
44
|
-
```bash
|
|
45
|
-
cursorflow init --example
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
###
|
|
49
|
-
```bash
|
|
50
|
-
cursorflow init --config-only
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
###
|
|
54
|
-
```bash
|
|
55
|
-
cursorflow init --force
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Checklist
|
|
59
|
-
- [ ]
|
|
60
|
-
- [ ]
|
|
61
|
-
- [ ] Cursor
|
|
62
|
-
- [ ]
|
|
63
|
-
|
|
64
|
-
## Next
|
|
65
|
-
1. `cursorflow.config.js`
|
|
66
|
-
2. Cursor IDE
|
|
67
|
-
3. `cursorflow prepare MyFeature
|
|
1
|
+
# CursorFlow Init
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Initialize CursorFlow in your project. Create the config file and directory structure, and optionally install Cursor commands and example tasks.
|
|
5
|
+
|
|
6
|
+
## Steps
|
|
7
|
+
|
|
8
|
+
1. **Run initialization**
|
|
9
|
+
```bash
|
|
10
|
+
cursorflow init
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
2. **Choose options**
|
|
14
|
+
- `--example`: create example tasks
|
|
15
|
+
- `--config-only`: create only the config file
|
|
16
|
+
- `--no-commands`: skip installing Cursor commands
|
|
17
|
+
- `--force`: overwrite existing files
|
|
18
|
+
|
|
19
|
+
3. **Verify created files**
|
|
20
|
+
- `cursorflow.config.js` created
|
|
21
|
+
- `_cursorflow/tasks/` directory created
|
|
22
|
+
- `_cursorflow/logs/` directory created
|
|
23
|
+
- `.cursor/commands/cursorflow/` commands installed (optional)
|
|
24
|
+
|
|
25
|
+
4. **Review the config file**
|
|
26
|
+
```javascript
|
|
27
|
+
// cursorflow.config.js
|
|
28
|
+
module.exports = {
|
|
29
|
+
tasksDir: '_cursorflow/tasks',
|
|
30
|
+
logsDir: '_cursorflow/logs',
|
|
31
|
+
baseBranch: 'main',
|
|
32
|
+
// ... other settings
|
|
33
|
+
};
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
### Basic initialization
|
|
39
|
+
```bash
|
|
40
|
+
cursorflow init
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Include example tasks
|
|
44
|
+
```bash
|
|
45
|
+
cursorflow init --example
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Generate only the config
|
|
49
|
+
```bash
|
|
50
|
+
cursorflow init --config-only
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Overwrite existing files
|
|
54
|
+
```bash
|
|
55
|
+
cursorflow init --force
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Checklist
|
|
59
|
+
- [ ] Was the config file created at the project root?
|
|
60
|
+
- [ ] Were the required directories created?
|
|
61
|
+
- [ ] Were Cursor commands installed?
|
|
62
|
+
- [ ] Is the configuration adjusted for the project?
|
|
63
|
+
|
|
64
|
+
## Next steps
|
|
65
|
+
1. Update `cursorflow.config.js` for your project.
|
|
66
|
+
2. In Cursor IDE, type `/` to confirm the commands are available.
|
|
67
|
+
3. Start generating tasks with `cursorflow prepare MyFeature`.
|