Code Read the original on I-programmer 2 min read 0

Google engineer proposes new AI framework for software design

A new research paper from Google introduces a structured methodology for integrating artificial intelligence into the software development lifecycle. Distinguished Engineer Dave Rensin proposes a two-part process involving 'elephants' and 'goldfish' to ensure technical clarity. By systematically feeding context to one AI model and testing it against another, developers can create comprehensive design documents that serve as absolute sources of truth for complex engineering projects.

Слон у жилетці з монетами стоїть поруч із рибками, які тримають таблички «Source of Truth», «Technical Debt» та «Design is the New Code».
Слон у жилетці з монетами стоїть поруч із рибками, які тримають таблички «Source of Truth», «Technical Debt» та «Design is the New Code». · Image source: I-programmer

According to I-programmer, a research paper authored by Dave Rensin, a Distinguished Engineer at Google, outlines a sophisticated approach to using large language models (LLMs) for software architecture. The methodology aims to move beyond simple code generation toward creating rigorous, verifiable design documentation that serves as a foundation for development.

Training the Elephant: Contextualizing Knowledge

The first phase of Rensin's framework involves 'feeding the elephant.' In this analogy, the elephant represents an AI session saturated with specific organizational knowledge. Developers are instructed to point the tool at relevant source trees or design documents and ask it to generate high-level descriptions. If the model fails to grasp the system correctly, the developer must provide corrections immediately.

Rensin emphasizes that developers should explicitly instruct the AI not to write code initially. Instead, the goal is to have the tool challenge assumptions and propose implementations in prose and block diagrams. Key steps in this process include:

  • Asking the AI to identify patterns and justify specific technical choices.
  • Correcting hallucinations by pointing the model toward specific files like auth.py or AUTH.md.
  • Iteratively building a markdown document that serves as the project's 'source of truth.'
  • Because current models have output token limits, Rensin advises building these documents in small, iterative chunks within a single chat session to maintain consistency.

    Testing with the Goldfish: Verifying Clarity

    Once a design document is drafted, it must be validated using a 'goldfish'—a completely fresh AI session with zero prior knowledge of the project. If the goldfish cannot explain the system based solely on the provided markdown file and its references, the documentation is deemed insufficient. The developer then adds missing context and repeats the test until the model can successfully navigate the logic.

    Rensin notes that while 30% of an AI's suggestions during this phase are highly valuable, the primary goal is to eliminate ambiguities. Once the goldfish stops asking critical questions and only offers minor nitpicks, the document is ready for human review. For massive codebases, Rensin suggests a bottom-up approach where developers create small, high-quality readme.md files for specific directories, eventually aggregating these into a full system overview.

    This methodology shifts the role of AI from a mere autocomplete tool to a rigorous peer reviewer that ensures architectural integrity before a single line of production code is written.

    FAQ

    What is the 'elephant' in Dave Rensin's framework?
    The elephant represents an AI session saturated with specific organizational knowledge. Developers feed it source trees or design documents to generate high-level descriptions, identify patterns, and justify technical choices while explicitly instructing the tool not to write code initially.
    How is the 'goldfish' used to verify software documentation?
    A goldfish is a completely fresh AI session with zero prior knowledge of the project. It is used to validate that a drafted markdown document is sufficient; if it cannot explain the system based solely on that file, the developer must add more context.
    Telegram

    Fresh news on our Telegram

    Get instant alerts for new posts in «Code»

    @procodeandevenmore