Plugin
explain-my-code
Analyzes a complete code repository as a senior software architect and produces one self-contained, production-grade Markdown document that onboards anyone new to the project with no handover meetings. Five-phase workflow: SCOPE (find repo root, read manifests first), IDENTIFY (tech stack, monolith vs microservices, entry points), TRAVERSE (folder/service/module walk, infer design patterns, trace data and dependency flow), WRITE (all 13 fixed sections, real file/class/function names, embedded Mermaid graph TD and sequenceDiagram), VERIFY (every section present and non-shallow, cited symbols confirmed to exist, valid Mermaid). Output is a single CODEBASE_DOCUMENTATION.md with 13 mandatory sections: Project Overview, System Architecture, Repository Structure, Tech Stack & Dependencies, Core Components / Services, Application Flow (startup/request/auth/data), Key Design Patterns, Database & Models, External Integrations, Configuration & Environment, Build & Deployment, Observations & Risks, Suggestions for Improvement. Constraints preserved from source: no shallow summaries, no skipped sections, no undocumented behavior assumed without stated reasoning; inapplicable sections marked 'Not applicable' rather than dropped; vendored/build dirs excluded; large repos analyzed in chunks. Scope-locked to documentation generation. Refuses line-by-line code review and bug hunts (use wordpress-architect-review or a review skill), refactor/modernization plans (use refactoring-analyst), and diagram-only output (use codebase-to-mermaid). Includes /explain-my-code slash command with current-dir-vs-path picker.