diff --git a/src/content/docs/guides/agent-workflows/how-to-review-prs-like-a-senior-dev.mdx b/src/content/docs/guides/agent-workflows/how-to-review-prs-like-a-senior-dev.mdx
index 6fdd4d6bb..e620d0352 100644
--- a/src/content/docs/guides/agent-workflows/how-to-review-prs-like-a-senior-dev.mdx
+++ b/src/content/docs/guides/agent-workflows/how-to-review-prs-like-a-senior-dev.mdx
@@ -1,8 +1,8 @@
---
title: "Review PRs like a senior dev"
description: >-
- Prompt Warp's coding agent to generate structured PR reviews with risk
- assessment, critical issues, and merge confidence scoring.
+ Use Warp's agent to understand large pull requests, identify risky changes,
+ and investigate potential issues before leaving review comments.
sidebar:
label: "Review PRs like a senior dev"
tags:
@@ -11,92 +11,135 @@ tags:
---
import VideoEmbed from '@components/VideoEmbed.astro';
-import { Steps } from '@astrojs/starlight/components';
-Learn how to prompt Warp’s AI to review pull requests like an experienced engineer — focusing on structure, red flags, and clarity.
+Warp's agent can help you understand a large pull request, identify risky changes, and investigate potential issues before you leave review comments. This guide walks through how to give the agent enough context, ask for focused feedback, and verify its findings.
----
+## Prerequisites
+
+- A **Git-tracked project** with a branch or open PR to review
+- The [GitHub CLI](https://cli.github.com) (`gh`) if you want to pull diffs or view PR metadata
+
+## 1. Give the agent context
+
+The quality of the review depends on the quality of context you provide. Before prompting, gather the pieces the agent needs:
+
+**Pull the PR goal.** The diff alone doesn't tell the agent why changes were made. Start with the PR description:
+
+```bash
+gh pr view PR_NUMBER
+```
+
+**Get the diff.** The most focused way is:
+
+```bash
+# Patch-level diff via GitHub CLI
+gh pr diff PR_NUMBER
+
+# Or, if the branch is checked out locally
+git diff main...
+```
+
+**Point the agent at key files.** If you know which areas the PR touches, use `@path/to/file` in your prompt to give the agent direct access to those files. This lets it read the surrounding code — not just the changed lines — which is important for catching regressions and missing test coverage.
-
+**Run the test suite first.** If you have the branch checked out locally, run your tests before asking for a review. A failing test is faster to identify than a regression buried in prose.
-1. #### Intro
+Open a new agent session in Warp, navigate to the project directory, then attach context by selecting terminal output blocks or using `@file` references in your prompt.
- This tutorial teaches you how to use Warp to make **pull-request reviews faster and smarter**.\
- Instead of relying on AI summaries, you’ll prompt Warp to generate an **index and priority list**, guiding your review order while flagging risky sections.
+## 2. Ask for focused feedback
- Although this example focuses on large PRs, the same workflow applies to **code reviews**, **design docs**, or **feature diffs**.
+With context attached, give the agent a clear, goal-oriented prompt. Keep it direct — focused prompts produce more actionable output than heavy templates:
-2. #### The problem
+```
+I'm reviewing PR #PR_NUMBER. The goal is: [paste or summarize the PR description].
- Large PRs are difficult to parse.\
- AI summaries gloss over nuance and may miss subtle issues — you need structured, prioritized insight instead.
+I've attached the diff. Please:
+1. Check correctness — look for logic errors, off-by-one issues, or incorrect assumptions.
+2. Check for regressions — does anything touch code paths that existing tests don't cover?
+3. Flag security concerns — missing input validation, improper auth checks, hardcoded secrets.
+4. Note missing or inadequate tests.
+5. For each changed file, look at the surrounding code too, not just the changed lines. Call out anything that looks off in context.
+```
-3. #### The prompt
+Adjust the emphasis based on what the PR does — a database migration warrants different scrutiny than a UI refactor.
- Use this in Warp’s AI input:
+## 3. Verify the agent's findings
- ```
- ## Prompt: Structured PR Review Format
+Don't treat the agent's output as final. Before leaving review comments:
- > Review this pull request and format your response for rapid scanning by a busy maintainer. Follow the structure below.
+- **Run the tests.** If the agent flags a potential regression, check whether the test suite catches it.
+- **Read the flagged code yourself.** The agent can miss context or misread intent. Treat its output as a starting checklist, not a verdict.
+- **Test behavior changes manually.** For UI or interaction changes, check out the branch and verify in a browser. For cloud agent runs, you can use [Computer use](/agent-platform/capabilities/computer-use/) to let the agent verify behavior in a sandboxed environment.
- ---
+## 4. Use follow-up prompts to dig deeper
- ### 1. 🚨 Risk Assessment
+The first response is a starting point. Use follow-up prompts to investigate specific findings:
- **Overall Risk:** 🔴 HIGH | 🟠 MEDIUM | 🟢 LOW
- **Complexity:** [Simple | Moderate | Complex | Very Complex]
- **Blast Radius:** [Isolated | Module-wide | System-wide | External APIs affected]
- **Requires Immediate Review:** [YES / NO – why]
+- **Inspect a specific area**: "Look more closely at `auth/middleware.js` — are there edge cases in the token expiration logic?"
+- **Understand a concern**: "Explain the performance risk you flagged. How significant is it at 10k requests per minute?"
+- **Draft a fix**: "Write the fix for the input sanitization issue in the login form."
+- **Check scope**: "Does this PR include changes unrelated to the stated goal? List anything that seems out of scope."
+- **Split a large PR**: "Suggest how to split this PR into smaller, independently reviewable pieces."
- ---
+For large PRs, break the diff into logical groups of files and run the prompt once per group.
- ### 2. 🔍 Critical Issues
- _If none, write “None found” and skip to the next section._
+## Reference: structured output format (optional)
- #### 1. [CRITICAL ISSUE TITLE]
- **File:** `path/to/file.js:L125`
- **Impact:** Data loss / Security hole / System crash
- **Fix:**
- // Quick code fix example here
+If you want the agent's findings pre-formatted for rapid scanning — useful for async reviews or sharing with a team — add this format to your prompt. Use it as a structured report, but verify the findings before acting on them.
- ---
+```
+Review this pull request and format your response for rapid scanning. Follow the structure below.
- ### 3. ⚠️ Concerns
- _Should discuss or fix before merge. If none, write “None found.”_
+### 1. Risk Assessment
- **Examples:**
- - [PERFORMANCE] Unindexed query on large table
- - [SECURITY] Missing input sanitization in login form
+**Overall Risk:** HIGH | MEDIUM | LOW
+**Complexity:** [Simple | Moderate | Complex | Very Complex]
+**Blast Radius:** [Isolated | Module-wide | System-wide | External APIs affected]
+**Requires Immediate Review:** [YES / NO – why]
- ---
+---
+
+### 2. Critical Issues
+_If none, write "None found."_
+
+#### 1. [ISSUE TITLE]
+**File:** `path/to/file.js:L125`
+**Impact:** Data loss / Security hole / System crash
+**Fix:**
+// Suggested code fix
+
+---
- ### 4. 🎯 Maintainer Decision Guide
+### 3. Concerns
+_Should discuss or fix before merge. If none, write "None found."_
- **Merge confidence:** [0–100]%
- - □ Safe to merge after fixing blockers
- - □ Needs architecture discussion first
- - □ Requires performance testing
- - □ Get security team review
- - □ Author should split into smaller PRs
+- [PERFORMANCE] Unindexed query on large table
+- [SECURITY] Missing input sanitization in login form
- **Time to properly review:** ~[X] minutes
- **Recommended reviewer expertise:** [Backend | Security | Database | Frontend]
+---
+
+### 4. Merge decision
+
+**Merge confidence:** [0–100]%
+- [ ] Safe to merge after fixing blockers
+- [ ] Needs architecture discussion first
+- [ ] Requires performance testing
+- [ ] Get security team review
+- [ ] Author should split into smaller PRs
- ---
+**Time to properly review:** ~[X] minutes
+**Recommended reviewer expertise:** [Backend | Security | Database | Frontend]
+
+---
- ### 5. 🧭 Formatting Rules
+Keep sections short. If a section is empty, write "None found." Include code examples only for blockers. Use prefixes like [SECURITY], [PERFORMANCE], [LOGIC] for easy scanning.
+```
- - Use emoji headers for instant visual recognition
- - Keep sections short; if empty, say “None found”
- - Blockers get full detail, everything else stays concise
- - Include code examples only for blockers
- - Bold key impact/risk words
- - Use consistent prefixes like [SECURITY], [PERFORMANCE], [LOGIC] for easy scanning
- - If PR is genuinely fine, end with: ✅ “This PR is safe to merge as-is.”
+## Next steps
- ```
+Explore related guides and features:
-
+- [Review AI-generated code](/guides/agent-workflows/how-to-review-ai-generated-code/) — review and comment on code diffs directly in Warp's Code Review panel
+- [Attach agent session context to GitHub PRs](/guides/agent-workflows/how-to-attach-agent-session-context-to-github-prs/) — embed the prompt, plan, and agent decisions into the PR for your reviewers
+- [Code Review panel](/code/code-review/) — full reference for visual diffs and inline comments in Warp
diff --git a/src/content/docs/guides/external-tools/how-to-set-up-ollama.mdx b/src/content/docs/guides/external-tools/how-to-set-up-ollama.mdx
index b620bcf5e..a2f48bff7 100644
--- a/src/content/docs/guides/external-tools/how-to-set-up-ollama.mdx
+++ b/src/content/docs/guides/external-tools/how-to-set-up-ollama.mdx
@@ -11,76 +11,211 @@ tags:
---
import VideoEmbed from '@components/VideoEmbed.astro';
-Running AI models locally just got easier — and faster — with Ollama.\
-\
-In this guide, we’ll walk through how to use Warp to install, profile, and integrate Ollama into your local setup.
+Run AI models locally — with no API costs, no data leaving your machine, and your choice of model. This guide walks through installing Ollama, running your first model, integrating it into an existing app, and customizing model behavior using Warp.
----
+## Prerequisites
-### 1. Check your system specs
+**Hardware requirements**
-Before running large language models (LLMs) locally, confirm your hardware can handle them.
+You'll need enough memory to load the model weights. As a general estimate, plan on roughly 1GB of memory per billion parameters.
-Example setups:
+| Model size | Example models | Minimum RAM/VRAM |
+|---|---|---|
+| 3B | Llama 3.2 3B, Phi-3 Mini (3.8B) | 4GB |
+| 7–8B | Mistral 7B, Llama 3.1 8B | 8GB |
+| 13B | Llama 2 13B | 16GB |
+| 22–34B | Codestral (22B), Mixtral (46.7B total) | 24GB |
+| 70B | Llama 3.1 70B | 48GB |
-* Mac: 64GB unified memory — good for larger models but with lower throughput.
-* Windows (NVIDIA RTX 5090): 32GB VRAM — excellent performance, but limited by VRAM capacity.
+On Apple Silicon Macs, unified memory is shared between CPU and GPU. An M2 Mac with 16GB unified memory can run 7–8B models comfortably.
-> 🧠 Rule of thumb: You’ll need roughly 1GB of VRAM per billion parameters.
+**Software requirements**
----
+- macOS 14 Sonoma+, Windows 10+, or Ubuntu 20.04+
+- No account required — Ollama is free and open source
-### 2. Run your first model
+## 1. Install Ollama
-Run a model locally:
+**macOS**
-> ollama run gpt-oss
+Run the install script in your terminal:
-For example:
+```bash
+curl -fsSL https://ollama.com/install.sh | sh
+```
-* Try GPT-OSS 20B (requires ≥16GB VRAM, supports tool calling).
-* Then try Mistral 8B for a faster, smaller alternative.
+Or download the macOS app manually from [ollama.com/download](https://ollama.com/download/Ollama.dmg). The app runs as a background service and appears in your menu bar.
-Compare their performance and quality side-by-side.\
-Use Warp to easily monitor GPU usage and model response time.
+**Linux**
----
+```bash
+curl -fsSL https://ollama.com/install.sh | sh
+```
-### 3. Understanding model terms
+On systemd-based Linux distributions, the installer typically registers Ollama as a service. To start it and enable it on boot, run:
-Here’s a quick glossary for choosing the right local model:
+```bash
+sudo systemctl enable ollama
+sudo systemctl start ollama
+```
-| Term | Meaning |
-| ---------------- | ------------------------------------------------------------------ |
-| **Thinking** | The model “thinks” before answering; better for complex reasoning. |
-| **Tools** | Models can use external utilities (e.g., web search). |
-| **Vision** | Can process and respond to images. |
-| **Embedding** | Converts text to numeric form for search or RAG pipelines. |
-| **Quantization** | Reduces memory use by lowering precision (e.g., 4-bit). |
+**Windows**
----
+Run this in PowerShell:
-### 4. Integrate Ollama into your app
+```powershell
+irm https://ollama.com/install.ps1 | iex
+```
-Most apps use OpenAI-compatible APIs, so integration is simple.
+Or download the installer manually from [ollama.com/download](https://ollama.com/download). Ollama runs as a background service after installation.
-1. Open your app’s code in Warp.
-2. Locate the OpenAI client initialization.
-3. Replace the base URL with Ollama's
-4. Update your API key and model name.
+## 2. Run your first model
-Warp helps you quickly locate, edit, and test the integration directly from the terminal.
+Pull a model to download it locally. This example uses Llama 3.2 (3B), a lightweight model that runs on most hardware:
----
+```bash
+ollama pull llama3.2
+```
+
+Then start an interactive chat session:
+
+```bash
+ollama run llama3.2
+```
+
+Type your prompt and press Enter. Type `/bye` to exit the session.
+
+To try a larger model with stronger reasoning:
+
+```bash
+ollama run llama3.1:8b
+```
+
+Use `ollama ls` to see all models you've downloaded, and `ollama ps` to see which models are currently loaded in memory.
+
+## 3. Understand model types
+
+When browsing [ollama.com/library](https://ollama.com/library), you'll see labels on models that indicate their capabilities:
+
+| Label | Meaning |
+|---|---|
+| **thinking** | The model reasons step-by-step before answering; better for complex problems. |
+| **tools** | The model can call external functions or utilities (e.g., web search). |
+| **vision** | The model can process and respond to images. |
+| **embedding** | Converts text to numeric vectors for search or RAG pipelines. |
+
+Quantized models (e.g., `q4_0`, `q8_0` variants) use significantly less memory than full-precision originals. Start with a quantized version if you're memory-constrained.
+
+## 4. Compare model performance
+
+To benchmark models side by side, Warp makes it easy to run prompts in parallel tabs and compare results. Pass a prompt and the `--verbose` flag to get timing stats alongside the response:
+
+```bash
+ollama run --verbose llama3.2 "Summarize the Rust ownership model in one paragraph"
+```
+
+Run the same prompt on two different models to compare output quality and throughput before committing to one.
+
+To see which models are currently loaded and their memory usage:
+
+```bash
+ollama ps
+```
+
+## 5. Integrate Ollama into your app
+
+Ollama exposes an OpenAI-compatible REST API at `http://localhost:11434/v1/`. You can drop it in wherever you're currently using the OpenAI API — just update three values:
+
+1. **Base URL** → `http://localhost:11434/v1/`
+2. **API key** → any non-empty string (e.g., `"ollama"` — required by the SDK but ignored by Ollama)
+3. **Model name** → the name of your local model (e.g., `"llama3.2"`)
+
+**Python (OpenAI SDK)**
+
+```python
+from openai import OpenAI
+
+client = OpenAI(
+ base_url="http://localhost:11434/v1/",
+ api_key="ollama", # required by the SDK but ignored by Ollama
+)
+
+response = client.chat.completions.create(
+ model="llama3.2",
+ messages=[
+ {"role": "user", "content": "Explain async/await in Python"}
+ ]
+)
+
+print(response.choices[0].message.content)
+```
+
+**Node.js (OpenAI SDK)**
+
+```javascript
+import OpenAI from "openai";
+
+const client = new OpenAI({
+ baseURL: "http://localhost:11434/v1/",
+ apiKey: "ollama", // required by the SDK but ignored by Ollama
+});
+
+const response = await client.chat.completions.create({
+ model: "llama3.2",
+ messages: [{ role: "user", content: "Explain async/await in Python" }],
+});
+
+console.log(response.choices[0].message.content);
+```
+
+Ollama also provides official native libraries if you prefer an SDK built specifically for Ollama rather than the OpenAI compatibility layer: `pip install ollama` for Python and `npm i ollama` for JavaScript. See the [Ollama README](https://github.com/ollama/ollama) for details.
+
+Open your app's code in Warp and use the agent to locate the OpenAI client initialization, swap in the new values, and test the connection — all from the same terminal session.
+
+## 6. Customize model behavior
+
+You can create a custom model variant by writing a `Modelfile` — a configuration file that sets a system prompt, adjusts generation parameters, or builds on any existing Ollama model.
+
+Create a file called `Modelfile`:
+
+```
+FROM llama3.2
+
+SYSTEM """
+You are a focused code review assistant.
+Always identify security issues first, then logic errors, then style.
+Keep feedback concise and actionable.
+"""
+
+PARAMETER temperature 0.3
+PARAMETER num_ctx 8192
+```
+
+Then build and run your custom model:
+
+```bash
+ollama create code-reviewer -f ./Modelfile
+ollama run code-reviewer
+```
+
+Your custom model is saved locally and available any time you run `ollama run code-reviewer`. Ask Warp's agent to generate a Modelfile for a specific use case — describe what you want the model to do, and let the agent write the configuration.
+
+## Productivity tips
-### 6. Customize model behavior
+- **Unload to free memory** — Use `ollama stop ` to unload a model from memory before loading a larger one.
+- **Script with the REST API** — For quick testing without the SDK: `curl http://localhost:11434/api/chat -d '{"model": "llama3.2", "messages": [{"role": "user", "content": "Hello"}], "stream": false}'`
+- **Keep a model inventory** — `ollama ls` shows all locally cached models with their sizes and download dates. Use `ollama rm ` to delete models you no longer need.
+- **Compare models in parallel** — Open side-by-side Warp tabs and run the same prompt against two different models to compare quality and speed before deciding which to use in your app.
-Pull and modify a model.
+## Next steps
-Then save it as a custom model with new settings like temperature or system prompt.
+You have Ollama installed, a model running locally, and a path to integrate it into any app using the OpenAI-compatible API.
-Use Warp to generate a model file automatically.
+Explore related guides and features:
-This adds a structured system prompt for that task — ready to use instantly.
+- [Set up Claude Code](/guides/external-tools/how-to-set-up-claude-code/) or [Set up Codex CLI](/guides/external-tools/how-to-set-up-codex-cli/) — use cloud-based agents alongside your local Ollama setup
+- [Run multiple agents at once](/guides/agent-workflows/how-to-run-multiple-ai-coding-agents/) — run Ollama and a cloud agent in parallel to compare outputs on the same task
+- [Ollama model library](https://ollama.com/library) — browse all available models with size and capability details
+- [Ollama documentation](https://github.com/ollama/ollama/blob/main/README.md) — advanced configuration, GPU setup, and environment variables