pr-visual¶
Transform pull request diffs into comprehensive Mermaid diagrams for visual code review.
Synopsis¶
Description¶
The pr-visual command generates Mermaid diagrams from PR diffs to help understand code changes visually. It creates architecture diagrams, flow charts, and dependency graphs showing what changed and how components interact.
Parameters¶
| Parameter | Position | Required | Default | Description |
|---|---|---|---|---|
PR_BRANCH |
$1 |
No | Current branch | Branch to visualize |
BASE_BRANCH |
$2 |
No | main |
Base branch for comparison |
REVIEW_DEPTH |
$3 |
No | standard |
Level of detail |
FOCUS_AREAS |
$4 |
No | All | Specific areas to focus on |
Diagram Types¶
| Type | Shows |
|---|---|
| Architecture | Component relationships, new/modified modules |
| Flow | Control flow through changed code paths |
| Dependency | Import/dependency changes |
| Data Flow | Data transformations and state changes |
Examples¶
Visualize Current Branch¶
Visualize Specific PR¶
Example output:
✅ PR Visualization Complete
Diagrams Generated:
1. Architecture Overview (12 components)
2. Auth Flow Changes (3 new paths)
3. Dependency Graph (2 new imports)
Output: .rp1/work/pr-diagrams/feature-auth.md
Output¶
Location: .rp1/work/pr-diagrams/<branch-name>.md
Contains validated Mermaid diagrams ready for rendering.
Related Commands¶
pr-review- Full PR reviewproject-birds-eye-view- Project-wide diagrams