A developer completed a complex Laravel-to-custom-framework migration in one Claude Code session using a TDD-first approach and reusable skills.
The Technique — TDD as Claude Code's Feedback Loop
A developer recently migrated GoFormX, a Laravel 12 + Inertia + Vue 3 application, to a custom PHP framework called Waaseyaa in a single 8-hour Claude Code session. The key wasn't just Claude's coding ability—it was structuring the work so Claude could verify its own progress at every step.
Why It Works — Concrete, Verifiable Outcomes
The developer created a reusable skill called laravel-to-waaseyaa that follows this 6-phase pipeline:
-
Scaffold — Basic package structure with
composer.jsonandServiceProvider - TDD Core Components — Write test → watch it fail → implement → watch it pass
- Wire — Register services, middleware, and routes
- Verify — Run full test suite + CS Fixer
- Deploy — Add to monorepo, create GitHub repo, tag, submit to Packagist
This works because every step has a concrete, verifiable outcome. The tests aren't just for code quality—they're Claude's feedback mechanism. When a test passes, Claude knows that specific component works. No ambiguity, no guessing.
What Got Built — The Output
In that single session:
3 Framework Packages (published to Packagist):
-
waaseyaa/inertia— Inertia v3 adapter with 30 tests -
waaseyaa/auth— Headless authentication with TOTP 2FA and rate limiting (46 tests) -
waaseyaa/billing— Stripe integration with webhook processing (35 tests)
1 Complete Application:
- 7 PHP controllers with 37 unit tests
- 28 Vue 3 page components
- 24 shadcn-vue UI component directories
- Full Docker Compose setup with 6 services
- GitHub Actions CI/CD pipeline
- Ansible deployment config
Total: 148 tests, all green.
How To Apply It — Creating Your Own Claude Code Pipeline
1. Start with a Detailed Spec
The migration spec was written BEFORE any Claude Code session. It specified every route, entity field, and API endpoint. Your CLAUDE.md should include:
## Migration Specification
### Routes to Port
- GET /login → AuthController@showLoginForm
- POST /login → AuthController@login
- GET /dashboard → DashboardController@index
### Database Schema
- users table: id, email, password_hash, created_at
- sessions table: id, user_id, token, expires_at
### API Endpoints
- POST /api/v1/forms → FormController@store
- GET /api/v1/forms/{id} → FormController@show
2. Structure Your Work as Test-First Tasks
Instead of "build authentication system," break it down:
## Current Task: User Login
1. Create test for UserRepository::findByEmail()
2. Implement UserRepository with MariaDB PDO connection
3. Create test for AuthService::attemptLogin()
4. Implement AuthService with password verification
5. Create test for LoginController@store
6. Implement controller with session creation
3. Use Playwright MCP for End-to-End Verification
The developer used Playwright MCP (browser automation) to verify flows actually work in a browser, not just with curl. This catches issues like the Inertia v3 data-page="app" attribute requirement that took reading framework source code to discover.
4. Handle Environment Gotchas
They discovered PHP-FPM doesn't inherit Docker environment variables by default. The fix: add clear_env = no to FPM config AND switch from $_ENV to getenv() with a helper function. Document these in your CLAUDE.md under "Known Issues."
The Reusable Skill — Your Secret Weapon
The laravel-to-waaseyaa skill encodes all the patterns, conventions, and gotchas discovered during the migration. When you complete a complex project with Claude Code, extract the workflow into a skill. Next time you face a similar task, the skill provides the playbook.
What's Actually Verified
Every flow was tested with Playwright MCP:
- GET login page → fill credentials → click "Sign in" → land on dashboard
- Vue app rendering with navigation working
- User data displayed correctly
- HMAC signatures accepted by Go API
This isn't just unit tests—it's full integration testing that the migration actually works.
The Takeaway for Your Next Claude Code Session
Three things made this migration successful:
- Detailed spec before coding — Claude executes against concrete requirements
- TDD as the feedback loop — Tests tell Claude when each component works
- Incremental verification — Commit after every task, test after every component
Don't batch 10 things and hope they all work. Break your project into verifiable steps where Claude can see its own progress. The result? 148 green tests and a production-ready application scaffold in 8 hours.
Originally published on gentic.news
Top comments (0)