---
title: "How do you give AI coding agents context across multiple repositories?"
url: "https://reposwarm.ai/index.md"
canonical: "https://reposwarm.ai/"
tags: []
author: "Roy Osherove"
description: "RepoSwarm analyzes your repositories, generates standardized .arch.md architecture files and commits them to a central results hub that AI coding agents can read as context."
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# How do you give AI coding agents context across multiple repositories?

> RepoSwarm is open-source (Apache-2.0) multi-repo architecture discovery for AI coding agents: it generates standardized .arch.md files per repository and commits them to one results hub repository.

HTML: https://reposwarm.ai/ · Guide for AI systems: [llms.txt](https://reposwarm.ai/llms.txt) · Full text: [llms-full.txt](https://reposwarm.ai/llms-full.txt)

Open-source multi-repo architecture discovery

Use **RepoSwarm**: it analyzes each of your repositories and generates a standardized `.arch.md` architecture file.

It commits those files to one **central results hub** repository that your coding agents can read as context.

[See real output](https://github.com/royosherove/repo-swarm-sample-results-hub/blob/main/repo-swarm.arch.md)[Install the CLI](https://github.com/reposwarm/reposwarm-cli)[RepoSwarm on GitHub](https://github.com/reposwarm/reposwarm)

RepoSwarm is open-source software under the Apache-2.0 license. The same hub also works for onboarding and architecture reviews.

Illustration: repositories are investigated one by one; the resulting .arch.md files land in a single hub repository that an agent reads.

## Who it is for, and who should look elsewhere

RepoSwarm fits one specific job: a consistent, versioned architecture picture across many repositories.

### A good fit if you

- are an architect or developer who needs one shared picture across many repositories, not another manually maintained wiki;
- want coding agents to start from documented architecture instead of re-reading every repository;
- want the output as plain Markdown files in a git repository you control;
- can run Docker-based services and connect a model backend.

### Probably not the right tool if you

- need a code generator or something that fixes your architecture: RepoSwarm describes, it does not change code;
- need verified, guaranteed-correct answers without review: generated findings still need a human check;
- mainly need to search code across an estate: a code search tool fits that job better;
- want a single text-file utility: the local setup runs several services, not just a CLI.

## How it works

RepoSwarm runs AI investigations over each repository with prompts specialised by repository type, and commits standardized Markdown to a hub.

1. ### Add repositories

    Register the repositories to analyze from your configured git provider.

2. ### Investigate

    Type-aware prompts cover backend, frontend, mobile, libraries and infrastructure, plus shared topics such as security, auth and monitoring.

3. ### Commit to the hub

    Each repository gets a standardized `.arch.md` file, committed to one central results hub repository.

4. ### Give agents the hub

    Agents read the hub as context. Only repositories with new commits are re-analyzed, with DynamoDB or file-based caching.

### Quickstart, as documented

These commands are copied from the current [RepoSwarm CLI README](https://github.com/reposwarm/reposwarm-cli). Install the CLI from that README; this page does not repeat the installer command.

Querying results has moved to the standalone [`ask` CLI](https://github.com/reposwarm/ask-cli): install it from its README, then run `ask setup`, which detects the RepoSwarm configuration. `reposwarm results` still works but shows a deprecation notice.

Every RepoSwarm CLI command supports `--for-agent` for plain, machine-friendly output and `--json` for structured output.

Shell commands: reposwarm CLI, then the ask CLI

```bash
reposwarm new --local
reposwarm doctor
reposwarm repos add my-app --url https://github.com/org/my-app
reposwarm investigate my-app
ask setup
ask "how does auth work across services?"
```

## What it supports

From the current RepoSwarm and RepoSwarm CLI READMEs, checked 7 November 2026.

Git providers

GitHub, GitLab, AWS CodeCommit, Azure DevOps and Bitbucket.

Source: RepoSwarm README.

Model backends

Anthropic API, Amazon Bedrock, or a LiteLLM proxy.

OpenAI and Gemini are not built-in providers; they are reached only through LiteLLM. The prompts are optimized for Claude, and quality may vary with other models.

Source: RepoSwarm CLI README.

Prerequisites

Docker must be running, not just installed: the services run as containers. Git is needed to clone repositories during investigation.

Investigations run as Temporal workflows. The local setup bootstraps Temporal, the API, a worker and a UI.

Source: RepoSwarm README.

Output

Standardized `.arch.md` architecture files, committed to a central results hub repository.

Source: RepoSwarm README.

License

RepoSwarm core: [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). The CLI repository and the sample results hub are published under MIT.

Source: each repository’s LICENSE and README.

## Real output from the public sample hub

This excerpt is copied from an actual `.arch.md` file in the public [sample results hub](https://github.com/royosherove/repo-swarm-sample-results-hub), which RepoSwarm generated about its own earlier codebase.

The file is organised into investigation sections. Its top-level sections include:

`hl_overview · module_deep_dive · dependencies · core_entities · DBs · APIs · events · service_dependencies · deployment · authentication · authorization · data_mapping · security_check · monitoring · ml_services · feature_flags · prompt_security_check · data_layer · events_and_messaging`

Excerpt of repo-swarm.arch.md, lines 483–491. [Open the file at this commit](https://github.com/royosherove/repo-swarm-sample-results-hub/blob/269d4f099dc5395531480e6509ed8cf7cc2a92e9/repo-swarm.arch.md).

```markdown
### Temporal
**Dependency Name**: Temporal.io
**Type**: Workflow Engine Service
**Purpose/Role**: Orchestrates distributed workflows and background jobs
**Integration Point**:
- Required package `temporalio>=1.15.0` in pyproject.toml
- Environment variables in Dockerfile (`TEMPORAL_SERVER_URL`, `TEMPORAL_NAMESPACE`, etc.)
- Workflow-related files in src/workflows/
```

File: `repo-swarm.arch.md`, lines 483–491 (trailing whitespace trimmed).

Commit: `269d4f099dc5395531480e6509ed8cf7cc2a92e9` (8 October 2025), the last commit that changed this file.

The snapshot describes an older version of the RepoSwarm codebase, so read it as an example of the output format, not as current architecture.

## Which tool fits the job?

These tools overlap, but they are not identical replacements. The descriptions summarise what each maintainer documents; nothing here was benchmarked.

**Vendor-authored.** RepoSwarm was built by Moshe, Idan and Roy Osherove at a Verbit hackathon, and this page is published by Roy. It is not an independent review.

**Checked 7 and 8 November 2026.** Each row is based on the linked primary sources on those dates. Products change; check the sources before deciding.

**“Unknown” means unknown.** It means not verified in this review, not that a feature is missing.

| Tool | Documented approach | Multi-repo and agent context | Trade-offs and unknowns |
| --- | --- | --- | --- |
| RepoSwarm \[1, 2\] | AI investigations produce `.arch.md` files committed to a central hub. Apache-2.0. | Portfolio-wide analysis into agent-readable Markdown. The CLI has `--for-agent` and `--json`; the `ask` CLI and askbox query the results. | Runs Temporal and container services plus a model backend. Capacity at hundreds of repositories, accuracy, time and cost: unknown in this review. No MCP server is documented in the current READMEs. |
| repowise \[3, 4\] | Indexes code, git history, tests and decisions: a call or dependency graph, a generated wiki, decisions and a code-health score. AGPL-3.0 core. | Documented multi-repo workspaces, cross-repo contracts and co-change, and MCP tools. | Self-hosted and hosted options. Graph, risk, health, tests and dead-code analysis are documented as making no LLM calls, with no API key needed to index. Performance at your portfolio size: unknown. |
| DeepWiki \[5\] | Hosted generated wikis with architecture diagrams, summaries and links to source. A free version works with public GitHub repositories. | Public documentation and Q&A, including a public DeepWiki MCP server. Private repositories go through Devin. | A comparable cross-repo portfolio investigation workflow, or a self-hosted equivalent: not established here. |
| Sourcegraph \[6, 7, 8\] | Code Search across repositories and code hosts, on any branch or commit; Deep Search is an agentic code search tool that answers natural-language questions about your codebase. | The Sourcegraph MCP server gives AI agents programmatic access to an instance’s code search, navigation and analysis, including Deep Search tools. | Strong candidate when finding code across an estate is the main job. Documented plans: Code Search and Deep Search on Enterprise Starter and Enterprise, the MCP server on Enterprise. The same versioned Markdown-hub workflow: not established here. Pricing not evaluated. |
| Backstage \[9\] | A software catalog built from metadata YAML files stored with the code. | Organization-wide software discovery and a developer portal. | Teams maintain the metadata; it is a different job from investigating code into architecture summaries. AI and plugin features not evaluated. |

Facts as documented by each maintainer, checked 7 and 8 November 2026. Numbers refer to the sources below.

Choose **RepoSwarm** when you want consistent investigation output that you own as Markdown across repositories.

Evaluate **repowise** when a graph, git history and MCP tools are the context you need.

Look at **Sourcegraph** when cross-repo code search is the core job.

**DeepWiki** is convenient for reading a generated wiki of a repository.

**Backstage** solves catalog and ownership discovery, and can complement these tools.

### Comparison sources

1. [RepoSwarm README](https://github.com/reposwarm/reposwarm): https://github.com/reposwarm/reposwarm
2. [RepoSwarm CLI README](https://github.com/reposwarm/reposwarm-cli): https://github.com/reposwarm/reposwarm-cli
3. [repowise README](https://github.com/repowise-dev/repowise): https://github.com/repowise-dev/repowise
4. [repowise documentation index (llms.txt)](https://docs.repowise.dev/llms.txt): https://docs.repowise.dev/llms.txt
5. [DeepWiki documentation (Devin docs)](https://docs.devin.ai/work-with-devin/deepwiki): https://docs.devin.ai/work-with-devin/deepwiki
6. [Sourcegraph Code Search documentation](https://sourcegraph.com/docs/code-search): https://sourcegraph.com/docs/code-search
7. [Sourcegraph Deep Search documentation](https://sourcegraph.com/docs/deep-search): https://sourcegraph.com/docs/deep-search
8. [Sourcegraph MCP Server documentation](https://sourcegraph.com/docs/api/mcp): https://sourcegraph.com/docs/api/mcp
9. [Backstage Software Catalog documentation](https://backstage.io/docs/features/software-catalog/): https://backstage.io/docs/features/software-catalog/

## What it does not solve

Generated findings still need human review.

- **Not a complete dependency graph.** Generated findings are inferred by a model from the code. They are not a guaranteed-correct runtime dependency graph.
- **Not a compliance certificate.** A package reference is not proof that a service is deployed, and the output is not a complete vendor inventory.
- **Not an architecture fix.** RepoSwarm describes what it finds. Deciding and changing things is still your job.
- **Not a data-flow guarantee.** Running the services yourself does not mean source never leaves your network: check model requests, provider configuration, git credentials and results-hub access before using private code.

## Questions

How does an agent use the hub?

Give the agent the hub repository as context, for example as another project in its workspace. The [`ask` CLI](https://github.com/reposwarm/ask-cli) and [askbox](https://github.com/reposwarm/reposwarm-askbox) can also query the generated documentation.

Does RepoSwarm have an MCP server?

No MCP server is documented in the current RepoSwarm or CLI READMEs, so this page does not claim one.

Can I use OpenAI or Gemini models?

Only through a LiteLLM proxy. The built-in backends are the Anthropic API, Amazon Bedrock and LiteLLM.

How much does analyzing hundreds of repositories cost?

Unknown until measured. It depends on the number and size of repositories, the model and the provider. No measured run is published here.

## Read more

- [RepoSwarm on GitHub](https://github.com/reposwarm/reposwarm): Source, quickstart and ecosystem.
- [RepoSwarm CLI](https://github.com/reposwarm/reposwarm-cli): Install, setup and the documented commands.
- [Sample results hub](https://github.com/royosherove/repo-swarm-sample-results-hub): Generated .arch.md files for public repositories.
- [RepoSwarm: Give AI Agents Context Across All Your Repos](https://robotpaper.ai/reposwarm-give-ai-agents-context-across-all-your-repos/): The original RobotPaper post (18 September 2025).

The RepoSwarm software is licensed Apache-2.0 by its maintainers. That license is separate from this page’s text license. Third-party product names and the facts quoted about them in the comparison belong to their owners.

## For agents and plain-text readers

Everything on this page is also available as plain Markdown. No JavaScript is needed.

- [`/index.md`](https://reposwarm.ai/index.md) This page as Markdown
- [`/llms.txt`](https://reposwarm.ai/llms.txt) Site index for language models
- [`/llms-full.txt`](https://reposwarm.ai/llms-full.txt) The full text in one file

## Pages



---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
