Code Explorer
Understand existing code every day — with or without a pull request.
MergeGuard Code Explorer answers brownfield questions: how does this flow work, what breaks if I change it, is this safe to delete? Unlike PR-only AI reviewers, you can run these commands from Dashboard → Knowledge, MergeGuardAgent on local files, or on an open PR/MR.
| Command | What it does | GitHub | GitLab |
|---|---|---|---|
/ask | Answer any question about the repository — code, commits, contributors, and architecture. | PR Conversation · Dashboard · VS Code | MR note · Dashboard · VS Code |
/explain-flow | Walk through how data and control flow through a file, function, or module. | PR Conversation · Dashboard · VS Code | MR note · Dashboard · VS Code |
/find-similar | Locate similar patterns, duplicates, or conventions elsewhere in the repo. | PR Conversation · Dashboard · VS Code | MR note · Dashboard · VS Code |
/root-cause | Trace why a bug, error, or surprising behavior happens. | PR Conversation · Dashboard · VS Code | MR note · Dashboard · VS Code |
/impact | Show what breaks or changes if you edit or remove this code. | PR Conversation · Dashboard · VS Code | MR note · Dashboard · VS Code |
/can-delete | Assess whether code is dead, unused, or safe to remove. | PR Conversation · Dashboard · VS Code | MR note · Dashboard · VS Code |
/why-exists | Explain the likely purpose and history of a module or pattern. | PR Conversation · Dashboard · VS Code | MR note · Dashboard · VS Code |
Where to run commands
- Dashboard → Explore — pick repo, branch, file path (Pro+ on connected repos).
- MergeGuardAgent — command palette:
MergeGuardAgent: Code Explorer(local file, any plan). - GitHub PR — post on Conversation:
@mergeguards explain-flow path/to/file.ts - GitLab MR — same commands on the MR overview note.
Aliases
Use @mergeguards, @mergeguard, /mergeguards, or /mg instead of a leading slash on PRs — e.g. @mergeguards root-cause login 500.
Compare to CodeRabbit
CodeRabbit focuses on automated PR review. MergeGuard still does that — plus daily codebase exploration when no PR exists. See MergeGuard vs CodeRabbit and MergeGuard Intelligence.