Skip to content

Code Review & Debugging

Self Review

Terminal window
# 1. Review changes before commit
<leader>gg # Lazygit - review diff
# 2. AI-powered review
<leader>ar # AI code review
<leader>af # Apply suggestions
# 3. Check for issues
<leader>aa # AI actions
# Security, performance, maintainability
# 4. Final verification
# Run tests, check linting

Team Review Preparation

Terminal window
# 1. Clean up commit history
<leader>gg # Squash/reorder if needed
# 2. Write descriptive messages
# Use conventional commit format
# 3. Prepare PR description
<leader>ac # "Generate PR description for: [diff]"
# 4. Document complex changes

Reviewing Others’ Code

Terminal window
git checkout pr-branch
<leader>ff # Navigate changed files
<leader>ae # AI explanation
# Test changes locally
# Provide constructive feedback
<leader>ac # "How to provide feedback on this?"

Debugging Workflow

Issue Investigation

Terminal window
# 1. Reproduce the issue
# 2. Analyze error
<leader>ac # "Help debug: [error details]"
# 3. Investigate code
gd # Go to definition
gr # Find references
<leader>ae # AI explanation

Debugging Process

Terminal window
# 1. Add logging
# Use AI for debugging strategies
# 2. Use debugger
# Set breakpoints in DAP
# 3. Analyze data flow
# Trace variables
# 4. Test hypotheses

Solution Implementation

Terminal window
# 1. Develop fix
<leader>af # AI fixes
# 2. Test thoroughly
# Unit, integration, manual tests
# 3. Document solution
# Add explaining comments
# 4. Prevent regression
# Add tests

Documentation Workflow

Code Documentation

Terminal window
# Document as you code
<leader>ae # Generate docstrings
# Generate API documentation
<leader>ac # "Generate API docs for this endpoint"
# Keep README current

Technical Writing

Terminal window
<leader>ac # "Create outline for [topic]"
nvim docs/feature-guide.md
<leader>ar # AI review of documentation