deployment-designer
Before code implementation, produce a complete deployment plan covering deployment topology, environment configuration, release commands, data migration, rollback strategy, and post-deployment smoke test design. This Skill is the entry point for Phase 3 Step 3.
Trigger Conditions
Section titled “Trigger Conditions”- User asks to design a deployment plan, release plan, or go-live plan
- User mentions “Phase 3 Step 3”, “deployment plan”, or “部署方案”
- API/DB design is complete and the project needs to enter deployment planning
logos/resources/prd/3-technical-plan/3-deployment/is empty
Prerequisites
Section titled “Prerequisites”- Architecture overview exists in
logos/resources/prd/3-technical-plan/1-architecture/ - Scenario implementation docs exist in
logos/resources/prd/3-technical-plan/2-scenario-implementation/ - API/DB design is complete, or the module has explicitly skipped those phases via
skip_phases logos/logos-project.yamlis readable
Core Capabilities
Section titled “Core Capabilities”- Derive deployment targets from architecture, API, DB, and tech stack
- Design deployment topology for local / test / staging / production environments
- Define environment variables, secret sources, build commands, and release commands
- Define data migration, seed data, and rollback strategy
- Design post-deployment verification checklist
- Design smoke test input for
test-writerto generateSMOKE-*cases - Update
logos-project.yamldeployment gate information - Produce the environment registry
logos/environments.yaml, withdeployentries and deploy scripts for environments that OpenLogos can deploy (see Environment Registry)
Execution Steps
Section titled “Execution Steps”Step 1: Read Context
Section titled “Step 1: Read Context”Reads architecture overview, scenario docs, API specs, DB DDL, and existing deployment plans. Confirms whether the project needs deployment, what target environments exist, and what smoke coverage is needed.
Step 2: Determine Deployment Gates
Section titled “Step 2: Determine Deployment Gates”- Software projects require a deployment plan by default
- Projects with runtime environments require deployment execution and smoke by default
- Pure documentation, spec-only, or library projects can declare
deployment_required: false
Step 3: Output Deployment Plan
Section titled “Step 3: Output Deployment Plan”Writes to logos/resources/prd/3-technical-plan/3-deployment/<module>-01-deployment-plan.md:
- Deployment topology diagram (Mermaid)
- Environment matrix (local / staging / production)
- Build and release commands
- Environment variables and secrets
- Data migration strategy
- Rollback plan
- Post-deployment checklist
- Smoke test scope definition
Mermaid deployment topology diagrams must follow the same graph / flowchart syntax safety rule as architecture diagrams: use quoted labels in the form ID["label"], such as Pages["Cloudflare Pages"], Worker["Cloudflare Worker<br/>staging"], and PROXY["/voice/api proxy"]. Avoid PROXY[/voice/api proxy], because [/ is Mermaid shape syntax and can break rendering. Use subgraph "Staging Environment" for subgraph names with spaces or symbols.
Step 4: Update logos-project.yaml
Section titled “Step 4: Update logos-project.yaml”Writes deployment_gates section:
deployment_gates: <module>: deployment_required: true smoke_required: true environments: - stagingStep 4.1: Produce the Environment Registry
Section titled “Step 4.1: Produce the Environment Registry”When the plan names concrete environments (test, staging, production…), the Skill writes or updates logos/environments.yaml. It only registers environments the plan really has; with no environment split it writes no registry (the registry is opt-in).
schema_version: 1environments: - id: staging name: Staging tier: staging aliases: [pre] health: https://staging.example.com/healthz secrets: [STAGING_DEPLOY_TOKEN] # variable names only, never values deploy: mode: script script: deploy/staging.sh args: ["{env}", "{ref}"] - id: prod name: Production tier: prod deploy: mode: ci provider: github-actions workflow: deploy.yml- Choosing the mode: an existing GitHub Actions deploy workflow →
mode: ci,provider: github-actions; another CI →mode: ci,provider: scriptwith repositorytrigger_script/status_script; scriptable steps without a pipeline →mode: script; steps that still need human or AI judgement →mode: agentwithplan_sectionnaming the plan section. - No commands in the registry:
deployonly references repository scripts and workflows plus arguments and timeouts — neverrun,commandorshellfields. The registry can be edited without a proposal, while the scripts are protected files, so changing what a deployment executes always needs a proposal. - Deploy scripts live in tracked paths (default
deploy/<env>.sh) with the executable bit, run in an isolated worktree of the target commit (so they install dependencies and build themselves), exit non-zero on failure, never print secret values, and are idempotent. They can readOPENLOGOS_DEPLOY_ENV,OPENLOGOS_DEPLOY_REF,OPENLOGOS_DEPLOY_IDandOPENLOGOS_DEPLOY_CHANNEL. - CI workflows must report the commit they actually deployed by uploading the
openlogos-deploy-resultartifact (result.jsonwithdeployed_ref); without it the deployed version is recorded as unknown. - Promotion and approval gates are optional: for
tier: prodthe Skill suggestspromote_fromandrequire_approval: trueand explains that--autoruns will stop at them, but it never switches them on by itself — you decide. proposal_default_envis written only when you explicitly name an environment. The Skill explains what the field does (proposals that need deployment default to that environment instead of asking each time) and lets you pick one or leave it unset; it never sets, changes or removes the value on its own.- Self-check, no real deployment: for each environment with
deployit runs the read-onlyopenlogos env checkandopenlogos deploy --env <id> --ref <commit> --dry-run(a gated environment reportingDEPLOY_PROMOTION_UNVERIFIED/DEPLOY_APPROVAL_REQUIREDis the expected result), plusbash -non shell scripts. It never runs a real deployment,openlogos approveor--force-promote.
For environments with deploy, the plan also gains a “deploy script review summary”: what each script or workflow does, which external resources it touches, which secret names it needs, and how it fails and rolls back.
Step 5: Design Smoke Test Input
Section titled “Step 5: Design Smoke Test Input”Outputs a smoke scope summary that test-writer Skill consumes to generate SMOKE-* test case IDs in logos/resources/test/smoke/.
Output Artifacts
Section titled “Output Artifacts”| Artifact | Location |
|---|---|
| Deployment plan | logos/resources/prd/3-technical-plan/3-deployment/<module>-01-deployment-plan.md |
| logos-project.yaml update | deployment_gates section |
| Environment registry (when the plan has concrete environments) | logos/environments.yaml |
| Deploy scripts (script mode) / CI adapter scripts | Tracked repository paths, default deploy/<env>.sh |
| Smoke scope input | Embedded in deployment plan for test-writer consumption |
Related Skills
Section titled “Related Skills”architecture-designer— Provides the architecture context this Skill readstest-writer— Consumes smoke scope to generateSMOKE-*casesdeployment-executor— Executes the plan this Skill producesopenlogos env/openlogos deploy— Validate the registry and dry-run the configured deployments