# Egm Drift Report

Runs drift detection on all design documents to check for document and code consistency.

- Repository: https://github.com/google/elephant-goldfish-model (8873 stars)
- Category: Design
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add google/elephant-goldfish-model --skill egm-drift-report -g -a claude-code -y`
Codex: `npx skills add google/elephant-goldfish-model --skill egm-drift-report -g -a codex -y`
Cursor: `npx skills add google/elephant-goldfish-model --skill egm-drift-report -g -a cursor -y`
Gemini CLI: `npx skills add google/elephant-goldfish-model --skill egm-drift-report -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add google/elephant-goldfish-model`

## Description

Runs drift detection on all design documents to check for document and code consistency. Produces an actionable report with differences. Use when the user asks to detect drift or check for consistency across all design documents or READMEs in a directory.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Detect Drift In Designs and Code

When running in Codex or ChatGPT Work, first read [Codex integration](../../docs/codex.md).
In Claude Code or Cowork, read `${CLAUDE_PLUGIN_ROOT}/docs/claude.md` first.

When the user asks to detect drift across all designs or a set of READMEs, the
goal is to identify all instances where the codebase has diverged or failed to
implement the specifications described by those designs or READMEs.

1.  **Check Input**: Verify a directory containing design documents or READMEs
    is provided. If not provided, ask the user to specify the target directory.
2.  **List Documents**: List all files in the design directory.
3.  **Analyze**: For EACH design document:

    *   **Contextualize**: Read the design document. Identify the intent,
        proposed changes, and specific filenames/symbols mentioned.
    *   **Locate Source**: Find the corresponding source code files in the
        source tree. If paths aren't explicit, use code search or grep to
        locate the relevant classes, functions, or API endpoints mentioned in
        the doc. Prompt the user to add missing links to the document to make
        future detection cheaper.
    *   **Verify**: Read the current state of those source files.
    *   **Detect Drift**: Compare the design vs. reality. Look specifically for:
        *   Missing Features: Logic described in the doc but absent in the code.
        *   Incomplete Models: Dataclasses/Classes/Structs/Protos missing fields
            specified in the design.
        *   Logic Shortcuts: Hardcoded values where dynamic logic was planned.
        *   Architectural Divergence: Implementation using different
            patterns/libraries than proposed.
    *   **Filter**: Report ONLY the differences. Do not describe what is working
        or what matches. If the code matches the design perfectly, output "No
        drift detected."

4.  **Report**: Produce a single report listing all discrepancies found.

The rest: https://github.com/google/elephant-goldfish-model/blob/HEAD/distributions/claude/skills/egm-drift-report/SKILL.md
