- Version: 2.0
Deploys QA-validated stories to production by merging to main, creating releases, deploying, validating, and archiving.
/plugin marketplace add ninthspace/claude-code-marketplace/plugin install sdd@ninthspace-marketplacePurpose: Deploy a QA-validated story to production by merging to main branch, creating releases, deploying to production environment, performing post-deployment validation, and completing story archival.
Syntax: /sdd:story-ship <story_id> [--skip-tests] [--dry-run]
| Parameter | Type | Required | Default | Description | Validation |
|---|---|---|---|---|---|
| story_id | string | Yes | - | Story identifier (e.g., "STORY-2025-001") | Must match pattern STORY-\d{4}-\d{3} |
| --skip-tests | flag | No | false | Skip running tests on merged code (not recommended) | Boolean flag |
| --dry-run | flag | No | false | Simulate deployment without executing | Boolean flag |
VERIFY story location:
/docs/stories/qa/ directory/docs/stories/review/ - suggest running /sdd:story-qa first/docs/stories/development/ - suggest completing review and QAVALIDATE story readiness:
CHECK git status:
RUN pre-merge tests (unless --skip-tests):
DISPLAY pre-flight summary:
โ๏ธ PRE-FLIGHT CHECK
โโโโโโโโโโโโโโโโโโโ
Story: [STORY-ID] - [Title]
Branch: [branch-name]
Status: Ready for deployment
โ
Story in QA directory
โ
All checklists complete
โ
All changes committed
โ
Tests passing ([count] tests)
โ
QA validation complete
Ready to ship to production.
LOAD project context:
/docs/project-context/development-process.md for merge strategySWITCH to main branch:
git checkout main (or master)git pull origin mainMERGE feature branch:
git merge --no-ff [branch-name]RUN tests on merged code (unless --skip-tests):
DISPLAY merge summary:
๐ MERGE COMPLETE
โโโโโโโโโโโโโโโโโ
Merged: [branch-name] โ main
Commit: [commit-hash]
Files changed: [count]
Tests: [count] passing
DETERMINE version strategy:
GENERATE changelog entry:
CREATE git tag:
git tag -a v[version] -m "[Story title]"git tag -a [story-id] -m "[Story title]"git push origin --tagsUPDATE version files (if applicable):
DISPLAY release summary:
๐ฆ RELEASE CREATED
โโโโโโโโโโโโโโโโโโ
Version: [version]
Tag: v[version]
Story: [STORY-ID]
Date: [YYYY-MM-DD]
Changelog entry created
Version files updated
DETECT deployment configuration:
scripts/deploy.sh.github/workflows/deploy.ymlcomposer deploy / npm run deploydeployer.phar/docs/project-context/technical-stack.md for deployment methodEXECUTE deployment (unless --dry-run):
MONITOR deployment:
DISPLAY deployment status:
๐ DEPLOYING TO PRODUCTION
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
Environment: production
Version: [version]
Method: [deployment-method]
[Real-time deployment output...]
โ
Deployment successful
RUN smoke tests:
CHECK application health:
MONITOR initial metrics:
VALIDATE story-specific functionality:
DISPLAY validation results:
โ
POST-DEPLOYMENT VALIDATION
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Smoke Tests: [X/Y] passed
Health Checks: All systems operational
Metrics: Within normal ranges
Story Features: Validated and live
Application healthy and ready for users.
VERIFY all checklists one final time:
UPDATE story file:
ENSURE completed directory exists:
/docs/stories/completed/ if missing.gitkeep if directory createdMOVE story file:
/docs/stories/qa/[story-id].md/docs/stories/completed/[story-id].mdCOMMIT story completion:
COMPILE release notes:
FORMAT release notes:
๐ฆ RELEASE NOTES
โโโโโโโโโโโโโโโโ
Version: [version]
Date: [YYYY-MM-DD]
Story: [STORY-ID] - [Title]
WHAT'S NEW:
- [User-facing feature 1]
- [User-facing feature 2]
- [User-facing improvement 3]
TECHNICAL CHANGES:
- [Implementation detail 1]
- [API change 2]
- [Database migration 3]
- [Configuration change 4]
BUG FIXES:
- [Bug fix 1]
- [Bug fix 2]
KNOWN ISSUES:
- [Limitation 1]
- [Known issue 2]
UPGRADE NOTES:
- [Special instruction 1]
- [Migration step 2]
ROLLBACK PLAN:
See story file for detailed rollback procedure.
PUBLISH release notes:
CHANGELOG.md (if exists)UPDATE documentation:
CLEAN UP branches:
git branch -d [branch-name]git push origin --delete [branch-name]ARCHIVE temporary files:
VERIFY repository state:
UPDATE project tracking:
IF deployment successful:
๐ SUCCESSFULLY SHIPPED!
โโโโโโโโโโโโโโโโโโโโโโโโ
Story: [STORY-ID] - [Title]
DEPLOYMENT:
โข Environment: production
โข Version: [version]
โข Deployed: [timestamp]
โข Duration: [development time]
VALIDATION:
โข Smoke tests: โ
Passed
โข Health checks: โ
Operational
โข Metrics: โ
Normal
โข Features: โ
Live
MONITORING:
โข Application logs: [link or command]
โข Error tracking: [link or command]
โข Performance dashboard: [link]
ROLLBACK PLAN:
Available in story file at:
/docs/stories/completed/[story-id].md
NEXT STEPS:
1. Monitor application for 24 hours
2. Watch for user feedback and issues
3. Review metrics and performance
4. Run /sdd:story-complete [story-id] to archive with learnings
5. Celebrate the successful deployment! ๐
SUGGESTED MONITORING PERIOD:
โข First hour: Active monitoring
โข First 24 hours: Regular checks
โข First week: Periodic validation
IF deployment failed or validation failed:
โ DEPLOYMENT FAILED
โโโโโโโโโโโโโโโโโโโโ
Story: [STORY-ID] - [Title]
FAILURE DETAILS:
โข Phase: [deployment/validation]
โข Error: [error-message]
โข Timestamp: [timestamp]
CURRENT STATE:
โข Code: Merged to main
โข Deployment: Failed or unstable
โข Story: Kept in QA directory
RECOMMENDED ACTION:
/sdd:story-rollback [story-id]
This will:
1. Revert the merge commit
2. Remove the release tag
3. Rollback deployment (if possible)
4. Move story back to appropriate stage
Do you want to rollback now? (y/n)
/sdd:story-rollback command/docs/stories/completed/[story-id].md - Completed story with deployment data/docs/stories/qa/ before proceeding/docs/stories/completed/ on successINPUT:
/sdd:story-ship STORY-2025-001
PROCESS:
โ Pre-flight checks...
โ Story: STORY-2025-001 in /docs/stories/qa/
โ Validating checklists... โ
โ Checking git status... โ
โ Running tests... โ
(156 tests passed)
โ Switching to main branch...
โ Merging feature/auth-001-login-form...
โ Merge successful - 12 files changed
โ Running tests on merged code... โ
โ Creating release...
โ Version: v1.1.0
โ Tag created: v1.1.0
โ Changelog updated
โ Deploying to production...
โ Running: composer deploy
โ [deployment output...]
โ Deployment successful โ
โ Post-deployment validation...
โ Smoke tests: 8/8 passed โ
โ Health checks: All operational โ
โ Metrics: Normal โ
โ Completing story...
โ Moving to /docs/stories/completed/STORY-2025-001.md
โ Cleaning up feature branch...
โ Generating release notes...
OUTPUT:
๐ SUCCESSFULLY SHIPPED!
โโโโโโโโโโโโโโโโโโโโโโโโ
Story: STORY-2025-001 - User Authentication System
DEPLOYMENT:
โข Environment: production
โข Version: v1.1.0
โข Deployed: 2025-03-15 14:32:18 UTC
โข Duration: 9 working days
VALIDATION:
โข Smoke tests: โ
Passed (8/8)
โข Health checks: โ
Operational
โข Metrics: โ
Normal
โข Features: โ
Live
MONITORING:
โข Application logs: php artisan pail
โข Error tracking: Check Sentry dashboard
โข Performance: Watch response times
ROLLBACK PLAN:
Available in story file at:
/docs/stories/completed/STORY-2025-001.md
NEXT STEPS:
1. Monitor application for 24 hours
2. Watch for user feedback and issues
3. Review metrics and performance
4. Run /sdd:story-complete STORY-2025-001 to archive
5. Celebrate the successful deployment! ๐
๐ฆ RELEASE NOTES
โโโโโโโโโโโโโโโโ
Version: v1.1.0
Date: 2025-03-15
Story: STORY-2025-001 - User Authentication System
WHAT'S NEW:
- User registration with email verification
- Secure login with session management
- Password reset functionality
- Remember me option for convenience
TECHNICAL CHANGES:
- Added AuthMiddleware for route protection
- Implemented JWT token handling
- Created authentication test suite
- Added password hashing with bcrypt
ROLLBACK PLAN:
See /docs/stories/completed/STORY-2025-001.md
INPUT:
/sdd:story-ship STORY-2025-002
PROCESS:
โ Pre-flight checks... โ
โ Merging to main... โ
โ Creating release v1.2.0... โ
โ Detecting deployment configuration...
โ No automated deployment found
OUTPUT:
๐ MANUAL DEPLOYMENT REQUIRED
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Story: STORY-2025-002 - Profile Management
Version: v1.2.0
Please complete the following deployment steps:
1. [ ] SSH into production server
2. [ ] Pull latest changes: git pull origin main
3. [ ] Install dependencies: composer install --no-dev
4. [ ] Run migrations: php artisan migrate --force
5. [ ] Clear caches: php artisan cache:clear
6. [ ] Restart services: sudo systemctl restart php-fpm
7. [ ] Verify application is running
Have you completed all deployment steps? (y/n)
> y
โ Running post-deployment validation...
โ Smoke tests: 10/10 passed โ
โ Completing story...
[Success summary displayed]
INPUT:
/sdd:story-ship STORY-2025-003
PROCESS:
โ Pre-flight checks... โ
โ Merging to main... โ
โ Creating release v1.3.0... โ
โ Deploying to production...
โ Error: Database migration failed
OUTPUT:
โ DEPLOYMENT FAILED
โโโโโโโโโโโโโโโโโโโโ
Story: STORY-2025-003 - Payment Integration
FAILURE DETAILS:
โข Phase: deployment
โข Error: Database migration "add_payment_columns" failed
โข Timestamp: 2025-03-16 10:15:42 UTC
โข Exit code: 1
ERROR MESSAGE:
SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'payment_status'
CURRENT STATE:
โข Code: Merged to main (commit abc123)
โข Deployment: Failed during migrations
โข Story: Kept in QA directory
RECOMMENDED ACTION:
/sdd:story-rollback STORY-2025-003
This will:
1. Revert the merge commit
2. Remove the release tag v1.3.0
3. Rollback deployment (revert to v1.2.0)
4. Move story back to QA for fixes
Do you want to rollback now? (y/n)
> y
โ Executing rollback...
[Rollback process initiated]
INPUT:
/sdd:story-ship STORY-2025-004 --dry-run
PROCESS:
โ DRY RUN MODE - No changes will be made
โ Pre-flight checks... โ
โ Would merge feature/notifications to main
โ Would create release v1.4.0
โ Would deploy to production
โ Would run post-deployment validation
โ Would move story to completed
OUTPUT:
๐ DRY RUN COMPLETE
โโโโโโโโโโโโโโโโโโโ
Story: STORY-2025-004 - Push Notifications
SIMULATED ACTIONS:
โ Merge feature/notifications โ main
โ Create release tag v1.4.0
โ Deploy to production
โ Run smoke tests
โ Move to /docs/stories/completed/
โ Delete feature branch
ESTIMATED DURATION: ~5 minutes
No actual changes were made.
Run without --dry-run to execute deployment.
/sdd:story-qa - Move story to QA before shipping/sdd:story-rollback - Rollback failed deployment/sdd:story-complete - Archive story after successful deployment/sdd:story-validate - Run final validation before shipping/sdd:project-status - View all project stories