egm-drift-report
Skill0 starsChanged 42 days agoApache-2.0View on GitHub
Detects divergence between authoritative design specifications and live codebase implementation. Produces an actionable, structured drift report with file and symbol evidence without mutating code.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- marcelosf80/dsh-elephant-goldfishtheir own version, first seen Nov 29, 2026
- serguei9090/VibeGraphtheir own version, first seen Nov 16, 2026
- google/elephant-goldfish-modeltheir own version, first seen Nov 1, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- google/elephant-goldfish-model★ 24ksame name
- serguei9090/VibeGraph★ 1same name
- marcelosf80/dsh-elephant-goldfish★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/claude.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/egm.mdcCursor rule
- egm-bootstrapSkill
- egm-brainstormSkill
- egm-draftSkill
- egm-resolveSkill
- egm-review-loopSkill
- egm-reviewSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
When running in Codex or ChatGPT Work, first read Codex integration.
- Distinctive: line 17
When specifications and codebase reality diverge, systems accumulate hidden debt and developer confusion.
- Distinctive: line 26
Concrete Evidence Required: Every reported drift MUST cite the exact specification file and section alongside the concrete source code …
- Distinctive: line 30
Avoid Trivia: Do not treat every minor internal implementation detail (e.g.
- Very specific: line 62
Every finding MUST follow the 11-field Standard Review-Finding Contract (resources/finding_contract.md) and be classified by severity:
- Very specific: line 71
Write the report to {YYYY-MM-DD}_DRIFT_REPORT.md (e.g., 2026-10-23_DRIFT_REPORT.md) in the working directory using your file-writing tool:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
EGM Drift Report: Specification-to-Code Drift Detector
When running in Codex or ChatGPT Work, first read Codex integration.
In Claude Code or Cowork, read ${CLAUDE_PLUGIN_ROOT}/docs/claude.md first.
Overview
When specifications and codebase reality diverge, systems accumulate hidden debt and developer confusion. This skill systematically audits checked-in design specifications, architecture contracts, and READMEs against live source code to detect and report drift.
Execution Constraints & Safety Rules
- Read-Only Operations (STRICT): You are STRICTLY FORBIDDEN from modifying, patching,
or refactoring code or documentation during drift detection. Report discrepancies only.
Remediation is deferred to a separate, user-authorized
/egm-resolvesession. - Concrete Evidence Required: Every reported drift MUST cite the exact specification file and section alongside the concrete source code file, class, function, or line range.
- Distinguish Confirmed Drift from Uncertainty: Distinguish between confirmed drift (explicit contract violation) and unconfirmed drift caused by incomplete context or dynamic dispatch.
- Avoid Trivia: Do not treat every minor internal implementation detail (e.g. local loop variables) as a design violation. Focus on architectural contracts, public APIs, models, data flows, and invariants.
Inputs
DesignPath: Path to a specific design document or directory of design docs/READMEs (e.g.docs/designs/). If omitted, prompt the user.SourceRoot(Optional): Path to the codebase root (defaults to workspace root).
Execution Workflow
Step 1: Discover Authoritative Specifications
- Locate all design documents and contract files in
DesignPath. - For each document, identify authoritative statements:
- Public APIs, endpoints, and method signatures.
- Data structures, models, schemas, and fields.
- Architectural component boundaries and interaction flows.
- Invariants, error handling rules, and acceptance criteria.
Step 2: Source Code Verification
For each documented contract:
- Locate Source Files: Trace referenced files, classes, and symbols in the live repository using code search.
- Verify Fidelity:
- Missing Features: Documented API endpoints, methods, or CLI commands absent from code.
- Incomplete Data Models: Dataclasses, structs, or database models missing documented fields.
- Logic Divergence: Hardcoded values or stub implementations where dynamic logic was specified.
- Contract Conflicts: Parameter types, return types, or error conditions conflicting with the spec.
- Undocumented Behavior: Critical public methods or side effects present in code but missing from docs.
Step 3: Classify & Structure Drift Findings
Every finding MUST follow the 11-field Standard Review-Finding Contract (resources/finding_contract.md)
and be classified by severity:
- Critical: Security breach, data corruption hazard, or completely broken public contract.
- High: Documented core feature missing or unhandled error state.
- Medium: Field name drift, type inconsistency, or outdated architectural diagram.
- Low / Informational: Minor nomenclature discrepancy or formatting inconsistency.
Step 4: Generate Deliverable Drift Report
Write the report to {YYYY-MM-DD}_DRIFT_REPORT.md (e.g., 2026-10-23_DRIFT_REPORT.md) in the working directory using your file-writing tool:
# EGM Specification-to-Code Drift Report
**Audit Date:** [YYYY-MM-DD]
**Target Specifications:** `[DesignPath]`
**Codebase Root:** `[SourceRoot]`
## Executive Summary
* **Total Specifications Audited:** [N]
* **Confirmed Drifts:** [N] (Critical: [C], High: [H], Medium: [M], Low: [L])
* **Uncertain / Incomplete Evidence:** [N]
---
## Drift Findings by Affected Contract
### [[id]] [title]
* **Severity**: [critical | high | medium | low | informational]
* **Category**: correctness
* **Affected Specification**: `[spec_file.md#Lstart-Lend]`
* **Live Code Evidence**: `[src_file.py:Symbol#Lstart-Lend]`
* **Discrepancy Description**: [Factual divergence observed]
* **Reasoning**: [Why this drift causes operational, integration, or maintenance issues]
* **Impact**: [System defect, API breakage, developer confusion]
* **Recommended Correction**: [Update specification to reflect intentional change, or implement missing code]
* **Confidence**: [high | medium | low]
* **Status**: openNotify the user in chat with the summary and report path.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

