Methodically execute implementation plans with TDD approach, incremental commits, and continuous validation
This skill inherits all available tools. When active, it can use any tool Claude has access to.
Follow this skill to execute plans systematically with quality gates.
Before starting:
# Ensure clean state
git status
# Create feature branch
git checkout -b feature/[feature-name]
# Pull latest dependencies
composer install
# Clear cache
bin/console cache:clear
# Ensure tests pass
./vendor/bin/pest # or phpunit
Follow the TDD cycle:
┌─────────────────┐
│ Read Step │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Write Test │◄──────┐
│ (RED) │ │
└────────┬────────┘ │
│ │
▼ │
┌─────────────────┐ │
│ Run Test │ │
│ (Verify Fail) │ │
└────────┬────────┘ │
│ │
▼ │
┌─────────────────┐ │
│ Implement │ │
│ (GREEN) │ │
└────────┬────────┘ │
│ │
▼ │
┌─────────────────┐ │
│ Run Test │───No──┘
│ (Verify Pass) │
└────────┬────────┘
│ Yes
▼
┌─────────────────┐
│ Refactor │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Commit │
└─────────────────┘
Commit after each completed step:
# Stage changes
git add src/Entity/Order.php
git add tests/Unit/Entity/OrderTest.php
# Commit with clear message
git commit -m "feat(order): add Order entity with status enum
- Create Order entity with uuid, status, customer relation
- Create OrderStatus enum (pending, processing, completed, cancelled)
- Add migration for orders table
- Add unit tests for entity"
Run after each phase:
# Code style
./vendor/bin/php-cs-fixer fix --dry-run
# Static analysis
./vendor/bin/phpstan analyse
# Tests
./vendor/bin/pest
# All checks
composer run-script check
# 1. Create test
# tests/Unit/Entity/OrderTest.php
# 2. Create entity
bin/console make:entity Order
# 3. Adjust entity code
# 4. Create migration
bin/console make:migration
# 5. Run migration
bin/console doctrine:migrations:migrate
# 6. Verify
bin/console doctrine:schema:validate
# 1. Create test
# tests/Unit/Service/OrderServiceTest.php
# 2. Create service interface (if needed)
# src/Service/OrderServiceInterface.php
# 3. Create service
# src/Service/OrderService.php
# 4. Configure in services.yaml (if needed)
# 5. Run tests
./vendor/bin/pest tests/Unit/Service/OrderServiceTest.php
# 1. Create functional test
# tests/Functional/Api/OrderTest.php
# 2. Configure API Platform resource
# 3. Create/configure voter
# 4. Run tests
./vendor/bin/pest tests/Functional/Api/OrderTest.php
# 5. Verify in browser/Postman
curl http://localhost/api/orders
# 1. Create message class
# src/Message/ProcessOrder.php
# 2. Create handler test
# tests/Unit/MessageHandler/ProcessOrderHandlerTest.php
# 3. Create handler
# src/MessageHandler/ProcessOrderHandler.php
# 4. Configure routing in messenger.yaml
# 5. Run tests with in-memory transport
./vendor/bin/pest tests/Unit/MessageHandler/
# Run single test with verbose output
./vendor/bin/pest tests/path/to/Test.php --filter testName -vvv
# Check logs
tail -f var/log/dev.log
# Debug with dump
dd($variable); # or dump($variable);
# Check status
bin/console doctrine:migrations:status
# Rollback last migration
bin/console doctrine:migrations:migrate prev
# Regenerate migration
bin/console doctrine:migrations:diff
# Debug autowiring
bin/console debug:autowiring ServiceName
# Check container
bin/console debug:container ServiceName
# Clear cache
bin/console cache:clear
Update plan checkboxes as you complete:
## Steps
1. [x] Create entity ✓ (commit: abc123)
2. [x] Create migration ✓ (commit: def456)
3. [ ] Create service <- CURRENT
4. [ ] Create tests
Before marking plan complete:
# Full test suite
./vendor/bin/pest
# Code coverage
./vendor/bin/pest --coverage --min=80
# Static analysis
./vendor/bin/phpstan analyse
# Code style
./vendor/bin/php-cs-fixer fix
# Manual testing
# - Test happy path
# - Test edge cases
# - Test error handling
Before merging feature branch: