SeekMoon: From IDE to ADE

Today, coding agents can independently complete complex development tasks, ushering software development into a new era in which agents generate code at scale. As more implementation work is delegated to agents, developers are spending more of their time understanding code, reviewing changes, and making technical decisions. Yet traditional IDEs are still designed around writing code by hand and have not adapted to this new model of collaboration.
In response to this shift, the MoonBit team built SeekMoon, a development environment whose core is implemented in MoonBit. In SeekMoon, the developer defines a goal and an agent makes the concrete code changes. The developer then uses a set of tools purpose-built for agent collaboration to understand the code, review the changes, and decide what should happen next. We call this new kind of development environment an Agent Development Environment, or ADE.
A Workspace Built for Agent Collaborationβ
SeekMoon's workspace is organized around an ongoing development task. Once the developer sets a goal, the agent analyzes the code, creates a plan, edits files, and runs validation, with both the process and the results retained in the task context. Alongside the task, the developer can browse the project, search and read files, or open Diff Review at any time to inspect the changes, determine whether they meet expectations, and give the agent further instructions.

Figure: SeekMoon brings agent tasks and code review into a single workspace.
With this division of responsibilities, the development environment's first priority should be helping developers understand the code generated by agents. SeekMoon provides three categories of capabilities for code comprehension and review:
-
Use Token Diff and Syntax Tree Diff to understand changes. In addition to the familiar line-based diff, SeekMoon provides Token Diff and Syntax Tree Diff views while retaining IDE navigation features such as Go to Definition and Find References in the review interface.
-
Use code visualization to understand the big picture. Documentation comments and architecture diagrams can be rendered directly alongside the code. Together with automatic code folding, this lets developers grasp the structure before diving into the implementation.
-
Use syntax-tree search to define the scope of a change. Beyond character-based text search, SeekMoon offers syntax-tree search for MoonBit, and the results can be added directly to the agent's context.
Token and Syntax Tree Diffs: A Clearer View of Code Changesβ
To help developers see exactly what changed, SeekMoon provides Token Diff and Syntax Tree Diff for MoonBit. Token Diff compares lexical tokens, de-emphasizing formatting changes such as line breaks and indentation so that substantive edits stand out. Syntax Tree Diff reveals structural relationships in refactorings such as function extraction and variable renaming. Compared with a line-based diff that shows only added and removed lines, these two modes help developers understand changes more directly.
Consider a change made during SeekMoon's own development. After the new argument no_console_window=true was added to @process.collect_stdout("hostname", []), formatting expanded one line of code into five. A line-based diff therefore showed one deleted line and five added lines. Token Diff, by contrast, matched the existing code across line boundaries and highlighted only the new argument and the required comma, making the actual change immediately apparent.

Figure: The same change shown in a line-based diff (top) and Token Diff (bottom).
Token Diff is well suited to examining localized edits. Structural changes such as extracting a function, renaming a variable, or rearranging branches require a deeper understanding of how the code was reorganized. Syntax Tree Diff presents differences according to MoonBit's syntax structure, making it better suited to reviewing these kinds of refactorings.
For example, in a HashSet refactoring in the moonbitlang/core project, the set-construction logic was extracted into a helper named make_int_set, a local variable was renamed from map to set, and the assertion style was updated. In a line-based diff, these changes appear together as large blocks of deleted and added lines, leaving the developer to infer how they relate to one another.
In the Syntax Tree Diff view, the differences are organized according to MoonBit's syntax structure, making the extracted function and related edits easier to distinguish. Developers can more clearly see how the code was reorganized and then verify that behavior remains consistent before and after the refactoring.

Figure: The same HashSet refactoring shown in a line-based diff (top) and Syntax Tree Diff (bottom).
Once the differences are clear, the developer still needs to determine whether the changes are correct and what other code they may affect. SeekMoon retains familiar IDE capabilities in Diff Review, including hover information, Go to Definition, and Find References. In the example below, the developer can open the references list while reviewing the diff and preview related code alongside it, without switching to another view to look up information.

Figure: Finding references and previewing related code in Diff Review.
Code Visualization: Let the Agent Draw the Structureβ
When trying to understand code structure, diagrams are often more intuitive than continuous prose. In traditional development, however, creating and maintaining diagrams requires extra effort. As soon as the code changes, diagrams can easily fall out of sync with the implementation, making them difficult to rely on as long-term documentation.
An agent can implement a change and update the accompanying comments within the same task. Because the structural explanation and the code come from the same context, they are easier to keep in sync. In addition to prose, an agent can use diagramming languages such as Mermaid in comments to generate flowcharts and architecture diagrams.
Reading raw Mermaid or D2 source is not intuitive, however. If the development environment displays only the source text, developers still have to switch away from the code view to preview the result elsewhere. SeekMoon renders MoonBit documentation comments directly and displays their diagrams alongside the relevant code, while preserving access to the original comments. Once an agent adds an architecture diagram to a comment, the developer can view it next to the code while reading.
When a regular MoonBit source file is opened for the first time, SeekMoon also folds top-level implementations automatically, prioritizing declarations, documentation, and the overall outline. Developers can first understand the code's structure through its declarations and diagrams, then expand only the implementation details they need to verify.

Figure: SeekMoon renders documentation and architecture diagrams inline in a MoonBit source file while automatically folding top-level implementations.
From Characters to Syntax Trees: Pass Search Results to the Agentβ
In addition to conventional character-based text search, SeekMoon provides syntax-tree search for MoonBit. Developers can find code with the same structure even when the concrete syntax differs.
Consider a test-code refactoring. Some tests in the moonbitlang/core project determine whether a condition holds by comparing a result with true. To find these instances, a developer can run the following syntax-tree search pattern:
@test.assert_eq($(actual:arg), true)
Here, $(actual:arg) is a placeholder that can match different argument expressions. This search found 43 calls with the same structure, and the results list displayed each call together with its surrounding context.

Figure: Syntax-tree search finds 43 matches across nine files in core.
The developer can then review the results, exclude tests that still need to be preserved, and determine the intended scope of the change. The remaining matches, together with the change request, can be passed to the agent to convert them consistently to assert_true. Once the agent has completed the edits, the developer can inspect them in Diff Review.
Toward ADEβ
SeekMoon is not simply adding a few AI features to a traditional IDE. It redesigns the development environment around a new model of collaboration: the agent drives implementation forward, while the developer can understand the result and confidently take ownership of it. That is what an ADE is.
Code produced by an agent is only the starting point. A task is truly complete only when the developer can clearly understand the code and confidently take ownership of it.
SeekMoon is now open source. Visit moonbitlang/openseek to explore the code, build it, and try it for yourself. We also invite you to join us in this exploration as we move the development environment from IDE to ADE.