Review RALPH worktree changes before merging
Review all changes made in a RALPH worktree before merging to main.
| Command | Description |
|---|---|
/ralph-review |
Review current/only worktree |
/ralph-review {spec-name} |
Review specific worktree |
/ralph-review --full |
Show full diff (not just stats) |
/ralph-review --files |
List changed files only |
/ralph-reviewIf multiple worktrees exist:
? Which worktree do you want to review?
ā ralph/user-authentication (4 commits, 12 files)
ā ralph/payment-integration (2 commits, 5 files)
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Worktree Review ā
ā ralph/user-authentication ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Worktree Path: .worktrees/user-authentication
Branch: ralph/user-authentication
Base: main (diverged 4 commits ago)
PRD Progress:
ā US-001: Create User model (complete)
ā US-002: Password hashing (complete)
ā US-003: JWT utilities (pending)
ā US-004: Auth routes (pending)
Commits: 4
abc1234 feat: ST-001-1 - Create User type definitions
def5678 feat: ST-001-2 - Create Zod validation schema
ghi9012 feat: ST-001-3 - Create User service layer
jkl3456 feat: ST-001-4 - Add unit tests
Files Changed: 12
New files (8):
+ src/types/user.ts
+ src/schemas/user.schema.ts
+ src/services/user.service.ts
+ tests/services/user.service.test.ts
+ src/utils/password.ts
+ src/utils/jwt.ts
+ tests/utils/password.test.ts
+ tests/utils/jwt.test.ts
Modified files (4):
~ src/types/index.ts (+2 -0)
~ src/services/index.ts (+1 -0)
~ src/utils/index.ts (+2 -0)
~ package.json (+2 -0)
Diff stats:
+342 lines added
-12 lines removed
Quality Gates (in worktree):
ā Typecheck: passed
ā Lint: passed (0 warnings)
ā Tests: passed (8 new, 42 total)
Code Coverage:
Statements: 87% (+3%)
Branches: 82% (+5%)
Functions: 91% (+2%)
Lines: 87% (+3%)
? What would you like to review?
ā Show full diff (all changes)
ā Review specific file
ā Show commit details
ā Run tests again
ā Continue to merge (/ralph-merge)
ā Done reviewing
With /ralph-review --full:
# Show diff against main
git diff main...ralph/{spec-name}
Output:
diff --git a/src/types/user.ts b/src/types/user.ts
new file mode 100644
--- /dev/null
+++ b/src/types/user.ts
@@ -0,0 +1,15 @@
+export interface User {
+ id: string;
+ email: string;
+ passwordHash: string;
+ createdAt: Date;
+ updatedAt: Date;
+}
+
+export interface CreateUserInput {
+ email: string;
+ password: string;
+}
...
? Which file do you want to review?
ā src/types/user.ts (new, +15 lines)
ā src/schemas/user.schema.ts (new, +42 lines)
ā src/services/user.service.ts (new, +87 lines)
ā src/types/index.ts (modified, +2 lines)
Show the selected file diff with context.
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Review Summary ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Worktree: ralph/user-authentication
Status: Ready to merge
Summary:
- 4 commits with clear messages
- 12 files changed (8 new, 4 modified)
- All quality gates passing
- 8 new tests added
- Code coverage improved
Recommendations:
ā Changes look good to merge
ā Consider adding integration tests
Actions:
/ralph-merge - Merge to main
/ralph-discard - Abandon changes
Show warnings for potential issues:
ā Warnings:
1. Large commit detected:
ghi9012 (+87 lines) - Consider splitting in future
2. Missing test coverage:
src/utils/jwt.ts - verifyToken() not tested
3. TODO comments found:
src/services/user.service.ts:45 - TODO: Add rate limiting
| Error | Action |
|---|---|
| No worktrees | Direct to /ralph-run |
| Worktree not found | List available worktrees |
| Main branch ahead | Warn about potential conflicts |