A repository onboarding guide agent for Claude Code, Codex and Cursor
Repo Guide writes an onboarding guide for an indexed repository, citing the files it describes. It works from the workspace's code index, decisions and lessons, and the context ContextStream picks for the job.
Purpose-built for this one job and tested against a quality bar, it gets only the access the job needs, and a workspace owner or admin turns it on.
Or run it in the ContextStream web app, signed in with your ContextStream account. Version 0.1.0 · Updated
What does Repo Guide do?
Writes an onboarding guide for an indexed repository: architecture, where things live, how to build, run and test it, with file:line citations and a diagram.
What it declines
It does one job. A task like one of these is declined with a reason:
Changing code, writing tests or opening pull requests.
Reviewing a diff or a pull request.
Checking whether the docs are out of date (Docs Drift does that).
Answering questions that are not about how the repository is organised or used.
What can Repo Guide access, and is it safe to turn on?
Repo Guide gets a short-lived token for one workspace that lets it do only this: search the workspace's code index; read the workspace's decisions and lessons; save one note per run; read the lessons, preferences and decisions ContextStream picks for its job; mark the context items its result cited as helpful; and call models through ContextStream's model proxy, within a cap set for the run. It works in one project, only for that run, and declines any task outside its job. The only things Repo Guide may change are these: it may save one note per run; and mark the context items its result cited as helpful. A workspace owner or admin turns it on.
Model agent. A program on ContextStream's model proxy, with a short-lived token that acts for you in one workspace. It is stopped after 2 min.
Scope
What it lets a run do
search.read
Search the workspace's code index
memory.read
Read the workspace's decisions and lessons
memory.write.note
Save one note per run
context.read
Read the lessons, preferences and decisions ContextStream picks for its job
context.feedback
Mark the context items its result cited as helpful
model.invoke
Call models through ContextStream's model proxy, within a cap set for the run
How is Repo Guide tested?
Repo Guide is checked on 7 cases, each with a known right answer: indexed repositories with known build, run and test commands, and inputs it must refuse or decline. A case passes only if the run ends the way the case expects, declining what is not its job, and every check holds: every reference resolves to something the index or the workspace holds, the repository's real commands are found, no invented command gets in, and there is a diagram when one is expected. The index and the model's replies are fixed test data, so the cases check how the guide is held to the repository, not the live model's own writing. Version 0.1.0 passes all 7.
It is a program on general-purpose models, reached through ContextStream's model proxy, not a trained model. Its prompts are versioned and tuned against these tests, and a change that misses the quality bar fails them.
What does a real run of Repo Guide look like?
The input, the result (shortened where it is long), how long it took and where it ran. Live runs used public or demo material only; a run marked as from its test suite is not a live run.
Live run on ContextStream
An onboarding guide to the search tool of a public MCP server
Version
0.1.0
Outcome
succeeded
Ran
2026-10-27 17:19 UTC
Took
16.1 s
ContextStream's Demos workspace (demo material only), in a project that indexes the public repository github.com/contextstream/mcp-server at v1.0.34.
{
"project_id": "6aad1065-8086-4114-931e-1b16c1d9b234",
"focus": "the search tool"
}
Result
Summary
This is the ContextStream MCP server: a Rust workspace that exposes MCP domain tools (search, project, session and more) over stdio and HTTP, acting as a client of ContextStream's hosted API. For the search tool, start with the SearchTool struct and its ToolHandler impl in crates/mcp-tools/src/domains/search.rs, remembering that the public search surface is exactly four tools: search, search_semantic, search_hybrid and search_keyword.
Overview
The search tool is one domain module inside the mcp-tools crate. crates/mcp-tools/src/domains/search.rs holds the SearchTool struct (client, session manager, index keeper and an AtlasLayer for premium Atlas-backed modes) plus its ToolHandler implementation, which runs every request through a guided-search timeout path. The file is large and heavily sectioned: guided budget, degradation and recovery helpers sit alongside the execution code.
Requests reach it through two doors. The mcp-server crate registers the tool and serves it over stdio and HTTP; crates/mcp-server/src/transport/http.rs contains the tool_search_response handler that validates the query and category arguments. Separately, the tool_search meta tool in crates/mcp-server/src/server.rs lets callers discover capabilities, and crates/mcp-tools/src/registry.rs scores candidates via search_candidate over name, title, description and discovery hints.
Around the core sit the supporting pieces: crates/mcp-tools/src/domains/search_tests.rs pins the expected tool count, crates/mcp-tools/src/domains/session.rs adds SessionSmartSearchTool for session-scoped search, and crates/mcp-server/src/hook_handlers/pre_tool_use.rs maps the search tool name per editor format. docs/architecture.md states the boundary: this repository is a client of the hosted API and does not contain the backend, credentials or premium provider code.
Where things live
Area
Cited at
What it is
Search tool core
crates/mcp-tools/src/domains/search.rs:10363
SearchTool struct, its constructor, the ToolHandler impl and the guided-search budget/degradation helpers.
Search execution entry
crates/mcp-tools/src/domains/search.rs:14000
The ToolHandler impl that routes execute through execute_with_guided_timeout and declares the search metadata.
Search tool tests
crates/mcp-tools/src/domains/search_tests.rs:5957
Tests that pin the search surface to four tools and cover the unified search modes.
Tool registry and discovery
crates/mcp-tools/src/registry.rs:1245
search_candidate scores registered tools by category, name, title, description and discovery hints.
tool_search meta tool
crates/mcp-server/src/server.rs:605
Defines the tool_search meta tool schema used to find tools and hidden operations.
HTTP tool_search handler
crates/mcp-server/src/transport/http.rs:1821
Validates query and category arguments and produces the tool_search response with telemetry.
crates/mcp-tools/src/domains/search.rs:10363: The SearchTool struct and every dependency it holds.
crates/mcp-tools/src/domains/search.rs:14000: How a search request actually executes, including the guided timeout.
crates/mcp-tools/src/domains/search_tests.rs:5957: Names the four search tools the surface must expose.
crates/mcp-server/src/server.rs:605: The tool_search meta tool schema callers use to discover tools.
docs/architecture.md:1: Sets the boundary of what this repository does and does not contain.
Checks: 4 of 4 passed
index_read: 14 of 14 lookups answered; 40 items found.
citations: Every reference is to an item found in the index or the workspace.
commands: 2 command(s), each written in a cited file.
workspace_context: 0 context items from ContextStream for this job, about 245 tokens.
5 more areas are left out here.
Task
f40c0fbd-473b-4461-ada8-1e4b0f5d834e
Which tools does Repo Guide work with?
Claude Code, Codex, Cursor and other MCP clients: ContextStream's MCP gives them an agents tool that finds, runs and follows Repo Guide. It also runs from a terminal or an agent's shell with csa run guide, and from the ContextStream web app.
Claude Code, Codex, Cursor and other MCP clients: connect ContextStream's MCP once (setup for each editor), then ask your agent to hand the job to Repo Guide.
A terminal or an agent's shell:csa run guide, installed with ContextStream's command line.
The web app: the workspace's agent library.
How do I turn Repo Guide on?
An owner or admin of your ContextStream workspace turns Repo Guide on in the web app's agent library. Agents are opening workspace by workspace; if yours is not open yet, the library says so.
Sign in to ContextStream: the button below opens the agent library on Repo Guide.
An owner or admin switches Repo Guide on for the workspace.
Pick the project it works in, and run it from the library, from your coding agent or with csa run.
How do I call Repo Guide from Claude Code or Codex?
Ask your coding agent to hand the job to Repo Guide, or call it yourself: csa run guide in a terminal, or agents(action="run", agent="guide", input={...}) over MCP.
Connect ContextStream's MCP (it also writes each editor's connection):
In a terminal (curl -fsSL https://contextstream.io/cs/install.sh | sh installs csa):
csa run guide project_id=00000000-0000-4000-8000-0000000000a1
Input
Field
Type
What it is
project_id
string, required
The indexed project (repository) to explain.
focus
string
A part of the repository to go deeper on, for example "the billing service".
save_note
boolean
Save the guide as a note in the project.
What does Repo Guide cost?
Repo Guide costs 500 ContextStream credits a run, charged only when the run succeeds; a declined, failed, cancelled or timed-out run costs nothing. Credits come with every plan: Starter is free with 10,000 a month (20 runs of Repo Guide, if spent on nothing else), and Pro is $19 a month with 25,000.
A run starts only once its price is accepted. Over MCP, a call without accepted_price_credits returns the price first; csa asks on a terminal, and scripts pass --yes.
CI Fixer reproduces a failing test command in a public repository and returns the smallest change to the project's code that makes it pass, with the passing output.
Checked on 13 test cases with known answers: all 13 passv0.1.0