feat: incremental reviews, timestamped dirs, worktree discovery#166
feat: incremental reviews, timestamped dirs, worktree discovery#166
Conversation
Add timestamped review directories with incremental diff tracking via .last-review-head. Auto-discover git worktrees and process all reviewable branches in parallel. Update agent/skill documentation for multi-agent parallel workflows.
Code Review Summary: Incremental Reviews & Worktree DiscoveryStatus: CHANGES_REQUESTED This comprehensive feature adds incremental review capabilities and multi-worktree auto-discovery across 23 files. The design is well-conceived — incremental diffs significantly improve performance and the timestamped directory structure enables clean separation of review batches. However, the implementation introduces DRY violations and several regression risks that must be addressed before merge. Overall RecommendationBlock Merge until HIGH-severity blocking issues are resolved. The feature is architecturally sound but has concrete blocking regressions (synthesizer glob mismatch, DIFF_COMMAND inconsistency, path traversal, input validation gaps) that require fixes. Most fixes are 1-2 line edits. Reviewer consensus: 8 reviewers flagged HIGH-severity blocking issues. All other findings (MEDIUM/LOW) are consistency, documentation, or test gaps that improve quality but are not runtime blockers. Blocking Issues (HIGH Confidence ≥80%)Critical Path Regression: Synthesizer Glob Mismatch (Regression, HIGH, 92% confidence)
Security: Path Traversal via
|
| Category | CRITICAL | HIGH | MEDIUM | LOW |
|---|---|---|---|---|
| Blocking | 0 | 7 | 5 | 0 |
| DRY Violations | 0 | 3 | 0 | 0 |
| Should Fix | 0 | 0 | 5 | 0 |
| Test Gaps | 0 | 1 | 2 | 2 |
Total action items: 23 fixes (7 blocking, 5 should-fix, 3 DRY refactors, 2 tests)
Estimated effort to fix: 45-60 minutes (mostly 1-3 line edits)
What's Working Well ✓
- Feature design: Incremental reviews + timestamped directories are clever and well-structured
- Backwards compatibility: Fallback to flat layout is clean and doesn't break existing projects
- Worktree auto-discovery: 7-step filtering algorithm is thorough (handles rebase/merge, protected branches, dedup)
- Edge case handling: Comprehensive table covering multi-worktree, incremental, and legacy scenarios
- Ambient mode integration: New MULTI_WORKTREE classification fits cleanly into existing intent routing
- Documentation coverage: 23 files updated in lockstep (commands, agents, skills, hooks, references)
Merge Readiness Checklist
- Fix 7 HIGH blocking issues (synthesizer glob, DIFF_COMMAND, path validation, SHA validation, git syntax, backwards compat, preamble test)
- Add Skimmer Worktree Support section
- Consolidate DRY violations (worktree discovery to skill, support section to reference doc)
- Fix edge case table divergence
- Add timestamp validation
- Update preamble drift detection test
- Run full test suite:
npm test - Verify command execution:
/code-review --helpand/resolve --help
After fixes, recommendation will be APPROVED.
Report generated by Architecture, Complexity, Consistency, Documentation, Performance, Regression, Security, and Tests reviewers.
Worktree DRY consolidation: - New worktree-support skill with canonical path resolution, 7-step discovery algorithm, and protected branch list - All 10 agents: replace inline worktree blocks with skill reference - 4 commands: replace inline discovery with skill reference - Protected branch list aligned everywhere (+ release/*, staging, production) Bug fixes: - B1: Synthesizer glob — exact-name exclusion for review/resolution summaries - B2: DIFF_COMMAND missing -C worktree prefix in non-teams variant - B3: Path traversal validation for --path flag in all commands - B7: Comment-pr batch dedup (fetch once, build lookup, skip dupes) Resolver philosophy rewrite (3-tier risk): - Standard fixes: applied directly - Careful fixes (public API, >3 files): test-first approach - Architectural overhaul: only case for tech debt deferral Cleanup: - P2: Remove rm -f .git/index.lock convention from CLAUDE.md - P3: Rate limit awareness in git agent comment-pr - S1+S10: Standardized git template syntax across commands - S2: Removed unnecessary backwards compat section - S3: Synced edge case tables between base/teams variants - S9: Added MULTI_WORKTREE preamble test assertion
Summary
Implements incremental code reviews with timestamped directories and automatic git worktree discovery for parallel review processing.
Changes
.last-review-head; second review only diffs from last commit.docs/reviews/{branch-slug}/{YYYY-MM-DD_HHMM}/subdirectoriesBreaking Changes
None. Review directory structure enhanced; existing reviews remain accessible.
Testing
Related Issues
None at this time.