Deploy Skill
Base: shared/base.md (full on first load, §Summary on chain). Actions: load per-step from actions/.
You generate deployment configurations and CI/CD pipelines. Translate the verified build into a deployable artifact with proper environment promotion, secrets management, and rollback strategy. You produce config files — you don't execute deployments directly.
When active:
- Follow ONLY the process below
- WAIT for user approval at each checkpoint
- Never narrate your internal process
- ALL output in the user's language (read manifest
language field) — no English narration
Activation
✅ aidlc-deploy active — {platform} detected.
Ready to generate deployment configuration and CI/CD pipeline.
Quick Start
- Generate D5 decision gate (deployment strategy, target platform, environments)
- Validate decisions for conflicts → resolve if any
- Generate deployment specification (pipeline architecture, infrastructure topology, promotion flow)
- Present spec → wait for approval
- Generate CI/CD pipeline configuration, environment definitions, and deployment scripts
- Present results → wait for approval → mark workflow complete
Reads: build-report.md, design/implementation.md, context.md, blueprints, existing CI configs
Writes: decisions-deploy.md, deployment.md (specs), pipeline config files, environment configs
Information Contract
Required Inputs
| Information |
Description |
Accepted Formats |
| Build report |
Verified build status and test results |
Markdown (build-report.md) |
| Project context |
Stack, architecture, ecosystem |
Markdown (context.md), manifest |
| Design documents |
Infrastructure and deployment needs |
Markdown (design/implementation.md) |
Optional Inputs
| Information |
Description |
Accepted Formats |
| Existing CI config |
Current pipeline to extend or replace |
YAML (.github/workflows/*.yml, .gitlab-ci.yml, etc.) |
| Infrastructure code |
Existing IaC to reference |
Terraform, CDK, Pulumi, CloudFormation |
| Environment variables |
Required env vars from implementation |
.env.example, config files |
| Operations design |
Health probes, logging config, metrics, shutdown settings |
Markdown (design/operations.md) |
Outputs
| Artifact |
Default Path |
Description |
| decisions-deploy.md |
{WORKFLOW_DIR}/{feature}/decisions-deploy.md |
D5 decision gate answers |
| deployment.md |
{SPECS_DIR}/{feature}/deployment.md |
Deployment specification (pipeline, infra, promotion, risks) |
| Pipeline config |
Project root (platform-specific) |
CI/CD pipeline definition |
| Dockerfile |
Project root |
Multi-stage container build (if container target) |
| Environment configs |
.env.{env}.example |
Per-environment variable templates |
| Infrastructure code |
infra/ |
Terraform or CDK files (if IaC selected in D5) |
| Deploy/rollback scripts |
scripts/ |
Manual deploy and rollback helpers |
| deploy-summary.md |
{WORKFLOW_DIR}/{feature}/deploy-summary.md |
Deployment configuration summary |
Initialization
- Detect environment (per shared base)
- Resolve feature name (per shared base)
- Read manifest at
{WORKFLOW_DIR}/{feature}/aidlc-manifest.yaml
- Read
{WORKFLOW_DIR}/{feature}/build-report.md for build context
- Check for existing CI/CD configs (see detection list in references)
- Read
design/implementation.md for infrastructure requirements
- Read
design/operations.md if it exists (for health probes, logging, metrics, shutdown config)
- Read blueprints Summary sections
Process
Execute actions sequentially. Load the action file when you reach that step — not before.
| Step |
Action |
Load |
| 1 |
Generate D5 decisions + validate |
{SKILL_DIR}/actions/decision-gate.md |
| 2 |
Generate deployment specification |
{SKILL_DIR}/actions/plan.md |
| 3 |
Generate pipeline and configs |
{SKILL_DIR}/actions/generate.md |
| 4 |
Finalize deployment |
{SKILL_DIR}/actions/finalize.md |
References
Load conditionally based on D5 answers — never load all references at once:
| Reference |
Load When |
platforms.md |
Always (overview/fallback for unsupported platforms) |
platform-github-actions.md |
D5 CI = GitHub Actions (read stack + target section only) |
platform-gitlab-ci.md |
D5 CI = GitLab CI (read stack + target section only) |
iac-terraform.md |
D5 IaC = Terraform (read target + database section only) |
iac-cdk.md |
D5 IaC = CDK (read target + database section only) |
strategies.md |
During decision gate (deployment strategy context) |
Skill Handoff
No next skill — this is the final phase. On completion, mark workflow as complete.
Phase-Specific Rules
- This is a project-wide phase — always runs at the feature level, never per-unit.
- Audit actions: decision-gate, plan, validation, generation, approval, deploy-complete.
Deployment Rules
- Generate config files — never execute actual deployments
- Respect existing CI/CD configs: extend or replace based on user decision
- Always include rollback strategy in generated configs
- Secrets must use platform-appropriate secret management (never hardcoded)
- Include health checks and smoke tests in deployment pipeline
- Environment promotion order: dev → staging → production (configurable)
Security
- Never write secrets, tokens, or credentials into generated files
- Use placeholder references:
${{ secrets.NAME }}, ${SECRET_NAME}, etc.
- Flag any secrets that need to be configured in the CI/CD platform
Context Recovery
If context is lost mid-phase, follow aidlc/shared/base.md Context Recovery, then:
- Check if
decisions-deploy.md exists at {WORKFLOW_DIR}/{feature}/:
- Not present → load
actions/decision-gate.md (start from D5)
- Exists but no
deployment.md at {SPECS_DIR}/{feature}/ → load actions/plan.md
deployment.md exists but no pipeline config generated → load actions/generate.md
- Pipeline config exists but manifest
artifacts.deploy.status is NOT "approved" → load actions/generate.md, re-present the generated files for approval (step 8). Never route to finalize.md here — finalize runs only after the user approves.
- Manifest
artifacts.deploy.status: "approved" → finalize already ran (it sets this together with state.status: "completed"); present workflow-complete status
1---2name: aidlc-deploy3description: CI/CD pipeline generation and deployment configuration. Produces pipeline configs, environment definitions, and deployment scripts for the target platform.4license: MIT5---67# Deploy Skill89> **Base**: `shared/base.md` (full on first load, §Summary on chain). **Actions**: load per-step from `actions/`.1011You generate deployment configurations and CI/CD pipelines. Translate the verified build into a deployable artifact with proper environment promotion, secrets management, and rollback strategy. You produce config files — you don't execute deployments directly.1213When active:141. Follow ONLY the process below152. WAIT for user approval at each checkpoint163. Never narrate your internal process174. ALL output in the user's language (read manifest `language` field) — no English narration1819---2021## Activation2223```24✅ aidlc-deploy active — {platform} detected.25Ready to generate deployment configuration and CI/CD pipeline.26```2728---2930## Quick Start31321. Generate D5 decision gate (deployment strategy, target platform, environments)332. Validate decisions for conflicts → resolve if any343. Generate deployment specification (pipeline architecture, infrastructure topology, promotion flow)354. Present spec → wait for approval365. Generate CI/CD pipeline configuration, environment definitions, and deployment scripts376. Present results → wait for approval → mark workflow complete3839**Reads**: build-report.md, design/implementation.md, context.md, blueprints, existing CI configs40**Writes**: decisions-deploy.md, deployment.md (specs), pipeline config files, environment configs4142---4344## Information Contract4546### Required Inputs47| Information | Description | Accepted Formats |48|---|---|---|49| Build report | Verified build status and test results | Markdown (build-report.md) |50| Project context | Stack, architecture, ecosystem | Markdown (context.md), manifest |51| Design documents | Infrastructure and deployment needs | Markdown (design/implementation.md) |5253### Optional Inputs54| Information | Description | Accepted Formats |55|---|---|---|56| Existing CI config | Current pipeline to extend or replace | YAML (.github/workflows/*.yml, .gitlab-ci.yml, etc.) |57| Infrastructure code | Existing IaC to reference | Terraform, CDK, Pulumi, CloudFormation |58| Environment variables | Required env vars from implementation | .env.example, config files |59| Operations design | Health probes, logging config, metrics, shutdown settings | Markdown (design/operations.md) |6061### Outputs62| Artifact | Default Path | Description |63|---|---|---|64| decisions-deploy.md | `{WORKFLOW_DIR}/{feature}/decisions-deploy.md` | D5 decision gate answers |65| deployment.md | `{SPECS_DIR}/{feature}/deployment.md` | Deployment specification (pipeline, infra, promotion, risks) |66| Pipeline config | Project root (platform-specific) | CI/CD pipeline definition |67| Dockerfile | Project root | Multi-stage container build (if container target) |68| Environment configs | `.env.{env}.example` | Per-environment variable templates |69| Infrastructure code | `infra/` | Terraform or CDK files (if IaC selected in D5) |70| Deploy/rollback scripts | `scripts/` | Manual deploy and rollback helpers |71| deploy-summary.md | `{WORKFLOW_DIR}/{feature}/deploy-summary.md` | Deployment configuration summary |7273---7475## Initialization76771. Detect environment (per shared base)782. Resolve feature name (per shared base)793. Read manifest at `{WORKFLOW_DIR}/{feature}/aidlc-manifest.yaml`804. Read `{WORKFLOW_DIR}/{feature}/build-report.md` for build context815. Check for existing CI/CD configs (see detection list in references)826. Read `design/implementation.md` for infrastructure requirements837. Read `design/operations.md` if it exists (for health probes, logging, metrics, shutdown config)848. Read blueprints Summary sections8586---8788## Process8990Execute actions sequentially. **Load the action file when you reach that step — not before.**9192| Step | Action | Load |93|---|---|---|94| 1 | Generate D5 decisions + validate | `{SKILL_DIR}/actions/decision-gate.md` |95| 2 | Generate deployment specification | `{SKILL_DIR}/actions/plan.md` |96| 3 | Generate pipeline and configs | `{SKILL_DIR}/actions/generate.md` |97| 4 | Finalize deployment | `{SKILL_DIR}/actions/finalize.md` |9899---100101## References102103Load conditionally based on D5 answers — never load all references at once:104105| Reference | Load When |106|---|---|107| `platforms.md` | Always (overview/fallback for unsupported platforms) |108| `platform-github-actions.md` | D5 CI = GitHub Actions (read stack + target section only) |109| `platform-gitlab-ci.md` | D5 CI = GitLab CI (read stack + target section only) |110| `iac-terraform.md` | D5 IaC = Terraform (read target + database section only) |111| `iac-cdk.md` | D5 IaC = CDK (read target + database section only) |112| `strategies.md` | During decision gate (deployment strategy context) |113114---115116## Skill Handoff117118**No next skill** — this is the final phase. On completion, mark workflow as complete.119120---121122## Phase-Specific Rules123124- This is a project-wide phase — always runs at the feature level, never per-unit.125- **Audit actions**: decision-gate, plan, validation, generation, approval, deploy-complete.126127### Deployment Rules128- Generate config files — never execute actual deployments129- Respect existing CI/CD configs: extend or replace based on user decision130- Always include rollback strategy in generated configs131- Secrets must use platform-appropriate secret management (never hardcoded)132- Include health checks and smoke tests in deployment pipeline133- Environment promotion order: dev → staging → production (configurable)134135### Security136- Never write secrets, tokens, or credentials into generated files137- Use placeholder references: `${{ secrets.NAME }}`, `${SECRET_NAME}`, etc.138- Flag any secrets that need to be configured in the CI/CD platform139140---141142## Context Recovery143144If context is lost mid-phase, follow `aidlc/shared/base.md` Context Recovery, then:145- Check if `decisions-deploy.md` exists at `{WORKFLOW_DIR}/{feature}/`:146 - Not present → load `actions/decision-gate.md` (start from D5)147 - Exists but no `deployment.md` at `{SPECS_DIR}/{feature}/` → load `actions/plan.md`148 - `deployment.md` exists but no pipeline config generated → load `actions/generate.md`149 - Pipeline config exists but manifest `artifacts.deploy.status` is NOT `"approved"` → load `actions/generate.md`, re-present the generated files for approval (step 8). Never route to `finalize.md` here — finalize runs only after the user approves.150 - Manifest `artifacts.deploy.status: "approved"` → finalize already ran (it sets this together with `state.status: "completed"`); present workflow-complete status