WhoBuilt

To the moon! Navigating deep context in legacy code with Augment Agent

Jun 27, 2025· 15 min· 2.1K views·Watch on YouTube

Speakers

Forrest Brazeal, a friend and partner of Augment Code, and Matt Ball, a solutions architect at Augment Code, demonstrate how to use Augment Agent to understand and modernize legacy code at an AI Engineer event.

Augment’s context engine and agent modes

Matt says Augment’s context engine gathers relevant knowledge from a codebase to give models better input. The product works as a plugin for existing IDEs and offers enterprise security features, including customer-managed encryption keys. He describes chat as useful for one-turn questions and agent mode for larger tasks that can use tools and run in the background.

Investigating the Apollo 11 alarms

Forrest presents the Apollo Guidance Computer source code as a challenging legacy example: a large assembly-language program developed at MIT. He asks Augment Chat what the 1202 alarm means. It points to code where the executive system runs out of available core sets and explains that the computer shed lower-priority work after an external radar system was left on, allowing mission-critical tasks to continue.

Implementing lunar descent guidance

Forrest asks Augment Agent to run a simulator until it succeeds without changing the simulator file. The agent explores the codebase, creates the missing descent.py implementation of the P65 guidance routine, and runs the simulator. Matt reports that the final position landed within the simulator’s expected zero-to-one-meter range.

A practical approach to legacy code

Forrest recommends first using an agent to map a codebase and answer questions about its files and conventions. Next, use chat to reason about expected behavior and have an agent write tests to check it. He cautions that agents can make mistakes, such as being uncertain whether priority level zero is highest or lowest, so engineers should inspect the code and modernize in small, tested steps.

Applying the method to real projects

Matt compares the example with moving an enterprise Java 8 project to Java 17, a tedious modernization task where AI could help. In the question period, he says agents can check dependencies across a large codebase. Forrest adds that tests help agents check and iterate on their own work.

Takeaways

  • Use codebase-aware questions to build an initial map of unfamiliar legacy systems.
  • Ask chat to establish expected behavior, then use tests to check an agent’s implementation.
  • Keep a human engineer involved when code or system conventions are ambiguous.
  • Modernize legacy systems in small pieces and use the same tests to guard behavior.
  • Consider agent mode for tasks that require tools, iteration, and codebase-wide exploration.

Mentioned in this talk

Search inside this talk

What was claimed 13

Show all 13 facts

Related talks