What problem does it solve? Most real codebases are under-documented, and the documentation that exists drifts from the code over time. This Skill reverse-engineers the domain model, architecture, business rules, workflows, and business glossary out of an existing codebase, then validates the findings with a stakeholder, producing lean onboarding docs that give a new team member or AI harness (e.g. Spec Kit) enough grounded context to be productive. ## Core Features & Use Cases - Six-phase evidence-cited workflow: pre-check, tiered deep recon (structure, data model, contracts, business-logic hotspots), one-question-at-a-time stakeholder interview, synthesis, adversarial verification, and a finish phase with doc-drift summary. - Provenance and status model: every claim traces to code evidence or a named stakeholder via an assumptions register and traceability index, with five exception flags ([unchecked], [unverified], [assumption], [outdated], [contradicted]). - Resumable, host-agnostic operation: working state lives in plain files under docs/_discovery/, with commit-based staleness detection, full and code-only modes, and graceful degradation when git, sub-agents, or an SME are unavailable. - Use Case: Point it at a legacy repository with no documentation; it maps the modules into business areas, interviews the Product Owner to confirm inferred rules, and writes dated onboarding docs under docs/ plus a project-root README index ready for spec-driven development. ## Quick Start Ask your agent to run the codebase-discovery skill on this repository in code-only mode and produce onboarding docs under docs/.