Windsurf was designed to be a much more advanced solution compared to the state-of-the-art software-development tools available at the time it was released.
(Windsurf has since been acquired by Cognition and re-branded as Devin Desktop.)
Windsurf was created by Codeium, a company with years of experience in developing AI-based coding software. They had developed a very popular extension to Visual Studio Code that delivered the ability to write code with the help of machine learning within a familiar environment, that went on to be used by a huge number of developers.
The builders of Windsurf decided to take an existing framework and create an advanced model of software development upon it.
It was not an easy task.
A big structural limitation was identified by the builders of Windsurf. Three different vital capabilities needed to be coordinated into one system in order for their new product to be able to truly be considered a tool for “advanced software engineering”: an autocomplete feature, a conversational assistant that explains code or writes functions, and an autonomous agent that operates independently of developers' work.
Successfully creating this means that the new tool has to be able to understand existing abstractions, find dependencies, change multiple files, execute commands, understand errors, and update implementations. However, if the tool can only see the current file or constantly forgets what the programmer just did, it is nowhere close to a complete, integrated solution.
To solve this, Windsurf was designed to combine all the important sub-tasks of software development into one product.
Choosing to build an integrated development environment (IDE)
The key architectural decision in the process of development of Windsurf was to stop considering AI assistance as simply an additional layer to someone else's editor.
An extension uses the interface, life cycle, APIs, and interaction model of the host application.
Although extensions can be quite powerful, there remains a component of the development process that is limited by previous decisions. Namely, if the initial product lacks observance of developer activity, management of a continuous process, and coordinating changes in order to provide for the functionality in question, then developing an agent which possesses all of those traits becomes significantly more difficult.
So Windsurf was designed to be a fully-functional Integrated Development Environment (IDE). Rather than being built from scratch, it was built by forking Visual Studio Code. That way, the team got to reuse a mature infrastructure, and add a lot of layers of additional functionality to it.
Since they started from an already existing editor, they avoided putting too much effort into rebuilding already existing functionality. In addition, they had a foundation from which to implement development flows such as file navigation and editing.
At the same time, the team was able to concentrate on implementing the harder task of deeply integrating the AI in order to make it able to participate in development, rather than just respond to developer's requests.
The purpose of Windsurf is to transcend what existed before by combining an existing development environment with knowledge of the codebase, executable tools, and multiple new features that use AI.
The technical foundation: Knowledge of the codebase
A coding system that uses AI cannot reliably make any changes in a software project based solely on the generation of syntactically correct code. The system needs information specific for that project.
This involves source files, but also functions calls, interfaces, configurations, testing, dependencies, naming and architecture peculiarities of that particular repository. The developer should be careful. Something that looks correct locally may violate assumptions elsewhere in the codebase.
So, the product development challenge for the creators of Windsurf was to provide the AI with the relevant project knowledge at the right time.
That means selection of useful files and code regions, collecting the proper context, and feeding it into a model along with a request of the developer. It can be quite tricky, especially in the case of large repositories, because arbitrarily including source code can lead to the presence of unnecessary information, and the violation of context window limits.
The team at Codeium had also built their own models and inference infrastructure. Such vertical integration enabled them to build the unique capabilities like fill-in-the-middle generation and MQuery, which is the way of retrieving information through parallel language model calls which increases recall and precision.
Once the developers gained enough expertise in retrieval, models, and infrastructure, all of that was integrated into the agent-focused editor they built and named Windsurf.
Cascade: Making context actionable
The key feature of Windsurf is the tool called Cascade, which is intended to integrate the understanding of the codebase, access to tools, and awareness of the developer's activities.
Each of these capabilities addressed particular failure modes.
Having knowledge of the codebase enables Cascade to explore a project more deeply than typical in-editor chat, which is limited to the exact text provided in a prompt.
With the access to tools, Cascade may explore directories, search the codebase, make changes, and generate terminal commands. This changes the nature of failure as well. In case a model provides a wrong suggestion, it is possible to correct it, but if an agent executes an erroneous command or makes some changes in multiple files, it becomes a much bigger problem.
Awareness of the developer's activities enables Cascade to consider changes the developer has already made, rather than considering each query as an isolated conversation.
Windsurf developers saw the underlying engineering as a control loop in its essence: Gather the context, understand the change that needs to be performed, choose the right actions, execute them, review the outcome, and adjust the future actions.
All of those parts of the loop were incorporated into the new and unique interaction model called Cascade. Action boundaries and developer oversight were important elements of the product design.
So human programmers and developers still must approve running Cascade's commands.
The actual building of Windsurf
First, the developers created a product and verified that it operates successfully as intended. Then they attracted a large number of users. With the help of Codeium's VS Code extension, the users were able to gain experience in using the autocomplete and contextual assistance features, which enabled them to provide valuable practical feedback.
Second, the developers created the AI capabilities: code generation, model serving, and context retrieval.
Third, they created the interface of Windsurf based on a new interaction model. The developers forked VS Code to preserve the familiar development environment. Then they built Cascade and other AI workflow processes, and added autocomplete and AI-assisted editing into the editor.
Fourth, by having internal engineers working on the company's production code use it everyday in their work, they tested Windsurf to make sure it was ready for public release.
Engineering lessons behind Windsurf
In the process of creating Windsurf, it was essential to coordinate interface design, application state, tool execution, generation, retrieval, and human supervision, while at the same time ensuring the necessary responsiveness of the software.
A very important aspect in designing Windsurf was overcoming various problems related to context retrieval, changing the code, and creating safe agent actions that are consistent with developer intentions.
Forking VS Code provided a known foundation for the developers to work with, which helped them focus on implementing the new capabilities in Windsurf.
Conclusion
Windsurf's creators were experienced in developing code completion, models, infrastructure, and gathering of developer feedback prior to developing a complex IDE, but their innovation lies in integrating all of these components into one product capable of observing the developer's continuous activity, taking into account the specific context of the project, and responding accordingly. They developed a superior product from an inferior AI coding framework.
The development of Windsurf is an example of successful systems engineering, through the incorporation of artificial intelligence and a wide variety of new features upon a previously existing infrastructure.