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.4---56# AI Builder - Deployment78This skill handles the deployment of applications to various environments (staging, production), sets up CD pipelines, manages cloud infrastructure, and configures monitoring and logging systems.910## When to Use This Skill1112- User asks to deploy the application13- User wants to setup production or staging environment14- User needs CD pipeline configuration15- User wants to configure cloud infrastructure (AWS, Azure, GCP, etc.)16- User needs to setup monitoring, logging, or alerting17- User wants to configure domain names and SSL certificates18- When application is ready for production deployment19- When `09-sprints/` development is complete and ready for release2021## Your Roles in This Skill2223- **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.24- **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.25- **DevOps Engineer**: Setup and maintain CI/CD pipelines for automated testing and deployment. Ensure proper integration between development, testing, and production environments.26- **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.27- **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.2829## Role Communication3031As an expert in your assigned roles, you must announce your actions before performing them using the following format:3233As a {Role} [and {Role}, ...], I will {action description}3435This communication pattern ensures transparency and allows for human-in-the-loop oversight at key decision points.36## Instructions3738Follow these steps in order:3940### Step 0: Verify Prerequisites and Gather Context41421. **Check if `09-sprints/` folder exists (recommended):**43 - If found: Read to understand:44 - Development progress and readiness45 - Features completed46471.5 **Verify previous stage completion (09-sprints if used):**48 - If `09-sprints/README.md` exists, read it and list required docs49 - If README is missing or required docs are missing:50 - Ask the user to start/continue stage 09, or skip it51 - If skip: create `09-sprints/SKIP.md` with a short reason52 - If continue: STOP and return after stage 09 is complete53542. **Check if `07-tech-specs/` folder exists (mandatory):**55 - If NOT found: Inform user they need to define tech specs first, then STOP56 - If found: Read all files to understand:57 - Technology stack chosen58 - Infrastructure requirements59 - Deployment needs60613. **Check if `00-init-ideas/` folder exists (recommended):**62 - If found: Read to understand all files63644. **Check if this stage should be skipped:**65 - Check if `10-deployment/SKIP.md` exists66 - **If SKIP.md exists:**67 - Read SKIP.md to understand why this stage was skipped68 - Inform the user: "Stage 10 (deployment) is marked as SKIP because [reason from SKIP.md]"69 - Ask the user: "Would you like to proceed anyway?"70 - **If user says yes:**71 - Delete SKIP.md and continue with this skill72 - **If user says no:**73 - Exit the skill74755. **Check if `10-deployment/` folder exists:**76 - If exists: Read all existing files to understand current deployment state77 - If NOT exists: Will create new structure78796. **If README.md exists:** Check whether it requires diagrams. If it does,80 follow `dev-swarm/docs/mermaid-diagram-guide.md` and use the81 `dev-swarm-mermaid` skill to render outputs.82837. **Assess Current State:**84 - Verify build process works (`npm run build`, `docker build`, etc.)85 - Check if tests pass86 - Review tech specs from `07-tech-specs/` for deployment requirements87 - Check if application has production configuration files88 - Look for existing cloud configurations (AWS, Azure, GCP credentials)89 - Check for infrastructure as code files (Terraform, CloudFormation, etc.)90 - Review existing deployment scripts or CI/CD configurations91 - Look for `src/.github/workflows/` (GitHub Actions)92 - Check for other CI/CD configurations (Jenkins, GitLab CI, CircleCI, etc.)93948. **Analyze Deployment Requirements:**9596 Based on the tech stack (from `07-tech-specs/`) and project requirements:9798 - Determine deployment needs:99 - **L2 Tools/Skills**: Deploy to `dev-swarm/py_scripts`, `dev-swarm/js_scripts`, or `dev-swarm/skills`.100 - **Hosting Platform**: Static hosting (Netlify, Vercel), PaaS (Heroku, Railway), IaaS (AWS EC2, Azure VMs), Container (ECS, Kubernetes), Serverless (Lambda, Cloud Functions)101 - **Database Hosting**: Managed database service vs self-hosted102 - **Storage**: Object storage (S3, Azure Blob), CDN requirements103 - **Compute**: Serverless, containers, or VMs104 - **Environments**: Development, staging, production (number of environments needed)105106 - Identify complexity level:107 - **Basic**: Simple static sites or single PaaS deployment108 - **Standard**: Multi-environment setup with managed services, basic CI/CD109 - **Complex**: Multi-region deployment, microservices, advanced CI/CD, infrastructure as code, auto-scaling110111 - Determine CD requirements:112 - Automated testing before deployment113 - Deployment approval process114 - Rollback strategy115 - Deployment frequency and schedule116117 - Identify monitoring and observability needs:118 - Application performance monitoring (APM)119 - Error tracking and logging120 - Uptime monitoring121 - Alerting channels (email, Slack, PagerDuty)122 - Analytics and metrics1231249. Proceed to Step 1 with gathered context125126### Step 1: Refine Design Requirements in README and Get Approval127128**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.**1291301. **Analyze information from previous stages:**131 - Read `07-tech-specs/` to understand technology stack and infrastructure needs132 - Consider cost-budget constraints for deployment133 - Assess application readiness from Step 01341352. **Create or update 10-deployment/README.md with refined requirements:**136 - Use the template in `references/README.md`137 - Follow the checkbox rules: checked items apply after README approval; create file items only after approval; propose default checks; allow user changes138 - Populate only the template sections; do not add new headings such as Documents or Deliverables139 - Follow `dev-swarm/docs/stage-readme-guidelines.md` before drafting140 - Refer to `references/deliverables.md` to select deliverables by project type141 - Present any choices as checkbox lists with a default selection142 - **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`).143 - **For L3+ projects:** List deliverables explicitly in README (typical: infrastructure-plan.md, cd-pipeline.md, deployment-strategy.md, monitoring-logging.md, environment-config.md)144 - **Stage overview and objectives** (based on previous stage context)145 - **Owners:** Deployment Engineer (lead), DevOps Engineer, SysOps Engineer, Site Reliability Engineer146 - **Diagrams (if required by project init):**147 - Reference `dev-swarm/docs/mermaid-diagram-guide.md`148 - Include `diagram/` deliverables when needed149 - **What deployment will include:**150 - For L2: Deployment to local script/skill directories (`deployment.md`)151 - Infrastructure setup (hosting, database, storage)152 - **CD strategy options (with checkboxes):**153 - [ ] Release to GitHub154 - [ ] Deploy to Cloud155 - [ ] Publish Package156 - CD pipeline configuration157 - Deployment strategy (blue-green, rolling, canary)158 - Monitoring and logging setup159 - Environment configurations160 - **Methodology:**161 - How infrastructure will be provisioned162 - How CD will be configured163 - **Deliverables planned:**164 - List of files that will be created (deployment.md for L2; infrastructure-plan.md, cd-pipeline.md, etc. for L3+)165 - **Status:** In Progress (update to "Completed" after deployment)1661673. **Notify user after README is created:**168 - Say: "I have created README.md file, please check and update or approve the content."169 - Summarize the deployment approach and what will be configured170 - Summarize what setup files will be created171 - Explain cost implications of chosen infrastructure1721734. **Wait for user approval:**174 - **If user says yes:** Re-read README.md (user may have updated it), then proceed to Step 2175 - **If user says no:**176 - Ask what needs to be changed177 - Update README based on feedback178 - Ask for approval again, then re-read README.md before proceeding179180### Step 2: Create Deployment Plan Files181182**Only after user approves the README and you re-read it:**183184**IMPORTANT**: These files serve dual purposes:1851. **Initially**: Deployment plans/instructions for user approval1862. **Finally**: Documentation of the actual deployment setup (source of truth for future updates)1871881. **Create folder structure:**189 ```190 10-deployment/191 ├── README.md192 ├── deployment-info.md (if independently runnable package/MCP server)193 ├── infrastructure-plan.md194 ├── cd-pipeline.md195 ├── deployment-strategy.md196 ├── monitoring-logging.md197 └── environment-config.md198 ```199 Just as sample, the actual file list should be samed as the `README.md` which user has selected.2002012. **Create deployment plan files with proposed configurations:**202203Use `references/deliverables.md` for file-by-file content guidance.204205### Step 3: Get User Confirmation2062071. Present all deployment plan files to the user2082. Explain what will be deployed and configured2093. Highlight cost implications if applicable2104. Ask user to review and confirm before proceeding2115. Make any adjustments based on user feedback2126. **DO NOT PROCEED** until user explicitly confirms213214### Step 4: Execute Infrastructure Setup215216**ONLY AFTER USER CONFIRMATION**, execute each setup:2172181. **Execute Infrastructure Setup:**219 - Follow steps in `infrastructure-plan.md`220 - Create cloud accounts if needed (guide user)221 - Setup infrastructure as code (Terraform, CloudFormation, etc.)222 - Create and configure cloud resources223 - Setup VPC, subnets, security groups224 - Provision compute resources (servers, containers, serverless)225 - Setup databases and configure backups226 - Configure storage and CDN227 - Setup domain name and DNS records228 - Configure SSL/TLS certificates229 - **Fix any errors encountered during setup**230 - Retry failed steps with corrections231 - Document any manual steps user needs to complete2322332. **Execute CD Pipeline Setup:**234 - Follow steps in `cd-pipeline.md`235 - Create CD configuration files236 - Configure build steps237 - Setup testing stages238 - Configure deployment stages for each environment239 - Setup secrets and environment variables in CD platform240 - Configure approval gates241 - Test pipeline with a sample deployment242 - **Fix any errors encountered during setup**243 - Retry failed steps with corrections244 - Document any manual approvals required2452463. **Execute Monitoring and Logging Setup:**247 - Follow steps in `monitoring-logging.md`248 - Setup monitoring tools and agents249 - Configure logging aggregation250 - Setup error tracking service251 - Configure uptime monitoring252 - Create monitoring dashboards253 - Setup alerting rules254 - Configure notification channels255 - Test alerts and notifications256 - **Fix any errors encountered during setup**257 - Retry failed steps with corrections2582594. **Configure Environments:**260 - Follow steps in `environment-config.md`261 - Setup environment variables in each environment262 - Configure secrets management263 - Store credentials securely264 - Configure feature flags265 - Verify configuration in each environment266 - **Fix any errors encountered during setup**267 - Retry failed steps with corrections268269### Step 5: Initial Deployment2702711. **For Independently Runnable Packages/MCP Servers:**272 - Follow deployment strategy from `deployment-info.md`273 - **Update src/README.md:**274 - Add installation instructions for end users275 - Include command examples (pnpm dlx, npx, or uvx --from)276 - Document all available commands and options277 - Add usage examples278 - **Push code to GitHub:**279 - Ask for explicit user approval before pushing280 - Ensure all changes are committed281 - Push code: `git push origin main` (or appropriate branch)282 - **Create GitHub Release:**283 - Ask for explicit user approval before opening the browser or creating the release284 - Use playwright-browser-* agent skills to automate browser interactions285 - Open GitHub repository releases page286 - Create a new release through the GitHub UI287 - Set version number (e.g., v1.0.0)288 - Add release notes describing the changes289 - Publish the release290 - **Verify installation:**291 - Test installation using the documented commands with the release version292 - Verify all commands work as expected293 - **Fix any errors encountered during deployment**294 - Document deployment completion295 - Update `deployment-info.md` with actual installation commands tested and release URL2962972. **Deploy to Development/Staging First (For Cloud Deployments):**298 - Follow deployment strategy from `deployment-strategy.md`299 - Execute pre-deployment checklist300 - Trigger deployment via CD pipeline301 - Monitor deployment progress302 - Verify deployment success303 - Execute post-deployment verification304 - **Fix any errors encountered during deployment**305 - Adjust configuration as needed306 - Document any issues and resolutions3073083. **Deploy to Production (if approved):**309 - Get explicit user confirmation for production deployment310 - Execute pre-deployment checklist311 - Trigger production deployment312 - Monitor deployment closely313 - Verify all services are running314 - Check monitoring dashboards315 - Verify application functionality316 - **Fix any errors encountered during deployment**317 - Be prepared to rollback if issues occur318 - Document deployment completion319320### Step 6: Verification and Testing321322For each deployed environment:3233241. **Verify Infrastructure:**325 - All resources are running326 - Network connectivity is working327 - DNS resolution is correct328 - SSL certificates are valid329 - Security groups are properly configured330 - Backups are configured and working3313322. **Verify Application:**333 - Application is accessible via public URL334 - All features are working correctly335 - Database connections are successful336 - API endpoints respond correctly337 - Static assets are served via CDN338 - Performance is acceptable3393403. **Verify CD Pipeline:**341 - Pipeline executes successfully342 - Tests run and pass343 - Deployment completes without errors344 - Approval gates work correctly345 - Secrets are properly injected3463474. **Verify Monitoring and Logging:**348 - Metrics are being collected349 - Logs are being aggregated350 - Errors are being tracked351 - Alerts are triggered correctly352 - Notifications are received353 - Dashboards display data correctly354355### Step 7: Update Documentation Files356357**CRITICAL**: Update all deployment files to reflect actual environment:3583591. **Update deployment-info.md (if applicable):**360 - Change from "deployment plan" to "current deployment configuration"361 - Document actual version numbers released362 - Document actual installation commands tested and verified363 - Add links to GitHub releases page364 - Document the release creation process using playwright-browser-* agent skills365 - Document actual src/README.md updates made366 - Add verification results367 - Add troubleshooting notes for any issues encountered368 - Document how to create future releases using the browser automation approach3693702. **Update infrastructure-plan.md:**371 - Change from "deployment plan" to "current infrastructure"372 - Document actual resources created with IDs/ARNs373 - Document actual costs (if available)374 - Add verification results375 - Add troubleshooting notes for any issues encountered376 - Document how to access and manage infrastructure3773783. **Update cd-pipeline.md:**379 - Change from "deployment plan" to "current pipeline configuration"380 - Document actual pipeline setup and workflow381 - Add links to pipeline runs382 - Add verification results383 - Add troubleshooting notes for any issues encountered384 - Document how to trigger and monitor deployments3853864. **Update deployment-strategy.md:**387 - Change from "deployment plan" to "current deployment process"388 - Document actual deployment steps executed389 - Add verification results390 - Add troubleshooting notes for any issues encountered391 - Document successful deployment timeline392 - Update rollback procedures based on actual setup3933945. **Update monitoring-logging.md:**395 - Change from "deployment plan" to "current monitoring setup"396 - Document actual monitoring tools configured397 - Add dashboard URLs398 - Add verification results399 - Add troubleshooting notes for any issues encountered400 - Document how to access logs and metrics4014026. **Update environment-config.md:**403 - Change from "deployment plan" to "current environment configuration"404 - Document actual environment variables (without sensitive values)405 - Document where secrets are stored406 - Add verification results407 - Add troubleshooting notes for any issues encountered408 - Document how to update configuration4094107. **Update 10-deployment/README.md:**411 - Update current deployment status to "Deployed"412 - Add environment URLs for each deployed environment413 - Add summary of deployed infrastructure414 - Add links to monitoring dashboards415 - Add links to CD pipelines416 - Note date of deployment completion417 - Add quick troubleshooting guide418419**These updated files now serve as the source of truth for:**420- Future deployments and updates421- Infrastructure modifications422- Troubleshooting deployment issues423- Onboarding new team members424- Disaster recovery procedures425426### Step 8: Security and Compliance Check4274281. **Security Review:**429 - Verify all secrets are stored securely430 - Check that no credentials are in code or logs431 - Verify SSL/TLS is configured correctly432 - Review security group rules433 - Check for unnecessary public access434 - Verify backup encryption4354362. **Cost Optimization:**437 - Review actual costs vs estimates438 - Identify optimization opportunities439 - Setup cost alerts440 - Document cost breakdown4414423. **Compliance:**443 - Document compliance requirements met444 - Verify data residency requirements445 - Check backup and retention policies446447### Step 9: Final User Review4484491. **Inform user that deployment is complete**4502. **Update README.md:**451 - Change **Status** from "In Progress" to "Completed"452 - Add a **Summary** section with key insights (2-3 paragraphs)453 - Add a **Created Files** section listing all created files454 - Add **Deployment URLs** section with links to deployed environments4554563. **Present completed work to user:**457 - Show the updated documentation showing actual deployment458 - Show verification results for all environments459 - Provide URLs to access deployed application460 - Share monitoring dashboard links461 - Confirm everything is working as expected462 - Provide handoff documentation for ongoing maintenance4634644. Ask if they want any adjustments or additional configurations465466### Step 10: Commit to Git4674681. **Ask user if they want to commit the deployment documentation:**469 - Stage all changes in `10-deployment/`470 - Stage any infrastructure as code files created471 - Stage CD configuration files472 - Commit with message: "Setup deployment infrastructure and CD pipeline"4734742. **Optionally push to remote**