Skip to content
cd /blog

Map first, review second

[Ecosystem] [Workflow] [Code Review]

> Ground the coding agent in a repo map before it writes. Let Greptile review the pull request after. A complementary pairing, not a swap.

Two different jobs sit on either side of a pull request. Before the agent writes, it needs a map of the tree it is about to change. After the agent opens a PR, something should read that change against the rest of the system and leave comments a human can act on.

Those jobs look similar from a distance because both involve “understanding the codebase.” They are not the same product. One answers “where should this edit land?” The other answers “what did this diff break that a line-by-line linter will miss?” Mixing them up produces a worse first draft and a noisier review.

This piece is a joint-workflow guide. Maguyva is the map the agent queries first. Greptile is the review agent that comments on the PR second. The pairing is complementary by construction: Maguyva does not review pull requests, and Greptile does not replace the context layer the agent used to write them.

Why the split is useful

A coding agent that starts from training priors plus a few pasted files will invent a plausible path and edit it. That is the wrong-file failure, and it is a retrieval problem. Maguyva is a remote MCP codebase-context layer: semantic, structural (AST), graph/dependency, and text retrieval fused into ranked results, plus symbol lookup and file fetch. Grounded answers come back as path/file.ext:line so you can reject a miss before a patch exists. The claim stays modest: fewer hallucinated edits. The model can still guess. The first step stops being a guess.

Greptile is an AI code review agent. In their own words, it automatically reviews every pull request with complete understanding of the codebase, and it positions that against traditional linters that check files in isolation rather than the whole system. Setup is installing the GitHub or GitLab app and selecting repositories. There is no local index for you to operate. Hosting is Greptile Cloud (they state SOC 2 Type II compliance, with a report available on request), with a self-hosted option offered for enterprises.

Their own numbered flow is: connect and build a dependency graph of every function, class, and dependency; on every pull request, analyze the change using that full-repo graph and post findings as PR comments with suggested fixes, in about three minutes; each comment can hand the issue to a coding agent the team already uses. They also state they read prior human PR comments over time to learn a team’s coding standards and reduce noisy suggestions. Their learning system is stated to need 2–3 weeks to adapt.

That is review, not drafting. Greptile’s standout is full-repository graph context on the change that already landed in a PR, then a closed loop that sends the finding to Claude Code, Codex, Conductor, Cursor, or Devin. Maguyva’s standout is the ranked map the agent queried before that change was written. Use both. Do not ask either to do the other’s job.

A first-party Maguyva–Greptile product integration is not stated. You do not need one. Maguyva talks to the agent over MCP. Greptile talks to GitHub or GitLab through their app. They meet at the pull request. No glue script, no cron that pipes one tool into the other. The pairing is bash-free because each product already sits on the surface it owns.

What this is not

This is not a teardown of Greptile. It is not a “switch your reviewer” page. Greptile launched on Hacker News on 5 March 2024 as a Y Combinator W24 company, and that thread is how a lot of people first met the product. If that is how you found them, keep them. This page is the missing front half of that loop: ground the agent so the PR Greptile sees is already aimed at the right files.

Greptile’s marketing materials lead with review-speed and bug-catch claims. Treat those as Greptile’s own claims, not independently verified numbers. This draft does not repeat them as facts.

Language coverage is the same kind of honesty. Greptile frames support as covering all programming languages rather than an enumerated list; a precise count is not stated. Maguyva publishes 279+ languages and text-based technologies, with a technical split (parser-backed AST versus text-only) on the site when the question is technical. Those are different products making different claims. Do not blend them.

Pricing for Greptile is not stated in the notes this draft is allowed to use. Paid plans exist; see their pricing page. Maguyva bills per workspace, not per seat. Plans start free. The pricing page lists the published tiers if you need the workspace numbers.

Workflow

Three named stages. Run them in this order. Skip none of them the first time you try the pairing.

1. Maguyva context

Index one repository you already know. Connect the MCP client you already write in — Claude Code, Cursor, Codex CLI, VS Code, Windsurf, or another MCP-compatible client. Maguyva has setup guides for 24 documented MCP clients and can connect to other clients that support standard MCP configuration.

Ask a question you can grade before anyone writes a line. “Where is session expiry handled, and what calls it?” is a better first move than “fix auth.” Demand citations. Open the file.ext:line results. Follow the symbol. Confirm the dependency you are about to touch.

Maguyva exposes 11 customer-facing MCP tools across search, symbols, dependency analysis, file retrieval, repository context, and deterministic utility workflows. Four retrieval modes are fused into ranked results; find_symbol is a separate tool when you already know the name. The docs describe the shortest path: start free, index a repo you already know, connect the client, then ask one question you can verify.

Snapshots are timestamped, so the agent can tell which version of the tree it is reading. The honest limit is un-synced local work. If the edit exists only in a working tree and has not been pushed, the hosted map does not contain it yet. Instruction files (CLAUDE.md, AGENTS.md) still belong here for conventions and what not to touch. They are not a live map. Use them for behavior. Use Maguyva for facts.

Do not let the agent open a PR until the citations survive contact with the repo. That gate is the whole point of this stage.

2. Agent PR

The same agent now writes the change in the client you already pay for. Maguyva is not an editor and not a reviewer. The agent still produces the diff. You still open the pull request on GitHub or GitLab the way you already do.

What should be different is the first file. The PR should name the handler that actually implements the behavior, the caller that will break, and the test that will fail if the change is wrong. If stage 1 was skipped, stage 3 will spend its comments on a change that landed in the wrong package. Greptile can still find systemic issues. It should not have to also recover from a hallucinated path.

Keep the PR scoped. A grounded first file is not a license to rewrite the module. The complementary pairing works when the agent did one job with a map, then asked a reviewer to do a different job on a bounded diff.

3. Greptile review

Greptile is already connected to the repository through the GitHub or GitLab app. On the new pull request it analyzes the change using the full-repo graph it built and posts findings as comments with suggested fixes. Their own materials put that pass at about three minutes.

Read the comments the way you would read a careful teammate: open the cited location, decide whether the finding is real, then act. Where Greptile offers “Fix with your Agent,” it sends the issue — file paths, line numbers, suggested code — to Claude Code, Codex, Conductor, Cursor, or Devin. “Fix All” sends every issue in the review at once. They also ship a Greptile MCP and a Claude Code plugin for that hand-off. Maguyva is not on that named target list; that absence is not a problem. Maguyva already did its work in stage 1. The coding agent that wrote the PR is the one that should receive the fix payload.

Expect noise for the first 2–3 weeks while Greptile’s learning system adapts to the comments your team actually leaves. That is their stated timeline, not a defect in the pairing. Human review stays in the loop. Greptile is the automated first pass, not the merge button.

If a Greptile comment points at a file the agent never queried in stage 1, that is useful signal. Either the map missed a caller, or the agent skipped a citation. Fix the draft against the comment. Do not disable the reviewer.

How to keep the complement honest

  • Maguyva first, always. A review of a wrong-file PR is still a review of the wrong file.
  • Greptile second, always. A well-cited draft still needs a whole-system read of the diff.
  • Do not ask Maguyva to post PR comments. It does not.
  • Do not ask Greptile to be the agent’s first retrieval layer while it is still choosing a path. That is not the job their GitHub or GitLab app is wired to do.
  • Do not invent a bash pipeline that “syncs” them. The PR is the interface.
  • Verify both sides independently. Index one repo you already know. Ask one question you can verify. Then open a small PR and read what Greptile actually comments.

The loop is ordinary once it is named. Map first. Agent PR. Review second. Each product stays on the side of the pull request it is good at.

// map first. review second. in that order.

Related reading

More from the Maguyva build log