Skip to content
Source
Sign inSign up

Read the architecture

Software factory / Architecture

Read the architecture of a repository

You open a repository that you do not know. You want to make one change, but you do not know where the parts are, or how they connect.

5 min read

The Architecture tab shows this on one page:

  • an overview
  • diagrams that each answer one question
  • a graph of the packages and how they depend on each other

An agent of the software factory writes it from the code of the default branch, and updates it after merges.

1. Open the Architecture tab

Pick one:

  • Click the Architecture tab at the top of the repository.
  • On the home page of the repository, click View architecture under About.

The address is /@<owner>/<repo>/architecture. Everyone who can read the code of the repository can open it.

2. Pick a tab

The header says which commit of the default branch the page describes, when it was updated, and which model wrote it. Below the header, the page has three tabs:

  • Overview: what the repository does, its main parts, and where to start reading.
  • Diagrams: graphs of boxes and arrows. Each graph has a question as its title, for example how a request goes through the parts. The bullets below the graph explain it.
  • Packages: a graph of how the packages depend on each other, and a list of all the packages.

Each tab has its own address, for example /@<owner>/<repo>/architecture?tab=packages. Send it to a teammate, and they open the same tab.

On a graph, move the pointer over a box, or move the focus to it with Tab. The boxes and arrows that do not connect to it fade, so you see its links.

Note

An AI model wrote the page from the code. Use it as a map, and read the code before you rely on a detail.

The Packages tab: a graph of four packages with the CLI package selected, and its row open below with its folder, How to use it, When to use it and Skills.

3. Find the package to change

  1. Open the Packages tab.
  2. Find the package that does the job that you want to change. In the graph, an arrow goes from a package to a package that it uses. The list below the graph shows each package with one line about what it does.
  3. Click the package, in the graph or in the list. Its row in the list opens, and the page scrolls to it.

The open row shows the folder of the package and what the package does. Then it shows the parts that the package has:

  • How to use it and When to use it.
  • Skills: the folders with a SKILL.md inside the package. Click a skill to read its SKILL.md.
  • Key files: the files to open first. Click a file to open it.
  • Depends on and Used by. Click the name of a package to open its row.

One row is open at a time. To close it, click its name again. The open row has its own address too: ?tab=packages&package=<name>. When the repository has one package, the Packages tab shows its details with no graph.

4. Make your change

  1. Open one of the Key files of the package.
  2. Read Used by in the open row. Your change can break these packages, so test them too.

Tip

If the page does not answer your question, click Ask about the architecture in the header. An agent answers from the view and the code, and it can draw a diagram for you. See Ask an agent about the architecture.

Done

The Architecture tab shows a map of the repository. You see its parts, how they connect, how to use each package, and the files to start from. It updates itself after the merges that change the architecture.

Read it from your agent

Your coding agent can read the same view before it changes code. For each package, it also gets how to use it, when to use it, and its skills.

In the JSON of the REST API and MCP, and in src repo architecture --json skills, the skills are in the field skills, by package name.

To start your agent on your computer at the commit of the view, click Send to my agent in the header of the tab. See Send to your agent.

For admins: keep it up to date

The Architecture agent is off by default. Turn it on, and the tab stays current. To turn it on, make a view now, watch a run, change the model or turn the agent off, see Keep the architecture up to date.