Skip to main content

Mapping your code

Mapping your code is the one step you have to do on Discovery. Nothing else on the page, or in Learn, works until you have. It is what everything else in Knowledge is grounded on.

How do I run it?

Once a repository is connected, click "Map code" in the top-right of the page (it reads "Re-map code" once a model already exists; the button label reflects whether a codebase model exists yet, not whether one is currently running). This starts a run that:

  • Clones and reads each connected repository.
  • Builds a map of files, languages, frameworks, and entry points.
  • Uploads that map so ACE's agents and Learn can use it.

While it is running, a run card appears above the tabs. See Watching a discovery run for what it shows. When it finishes, results populate the Codebase tab.

Re-running "Re-map code" at any time refreshes the model, which is useful after you push significant changes to your repositories.

Right after a code map finishes, you may see a banner: "Generating discovery docs in the background — this may take a few more minutes." ACE continues writing documentation from the fresh map after the run itself is marked done; this is what eventually shows up in Learn. That banner stays visible for about ten minutes.

What's on the Codebase tab?

This is where mapped results land once a run finishes. Until then it reads "No codebase model yet — run a code map to populate this view." Once populated, one card per connected repository shows:

  • The repository name and how long ago it was mapped.
  • Detected frameworks (as badges) and a file count.
  • Up to five detected languages, each with a file count (for example .ts (240)).
  • Detected entry points, if any.
  • The underlying map's storage key (a small, low-contrast reference line).

If a repository's map included a visual code graph, its card also shows an embedded force-directed graph viewer underneath.

Who can do this?

Requires discovery:manage to run; discovery:read is enough to see whatever the Codebase tab already shows. The project must also be mutable; an archived or otherwise locked project disables the button even if you hold the grant.