Rediscovering an Old Codebase, Thanks to Parental Leave
As a tech professional and a product leader, my time is often consumed by strategy, roadmaps, and stakeholder alignment. But when I recently started my Parental Leave—thanks to S&P Global’s truly generous policy—I found myself with something rare: uninterrupted time.
Naturally, I spent most of it with family, soaking in every moment. But I also carved out time to do what I hadn’t done in years: revisit an old side project. You know the type—code that you poured energy into but never launched because… life happened.
This particular project was a web-based SaaS platform for managing online elections—written in PHP 5.7, coupled with vanilla HTML, JavaScript, and a MySQL backend. It had a clean admin dashboard, a voter portal, and some nifty notification logic. It worked, but it was stuck in a different era. For years, it just sat there.
Then I discovered Cursor AI—an AI-powered coding assistant that claimed to “vibe code” with you—and I wondered:
Could it help me modernize this legacy project? Could it understand my messy old code and help me take it further?
Spoiler: It absolutely did.
What Is Cursor AI and Why It Caught My Attention
Cursor AI is an AI-native code editor built on top of VS Code. Think of it as GitHub Copilot meets your codebase with far deeper context. What sets Cursor apart is its ability to:
- Index your entire codebase for full-context understanding
- Let you chat with your project like you would with a teammate
- Suggest, refactor, and even write entire new features with accuracy
- Operate in “Max Mode” to intelligently modify large projects
As someone who’s always curious about the practical applications of AI in product development, I saw this as an opportunity to test its limits—not just through simple examples, but on a real-world, production-level codebase.
Step 1: Onboarding a Legacy Project (PHP 5.7 + MySQL)
After installing Cursor and loading the editor, I pulled in my old election management system—over 40 PHP files structured across models, views, and utility scripts. Here’s what I did to set the stage:
- Imported the entire codebase into Cursor
- Added a copy of the SQL schema file to help the AI understand table relationships, field types, and logic flows
- Explained the basic architecture in a system-level prompt so it knew how features were typically implemented
Right away, Cursor began indexing everything. It understood file dependencies, identified utility functions, parsed DB access patterns, and even picked up on naming conventions. It was like onboarding a senior engineer—just way faster.
Step 2: Upgrading from PHP 5.7 to PHP 8.2
Next, I prompted it to review the entire codebase and migrate it to PHP 8.2. I expected it to give up or break—but to my surprise, it made a solid attempt.
However, I hit a limitation: default analysis mode couldn’t process the full 40+ file codebase. That’s when I found Max Mode—Cursor’s advanced context mode. It unlocked a new level of analysis.
With Max Mode enabled, here’s what Cursor AI did:
- Identified deprecated PHP features (e.g., mysql_* functions, outdated constructor syntax, old array practices)
- Flagged potential runtime errors due to strict typing and newer error handling
- Suggested modern replacements (e.g., switching to mysqli or PDO, using null coalescing operators, arrow functions where applicable)
- Proposed better coding practices, such as:
- Splitting large files into manageable modules
- Replacing magic strings with constants
- Moving business logic away from view files
- Splitting large files into manageable modules
It then asked me to approve changes file-by-file. After reviewing, I accepted the proposed changes. I ran the app locally—and everything just worked.
✅ No broken pages
✅ No unexpected errors
✅ And the codebase felt… modern
Step 3: Adding a Net-New Feature – “Send Election Results to All Voters”
Now that I had a functional, upgraded codebase, I decided to challenge Cursor with a new feature request:
📨 Automatically send election results to all voters once an election is closed.
To give Cursor full context, I tagged:
- The existing CRON job that sends reminder emails
- The “View Results” admin page
- The Election and Voter database models
- The relevant JS modal file used across the admin panel for UI prompts
I then provided natural language instructions:
- Only allow sending results after election status is “closed”
- Reuse the branding, layout, and org logo
- Display a modal confirmation before triggering the send
- Add a new voter-facing page to view the results post-election
- Include a new CRON job to send the email notifications in a batch process
- Add any new DB columns if required to support this logic
The Output Was Astonishing
Within minutes, Cursor AI:
- Built a fully responsive election results page for voters
- Ensured visibility rules matched the election status
- Pulled in org-specific branding and dynamic logo assets
- Created a new cron_send_results.php script
- Added appropriate logging and retry mechanisms for failed emails
- Wrote a DB migration script to add a results_sent flag
- Integrated everything into the admin dashboard, including:
- The Send Results button
- The modal confirmation component
- A status tag that shows if results have been sent to a particular voter
- The Send Results button
The final step? I tested the full flow—and it worked flawlessly.
There were just two minor logic bugs in the cron file, which I pointed out—and Cursor fixed them instantly.
Time Spent: Just 1.5 Hours
All of this—from onboarding, migration, and new feature development to testing and review—was done in under 90 minutes.
I had:
- Migrated from PHP 5.7 → PHP 8.2
- Added an entire new feature
- Preserved the existing UX structure
- Improved code quality along the way
In a traditional setup, this would’ve taken 2–4 weeks across a developer, QA, and release manager.
What This Means for Developers, PMs, and the Industry
AI won’t replace developers—but it will fundamentally change how we work.
For Developers:
- You become the architect and reviewer—not just the coder
- You spend more time designing, testing, and improving
- You offload the repetitive and boilerplate tasks to AI
For Product Teams:
- Reduced cycle time = faster feature delivery
- More bandwidth to test and iterate on customer feedback
- Increased ability to prototype and validate ideas
For End Users:
- More frequent updates
- Fewer bugs and delays
- More value delivered consistently
My Takeaway: AI Is the New Pair Programmer—Only Faster and Smarter
We are witnessing a generational shift in how software is developed. AI tools like Cursor AI, GitHub Copilot, and others are not a threat—they’re an evolution. They don’t remove the need for developers, they amplify them.
I believe teams that embrace AI as a co-pilot will outpace those that resist it. The real winners will be those who integrate AI into their development lifecycle without compromising quality, governance, or creativity.
Your Turn: What Are Your Thoughts?
- Have you tried Cursor AI or similar dev tools?
- Are you using AI in your development workflow?
- Do you see this as augmentation or disruption?
I’d love to hear your thoughts—comment below or connect with me on LinkedIn.
This blog is not sponsored or affiliated with Cursor AI in any way. All opinions are based on my personal experience exploring the tool during my own time. I’m simply sharing this because I was genuinely impressed by what’s possible today with AI-assisted development.