Observability

Code intelligence

The platform indexes its own repository into a code graph and keeps it current. Operators read that graph in the operator console, and from the CLI. Both read the same answers over the platform API, so a terminal and a browser cannot disagree about what the platform holds.

What the code graph is

A dedicated workload, code-intel, runs in the platform's own namespace and indexes one repository — this platform's own source. On every push it re-parses what changed and writes a code-graph.json artifact: the modules, functions, classes, interfaces, services, layers and tagged errors, the calls and imports between them, and the error flows that connect a failure to the code that produced it.

The graph is derived from git, so it is reproducible: for one commit, the artifact is the artifact. Two readers of the same commit see the same nodes and the same edges, in the same order.

The operator console page

The operator console has a Code Intelligence entry under its platform section, at /operator/code-intel. It renders three things:

  • the freshness verdict — whether the index is current, stale, or unknown to the platform;
  • the workload's own numbers: the files it has indexed, how many it reports as stale, the node and edge counts, the generator, and the commit and ref it is tracking;
  • the topology for that commit — the nodes and the edges between them.

The subject of the page is the platform's own code, so it asks for no organization. That is deliberate: the panel decides which bucket a reader may see from the caller's principal, and a page that had to name an organization to render the platform's own source would be a boundary error rather than a feature.

The CLI

The same reads are available from a terminal. Every one of them goes through the platform API — the CLI holds neither the workload's bearer nor its address, and it parses nothing locally.

The code-intel verbs
platform ops code-intel status
platform ops code-intel freshness
platform ops code-intel graph platform --commit <sha>

status prints the workload's own numbers. freshness prints the verdict, the index time and the stale count. graph prints every node and edge the artifact projects for one (service, commit) pair. Each verb takes --json for the raw payload.

A field the workload has not measured prints as an em dash, never as a zero: an unmeasured count and a count of zero are different facts.

Freshness, and what unknown means

fresh means the index is current. stale means the platform measured it and it is behind. unknown means the platform could not get an answer out of the workload at all — the process is not answering, or the panel cannot reach it.

Those are three answers, not two, and unknown is never shown as a timestamp. A stale timestamp would read as "measured, and behind", which is a weaker claim than the truth: nobody knows. When the verdict is unknown, neither the console page nor freshness prints an index time.

Keeping it current

A re-index is driven by the forge, not by a command: a push to the tracked ref reaches the workload's webhook and re-indexes within seconds, and the workload's own periodic poll catches up when the webhook is missed. There is no platform verb that forces a re-index, and this page does not name one.

The command that brings the workload itself up to date — after a pin or manifest change — is the one its runbook uses:

Apply the workload
deno run -A packages/cli/main.ts bootstrap --component code-intel

An absent artifact is not a failure. If no graph has been stored for the commit, the console and graph print the reason the platform recorded — never an empty graph, because an empty graph and a service with no symbols would look the same.

What this page is not

This page describes the platform's own graph. It is not a tenant feature: there is no per-organization code browser and no organization-scoped view here, and nothing on this page asks you for an organization. A project's own graph is the project tab's subject, and it is not described here.

The artifact is not a service-level claim about your code. It describes structure — what calls what, and which errors flow where — and says nothing about whether that structure is correct.