opensource.google.com

Menu

Introducing the Elephant-Goldfish Model plugin: scaling design-driven AI software development

Thursday, October 22, 2026

Official logo of the Elephant-Goldfish Model: a minimalist split mark featuring an elephant profile in blue and a goldfish profile in orange.

Shifting left in the AI coding era

AI-powered velocity is transformative; however, it has silently introduced a potential reliability crisis by also increasing the velocity of “slop,” bugs, and session context collapse. Generative AI tools excel at increasing coding speed, but pure speed without structured guardrails means we are often auto-scaling our mistakes rather than simply writing code faster. We need a paradigm shift, aligning the human need for system comprehension with AI’s capacity for execution.

As co-author Dave Rensin outlines in the article Elephants, Goldfish, and the New Golden Age of Software Engineering, “Design is the new code.”

Understanding the Elephant-Goldfish Model (EGM)

The EGM framework is a metaphor for a powerful way to develop AI-assisted software quickly and safely with humans intentionally in the loop.

The “Elephant” is a context-rich, long-horizon AI session that holds the end-to-end architectural vision and project memory. No code is written here; it is purely dedicated to design, intent, and capturing micro-decisions. The Elephant session is where the AI interviews you and you debate the merits of your choices.

Conversely, “Goldfish” are stateless, zero-context sessions used strictly to validate specifications. Because they share no “blind spots” with the designer, they act as objective critics, probing for gaps and edge cases.

The goal of this method is for the AI to correctly produce the code you wanted the first time after you press Enter.

Announcing the open source Elephant-Goldfish Model plugin

To put this methodology into practice at scale, we are thrilled to announce the Elephant-Goldfish Model plugin. Originally, this plugin was developed internally for Google software engineers, and is now open source. Thousands of Googlers use this plugin every day to ship production Google code. Released under the Apache 2.0 license, the repository provides everything you need to implement this framework. Developers will find customizable Markdown rules, defined subagent personas, and structured review workflows ready to integrate into your own environments.

The plugin’s core goal is to bring the EGM framework directly into Antigravity, with other development environments upcoming. It automates the orchestration of the EGM lifecycle: managing context transfer between Elephants and Goldfish, facilitating validation loops, and rendering design documents, shifting the developer’s role from micromanager to executive reviewer.

The EGM plugin in a nutshell

EGM lifecycle workflow diagram illustrating the three phases: Phase 1 Brainstorm (Growing the Elephant), Phase 2 Draft (Drafting with the Elephant), and Phase 3 Review (The Goldfish Protocol with Comprehension Check, Hostile Critic, and Implementation Readiness validators).

The EGM lifecycle, automated with the plugin, walks the user through three co-design phases:

Phase 1: Growing the Elephant (egm-brainstorm)

Developers load the system context and adhere to a “No Code” rule to co-design features, debate trade-offs, and challenge assumptions.

Phase 2: Drafting with the Elephant (egm-draft)

Developers iteratively draft a Markdown design document that covers the problem definition, technical plan, alternatives considered, and a detailed implementation plan that enumerates the specific files to change.

Phase 3: The Goldfish Protocol (egm-review)

The Goldfish Protocol shifts the model from co-design to adversarial validation, using stateless AI instances to probe the design for weaknesses. The plugin automates a three-step validation sequence:

  • Comprehension Check: A stateless Goldfish reads the complete design document and must explain the architecture and intent back to the Elephant. If the Goldfish cannot accurately summarize the plan, it indicates the document is ambiguous and requires further drafting.
  • Antagonistic Review: Multiple Goldfish instances assume the role of skeptical, antagonistic technical reviewers. They are tasked with identifying potential edge cases, hidden dependencies, and logical gaps. Their critique is funneled back to the Elephant session for resolution.
  • Implementation Readiness Check: A final Goldfish performs a strict go/no-go check. It verifies that all necessary information—file paths, data structures, and function signatures—is present and unambiguous. This ensures the spec is ready for precise transcription into code.

Human judgment is the artifact

Ultimately, human judgment is the only artifact that truly matters in an AI-saturated world and we want to align the human need for system comprehension with AI’s capacity for execution. We hope this plugin will make it easier for developers of all skill levels to follow a process that more quickly and safely converts the idea they had in their head to a robust and well-built app on their screen.

We invite developers, architects, and AI enthusiasts to contribute to the plugin, customize its validation rules, and help define the future of collaborative software engineering.

To get started, check out the Elephant-Goldfish Model repository on GitHub.

Announcing the verifiable quantum circuit compilation competition on Kaggle

Wednesday, October 21, 2026

Light-theme Google Open Source banner featuring the Google Open Source logo above four connected circular icon medallions representing code and product launches, contributors and programs, open source journeys, and ecosystem stewardship.

While quantum computing holds the key to solving some of our most complex scientific challenges, current hardware is still limited by qubit counts and gate errors. Quantum error correction can overcome those errors, but it adds substantial overhead to every qubit and gate an algorithm uses. That makes circuit size one of the biggest factors in when a quantum algorithm becomes practical: every qubit and gate we remove lowers the bar that hardware must clear. To bring real-world quantum applications within reach sooner, it is critical to first compress the circuits that power them.

To help bridge this gap, the Google Quantum AI team is launching a competition on Kaggle challenging you to use AI to build smaller, more efficient quantum circuits. The competition is powered by kickmix, our new open source C++20 and Python library in Qualtran for efficiently building and testing large quantum circuits. Our companion paper, Leveraging verifiable structure in quantum circuits to find more efficient compilations with agentic AI, describes the approach in detail.

Turning compilation into an AI agent loop

In the past, optimizing quantum algorithms meant domain experts meticulously tuning circuits by hand and publishing incremental wins one paper at a time. Today, agentic AI can search for more efficient circuits automatically, but such results can only be trusted when candidate circuits can be efficiently verified for correctness. For arbitrary quantum circuits, classical verification is intractable because quantum gates create superpositions over exponentially many classical bitstrings. Fortunately, many of the most expensive subroutines in fault-tolerant algorithms can be built within a structured subclass of circuits, called “kickmix” circuits, which we introduced in our earlier work. Built from reversible classical logic, diagonal phase gates, and measurement-based uncomputation, kickmix circuits map each input bitstring to a single output bitstring and phase without creating new superpositions. A classical computer can therefore run randomized fuzz testing on bitstring inputs in linear time to establish the circuit’s approximate correctness on full quantum states with high confidence.

Randomized fuzz testing does not prove exact equivalence, but most quantum algorithms can tolerate a small, bounded error. In fact, using approximations can cut gate and qubit counts significantly. Finding such approximations by hand is tedious, making it a great task for AI agents. With kickmix in Qualtran, agents can build large circuits quickly and fuzz test them at 60 billion gates per second on a single CPU core.

How the competition works

The competition features three benchmarks, each targeting a major kickmix bottleneck in a useful quantum algorithm in order to call attention to the broad utility of this verification paradigm. For each benchmark, we provide a reference baseline circuit and a standalone verifier, both open source under the Apache 2.0 license. Your goal is to submit a circuit that passes the verifier while minimizing a cost score based on its qubit and gate counts:

  • Fusion energy: Designing inertial confinement fusion targets requires simulating how quickly charged particles slow down in a hot, dense plasma fuel (Proceedings of the National Academy of Sciences (PNAS)). The main bottleneck is computing the electric potential energy between every pair of particles, which is inversely proportional to their distance. The task is a quantum take on the classic fast inverse square root: given the squared distance x, apply a phase proportional to 1/√x, accurate to a tiny fraction of its exact value.
  • Optimization: Decoded Quantum Interferometry (Nature) is a quantum algorithm for solving hard combinatorial optimization problems. On one such problem, Optimal Polynomial Intersection (OPI), it finds better solutions than any known efficient classical algorithm. The main arithmetic bottleneck in solving OPI is decoding a Reed-Solomon code in superposition. The task is to build this decoder as a quantum circuit.
  • Chemistry: Fertilizer production depends on nitrogen fixation, which converts nitrogen gas from the air into ammonia. Industry does this at high temperature and pressure, using about 1–2% of the world’s energy supply, while bacteria do it at ambient conditions with the enzyme nitrogenase, whose active site is an iron-molybdenum cluster called FeMoCo. Understanding how FeMoCo works requires modeling its strongly correlated electrons, a long-standing target for quantum computers. Our recent algorithm (Physical Review X (PRX)) makes that quantum simulation cheaper by classically factorizing the molecule’s Hamiltonian into a compact sum of squares, so the quantum computer needs far fewer steps. At each step, the main bottleneck is a quantum lookup table that loads the parameters of that factorized Hamiltonian in superposition. The task is to co-design both parts: find an accurate factorization that needs fewer steps, and build compact circuits to load its parameters so each step costs less.

Get involved

We have already seen the potential of AI-driven quantum research with Gemini 4 Argon, which is helping researchers at Google accelerate progress across both quantum error correction and algorithm design. We’re excited that the broader research community is embracing this approach too, with simultaneous independent work pairing the kickmix paradigm with AI agents to reduce costs on related subroutines. However, our own internal runs with Gemini models show that all three benchmarks can be further improved beyond the circuits reported to date (and we’ve published a hash of those circuits in our recent manuscript to reveal after the competition), so the competition remains open and interesting.

Could we get more out of a quantum computer simply by asking it to do less? We invite you to help us answer that question.

Visit the competition page on Kaggle to read the full details, explore the resources, and submit your work.

This Week in Open Source for October 15, 2026

Thursday, October 15, 2026

This Week in Open Source banner graphic

This Week in Open Source for October 15, 2026

A look around the world of open source

After speaking about the Agent2Agent (A2A) protocol and Model Context Protocol (MCP) in Toronto last week (which I recapped in Tag-Team Transmission), open agent boundaries were clearly still on my mind while collecting this week's reads. As AI agents, terminal tools, and embedded micro-apps move deeper into everyday software workflows, a central tension keeps surfacing across the open source community: where do human judgment, interface trust, and maintainer sustainability fit in? Whether teams are wiring up open protocols in the Unix shell, running multimodal retrieval locally on a laptop, or stewarding decades-old kernel infrastructure, the healthiest open source architectures don't replace human agency—they give workers clearer boundaries, inspectable tools, and a genuine seat at the controls.

Upcoming Events

🗓️ October 2026

  • All Things Open 2026 (October 19–20, 2026) — Raleigh, North Carolina, USA. One of the largest community-focused open source conferences on the U.S. East Coast exploring open source software, AI engineering, and maintainer sustainability—featuring Googlers Andrew Brogdon, Mark Techson, and Marc Dougherty speaking on "Where Is My Futuristic App? Generative UI and the Open Future" and Abdel Sghiouar on "Taming Agentic AI: How to Run Agents-Generated Code Safely on Kubernetes", alongside the Google Community Lounge with the Flutter team.
  • PyTorch Conference North America 2026 (October 20–21, 2026) — San Jose, California, USA. Two days of open source machine learning innovation across the PyTorch ecosystem—featuring a keynote by Google's Bill Jia ("Workload Fungibility in the Age of Agents") and technical sessions from Googlers Chris Jones, Sandeep Pokkunuri, Rob Mulla, Ankita Luthra, Trinadh Kotturu, Claudio Basile, Qi Zhou, Jago Macleod, and Aleksey Vlasenko on TorchTPU, vLLM, SGLang, Ray, and Kubernetes.
  • AGNTCon + MCPCon North America 2026 (October 22–23, 2026) — San Jose, California, USA. Linux Foundation and Agentic AI Foundation conference focused on building and scaling production agentic systems with open standards—featuring keynotes by Google's Sarah Drasner and Chi Wang, plus sessions from Googlers Alan Blount (on A2UI), Junjie Bu (on interoperable agent discovery), Amit Handa (on agentic commerce), Dominic Farolino (on MCP Apps + WebMCP), and Prerna Kakkar & Kurtis Van Gent (on EvalBench).
  • GitHub Universe 2026 (October 28–29, 2026) — San Francisco, California, USA & Virtual. Annual global developer gathering highlighting open source workflows, collaborative security, and multi-model AI-assisted software engineering.

🗓️ November 2026

  • Open Source in Finance Forum (OSFF) New York (November 4–5, 2026) — New York, New York, USA. Dedicated industry conference examining open source compliance, supply-chain security, and collaborative innovation across regulated financial institutions.
  • SeaGL (Seattle GNU/Linux Conference) 2026 (November 6–7, 2026) — Seattle, Washington, USA & Virtual. Free, grassroots technical summit dedicated to spreading awareness and knowledge of free and open source software, hardware, and culture.
  • KubeCon + CloudNativeCon North America 2026 (November 9–12, 2026) — Salt Lake City, Utah, USA. The Cloud Native Computing Foundation's flagship conference uniting adopters and maintainers around Kubernetes and cloud-native infrastructure—featuring over 35 sessions and keynotes from Googlers including Abdel Sghiouar, Jago Macleod, Tim Hockin, Kaslin Fields, John Belamaric, Dawn Chen, Janet Kuo, Benjamin Elder, Antonio Ojea, Lior Lieberman, Michelle Au, and Braydon Kains across Kubernetes SIGs, etcd, containerd, Gateway API, CEL admission policies, and agent sandboxes.
  • SFSCON (South Tyrol Free Software Conference) 2026 (November 13–14, 2026) — Bolzano, Italy. One of Europe's longest-running Free Software conferences bringing together public-sector decision-makers and developers to advance digital sovereignty and open infrastructure.

🗓️ December 2026

  • Yocto Project Virtual Summit 2026.12 (December 1–3, 2026) — Virtual. Community summit for embedded Linux engineers and maintainers building custom, reproducible Linux distributions across edge and IoT hardware.
  • Open Source Summit Japan 2026 (December 7–9, 2026) — Tokyo, Japan. The Linux Foundation's premier Asia-Pacific conference connecting open source developers, kernel maintainers, and enterprise leaders across cloud, embedded Linux, and open AI, including sessions from Google engineers such as Anurag Sinha.
  • OpenCompliance Summit 2026 (December 10–11, 2026) — Tokyo, Japan. Specialized gathering uniting legal, security, and OSPO practitioners around OpenChain, SPDX, software bills of materials (SBOMs), and global open source supply-chain compliance.

Open Source Reads and Links

  • [Blog] Meet the A2A CLI: discover, message, and manage agents from your terminal — In Developer Relations, few things beat showing a protocol live in a terminal during a conference talk without a complex web stack in the way. The new Apache 2.0 A2A CLI lets you discover, message, and wrap any stdin/stdout script into a streaming Agent2Agent server with --exec—raising an interesting question: does meeting developers in the Unix shell matter more for open protocol adoption than heavy SDKs?
  • [Blog] Talking to Agents with a2a (as a human!) — Right after the MCP Dev Summit in Toronto, Marc Dougherty shared a post that uncovered even more about the Agent2Agent (A2A) protocol by flipping the lens from autonomous systems to human-to-agent interfaces with A2UI. Building a2term so agents render interactive terminal confirmation forms before acting raises a compelling question: could open agent protocols also save humans from enterprise UI bloat?
  • [Article] Dreamforce 2026 — When major enterprise platforms start telling customers they may never need to log into a web UI again because every workflow is now an API, MCP tool, or CLI command, where does the user interface go? RedMonk's Rachel Stephens examines this shift toward headless software and asks a question every open source protocol builder should ponder: when third-party agents mediate our data and workflows, how well does trust actually travel?
  • [Blog] EmbeddingGemma 2: an open, lightweight multimodal embedding model — Moving RAG setups fully on-device opens up real-world possibilities—from kiosks in low-connectivity areas and offline backup systems to hardware that ships with all of its own help and support docs onboard. With Google DeepMind's Apache 2.0 release of EmbeddingGemma 2 fitting multimodal search into 567MB of RAM, what new resilient tools become possible when devices don't need an internet connection to know how they work?
  • [Blog] Atproto Web Tile Embeds — Seeing AT Protocol Web Tiles in the wild sparks curiosity about what new publishing patterns become possible when open protocols move beyond text and static images. Nathan Cassell walks through embedding a live, sandboxed 3D Web Tile straight from a personal data server into a blog post—making us wonder what developers might build when interactive micro-apps can travel anywhere without phoning home.
  • [Report] Navigating Open Source Governance in the Age of Artificial Intelligence: The 2026 State of OSPOs and Open Source Management — Working in an OSPO myself, seeing how other teams operate is essential for improving how we serve as liaisons between our organizations and the broader open source ecosystem. With the Linux Foundation and TODO Group's 2026 survey finding 79% of AI-involved OSPOs shaping model policy and 69% piloting agentic workflows, how can we ensure enterprise AI governance also supports upstream maintainers?
  • [Report] Celebrating 35 Years of Linux: The Open Source Engine Powering Three Decades of Global Innovation and Infrastructure — It is incredible to see the success of the Linux kernel and distributions across enterprise software development—and to ponder how a project from the early 1990s has kept up with so many technological shifts. As Linux Foundation Research celebrates 35 years of Linux across billions of devices and every top-500 supercomputer, how can the community's model of continuous adaptation guide the next generation of maintainers?

Which of these stories will you be chatting about at your next meetup or conference? Let us know! Share with us on our @GoogleOSS X account or our @opensource.google Bluesky account.

How much does it cost to use open source software?

Thursday, October 8, 2026

Open source software is used pervasively, with some estimating that over 90% of codebases contain open source software. Many adopt open source software because it’s free and thus cheaper than writing a proprietary alternative. But as the community saying goes: “open source is free as in puppies, not free as in beer.” Once you or your organization has adopted an open source project, there is still effort (such as engineering time, costs, etc.) associated with ensuring that your version of an open source project is healthy and up to date.

While efforts by the research community have investigated the ongoing costs required to maintain open source software, at Google we needed to better understand the resources required to use thousands of open source software packages.

To better understand this cost, we designed a study to evaluate the effort (in software engineering hours) associated with maintaining open source software packages within Google. We focused on the following questions:

RQ1: How long does it take for an engineer (not a maintainer of the upstream project) to update an open source software package at Google?

RQ2: Can complexity metrics predict the relative effort/amount of time to update a package at Google?

Customization incurs additional cost

The majority of open source package updates (at Google) take four hours or less. However, the long tail could be days to months to fully land a package update. We needed to understand what makes the difference between hours, days, and months.

Our results suggested metrics that could be better predictors of update complexity than others. For example, local patches and customization, the number of package dependencies, and the number of upstream contributors, were better indicators of update complexity than the age of the package, or how many teams were using that package internally.

Horizontal bar chart from a 2024 survey of 346 Google employees showing characteristics that make an open source software package update take longer than average: Google-specific patches or customization (49%), upstream breaking changes (37%), Google breaking changes (31%), complexity of package (29%), other (22%), number of teams required to review changes (20%), unresponsive Google reviewers (17%), upstream/project issues (12%), size of package (10%), and security issues (8%).

Study limitations and future work

As this study was completed at Google, we acknowledge there are bias and limitations of our findings, including the following:

  • Business priority-based sampling: While rigorous, generalizable research studies thoroughly interrogate samples to minimize bias and maximize analytic potential, we designed this study to focus on existing data and minimize new data collection which could impact engineering roadmaps.
  • We did not dictate tooling: We did not specify what tools (including genAI-enabled features) could or could not be used in the update process, and as such did not investigate the impact of any specific tool.
  • Bias towards Go: Our collected data had significant bias towards Go. Given the lack of variety in our sample, we could not investigate the effect of language ecosystems, but other internal efforts indicated that language may significantly impact maintenance efforts. We encourage this line of investigation for future studies.
  • Only active projects: This effort did not include significant data collection on stale or archived packages.

Curious about our approach and findings? Read the full research report: “How much does it cost to maintain a copy of an open source software package (at Google)?”

Adopting Pyrefly as the Python type checker at Google

Tuesday, October 6, 2026

Python is one of the primary languages at Google, powering everything from machine learning research to developer infrastructure and data pipelines. Across hundreds of thousands of files in our monorepo, fast and reliable static type checking is essential for maintaining code safety and developer velocity.

Today, Pyrefly—an open source type checker developed by Meta—is the Python type checker at Google.

Replacing our previous type-checking infrastructure with Pyrefly provided significant speedups for engineers and agents alike, while substantially reducing build-system compute resources.

Moving away from Pytype

For more than a decade, Google relied on Pytype, an internally developed type checker that pioneered Python type checking and collaborated with the open source community to create typeshed.

However, as Python’s typing system evolved rapidly, Pytype faced fundamental challenges. Because it operated by analyzing compiled bytecode rather than source ASTs, keeping pace with modern typing PEPs became an increasing maintenance burden due to bytecode instability across Python releases. In addition, it struggled to deliver the fast turnaround times required for modern development loops.

As detailed in the Pytype update, we decided that Python 3.12 would be the final supported version for Pytype, leading us to evaluate and adopt modern open source alternatives.

Why Pyrefly?

Pyrefly incorporates years of collective lessons from earlier tools across the Python typing ecosystem. When evaluating candidates to succeed Pytype, Pyrefly quickly stood out across three key areas:

Performance

Written in Rust, Pyrefly is designed for high throughput and lazy, parallel evaluation. In our internal benchmarks across various Google projects, it proved to be an order of magnitude faster than Pytype, while scaling smoothly across large dependency graphs.

Typing spec conformance

Pyrefly achieves strong conformance—scoring roughly 97% on the official typing conformance test suite—and is actively maintained to track new Python versions and typing PEPs. This comprehensive language support makes Python version upgrades across our monorepo smoother.

In addition to supporting new syntax, Pyrefly provides strict type safety in areas where Pytype was historically permissive. A notable example is unsound unions: Pytype allowed passing a value of a union type (such as int | None or int | str) to a function expecting a specific type (such as int), as long as at least one type in the union was compatible. However, Pyrefly enforces sound union checking, catching these mismatches:

# foo.py
def process_id(x: int) -> None:
    ...
def get_id() -> int | None:
    ...
val = get_id()
# Accepted by Pytype, but rejected by Pyrefly:
process_id(val)

Actionable error diagnostics

Pyrefly provides Rust-style compiler diagnostics, displaying the offending code snippet with inline annotations that point directly to the root cause of type mismatches, sometimes with suggested fixes. E.g., for the foo.py example above, Pyrefly produces:

ERROR Argument `int | None` is not assignable to parameter `x` with type `int` in function `process_id` [bad-argument-type]
 --> foo.py:8:12
  |
8 | process_id(val)
  |            ^^^
  |
  The declared type does not allow `None`. Consider narrowing the value with an `is not None` check.

Performance and infrastructure impact

Switching to Pyrefly brought measurable improvements across Google's developer ecosystem and infrastructure:

  • Up to 98% faster incremental rebuilds: In developer edit-and-rebuild workflows (with a warm daemon during active editing cycles), Pyrefly delivered up to a 98% latency reduction across various targets. On large machine learning targets, type-checking times dropped from minutes to seconds.
  • >90% critical-path reduction in clean builds: In cold-cache benchmark suites across major libraries and models, Pyrefly consistently reduced the type-checking share of the build critical path by 90% to 99%, eliminating a long-standing bottleneck in our build pipelines.
  • >80% compute hardware savings: Pyrefly reduced Google’s daily peak compute occupancy for Python type checking by more than 80%, saving thousands of machine cores every day.

To illustrate this impact on developer workflows, the chart below compares total edit-and-rebuild latency between Pytype and Pyrefly across targets of varying sizes.

Horizontal bar chart comparing total edit-and-rebuild latency between Pytype and Pyrefly across five target sizes with a warm Bazel cache. Pyrefly completes in 1.7 to 4.5 seconds across all targets, while Pytype takes 2.7 seconds on a small configuration library and up to 246.7 seconds (~4.1 minutes) on a large machine learning model.

Developer feedback

Beyond aggregate metrics, Pyrefly improved the day-to-day development loop, allowing engineers and AI coding agents to catch bugs faster.

Here is what engineers across Google have shared about their experience:

"I haven't waited for a Pytype action to complete since our project switched [to Pyrefly]. It is doubly awesome for agentic coding. Type checking is faster than running the tests now." — Peter Hawkins, JAX Tech Lead

"I really like that Pyrefly gives super clear errors that point out exactly what's wrong." — Yotam Doron, Gemini Large Scale Pretraining

“Investing in Python tooling pays huge dividends for research velocity: Pyrefly keeps our experimental iterations fast and catches subtle bugs early with clear, actionable errors.” — Tom Ward, GDM Science

Looking forward

Adopting Pyrefly highlights the value of uniting behind shared open source developer tooling. We are deeply grateful to the Pyrefly team for their rapid turnaround and responsiveness on upstream issues throughout our rollout. We look forward to continuing our collaboration and contributing to the Python open source community.

To learn more about Pyrefly or try it in your own projects, visit the Pyrefly website and the Pyrefly GitHub repository.

.