deploy
Deploy application to target platform. Use when user explicitly says 'deploy', 'push to production', 'ship it'. Handles Vercel, Netlify, AWS, GCP, DigitalOcean, and VPS with pre-deploy verification and health checks. Enforces cost allocation tags + Managed-vs-Self-Host crossover decisions so deploy choices map to actual unit economics, not hand-waved 'we'll optimize later'.
Rune-kit · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add Rune-kit/rune --skill deploy技能说明
name: deploy description: "Deploy application to target platform. Use when user explicitly says 'deploy', 'push to production', 'ship it'. Handles Vercel, Netlify, AWS, GCP, DigitalOcean, and VPS with pre-deploy verification and health checks. Enforces cost allocation tags + Managed-vs-Self-Host crossover decisions so deploy choices map to actual unit economics, not hand-waved 'we'll optimize later'." disable-model-invocation: true metadata: author: runedev version: "0.8.0" layer: L2 model: sonnet group: delivery tools: "Read, Write, Edit, Bash, Glob, Grep" emit: deploy.complete listen: security.passed, tests.passed, docs.updated, audit.complete, db.migrated, integration.verified, convergence.clean
deploy
Purpose
Deploy applications to target platforms. Handles the full deployment flow — environment configuration, build, push, verification, and rollback if needed. Supports Vercel, Netlify, AWS, GCP, DigitalOcean, and custom VPS via SSH.
Called By (inbound)
launch(L1): deployment phase of launch pipeline- User:
/rune deploydirect invocation
Calls (outbound)
test(L2): pre-deploy full test suitedb(L2): pre-deploy migration safety checkperf(L2): pre-deploy performance regression checkverification(L2): pre-deploy build + lint + type checksentinel(L2): pre-deploy security scanbrowser-pilot(L3): verify live deployment visuallywatchdog(L3): setup post-deploy monitoringjournal(L3): record deploy decision, rollback plan, and post-deploy statusincident(L2): if post-deploy health check fails → triage and contain- L4 extension packs: domain-specific deploy patterns when context matches (e.g., @rune/devops for infrastructure)
Cross-Hub Connections
deploy→verification— pre-deploy tests + build must passdeploy→sentinel— security must pass before push
Execution Steps
Step 1 — Pre-deploy checks (HARD-GATE)
Call rune:verification to run the full test suite and build.
If verification fails → STOP. Do NOT proceed. Report failure with test output.
Wiring evidence check (advisory): when deploying a FEATURE (not a hotfix — hotfix chain exempt) whose changes touch both UI and api/service/data files, look for cross-layer evidence: integration.verified (verification Level 3.5 passed) or convergence.clean (converge found zero gaps). Neither present → WARN the user explicitly — "Deploying UI+data changes with no cross-layer wiring evidence. Unit tests alone don't prove the buttons work. Proceed?" — and require confirmation. Advisory, not a block: the user can proceed, but never unknowingly.
Call rune:sentinel to run security scan.
If sentinel returns CRITICAL issues → STOP. Do NOT proceed. Report issues.
Both gates MUST pass. No exceptions.
Step 1.5 — Release Checklist (Production Deploys Only)
Skip for: staging, preview, development deploys.
Before production deploy, verify ALL items:
| # | Check | How | Gate |
|---|---|---|---|
| 1 | Version bumped | package.json/pyproject.toml version matches release | BLOCK if unchanged |
| 2 | Changelog updated | CHANGELOG.md has entry for this version | WARN if missing |
| 3 | Breaking changes documented | RFC artifact exists for each breaking change | BLOCK if RFC missing |
| 4 | Migration scripts ready | DB migrations tested on staging first | BLOCK if untested migration |
| 5 | Rollback plan documented | .rune/deploy/rollback-<version>.md exists | WARN if missing |
| 6 | Release notes drafted | Customer-facing notes for release-comms | WARN if missing |
| 7 | Dependencies locked | Lock file committed, no floating versions | BLOCK if unlocked |
Rollback Plan Template (.rune/deploy/rollback-<version>.md):
# Rollback Plan: v<version>
## Trigger Conditions
- [When to rollback — e.g., error rate >5%, P0 incident, data corruption]
## Steps
1. [Revert command — e.g., `vercel rollback`, `fly releases rollback`]
2. [DB rollback — e.g., `npm run migrate:rollback` or "N/A — no migration"]
3. [Cache invalidation if needed]
4. [Notify stakeholders]
## Verification
- [ ] Previous version serving traffic
- [ ] Health check passing
- [ ] No data loss confirmed
## Post-Rollback
- [ ] Incident created for root cause analysis
- [ ] Fix branch created from rolled-back commit
If any BLOCK item fails → STOP deploy. Fix before retrying. If WARN items missing → proceed but flag in deploy report.
Step 2 — Detect platform
Use Bash to inspect the project root for platform config files:
ls vercel.json netlify.toml Dockerfile fly.toml 2>/dev/null
cat package.json | grep -A5 '"scripts"'
Map findings to platform:
| File found | Platform |
|---|---|
vercel.json | Vercel |
netlify.toml | Netlify |
fly.toml | Fly.io |
Dockerfile | Docker / VPS |
package.json deploy script | npm deploy |
If no config found, ask the user which platform to target before continuing.
Step 3 — Deploy
Use Bash to run the platform-specific deploy command:
| Platform | Command |
|---|---|
| Vercel | vercel --prod |
| Netlify | netlify deploy --prod |
| Fly.io | fly deploy |
| Docker | docker build -t app . && docker push <registry>/app |
| npm script | npm run deploy |
Capture full command output. Extract deployed URL from output.
Step 4 — Verify deployment
Use Bash to check the deployed URL returns HTTP 200:
curl -o /dev/null -s -w "%{http_code}" <deployed-url>
If status is not 200 → flag as WARNING, do not treat as hard failure unless 5xx.
If rune:browser-pilot is available, call it to take a screenshot of the deployed URL for visual confirmation.
Step 4.5 — Post-Deploy Health Thresholds
After deploy is
阅读完整来源 ↗