drive-to-legacy

Analyze legacy codebases and generate an ARCHITECTURE.md with mermaid diagrams.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ThodsaphonSonthiphin/dev-playbook --skill drive-to-legacy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drive-to-legacy
Source: https://github.com/ThodsaphonSonthiphin/dev-playbook/tree/main/skills/drive-to-legacy
Command: npx skills add https://github.com/ThodsaphonSonthiphin/dev-playbook --skill drive-to-legacy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of understanding and documenting unfamiliar legacy codebases by providing a structured, repeatable process to discover user flows, architecture, data models, business rules, APIs, and build/deploy steps so teams can onboard, port, or refactor with confidence.

Core Features & Use Cases

  • Six-phase exploration workflow that guides an agent or developer from high-level user stories through component maps, data models, business logic, API references, and build/deploy instructions.
  • Actionable output: produces a living ARCHITECTURE.md with mermaid diagrams, decision flowcharts, ER diagrams, and API tables that include business "Why" for each call.
  • Use cases: onboarding new engineers, planning migrations or rewrites, auditing poorly documented projects, and creating developer-facing reference documentation for long-term maintenance.

Quick Start

Ask the drive-to-legacy skill to analyze the repository and produce an ARCHITECTURE.md containing user stories, component hierarchy, data model, business logic rules, API reference with Why rows, and build/deploy instructions.

Frequently Asked Questions about drive-to-legacy

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

FAQPage Schema
How do I document a legacy codebase for onboarding and migration planning?

To document a legacy codebase, you can analyze the repository to extract user stories, component maps, data models, business rules, and APIs, formatting them into an ARCHITECTURE.md with mermaid diagrams to support onboarding and migration.

What is the best way to generate architecture documentation for an unfamiliar codebase?

The best way to generate architecture documentation is executing a six-phase exploration workflow that captures user flows, component hierarchy, data models, business logic, API reference tables, and build/deploy instructions into a living reference document.

Can I use mermaid diagrams to map legacy codebase components and data models?

Yes, you can map legacy codebase components and data models using mermaid diagrams. The process generates decision flowcharts and ER diagrams directly within the ARCHITECTURE.md to visualize the extracted architecture and business logic.

How does an agent extract business logic rules and API queries during codebase migration?

An agent extracts business logic rules and API queries by analyzing the full-stack repository during migration planning, capturing the business "Why" for each API call and formatting these rules into structured reference tables.

What should I include in an ARCHITECTURE.md file to support developer onboarding?

An ARCHITECTURE.md for developer onboarding should include user stories, component hierarchy, data models, business logic rules, API reference tables with business rationales, and build/deploy instructions with mermaid diagrams.

Does this codebase documentation process work for full-stack repositories during porting tasks?

Yes, this codebase documentation process works for full-stack repositories during porting tasks. It applies a structured exploration workflow to extract architecture, data models, and deploy instructions needed for confident rewrites.