arthai-marketplace

/deploy

Deploy to local, staging, preview, and mobile testing environments. Reads deployment knowledge from /calibrate. Refuses production, those go through your team’s review process.

Synopsis

/deploy [<local|staging|preview|testflight-internal|google-play-internal>] [<service>] [--dry-run]

Production is refused, always. /deploy production (or any environment marked production) stops hard, explains why, and offers the safe path instead: PR → CI → review → your pipeline deploys on merge. There is no override.

When to use it

Choosing an environment: use local for your own development, staging to share work with your team, preview for a temporary URL tied to a branch, and testflight-internal/google-play-internal to push a build to mobile internal testers.

Quickstart

/deploy staging

What you’ll see: pre-deploy checks (clean tree, right branch, CI green, platform CLI authenticated), then the platform-appropriate deploy, a health check, and a plain-English summary with the staging URL.

Examples

/deploy staging                    # deploy current branch to staging
/deploy local                      # start/restart the local stack, run migrations, verify health
/deploy preview                    # temporary preview URL (Vercel/Netlify/Cloudflare style)
/deploy testflight-internal        # iOS build to TestFlight internal testers only
/deploy staging backend --dry-run  # show what would happen for one service, deploy nothing

Service names are project-specific (e.g. backend, frontend, api), use the names from your CLAUDE.md ## Local Dev Services table.

Arguments & flags

Flag Values Default What it does
environment local, staging, preview, testflight-internal, google-play-internal menu shown Target environment; omit it to pick from a menu of your calibrated environments
service a service name all/default Narrows the deploy for multi-service projects
--dry-run : off Shows what would happen without deploying

What it does

  1. Reads the deployment knowledge base that /calibrate populated (environments, platforms, CI pipeline). If the project isn’t calibrated, it stops and tells you to run /calibrate first.
  2. Resolves the target, if you didn’t name an environment, it shows a menu of your environments, a user-confirmation checkpoint.
  3. Production safety gate, refuses production/prod/live unconditionally and offers staging, /pr, or /sre ci instead.
  4. CI pipeline check, if your CI already deploys this environment, it offers options (trigger the pipeline, watch it, bypass CI for staging with confirmation, or explain the pipeline), a user-confirmation checkpoint rather than deploying around your pipeline.
  5. Pre-deploy checks, clean working tree, correct branch, latest CI run passing, platform CLI installed/authenticated, project linked. Failures stop the deploy with a concrete fix.
  6. Deploys, spawns an SRE agent with the platform-specific sequence (Railway, Vercel, Fly.io, Netlify, Cloudflare Pages, GitHub Pages, Render, or EAS/fastlane for mobile internal tracks). local starts services, runs migrations, and verifies health.
  7. Verifies and reports, health checks with retries (or build number + processing ETA for mobile), logs the deploy to the knowledge base, and presents next steps in plain English.
  8. Offers auto-deploy, after a successful staging deploy, asks if you want a cloud Routine that deploys staging automatically on PR merge, a user-confirmation checkpoint (declining changes nothing).

Agents spawned

Agent Model tier Role
sre sonnet Runs the platform-specific deploy sequence and health verification (one per deploy)

Output & artifacts

Troubleshooting

Problem Fix
Run /calibrate first /deploy won’t guess your infrastructure: run /calibrate once (2–3 min), then retry
I won't deploy to production Working as designed: use /deploy staging to test, then /pr for the production path
You have uncommitted changes Commit or stash, then retry: deploys only run from a clean tree
CI is failing on this commit Run /ci-fix, then retry the deploy
Platform CLI not authenticated Follow the printed auth one-liner (e.g. railway login), then retry
Deploy succeeded but health check failed /deploy escalates to /sre debug automatically; three consecutive failures route to /incident