agency-codebase-archaeologist

Detects cross-session logic drift, dead code, and doc-code mismatches in multi-tool codebases.

Updated Jul 27, 2026
One-click install
npx skills add https://github.com/imMamdouhaboammar/Mimera --skill agency-codebase-archaeologist-immamdouhaboammar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agency-codebase-archaeologist
Source: https://github.com/imMamdouhaboammar/Mimera/tree/main/.agents/skills/specialized-codebase-archaeologist
Command: npx skills add https://github.com/imMamdouhaboammar/Mimera --skill agency-codebase-archaeologist-immamdouhaboammar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases touched by many AI coding sessions and tools (Claude, Cursor, Copilot, Windsurf) accumulate silent drift: reversed fallback orders, duplicate implementations that disagree, dead code, and documentation that no longer matches behavior. No single session ever notices these mismatches because each one lacks memory of the others. ## Core Features & Use Cases - Drift Detection Across Eras: Reconstructs commit history into eras and compares how the same responsibility was implemented across sessions, surfacing reversed fallbacks, duplicate logic, and order-dependent race conditions. - Four-View Drift Registry: Maintains a cross-referenced registry organized by finding, file era, responsibility, and risk severity so anyone can answer "is this file safe to build on?" at a glance. - Mandatory Standalone Checks: Traces state-existence assumptions across every event/webhook handler and tracks what money/quantity values actually represent (cents vs dollars, UTC vs local) end to end. - Use Case: After six months of mixed AI-assisted development, run an audit to find that orderService.js and orderController.js resolve the same fallback in opposite order — a Critical data-integrity bug no linter would catch. ## Quick Start Audit this repository for cross-session drift and produce a drift registry with findings prioritized by severity.

Frequently Asked Questions about agency-codebase-archaeologist

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find drift in a codebase built by multiple AI tools?

Group commits into eras by date density, then compare how the same responsibility (validation, retries, error handling) is implemented across files from different eras. Flag reversed fallbacks, duplicate logic with different behavior, and orphaned code as findings in a severity-ranked registry.

What is a reversed fallback bug and how do I detect it?

A reversed fallback bug occurs when two files resolve the same default-value chain in opposite orders, letting an unwanted default silently pass through. Trace every fallback chain (??, ||, ternaries) for money, state, or identity fields end to end and confirm which side is meant to be the fallback.

Can this audit catch bugs that linters miss?

Yes. Linters check syntax and local rules, not cross-file intent. This audit catches order-dependent race conditions between event handlers, unit mismatches (cents vs dollars) across differently-named variables, and half-fixes where only one side of a mismatch was updated.

Does the codebase archaeologist fix the bugs it finds?

No. It produces evidenced, prioritized findings and a drift registry, then routes fixes to other agents or humans. Critical findings are verified by a separate reality-check step before being marked Confirmed.

When is duplicate code not considered drift?

Duplication is not drift when two implementations serve genuinely different purposes, such as a US-specific validator versus an international one. The audit confirms shared purpose from callers and intent before flagging disagreement as a bug.