git clone https://github.com/google/elephant-goldfish-model.git--- name: egm-drift-report license: Apache-2.0 disable-model-invocation: true 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. --- # 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. * Append the analysis for each file to `{YYYY-MM-DD}_DRIFT_REPORT.md` using your file-writing tool. * Strict Format: ```markdown ## <DESIGN_DOC_NAME> <Bulleted list of specific divergences found> <Or "No drift detected"> ``` 5. **Guidance** - Be rigorous. If a design doc mentions a specific object, field or file name and the code doesn't have it, that is a reportable drift. Double check for coverage. If there is some part of the logic that is not referenced in a design or README, this is a reportable drift. - Read files liberally to ensure you are looking at the current state of the code, not relying on memory. - Process the files sequentially to ensure the tool output buffer doesn't overflow.
[{"step":"Gather inputs: Collect the company's guidance from their most recent earnings call (e.g., EPS, revenue, and margin guidance) and the actual results for the reporting period. Include the call date, report period, and threshold for deviations.","tip":"Use the company's investor relations page or earnings call transcripts for guidance. For actual results, refer to the earnings press release or SEC filings (e.g., 10-Q or 10-K)."},{"step":"Analyze deviations: Compare actual results against guidance and calculate the percentage deviation for each metric. Flag any deviations that exceed the threshold (e.g., 5% or 10%).","tip":"Use spreadsheet software (e.g., Excel or Google Sheets) to organize the data and calculate deviations. Consider using conditional formatting to highlight outliers."},{"step":"Investigate causes: Research market conditions, operational challenges, or strategic shifts that may explain the deviations. Look for patterns (e.g., supply chain issues, cost overruns, or product delays).","tip":"Pull data from industry reports (e.g., Gartner for tech), news articles, or the company's management discussion and analysis (MD&A) section in their 10-Q/10-K filings."},{"step":"Synthesize insights: Summarize the deviations, analysis, and potential causes in a structured report. Include recommendations for investor relations, internal actions, and communication strategies.","tip":"Use a template (e.g., Word or Google Docs) to ensure consistency in formatting and structure. Tailor the recommendations to the audience (e.g., investors, analysts, or internal stakeholders)."},{"step":"Review and refine: Share the draft report with relevant stakeholders (e.g., finance, investor relations, or executive team) for feedback. Adjust the analysis or recommendations based on their input.","tip":"Use collaboration tools (e.g., Google Docs or Microsoft Teams) to streamline feedback. Focus on clarity and actionability in the final report."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/google/elephant-goldfish-model/tree/main/skills/egm-drift-reportCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate an EGM (Earnings Guidance Model) drift report for [COMPANY_NAME] covering the period from [START_DATE] to [END_DATE]. Compare the company's actual earnings per share (EPS) and revenue against the guidance provided in their most recent earnings call on [CALL_DATE]. Highlight any deviations greater than [THRESHOLD_PERCENTAGE]% and analyze potential causes such as market conditions, operational challenges, or strategic shifts. Include a summary of analyst reactions and stock price movement in response to the results. Format the report with clear sections for key metrics, deviations, analysis, and recommendations for stakeholders.
{"company_name":"TechNova Solutions","report_period":"Q3 2023 (July 1 - September 30, 2023)","guidance_call_date":"May 15, 2023","threshold_percentage":"5","report":{"key_metrics":{"guided_eps":"$1.25","actual_eps":"$1.12","guided_revenue":"$1.8B","actual_revenue":"$1.65B","stock_price_change":"-3.2% (day of earnings), -8.7% (30-day trailing)"},"deviations":[{"metric":"EPS","guided":"$1.25","actual":"$1.12","deviation":"-10.4%","category":"Negative"},{"metric":"Revenue","guided":"$1.8B","actual":"$1.65B","deviation":"-8.3%","category":"Negative"}],"analysis":{"market_conditions":"Global semiconductor supply chain disruptions continued to impact TechNova's enterprise software division, leading to delayed contract signings.","operational_challenges":"Higher-than-expected cloud infrastructure costs (up 12% YoY) and a 15% increase in R&D spend for AI initiatives squeezed margins.","strategic_shifts":"The company accelerated its pivot to AI-driven solutions, which resulted in lower-than-expected revenue from legacy products (down 22% YoY).","analyst_reactions":"Analysts at Goldman Sachs and Morgan Stanley downgraded the stock citing 'execution risks' and 'margin compression.' JPMorgan maintained a neutral rating but lowered their price target from $120 to $105."},"recommendations":{"investor_relations":"Schedule a follow-up earnings call to address margin concerns and provide clarity on the AI product roadmap. Consider hosting an investor day in Q1 2024 to showcase progress.","internal_actions":"Conduct a cost review to identify areas for efficiency gains in cloud spend. Accelerate the timeline for AI product monetization to offset legacy revenue declines.","communication":"Prepare a press release emphasizing long-term growth opportunities in AI, while acknowledging short-term headwinds. Ensure messaging aligns with the company's 'innovation-led growth' narrative."}}}skills-collection
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan