Skip to content
Edit this page View source of this page

Work with coding agents

The Elephant-Goldfish Model (EGM) is a design-first workflow for working with coding agents. An Elephant is the session that learns the problem and helps you write the design. Goldfish reviewers start in fresh sessions and read the design without the conversation that produced it. They surface assumptions the drafting session already knew and may have left out. Elephant-Goldfish Model

Start with one design for a change that affects user behavior, introduces a new interface, or requires trade-offs. A routine fix with an obvious outcome can use a short task with a verification step. You can try the workflow with separate sessions or use the upstream plugin for drafting and review. EGM workflow guide

Write a design a new reader can use

Work with an agent to inspect the current code, configuration, and tests. Ask it to help you clarify the problem, compare options where a decision matters, and draft a design that stands on its own. Store a design for this repository under docs/designs/ and register it in docs/designs/SITEMAP.md. The design is a development artifact. Put user-facing instructions for shipped behavior in website/.

A short design can cover five things.

Section What to write down
Problem Who is affected, what they are trying to do, and what the current behavior makes difficult.
Expected behavior What a user or caller will observe, including important edge cases and error behavior.
Scope and constraints What may change, what behavior must be preserved, and any limits on dependencies, interfaces, or permissions.
Decisions The approach you agreed on, why it fits, and any unresolved questions that affect implementation.
Acceptance checks Examples or checks that demonstrate the outcome. Include both the normal path and the failures that matter.

Write down interfaces and decisions that readers need to implement the design. Let the implementation agent choose routine details that the design leaves open.

Review it in a fresh session

Give the reviewer the written design without the drafting chat. Ask them to explain the expected behavior back to you, flag ambiguous requirements, and identify cases whose outcomes are unspecified. If the feedback reveals a missing decision, add the decision to the design so the implementation agent can read it too.

For a team change, agree on the design with the people who own the affected behavior. Record review status and implementation status separately in the design index. An agreed design describes work that can start, and a completed implementation has code and verification to show for it.

Hand off the outcome and constraints

Point the implementation agent to the agreed design and the repository's AGENTS.md. Give it permission to make the in-scope changes and run the relevant checks. Ask for a summary of the result and the evidence. Let it work through the routine steps. If it finds that the repository contradicts the design or a decision would change the scope, resolve that question in the design before proceeding.

For example, an existing CLI project could specify a JSON output mode this way.

  • Outcome — Add --format json to the list command so scripts can consume its output.
  • Constraints — Preserve the default text output and exit codes. Use the standard library and keep errors on stderr.
  • Acceptance — Without the flag, output matches the existing CLI. With the flag, successful stdout parses as JSON. An invalid invocation keeps its existing nonzero exit code and produces no JSON on stdout.

Once those details are in the design, the handoff can be short.

Implement docs/designs/list-json-output.md. Follow AGENTS.md and preserve the behavior and boundaries in the design. Run the acceptance checks and relevant repository checks. Report what passed and any decisions that still need a maintainer.

Verify the result and keep the design current

Review the diff and checks against the design before merging. If a deliberate implementation decision changes an earlier assumption, record the agreed change and bring the docs in line with the code. Use the final behavior and the checks that ran when opening the pull request. Run repository checks