ENV-002 critical environment-tiers
Staging environment exists
Staging environment deployed, deployment method documented, visible in CI history
Question to ask
"Shipping straight to prod because staging is too painful?"
Verification guide
Severity: Critical
Check automatically:
Find staging in workflow files:
grep -r -l "staging\|stage" .github/workflows/Check GitHub deployment history for staging:
gh api repos/{owner}/{repo}/deployments --jq '.[] | select(.environment | test("stag"; "i")) | {env: .environment, ref: .ref, created: .created_at}' | head -20Check workflow runs:
gh run list --limit 20 --json name,conclusion,createdAt,headBranch | jq '.[] | select(.name | test("stag"; "i"))'
From CI/deployment history, extract:
- Which workflow deploys to staging
- What branch triggers staging deploy
- Deployment frequency
Ask user to confirm:
- Staging URL
- What triggers staging deployment?
Pass criteria:
- Staging environment exists
- Deployment method identified
Fail criteria:
- No staging environment (direct dev → prod)
- Staging exists but deployment method unknown
Evidence to capture:
- Staging URL
- Workflow file path
- Deployment trigger
- Last successful deployment date
Cross-reference with:
- ENV-001 (staging should use same platform/method as prod)
- ENV-004 (staging should run in production mode)