with one click
auditing-ui-archeology
// Analyzes legacy UI templates (Pug, EJS, HTML) to extract a comprehensive inventory of components, layouts, and conditional logic. Use when reverse-engineering a legacy frontend for a modern rewrite.
// Analyzes legacy UI templates (Pug, EJS, HTML) to extract a comprehensive inventory of components, layouts, and conditional logic. Use when reverse-engineering a legacy frontend for a modern rewrite.
Compares a modernized Next.js application against its legacy Express counterpart using runtime side-by-side verification. Use when ensuring functional and business logic parity between two systems.
Manages the end-to-end modernization of legacy Express monoliths into Next.js architectures. Orchestrates subagents for auditing, scaffolding, and verification. Use when starting or managing a greenfield rewrite project.
Systematically probe a modernized Next.js application for logic flaws, security vulnerabilities, or missing features. Use this to find bugs or cases where the migration failed to match legacy behavior.
Analyzes Express route definitions and controller logic to document API endpoints, payloads, and response structures. Use when reverse-engineering an existing Express application's API surface.
Analyzes authentication flows, authorization rules, middleware logic, and side-effects. Use when extracting business rules, Passport configurations, or mailer logic from an Express application.
Analyzes legacy ORM models (Mongoose, Sequelize) to extract schemas, validations, and relationships. Use when reverse-engineering a legacy data layer for a modern rewrite.
| name | auditing-ui-archeology |
| description | Analyzes legacy UI templates (Pug, EJS, HTML) to extract a comprehensive inventory of components, layouts, and conditional logic. Use when reverse-engineering a legacy frontend for a modern rewrite. |
Analyze legacy template files (Pug, EJS, HTML) to extract "UI Intent" and structural patterns. Produce a blueprint for a modern, component-driven design system (e.g., ShadCN + Tailwind).
Reverse-engineer the legacy frontend by mapping out the explicit Route & Page Topology alongside identifying Recurring Component Patterns and Layout Hierarchies. This ensures no pages are left behind during modernization.
Copy this checklist and track your progress:
Task Progress:
- [ ] Step 1: Map Route & Page Topology
- [ ] Step 2: Map Layout Hierarchies
- [ ] Step 3: Catalog Interaction Patterns
- [ ] Step 4: Document Component-Level Intent
- [ ] Step 5: Extract Design Tokens
- [ ] Step 6: Generate UI_Component_Inventory.md
Explicitly list every route/URL requested and rendered by the legacy views.
GET /articles) to the intended Next.js App Router path (e.g., src/app/articles/page.tsx).Identify the "Shell" of the application. Locate parent templates (e.g., layout.pug, base.html) and child blocks.
Group UI elements into functional Patterns:
For each unique pattern or shared fragment, document:
resource.owner_id === current_user.id").user, items[], isOwner).Identify the underlying "Style Intent" found in legacy CSS or inline classes (e.g., Bootstrap bg-primary, text-muted):
Compile findings into a single, highly detailed artifact at docs/legacy-audit/UI_Component_Inventory.md, making sure the Route & Page Topology table is prominent. Additionally, identify specific interaction-parity targets (e.g., "The user profile must correctly display a fallback avatar if the image link is broken"). Append these interaction-specific test cases to docs/verification/Verification_Plan.md.