Beyond the Prototype: Using AI to Write High-Quality Code - Josh Albrecht, Imbue

Introduction and Motivation 00:03

  • Imbue is focused on building robust and useful AI agents, with current work emphasizing software agents.
  • Their main product, Sculptor, is designed to bridge the gap between AI-generated prototype code and production-ready code.
  • Existing AI coding tools often produce code that needs substantial manual review before shipping, especially for larger codebases.
  • The presentation covers technical decisions and lessons learned from developing Sculptor.

Focusing on High-Impact Problems 01:33

  • Many foundational coding agent improvements (context windows, speed, output parsing) will be solved as models advance.
  • Imbue prioritizes domain-specific features over generic improvements.
  • The core problem Sculptor addresses is code review: helping users trust AI-generated code by identifying potential issues in diffs.

Building Trust and Defining High-Quality Code 02:59

  • Sculptor introduces a third option beyond manual review or blind merging by using an AI agent to inspect code changes for problems (e.g., race conditions, exposed secrets).
  • High-quality code is defined as code with few or no defects, aligning with academic standards.
  • The goal is early problem detection in the development process rather than relying solely on late-stage (pull request) reviews.
  • Sculptor provides synchronous, immediate feedback after code generation.

Preventing Problems in AI-Generated Code 04:30

  • Four main prevention strategies are implemented: learning, planning, writing specs, and enforcing a strict style guide.
  • Sculptor assists users in researching existing technologies and solutions to minimize duplicating existing work.
  • Users are encouraged to make coding plans before generating code, with meta-parameters and system prompts guiding agent behavior.
  • Specs and documentation are prioritized and managed to stay current, with tools detecting outdated or inconsistent docs.
  • A strict, possibly AI-specific, style guide helps both agents and humans write safer, more maintainable code—e.g., promoting immutability to reduce race conditions.

Detecting Problems in AI-Generated Code 08:06

  • Even with prevention, some issues will occur; Sculptor integrates three main detection mechanisms: linters, tests, and LLM-based checks.
  • Automated tools (like Ruff, Pylint, etc.) are leveraged for error detection and AI can fix common linting issues automatically.
  • Sculptor tracks pre-existing and new issues to avoid introducing new errors, even if the codebase isn't perfectly clean.
  • Testing is integrated deeply; AI-generated tests make it feasible to maintain thorough coverage.
  • Key testing practices include:
    • Functional, side-effect-free code for safer test automation.
    • Both "happy path" and bug-seeking ("unhappy") unit tests.
    • Willingness to regenerate or refactor test suites to stay current.
    • Emphasis on integration tests for user-facing behavior validation.
    • Monitoring test coverage to boost confidence in the correctness of code changes.
    • Running tests in sandboxes with minimal secrets to mitigate risk.

LLM-Assisted Code Quality Checking 14:45

  • LLMs are used to check a wide variety of code attributes, including uncommitted changes, architectural rule violations, missing or untested specs, and more.
  • Sculptor allows for extensible, custom checks aligned with organizational best practices.

Fixing Issues and the Importance of Sandboxing 15:26

  • Most of the challenge lies in identifying, rather than fixing, problems; once well-defined, issues are typically easy for AI agents to address.
  • Multiple attempts with sandboxed agents can efficiently produce acceptable solutions.
  • Safe and isolated execution environments enable scalable, parallel problem-solving.

Future of AI Developer Tools 16:22

  • The landscape for AI-driven developer tools is rapidly evolving; upcoming advancements include automated debugging, QA, profiling, visual-to-code tools, and enhanced context-aware tools.
  • Imbue is open to integrating adjacent developer tools with Sculptor to improve the comprehensive developer experience.
  • As integration across tools improves, development processes are expected to become much easier and more accessible.

Closing and Call to Action 17:38

  • Sculptor is available for sign-up at imbue.com.
  • Imbue is hiring and eager to connect with those interested in developing innovative AI systems for software development.