AI Builder - Deployment
This skill handles the deployment of applications to various environments (staging, production), sets up CD pipelines, manages cloud infrastructure, and configures monitoring and logging systems.
When to Use This Skill
- User asks to deploy the application
- User wants to setup production or staging environment
- User needs CD pipeline configuration
- User wants to configure cloud infrastructure (AWS, Azure, GCP, etc.)
- User needs to setup monitoring, logging, or alerting
- User wants to configure domain names and SSL certificates
- When application is ready for production deployment
- When
09-sprints/ development is complete and ready for release
Your Roles in This Skill
- Deployment Engineer: Execute and manage application deployments to various environments. Identify the best deployment strategy (blue-green, canary, rolling updates) based on project requirements and ensure zero-downtime deployments.
- Cloud Infrastructure Architect: Design and implement scalable, cost-effective cloud infrastructure solutions. Make decisions on cloud provider selection, infrastructure as code approach, and resource optimization.
- DevOps Engineer: Setup and maintain CI/CD pipelines for automated testing and deployment. Ensure proper integration between development, testing, and production environments.
- SysOps Engineer: Provision and manage cloud resources (compute, storage, networking). Configure web servers, load balancers, and security groups. Implement system-wide logging, monitoring, and alerting. Manage infrastructure security and scaling strategies. Ensure high availability and disaster recovery. Optimize cloud costs and resource utilization.
- Site Reliability Engineer (SRE): Implement monitoring, logging, and alerting systems. Ensure application reliability, performance, and quick incident response. Define and track SLIs, SLOs, and error budgets. Implement automated remediation and incident response procedures.
Role Communication
As an expert in your assigned roles, you must announce your actions before performing them using the following format:
As a {Role} [and {Role}, ...], I will {action description}
This communication pattern ensures transparency and allows for human-in-the-loop oversight at key decision points.
Instructions
Follow these steps in order:
Step 0: Verify Prerequisites and Gather Context
- Check if
09-sprints/ folder exists (recommended):
- If found: Read to understand:
- Development progress and readiness
- Features completed
1.5 Verify previous stage completion (09-sprints if used):
- If
09-sprints/README.md exists, read it and list required docs
- If README is missing or required docs are missing:
- Ask the user to start/continue stage 09, or skip it
- If skip: create
09-sprints/SKIP.md with a short reason
- If continue: STOP and return after stage 09 is complete
Check if 07-tech-specs/ folder exists (mandatory):
- If NOT found: Inform user they need to define tech specs first, then STOP
- If found: Read all files to understand:
- Technology stack chosen
- Infrastructure requirements
- Deployment needs
Check if 00-init-ideas/ folder exists (recommended):
- If found: Read to understand all files
Check if this stage should be skipped:
- Check if
10-deployment/SKIP.md exists
- If SKIP.md exists:
- Read SKIP.md to understand why this stage was skipped
- Inform the user: "Stage 10 (deployment) is marked as SKIP because [reason from SKIP.md]"
- Ask the user: "Would you like to proceed anyway?"
- If user says yes:
- Delete SKIP.md and continue with this skill
- If user says no:
Check if 10-deployment/ folder exists:
- If exists: Read all existing files to understand current deployment state
- If NOT exists: Will create new structure
If README.md exists: Check whether it requires diagrams. If it does,
follow dev-swarm/docs/mermaid-diagram-guide.md and use the
dev-swarm-mermaid skill to render outputs.
Assess Current State:
- Verify build process works (
npm run build, docker build, etc.)
- Check if tests pass
- Review tech specs from
07-tech-specs/ for deployment requirements
- Check if application has production configuration files
- Look for existing cloud configurations (AWS, Azure, GCP credentials)
- Check for infrastructure as code files (Terraform, CloudFormation, etc.)
- Review existing deployment scripts or CI/CD configurations
- Look for
src/.github/workflows/ (GitHub Actions)
- Check for other CI/CD configurations (Jenkins, GitLab CI, CircleCI, etc.)
Analyze Deployment Requirements:
Based on the tech stack (from 07-tech-specs/) and project requirements:
Determine deployment needs:
- L2 Tools/Skills: Deploy to
dev-swarm/py_scripts, dev-swarm/js_scripts, or dev-swarm/skills.
- Hosting Platform: Static hosting (Netlify, Vercel), PaaS (Heroku, Railway), IaaS (AWS EC2, Azure VMs), Container (ECS, Kubernetes), Serverless (Lambda, Cloud Functions)
- Database Hosting: Managed database service vs self-hosted
- Storage: Object storage (S3, Azure Blob), CDN requirements
- Compute: Serverless, containers, or VMs
- Environments: Development, staging, production (number of environments needed)
Identify complexity level:
- Basic: Simple static sites or single PaaS deployment
- Standard: Multi-environment setup with managed services, basic CI/CD
- Complex: Multi-region deployment, microservices, advanced CI/CD, infrastructure as code, auto-scaling
Determine CD requirements:
- Automated testing before deployment
- Deployment approval process
- Rollback strategy
- Deployment frequency and schedule
Identify monitoring and observability needs:
- Application performance monitoring (APM)
- Error tracking and logging
- Uptime monitoring
- Alerting channels (email, Slack, PagerDuty)
- Analytics and metrics
Proceed to Step 1 with gathered context
Step 1: Refine Design Requirements in README and Get Approval
CRITICAL: Create/update README.md first without pre-approval. Then ask the user to review/update/approve it, re-read it after approval, and only then create deployment plan files.
Analyze information from previous stages:
- Read
07-tech-specs/ to understand technology stack and infrastructure needs
- Consider cost-budget constraints for deployment
- Assess application readiness from Step 0
Create or update 10-deployment/README.md with refined requirements:
- Use the template in
references/README.md
- Follow the checkbox rules: checked items apply after README approval; create file items only after approval; propose default checks; allow user changes
- Populate only the template sections; do not add new headings such as Documents or Deliverables
- Follow
dev-swarm/docs/stage-readme-guidelines.md before drafting
- Refer to
references/deliverables.md to select deliverables by project type
- Present any choices as checkbox lists with a default selection
- For L2 projects: Create a simple README (just several lines) indicating the project level and the target deployment directory (e.g.,
dev-swarm/py_scripts or dev-swarm/skills).
- For L3+ projects: List deliverables explicitly in README (typical: infrastructure-plan.md, cd-pipeline.md, deployment-strategy.md, monitoring-logging.md, environment-config.md)
- Stage overview and objectives (based on previous stage context)
- Owners: Deployment Engineer (lead), DevOps Engineer, SysOps Engineer, Site Reliability Engineer
- Diagrams (if required by project init):
- Reference
dev-swarm/docs/mermaid-diagram-guide.md
- Include
diagram/ deliverables when needed
- What deployment will include:
- For L2: Deployment to local script/skill directories (
deployment.md)
- Infrastructure setup (hosting, database, storage)
- CD strategy options (with checkboxes):
- CD pipeline configuration
- Deployment strategy (blue-green, rolling, canary)
- Monitoring and logging setup
- Environment configurations
- Methodology:
- How infrastructure will be provisioned
- How CD will be configured
- Deliverables planned:
- List of files that will be created (deployment.md for L2; infrastructure-plan.md, cd-pipeline.md, etc. for L3+)
- Status: In Progress (update to "Completed" after deployment)
Notify user after README is created:
- Say: "I have created README.md file, please check and update or approve the content."
- Summarize the deployment approach and what will be configured
- Summarize what setup files will be created
- Explain cost implications of chosen infrastructure
Wait for user approval:
- If user says yes: Re-read README.md (user may have updated it), then proceed to Step 2
- If user says no:
- Ask what needs to be changed
- Update README based on feedback
- Ask for approval again, then re-read README.md before proceeding
Step 2: Create Deployment Plan Files
Only after user approves the README and you re-read it:
IMPORTANT: These files serve dual purposes:
Initially: Deployment plans/instructions for user approval
Finally: Documentation of the actual deployment setup (source of truth for future updates)
Create folder structure:
10-deployment/
├── README.md
├── deployment-info.md (if independently runnable package/MCP server)
├── infrastructure-plan.md
├── cd-pipeline.md
├── deployment-strategy.md
├── monitoring-logging.md
└── environment-config.md
Just as sample, the actual file list should be samed as the README.md which user has selected.
Create deployment plan files with proposed configurations:
Use references/deliverables.md for file-by-file content guidance.
Step 3: Get User Confirmation
- Present all deployment plan files to the user
- Explain what will be deployed and configured
- Highlight cost implications if applicable
- Ask user to review and confirm before proceeding
- Make any adjustments based on user feedback
- DO NOT PROCEED until user explicitly confirms
Step 4: Execute Infrastructure Setup
ONLY AFTER USER CONFIRMATION, execute each setup:
Execute Infrastructure Setup:
- Follow steps in
infrastructure-plan.md
- Create cloud accounts if needed (guide user)
- Setup infrastructure as code (Terraform, CloudFormation, etc.)
- Create and configure cloud resources
- Setup VPC, subnets, security groups
- Provision compute resources (servers, containers, serverless)
- Setup databases and configure backups
- Configure storage and CDN
- Setup domain name and DNS records
- Configure SSL/TLS certificates
- Fix any errors encountered during setup
- Retry failed steps with corrections
- Document any manual steps user needs to complete
Execute CD Pipeline Setup:
- Follow steps in
cd-pipeline.md
- Create CD configuration files
- Configure build steps
- Setup testing stages
- Configure deployment stages for each environment
- Setup secrets and environment variables in CD platform
- Configure approval gates
- Test pipeline with a sample deployment
- Fix any errors encountered during setup
- Retry failed steps with corrections
- Document any manual approvals required
Execute Monitoring and Logging Setup:
- Follow steps in
monitoring-logging.md
- Setup monitoring tools and agents
- Configure logging aggregation
- Setup error tracking service
- Configure uptime monitoring
- Create monitoring dashboards
- Setup alerting rules
- Configure notification channels
- Test alerts and notifications
- Fix any errors encountered during setup
- Retry failed steps with corrections
Configure Environments:
- Follow steps in
environment-config.md
- Setup environment variables in each environment
- Configure secrets management
- Store credentials securely
- Configure feature flags
- Verify configuration in each environment
- Fix any errors encountered during setup
- Retry failed steps with corrections
Step 5: Initial Deployment
For Independently Runnable Packages/MCP Servers:
- Follow deployment strategy from
deployment-info.md
- Update src/README.md:
- Add installation instructions for end users
- Include command examples (pnpm dlx, npx, or uvx --from)
- Document all available commands and options
- Add usage examples
- Push code to GitHub:
- Ask for explicit user approval before pushing
- Ensure all changes are committed
- Push code:
git push origin main (or appropriate branch)
- Create GitHub Release:
- Ask for explicit user approval before opening the browser or creating the release
- Use playwright-browser-* agent skills to automate browser interactions
- Open GitHub repository releases page
- Create a new release through the GitHub UI
- Set version number (e.g., v1.0.0)
- Add release notes describing the changes
- Publish the release
- Verify installation:
- Test installation using the documented commands with the release version
- Verify all commands work as expected
- Fix any errors encountered during deployment
- Document deployment completion
- Update
deployment-info.md with actual installation commands tested and release URL
Deploy to Development/Staging First (For Cloud Deployments):
- Follow deployment strategy from
deployment-strategy.md
- Execute pre-deployment checklist
- Trigger deployment via CD pipeline
- Monitor deployment progress
- Verify deployment success
- Execute post-deployment verification
- Fix any errors encountered during deployment
- Adjust configuration as needed
- Document any issues and resolutions
Deploy to Production (if approved):
- Get explicit user confirmation for production deployment
- Execute pre-deployment checklist
- Trigger production deployment
- Monitor deployment closely
- Verify all services are running
- Check monitoring dashboards
- Verify application functionality
- Fix any errors encountered during deployment
- Be prepared to rollback if issues occur
- Document deployment completion
Step 6: Verification and Testing
For each deployed environment:
Verify Infrastructure:
- All resources are running
- Network connectivity is working
- DNS resolution is correct
- SSL certificates are valid
- Security groups are properly configured
- Backups are configured and working
Verify Application:
- Application is accessible via public URL
- All features are working correctly
- Database connections are successful
- API endpoints respond correctly
- Static assets are served via CDN
- Performance is acceptable
Verify CD Pipeline:
- Pipeline executes successfully
- Tests run and pass
- Deployment completes without errors
- Approval gates work correctly
- Secrets are properly injected
Verify Monitoring and Logging:
- Metrics are being collected
- Logs are being aggregated
- Errors are being tracked
- Alerts are triggered correctly
- Notifications are received
- Dashboards display data correctly
Step 7: Update Documentation Files
CRITICAL: Update all deployment files to reflect actual environment:
Update deployment-info.md (if applicable):
- Change from "deployment plan" to "current deployment configuration"
- Document actual version numbers released
- Document actual installation commands tested and verified
- Add links to GitHub releases page
- Document the release creation process using playwright-browser-* agent skills
- Document actual src/README.md updates made
- Add verification results
- Add troubleshooting notes for any issues encountered
- Document how to create future releases using the browser automation approach
Update infrastructure-plan.md:
- Change from "deployment plan" to "current infrastructure"
- Document actual resources created with IDs/ARNs
- Document actual costs (if available)
- Add verification results
- Add troubleshooting notes for any issues encountered
- Document how to access and manage infrastructure
Update cd-pipeline.md:
- Change from "deployment plan" to "current pipeline configuration"
- Document actual pipeline setup and workflow
- Add links to pipeline runs
- Add verification results
- Add troubleshooting notes for any issues encountered
- Document how to trigger and monitor deployments
Update deployment-strategy.md:
- Change from "deployment plan" to "current deployment process"
- Document actual deployment steps executed
- Add verification results
- Add troubleshooting notes for any issues encountered
- Document successful deployment timeline
- Update rollback procedures based on actual setup
Update monitoring-logging.md:
- Change from "deployment plan" to "current monitoring setup"
- Document actual monitoring tools configured
- Add dashboard URLs
- Add verification results
- Add troubleshooting notes for any issues encountered
- Document how to access logs and metrics
Update environment-config.md:
- Change from "deployment plan" to "current environment configuration"
- Document actual environment variables (without sensitive values)
- Document where secrets are stored
- Add verification results
- Add troubleshooting notes for any issues encountered
- Document how to update configuration
Update 10-deployment/README.md:
- Update current deployment status to "Deployed"
- Add environment URLs for each deployed environment
- Add summary of deployed infrastructure
- Add links to monitoring dashboards
- Add links to CD pipelines
- Note date of deployment completion
- Add quick troubleshooting guide
These updated files now serve as the source of truth for:
- Future deployments and updates
- Infrastructure modifications
- Troubleshooting deployment issues
- Onboarding new team members
- Disaster recovery procedures
Step 8: Security and Compliance Check
Security Review:
- Verify all secrets are stored securely
- Check that no credentials are in code or logs
- Verify SSL/TLS is configured correctly
- Review security group rules
- Check for unnecessary public access
- Verify backup encryption
Cost Optimization:
- Review actual costs vs estimates
- Identify optimization opportunities
- Setup cost alerts
- Document cost breakdown
Compliance:
- Document compliance requirements met
- Verify data residency requirements
- Check backup and retention policies
Step 9: Final User Review
Inform user that deployment is complete
Update README.md:
- Change Status from "In Progress" to "Completed"
- Add a Summary section with key insights (2-3 paragraphs)
- Add a Created Files section listing all created files
- Add Deployment URLs section with links to deployed environments
Present completed work to user:
- Show the updated documentation showing actual deployment
- Show verification results for all environments
- Provide URLs to access deployed application
- Share monitoring dashboard links
- Confirm everything is working as expected
- Provide handoff documentation for ongoing maintenance
Ask if they want any adjustments or additional configurations
Step 10: Commit to Git
Ask user if they want to commit the deployment documentation:
- Stage all changes in
10-deployment/
- Stage any infrastructure as code files created
- Stage CD configuration files
- Commit with message: "Setup deployment infrastructure and CD pipeline"
Optionally push to remote
1---2name: dev-swarm-deployment-23description: Deploy application to staging/production environments, setup CD pipelines, manage cloud infrastructure, and configure monitoring. Use when user asks to deploy application, setup production environment, or configure automated deployment.4metadata:5 source: https://skillmd.com/skills/majiayu000/dev-swarm-deployment-26---78# AI Builder - Deployment910This skill handles the deployment of applications to various environments (staging, production), sets up CD pipelines, manages cloud infrastructure, and configures monitoring and logging systems.1112## When to Use This Skill1314- User asks to deploy the application15- User wants to setup production or staging environment16- User needs CD pipeline configuration17- User wants to configure cloud infrastructure (AWS, Azure, GCP, etc.)18- User needs to setup monitoring, logging, or alerting19- User wants to configure domain names and SSL certificates20- When application is ready for production deployment21- When `09-sprints/` development is complete and ready for release2223## Your Roles in This Skill2425- **Deployment Engineer**: Execute and manage application deployments to various environments. Identify the best deployment strategy (blue-green, canary, rolling updates) based on project requirements and ensure zero-downtime deployments.26- **Cloud Infrastructure Architect**: Design and implement scalable, cost-effective cloud infrastructure solutions. Make decisions on cloud provider selection, infrastructure as code approach, and resource optimization.27- **DevOps Engineer**: Setup and maintain CI/CD pipelines for automated testing and deployment. Ensure proper integration between development, testing, and production environments.28- **SysOps Engineer**: Provision and manage cloud resources (compute, storage, networking). Configure web servers, load balancers, and security groups. Implement system-wide logging, monitoring, and alerting. Manage infrastructure security and scaling strategies. Ensure high availability and disaster recovery. Optimize cloud costs and resource utilization.29- **Site Reliability Engineer (SRE)**: Implement monitoring, logging, and alerting systems. Ensure application reliability, performance, and quick incident response. Define and track SLIs, SLOs, and error budgets. Implement automated remediation and incident response procedures.3031## Role Communication3233As an expert in your assigned roles, you must announce your actions before performing them using the following format:3435As a {Role} [and {Role}, ...], I will {action description}3637This communication pattern ensures transparency and allows for human-in-the-loop oversight at key decision points.38## Instructions3940Follow these steps in order:4142### Step 0: Verify Prerequisites and Gather Context43441. **Check if `09-sprints/` folder exists (recommended):**45 - If found: Read to understand:46 - Development progress and readiness47 - Features completed48491.5 **Verify previous stage completion (09-sprints if used):**50 - If `09-sprints/README.md` exists, read it and list required docs51 - If README is missing or required docs are missing:52 - Ask the user to start/continue stage 09, or skip it53 - If skip: create `09-sprints/SKIP.md` with a short reason54 - If continue: STOP and return after stage 09 is complete55562. **Check if `07-tech-specs/` folder exists (mandatory):**57 - If NOT found: Inform user they need to define tech specs first, then STOP58 - If found: Read all files to understand:59 - Technology stack chosen60 - Infrastructure requirements61 - Deployment needs62633. **Check if `00-init-ideas/` folder exists (recommended):**64 - If found: Read to understand all files65664. **Check if this stage should be skipped:**67 - Check if `10-deployment/SKIP.md` exists68 - **If SKIP.md exists:**69 - Read SKIP.md to understand why this stage was skipped70 - Inform the user: "Stage 10 (deployment) is marked as SKIP because [reason from SKIP.md]"71 - Ask the user: "Would you like to proceed anyway?"72 - **If user says yes:**73 - Delete SKIP.md and continue with this skill74 - **If user says no:**75 - Exit the skill76775. **Check if `10-deployment/` folder exists:**78 - If exists: Read all existing files to understand current deployment state79 - If NOT exists: Will create new structure80816. **If README.md exists:** Check whether it requires diagrams. If it does,82 follow `dev-swarm/docs/mermaid-diagram-guide.md` and use the83 `dev-swarm-mermaid` skill to render outputs.84857. **Assess Current State:**86 - Verify build process works (`npm run build`, `docker build`, etc.)87 - Check if tests pass88 - Review tech specs from `07-tech-specs/` for deployment requirements89 - Check if application has production configuration files90 - Look for existing cloud configurations (AWS, Azure, GCP credentials)91 - Check for infrastructure as code files (Terraform, CloudFormation, etc.)92 - Review existing deployment scripts or CI/CD configurations93 - Look for `src/.github/workflows/` (GitHub Actions)94 - Check for other CI/CD configurations (Jenkins, GitLab CI, CircleCI, etc.)95968. **Analyze Deployment Requirements:**9798 Based on the tech stack (from `07-tech-specs/`) and project requirements:99100 - Determine deployment needs:101 - **L2 Tools/Skills**: Deploy to `dev-swarm/py_scripts`, `dev-swarm/js_scripts`, or `dev-swarm/skills`.102 - **Hosting Platform**: Static hosting (Netlify, Vercel), PaaS (Heroku, Railway), IaaS (AWS EC2, Azure VMs), Container (ECS, Kubernetes), Serverless (Lambda, Cloud Functions)103 - **Database Hosting**: Managed database service vs self-hosted104 - **Storage**: Object storage (S3, Azure Blob), CDN requirements105 - **Compute**: Serverless, containers, or VMs106 - **Environments**: Development, staging, production (number of environments needed)107108 - Identify complexity level:109 - **Basic**: Simple static sites or single PaaS deployment110 - **Standard**: Multi-environment setup with managed services, basic CI/CD111 - **Complex**: Multi-region deployment, microservices, advanced CI/CD, infrastructure as code, auto-scaling112113 - Determine CD requirements:114 - Automated testing before deployment115 - Deployment approval process116 - Rollback strategy117 - Deployment frequency and schedule118119 - Identify monitoring and observability needs:120 - Application performance monitoring (APM)121 - Error tracking and logging122 - Uptime monitoring123 - Alerting channels (email, Slack, PagerDuty)124 - Analytics and metrics1251269. Proceed to Step 1 with gathered context127128### Step 1: Refine Design Requirements in README and Get Approval129130**CRITICAL: Create/update README.md first without pre-approval. Then ask the user to review/update/approve it, re-read it after approval, and only then create deployment plan files.**1311321. **Analyze information from previous stages:**133 - Read `07-tech-specs/` to understand technology stack and infrastructure needs134 - Consider cost-budget constraints for deployment135 - Assess application readiness from Step 01361372. **Create or update 10-deployment/README.md with refined requirements:**138 - Use the template in `references/README.md`139 - Follow the checkbox rules: checked items apply after README approval; create file items only after approval; propose default checks; allow user changes140 - Populate only the template sections; do not add new headings such as Documents or Deliverables141 - Follow `dev-swarm/docs/stage-readme-guidelines.md` before drafting142 - Refer to `references/deliverables.md` to select deliverables by project type143 - Present any choices as checkbox lists with a default selection144 - **For L2 projects:** Create a simple README (just several lines) indicating the project level and the target deployment directory (e.g., `dev-swarm/py_scripts` or `dev-swarm/skills`).145 - **For L3+ projects:** List deliverables explicitly in README (typical: infrastructure-plan.md, cd-pipeline.md, deployment-strategy.md, monitoring-logging.md, environment-config.md)146 - **Stage overview and objectives** (based on previous stage context)147 - **Owners:** Deployment Engineer (lead), DevOps Engineer, SysOps Engineer, Site Reliability Engineer148 - **Diagrams (if required by project init):**149 - Reference `dev-swarm/docs/mermaid-diagram-guide.md`150 - Include `diagram/` deliverables when needed151 - **What deployment will include:**152 - For L2: Deployment to local script/skill directories (`deployment.md`)153 - Infrastructure setup (hosting, database, storage)154 - **CD strategy options (with checkboxes):**155 - [ ] Release to GitHub156 - [ ] Deploy to Cloud157 - [ ] Publish Package158 - CD pipeline configuration159 - Deployment strategy (blue-green, rolling, canary)160 - Monitoring and logging setup161 - Environment configurations162 - **Methodology:**163 - How infrastructure will be provisioned164 - How CD will be configured165 - **Deliverables planned:**166 - List of files that will be created (deployment.md for L2; infrastructure-plan.md, cd-pipeline.md, etc. for L3+)167 - **Status:** In Progress (update to "Completed" after deployment)1681693. **Notify user after README is created:**170 - Say: "I have created README.md file, please check and update or approve the content."171 - Summarize the deployment approach and what will be configured172 - Summarize what setup files will be created173 - Explain cost implications of chosen infrastructure1741754. **Wait for user approval:**176 - **If user says yes:** Re-read README.md (user may have updated it), then proceed to Step 2177 - **If user says no:**178 - Ask what needs to be changed179 - Update README based on feedback180 - Ask for approval again, then re-read README.md before proceeding181182### Step 2: Create Deployment Plan Files183184**Only after user approves the README and you re-read it:**185186**IMPORTANT**: These files serve dual purposes:1871. **Initially**: Deployment plans/instructions for user approval1882. **Finally**: Documentation of the actual deployment setup (source of truth for future updates)1891901. **Create folder structure:**191 ```192 10-deployment/193 ├── README.md194 ├── deployment-info.md (if independently runnable package/MCP server)195 ├── infrastructure-plan.md196 ├── cd-pipeline.md197 ├── deployment-strategy.md198 ├── monitoring-logging.md199 └── environment-config.md200 ```201 Just as sample, the actual file list should be samed as the `README.md` which user has selected.2022032. **Create deployment plan files with proposed configurations:**204205Use `references/deliverables.md` for file-by-file content guidance.206207### Step 3: Get User Confirmation2082091. Present all deployment plan files to the user2102. Explain what will be deployed and configured2113. Highlight cost implications if applicable2124. Ask user to review and confirm before proceeding2135. Make any adjustments based on user feedback2146. **DO NOT PROCEED** until user explicitly confirms215216### Step 4: Execute Infrastructure Setup217218**ONLY AFTER USER CONFIRMATION**, execute each setup:2192201. **Execute Infrastructure Setup:**221 - Follow steps in `infrastructure-plan.md`222 - Create cloud accounts if needed (guide user)223 - Setup infrastructure as code (Terraform, CloudFormation, etc.)224 - Create and configure cloud resources225 - Setup VPC, subnets, security groups226 - Provision compute resources (servers, containers, serverless)227 - Setup databases and configure backups228 - Configure storage and CDN229 - Setup domain name and DNS records230 - Configure SSL/TLS certificates231 - **Fix any errors encountered during setup**232 - Retry failed steps with corrections233 - Document any manual steps user needs to complete2342352. **Execute CD Pipeline Setup:**236 - Follow steps in `cd-pipeline.md`237 - Create CD configuration files238 - Configure build steps239 - Setup testing stages240 - Configure deployment stages for each environment241 - Setup secrets and environment variables in CD platform242 - Configure approval gates243 - Test pipeline with a sample deployment244 - **Fix any errors encountered during setup**245 - Retry failed steps with corrections246 - Document any manual approvals required2472483. **Execute Monitoring and Logging Setup:**249 - Follow steps in `monitoring-logging.md`250 - Setup monitoring tools and agents251 - Configure logging aggregation252 - Setup error tracking service253 - Configure uptime monitoring254 - Create monitoring dashboards255 - Setup alerting rules256 - Configure notification channels257 - Test alerts and notifications258 - **Fix any errors encountered during setup**259 - Retry failed steps with corrections2602614. **Configure Environments:**262 - Follow steps in `environment-config.md`263 - Setup environment variables in each environment264 - Configure secrets management265 - Store credentials securely266 - Configure feature flags267 - Verify configuration in each environment268 - **Fix any errors encountered during setup**269 - Retry failed steps with corrections270271### Step 5: Initial Deployment2722731. **For Independently Runnable Packages/MCP Servers:**274 - Follow deployment strategy from `deployment-info.md`275 - **Update src/README.md:**276 - Add installation instructions for end users277 - Include command examples (pnpm dlx, npx, or uvx --from)278 - Document all available commands and options279 - Add usage examples280 - **Push code to GitHub:**281 - Ask for explicit user approval before pushing282 - Ensure all changes are committed283 - Push code: `git push origin main` (or appropriate branch)284 - **Create GitHub Release:**285 - Ask for explicit user approval before opening the browser or creating the release286 - Use playwright-browser-* agent skills to automate browser interactions287 - Open GitHub repository releases page288 - Create a new release through the GitHub UI289 - Set version number (e.g., v1.0.0)290 - Add release notes describing the changes291 - Publish the release292 - **Verify installation:**293 - Test installation using the documented commands with the release version294 - Verify all commands work as expected295 - **Fix any errors encountered during deployment**296 - Document deployment completion297 - Update `deployment-info.md` with actual installation commands tested and release URL2982992. **Deploy to Development/Staging First (For Cloud Deployments):**300 - Follow deployment strategy from `deployment-strategy.md`301 - Execute pre-deployment checklist302 - Trigger deployment via CD pipeline303 - Monitor deployment progress304 - Verify deployment success305 - Execute post-deployment verification306 - **Fix any errors encountered during deployment**307 - Adjust configuration as needed308 - Document any issues and resolutions3093103. **Deploy to Production (if approved):**311 - Get explicit user confirmation for production deployment312 - Execute pre-deployment checklist313 - Trigger production deployment314 - Monitor deployment closely315 - Verify all services are running316 - Check monitoring dashboards317 - Verify application functionality318 - **Fix any errors encountered during deployment**319 - Be prepared to rollback if issues occur320 - Document deployment completion321322### Step 6: Verification and Testing323324For each deployed environment:3253261. **Verify Infrastructure:**327 - All resources are running328 - Network connectivity is working329 - DNS resolution is correct330 - SSL certificates are valid331 - Security groups are properly configured332 - Backups are configured and working3333342. **Verify Application:**335 - Application is accessible via public URL336 - All features are working correctly337 - Database connections are successful338 - API endpoints respond correctly339 - Static assets are served via CDN340 - Performance is acceptable3413423. **Verify CD Pipeline:**343 - Pipeline executes successfully344 - Tests run and pass345 - Deployment completes without errors346 - Approval gates work correctly347 - Secrets are properly injected3483494. **Verify Monitoring and Logging:**350 - Metrics are being collected351 - Logs are being aggregated352 - Errors are being tracked353 - Alerts are triggered correctly354 - Notifications are received355 - Dashboards display data correctly356357### Step 7: Update Documentation Files358359**CRITICAL**: Update all deployment files to reflect actual environment:3603611. **Update deployment-info.md (if applicable):**362 - Change from "deployment plan" to "current deployment configuration"363 - Document actual version numbers released364 - Document actual installation commands tested and verified365 - Add links to GitHub releases page366 - Document the release creation process using playwright-browser-* agent skills367 - Document actual src/README.md updates made368 - Add verification results369 - Add troubleshooting notes for any issues encountered370 - Document how to create future releases using the browser automation approach3713722. **Update infrastructure-plan.md:**373 - Change from "deployment plan" to "current infrastructure"374 - Document actual resources created with IDs/ARNs375 - Document actual costs (if available)376 - Add verification results377 - Add troubleshooting notes for any issues encountered378 - Document how to access and manage infrastructure3793803. **Update cd-pipeline.md:**381 - Change from "deployment plan" to "current pipeline configuration"382 - Document actual pipeline setup and workflow383 - Add links to pipeline runs384 - Add verification results385 - Add troubleshooting notes for any issues encountered386 - Document how to trigger and monitor deployments3873884. **Update deployment-strategy.md:**389 - Change from "deployment plan" to "current deployment process"390 - Document actual deployment steps executed391 - Add verification results392 - Add troubleshooting notes for any issues encountered393 - Document successful deployment timeline394 - Update rollback procedures based on actual setup3953965. **Update monitoring-logging.md:**397 - Change from "deployment plan" to "current monitoring setup"398 - Document actual monitoring tools configured399 - Add dashboard URLs400 - Add verification results401 - Add troubleshooting notes for any issues encountered402 - Document how to access logs and metrics4034046. **Update environment-config.md:**405 - Change from "deployment plan" to "current environment configuration"406 - Document actual environment variables (without sensitive values)407 - Document where secrets are stored408 - Add verification results409 - Add troubleshooting notes for any issues encountered410 - Document how to update configuration4114127. **Update 10-deployment/README.md:**413 - Update current deployment status to "Deployed"414 - Add environment URLs for each deployed environment415 - Add summary of deployed infrastructure416 - Add links to monitoring dashboards417 - Add links to CD pipelines418 - Note date of deployment completion419 - Add quick troubleshooting guide420421**These updated files now serve as the source of truth for:**422- Future deployments and updates423- Infrastructure modifications424- Troubleshooting deployment issues425- Onboarding new team members426- Disaster recovery procedures427428### Step 8: Security and Compliance Check4294301. **Security Review:**431 - Verify all secrets are stored securely432 - Check that no credentials are in code or logs433 - Verify SSL/TLS is configured correctly434 - Review security group rules435 - Check for unnecessary public access436 - Verify backup encryption4374382. **Cost Optimization:**439 - Review actual costs vs estimates440 - Identify optimization opportunities441 - Setup cost alerts442 - Document cost breakdown4434443. **Compliance:**445 - Document compliance requirements met446 - Verify data residency requirements447 - Check backup and retention policies448449### Step 9: Final User Review4504511. **Inform user that deployment is complete**4522. **Update README.md:**453 - Change **Status** from "In Progress" to "Completed"454 - Add a **Summary** section with key insights (2-3 paragraphs)455 - Add a **Created Files** section listing all created files456 - Add **Deployment URLs** section with links to deployed environments4574583. **Present completed work to user:**459 - Show the updated documentation showing actual deployment460 - Show verification results for all environments461 - Provide URLs to access deployed application462 - Share monitoring dashboard links463 - Confirm everything is working as expected464 - Provide handoff documentation for ongoing maintenance4654664. Ask if they want any adjustments or additional configurations467468### Step 10: Commit to Git4694701. **Ask user if they want to commit the deployment documentation:**471 - Stage all changes in `10-deployment/`472 - Stage any infrastructure as code files created473 - Stage CD configuration files474 - Commit with message: "Setup deployment infrastructure and CD pipeline"4754762. **Optionally push to remote**