en un clic
auditing-data-models
// Analyzes legacy ORM models (Mongoose, Sequelize) to extract schemas, validations, and relationships. Use when reverse-engineering a legacy data layer for a modern rewrite.
// Analyzes legacy ORM models (Mongoose, Sequelize) to extract schemas, validations, and relationships. Use when reverse-engineering a legacy data layer 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 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.
| name | auditing-data-models |
| description | Analyzes legacy ORM models (Mongoose, Sequelize) to extract schemas, validations, and relationships. Use when reverse-engineering a legacy data layer for a modern rewrite. |
Analyze the legacy data layer to extract schemas, validation rules, and entity relationships. Produce a blueprint for a modern, type-safe data access layer (e.g., Zod + Native MongoDB).
Reverse-engineer the legacy application's database models to ensure data integrity and structural parity in the modernized system.
Copy this checklist and track your progress:
Task Progress:
- [ ] Step 1: Locate the Models
- [ ] Step 2: Analyze Entity Schemas
- [ ] Step 3: Map Relationships & Hooks
- [ ] Step 4: Generate Data_Models.md
Search the legacy codebase for database model definitions (e.g., app/models/, db/models/). Identify the Primary Entities and their corresponding source files.
For each database model, extract:
String, ObjectId, Date).Date.now).user.authenticate(password)) or computed properties that will need to be ported to the utility layer.pre('save'), post('remove')) that perform side-effects like cascading deletes or password hashing.Compile findings into docs/legacy-audit/Data_Models.md. Additionally, identify specific data-integrity stress-tests (e.g., "Attempt to load a legacy record missing the email field to check if the new Zod schema handles it gracefully"). Append these probes to docs/verification/Verification_Plan.md.