From File Browsing to Structural Navigation in AI Agent Workflows
Agents navigate codebases better with explicit architecture maps than file search.

An interactive codebase graph for AI agent steering gives developers and agents a shared map of modules, dependencies, and architectural boundaries. The shift from file browsing to structural navigation makes that map part of the coding workflow. Its value depends on bringing live code structure together with the stated design intent and CI checks that block architectural violations before merge.
Why file-browsing became the default and why it no longer holds
File browsing is what agents do when a repository offers no better map. An agent begins without the institutional memory that tells a developer where a responsibility belongs or why two modules must remain separate. It uses grep, glob, and file reads to reconstruct enough context to act. Search becomes a substitute for architectural knowledge. That reconstruction consumes tool calls, tokens, and time before implementation begins.
Ruoqi Jin’s Formal Architecture Descriptors as Navigation Primitives for AI Coding Agents names this the “Navigation Paradox.” As context windows grow, the bottleneck moves from retrieval capacity to navigational salience. The agent can receive more code without getting better at finding the code it needs for the task. The study measures exploration as a substantial share of tool calls across real sessions. More available context does not itself provide a route through it.
Aristidis Vasilopoulos’s Codified Context: Infrastructure for AI Agents in a Complex Codebase describes a related persistent-memory gap. Each session starts without reliable awareness of earlier sessions, established conventions, or past mistakes. Architectural context remains in developers’ heads unless the workflow supplies an artifact that preserves it. A small prototype can fit within a prompt, but a large system cannot be represented adequately by the same single-file approach. Reconstructing context was tolerable for short, bounded tasks. It becomes harder when an agent works on its own across many files and must keep its decisions consistent.
What changes when agents move from bounded tasks to autonomous multi-file sessions
Autonomous execution expands both the task and the consequences of a wrong assumption. Agents can now work from specification through implementation to a submitted pull request, rather than supplying a bounded edit for a developer to integrate. CLI-first, editor-native, and cloud-engineering agents share the underlying pattern of memory files, long-running execution, and repository awareness. The human role moves toward specifying and verifying. Meanwhile, a wrong model of the repository can shape changes across many files before anyone reviews the result.
That wider scope also weakens the diff as an account of what happened. An AI-generated pull request can span backend logic, configuration, tests, and user-facing components without preserving the narrative that connects those changes. Reviewers must infer purpose from disconnected fragments. The documented failure mode of “diff explosion” adds unnecessary changes to that burden, and practitioners recommend a practical cap on changed lines per pull request.
The difficulty is not simply that agents need more instructions. “Constraint decay” describes the loss of correctness as architectural requirements accumulate in prose. Agents are strongest at unconstrained generation and measurably weaker in convention-heavy environments. Requiring Clean Architecture cost 9.1 percentage points in assertion pass rate, while setups in which everything was specified made otherwise capable configurations perform much worse. The mismatch lies in both the navigational and representational model supplied to the agent and its ability to write code.
What structural navigation actually means and why format is a secondary concern
Structural navigation gives an agent a map that spells out module boundaries, symbol signatures, constraints, and data flows. Instead of discovering responsibility through successive search results, the agent can navigate from the intent of its task. Context files also encode build commands, test commands, code style, testing frameworks, and architectural decisions that a README does not provide.
Natural-language manifests do not reliably provide that structure at scale. A study of AGENTS.md-style files found no statistically significant gain in task success, though inference cost rose. Codified Context describes a project whose context infrastructure evolved from a single manifest into a tiered architecture of roughly 26,000 lines. A single file was no longer enough. Formal architecture descriptors respond by making boundaries, signatures, constraints, and flows explicit machine-readable artifacts.
The descriptor study found that architecture context led to significantly fewer navigation steps, with Cohen’s d = 0.92 and p = 0.009. It detected no significant difference in comprehension across S-expression, JSON, YAML, and Markdown. Format was not the source of navigational benefit. An automatically generated descriptor also achieved higher accuracy than blind navigation without human refinement, showing that the artifact had value independent of any clarification gained by its author.
Format still affects failure modes and downstream tooling. The study’s intent.lisp proposal argues for S-expressions because they enforce hierarchy syntactically, degrade non-atomically, and achieve strong compression ratios across production codebases. A useful representation must let machines enforce what they read.
Why a context file alone cannot hold an architecture together under agent pressure
A context file is a navigation aid until something checks whether the resulting code respects it. An agent may understand a boundary and still cross it during generation. Constraint decay makes that gap especially important for AGENTS.md or CLAUDE.md instructions, which agents can ignore even when the rules are clear. More detailed prose can hurt compliance.
Salesforce identified the corresponding difficulty on the review side. Traditional tooling discards the conceptual model of what developers intended to accomplish and presents isolated diffs detached from purpose. Senior reviewers switched context among several large AI-assisted changesets each day, which added to their mental load and made it harder to analyze the changes well. The missing structure has to be reconstructed again.
The ARCTIC research proposes “code spotlight,” which ranks the regions of a diff most deserving human scrutiny. It identifies a weakness in existing AI review tools, which overemphasize low-value suggestions such as style while giving insufficient attention to correctness, security, and performance. Directing attention more carefully addresses an important review problem. It does not turn every architectural rule into a guaranteed check.
Human review remains necessary for evaluating purpose and judgment, but it is insufficient as the primary gate for architectural compliance. As agents produce more code, relying on reviewers to catch every violation requires them to keep up with that growth. The necessary complement is automatic enforcement before merge. Otherwise, the descriptor remains advice precisely where the workflow needs a constraint.
How CI enforcement turns an architecture descriptor into a hard gate
The practical response is to encode architectural rules as fitness functions that fail the build. The emerging model operates at three stages. Before generation, the system prompt or architecture descriptor sets out the constraints. Immediately afterward, validators test whether the output violates them, while comprehensive CI checks provide the final pre-merge gate.
The tool category depends on the rule and stack. ArchUnit, dependency-cruiser, import-linter, and NetArchTest provide options for architecture checks, while OPA/Rego and other policy languages belong to the policy-enforcement category. The selected mechanism must be able to express and check the intended constraint. Naming a boundary in a descriptor is only the first step toward making that boundary verifiable.
Traditional CI/CD assumes that compilation and tests provide confidence in a deterministic system. Agent generation introduces variability before those checks run, because the same prompt can produce a range of outputs with different levels of acceptability. Passing functional tests alone does not establish architectural compliance. Architecture checks add acceptance conditions that ordinary compile-and-test workflows do not necessarily express.
A check that exits non-zero and blocks the merge converts a declared rule into a hard gate. Human review can then focus on questions that are not already covered by executable constraints. The descriptor study reports that formal architecture declaration correlated with a 52% reduction in agent behavioral variance across thousands of real sessions. The finding, which leaves the effect of CI enforcement itself unmeasured, shows why reducing variability through explicit structure is relevant to a workflow that must accept or reject generated changes consistently.
What does an interactive codebase graph add for AI agent steering?
A descriptor captures architecture at a point in time, while a live codebase graph shows how the structure changes as agents work. The graph shows drift before the merge gate. Developers can inspect modules, layers, dependency flows, and constraint boundaries as objects in their own right. This is the practical distinction between browsing code and steering through its structure. The agent and developer work from a shared map that reflects what is on disk.
Aider’s tree-sitter repo maps and CodexGraph illustrate programmatic extraction of code structure. Aider uses tree-sitter to find symbol definitions and references, and both approaches capture syntactic relationships that would otherwise take more searching to find. Extracted structure can describe relationships present in the code without explaining which relationships the architecture permits. Descriptors written by humans supply constraints that syntax alone cannot reveal.
Automated maps show the structure that exists, descriptors state the structure that is intended, and a live graph can bring both views together to help agents and developers find their way and inspect the code. An interactive graph for agent steering needs more than a visual rendering of files. Its distinguishing criteria are shared navigation, visibility into structural change, explicit architectural boundaries, and a connection to verification.
For that model to remain grounded, the graph should live in the repository, version with the code, and be enforceable in CI. A diagram drawn once cannot provide a real-time working map. Repository integration makes the graph both a navigation primitive for agents and a verification artifact for humans. It connects the structure developers steer through with the structure the merge gate evaluates.
What the developer's role looks like when navigation is structural
As agents take on implementation, developers become responsible for specifying intent precisely enough that both agents and CI can act without guesswork. The 2026 roundtable research in arXiv:2606.21894 identifies verification and validation as increasingly important skills. It places emphasis on evaluating whether agent workflows are robust, trustworthy, and aligned with organizational goals. Producing code is no longer the only central measure of technical contribution.
Writing an architecture descriptor is consequently a design task. The descriptor study shows that an automatically generated artifact can improve navigation, but generation alone cannot supply the human intent behind architectural choices. Developers must distinguish what the code currently does from what future changes are allowed to do. That distinction gives the graph its steering value.
The practices that follow begin before implementation. Teams should declare architecture before agents start, enforce its constraints in CI, and treat the codebase graph as the source of truth for structural steering and review. Review then examines whether the resulting structure serves the intended design.
The field has not resolved whether better descriptor formats, agent fine-tuning on architectural conventions, or mandatory pre-merge static analysis will become dominant. All three remain active approaches, and none justifies assuming that autonomous implementation eliminates the need for architectural judgment. The direction is nevertheless clear. Coherent production software at agent speed depends on architecture that machines can navigate and verify.
Sources
- Formal Architecture Descriptors as Navigation Primitives for AI Coding Agents
- Codified Context: Infrastructure for AI Agents in a Complex Codebase
- Agentic Software: How AI Agents Are Restructuring the Software Paradigm
- Beyond Functional Correctness: Design Issues in AI IDE-Generated Large-Scale Projects


