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.

CommandWhat it doesGitHubGitLab
/askAnswer any question about the repository — code, commits, contributors, and architecture.PR Conversation · Dashboard · VS CodeMR note · Dashboard · VS Code
/explain-flowWalk through how data and control flow through a file, function, or module.PR Conversation · Dashboard · VS CodeMR note · Dashboard · VS Code
/find-similarLocate similar patterns, duplicates, or conventions elsewhere in the repo.PR Conversation · Dashboard · VS CodeMR note · Dashboard · VS Code
/root-causeTrace why a bug, error, or surprising behavior happens.PR Conversation · Dashboard · VS CodeMR note · Dashboard · VS Code
/impactShow what breaks or changes if you edit or remove this code.PR Conversation · Dashboard · VS CodeMR note · Dashboard · VS Code
/can-deleteAssess whether code is dead, unused, or safe to remove.PR Conversation · Dashboard · VS CodeMR note · Dashboard · VS Code
/why-existsExplain the likely purpose and history of a module or pattern.PR Conversation · Dashboard · VS CodeMR 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.