<!--
Flag #62/#63: allowed-tools removed. Inherits Bash(*) from
.claude/settings.json. Restricting to specific subcommand patterns at the
skill level silently blocks agents on permission prompts the agent cannot
see — see dispatch #171 for the devex incident that surfaced this trap.
-->
Deploy
Deploy the project to the configured platform.
Arguments
- $ARGUMENTS: Optional flags:
--status— check deployment status--rollback— rollback to previous deployment--logs— show deployment logs--env <name>— target environment (default: staging)- (default) — deploy current branch
How to Execute
Step 1: Resolve Provider
Read the deploy provider from agency/config/agency.yaml under deploy.provider.
# agency.yaml
deploy:
provider: "fly" # or "aws", "vercel", "cloudflare", "railway"
The provider maps to a tool: ./agency/tools/deploy-{provider}
Step 2: Check Provider Tool Exists
Verify ./agency/tools/deploy-{provider} exists and is executable. If not:
- List available deploy tools:
ls ./agency/tools/deploy-* - Tell the user which providers are available
- Suggest adding the provider tool if none exist
Step 3: Pre-Deploy Checks
Before deploying:
- Verify working tree is clean (
git status --porcelain) - Confirm the target environment with the user
- Show what will be deployed (current branch, latest commit)
Step 4: Dispatch to Provider
Execute: ./agency/tools/deploy-{provider} {verb} {args}
Where verb is one of: deploy, status, rollback, logs (mapped from flags above, default: deploy).
Pass --env value if specified.
Step 5: Report
Show the user:
- Deployment URL
- Status (success, in-progress, failed)
- Any post-deploy verification results
Provider Contract
Each deploy-{provider} tool must support these verbs:
deploy [--env <name>]— deploy, print URL to stdoutstatus [--env <name>]— print deployment staterollback [--env <name>]— revert to previous deploymentlogs [--env <name>]— show deployment logs
Error Handling
- If no provider configured in agency.yaml, suggest adding the
deploysection - If provider tool missing, list available alternatives
- If deploy fails, show stderr, suggest rollback if available
- Always confirm with user before deploying to production