Code Shaping: Iterative Code Editing with Free-form AI-Interpreted Sketching
Ryan Yen, Jian Zhao, Daniel Vogel
TL;DR
Code shaping introduces a multimodal editing paradigm where programmers annotate code with free-form sketches overlaid on the code and console output to guide AI-driven edits. Through three design stages and multi-study iterations, the work characterizes sketch types, interpretable feedback mechanisms, and gesture-based interfaces that reduce context switching, culminating in an Always-On feedforward interpretation approach. The contributions include a taxonomy of sketches, encounter with interpretation errors and repair strategies, and an end-to-end UI design that merges sketching, coding, and execution into a cohesive workflow, demonstrated via real-use case scenarios. The findings advance practical design principles for integrating sketch-based planning with live code editing, suggesting a viable path to augment programming workflows with embodied, multimodal input while maintaining control and transparency. The work additionally provides open-source tooling for Stage Three and outlines directions for scaling to larger codebases and multi-file edits with dependency tracking and versioned sketches.
Abstract
We introduce the concept of code shaping, an interaction paradigm for editing code using free-form sketch annotations directly on top of the code and console output. To evaluate this concept, we conducted a three-stage design study with 18 different programmers to investigate how sketches can communicate intended code edits to an AI model for interpretation and execution. The results show how different sketches are used, the strategies programmers employ during iterative interactions with AI interpretations, and interaction design principles that support the reconciliation between the code editor and sketches. Finally, we demonstrate the practical application of the code shaping concept with two use case scenarios, illustrating design implications from the study.
