@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.
@@ -1,220 +1,220 @@
1
- # CursorFlow Review
2
-
3
- ## Overview
4
- 코드 리뷰 기능을 설정하고 리뷰 결과를 확인합니다. AI 기반 자동 리뷰로 코드 품질을 향상시킵니다.
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. **Acceptance Criteria 정의**
21
-
22
- 태스크 JSON 파일에 검증 기준 추가:
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
- - Acceptance Criteria 확인
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 Criteria 작성 가이드
136
-
137
- ### 좋은 예시
138
- ```json
139
- {
140
- "acceptanceCriteria": [
141
- "빌드 에러 없음 (pnpm build 성공)",
142
- "TypeScript 타입 에러 없음 (pnpm type-check)",
143
- "모든 기존 테스트 통과",
144
- " API 엔드포인트 3개 구현됨",
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
- - [ ] Acceptance Criteria가 명확한가?
189
- - [ ] 최대 반복 횟수가 적절한가?
190
- - [ ] 리뷰 결과를 확인했는가?
191
-
192
- ## 트러블슈팅
193
-
194
- ### 리뷰가 실행되지 않음
195
- 1. `enableReview: true` 확인
196
- 2. 리뷰 모델이 유효한지 확인
197
- 3. 로그에서 에러 확인
198
-
199
- ### 무한 리뷰 루프
200
- 1. `maxReviewIterations` 설정 확인
201
- 2. Acceptance Criteria가 달성 가능한지 검토
202
- 3. 태스크 프롬프트 개선
203
-
204
- ### 리뷰가 너무 엄격함
205
- 1. 리뷰 모델을 관대한 것으로 변경
206
- 2. Acceptance Criteria 조정
207
- 3. `maxReviewIterations` 증가
208
-
209
- ## 모범 사례
210
-
211
- 1. **명확한 기준**: Acceptance Criteria를 구체적으로 작성
212
- 2. **적절한 모델**: 작업 복잡도에 맞는 리뷰 모델 선택
213
- 3. **점진적 개선**: 반복에서 모든 것을 완벽하게 하려 하지 말기
214
- 4. **피드백 활용**: 리뷰 피드백을 다음 태스크 개선에 활용
215
-
216
- ## Next Steps
217
- 1. 리뷰 결과 분석
218
- 2. 반복되는 이슈 패턴 파악
219
- 3. 태스크 프롬프트 Criteria 개선
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 feedbackrework
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.