Ology

Code Is Not a File: Reading Graphs of Software

Code graphs model source code through syntax, control flow, data flow, dependencies, and semantics for analysis, navigation, security, and tooling

5 sessions · 15 readings · 579 views

Curated by Ned Horowitz

The Shape of a Programsession 1Precision Has a Pricesession 2Findings Are Paths, Not Patternssession 3Search Is a Graph Problemsession 4Can Agents Query the Graph?session 5

Opening

Source code is text, but the questions developers ask about it rarely are. “Where is this function used?”, “What breaks if I change this type?”, “Can untrusted input reach this database call?”, and “Which files should an AI agent read?” all require relationships among syntax, symbols, control flow, data flow, dependencies, history, and usage.

The important recent change is not simply that AI systems write more code. It is that code intelligence has become part of the infrastructure around those systems. Code navigation indexes, semantic search engines, static-analysis databases, and repository-aware coding assistants all attempt to turn sprawling codebases into queryable structures—though they disagree about which relationships matter and how much precision is worth paying for.

A graph is therefore not one thing. A compiler-accurate symbol index, a control-flow graph, a taint-tracking database, a dependency graph, and a PageRank-style usage graph answer different questions. Some are fast but shallow; others are precise but difficult to build, update, or generalize across languages. Even “semantic understanding” often means a carefully selected approximation.

This seminar follows those choices from representation to query, from query to security finding, from search to developer tooling, and finally to AI agents that must navigate code rather than merely autocomplete it. The central question is: what kind of graph makes software legible enough for both analysis and action?

Five questions worth arguing about

  1. 1Should code intelligence optimize for one universal graph, or for many specialized representations with explicit boundaries?
  2. 2When does compiler-level precision justify the cost of building and maintaining a semantic code index?
  3. 3Can vulnerability detection remain useful without choosing between broad coverage and trustworthy paths?
  4. 4Does graph structure improve code search because it understands meaning, or because it supplies better ranking signals?
  5. 5Will AI coding agents benefit most from richer graphs, or from repositories designed to make their important relationships obvious?

The Sessions

1Session 1start here

The Shape of a Program

The problem

“Code graph” sounds like a single representation, but the readings expose a more difficult design problem: which aspects of a program deserve first-class structure? Files and symbols are useful for navigation; syntax trees support structural matching; compiler-derived relations support definitions and references; generalized intermediate representations promise portability across languages.

Beyang Liu’s account of LSP frames code intelligence as a systems-boundary problem. Separating language analysis from editors turns an otherwise multiplicative integration problem into a more manageable one, but the protocol does not eliminate the underlying question of what information a language server should expose. GitHub’s CodeGen approaches the issue from another direction: a scalable language-support pipeline needs representations that can normalize diverse languages without erasing their important differences.

SCIP then makes the trade-off operational. Search-based navigation can be available immediately but imperfect, while precise navigation can be compiler-accurate and cross-repository but requires language-specific indexing infrastructure. The session begins here because every later use—querying, security analysis, ranking, or AI retrieval—depends on what the representation preserves and what it discards.

2Session 2

Precision Has a Price

The problem

Once code has been represented, the next question is how deeply to analyze it. A fully interprocedural graph can express more relationships, but it is expensive to construct, difficult to keep current, and vulnerable to ambiguity in dynamic languages, incomplete builds, generated code, and external dependencies.

Semgrep’s engineering account is an explicit argument for restraint. Its design stays close to syntax, limits control-flow scope, and uses summaries to obtain useful dataflow behavior without analyzing every possible path globally. This is not merely an optimization; it is a claim about product value: an analysis that arrives during a pull request may be more useful than a theoretically stronger one that arrives hours later.

CodeQL offers a contrasting model. Its database stores relational representations of source elements and relationships, then layers AST and dataflow structures over them for queries. The practical exercises make the abstraction tangible: the analyst asks questions of tables, predicates, and paths rather than manually traversing files. Together, the readings force a choice between “understand everything” and “analyze the questions that matter”—a choice that returns in every subsequent session.

3Session 3

Findings Are Paths, Not Patterns

The problem

Security analysis is where graph representations face their most consequential test. A pattern can identify a suspicious API call, but a vulnerability usually depends on a relationship: data enters through a source, travels through transformations, avoids sanitization, and reaches a dangerous sink. The graph must be expressive enough to find that path, yet disciplined enough not to report every possible path as a vulnerability.

The GitHub SAST explainer introduces the pipeline from tokens and ASTs to semantic and taint analysis, making clear why syntactic similarity is insufficient. CodeQL’s dataflow libraries then show that even “dataflow” is a modeling decision: source and sink definitions, sanitizers, call relationships, language semantics, and query-specific scope all affect the result.

GitHub’s production experience complicates the educational picture. At scale, useful analysis requires custom query packs, repository-specific models, variant analysis, testing, deployment discipline, and human review. The key tension is not simply precision versus recall. It is whether an analysis can become part of an organization’s evolving security practice without producing findings that developers stop trusting.

4Session 4

Search Is a Graph Problem

The problem

Code search is often treated as retrieval over text, but developers usually search for roles and relationships: the implementation of an interface, the callers of a function, the most reusable example, or the code affected by a change. The challenge is not only indexing billions of lines; it is deciding what relevance means when code has syntax, symbols, references, ownership, and reuse patterns.

GitHub’s Blackbird account emphasizes the unusual requirements of code search: punctuation matters, stemming can be harmful, repositories change constantly, and general-purpose text-search infrastructure does not naturally fit the domain. Its architecture begins with scale and query latency, but it also points toward a richer interaction model in which searching, browsing, navigating, and reading form one loop.

Sourcegraph’s writing pushes further into graph-derived relevance. Its code-intelligence platform connects definitions, references, repositories, and metadata; its ranking experiment applies PageRank-like reasoning to symbol usage and code reuse. That approach is powerful precisely because it is not claiming to understand code in the strongest sense. It uses graph structure as a pragmatic signal. The unresolved issue is whether such signals improve discovery broadly or privilege already-central, already-reused code at the expense of unusual but important implementations.

5Session 5finish here

Can Agents Query the Graph?

The problem

AI-assisted software engineering makes code graphs newly consequential. An agent does not merely need to generate plausible code; it must identify the right files, understand local conventions, trace dependencies, estimate change impact, and decide which evidence belongs in its context window. A graph can help—but only if its retrieval strategy selects relevant relationships rather than flooding the model with structure.

Sourcegraph’s account of Cody presents one practical architecture: combine local context with repository-scale search, rank snippets, and use code intelligence to retrieve beyond the open file. Its later lifecycle description adds an important warning: irrelevant context can reduce response quality, so the challenge is not maximizing context but selecting it. The graph becomes a retrieval substrate, not a complete substitute for source text, tests, or human judgment.

OpenAI’s “harness engineering” shifts the emphasis from graph infrastructure to repository legibility. The team describes strict boundaries, explicit architectural rules, executable documentation, and feedback loops that make a codebase easier for agents to inspect and modify. This complicates the assumption that better agents simply require richer graphs. Perhaps the most effective “graph” is partly encoded in the repository’s structure and invariants. The seminar ends by asking whether future code intelligence will primarily analyze existing software—or help teams design software whose important relationships are machine-legible from the start.

Interested in joining a reading club with top AI experts?

Small groups, great readings, real conversations. Learn faster and grow your network.

A friend that hands you reading lists, not search results.

© Ology 2026