All guides

Reading the Architecture view

The Architecture view draws the code in your session’s repository as a map: features, the files inside them, and the imports between them. Use it to see how a codebase fits together before you change it, and to see what a branch did to that shape. It gives you and your agents one correct, shared picture of how the code fits together, read from Git at any commit.

Imagine:

The Architecture tab on the Graph view for a small invoicing project: feature boxes with their files and wires between them, and the Architecture section with its System overview in the right column

The shot shows the Graph view of a small project: boxes for features such as Invoicing, Tax and Money with their files and functions, wires for the imports between them, and the right column’s Architecture section listing the features and a System overview with counts.

What the map shows

The map is read from Git, not from a checkout, so it can show any commit. It supports the languages the editor highlights, including C and C++.

Open it

Read it

The tabs give three views of the same map:

A project with nothing set up shows all three tabs and opens on Graph. Matrix and Layers show a Set up with an agent empty state there. Once a project is set up, a tab only shows when it has something to say: Matrix hides with fewer than two features and no sub-parts, and Layers hides when no layers are defined.

The lens button reads Showing: Today or Comparing: …. It picks what the map compares:

On any lens other than Today, new, removed and changed links and files are marked, and features that didn’t change fold behind one button.

Other controls:

Select a feature or file to see it in the Inspector. Double-click it, or press Enter in the Inspector, to draw only that feature and its neighbours. Show everything or Esc takes you back out. Hold ⌘ or Ctrl and scroll to zoom the Graph.

Ask about a part

Each part, file, cell and external node can carry a thread. Open one from the small mark on the node, write your question, and the active session answers in it.

Select a part and choose Explain this part to ask the agent to explain it. The question goes to your session, so it answers with the code open.

External packages and APIs

Packages and APIs your code calls but doesn’t own show as external nodes. Select one to see where your code uses it.

Let an agent set it up

Out of the box, files that no pattern claims all sit in Unmapped. The first time you open the view in a project with no saved rules, it says so and offers Set up with an agent.

Two things get set up:

The agent works out likely mechanisms from your code, tests each rule against it and saves the ones that match. Rules, patterns and file descriptions are saved for the project. A rebuild of the map doesn’t remove them.

Three buttons send a prompt to your active session. Nothing runs until the agent does it:

Rules in the view’s header opens a popover with a count (Rules 3). It lists each rule with its matches, its unanswered calls and unused handlers, and flags a rule that matches nothing any more.

The agent reads and writes the setup through its own tools. It can also read the map as a script, to answer questions about many files at once. Grep stays better for single lookups.

When you review a change

In the Review Room, the What to show menu has an Architecture diff item. It swaps the file list for the same Branch lens map, from the PR’s base to its head. SimpleEdit reads it from Git, so you don’t have to check the branch out.

The item is always listed. When it can’t work, it is greyed out and says why:

If the clone lacks the commits, SimpleEdit fetches them first. It never checks out or merges anything. If the map can’t be loaded, the panel says why and offers Show the files.

In a session’s own Review Room, Show in Architecture opens the Architecture tab on the Branch lens. Selecting a node in the review moves the focus in the right column. Elsewhere, such as the Review queue, a node opens a small details popover.