@litmers/cursorflow-orchestrator 0.1.0 → 0.1.1
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,220 +1,220 @@
|
|
|
1
|
-
# CursorFlow Review
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Steps
|
|
7
|
-
|
|
8
|
-
1.
|
|
9
|
-
|
|
10
|
-
`cursorflow.config.js
|
|
11
|
-
```javascript
|
|
12
|
-
module.exports = {
|
|
13
|
-
enableReview: true,
|
|
14
|
-
reviewModel: 'sonnet-4.5-thinking',
|
|
15
|
-
maxReviewIterations: 3,
|
|
16
|
-
// ...
|
|
17
|
-
};
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
2. **
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"tasks": [
|
|
26
|
-
{
|
|
27
|
-
"name": "implement",
|
|
28
|
-
"model": "sonnet-4.5",
|
|
29
|
-
"acceptanceCriteria": [
|
|
30
|
-
"
|
|
31
|
-
"TypeScript
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
],
|
|
35
|
-
"prompt": "..."
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
3.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
4.
|
|
46
|
-
```bash
|
|
47
|
-
#
|
|
48
|
-
cat _cursorflow/logs/runs/<lane>/review-results.json
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
##
|
|
52
|
-
|
|
53
|
-
|
|
|
54
|
-
|------|------|-----------|
|
|
55
|
-
| `sonnet-4.5-thinking` |
|
|
56
|
-
| `opus-4.5-thinking` |
|
|
57
|
-
| `sonnet-4.5` |
|
|
58
|
-
|
|
59
|
-
##
|
|
60
|
-
|
|
61
|
-
1.
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
2.
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
3.
|
|
71
|
-
- `approved`:
|
|
72
|
-
- `needs_changes`:
|
|
73
|
-
|
|
74
|
-
4.
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
##
|
|
80
|
-
|
|
81
|
-
```json
|
|
82
|
-
{
|
|
83
|
-
"status": "approved",
|
|
84
|
-
"buildSuccess": true,
|
|
85
|
-
"typeCheckSuccess": true,
|
|
86
|
-
"issues": [
|
|
87
|
-
{
|
|
88
|
-
"severity": "warning",
|
|
89
|
-
"description": "Consider adding error handling",
|
|
90
|
-
"file": "src/utils/api.js",
|
|
91
|
-
"line": 42,
|
|
92
|
-
"suggestion": "Add try-catch block"
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
"suggestions": [
|
|
96
|
-
"Add unit tests for edge cases",
|
|
97
|
-
"Improve error messages"
|
|
98
|
-
],
|
|
99
|
-
"summary": "Code quality is good, minor improvements suggested",
|
|
100
|
-
"reviewedBy": "sonnet-4.5-thinking",
|
|
101
|
-
"reviewedAt": "2025-12-19T18:30:00Z"
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
##
|
|
106
|
-
|
|
107
|
-
###
|
|
108
|
-
```javascript
|
|
109
|
-
// cursorflow.config.js
|
|
110
|
-
{
|
|
111
|
-
enableReview: true,
|
|
112
|
-
reviewModel: 'sonnet-4.5-thinking',
|
|
113
|
-
maxReviewIterations: 3
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
###
|
|
118
|
-
```javascript
|
|
119
|
-
{
|
|
120
|
-
enableReview: true,
|
|
121
|
-
reviewModel: 'opus-4.5-thinking',
|
|
122
|
-
maxReviewIterations: 5
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
###
|
|
127
|
-
```javascript
|
|
128
|
-
{
|
|
129
|
-
enableReview: true,
|
|
130
|
-
reviewModel: 'sonnet-4.5',
|
|
131
|
-
maxReviewIterations: 1
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## Acceptance
|
|
136
|
-
|
|
137
|
-
###
|
|
138
|
-
```json
|
|
139
|
-
{
|
|
140
|
-
"acceptanceCriteria": [
|
|
141
|
-
"
|
|
142
|
-
"TypeScript
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
]
|
|
148
|
-
}
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
###
|
|
152
|
-
```json
|
|
153
|
-
{
|
|
154
|
-
"acceptanceCriteria": [
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
##
|
|
162
|
-
|
|
163
|
-
###
|
|
164
|
-
```bash
|
|
165
|
-
#
|
|
166
|
-
#
|
|
167
|
-
cursorflow monitor
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
###
|
|
171
|
-
```bash
|
|
172
|
-
#
|
|
173
|
-
#
|
|
174
|
-
#
|
|
175
|
-
cat _cursorflow/logs/runs/<lane>/conversation.jsonl | \
|
|
176
|
-
jq 'select(.role=="reviewer")'
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
###
|
|
180
|
-
```bash
|
|
181
|
-
#
|
|
182
|
-
#
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
## Checklist
|
|
186
|
-
- [ ]
|
|
187
|
-
- [ ]
|
|
188
|
-
- [ ]
|
|
189
|
-
- [ ]
|
|
190
|
-
- [ ]
|
|
191
|
-
|
|
192
|
-
##
|
|
193
|
-
|
|
194
|
-
###
|
|
195
|
-
1. `enableReview: true
|
|
196
|
-
2.
|
|
197
|
-
3.
|
|
198
|
-
|
|
199
|
-
###
|
|
200
|
-
1. `maxReviewIterations`
|
|
201
|
-
2.
|
|
202
|
-
3.
|
|
203
|
-
|
|
204
|
-
###
|
|
205
|
-
1.
|
|
206
|
-
2.
|
|
207
|
-
3. `maxReviewIterations
|
|
208
|
-
|
|
209
|
-
##
|
|
210
|
-
|
|
211
|
-
1.
|
|
212
|
-
2.
|
|
213
|
-
3.
|
|
214
|
-
4.
|
|
215
|
-
|
|
216
|
-
## Next
|
|
217
|
-
1.
|
|
218
|
-
2.
|
|
219
|
-
3.
|
|
220
|
-
4.
|
|
1
|
+
# CursorFlow Review
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Configure the code review flow and inspect review results. Use AI-driven automatic reviews to improve code quality.
|
|
5
|
+
|
|
6
|
+
## Steps
|
|
7
|
+
|
|
8
|
+
1. **Enable reviews**
|
|
9
|
+
|
|
10
|
+
Configure `cursorflow.config.js`:
|
|
11
|
+
```javascript
|
|
12
|
+
module.exports = {
|
|
13
|
+
enableReview: true,
|
|
14
|
+
reviewModel: 'sonnet-4.5-thinking',
|
|
15
|
+
maxReviewIterations: 3,
|
|
16
|
+
// ...
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. **Define acceptance criteria**
|
|
21
|
+
|
|
22
|
+
Add validation criteria to the task JSON file:
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"tasks": [
|
|
26
|
+
{
|
|
27
|
+
"name": "implement",
|
|
28
|
+
"model": "sonnet-4.5",
|
|
29
|
+
"acceptanceCriteria": [
|
|
30
|
+
"No build errors",
|
|
31
|
+
"No TypeScript type errors",
|
|
32
|
+
"Key functionality implemented",
|
|
33
|
+
"Tests passing"
|
|
34
|
+
],
|
|
35
|
+
"prompt": "..."
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
3. **Run reviews**
|
|
42
|
+
|
|
43
|
+
Reviews start automatically after each task completes.
|
|
44
|
+
|
|
45
|
+
4. **Check review results**
|
|
46
|
+
```bash
|
|
47
|
+
# Inspect the review output
|
|
48
|
+
cat _cursorflow/logs/runs/<lane>/review-results.json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Review models
|
|
52
|
+
|
|
53
|
+
| Model | Characteristics | Recommended use |
|
|
54
|
+
|------|------|-----------|
|
|
55
|
+
| `sonnet-4.5-thinking` | Strong reasoning, precise analysis | General code reviews (recommended) |
|
|
56
|
+
| `opus-4.5-thinking` | Highest quality, detailed reviews | Critical code or architecture reviews |
|
|
57
|
+
| `sonnet-4.5` | Faster reviews | Simple changes |
|
|
58
|
+
|
|
59
|
+
## Review process
|
|
60
|
+
|
|
61
|
+
1. **Task completion**
|
|
62
|
+
- Finish implementation
|
|
63
|
+
- Create a commit
|
|
64
|
+
|
|
65
|
+
2. **Automatic review**
|
|
66
|
+
- Run the agent with the selected review model
|
|
67
|
+
- Verify acceptance criteria
|
|
68
|
+
- Validate build and types
|
|
69
|
+
|
|
70
|
+
3. **Review outcome**
|
|
71
|
+
- `approved`: proceed to the next task
|
|
72
|
+
- `needs_changes`: send feedback → rework
|
|
73
|
+
|
|
74
|
+
4. **Feedback loop**
|
|
75
|
+
- Apply fixes
|
|
76
|
+
- Re-run the review
|
|
77
|
+
- Repeat until the maximum iteration count
|
|
78
|
+
|
|
79
|
+
## Review result format
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"status": "approved",
|
|
84
|
+
"buildSuccess": true,
|
|
85
|
+
"typeCheckSuccess": true,
|
|
86
|
+
"issues": [
|
|
87
|
+
{
|
|
88
|
+
"severity": "warning",
|
|
89
|
+
"description": "Consider adding error handling",
|
|
90
|
+
"file": "src/utils/api.js",
|
|
91
|
+
"line": 42,
|
|
92
|
+
"suggestion": "Add try-catch block"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"suggestions": [
|
|
96
|
+
"Add unit tests for edge cases",
|
|
97
|
+
"Improve error messages"
|
|
98
|
+
],
|
|
99
|
+
"summary": "Code quality is good, minor improvements suggested",
|
|
100
|
+
"reviewedBy": "sonnet-4.5-thinking",
|
|
101
|
+
"reviewedAt": "2025-12-19T18:30:00Z"
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Examples
|
|
106
|
+
|
|
107
|
+
### Standard review settings
|
|
108
|
+
```javascript
|
|
109
|
+
// cursorflow.config.js
|
|
110
|
+
{
|
|
111
|
+
enableReview: true,
|
|
112
|
+
reviewModel: 'sonnet-4.5-thinking',
|
|
113
|
+
maxReviewIterations: 3
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Strict reviews
|
|
118
|
+
```javascript
|
|
119
|
+
{
|
|
120
|
+
enableReview: true,
|
|
121
|
+
reviewModel: 'opus-4.5-thinking',
|
|
122
|
+
maxReviewIterations: 5
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Fast reviews
|
|
127
|
+
```javascript
|
|
128
|
+
{
|
|
129
|
+
enableReview: true,
|
|
130
|
+
reviewModel: 'sonnet-4.5',
|
|
131
|
+
maxReviewIterations: 1
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Acceptance criteria writing guide
|
|
136
|
+
|
|
137
|
+
### Good examples
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"acceptanceCriteria": [
|
|
141
|
+
"No build errors (pnpm build succeeds)",
|
|
142
|
+
"No TypeScript type errors (pnpm type-check)",
|
|
143
|
+
"All existing tests pass",
|
|
144
|
+
"Three new API endpoints implemented",
|
|
145
|
+
"Error handling logic included",
|
|
146
|
+
"Logging added"
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Poor examples
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"acceptanceCriteria": [
|
|
155
|
+
"Works well",
|
|
156
|
+
"Code looks good"
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Analyzing review results
|
|
162
|
+
|
|
163
|
+
### When approved
|
|
164
|
+
```bash
|
|
165
|
+
# The next task proceeds automatically
|
|
166
|
+
# Confirm in the logs
|
|
167
|
+
cursorflow monitor
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### When changes are needed
|
|
171
|
+
```bash
|
|
172
|
+
# Feedback is passed back to the agent
|
|
173
|
+
# After rework, the review re-runs automatically
|
|
174
|
+
# View feedback in the logs
|
|
175
|
+
cat _cursorflow/logs/runs/<lane>/conversation.jsonl | \
|
|
176
|
+
jq 'select(.role=="reviewer")'
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### When the max iterations are hit
|
|
180
|
+
```bash
|
|
181
|
+
# Continue with a warning
|
|
182
|
+
# Manual review is required
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Checklist
|
|
186
|
+
- [ ] Is review enabled?
|
|
187
|
+
- [ ] Is the review model appropriate?
|
|
188
|
+
- [ ] Are the acceptance criteria clear?
|
|
189
|
+
- [ ] Is the max iteration count reasonable?
|
|
190
|
+
- [ ] Have you inspected the review results?
|
|
191
|
+
|
|
192
|
+
## Troubleshooting
|
|
193
|
+
|
|
194
|
+
### Reviews are not running
|
|
195
|
+
1. Confirm `enableReview: true`.
|
|
196
|
+
2. Verify the review model name is valid.
|
|
197
|
+
3. Check logs for errors.
|
|
198
|
+
|
|
199
|
+
### Infinite review loop
|
|
200
|
+
1. Check the `maxReviewIterations` setting.
|
|
201
|
+
2. Ensure the acceptance criteria are achievable.
|
|
202
|
+
3. Improve the task prompts.
|
|
203
|
+
|
|
204
|
+
### Reviews are too strict
|
|
205
|
+
1. Switch to a more lenient review model.
|
|
206
|
+
2. Adjust the acceptance criteria.
|
|
207
|
+
3. Increase `maxReviewIterations`.
|
|
208
|
+
|
|
209
|
+
## Best practices
|
|
210
|
+
|
|
211
|
+
1. **Clear criteria**: Write specific acceptance criteria.
|
|
212
|
+
2. **Right model**: Choose a review model that matches task complexity.
|
|
213
|
+
3. **Iterative improvement**: Don’t aim for perfection on the first pass.
|
|
214
|
+
4. **Use feedback**: Apply review feedback to strengthen future tasks.
|
|
215
|
+
|
|
216
|
+
## Next steps
|
|
217
|
+
1. Analyze review results.
|
|
218
|
+
2. Identify recurring issue patterns.
|
|
219
|
+
3. Refine task prompts and acceptance criteria.
|
|
220
|
+
4. Tune the review model as needed.
|