Skip to content

Code Map

The Code map tab of the Standards region (/standards/code-map?repo=<owner>/<name>) shows the structural entity and relationship map for this repository, built by Colony’s code-map scanner. The analyzer takes a snapshot of the repository’s packages, directories, files, configs, scripts, tests and code symbols, plus the relationships between them. The analyzer can read that snapshot in its prompt, so it starts a task knowing how the code fits together. Turn that on in Standards → Settings.

Open Standards, then the Code map tab. The tab needs a selected repository: pick one with the repository control in the region’s header. With All repositories chosen, the tab asks you to pick one.

The card at the top summarizes the latest scan:

  • A status badge: running, success, failed or partial.
  • ref: the git ref that was scanned.
  • Entities: and Relationships: — the totals in the snapshot.
  • Finished: when the scan completed, in your local time.
  • Entities by kind — a chip for each entity kind with its count, largest first.

When the scan is behind the repository, a note appears: “Scan is behind current HEAD — scanned <sha7>, HEAD is <sha7>.” Each value is the first seven characters of a commit SHA, or (unknown) when none is recorded.

When the status is failed or partial and the scanner reported a problem, an Error: line shows the message.

Below the summary, the Entity Browser lists the entities in the snapshot. Three controls narrow the list:

ControlBehavior
Search entities…Matches entity name, path or symbol. The list updates about 300 ms after you stop typing.
Kind filterAll kinds, or one of package, directory, file, config, script, test_file, function, class, interface, type, executor.
Minimum-confidence filterAll confidence, High, Heuristic+ (heuristic and high) or Low+ (everything).

The table has the columns Name, Kind, Path, Symbol and Confidence. Missing paths and symbols show as —. Confidence is high, heuristic or low, and records how precisely the scanner identified the entity.

The browser shows 50 entities per page. When there are more, a footer reads “Showing X–Y of N” with Previous and Next buttons and “Page N of M”. Changing any filter returns you to the first page.

Click a row, or its toggle in the Name column, to expand it. The expansion lists the entity’s edges:

  • Inbound — edges from other entities pointing at this one.
  • Outbound — edges from this entity to others.

Each edge shows the relationship kind, the related entity’s name, its path when it has one, and a Pivot button. Pivot collapses the other rows and opens the related entity’s relationships, so you can follow the graph from entity to entity.

WhereText
Scan summary, no scan yetNo scan data — “The Code Map is populated by Colony’s structural scanner (code_map config key). Nothing has been indexed for this repository yet.”
Entity Browser, no scan yet”No scan data available. Run the Code Map scanner (code_map config key) to index this repository.”
Entity Browser, filters match nothing”No entities match your filters. Try adjusting the kind, search query, or confidence filter.”
Expanded entity with no edges”No relationships recorded for this entity.”

A failed or partial scan shows the Error: line described in the scan summary.

The tab reads from three Service API endpoints, each scoped to the repository:

EndpointUsed for
GET /pipeline/repos/:owner/:repo/code-map/scanThe scan summary: status, ref, totals, counts by kind and staleness.
GET /pipeline/repos/:owner/:repo/code-map/entitiesThe Entity Browser. Accepts kind, q, minConfidence, limit and offset.
GET /pipeline/repos/:owner/:repo/code-map/entities/:entityId/relationshipsThe inbound and outbound edges for one entity.

The scanner and what the analyzer sees of it are configured in the Intelligence section of Standards → Settings (code_map.*): Enable code-map (shadow mode), Inject into analyzer prompt, and the Token budget for that injection. See Agent settings.