AI Engineer World's Fair 2025
To the moon! Navigating deep context in legacy code with Augment Agent
Loading slides…
Read the talk
To the moon! Navigating deep context in legacy code with Augment Agent
An Apollo guidance demo moves from explaining descent alarms to generating Python guidance code, showing how repository context and fixed tests support legacy modernization.
From a talk by Forrest Brazeal and Matt Ball
Before you start: Basic familiarity with Python modules, automated tests, and command-line errors is helpful; no assembly experience is required.
How do you understand code you cannot comfortably read?
How do you get useful work done in a legacy codebase when its language, conventions, and design are unfamiliar? Before changing anything, you need to recover the reasoning embedded in it. Forrest Brazeal and Matt Ball approach that problem with an unusually demanding example: the Apollo 11 guidance computer. Their demonstration moves from understanding assembly code to implementing part of its behavior in Python with Augment Code.
Brazeal introduces himself as an Augment friend and partner, not an employee; Ball describes his role as an Augment solutions architect. The exercise is to investigate the historical code, then use an agent to complete a simulated lunar landing. The session also offers a free trial, though the interface and access terms shown belong to the recording.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Retrieve code knowledge, then choose how to act
Ball starts with the input to the model: useful answers require relevant code context. A repository is not simply a collection of prose documents. Understanding a routine can require locating its callers, data structures, conventions, and related behavior. He describes Augment’s proprietary context engine as a system for retrieving the right repository knowledge and passing it to models, attributing better understanding and output quality to that retrieval. Those are product claims, not comparative measurements from this demonstration.
The surrounding product choices address enterprise adoption. Plugins let developers remain in existing IDEs—for example, IntelliJ for an older Java project. Ball also highlights customer-managed encryption keys and ISO/IEC 42001. The latter concerns an AI management system; it does not certify the correctness of generated code.
The execution mode determines what happens after the system retrieves context:
| Mode | Best fit | Execution pattern |
|---|---|---|
| Chat | Explore code and ask technical questions | One turn at a time, with user control |
| Agent | Complete larger tasks using tools | Read files, issue commands, and act on results |
| Remote agent | Continue work away from the laptop | Run in the cloud, including parallel tasks |
Remote execution matters when a task should keep running after the developer closes the laptop. It also makes independent tasks candidates for concurrent work.
Brazeal connects that possibility to an earlier workshop contest: someone wondered how the winners submitted solutions so quickly across several problems. He suggests that remote agents might have helped them work in parallel, but does not establish that this is what happened.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
An unfamiliar language with consequential behavior
Apollo 11 carried Neil Armstrong, Buzz Aldrin, and Michael Collins to the Moon in 1969. Its figurative fourth astronaut was the Apollo Guidance Computer, or AGC. Brazeal connects that computer to MIT’s development work and the familiar photograph of Margaret Hamilton beside a towering source listing. The code is assembly, a language few people in the room claim to have used professionally.
Brazeal characterizes the software as one giant monolithic source file. The preserved Apollo 11 source repository actually separates command-module and lunar-module programs into multiple assembly files. Either way, the practical difficulty is familiar: looking at the instructions does not immediately reveal the system’s behavior. The goal is to understand enough of that behavior to investigate its alarms and then simulate a landing.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
From an alarm number to a recovery mechanism
The first task is to recover an explanation, not change code. During Apollo 11’s final descent, the crew reported program alarms that raised the possibility of aborting the landing. Brazeal recounts five overload alarms before Houston cleared the crew to continue. Given only the source, could you explain why continuing was reasonable?
In VS Code, Brazeal opens a slightly modified Apollo checkout. Searching for 1201 or 1202 can locate a constant, but finding the number does not explain the condition that produces it or the recovery path that follows. He asks: “What does the 1202 program alarm do?”
The response combines repository inspection with web context. Brazeal compares this to calling Mission Control: the developer asks a focused question and receives an explanation backed by a wider body of information. He suggests MCP servers as a way to expand those information sources, but does not demonstrate an MCP integration.
The code investigation identifies two related resource-exhaustion conditions:
| Alarm | Exhausted resource |
|---|---|
1202 | Executive scheduler core sets |
1201 | VAC areas |
The response points to the octal 1202 value in source and connects it to the executive scheduler’s inability to allocate another core set. That turns a number into a statement about the computer’s capacity to track concurrent work.
The web-derived explanation then connects resource exhaustion to the descent. Brazeal summarizes the cause as an external radar being left on; the historical account is more specific, involving rendezvous-radar configuration and false tracking-angle signals. Recovery restarted selected programs so mission-critical work could continue, rather than simply treating every queued task as equally necessary. The useful answer explains both the failure condition and why recovery preserved essential behavior.
Brazeal contrasts the brief interaction with the time he would need to understand the assembly unaided. That is an informal observation during the demo, not a measured productivity benchmark.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Give the agent a missing module and a fixed evaluator
The next task moves from explanation to modernization. The lunar landing guidance source contains the adjacent P65 and P66 routines. After initially reversing them, Brazeal corrects the distinction: Armstrong used P66, while this demonstration targets fully automatic P65. Armstrong’s control through P66 still involved computer-assisted guidance; it did not remove the computer from the descent.
Brazeal now points out that the previous interaction was actually in agent mode, despite his initial chat framing. In the auto mode shown here, the agent can write code and run commands without waiting for a permission click at each step. That permits a continuous loop of investigation, implementation, and execution.
The task has an explicit boundary. Brazeal has already written simulator.py, which expects a module named descent containing a class named LunarDescentGuidance. That class must implement the P65 algorithm. The simulator exists; the guidance module does not. The agent’s job is to create the missing implementation and make the simulation succeed.
His instruction is deliberately short:
Run simulator.py until it succeeds.
Then he adds the constraint that makes the task meaningful:
Do not change simulator.py.
The evaluator stays fixed while the implementation changes. Without that boundary, an agent could make the task appear successful by weakening the simulator instead of satisfying it. The autonomous landing here is a software simulation, not operation of a spacecraft.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Let execution expose what is missing
The agent begins by running the simulator and investigating the resulting problems. Ball describes repository knowledge as the starting point for choosing commands and tools. Reading individual files then refines the plan: what does the task require, and what is absent? Here, execution exposes the missing descent module, and the agent searches the repository for the assembly and tests needed to implement it.
Terminal commands continue without presenter intervention. The existing tests help the agent infer the expected LunarDescentGuidance interface, and it creates descent.py. Brazeal finds that the agent has completed this step before he finishes narrating its investigation.
The generated Python is easier for Brazeal to inspect than assembly. It exposes position, velocity, desired velocity, gravity, and a P65 guidance routine. The agent has also located the corresponding routine in the indexed historical source. One calculation in that source—velocity difference divided by TAUVERT—can be expressed directly in Python:
python
def velocity_error_acceleration(velocity, desired_velocity, tauvert):
return tuple(
(desired - current) / tauvert
for current, desired in zip(velocity, desired_velocity, strict=True)
)
This expresses the velocity-error component, not the complete guidance implementation. It makes the relationship inspectable: with the same velocity error, a larger time constant produces a smaller acceleration correction.
The agent then runs the simulator. Brazeal reports that the final landing position falls within the simulator’s expected zero-to-one-meter range. He also points to final vertical and horizontal velocities without reading their exact values aloud. The demonstrated result is successful execution against this simulator’s checks; it does not establish flight-ready equivalence with the original guidance software.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Understand, test, then modernize
The reusable workflow begins before code generation:
- Understand the existing system. Index the repository and ask what the application does, what individual files contribute, and which styles or conventions matter.
- Specify expected behavior. Use a conversational exchange to predict what should happen for concrete inputs, then have the agent write tests that check those predictions.
For the lunar descent example, that means predicting the behavior of P65 for given input parameters before asking an agent to encode the expectation in a test. A test is useful only to the extent that its expected result captures the intended behavior.
Brazeal gives a specific reason not to accept every prediction: in another scheduler investigation, the agent could be persuaded that priority zero was either the highest or the lowest priority. It could produce a plausible explanation in either direction. The response is to have the agent surface the relevant source, then inspect the ordering logic yourself. Otherwise, the same misunderstanding can enter both the implementation and its tests.
- Modernize small portions. Convert a bounded part of the code to the desired language or style, then apply the same tests to check that its functionality remains intact.
This keeps the unit of change small enough to understand and review. The agent assists with navigation and translation; the tests preserve a behavioral target across the conversion.
The enterprise counterpart need not involve assembly or spacecraft. The closing discussion proposes moving a Java 8 project to Java 17: tedious modernization work in a repository potentially much larger than the Apollo example. Brazeal is unsure of the Apollo repository’s line count, so its size is not offered as a scaling benchmark. Greenfield projects are also possible, but the demonstration’s distinctive value lies in working through inherited behavior. No enterprise migration or deployment is shown.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Tests give an agent a way to check its work
The first audience question asks about checking dependencies across a large codebase. The presenters answer affirmatively, then point back to concrete recovery in the demonstration: discovering missing files and switching from an unavailable python command to python3. Those examples show the agent responding to local execution failures; they do not demonstrate exhaustive dependency analysis across an enterprise repository.
The final question identifies the exercise as effectively test-driven development. The answer emphasizes the feedback loop: agents reason and iterate, and tests let them check their own results. A fixed simulator gives the agent something more useful than an instruction to keep trying—it gives each attempt an observable outcome that can guide the next change.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
From the talk
The product's public site, with current offerings and getting-started links.
Browse the preserved assembly source for Apollo 11's command and lunar modules.
Luminary 099 assembly listing containing the P65 guidance equation and adjacent P66 routines.
Further reading
- Introducing Remote AgentArticle
Augment's launch announcement describes cloud execution and practices for assigning, validating, and reviewing parallel tasks.
The vendor describes certification of its AI management system and the governance processes covered.
Full transcript
Loading transcript…