> ## Documentation Index
> Fetch the complete documentation index at: https://docs.graphify.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The PyPI package is graphifyy, with two y's. The command is graphify.
> /graphify . is typed in an assistant chat, not in a shell.
> Use only commands, flags, and endpoints shown on these pages. Do not invent one.
> Choose the surface before you open a page. Local (Graphify Local) is the graphifyy package on the machine: the skill, the CLI, and the ten-tool MCP. Its pages are the Open Source tab (/open-source/) and the Graphify Local tab on each Integrations page. Graphify is the hosted workspace and https://api.graphify.com/mcp (Streamable HTTP, OAuth, no API key). Its pages are the Graphify tab (/platform/, /concepts/) and the Graphify (hosted) tab on each Integrations page. Prefer Graphify unless the user asks for a local or offline setup. Cookbooks (/cookbooks/) and /mcp/docs-search apply to both. Each page's source frontmatter records this as surface: local, cloud, or both. Buildkite is the CI integration.
> In llms.txt, tell the surface from the page path. Graphify: /platform/ and /concepts/. Local: /open-source/. Most /integrations/ pages cover both, with a Graphify (hosted) tab and a Graphify Local tab. Everything else applies to both.
> graphifyy release notes are published at https://github.com/Graphify-Labs/graphify/releases and https://graphify.com/changelog. The current package version is on PyPI (https://pypi.org/project/graphifyy/).
> The official site is https://graphify.com. These docs are https://docs.graphify.com.
> The local MCP server is the ten tools in the MCP tool reference and reads a graph on the machine. The hosted server is https://api.graphify.com/mcp (Streamable HTTP, OAuth, no API key). The JetBrains, ChatGPT, Codex, and Dots, and Vercel pages use the hosted server, not the ten-tool list. On pages with tabs, the Graphify (hosted) tab uses the hosted server and the Graphify Local tab uses the local skill or the ten-tool server.
> Read https://docs.graphify.com/llms.txt, then open one page's .md link. Use https://docs.graphify.com/llms-full.txt only when one page is not enough.

# Review pull requests as a team with a code graph

> Review pull requests as a team with Graphify: rank open PRs by impact, spot PRs that collide on the same code, and pick a safe merge order early.

When several people open pull requests against the same code, review order matters. Graphify reads your open PRs, maps each diff onto the code graph, and shows how much each one touches and which PRs collide. Your team reviews the risky ones first and merges in an order that avoids surprise conflicts.

## What you'll build

* A dashboard of open PRs with CI status and graph impact.
* A list of PR pairs that touch the same communities.
* A triage view that suggests what to review first.

This recipe runs against the open-source [Graphify-Labs/graphify](https://github.com/Graphify-Labs/graphify) repository, which had 48 open PRs when this was written.

## Setup

You need the [GitHub CLI](https://cli.github.com/), signed in with `gh auth login`, and a graph of the repository:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
uv tool install graphifyy
git clone https://github.com/Graphify-Labs/graphify && cd graphify
graphify extract . --code-only
```

## Step 1: List open PRs with impact

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify prs --repo Graphify-Labs/graphify
```

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  graphify prs  ·  base: v8  ·  48 PRs

     #  CI  STATUS  UPDATED  IMPACT                   TITLE
  #4836  ✓  READY   today    2243 nodes / 122 comm…   feat(matlab): add isolated AST extraction…
  #4834  ✓  READY   today    211 nodes / 8 communi…   fix(export): report a partial backup…
  #4827  ✓  READY   1d       730 nodes / 80 commun…   fix(extract): persist resolver degradation…
```

Graphify detects the default branch (here `v8`) unless you pass `--base`. The impact column counts the graph nodes and communities a PR's changed files reach. A PR that reaches 122 communities needs a different reviewer than one that reaches 8.

## Step 2: Find colliding PRs

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify prs --conflicts --repo Graphify-Labs/graphify
```

This adds the PRs that overlap in the graph, even when they edit different files. Two PRs that change different callers of the same function won't conflict in git, but they can still break each other.

## Step 3: Triage

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify prs --triage --repo Graphify-Labs/graphify
```

Triage asks an LLM to order the queue so the team knows what to look at first. It uses `GRAPHIFY_TRIAGE_BACKEND` if set, otherwise the first backend with an API key (Claude, Kimi, OpenAI, then Gemini), and falls back to a local Ollama model. Add `--wrong-base` to flag PRs aimed at the wrong branch.

## Step 4: Look at one PR

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify prs 4836 --repo Graphify-Labs/graphify
```

Pass a PR number to see its detail. Pair it with `graphify affected` from [Plan a refactor](https://docs.graphify.com/cookbooks/plan-a-refactor.md) on the functions it changes.

## Step 5: Agree a merge order

For each colliding pair:

1. Merge the smaller-impact PR first.
2. Ask the other author to rebase and rerun their tests.
3. Rebuild the graph with `graphify update .` and check the second PR's impact again.

## When it goes wrong

**`Error: gh ...` and exit code 1.** The command shells out to `gh`. Run `gh auth status`, and check that you can read the repository with `gh pr list --repo OWNER/REPO`.

**Impact shows `–`.** The PR changed files that aren't in the graph, such as docs or config, or the graph is stale. Rebuild with `graphify update .`.

**`Triage failed: No module named 'openai'`.** The table still prints, but triage needs an LLM client. Install the extra for your backend, for example `uv tool install "graphifyy[openai]"`, and set its API key.

**Wrong base branch.** Pass `--base main` (or `-b main`) when your repository's default branch isn't the one PRs target.

## Production patterns

* Run `graphify prs --triage` at the start of a review session and share the output in your team channel.
* Use `--worktrees` to see which PR branches are checked out locally.
* Agents can call the same views over MCP: the local server exposes `list_prs`, `get_pr_impact` and `triage_prs`. See [Self-host a shared MCP](https://docs.graphify.com/cookbooks/self-host-shared-mcp.md).
* In Graphify, the hosted product, connected repositories get [reviews](https://docs.graphify.com/platform/reviews.md) on each PR, with colliding PRs flagged.

## Complete example

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
gh auth status
graphify extract . --code-only
graphify prs --repo Graphify-Labs/graphify
graphify prs --conflicts --repo Graphify-Labs/graphify
graphify prs --triage --repo Graphify-Labs/graphify
graphify prs 4836 --repo Graphify-Labs/graphify
```

## What you built

Your team has a shared, graph-backed view of the PR queue: what each PR reaches, which ones collide, and a merge order that keeps the default branch green.

## Next steps

> **[Colliding pull requests](https://docs.graphify.com/concepts/colliding-pull-requests.md)**
>
> How Graphify detects PRs that touch the same code.

> **[Graph impact comment on every PR](https://docs.graphify.com/cookbooks/pr-impact-comment-ci.md)**
>
> Post the impact on each PR automatically.

> **[Try it in Graphify](https://docs.graphify.com/platform/quickstart.md)**
>
> We build and host the graph for you. Start with a 14-day Pro trial, then keep up to 3 repositories on Free. No card required.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.