forge-workflow 0.0.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/.claude/commands/dev.md +314 -0
- package/.claude/commands/plan.md +389 -0
- package/.claude/commands/premerge.md +179 -0
- package/.claude/commands/research.md +42 -0
- package/.claude/commands/review.md +442 -0
- package/.claude/commands/rollback.md +721 -0
- package/.claude/commands/ship.md +134 -0
- package/.claude/commands/sonarcloud.md +152 -0
- package/.claude/commands/status.md +77 -0
- package/.claude/commands/validate.md +237 -0
- package/.claude/commands/verify.md +221 -0
- package/.claude/rules/greptile-review-process.md +285 -0
- package/.claude/rules/workflow.md +105 -0
- package/.claude/scripts/greptile-resolve.sh +526 -0
- package/.claude/scripts/load-env.sh +32 -0
- package/.forge/hooks/check-tdd.js +240 -0
- package/.github/PLUGIN_TEMPLATE.json +32 -0
- package/.mcp.json.example +12 -0
- package/AGENTS.md +169 -0
- package/CLAUDE.md +99 -0
- package/LICENSE +21 -0
- package/README.md +414 -0
- package/bin/forge-cmd.js +313 -0
- package/bin/forge-validate.js +303 -0
- package/bin/forge.js +4228 -0
- package/docs/AGENT_INSTALL_PROMPT.md +342 -0
- package/docs/ENHANCED_ONBOARDING.md +602 -0
- package/docs/EXAMPLES.md +482 -0
- package/docs/GREPTILE_SETUP.md +400 -0
- package/docs/MANUAL_REVIEW_GUIDE.md +106 -0
- package/docs/ROADMAP.md +359 -0
- package/docs/SETUP.md +632 -0
- package/docs/TOOLCHAIN.md +849 -0
- package/docs/VALIDATION.md +363 -0
- package/docs/WORKFLOW.md +400 -0
- package/docs/planning/PROGRESS.md +396 -0
- package/docs/plans/.gitkeep +0 -0
- package/docs/plans/2026-02-27-forge-test-suite-v2-decisions.md +21 -0
- package/docs/plans/2026-02-27-forge-test-suite-v2-design.md +362 -0
- package/docs/plans/2026-02-27-forge-test-suite-v2-tasks.md +343 -0
- package/docs/plans/2026-03-02-superpowers-gaps-decisions.md +26 -0
- package/docs/plans/2026-03-02-superpowers-gaps-design.md +239 -0
- package/docs/plans/2026-03-02-superpowers-gaps-tasks.md +260 -0
- package/docs/plans/2026-03-04-agent-command-parity-design.md +163 -0
- package/docs/plans/2026-03-04-verify-worktree-cleanup-decisions.md +7 -0
- package/docs/plans/2026-03-04-verify-worktree-cleanup-design.md +165 -0
- package/docs/plans/2026-03-05-forge-uto-decisions.md +6 -0
- package/docs/plans/2026-03-05-forge-uto-design.md +116 -0
- package/docs/plans/2026-03-05-forge-uto-tasks.md +244 -0
- package/docs/plans/2026-03-10-command-creator-and-eval-decisions.md +52 -0
- package/docs/plans/2026-03-10-command-creator-and-eval-design.md +350 -0
- package/docs/plans/2026-03-10-command-creator-and-eval-tasks.md +426 -0
- package/docs/plans/2026-03-10-stale-workflow-refs-decisions.md +8 -0
- package/docs/plans/2026-03-10-stale-workflow-refs-design.md +80 -0
- package/docs/plans/2026-03-10-stale-workflow-refs-tasks.md +90 -0
- package/docs/plans/2026-03-14-beads-plan-context-decisions.md +9 -0
- package/docs/plans/2026-03-14-beads-plan-context-design.md +171 -0
- package/docs/plans/2026-03-14-beads-plan-context-tasks.md +160 -0
- package/docs/plans/2026-03-14-skill-eval-loop-decisions.md +33 -0
- package/docs/plans/2026-03-14-skill-eval-loop-design.md +118 -0
- package/docs/plans/2026-03-14-skill-eval-loop-results.md +78 -0
- package/docs/plans/2026-03-14-skill-eval-loop-tasks.md +160 -0
- package/docs/plans/2026-03-15-agent-command-parity-v2-decisions.md +11 -0
- package/docs/plans/2026-03-15-agent-command-parity-v2-design.md +145 -0
- package/docs/plans/2026-03-15-agent-command-parity-v2-tasks.md +211 -0
- package/docs/research/TEMPLATE.md +292 -0
- package/docs/research/advanced-testing.md +297 -0
- package/docs/research/agent-permissions.md +167 -0
- package/docs/research/dependency-chain.md +328 -0
- package/docs/research/forge-workflow-v2.md +550 -0
- package/docs/research/plugin-architecture.md +772 -0
- package/docs/research/pr4-cli-automation.md +326 -0
- package/docs/research/premerge-verify-restructure.md +205 -0
- package/docs/research/skills-restructure.md +508 -0
- package/docs/research/sonarcloud-perfection-plan.md +166 -0
- package/docs/research/sonarcloud-quality-gate.md +184 -0
- package/docs/research/superpowers-integration.md +403 -0
- package/docs/research/superpowers.md +319 -0
- package/docs/research/test-environment.md +519 -0
- package/install.sh +1062 -0
- package/lefthook.yml +39 -0
- package/lib/agents/README.md +198 -0
- package/lib/agents/claude.plugin.json +28 -0
- package/lib/agents/cline.plugin.json +22 -0
- package/lib/agents/codex.plugin.json +19 -0
- package/lib/agents/copilot.plugin.json +24 -0
- package/lib/agents/cursor.plugin.json +25 -0
- package/lib/agents/kilocode.plugin.json +22 -0
- package/lib/agents/opencode.plugin.json +20 -0
- package/lib/agents/roo.plugin.json +23 -0
- package/lib/agents-config.js +2112 -0
- package/lib/commands/dev.js +513 -0
- package/lib/commands/plan.js +696 -0
- package/lib/commands/recommend.js +119 -0
- package/lib/commands/ship.js +377 -0
- package/lib/commands/status.js +378 -0
- package/lib/commands/validate.js +602 -0
- package/lib/context-merge.js +359 -0
- package/lib/plugin-catalog.js +360 -0
- package/lib/plugin-manager.js +166 -0
- package/lib/plugin-recommender.js +141 -0
- package/lib/project-discovery.js +491 -0
- package/lib/setup.js +118 -0
- package/lib/workflow-profiles.js +203 -0
- package/package.json +115 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
# Greptile Code Review - Branch Protection Setup
|
|
2
|
+
|
|
3
|
+
**✅ Greptile is already working on your repository!**
|
|
4
|
+
|
|
5
|
+
Greptile provides AI-powered code review as a **GitHub App** that automatically analyzes every PR.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Current Status
|
|
10
|
+
|
|
11
|
+
🎉 **Greptile is Fully Operational!**
|
|
12
|
+
|
|
13
|
+
Your repository has both Greptile features working:
|
|
14
|
+
- ✅ **Greptile Review** (GitHub App) - Provides detailed code review comments
|
|
15
|
+
- ✅ **Greptile Quality Gate** (Workflow) - Enforces minimum score of 4.0/5 before merge
|
|
16
|
+
- ✅ Both integrated into branch protection for master branch
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Branch Protection Status
|
|
21
|
+
|
|
22
|
+
### ✅ Fully Configured!
|
|
23
|
+
|
|
24
|
+
Branch protection for `master` now requires:
|
|
25
|
+
|
|
26
|
+
1. **Greptile Review** (GitHub App check) - Must pass
|
|
27
|
+
2. **Greptile Quality Gate (≥4/5)** (Custom workflow) - Must pass with score ≥ 4.0
|
|
28
|
+
3. **Other Required Checks**: ESLint, CodeQL, dependency-review
|
|
29
|
+
4. **PR Reviews**: At least 1 approving review required
|
|
30
|
+
5. **Conversation Resolution**: All review threads must be resolved
|
|
31
|
+
|
|
32
|
+
**Result**: PRs cannot be merged unless:
|
|
33
|
+
- Greptile Review completes successfully
|
|
34
|
+
- Greptile confidence score is at least 4.0/5
|
|
35
|
+
- All other quality checks pass
|
|
36
|
+
- Code has been reviewed and approved
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## How Greptile Works
|
|
41
|
+
|
|
42
|
+
### GitHub App Integration
|
|
43
|
+
|
|
44
|
+
- **Automatic**: Runs on every PR (no manual trigger needed)
|
|
45
|
+
- **No Workflow Needed**: Works as a GitHub App, not a GitHub Action
|
|
46
|
+
- **No API Key Required**: Authorized through GitHub App installation
|
|
47
|
+
|
|
48
|
+
### Review Process
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
PR created/updated
|
|
52
|
+
↓
|
|
53
|
+
Greptile automatically analyzes code
|
|
54
|
+
↓
|
|
55
|
+
Posts detailed feedback as comments
|
|
56
|
+
↓
|
|
57
|
+
Updates "Greptile Review" check status
|
|
58
|
+
↓
|
|
59
|
+
Pass: ✅ Can merge
|
|
60
|
+
Fail: ❌ Blocked (if required in branch protection)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### What Greptile Checks
|
|
64
|
+
|
|
65
|
+
- 🐛 **Bugs & Edge Cases**: Potential runtime errors, null pointers, race conditions
|
|
66
|
+
- 🔒 **Security**: Vulnerabilities, injection risks, auth issues
|
|
67
|
+
- 📊 **Code Quality**: Complexity, duplication, naming conventions
|
|
68
|
+
- ⚡ **Performance**: Inefficient algorithms, memory leaks
|
|
69
|
+
- 📝 **Best Practices**: Error handling, type safety, modern patterns
|
|
70
|
+
- 🧪 **Testing**: Missing test coverage, test quality
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Understanding Greptile Feedback
|
|
75
|
+
|
|
76
|
+
### Confidence Score
|
|
77
|
+
|
|
78
|
+
Greptile provides a confidence score (0-5) in the PR description that reflects overall code quality:
|
|
79
|
+
|
|
80
|
+
📊 **Confidence Score Format**: "Confidence Score: X/5" or "Confidence Score: X out of 5"
|
|
81
|
+
🎯 **Quality Gate Threshold**: Minimum 4.0/5 required to merge
|
|
82
|
+
✅ **Detailed inline comments** on specific lines of code
|
|
83
|
+
✅ **Issue severity** indicators (critical, major, minor)
|
|
84
|
+
✅ **Actionable suggestions** with example fixes
|
|
85
|
+
|
|
86
|
+
### Example from Your PR #13
|
|
87
|
+
|
|
88
|
+
Greptile identified and you fixed:
|
|
89
|
+
- ✅ Windows path validation bug
|
|
90
|
+
- ✅ Duplicate function definitions
|
|
91
|
+
- ✅ Incorrect fetch timeout implementation
|
|
92
|
+
- ✅ Security vulnerabilities (command injection)
|
|
93
|
+
- ✅ JSON parse crash issues
|
|
94
|
+
- ✅ Unused variables
|
|
95
|
+
|
|
96
|
+
**Result**: 16/16 issues addressed! 🎉
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Addressing Greptile Feedback
|
|
101
|
+
|
|
102
|
+
### Workflow
|
|
103
|
+
|
|
104
|
+
1. **Read Comments**
|
|
105
|
+
- Greptile posts inline comments on changed files
|
|
106
|
+
- Each explains the issue and suggests fixes
|
|
107
|
+
|
|
108
|
+
2. **Fix Issues**
|
|
109
|
+
```bash
|
|
110
|
+
# Make changes based on feedback
|
|
111
|
+
git add .
|
|
112
|
+
git commit -m "fix: address Greptile feedback"
|
|
113
|
+
git push
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
3. **Auto Re-analysis**
|
|
117
|
+
- Greptile automatically reviews again after push
|
|
118
|
+
- Verifies fixes
|
|
119
|
+
- Updates check status
|
|
120
|
+
|
|
121
|
+
4. **Resolve Conversations**
|
|
122
|
+
- Click "Resolve conversation" on each fixed comment
|
|
123
|
+
- Helps track progress
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Branch Protection Behavior
|
|
128
|
+
|
|
129
|
+
### When "Greptile Review" is Required:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
✅ All issues addressed → Check: SUCCESS → ✅ Can merge
|
|
133
|
+
❌ Outstanding issues → Check: PENDING → ❌ Blocked
|
|
134
|
+
🔄 Analysis in progress → Check: PENDING → ❌ Blocked
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Emergency Override
|
|
138
|
+
|
|
139
|
+
If you **must** merge despite Greptile feedback:
|
|
140
|
+
|
|
141
|
+
1. **Get approval** from tech lead/architect
|
|
142
|
+
2. **Document in PR description**:
|
|
143
|
+
```markdown
|
|
144
|
+
**Emergency Bypass**: Production hotfix for [critical-issue]
|
|
145
|
+
**Greptile Status**: Bypassed
|
|
146
|
+
**Justification**: [detailed reason]
|
|
147
|
+
**Follow-up**: Issue #123 created to address feedback
|
|
148
|
+
```
|
|
149
|
+
3. **Temporarily disable branch protection** (admin only)
|
|
150
|
+
4. **Merge**
|
|
151
|
+
5. **Re-enable protection immediately**
|
|
152
|
+
6. **Create follow-up issue** to address Greptile feedback
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Configuration
|
|
157
|
+
|
|
158
|
+
### No Setup Required! ✅
|
|
159
|
+
|
|
160
|
+
Since Greptile is a GitHub App:
|
|
161
|
+
|
|
162
|
+
- ❌ No API keys needed in secrets
|
|
163
|
+
- ❌ No workflow files needed
|
|
164
|
+
- ❌ No manual configuration
|
|
165
|
+
|
|
166
|
+
It just works automatically!
|
|
167
|
+
|
|
168
|
+
### Managing the GitHub App
|
|
169
|
+
|
|
170
|
+
**View installed apps**:
|
|
171
|
+
```
|
|
172
|
+
https://github.com/settings/installations
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Repository-specific settings** (admin only):
|
|
176
|
+
```
|
|
177
|
+
https://github.com/harshanandak/forge/settings/installations
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
You can:
|
|
181
|
+
- Enable/disable Greptile for specific repos
|
|
182
|
+
- Adjust review frequency
|
|
183
|
+
- Configure notification settings
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Customization (Optional)
|
|
188
|
+
|
|
189
|
+
### Repository Configuration
|
|
190
|
+
|
|
191
|
+
Create `.greptile/config.yml` in repo root:
|
|
192
|
+
|
|
193
|
+
```yaml
|
|
194
|
+
# Greptile configuration
|
|
195
|
+
review:
|
|
196
|
+
# File patterns to ignore
|
|
197
|
+
exclude:
|
|
198
|
+
- "*.md"
|
|
199
|
+
- "test/**"
|
|
200
|
+
- "docs/**"
|
|
201
|
+
- "*.test.js"
|
|
202
|
+
- "dist/**"
|
|
203
|
+
|
|
204
|
+
# Focus areas (prioritize these checks)
|
|
205
|
+
focus:
|
|
206
|
+
- security
|
|
207
|
+
- bugs
|
|
208
|
+
- performance
|
|
209
|
+
|
|
210
|
+
# Review depth
|
|
211
|
+
depth: thorough # quick, normal, thorough
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Per-PR Instructions
|
|
215
|
+
|
|
216
|
+
Add comments in PR description to guide Greptile:
|
|
217
|
+
|
|
218
|
+
```markdown
|
|
219
|
+
@greptile focus on security and performance
|
|
220
|
+
@greptile ignore docs/ and test files
|
|
221
|
+
@greptile be extra strict on src/auth/
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Troubleshooting
|
|
227
|
+
|
|
228
|
+
### "Greptile Review check not appearing in branch protection"
|
|
229
|
+
|
|
230
|
+
**Cause**: Check hasn't completed at least once on any PR.
|
|
231
|
+
|
|
232
|
+
**Fix**:
|
|
233
|
+
1. It's currently running on PR #13
|
|
234
|
+
2. Wait for it to complete
|
|
235
|
+
3. Then refresh branch protection settings page
|
|
236
|
+
4. "Greptile Review" should now appear in the list
|
|
237
|
+
|
|
238
|
+
### "Greptile didn't review my PR"
|
|
239
|
+
|
|
240
|
+
**Possible causes**:
|
|
241
|
+
- GitHub App not installed or disabled
|
|
242
|
+
- PR is a draft (some apps skip drafts)
|
|
243
|
+
- Repository not in allowed list
|
|
244
|
+
|
|
245
|
+
**Fix**:
|
|
246
|
+
1. Visit: https://github.com/harshanandak/forge/settings/installations
|
|
247
|
+
2. Verify Greptile is installed and enabled
|
|
248
|
+
3. Check repository access permissions
|
|
249
|
+
4. Convert draft to ready for review if applicable
|
|
250
|
+
|
|
251
|
+
### "How do I request a re-review?"
|
|
252
|
+
|
|
253
|
+
**Methods**:
|
|
254
|
+
1. **Push new commit** - Triggers automatic re-analysis
|
|
255
|
+
2. **Comment on PR**: `@greptile please review` or `@greptile recheck`
|
|
256
|
+
3. **Close and reopen PR** - Forces fresh analysis
|
|
257
|
+
|
|
258
|
+
### "Can I see why Greptile flagged something?"
|
|
259
|
+
|
|
260
|
+
**Yes!**
|
|
261
|
+
1. Go to "Files changed" tab in PR
|
|
262
|
+
2. Find Greptile's comment thread
|
|
263
|
+
3. Each comment explains:
|
|
264
|
+
- What the issue is
|
|
265
|
+
- Why it's problematic
|
|
266
|
+
- How to fix it
|
|
267
|
+
- Often includes code examples
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Best Practices
|
|
272
|
+
|
|
273
|
+
### 1. Address Feedback Incrementally
|
|
274
|
+
|
|
275
|
+
Don't batch all fixes into one commit:
|
|
276
|
+
- Fix issues as you see them
|
|
277
|
+
- Commit after each logical fix
|
|
278
|
+
- Easier to review and debug
|
|
279
|
+
|
|
280
|
+
### 2. Use as Learning Tool
|
|
281
|
+
|
|
282
|
+
Greptile explains *why* something is an issue:
|
|
283
|
+
- Read the explanations, don't just apply fixes blindly
|
|
284
|
+
- Share interesting findings with your team
|
|
285
|
+
- Update coding standards based on patterns
|
|
286
|
+
|
|
287
|
+
### 3. Combine with Human Review
|
|
288
|
+
|
|
289
|
+
| Review Type | What It Catches |
|
|
290
|
+
|-------------|-----------------|
|
|
291
|
+
| 🤖 Greptile | Technical bugs, security, complexity, patterns |
|
|
292
|
+
| 👥 Human | Business logic, UX, architecture, context |
|
|
293
|
+
|
|
294
|
+
**Both are essential!** They catch different types of issues.
|
|
295
|
+
|
|
296
|
+
### 4. Don't Fight the AI Unnecessarily
|
|
297
|
+
|
|
298
|
+
If Greptile flags something:
|
|
299
|
+
- There's usually a valid reason
|
|
300
|
+
- Read the explanation carefully
|
|
301
|
+
- If you disagree, comment why (helps improve Greptile)
|
|
302
|
+
- Propose alternative if you have a better approach
|
|
303
|
+
|
|
304
|
+
### 5. Track Common Patterns
|
|
305
|
+
|
|
306
|
+
Notice recurring issues across PRs?
|
|
307
|
+
- Document in coding standards
|
|
308
|
+
- Add to .greptile/config.yml to auto-enforce
|
|
309
|
+
- Share with team in README or CONTRIBUTING.md
|
|
310
|
+
- Consider pre-commit hooks for common issues
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Verification Checklist
|
|
315
|
+
|
|
316
|
+
Use this to confirm Greptile is set up correctly:
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
✅ Greptile GitHub App is installed
|
|
320
|
+
✅ Greptile has access to your repository
|
|
321
|
+
✅ "Greptile Review" check runs on PRs
|
|
322
|
+
✅ Greptile posts code review comments
|
|
323
|
+
✅ "Greptile Review" appears in branch protection options
|
|
324
|
+
✅ "Greptile Review" is selected as required check
|
|
325
|
+
✅ Branch protection rule is saved
|
|
326
|
+
✅ Test: Create PR → Greptile reviews → Merge blocked if issues
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## FAQ
|
|
332
|
+
|
|
333
|
+
**Q: Does Greptile use a scoring system (like 4.0/5.0)?**
|
|
334
|
+
A: Yes! Greptile Review provides a confidence score (0-5) in the PR description. Our custom Quality Gate workflow enforces a minimum score of 4.0/5 before allowing merges.
|
|
335
|
+
|
|
336
|
+
**Q: Will it review every single commit?**
|
|
337
|
+
A: It reviews at the PR level. Runs when PR is opened and when new commits are pushed.
|
|
338
|
+
|
|
339
|
+
**Q: Does it slow down development?**
|
|
340
|
+
A: No! Reviews typically complete in 1-2 minutes. Runs in parallel with other checks.
|
|
341
|
+
|
|
342
|
+
**Q: Can I disable it for specific PRs?**
|
|
343
|
+
A: Yes, via PR description: `@greptile skip` (but only if not required in branch protection)
|
|
344
|
+
|
|
345
|
+
**Q: Is it free?**
|
|
346
|
+
A: Greptile has free and paid tiers. Check https://greptile.com/pricing for current plans.
|
|
347
|
+
|
|
348
|
+
**Q: Does it replace code review?**
|
|
349
|
+
A: No! It augments human review by catching technical issues, allowing humans to focus on architecture, business logic, and UX.
|
|
350
|
+
|
|
351
|
+
**Q: What languages does it support?**
|
|
352
|
+
A: Most modern languages including JavaScript, TypeScript, Python, Go, Java, Rust, etc.
|
|
353
|
+
|
|
354
|
+
**Q: Can I customize what it checks for?**
|
|
355
|
+
A: Yes, via `.greptile/config.yml` configuration file.
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## Next Steps
|
|
360
|
+
|
|
361
|
+
1. ✅ **DONE** - Greptile Review is active and running
|
|
362
|
+
2. ✅ **DONE** - Greptile Quality Gate (≥4/5) is enforced in branch protection
|
|
363
|
+
3. ✅ **DONE** - All required checks configured for master branch
|
|
364
|
+
4. 🎯 **Create new PRs** and watch the quality gate in action
|
|
365
|
+
5. 📚 **Document** your team's policy for handling Greptile feedback
|
|
366
|
+
6. 🎉 **Celebrate** improved code quality!
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
## Additional Resources
|
|
371
|
+
|
|
372
|
+
- **Greptile Documentation**: https://docs.greptile.com
|
|
373
|
+
- **GitHub App Settings**: https://github.com/settings/installations
|
|
374
|
+
- **Branch Protection Guide**: [../.github/BRANCH_PROTECTION_GUIDE.md](../.github/BRANCH_PROTECTION_GUIDE.md)
|
|
375
|
+
- **Your PR #13** (example): https://github.com/harshanandak/forge/pull/13
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## Summary
|
|
380
|
+
|
|
381
|
+
**What Greptile Is:**
|
|
382
|
+
- ✅ GitHub App providing detailed code reviews
|
|
383
|
+
- ✅ Custom Quality Gate workflow enforcing minimum score 4.0/5
|
|
384
|
+
- ✅ AI-powered code analysis on every PR
|
|
385
|
+
- ✅ Detailed, actionable feedback with confidence scores
|
|
386
|
+
|
|
387
|
+
**What's Now Active:**
|
|
388
|
+
- ✅ Greptile Review (GitHub App) is installed and running
|
|
389
|
+
- ✅ Greptile Quality Gate (≥4/5) is enforced in branch protection
|
|
390
|
+
- ✅ PRs to master require score ≥ 4.0/5 to merge
|
|
391
|
+
- ✅ All review comments must be resolved before merge
|
|
392
|
+
|
|
393
|
+
**Result:**
|
|
394
|
+
- 🚀 Higher code quality with enforced standards
|
|
395
|
+
- 🐛 Fewer bugs in production
|
|
396
|
+
- 📊 Objective quality metrics (4.0/5 minimum)
|
|
397
|
+
- 🛡️ Automated security and best practice checks
|
|
398
|
+
- 📚 Team learning from AI feedback
|
|
399
|
+
|
|
400
|
+
Enjoy your new AI code reviewer with quality enforcement! 🤖✨
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Manual Review Guide
|
|
2
|
+
|
|
3
|
+
**Purpose**: Structured guidance for manual code review integrated with AI review tools.
|
|
4
|
+
|
|
5
|
+
**Audience**: Developers conducting PR reviews, maintainers configuring review workflows.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Manual review remains essential even with AI-powered tools like Greptile and CodeRabbit. This guide provides a systematic approach to combine human judgment with AI insights for comprehensive code quality.
|
|
12
|
+
|
|
13
|
+
**Review Philosophy**:
|
|
14
|
+
- **AI First, Human Final**: Use AI tools for breadth, manual review for depth
|
|
15
|
+
- **Structured Process**: Follow systematic checklist to avoid missing critical issues
|
|
16
|
+
- **Context Matters**: Apply judgment based on project stage, risk, and complexity
|
|
17
|
+
- **Documentation Required**: Every PR needs clear explanation of changes and reasoning
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Review Workflow Integration
|
|
22
|
+
|
|
23
|
+
This guide integrates with the Forge 9-Stage TDD Workflow:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
/status → /research → /plan → /dev → /validate → /ship → /review → /merge → /verify
|
|
27
|
+
↑
|
|
28
|
+
You are here
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### When to Use This Guide
|
|
32
|
+
|
|
33
|
+
- **Stage 7 (/review)**: Address ALL PR feedback from GitHub Actions, Greptile, SonarCloud, and manual reviewers
|
|
34
|
+
- **After AI Review**: When Greptile or CodeRabbit has completed initial analysis
|
|
35
|
+
- **Before Merge**: Final verification before approving PR
|
|
36
|
+
- **Post-Merge**: Documentation verification in /verify stage
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Part 1: AI Review Tools Best Practices
|
|
41
|
+
|
|
42
|
+
### Greptile - Semantic Understanding
|
|
43
|
+
- Use .claude/scripts/greptile-resolve.sh for systematic thread handling
|
|
44
|
+
- Always reply and resolve threads after fixes
|
|
45
|
+
- See .claude/rules/greptile-review-process.md for detailed workflow
|
|
46
|
+
|
|
47
|
+
### CodeRabbit - Multi-Model Review
|
|
48
|
+
- Address security issues immediately
|
|
49
|
+
- Consider performance suggestions with benchmarks
|
|
50
|
+
- Apply style suggestions for consistency
|
|
51
|
+
|
|
52
|
+
### SonarCloud - Static Analysis
|
|
53
|
+
- Coverage ≥80% on new code
|
|
54
|
+
- 0 security hotspots unreviewed
|
|
55
|
+
- Use /sonarcloud skill for PR-specific issues
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Part 2: Manual Review Checklist
|
|
60
|
+
|
|
61
|
+
### 1. Functional Correctness
|
|
62
|
+
- ☐ Code matches PR description
|
|
63
|
+
- ☐ Edge cases handled
|
|
64
|
+
- ☐ Error messages clear
|
|
65
|
+
- ☐ Invalid input handled gracefully
|
|
66
|
+
|
|
67
|
+
### 2. Security (OWASP Top 10)
|
|
68
|
+
- ☐ Authorization before sensitive ops
|
|
69
|
+
- ☐ Data encrypted at rest/transit
|
|
70
|
+
- ☐ SQL queries parameterized
|
|
71
|
+
- ☐ No code injection risks
|
|
72
|
+
|
|
73
|
+
### 3. Testing Quality
|
|
74
|
+
- ☐ Tests for new code
|
|
75
|
+
- ☐ Edge cases covered
|
|
76
|
+
- ☐ TDD compliance (test commits before feat commits)
|
|
77
|
+
|
|
78
|
+
### 4. Code Quality
|
|
79
|
+
- ☐ Self-documenting code
|
|
80
|
+
- ☐ Single responsibility functions
|
|
81
|
+
- ☐ No duplication (DRY)
|
|
82
|
+
- ☐ Clear organization
|
|
83
|
+
|
|
84
|
+
### 5. Performance
|
|
85
|
+
- ☐ Efficient algorithms
|
|
86
|
+
- ☐ Optimized queries
|
|
87
|
+
- ☐ No memory leaks
|
|
88
|
+
|
|
89
|
+
### 6. Documentation
|
|
90
|
+
- ☐ Public APIs documented
|
|
91
|
+
- ☐ PR explains why, not just what
|
|
92
|
+
- ☐ README updated if needed
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Summary
|
|
97
|
+
|
|
98
|
+
**Manual Review Essentials**:
|
|
99
|
+
- Use AI tools for pattern detection
|
|
100
|
+
- Apply human judgment for context
|
|
101
|
+
- Follow systematic checklist
|
|
102
|
+
- Verify security, testing, documentation
|
|
103
|
+
|
|
104
|
+
**Integration**: Stage 7 (/review) → Address ALL feedback systematically
|
|
105
|
+
|
|
106
|
+
**Key**: Trust AI for breadth, humans for depth. Best results combine both.
|